Commit 12d03768 by 前端

Merge branch 'SAAS+V4.51.1-0415' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.51.1-0415
2 parents 7bde4862 610fae63
Showing 33 changed files with 2267 additions and 87 deletions
......@@ -258,3 +258,15 @@ export function listBrandStaffPage(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.listBrandStaffPage`
return request(data, "post")
}
/** 标签列表 */
export function findAllTags(data = {}) {
data.method = `dj.api.material.scenemarket.findAllTags`
return request(data, "post")
}
/** 场景列表 */
export function findAllLevel(data = {}) {
data.method = `dj.api.material.scenemarket.findAllLevel`
return request(data, "post")
}
import request from "./request"
// const path = 'dj.api.'
......@@ -70,3 +71,9 @@ export function queryServiceRefByShop() {
data.method = `${path2}scenemerchantref.queryServiceRefByShop`
return request(data, "post")
}
//文件上传
export function uploadFile(data) {
data.method = `dj.api.smartcarlife.orderReconciliationRecord.import`
return request(data, "post",["file"])
}
\ No newline at end of file
......@@ -20,9 +20,13 @@ const request = (
) => {
// 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = ""
if (params.method.includes("dj")) {
if(params.method.includes("dj.api.script")){
apiName = 'script'
}
else if (params.method.includes("dj")) {
apiName = "dj"
} else {
console.log( params.method.split(".api"))
apiName = params.method.split(".api")[0]
}
......@@ -39,7 +43,8 @@ const request = (
merchants: "axios3",
reportExport: "axios4",
"glsx.accounts.biz.common.pictureUpload": "common",
clue:'axios5'
clue:'axios5',
script:'axios7'
}
const baseApiName = mappingName[apiName]
// console.log(baseApiName, "baseApiName")
......@@ -72,7 +77,8 @@ const request = (
scrm: "sha1",
glsx: "md5",
"glsx.accounts.biz.common.pictureUpload": "md5",
clue:'sha1'
clue:'sha1',
script:'sha1'
}
// console.log(signWay[apiName], "baseApiName")
const secret = baseConfig[baseApiName].secret
......
import request from "./request"
import RequestMethods from "./request.methods"
// 主营品牌(旧接口)
export function getBrandList(data) {
data.method = `dj.api.smartcarlife.common.car.brand.list`
return request(data, RequestMethods.POST)
}
// 业务列表
export function findAllLevelList(data) {
data.method = `dj.api.material.scenemarket.findAllLevel`
return request(data, RequestMethods.POST)
}
// 分页列表查询
export function getSceneData(data) {
data.method = `dj.api.material.scenemarket.sceneMarketLeadsPage`
return request(data, RequestMethods.POST)
}
// 列表导出
export function sceneExport(data) {
data.method = `dj.api.material.scenemarket.sceneMarketLeadsListExport`
return request(data, RequestMethods.POST)
}
// 详情
export function findSceneMarketLeadsById(data) {
data.method = `dj.api.material.scenemarket.findSceneMarketLeadsById`
return request(data, RequestMethods.POST)
}
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-04-01 11:30:56
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-04-07 14:05:35
* @FilePath: \dj-car-life-system\src\api\verbal.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import request from "./request"
import RequestMethods from "./request.methods"
// 查询分类列表
export function getClassLabelList(data) {
data.method = `dj.api.script.extract.class.label.list`
return request(data, RequestMethods.POST)
}
// 话术统计列表
export function geRecordSummaryList(data) {
data.method = `dj.api.script.extract.record.summary`
return request(data, RequestMethods.POST)
}
// 查询场景标签列表
export function getSceceLabelList(data) {
data.method = `dj.api.script.extract.scene.label.list`
return request(data, RequestMethods.POST)
}
// 话术明细列表
export function getRecordList(data) {
data.method = `dj.api.script.extract.record.list`
return request(data, RequestMethods.POST)
}
// 话术明细列表导出
export function recordExport(data) {
data.method = `dj.api.script.extract.record.list.export`
return request(data, RequestMethods.POST)
}
// 详情
export function getRecordDetail(data) {
data.method = `dj.api.script.extract.record.detail`
return request(data, RequestMethods.POST)
}
//话术操作记录
export function getOperateList(data) {
data.method = `dj.api.script.extract.record.log`
return request(data, RequestMethods.POST)
}
// 话术埋点列表
export function getRecordBrowseList(data) {
data.method = `dj.api.script.extract.record.browse.list`
return request(data, RequestMethods.POST)
}
// 话术埋点导出
export function recordBrowseExport(data) {
data.method = `dj.api.script.extract.record.browse.list.export`
return request(data, RequestMethods.POST)
}
\ No newline at end of file
......@@ -828,7 +828,9 @@ export const downloadReportManage_reportType = [
{ confId: "dailybehaviorsummary", confValue: "日行为汇总表" },
{ confId: "weeklybehaviorsummary", confValue: "周行为汇总表" },
{ confId: "businessDataSummary", confValue: "业务数据汇总" },
{ confId: "yanbaoMerAndPerRanking", confValue: "门店产值及个人成交排名" }
{ confId: "yanbaoMerAndPerRanking", confValue: "门店产值及个人成交排名" },
{ confId: "abnormalClockWeeklySummary", confValue: "打卡异常周汇总表" },
{ confId: "ClockMonthlySummary", confValue: "打卡月汇总表" }
]
// 下载报表 业务类型
......@@ -1110,6 +1112,12 @@ export const businessLineOpt = [
{ confId: 2, confValue: "延保" }
]
// 嘀加上架 结算方式
export const settlementTypeOpt = [
{ confId: 2, confValue: "门店收款" },
{ confId: 5, confValue: "嘀加收款" }
]
// 门店产值 业务类型
export const outputValue_businessOpt = [
{ confId: 0, confValue: "轻改" },
......@@ -1123,8 +1131,14 @@ export const outputValue_operTypeOpt = [
{ confId: 2, confValue: "修改" },
{ confId: 3, confValue: "删除" }
]
//话术业务场景
export const channelTypeList = [
{ confId: 1, confValue: "企业微信" },
{ confId: 2, confValue: "展业app" }
]
// 预警管理 所属业务
export const businessSceneOpt = [
{ confId: 0, confValue: "延保" },
{ confId: 1, confValue: "精品" }
]
......@@ -49,7 +49,15 @@ export const routerName = {
parentId: "90501"
}
]
}
},
{
authId: "9050104",
parentId: "90501",
label: "对账确认",
category: "Button",
type: "primary",
handle: "handleAccountConfirm"
},
],
component: _import("financeManage/index")
},
......
......@@ -2,8 +2,8 @@
* @Description:
* @Author: huyue
* @Date: 2024-04-01 15:03:31
* @LastEditors: huyue
* @LastEditTime: 2024-08-13 14:42:56
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-04-08 10:33:45
*/
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
......@@ -657,7 +657,7 @@ export const routerName = {
ruleObj: {
attr: "minPerformConfigStatus",
rule: {
null: '启用',
null: "启用",
2: "启用",
1: "禁用"
},
......@@ -858,7 +858,7 @@ export const routerName = {
parentId: "91214",
label: "删除",
handle: "handleDelete"
},
}
],
component: _import("residentManage/growUpGrade/indexControl")
},
......@@ -894,5 +894,79 @@ export const routerName = {
cache: false
},
component: _import("residentManage/promotionAndDmotion/index")
},
91218: {
path: "/sceneClueManagement",
name: "sceneClueManagement",
meta: {
title: "场景线索管理",
authId: "91218",
parentId: "912",
cache: false
},
auth: [
{
authId: "9121801",
parentId: "91218",
label: "详情",
handle: "handleDetail",
addRoutePath: [
{
authId: "912180101",
name: "详情",
parentId: "91218"
}
]
}
],
component: _import("residentManage/sceneClueManagement/index")
},
912180101: {
path: "/inSceneConfigView",
name: "inSceneConfigView",
meta: {
title: "详情",
authId: "912180101",
parentId: "91218",
activePath: "/inSceneConfigView"
},
component: _import("residentManage/sceneClueManagement/detailView")
},
91220: {
path: "/verbalTrickManagement",
name: "verbalTrickManagement",
meta: {
title: "话术管理",
authId: "91220",
parentId: "912",
cache: false
},
auth: [
{
authId: "9122001",
parentId: "91220",
label: "明细",
handle: "handleDetail",
addRoutePath: [
{
authId: "912200101",
name: "详情",
parentId: "91220"
}
]
}
],
component: _import("residentManage/verbalTrickManagement/index")
},
912200101: {
path: "/inVerbalConfigView",
name: "inVerbalConfigView",
meta: {
title: "明细",
authId: "912200101",
parentId: "91220",
activePath: "/inVerbalConfigView"
},
component: _import("residentManage/verbalTrickManagement/detailView")
}
}
<template>
<div class="activity-img-box">
<div class="upload-img">
<el-button
class="avatar-uploader-desc-word"
size="small"
icon="el-icon-puls"
key="btn-i"
:disabled="!!imageUrlArr.length"
@click="selectFile()"
>上传文件</el-button
>
<input
type="file"
ref="uploadImgRef"
class="upload-img"
style="opacity: 0; z-index: -1"
:accept="accept"
@change="(e) => handleImgChange(e)"
/>
</div>
<template v-if="imageUrlArr && imageUrlArr.length > 0">
<div class="file-wrap" v-for="(item, index) in imageUrlArr" :key="index">
<div class="file-box" @click="toOpenPDF(item.image)">
<div class="info" v-if="item.imageName">
<img class="logo" :src="require('@/assets/pdf.png')" alt="" />
<span class="name">{{ item.imageName }}</span>
</div>
<div
class="process"
:style="{
width: item.image ? '432px' : (compress * 432) / 100 + 'px'
}"
></div>
</div>
<img
v-if="item.image"
class="del-btn"
:src="require('@/assets/icon-delete.png')"
alt=""
@click="delFile(index)"
/>
</div>
</template>
</div>
</template>
<script>
import upload from "@/common/upload"
import { uploadPDF } from "@/api/sys.base"
export default {
props: {
picOptions: {
type: Object,
default: () => {
return {
width: "104px",
height: "104px",
isClose: true,
limitSize: 10
}
}
},
imageUrlArr: {
type: Array,
default: () => [
{
name: "asdakf.pdf",
url: "sfdsfjskdf.pdf"
}
]
},
accept: {
type: String,
default: '.pdf'
},
limit: {
type: String,
default: "1"
},
index: {
type: Number,
default: -1
}
},
data() {
return {
compress: 0,
dialogVisibleImg: false,
uploadInfo: null,
uploading: false
}
},
methods: {
selectFile() {
if (this.uploading) {
return this.$message.error(`文件上传中,请耐心等待文件上传完成`)
}
this.$refs.uploadImgRef.click()
},
// 上传图片
handleImgChange(e) {
var file = e.srcElement.files[0]
// if (file.type?.indexOf("pdf") == -1) {
// this.$refs.uploadImgRef && (this.$refs.uploadImgRef.value = "")
// this.$message.error(`上传文件不是pdf的格式!`)
// return
// }
// 默认1MB
const limitSize = this.picOptions.limitSize || 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
this.$message.error(`上传文件大小不能超过${limitSize}MB!`)
this.$refs.uploadImgRef && (this.$refs.uploadImgRef.value = "")
return
}
if (this.imageUrlArr.length >= this.limit) {
this.$message.error(`最多上传${this.limit}个文件`)
this.$refs.uploadImgRef && (this.$refs.uploadImgRef.value = "")
return
}
this.$notify({
title: "提示",
message: `文件上传中,请稍后`
})
this.$emit("beforeUpload")
const idx = this.imageUrlArr.length
this.$set(this.imageUrlArr, idx, { imageName: file.name, image: "" })
this.uploading = true
this.uploadInfo = new upload({
showprocess: true,
success: (res) => {
this.$notify({
title: "提示",
message: `文件上传成功`,
type: "success"
})
this.$set(this.imageUrlArr, idx, {
imageName: file.name,
image: res
})
this.$emit("change", {
arr: this.imageUrlArr,
key: this.picOptions.key,
index: this.index
})
this.uploadEnd()
},
error: (err) => {
this.uploadEnd()
}
})
this.uploadInfo.clickEvent(e.srcElement.files)
},
uploadEnd() {
this.uploading = false
this.$refs.uploadImgRef && (this.$refs.uploadImgRef.value = "")
this.$emit("afterUpload")
},
toOpenPDF(url) {
if (!url) {
return this.$message({
type: "warning",
message: "文件正在上传,请稍后预览"
})
}
window.open(url)
},
// 删除图片/视频
delFile(index) {
this.imageUrlArr.splice(index, 1)
this.$emit("change", {
arr: this.imageUrlArr,
key: this.picOptions.key,
id: 1,
index: this.index
})
}
}
}
</script>
<style scoped lang="scss">
.file-wrap {
display: flex;
align-items: center;
.file-box {
width: 432px;
height: 32px;
border-radius: 4px;
position: relative;
cursor: pointer;
.info {
height: inherit;
display: flex;
align-items: center;
margin-left: 8px;
position: relative;
z-index: 1;
.logo {
margin-right: 8px;
}
.name {
color: #1d1d1d;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}
.process {
position: absolute;
height: 32px;
left: 0;
top: 0;
background: #f4f6f7;
}
}
.del-btn {
width: 16px;
height: 16px;
cursor: pointer;
margin-left: 10px;
}
}
.activity-img-box {
max-width: 600px;
.pic-box {
position: relative;
width: 104px;
height: 104px;
border-radius: 4px;
margin-right: 8px;
margin-bottom: 5px;
&:hover .mask {
opacity: 1;
}
.pic {
position: absolute;
object-fit: fill;
}
.photo-activity {
position: absolute;
width: 100%;
height: 100%;
}
.mask {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
background: rgba(0, 0, 0, 0.5);
color: #ffffff;
opacity: 0;
top: 0;
right: 0;
width: 104px;
height: 104px;
z-index: 999;
.pic-pane-close {
width: 16px;
height: 16px;
cursor: pointer;
margin-left: 24px;
&:first-child {
margin-left: 0;
}
img {
width: 100%;
display: block;
}
}
}
}
.upload-img {
position: relative;
display: inline-block;
input {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
}
}
.avatar-uploader-desc-word {
font-weight: 400;
font-size: 28rpx;
color: #666666;
margin-bottom: 8px;
}
.image-dialog {
::v-deep {
.el-dialog__header {
border-bottom: 0px;
padding: 0px;
}
}
}
}
</style>
\ No newline at end of file
......@@ -22,6 +22,14 @@ export const CONTENT_TYPE_OPTIONS = [
{
id: 3,
label: "富文本"
},
{
id: 4,
label: "Excel"
},
{
id: 5,
label: "Word"
}
]
// 场景
......@@ -60,6 +68,10 @@ export const CHANNEL_OPTIONS = [
{
id: 2,
label: "展业助手"
},
{
id: 3,
label: "场景集市"
}
]
// 状态
......
......@@ -64,6 +64,7 @@
:before-search-fn="beforeSearchFn">
<div slot="merchantSlot" slot-scope="scope">
<div v-if="scope.scope.showMerchant == 0">全部门店</div>
<div v-else-if="scope.scope.showMerchant == null">-</div>
<el-popover v-else placement="top" width="245" trigger="hover">
<div class="merchant-wrap">
<div
......@@ -289,7 +290,9 @@ export default {
0: "图片",
1: "视频",
2: "PDF",
3: "富文本"
3: "富文本",
4: "excel",
5: "word"
}[cellValue.type]
}
},
......@@ -315,7 +318,8 @@ export default {
return {
0: "培训资料",
1: "营销素材",
2: "展业助手"
2: "展业助手",
3: "场景集市"
}[cellValue.showChannel]
}
},
......
......@@ -15,6 +15,7 @@ export default {
return {
userInfo: this.$store.state.d2admin.user.info,
// 7 - 服务商
// accountType: this.$store.state.d2admin.user.info.detail.accountType
accountType: this.$store.state.d2admin.user.info.detail.accountType
}
},
......
......@@ -110,6 +110,17 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="结算方式:" prop="settlementType">
<el-select v-model="formData.settlementType" placeholder="请选择" class="sortInput">
<el-option v-for="item in settlementTypeOpt" :key="item.confId" :label="item.confValue"
:value="item.confId">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="预估利润率:">
{{
$$(formData.createBusinessProduct, "profitRate") | filterComputedDataPro
......@@ -204,7 +215,7 @@ import { limitPrice } from "@/common/format"
import selectGoodsDialog from "../../../components/selectGoodsDialog.vue"
import { baseConfig } from "@/main"
import { filterSpecsStr, convertYuanToWan } from "../../../filterOption"
import { businessLineOpt } from "@/common/constants.js"
import { businessLineOpt, settlementTypeOpt } from "@/common/constants.js"
import { computeProductProfitDetail } from "@api/shelfManage"
export default {
name: "GoodTab",
......@@ -233,7 +244,8 @@ export default {
minSellPrice: "",
djCost: "",
thirdPartyCost: "",
businessLine: ""
businessLine: "",
settlementType: ""
},
formRules: {
upgradeGoodsId: [
......@@ -273,6 +285,13 @@ export default {
message: "请选择业务线",
trigger: "change"
}
],
settlementType: [
{
required: true,
message: "请选择结算方式",
trigger: "change"
}
]
},
oldVal: {
......@@ -283,6 +302,7 @@ export default {
},
selectGoodsVisible: false,
businessLineOpt: deepClone(businessLineOpt),
settlementTypeOpt: deepClone(settlementTypeOpt),
receivedMessage: {},
requestDataFlag: false
}
......
......@@ -6,9 +6,9 @@
</div>
<div style="padding: 20px 20px 0;">
<el-form :model="merchantInfo" label-width="150px">
<el-form-item v-for="(item, index) in editFormData" :key="index" class="form-item" :style="{ 'width': '48%'}">
<span slot="label" class="label">{{item.label}}:</span>
<span>{{merchantInfo[item.name] || '-'}}{{item.suffix}}</span>
<el-form-item v-for="(item, index) in editFormData" :key="index" class="form-item" :style="{ 'width': '48%' }">
<span slot="label" class="label">{{ item.label }}:</span>
<span>{{ merchantInfo[item.name] || '-' }}{{ item.suffix }}</span>
</el-form-item>
</el-form>
</div>
......@@ -17,7 +17,7 @@
<script>
import { sceneCodeList } from '@/common/constants.js'
import { busiModeList, operationModeList } from '../../constant/baseData'
import { busiModeList, operationModeList, onlinePointsEnabledList } from '../../constant/baseData'
export default {
name: 'ShopMerchantInfo',
props: {
......@@ -76,11 +76,19 @@ export default {
}, {
label: "上级服务商",
name: 'parentPartnerMerchantName',
}],
},
{
label: "是否开启线上积分",
name: "onlinePointsEnabled",
attrName: "confName",
optionsName: "onlinePointsEnabledList"
}
],
baseData: {
busiModeList: busiModeList,
sceneCodeList: sceneCodeList,
operationModeList: operationModeList
operationModeList: operationModeList,
onlinePointsEnabledList
}
}
},
......@@ -99,19 +107,23 @@ export default {
</script>
<style lang="scss">
@import "../../style/editdetailCon.scss";
.shop-merchant-info-detail {
.el-form-item__label {
padding-right: 0;
}
.el-form-item__label,
.el-form-item__content {
line-height: 20px !important;
}
.form-item {
display: inline-block;
line-height: 20px;
margin-bottom: 20px;
}
.download {
margin-left: 8px;
}
......
<template>
<el-drawer class="drawerContainer" :visible.sync="addMerVisible" v-loading="loading" size="50%" direction="rtl" :wrapperClosable="wrapperClosable" :before-close="handleClose">
<el-drawer class="drawerContainer" :visible.sync="addMerVisible" v-loading="loading" size="50%" direction="rtl"
:wrapperClosable="wrapperClosable" :before-close="handleClose">
<div slot="title" class="title">新增商户</div>
<div class="add-merchant-page">
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isBlock="isBlock" label-width="150px" default-width="400px" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isBlock="isBlock" label-width="150px"
default-width="400px" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData"
:form-rules="formRules">
<div slot="parentId" slot-scope="scope">
<el-select v-model="editData[scope.scope.name]" :placeholder="scope.scope.placeholder"
@change="scope.scope.changeAttr($event, scope.scope)" style="width: 400px;" filterable remote
@visible-change="(event) => selectVisibleChange(event, scope.scope)"
:remote-method="(event) => remoteMethod(event, scope.scope.searchKey, 'store')"
v-el-select-loadmore="interestsLoadmoreMerchant" v-loading="merchantLoading">
<el-option v-for="subItem in scope.scope.optionList" :key="subItem[scope.scope.optionId]" :label="subItem[scope.scope.optionLabel]" :value="subItem[scope.scope.optionId]">
@change="scope.scope.changeAttr($event, scope.scope)" style="width: 400px;" filterable remote
@visible-change="(event) => selectVisibleChange(event, scope.scope)"
:remote-method="(event) => remoteMethod(event, scope.scope.searchKey, 'store')"
v-el-select-loadmore="interestsLoadmoreMerchant" v-loading="merchantLoading">
<el-option v-for="subItem in scope.scope.optionList" :key="subItem[scope.scope.optionId]"
:label="subItem[scope.scope.optionLabel]" :value="subItem[scope.scope.optionId]">
</el-option>
</el-select>
</div>
<div class="province-sty" slot="provinceCity">
<span class="province-icon">*</span>
<ProvinceCity ref="provinceForm" provinceLabel="商户地址:" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" :detailAddressLabel="detailAddressLabel" @selectAddressByMap="selectAddressByMap"></ProvinceCity>
<ProvinceCity ref="provinceForm" provinceLabel="商户地址:" :subdistrict="subdistrict"
@selectProvince="selectProvince" @selectCity="selectCity" :detailAddressLabel="detailAddressLabel"
@selectAddressByMap="selectAddressByMap"></ProvinceCity>
</div>
<div class="province-sty" slot="selectBrand">
<span class="province-icon" style="margin-left: -80px;">*</span>
......@@ -303,7 +309,7 @@ export default {
// 获取更多4s店数据
interestsLoadmoreMerchant() {
setTimeout(() => {
if(this.merchantLoading) {
if (this.merchantLoading) {
return true
}
this.storeCurrentPage = this.storeCurrentPage + 1
......@@ -429,7 +435,6 @@ export default {
this.$refs.brandListTree.loading = false
})
})
},
// 点击主营品牌
clickBrand(val) {
......
......@@ -27,9 +27,12 @@
import { deepClone } from "@/common/util"
import { limitPrice } from "@/common/format"
import { sceneCodeList } from "@/common/constants.js"
import { busiModeList, operationModeList } from "../../constant/baseData"
import {
get4sAndServiceMerchantListApi,
busiModeList,
operationModeList,
onlinePointsEnabledList
} from "../../constant/baseData"
import {
serviceGetMerchantList,
getyqMerchantList,
getServiceList,
......@@ -51,12 +54,12 @@ export default {
}
},
data() {
//这里存放数据
// 这里存放数据
return {
editChildRef: "editChildRef",
storeCurrentPage: 1, // 流量方 - 4s店数据分页
pageSize: 50,
merchantNameKeyword: '', // 流量方下拉框搜索
merchantNameKeyword: "", // 流量方下拉框搜索
selected4SOptionObj: {}, // 已选的4S店
formRules: {
merchantId: [{ required: true, message: "请选择流量方信息" }],
......@@ -73,6 +76,9 @@ export default {
partnerMerchantId: [{ required: true, message: "请选择服务商" }],
parentPartnerMerchantId: [
{ required: true, message: "请输入上级服务商" }
],
onlinePointsEnabled: [
{ required: true, message: "请选择是否开启线上积分" }
]
},
editFormData: [
......@@ -87,7 +93,7 @@ export default {
optionId: "merchantId",
optionLabel: "merchantName",
optionsName: "merchantList",
searchKey: 'merchantNameKeyword',
searchKey: "merchantNameKeyword",
changeAttr: (value) => {
this.getMerchantLevel()
// this.baseData.pointTypeOpt = []
......@@ -253,11 +259,14 @@ export default {
}
},
{
label: "上级服务商",
name: "parentPartnerMerchantName",
type: "input",
label: "是否开启线上积分",
name: "onlinePointsEnabled",
type: "select",
style: { width: "42%" },
maxlength: 50
optionList: [],
optionId: "confId",
optionLabel: "confName",
optionsName: "onlinePointsEnabledList"
}
],
baseData: {
......@@ -268,6 +277,7 @@ export default {
sceneCodeList: sceneCodeList,
yqMerchantList: [],
operationModeList: operationModeList,
onlinePointsEnabledList,
partnerMerchantList: []
}
}
......@@ -277,7 +287,7 @@ export default {
this.getOptionsList("editFormData", false)
// 园区店
this.getyqMerchantList()
//服务商
// 服务商
this.$EventBus.$on("updateMerchant", (obj) => {
this.storeCurrentPage = 1
this.storeAllPages = 0
......@@ -320,9 +330,7 @@ export default {
if (
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== "全部"
) {
const temp = {}
temp[this[formName][index].optionId] = ""
......@@ -343,9 +351,7 @@ export default {
if (
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== "全部"
) {
const temp = {}
temp[this[formName][index].optionId] = ""
......@@ -372,12 +378,18 @@ export default {
}
},
dealInitData() {
this.editData.businessMode = this.editData.businessMode != null ? (this.editData.businessMode + "") : ""
this.editData.operationMode = this.editData.operationMode != null ? (this.editData.operationMode + "") : ""
this.editData.businessMode =
this.editData.businessMode != null
? this.editData.businessMode + ""
: ""
this.editData.operationMode =
this.editData.operationMode != null
? this.editData.operationMode + ""
: ""
this.initPlatformLevelList()
// 若流量方有值,但不在下拉列表,进行处理
if (this.editData.merchantId) {
let index = this.editFormData?.findIndex((v) => v.name == "merchantId")
const index = this.editFormData?.findIndex((v) => v.name == "merchantId")
this.editFormData[index]?.optionList.push({
merchantId: +this.editData.merchantId,
merchantName: this.editData.merchantName
......@@ -413,7 +425,7 @@ export default {
// 流量方 - 联动 - 服务商下拉框
getServiceList() {
return new Promise((resolve, reject) => {
let params = {
const params = {
pageSize: 100000,
currentPage: 1
}
......@@ -477,7 +489,7 @@ export default {
getPlatformMerchantList({}).then((res) => {
res.unshift({
merchantId: -1,
merchantName: '嘀加智慧云'
merchantName: "嘀加智慧云"
})
this.baseData.contractMerList = res
if (
......@@ -499,7 +511,6 @@ export default {
this.baseData.merchantList = []
this.getOptionsList("editFormData", false, "merchantId")
this.get4SStoreList() // 请求接口
} else {
}
},
unique(arr) {
......@@ -520,7 +531,7 @@ export default {
val.merchantId = val.merchantNo - 0
})
this.storeAllPages = res.pages
let index = this.editFormData?.findIndex(
const index = this.editFormData?.findIndex(
(v) => v.name == "merchantId"
)
let arr = this.unique(
......@@ -552,12 +563,12 @@ export default {
},
selectVisibleChange(event, item) {
console.log(event, 'event')
console.log(item, 'item')
if (event && item.name == 'merchantId') {
console.log(this.merchantNameKeyword, 'this.merchantNameKeyword0000')
console.log(event, "event")
console.log(item, "item")
if (event && item.name == "merchantId") {
console.log(this.merchantNameKeyword, "this.merchantNameKeyword0000")
if (this.merchantNameKeyword) {
this.merchantNameKeyword = ''
this.merchantNameKeyword = ""
this.storeCurrentPage = 1
// let index = this.editFormData?.findIndex(v => v.name == 'merchantId')
this.baseData.merchantList = []
......
......@@ -111,6 +111,7 @@ import tableAccount from "./tableAccount"
import { limitPrice } from "@/common/format"
import { deepClone } from "@/common/util"
import { divisionRuleTestGet } from "@api/merchant"
import { baseConfig } from "@/main"
import {
getAllGoodsListPage as getAllGoodsList,
merchantPackageGoodsInfoPage
......@@ -1318,10 +1319,14 @@ export default {
// categoryType: obj.categoryType,
// goodsTypeGroupRelations: obj.categoryType == 1 ? goodsTypes : upgradeGoods,
expenseCategoryRules = expenseCategoryRules.filter(
(item) =>
item.expenseCategoryId != 701 && item.expenseCategoryId != 1104 && item.expenseCategoryId != 314
)
expenseCategoryRules = expenseCategoryRules.filter(item => {
return baseConfig.shelfManageDivisionConfig.includes(item.expenseCategoryId)
})
// expenseCategoryRules = expenseCategoryRules.filter(
// (item) =>
// item.expenseCategoryId != 701 && item.expenseCategoryId != 1104 && item.expenseCategoryId != 314
// )
const returnObj = {
expenseCategoryRules,
shop4sDeductChargeFlag: obj.shop4sDeductChargeFlag,
......
......@@ -27,3 +27,13 @@ export const operationModeList = [
confName: "直营"
}
]
export const onlinePointsEnabledList = [
{
confId: "Y",
confName: "是"
},
{
confId: "N",
confName: "否"
}
]
......@@ -76,7 +76,8 @@ export default {
workWechatApproveCode: "",
approveType: "",
systemStatus: "",
approveStatus: ""
approveStatus: "",
merchantName: ""
},
searchFormSearch: {},
showFormData: [
......@@ -88,6 +89,13 @@ export default {
isClear: true
},
{
label: "流量方信息",
name: "merchantName",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "审批编号",
name: "workWechatApproveCode",
type: "input",
......@@ -139,6 +147,10 @@ export default {
prop: "businessCode"
},
{
label: "流量方信息",
prop: "merchantName"
},
{
label: "审批类型",
prop: "approveType",
width: "150px",
......@@ -251,7 +263,8 @@ export default {
workWechatApproveCode: "",
approveType: "",
systemStatus: "",
approveStatus: ""
approveStatus: "",
merchantName: ""
}
this.$refs.packageIndexTable.refreshTable(false, true)
},
......
......@@ -418,6 +418,7 @@ import { mapActions, mapState, mapMutations } from "vuex"
import { getParkStore } from "@api/editCustomer"
import chooseRuleDialog from './chooseRuleDialog'
import ruleInfoDialog from './ruleInfoDialog'
import { deepClone } from "@/common/util"
export default {
name: "CarDamage",
components: {
......@@ -1135,11 +1136,9 @@ export default {
},
getList() {
var params = this.getParams()
params = {
...this.page,
...params
}
getList(params).then((res) => {
let eventParams = deepClone({ ...this.page, ...params })
if (eventParams?.zyVoucherStatus == 1) eventParams.status = 13
getList(eventParams).then((res) => {
this.tableData = res.list.map((item) => {
item.paySuccessDate = item.paySuccessDate
? Util.dateFormate(item.paySuccessDate, "YYYY-MM-DD HH:mm:ss")
......@@ -1153,10 +1152,9 @@ export default {
},
getOrderCount() {
var params = this.getParams()
params = {
...params
}
getOrderCount(params).then((res) => {
let eventParams = deepClone({ ...params })
if (eventParams?.zyVoucherStatus == 1) eventParams.status = 13
getOrderCount(eventParams).then((res) => {
this.totalCount = res.totalPriceCount
})
},
......@@ -1177,11 +1175,13 @@ export default {
}
params.pageNum = 1
params.method = "dj.api.smartcarlife.ordermanage.export.async"
let eventParams = deepClone({ ...params })
if (eventParams?.zyVoucherStatus == 1) eventParams.status = 13
const list = [
...this.dowloadList,
{
name: "订单列表",
exportParam: JSON.stringify(params),
exportParam: JSON.stringify(eventParams),
status: "waiting",
timeid: new Date().getTime()
}
......@@ -1193,11 +1193,13 @@ export default {
var params = this.getParams()
params.pageNum = 1
params.method = "dj.api.smartcarlife.order.residentEquity.export.async"
let eventParams = deepClone({ ...params })
if (eventParams?.zyVoucherStatus == 1) eventParams.status = 13
const list = [
...this.dowloadList,
{
name: "分润&成本分析",
exportParam: JSON.stringify(params),
exportParam: JSON.stringify(eventParams),
status: "waiting",
timeid: new Date().getTime()
}
......
......@@ -95,7 +95,7 @@
</div>
</el-form-item>
<el-form-item
label="延保协议:"
label="合同协议:"
class="photoItem photoItemList"
v-if="$$(detail.payOrder, 'zyVoucherUrl')"
>
......
<template>
<div class="detail-view">
<div class="title">场景线索详情</div>
<div class="content">
<template v-for="(item, index) in formData">
<div class="item" :key="index">
<div class="label">{{ item.label }}:</div>
<div class="value" v-if="item.prop">{{ detailInfo[item.prop] }}</div>
<div class="value" v-else>{{ item.formatter(detailInfo) }}</div>
</div>
</template>
</div>
<div class="content bg">
<template v-for="(item, index) in formData2">
<div class="item" :key="index">
<div class="label">{{ item.label }}:</div>
<div class="value" v-if="item.prop">
{{ detailInfo.extendedAttributes[item.prop]|| "-" }}
</div>
<div class="value" v-else>
{{ item.formatter(detailInfo.extendedAttributes)|| "-" }}
</div>
</div>
</template>
</div>
</div>
</template>
<script>
import { findSceneMarketLeadsById } from "@/api/scene.js"
import { Util, deepClone } from "@/common/util"
export default {
data() {
return {
isFlag: false,
id: this.$route.query.id,
detailInfo: {},
formData: [
{
label: "门店名称",
prop: "storeName"
},
{
label: "门店品牌",
prop: "storeBrand"
},
{
label: "员工姓名",
prop: "storeBrand"
},
{
label: "提报日期",
formatter: (cellValue) => {
return cellValue.createdDate
? Util.dateFormate(cellValue.createdDate, "YYYY/MM/DD HH:mm:ss")
: "-"
}
},
{
label: "业务分类",
prop: "businessCodeName"
}
],
renewal: {
existingRenewalCustomers: "存量续保客户数",
cooperatingInsuranceCompanies: "合作的保险公司",
giftedStoreServicesOrBenefits: "赠送的门店服务或权益",
newEnergyRenewalCashbackDetails: "新能源续保返现情况",
newEnergyRenewalCashbackDetails: "新能源续保返现情况",
useThirdPartyMallForWithdrawal: "是否使用第三方商场提现",
newThirdPartyMallName: "新第三方商场名称",
insuranceCompanyCommissionPoliciesAndRepairPromises:
"保险公司佣金政策及送修承诺",
renewalDiscountMethods: "续保优惠方式",
renewalStaffDetails: "续保人员情况",
renewalBusinessInvestmentPlans: "续保业务投入计划"
},
crowd: {
dealerName: "经销商姓名/联系方式",
generalManager: "店总经理",
afterSalesDirector: "售后总监",
postSalesDirector: "销售后总监",
marketingManager: "市场经理",
showroomAddress: "展厅地址",
location: "地理位置",
storeNature: "店面性质",
afterSalesStations: "售后工位数",
premiumConstructionStations: "精品施工工位数",
serviceAdvisorsTotal: "SA总人数(服务顾问)",
customerServiceStaff: "客服人数",
currentCustomerBase: "目前基盘数(现有客户)",
targetCustomerBaseWithin3Years: "3年内基盘数(目标客户)",
monthlyVisits: "进店量(月度)",
monthlyPremiumSalesAmount: "精品成交金额(月度)",
mainModels: "主要进店车型",
mainOriginalPremiums: "主要进店原厂精品(列举5个)",
purchaseGiftPremiums: "购车赠送精品",
remarks: "备注"
},
formData2: []
}
},
mounted() {
this.getDetail()
},
methods: {
getDetail() {
findSceneMarketLeadsById({
id: this.id
})
.then((data) => {
this.isFlag = true
if (data) {
data.extendedAttributes = JSON.parse(data.extendedAttributes)
this.detailInfo = data
console.log(this.detailInfo)
// "SC_B002", "数字化延保"
// "SC_B006", "售后众筹"
let arr =
this.detailInfo.businessCode == "SC_B002"
? this.renewal
: this.crowd
this.formData2 = this.handleData(arr)
}
})
.catch((err) => {
if (error) this.$message.error(error)
})
},
handleData(data) {
let arr = Object.keys(data).map((item) => {
return {
label: data[item],
prop: item
}
})
return arr
}
}
}
</script>
<style scoped lang="scss">
.detail-view {
min-width: 1200px;
min-height: 706px;
background-color: #fff;
padding-bottom: 20px;
overflow: scroll;
.title {
height: 50px;
padding: 13.5px 20px;
color: #333333;
font-size: 16px;
border-bottom: 1px solid #e5e5e5;
box-sizing: border-box;
}
.content {
margin: 20px 20px 0 20px;
display: flex;
align-items: center;
flex-wrap: wrap;
.item {
width: 50%;
display: flex;
align-items: center;
margin-bottom: 20px;
.label {
min-width: 240px;
color: #666666;
font-size: 14px;
text-align: right;
}
.value {
min-width: 330px;
white-space: wrap;
color: #333333;
font-size: 14px;
text-align: left;
}
}
}
}
.bg {
padding: 12px 0;
border-radius: 4px;
border: 1px solid #e5e5e5;
background: #f5f7fa;
margin: 0px 20px !important;
}
</style>
\ No newline at end of file
<template>
<d2-container class="customer-tags">
<div class="header" slot="header">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData"
>
<template slot="businessCode">
<el-cascader
v-model="searchForm.businessCodeArr"
:options="baseData.businessTypeList"
:props="props"
></el-cascader>
</template>
</d2-search>
<div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header title="场景线索列表">
<el-button size="small" type="primary" @click="exportTable">
导出
</el-button>
</d2-table-header>
<d2-table
ref="table"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9121801']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script>
import {
getBrandList,
findAllLevelList,
getSceneData,
sceneExport
} from "@/api/scene.js"
import { Util, deepClone } from "@/common/util"
export default {
data() {
return {
getListApi: getSceneData,
tableParams: {
listName: "list",
tableOption: {
width: "100"
},
tableColumns: [
{
label: "门店名称",
prop: "storeName"
},
{
label: "主营品牌",
prop: "storeBrand"
},
{
label: "业务分类",
prop: "businessCodeName"
},
{
label: "员工姓名",
prop: "createdBy"
},
{
label: "提报时间",
formatter: (cellValue) => {
return cellValue.createdDate
? Util.dateFormate(cellValue.createdDate, "YYYY-MM-DD HH:mm:ss")
: "-"
}
}
]
},
props: {
value: "code",
label: "directoryName",
children: "sceneMarketLevelTwoList"
},
searchFormSearch: {},
searchForm: {
businessCodeArr:[],
storeName: "",
reportDate: [],
storeBrandId: "",
createdBy: ""
},
showFormData: [
{
label: "门店名称",
name: "storeName",
type: "input",
isClear: true
},
{
label: "主营品牌",
name: "storeBrandId",
type: "select",
// multiple: true,
isClear: true,
optionList: [],
optionId: "id",
optionLabel: "label",
optionsName: "brandList"
},
{
label: "业务类型",
name: "businessCode",
type: "slot",
addHtml: "businessCode"
},
{
label: "员工姓名",
name: "createdBy",
type: "input",
isClear: true
},
{
label: "提报日期",
name: "reportDate",
type: "datePicker",
isClear: false,
pickerOptions: "rangePickerOptions_30day2"
}
],
baseData: {
businessTypeList: [],
brandList: []
}
}
},
mounted() {
this.initSelect()
},
methods: {
handleDetail(data) {
console.log("row", data)
this.$router.push({
path: "/inSceneConfigView",
query: {
id: data.id
}
})
},
beforeSearchFn(type = 1) {
console.log(this.searchForm)
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.businessCode=this.searchFormSearch.businessCodeArr.length>1?this.searchFormSearch.businessCodeArr[1]:''
if (this.searchForm?.reportDate?.length) {
let [startDate, endDate] = this.searchForm.reportDate
this.searchFormSearch.startDate = Util.dateFormate(
startDate,
"YYYY-MM-DD"
)
this.searchFormSearch.endDate = Util.dateFormate(
endDate,
"YYYY-MM-DD"
)
}
delete this.searchFormSearch.reportDate
delete this.searchFormSearch.businessCodeArr
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
async exportTable() {
try {
await this.beforeSearchFn()
const res = await sceneExport({
...this.searchFormSearch
})
if (res) window.open(res)
} catch (error) {
if (error) this.$message.error(error)
}
},
initSelect() {
// 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误
Promise.allSettled([this.getBusinessTypeList(), this.getBrandList()])
.then((results) => {
// 检查每个任务的结果
results.forEach((result, index) => {
if (result.status === "rejected") {
console.error(`Task ${index} failed:`, result.reason)
}
})
// 统一调用 getOptionsList
this.getOptionsList()
})
.catch((err) => {
console.error("Unexpected error in initSelect:", err)
this.getOptionsList() // 确保即使有意外错误也调用 getOptionsList
})
},
getBusinessTypeList() {
return new Promise((resolve, reject) => {
findAllLevelList({})
.then((res) => {
this.baseData.businessTypeList = res
resolve(res) // 返回结果以便主流程感知
})
.catch((err) => {
console.error("Error in getBusinessTypeList:", err)
reject(err) // 捕获并传递错误
})
})
},
getBrandList() {
return new Promise((resolve, reject) => {
getBrandList({})
.then((res) => {
this.baseData.brandList = res
resolve(res) // 返回结果以便主流程感知
})
.catch((err) => {
console.error("Error in getBrandList:", err)
reject(err) // 捕获并传递错误
})
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
// if (item.optionsName != "brandList") {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
// }
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<baseDialog
:is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose"
>
<div class="detail-content">
<div class="form_div">
<el-form class="edit-sub-block" label-width="110px" :inline="true">
<el-row :gutter="20">
<template v-for="(item, index) in configData">
<el-col :span="item.col ? item.col : 12" :key="index">
<el-form-item :label="item.title">
<slot
v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
/>
<div v-else>
<div
v-if="item.className"
:class="[item.className(detailInfo)]"
></div>
{{ detailInfo[item.key] ? detailInfo[item.key] : "-" }}
</div>
</el-form-item></el-col
>
</template>
</el-row>
</el-form>
</div>
<div class="operate-wrap">
<div class="title">操作记录</div>
<div class="operate-list" v-if="operateData.length>0">
<div
v-for="(item, index) in operateData"
:key="index"
class="operate-item"
>
<div class="header">
<span class="icon"></span>
<span class="type">{{
item.type == 1 ? "标注分类" : "二次确认"
}}</span>
<span class="result">通过</span>
</div>
<div class="content">
{{ item.staffName }}<span>{{ item.createdTime }}</span>
</div>
</div>
</div>
<div v-else class="empty">暂无记录</div>
</div>
</div>
</baseDialog>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { getRecordDetail, getOperateList } from "@api/verbal"
export default {
name: "DetailDialog",
props: {
visible: {
type: Boolean,
default: false
},
id: {
type: Number,
default: ""
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("update:visible", val)
}
}
},
watch: {
id(val) {
if (val) this.getDetail()
}
},
mounted() {
this.getDetail()
this.getOperateList()
},
data() {
return {
operateData: [],
configData: [
{
title: "分类名:",
key: "className"
},
{
title: "业务场景:",
key: "scene"
},
{
title: "场景标签:",
key: "sceneLabelName"
},
{
title: "优秀标签:",
key: "labelName"
},
{
title: "状态:",
key: "pushStatusName",
className: (cellValue) => {
return {
1: "yellowSpot",
2: "greenSpot",
3: "ashSpot",
0: "ashSpot"
}[cellValue.pushStatus]
}
},
{
title: "更新时间:",
key: "inputTime"
},
{
title: "推送时间:",
key: "pushTime",
width: "100%"
},
{
title: "话术内容:",
key: "sourceContent",
col: 24
}
],
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "查看详情",
width: "1080px"
}
},
detailInfo: {}
}
},
methods: {
handleDetailClose() {
this.dialogShow = false
},
getDetail() {
getRecordDetail({ id: this.id }).then((res) => {
if (res) {
res.scene = res.scene == 1 ? "精品" : "延保"
res.pushStatusName = res.pushStatus == 1 ? "已推送" : "未推送"
res.pushTime = res.pushTime
? Util.dateFormate(res.pushTime, "YYYY/MM/DD HH:mm:ss")
: "--"
res.inputTime = res.inputTime
? Util.dateFormate(res.inputTime, "YYYY/MM/DD HH:mm:ss")
: "--"
this.detailInfo = res
}
})
},
getOperateList() {
getOperateList({ id: this.id }).then((res) => {
if (res) {
this.operateData = res
}
})
}
}
}
</script>
<style lang="scss" scoped>
.form_div {
color: #333333;
padding: 20px 30px;
.edit-sub-block {
.el-form-item {
width: 100%;
margin-bottom: 0px;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
}
.edit-sub-block-two {
.el-form-item {
margin-bottom: 0px;
}
}
}
.operate-wrap {
.title {
padding: 10px 0;
color: #333333;
font-size: 16px;
font-weight: 500;
border-bottom: 1px solid #e5e5e5;
}
.operate-list {
margin: 20px;
.operate-item {
.header {
display: flex;
align-items: center;
.icon {
width: 8px;
height: 8px;
border: 2px solid #347bff;
border-radius: 50%;
}
.type {
color: #666666;
font-size: 14px;
line-height: 20px;
margin: 0 12px 0 16px;
}
.result {
color: #2cca74;
font-size: 12px;
font-weight: 500;
margin-left: 12px;
}
}
.content {
height: 44px;
box-sizing: border-box;
padding: 4px 0 8px 20px;
color: #999999;
font-size: 12px;
border-left: 2px solid #e4e8ee;
margin-left: 4px;
span {
margin-left: 16px;
}
}
}
}
}
.empty {
display: flex;
align-items: center;
justify-content: center;
margin-top: 20px;
}
</style>
\ No newline at end of file
<template>
<baseDialog
:is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose"
>
<div class='flex'>
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'90px'"
:form-data="showFormData"
>
</d2-search>
<el-button size="small" class="bts-search" type="primary" @click="handleSearch">
查询
</el-button>
</div>
<el-button size="small" style="margin-right:1024px;" @click="exportTable">
导出
</el-button>
<d2-table
ref="table"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
:layout="'total,prev, pager, next'"
>
</d2-table>
</baseDialog>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { getRecordBrowseList, recordBrowseExport } from "@api/verbal"
export default {
name: "StatisticsDialog",
props: {
visible: {
type: Boolean,
default: false
},
id: {
type: Number,
default: ""
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("update:visible", val)
}
}
},
mounted() {
},
data() {
return {
getListApi: getRecordBrowseList,
searchFormSearch: {},
searchForm: {
staffPhone: "",
staffName:"",
merchantName:"",
updateDate: [],
pushStatus: ""
},
showFormData: [
{
label: "手机号",
name: "staffPhone",
type: "input",
placeholder: "请输入",
maxlength: "11",
isClear: true
},
{
label: "员工名称",
name: "staffName",
placeholder: "请输入",
type: "input",
maxlength: "40",
isClear: true
},
{
label: "门店名称",
name: "merchantName",
placeholder: "请输入",
type: "input",
isClear: true
},
{
label: "浏览时间",
name: "updateDate",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
}
],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: false,
tableColumns: [
{
label: "员工名称",
prop: "staffName"
},
{
label: "手机号",
prop: "staffPhone"
},
{
label: "门店名称",
prop: "merchantName"
},
{
label: "浏览时间",
prop:'sustainTimeStr'
// formatter: (cellValue) => {
// const secondsToMinutesAndSeconds = (seconds) => {
// const minutes = Math.floor(seconds / 60),
// remainingSeconds = seconds % 60
// let str = ""
// if (minutes > 0) str += `${minutes}分`
// return (str += `${remainingSeconds}秒`)
// }
// return cellValue.sustainTime
// ? secondsToMinutesAndSeconds(cellValue.sustainTime)
// : "0秒"
// }
}
]
},
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "统计",
width: "1080px"
}
}
}
},
methods: {
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.activeName = "2"
console.log("this.searchForm", this.searchForm)
this.handleSearch()
},
async exportTable() {
try {
await this.beforeSearchFn()
const res = await recordBrowseExport({
...this.searchFormSearch
})
if (res) window.open(res)
} catch (error) {
if (error) this.$message.error(error)
}
},
handleDetailClose() {
this.dialogShow = false
},
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.id=this.id
if (this.searchForm?.updateDate?.length) {
let [startTime, endTime] = this.searchForm.updateDate
this.searchFormSearch.startTime = Util.dateFormate(
startTime,
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.endTime = Util.dateFormate(
endTime,
"YYYY-MM-DD"
)+" 23:59:59"
}
delete this.searchFormSearch.updateDate
resolve()
})
}
}
}
</script>
<style lang="scss" scoped>
.bts-search{
margin-left:565px;
}
.show-search{
::v-deep{
.d2-search-block {
padding:0 !important;
}
}
}
</style>
\ No newline at end of file
<template>
<d2-container class="customer-tags">
<div class="header" slot="header">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData"
>
</d2-search>
<div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<div class="statistics-wrap">
<template v-for="(item, index) in statisticsData">
<div class="statistics-box" :key="index">
<div class="title">{{ item.label }}</div>
<div class="content" v-if="!item.innerHtml">{{queryInfo[item.key]}}</div>
<div class="inner-content" v-else v-html="item.innerHtml(queryInfo)"></div>
</div>
</template>
</div>
<div class="header-flex">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="(item, index) in tabPaneList"
:label="item.label"
:name="item.name"
:key="index"
>
</el-tab-pane>
</el-tabs>
<div>
<el-button size="small" type="primary" @click="exportTable">
导出
</el-button>
</div>
</div>
<d2-table
ref="table"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)"
>详情</el-button
>
<el-button type="text" @click="handleStatistics(scope.scope)"
>统计</el-button
>
</div>
</d2-table>
</div>
<!-- 详细信息 -->
<detail-dialog
:visible.sync="detailVisible"
v-if="detailVisible"
:id="id"
/>
<statistics-dialog
:visible.sync="statisticsVisible"
v-if="statisticsVisible"
:id="id"
/>
</d2-container>
</template>
<script>
import { getSceceLabelList, getRecordList, recordExport } from "@/api/verbal.js"
import { businessSceneOpt } from "@/common/constants"
import { Util, deepClone } from "@/common/util"
import detailDialog from "./components/detailDialog"
import StatisticsDialog from "./components/statisticsDialog.vue"
export default {
components: { detailDialog,StatisticsDialog },
data() {
return {
queryInfo:this.$route.query,
id: "",
detailVisible: false,
statisticsVisible:false,
activeName: "2",
tabPaneList: [
{
label: "全部",
name: "2"
},
{
label: "未推送",
name: "0"
},
{
label: "已推送",
name: "1"
}
],
statisticsData: [
{
label: "分类名",
key: "className"
},
{
label: "话术条数",
key: "count",
innerHtml: (cellValue) => {
return `<div style="color: #43cf7c;">${cellValue.recordCount}<span style="color: #333;font-size:14px;">条</span></div>`
}
},
{
label: "业务场景",
key: "businessTypeName"
}
],
getListApi: getRecordList,
tableParams: {
listName: "list",
tableOption: {
width: "100"
},
tableColumns: [
{
label: "场景标签",
prop: "sceneLabelName"
},
{
label: "优秀标签",
prop: "labelName"
},
{
label: "话术内容",
prop: "sourceContent"
},
{
label: "更新时间",
formatter: (cellValue) => {
return cellValue.inputTime
? Util.dateFormate(cellValue.inputTime, "YYYY-MM-DD HH:mm:ss")
: "-"
}
},
{
label: "推送时间",
formatter: (cellValue) => {
return cellValue.pushTime
? Util.dateFormate(cellValue.pushTime, "YYYY-MM-DD HH:mm:ss")
: "-"
}
},
{
label: "状态",
formatter: (cellValue) => {
return {
1: "已推送",
0: "未推送"
}[cellValue.pushStatus]
},
className: (cellValue) => {
return {
1: "yellowSpot",
2: "greenSpot",
3: "ashSpot",
0: "ashSpot"
}[cellValue.pushStatus]
}
}
]
},
searchFormSearch: {},
searchForm: {
sceneLabelCode: "",
updateDate: [],
pushStatus: ""
},
showFormData: [
{
label: "场景标签",
name: "sceneLabelCode",
type: "select",
isClear: true,
optionList: [],
optionId: "labelCode",
optionLabel: "labelName",
optionsName: "labelList"
},
{
label: "更新日期",
name: "updateDate",
type: "datePicker",
isClear: false,
pickerOptions: "rangePickerOptions"
}
],
baseData: {
labelList: []
}
}
},
mounted() {
this.getSceceLabelList()
},
methods: {
handleClick() {
if (this.activeName == 2) {
this.searchForm.pushStatus = ""
} else {
this.searchForm.pushStatus = this.activeName
}
this.handleSearch()
},
handleDetail(data) {
this.id = data.id
this.detailVisible = true
},
//统计
handleStatistics(data) {
this.id = data.id
this.statisticsVisible= true
},
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.classCode=this.queryInfo.classCode
this.searchFormSearch.businessType=this.queryInfo.businessType
if (this.searchForm?.updateDate?.length) {
let [startTime, endTime] = this.searchForm.updateDate
this.searchFormSearch.startTime = Util.dateFormate(
startTime,
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.endTime = Util.dateFormate(
endTime,
"YYYY-MM-DD"
)+" 23:59:59"
}
delete this.searchFormSearch.updateDate
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.activeName = "2"
console.log("this.searchForm", this.searchForm)
this.handleSearch()
},
async exportTable() {
try {
await this.beforeSearchFn()
const res = await recordExport({
...this.searchFormSearch
})
if (res) window.open(res)
} catch (error) {
if (error) this.$message.error(error)
}
},
getSceceLabelList() {
getSceceLabelList({classCode:this.queryInfo.classCode})
.then((res) => {
this.baseData.labelList = res
this.getOptionsList()
})
.catch((err) => {
console.error("Error in getClassLabelList:", err)
// 捕获并传递错误
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
// if (item.optionsName != "brandList") {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
// }
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.header-flex {
display: flex;
align-items: center;
justify-content: space-between;
}
.statistics-wrap {
width: 100%;
height: 94px;
opacity: 1;
background: #f8faff;
display: flex;
align-items: center;
padding: 0 168px;
box-sizing: border-box;
.statistics-box {
margin: 0 auto;
color: #333333;
flex: 1;
.title {
margin-bottom: 4px;
font-size: 14px;
}
.content {
font-size: 24px;
}
.inner-content {
// color: #43cf7c;
font-size: 30px;
}
}
}
</style>
\ No newline at end of file
<template>
<d2-container class="customer-tags">
<div class="header" slot="header">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData"
>
</d2-search>
<div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header title="话术列表">
</d2-table-header>
<d2-table
ref="table"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9122001']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script>
import {
getClassLabelList,
geRecordSummaryList,
recordExport
} from "@/api/verbal.js"
import { businessSceneOpt } from "@/common/constants"
import { Util, deepClone } from "@/common/util"
export default {
data() {
return {
getListApi: geRecordSummaryList,
tableData:[{
}],
tableParams: {
listName: "list",
tableOption: {
width: "100"
},
tableColumns: [
{
label: "分类名",
prop: "className"
},
{
label: "业务场景",
prop: "businessType",
formatter: (cellValue) => {
return cellValue.businessType===0||cellValue.businessType
? businessSceneOpt.find(item => item.confId === cellValue.businessType).confValue
: "-"
}
},
{
label: "话术条数",
prop: "recordCount"
},
{
label: "最后更新时间",
formatter: (cellValue) => {
return cellValue.latestUpdateTime
? Util.dateFormate(cellValue.latestUpdateTime, "YYYY-MM-DD HH:mm:ss")
: "-"
}
}
]
},
searchFormSearch: {},
searchForm: {
classCode: "",
businessType: ""
},
showFormData: [
{
label: "分类名",
name: "classCode",
type: "select",
// multiple: true,
isClear: true,
optionList: [],
optionId: "classCode",
optionLabel: "className",
optionsName: "classLabelList"
},
{
label: "业务场景",
name: "businessType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "businessTypeOpt"
}
],
baseData: {
businessTypeOpt:businessSceneOpt,
classLabelList: []
}
}
},
mounted() {
this.initSelect()
},
methods: {
handleDetail(data) {
console.log("row", data)
let businessTypeName=data.businessType===0||data.businessType
? businessSceneOpt.find(item => item.confId === data.businessType).confValue
: "-"
this.$router.push({
path: "/inVerbalConfigView",
query: {
...data,
businessTypeName:businessTypeName
}
})
},
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
console.log("this.searchForm", this.searchForm)
this.handleSearch()
},
async exportTable() {
try {
await this.beforeSearchFn()
const res = await recordExport({
...this.searchFormSearch
})
if (res) window.open(res)
} catch (error) {
if (error) this.$message.error(error)
}
},
initSelect() {
// 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误
Promise.allSettled([this.getClassLabelList()])
.then((results) => {
// 检查每个任务的结果
results.forEach((result, index) => {
if (result.status === "rejected") {
console.error(`Task ${index} failed:`, result.reason)
}
})
// 统一调用 getOptionsList
this.getOptionsList()
})
.catch((err) => {
console.error("Unexpected error in initSelect:", err)
this.getOptionsList() // 确保即使有意外错误也调用 getOptionsList
})
},
getClassLabelList() {
return new Promise((resolve, reject) => {
getClassLabelList({})
.then((res) => {
this.baseData.classLabelList = res
resolve(res) // 返回结果以便主流程感知
})
.catch((err) => {
console.error("Error in getClassLabelList:", err)
reject(err) // 捕获并传递错误
})
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
// if (item.optionsName != "brandList") {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
// }
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
}
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -230,7 +230,7 @@ export default {
pickerOptions: "rangePickerOptions"
},
{
label: "区域督导",
label: "区域运营",
name: "areaSupervision",
type: "input",
maxlength: "20",
......@@ -302,7 +302,7 @@ export default {
width: "200px"
},
{
label: "区域督导",
label: "区域运营",
prop: "areaSupervisionList",
width: "200px",
formatter: (cellValue) => {
......@@ -970,4 +970,4 @@ export default {
.m-t-40 {
margin-top: 40px;
}
</style>
\ No newline at end of file
</style>
......@@ -67,7 +67,7 @@
:label="item.confId">{{ item.confValue }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="设置区域督导:"
<el-form-item label="区域运营:"
prop="areaSupervisionList">
<el-select clearable
multiple
......@@ -82,7 +82,23 @@
:value="item.userId">
</el-option>
</el-select>
<span class="item-tips">注:区域督导在账户中心创建广联数科员工,角色类型选区域督导</span>
<span class="item-tips">注:区域运营在账户中心创建广联数科员工,角色类型选区域运营</span>
</el-form-item>
<el-form-item label="飞行督导:"
prop="">
<el-select v-model="directorList[6]"
clearable
multiple
filterable
value-key="userId"
placeholder="请选择"
class="el_select itd">
<el-option v-for="item in flySuperList"
:key="item.userId"
:label="item.userName"
:value="item.userId" />
</el-select>
<span class="item-tips">注:获取账户中心创建在广联数科下的员工,角色类型选飞行督导</span>
</el-form-item>
<el-form-item label="驻店负责人:"
prop="residentManager">
......@@ -186,7 +202,7 @@
<div class="month-set-div">
<div class="month-choose">
<span class="month-choose-span"
>设置每月产值绩效(绩效细化到驻店负责人,汇总给区域督导)</span
>设置每月产值绩效(绩效细化到驻店负责人,汇总给区域运营)</span
>
<span>
<el-date-picker
......@@ -389,12 +405,14 @@ export default {
// boutiqueDirectorUserId: '',
// quotationDirectorUserId: ''
},
// 1.精品升级业务负责人, 2.精品升级业务服务商负责人, 3.会员权益业务负责人, 4.会员权益业务服务商负责人, 5.盯防负责人, 6.飞行督导
directorList: {
1: [],
2: [],
3: [],
4: [],
5: []
5: [],
6: []
},
outputValueListByYear: [],
year: "",
......@@ -414,7 +432,7 @@ export default {
// }],
// areaSupervision: [{
// required: true,
// message: '请选择区域督导',
// message: '请选择区域运营',
// trigger: 'change'
// }],
// residentManager: [{
......@@ -435,7 +453,8 @@ export default {
},
sellerMerchantStaffList: [],
serviceBossList: [],
storePersonList: [] // 盯防负责人列表
storePersonList: [], // 盯防负责人列表
flySuperList: [], // 飞行督导列表
}
},
......@@ -485,7 +504,7 @@ export default {
? "serviceBossList"
: "sellerMerchantStaffList"
]?.find((ele) => ele.userId == item.directorUserId)
if (item.directorType == 5) {
if ([5, 6].includes(item.directorType)) {
target = this.storePersonList?.find(
(ele) => ele.userId == item.directorUserId
)
......@@ -619,7 +638,7 @@ export default {
},
async merchantStaffByRoleList() {
return new Promise((resolve, reject) => {
merchantStaffByRoleList({ roleName: "区域督导" }).then((result) => {
merchantStaffByRoleList({ roleName: "区域运营" }).then((result) => {
const copyResult = deepClone(result)
this.supervisionOptionsList = copyResult.map((item) => {
return {
......@@ -640,6 +659,7 @@ export default {
// 服务商负责人(根据角色名过滤)
const arr = []
const arr2 = []
this.flySuperList = []
res?.map((val) => {
if (val.roleName == baseConfig.roleName) {
arr.push({
......@@ -654,6 +674,14 @@ export default {
userName: val.staffName
})
})
res?.map((val) => {
if(val.roleName == '飞行督导') {
this.flySuperList.push({
userId: val.uuid,
userName: val.staffName
})
}
})
this.serviceBossList = arr
this.storePersonList = arr2
resolve()
......@@ -854,6 +882,9 @@ export default {
if (key == 5) {
target = this.storePersonList.find((ele) => ele.userId == item)
}
if(key == 6) {
target = this.flySuperList.find((ele) => ele.userId == item)
}
directorList.push({
directorUserId: target?.userId,
directorType: key,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!