Commit 9ada899d by 胡悦

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

…ife-system into SAAS+V4.54.0-0630
2 parents 90ecde5e 63e3f5e0
......@@ -3915,7 +3915,7 @@
},
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
......@@ -3928,7 +3928,7 @@
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
......@@ -5927,7 +5927,7 @@
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-6.0.5.tgz",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"dev": true,
"requires": {
......@@ -7142,7 +7142,7 @@
},
"ignore": {
"version": "4.0.6",
"resolved": "https://registry.npmmirror.com/ignore/-/ignore-4.0.6.tgz",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
"dev": true
},
......@@ -8569,21 +8569,21 @@
}
},
"glsk-oss-jssdk": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/glsk-oss-jssdk/-/glsk-oss-jssdk-1.0.2.tgz",
"integrity": "sha512-oFbouNPVFrSv7ACunWdAlR1oJ4jpxMiK7ORGvd8BMpCeI6sMAJ6IneFKON5mp3GceOK6jxDtKub0UTKKx/W6lQ==",
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/glsk-oss-jssdk/-/glsk-oss-jssdk-1.0.3.tgz",
"integrity": "sha512-lgPWTSrT+y5NfuXBdvvfIovf+5c+3WD5GQRfhcWw77FX6IydG85EyQxjOVxu1R/HjacrALV6dJQJDw//SdnH7g==",
"requires": {
"ali-oss": "^6.23.0"
},
"dependencies": {
"address": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz",
"resolved": "https://registry.npmmirror.com/address/-/address-1.2.2.tgz",
"integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA=="
},
"ali-oss": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/ali-oss/-/ali-oss-6.23.0.tgz",
"resolved": "https://registry.npmmirror.com/ali-oss/-/ali-oss-6.23.0.tgz",
"integrity": "sha512-FipRmyd16Pr/tEey/YaaQ/24Pc3HEpLM9S1DRakEuXlSLXNIJnu1oJtHM53eVYpvW3dXapSjrip3xylZUTIZVQ==",
"requires": {
"address": "^1.2.2",
......@@ -8615,7 +8615,7 @@
},
"debug": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.1.tgz",
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
"requires": {
"ms": "^2.1.3"
......@@ -8623,12 +8623,12 @@
},
"mime": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
"resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz",
"integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="
},
"ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
}
}
......@@ -8949,7 +8949,7 @@
"dependencies": {
"big.js": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/big.js/-/big.js-3.2.0.tgz",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz",
"integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q=="
},
"json5": {
......@@ -13603,7 +13603,7 @@
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true
},
......@@ -15124,7 +15124,7 @@
"dependencies": {
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true
},
......@@ -16790,7 +16790,7 @@
},
"type-fest": {
"version": "0.6.0",
"resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.6.0.tgz",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",
"integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==",
"dev": true
},
......@@ -17176,7 +17176,7 @@
},
"vue-hot-reload-api": {
"version": "2.3.4",
"resolved": "https://registry.npmmirror.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
"dev": true
},
......@@ -18101,7 +18101,7 @@
},
"yarn": {
"version": "1.22.19",
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz",
"resolved": "https://registry.npmmirror.com/yarn/-/yarn-1.22.19.tgz",
"integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ=="
},
"yorkie": {
......
......@@ -34,7 +34,7 @@
"file-saver": "^2.0.5",
"flex.css": "^1.1.7",
"fuse.js": "^3.4.4",
"glsk-oss-jssdk": "^1.0.1",
"glsk-oss-jssdk": "^1.0.3",
"glsx-common-sdk": "^0.3.0",
"hash.js": "^1.0.0",
"hotkeys-js": "^3.6.2",
......
......@@ -421,3 +421,12 @@ export function contentManagerTaskListStaffPage(data) {
data.method = `${path2}contentManagerTask.listStaffPage`
return request(data, "post")
}
/** 省市树 */
export function mapDistricts(data) {
data.method = `${path2}map.districts`
return request(data, "post")
}
// export function getCarbrandTree(data = {}) {
// data.method = `merchants.api.merchantCommon.getCarbrandTree`
// return request(data, "post")
// }
......@@ -292,3 +292,15 @@ export function busiBatchSet(data) {
data.method = 'dj.api.smartcarlife.serviceMerchant.BusinessDev.setting.batch'
return request(data, "post")
}
// 查询地图行政区域省市区三级结构
export function getDistrictDetail(data) {
data.method = 'dj.api.smartcarlife.map.districts.details'
return request(data)
}
// 获取嘀加设置的服务商
export function getMerService(data) {
data.method = 'dj.smartcarlife.api.merchant.dj.serviceList'
return request(data)
}
......@@ -139,7 +139,6 @@
</div>
<!-- <template v-if="getEmpType.btn"> -->
<span class="radio-box empTypeBtn" @click="addEmp">选择标签</span>
<div v-loading="customerLoading">
<div class="customer-box m-t-10">
<div class="itemLabel" v-for="(item, iemSubIdx) in empTypeList" :key="iemSubIdx">
......@@ -151,7 +150,10 @@
<el-tag v-for="(k, n) in subItem.labelList || subItem.child" :key="n" class="customer-tag"
size="small" type="info" :closable="!disabledFn" :disable-transitions="false"
@close="handleDeleteCustomer(n, subIdx, iemSubIdx)">
<span>{{ subItem.labelGroup.name }}:{{ k.name || k.tagName }}</span>
<span v-if="item.selectStaffType == 1">{{ subItem.labelGroup.name }}:{{ k.name }}{{
k.tagName ? ':' + k.tagName : '' }}</span>
<span v-else>{{ subItem.name || subItem.labelGroup.name }}:{{ k.name || k.tagName
}}</span>
</el-tag>
</div>
</span>
......@@ -288,17 +290,17 @@
<img width="100%" :src="dialogObj.url" alt="图片" />
</el-dialog>
<component v-if="groupVisible" :is="getEmpType.componentName" :relateStoreVisible="groupVisible"
:dialogVisible="groupVisible" :activeBtnIndex="activeBtnIndex" :config="{}" ref="selectTagForm"
@tagSelected="handleDialogConfirm" @closeDialogFn="closeGroupDialog" :storeSelected="empTableData"
:dialogVisible="groupVisible" :activeBtnIndex="activeBtnIndex" ref="selectTagForm"
:selectedList="defaultSelectList" @tagSelected="handleDialogConfirm" @closeDialogFn="closeGroupDialog"
@handleRelateStoreClose="closeGroupDialog" @handleRelateStoreConfirm="confirmGroup"
@confirmDialogFn="handleDialogConfirm">
</component>
<script-dialog v-if="scriptVisible" :scriptSelected="scriptList" :relateScriptVisible="scriptVisible"
@handleRelateScriptClose="handleRelateScriptClose"
@handleRelateScriptConfirm="handleRelateScriptConfirm"></script-dialog>
<findStaffTagCourseDialog :storeSelected="formData.courseContentList" v-if="findStaffTagCourseVisible"
:relateStoreVisible="findStaffTagCourseVisible" @handleRelateStoreConfirm="handleRelateConfirm"
@handleRelateStoreClose="findStaffTagCourseVisible = false">
<findStaffTagCourseDialog :storeSelected="formData.courseContentList" :filterSopType="filterSopType"
v-if="findStaffTagCourseVisible" :relateStoreVisible="findStaffTagCourseVisible"
@handleRelateStoreConfirm="handleRelateConfirm" @handleRelateStoreClose="findStaffTagCourseVisible = false">
</findStaffTagCourseDialog>
</d2-container>
</template>
......@@ -310,6 +312,8 @@ import findStaffTagCourseDialog from "./components/findStaffTagCourseDialog"
import selectCourseTag from "./labelCourse/selectTag/index"
import selectTag from "./components/selectTag"
import selectTagSop from "./components/selectTagSop"
import selectTagSopCar from "./components/selectTagSopCar"
import selectTagSopAera from "./components/selectTagSopAera"
import preview from "./components/preview"
import uploadPdf from "./components/uploadPdf"
import tableDialog from "./components/tableDialog"
......@@ -344,11 +348,13 @@ export default {
selectTag,
findStaffTagCourseDialog,
selectCourseTag,
selectTagSop
selectTagSop,
selectTagSopCar,
selectTagSopAera
},
data() {
var validatorForm = (rule, value, callback) => {
if (this.storeSearchForm?.configList && this.storeSearchForm.configList.length > 0) {
if (this.configList.length > 0) {
callback()
} else {
callback(new Error("请选择员工"))
......@@ -363,10 +369,12 @@ export default {
}
}
return {
configList: [],
sendStatus: '',
activeBtnIndex: 1,
findStaffTagCourseVisible: false,
scriptVisible: false,
defaultSelectList: [],
scriptList: [],
empTableData: [],
contentTypeList: [
......@@ -416,7 +424,7 @@ export default {
selectStaffType: 3,
btn: "标签",
labelType: 1,
componentName: "selectTag",
componentName: "selectTagSopCar",
status: 0,
selectStaffValue: []
},
......@@ -443,7 +451,7 @@ export default {
selectStaffType: 8,
btn: "展业",
labelType: 1,
componentName: "merchantDialog",
componentName: "selectTagSopAera",
status: 0,
selectStaffValue: []
},
......@@ -616,12 +624,6 @@ export default {
validator: validatorCourseContentList,
trigger: "change"
},
// [
// { required: true, message: "请选择员工对象", trigger: "change" },
// {
// // storeSearchForm.configList.length
// }
// ],
empContent: [
{ required: true, message: "请选择话术", trigger: "change" }
],
......@@ -761,6 +763,9 @@ export default {
disabledFn() { // 学习任务已发送只能给改时间
return this.sendStatus == 3
},
filterSopType() {
return this.configList.map(item => item.selectStaffType)
}
},
mounted() {
......@@ -855,7 +860,7 @@ export default {
params.configList = paramsObj.selectStaffConfigs
}
// params.labelInfoList = params.labelInfoList || []
this.storeSearchForm.configList = params.configList || []
this.configList = params.configList || []
console.log(params, "params")
// params.labelInfoList.length &&
contentManagerTaskListStaffPage(params)
......@@ -934,8 +939,9 @@ export default {
} else {
this.groupVisible = true
const item = this.empTypeList.find(item => item.selectStaffType == this.activeBtnIndex)
this.defaultSelectList = item.selectStaffValue
this.$nextTick(() => {
this.$refs.selectTagForm.init({
this.$refs.selectTagForm.init && this.$refs.selectTagForm.init({
item: item.selectStaffValue
})
})
......@@ -947,7 +953,7 @@ export default {
const item = this.empTypeList.find(item => item.selectStaffType == 1)
console.log(item, 'item')
this.$nextTick(() => {
this.$refs.selectTagForm.init({
this.$refs.selectTagForm.init && this.$refs.selectTagForm.init({
item: item.selectStaffValue
})
})
......@@ -1148,39 +1154,26 @@ export default {
console.log(item.selectStaffValue, 'item.selectStaffValue')
// const mapList = item.selectStaffValue || item.child
// if (item.selectStaffValue == 1) {
if (item.labelType == 1) {
obj.selectStaffValue = item.selectStaffValue.map(el => {
let newel = {
id: el.labelGroup.id,
name: el.labelGroup.name
// if (item.selectStaffType == 1) {
obj.selectStaffValue = item.selectStaffValue.map(el => {
let newel = {
id: el.id || el.labelGroup.id,
name: el.name || el.labelGroup.name
}
const mapList = el?.labelList || el.child
newel.child = mapList.map(ele => {
return {
id: ele.id,
name: ele?.tagName ? `${ele.name}: ${ele?.tagName}` : ele.name
// name: `${ele?.groupAttName} : ${ele?.groupName} : ${ele?.tagName}`
}
const mapList = el.labelList || el.child
newel.child = mapList.map(ele => {
return {
id: ele.id,
name: ele.name || `${ele?.tagName}`
// name: `${ele?.groupAttName} : ${ele?.groupName} : ${ele?.tagName}`
}
})
return newel
})
} else {
obj.selectStaffValue = item.child
// .map(el => {
// let newel = {
// id: el.labelGroup.id,
// name: el.labelGroup.name,
// }
// newel.child = el.labelList.map(ele => {
// return {
// id: ele.id,
// name: ele.name || `${ele?.tagName}`,
// // name: `${ele?.groupAttName} : ${ele?.groupName} : ${ele?.tagName}`
// }
// })
// return newel
// })
}
return newel
})
// } else {
// console.log(item, item.child, 1111)
// obj.selectStaffValue = item.child
// }
}
if (item.labelType == 2 && item.selectStaffType == 2) {
obj.selectStaffValue = item.selectStaffValue.map(el => {
......
<template>
<d2-dialog title="选择品牌" :is-visible="dialogVisible" class="brand-dialog" width="50%" @closeDialog="handleClose"
<d2-dialog title="选择品牌222" :is-visible="dialogVisible" class="brand-dialog" width="50%" @closeDialog="handleClose"
@confirmDialog="handleConfirm">
<el-form :inline="true" size="mini" class="demo-form-inline">
<el-form-item label="品牌名称:">
......@@ -12,8 +12,8 @@
<div class="content">
<div class="tree-box">
<div class="title">预选品牌</div>
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps" show-checkbox
@check-change="handleNodeClick"></el-tree>
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps"
show-checkbox @check-change="handleNodeClick"></el-tree>
</div>
<!-- <div class="check-box">
<div class="title">已选品牌
......@@ -22,12 +22,12 @@
<template v-if="checkList.length == 0">
<div class="no-data">暂无数据</div>
</template>
<template v-else>
<template v-else>
<div class="check-list">
<div class="check-item" v-for="item in checkList" :key="item.id">{{ item.label }}<i class="el-icon-close" @click="closeChecked(item)"></i></div>
</div>
</template>
</div> -->
</div> -->
</div>
</d2-dialog>
......@@ -108,7 +108,7 @@ export default {
});
}
});
// 过滤掉一级项中 id 存在于 childrenIds 中的项
return checkList.filter(item => !childrenIds.has(item.id));
},
......@@ -173,6 +173,7 @@ export default {
height: 324px;
overflow-y: auto;
width: 100%;
// margin-right: 20px;
.tree-title {
display: flex;
......@@ -199,11 +200,13 @@ export default {
align-items: center;
justify-content: center;
}
.check-list {
margin-top: 12px;
height: calc(100% - 64px);
overflow-y: auto;
}
.check-item {
display: flex;
align-items: center;
......
......@@ -3,6 +3,14 @@
<d2-dialog :appendToBody="true" title="选择课程" :is-visible.sync="relateStoreVisible" width="50%" btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateStore">
<el-form :model="storeSearchForm" ref="relate" :inline="true">
<el-form-item label="课程类型:">
<el-select v-model="storeSearchForm.type" placeholder="课程名称" max-length="20" @keydown.native="handleStoreInput"
clearable>
<el-option label="推荐课程" :value="1"> </el-option>
<el-option label="自选课程" :value="2">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="课程名称:">
<el-input v-model.trim="storeSearchForm.courseName" placeholder="课程名称" max-length="20"
@keydown.native="handleStoreInput" clearable />
......@@ -44,7 +52,7 @@ import {
findStaffTagCoursePage
} from "@api/contentManager"
import { deepClone } from "@/common/util"
// import { getBrandList } from "@api/contentManager"
import { contentManagerTaskCourseList } from "@/api/contentManager"
export default {
name: "RelateStoreDialog",
data() {
......@@ -56,7 +64,8 @@ export default {
currentPage: 1,
pageSize: 20,
storeSearchForm: {
courseName: ''
courseName: '',
type: 1
}
}
},
......@@ -69,6 +78,10 @@ export default {
storeSelected: {
type: Array,
default: () => []
},
filterSopType: {
type: Array,
default: () => []
}
},
......@@ -87,11 +100,14 @@ export default {
})
},
getSelectingList() {
findStaffTagCoursePage({
const name = this.storeSearchForm.type == 1 ? contentManagerTaskCourseList : findStaffTagCoursePage
name({
...this.storeSearchForm,
currentPage: this.currentPage,
tagIds: this.filterSopType,
pageSize: this.pageSize
}).then((res) => {
console.log(res)
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
......
<template>
<d2-dialog title="选择品牌" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="50%"
@closeDialog="handleClose" @confirmDialog="handleConfirm">
<el-form :inline="true" size="mini" class="demo-form-inline">
<el-form-item label="品牌名称:">
<el-input v-model="filterText" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSearch">查询</el-button>
</el-form-item>
</el-form>
<div class="content">
<div class="tree-box">
<div class="title">预选品牌</div>
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps"
show-checkbox @check-change="handleNodeClick"></el-tree>
</div>
<div class="check-box">
<div class="title">已选品牌
<el-button type="text" @click="resetChecked">清空</el-button>
</div>
<template v-if="checkList.length == 0">
<div class="no-data">暂无数据</div>
</template>
<template v-else>
<div class="check-list">
<div class="check-item" v-for="item in checkList" :key="item.id">{{ item.name }}<i class="el-icon-close"
@click="closeChecked(item)"></i></div>
</div>
</template>
</div>
</div>
</d2-dialog>
</template>
<script>
import { deepClone } from "@/common/util"
import { mapDistricts } from "@api/contentManager"
export default {
name: "brandTree",
props: {
dialogVisible: Boolean,
selectedList: Array
},
data() {
return {
filterText: '',
checked: false,
checkList: [],
brandData: [],
defaultProps: {
children: 'child',
label: 'name'
},
selectList: []
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
// selectedList(val) {
// console.log(val)
// this.$nextTick(() => {
// // val.forEach(i => {
// // this.$refs.tree.setChecked(i, true)
// // })
// this.$refs.tree.setCheckedKeys(val)
// })
// }
},
mounted() {
this.getCarbrandTree()
},
methods: {
// 获取品牌树
async getCarbrandTree() {
const res = await mapDistricts({})
console.log(res, 'res')
this.brandData = res.districts[0].districts.map(item => {
item.id = item.code
// item.label = item.name
item.child = item.districts.map(child => {
child.id = child.code
// child.label = child.name
return child
})
return item
})
this.$nextTick(() => {
const defaultKeys = this.selectedList.reduce((pre, item) => {
// pre.push(item.id)
item.child.forEach(i => {
pre.push(i.id)
})
return pre;
}, [])
console.log(defaultKeys, 'defaultKeys')
this.$refs.tree.setCheckedKeys(defaultKeys)
})
},
handleClose() {
this.resetChecked()
this.$emit('closeDialogFn')
},
handleConfirm() {
this.resetChecked()
console.log(this.checkList, 'checkList')
const newList = this.filterCheckList(deepClone(this.checkList))
console.log(newList, 'newList')
// this.$emit('confirmDialogFn', {
// checkList: this.checkList,
// newList: newList
// })
this.$emit('confirmDialogFn', newList)
},
onSearch() {
this.$refs.tree.filter(this.filterText)
},
handleNodeClick(data) {
console.log(data, this.$refs.tree.getCheckedNodes());
this.checkList = this.$refs.tree.getCheckedNodes()
},
filterCheckList(checkList) {
// 收集所有 children 中的 id
const childrenIds = new Set();
checkList.forEach(item => {
if (item.child && item.child.length > 0) {
item.child.forEach(child => {
childrenIds.add(child.id);
});
}
});
// 过滤掉一级项中 id 存在于 childrenIds 中的项
return checkList.filter(item => !childrenIds.has(item.id));
},
// 清空
resetChecked() {
this.$refs.tree.setCheckedKeys([]);
},
closeChecked(row) {
console.log(row)
this.$refs.tree.setChecked(row.id, false)
console.log(this.$refs.tree.getCheckedNodes())
},
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
handleChange(e) {
console.log(e)
if (e) {
const nodes = this.getTreeArray()
this.$refs.tree.setCheckedKeys(nodes)
} else {
this.$refs.tree.setCheckedKeys([]);
}
},
//获取选择项
getTreeArray() {
let tree_arr = []
this.brandData.forEach(k => {
let child = k.child
if (child && child.length > 0) {
child.forEach(j => {
tree_arr.push(j.id)
})
} else {
tree_arr.push(k.id)
}
})
return tree_arr
},
}
}
</script>
<style scoped lang="scss">
.content {
display: flex;
.title {
display: flex;
align-items: center;
justify-content: space-between;
height: 40px;
opacity: 1;
border-bottom: 1px solid #e5e5e5;
background: #f2f4f7;
padding: 0 16px;
}
.tree-box {
border: 1px solid #e5e5e5;
background: #ffffff;
height: 324px;
overflow-y: auto;
width: 50%;
margin-right: 20px;
.tree-title {
display: flex;
align-items: center;
height: 40px;
opacity: 1;
border-bottom: 1px solid #e5e5e5;
background: #f2f4f7;
padding: 0 16px;
}
}
.check-box {
flex: 1;
height: 324px;
opacity: 1;
border: 1px solid #e5e5e5;
}
.no-data {
width: 100%;
height: calc(100% - 40px);
display: flex;
align-items: center;
justify-content: center;
}
.check-list {
margin-top: 12px;
height: calc(100% - 64px);
overflow-y: auto;
}
.check-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4px 16px;
}
}
</style>
<style lang="scss">
.brand-dialog {
.el-dialog__body {
padding: 20px !important;
}
}
</style>
\ No newline at end of file
<template>
<d2-dialog title="选择品牌" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="50%"
@closeDialog="handleClose" @confirmDialog="handleConfirm">
<el-form :inline="true" size="mini" class="demo-form-inline">
<el-form-item label="品牌名称:">
<el-input v-model="filterText" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSearch">查询</el-button>
</el-form-item>
</el-form>
<div class="content">
<div class="tree-box">
<div class="title">预选品牌</div>
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps"
show-checkbox @check-change="handleNodeClick"></el-tree>
</div>
<div class="check-box">
<div class="title">已选品牌
<el-button type="text" @click="resetChecked">清空</el-button>
</div>
<template v-if="checkList.length == 0">
<div class="no-data">暂无数据</div>
</template>
<template v-else>
<div class="check-list">
<div class="check-item" v-for="item in checkList" :key="item.id">{{ item.name }}<i class="el-icon-close"
@click="closeChecked(item)"></i></div>
</div>
</template>
</div>
</div>
</d2-dialog>
</template>
<script>
import { deepClone } from "@/common/util"
import { getCarbrandTree } from "@api/contentManager"
export default {
name: "brandTree",
props: {
dialogVisible: Boolean,
selectedList: Array
},
data() {
return {
filterText: '',
checked: false,
checkList: [],
brandData: [],
defaultProps: {
children: 'child',
label: 'name'
},
selectList: []
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
// defaultKeys(val) {
// console.log(val)
// this.$nextTick(() => {
// // val.forEach(i => {
// // this.$refs.tree.setChecked(i, true)
// // })
// this.$refs.tree.setCheckedKeys(val)
// })
// }
},
mounted() {
this.getCarbrandTree()
},
methods: {
// 获取品牌树
async getCarbrandTree() {
let res = await getCarbrandTree()
res = res.map(item => {
item.name = item.label
item.child = []
if (item?.children) {
item.child = item?.children.map(child => {
child.name = child.label
return child
})
}
// delete item.children
return item
})
this.brandData = res
this.$nextTick(() => {
const defaultKeys = this.selectedList.reduce((pre, item) => {
// pre.push(item.id)
item.child.forEach(i => {
pre.push(i.id)
})
return pre;
}, [])
// console.log(this.dialogVisible, defaultKeys, 'defaultKeys')
this.$refs.tree.setCheckedKeys(defaultKeys)
})
},
handleClose() {
this.resetChecked()
this.$emit('closeDialogFn')
},
handleConfirm() {
this.resetChecked()
console.log(this.checkList, 'checkList')
const newList = this.filterCheckList(deepClone(this.checkList))
console.log(newList, 'newList')
this.$emit('confirmDialogFn', newList)
// this.$emit('submit', {
// checkList: this.checkList,
// newList: newList
// })
},
onSearch() {
this.$refs.tree.filter(this.filterText)
},
handleNodeClick(data) {
console.log(data, this.$refs.tree.getCheckedNodes());
this.checkList = this.$refs.tree.getCheckedNodes()
},
filterCheckList(checkList) {
// 收集所有 children 中的 id
const childrenIds = new Set();
checkList.forEach(item => {
if (item.child && item.child.length > 0) {
item.child.forEach(child => {
childrenIds.add(child.id);
});
}
});
// 过滤掉一级项中 id 存在于 childrenIds 中的项
return checkList.filter(item => !childrenIds.has(item.id));
},
// 清空
resetChecked() {
this.$refs.tree.setCheckedKeys([]);
},
closeChecked(row) {
console.log(row)
this.$refs.tree.setChecked(row.id, false)
console.log(this.$refs.tree.getCheckedNodes())
},
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
handleChange(e) {
console.log(e)
if (e) {
const nodes = this.getTreeArray()
this.$refs.tree.setCheckedKeys(nodes)
} else {
this.$refs.tree.setCheckedKeys([]);
}
},
//获取选择项
getTreeArray() {
let tree_arr = []
this.brandData.forEach(k => {
let child = k.child
if (child && child.length > 0) {
child.forEach(j => {
tree_arr.push(j.id)
})
} else {
tree_arr.push(k.id)
}
})
return tree_arr
},
}
}
</script>
<style scoped lang="scss">
.content {
display: flex;
.title {
display: flex;
align-items: center;
justify-content: space-between;
height: 40px;
opacity: 1;
border-bottom: 1px solid #e5e5e5;
background: #f2f4f7;
padding: 0 16px;
}
.tree-box {
border: 1px solid #e5e5e5;
background: #ffffff;
height: 324px;
overflow-y: auto;
width: 50%;
margin-right: 20px;
.tree-title {
display: flex;
align-items: center;
height: 40px;
opacity: 1;
border-bottom: 1px solid #e5e5e5;
background: #f2f4f7;
padding: 0 16px;
}
}
.check-box {
flex: 1;
height: 324px;
opacity: 1;
border: 1px solid #e5e5e5;
}
.no-data {
width: 100%;
height: calc(100% - 40px);
display: flex;
align-items: center;
justify-content: center;
}
.check-list {
margin-top: 12px;
height: calc(100% - 64px);
overflow-y: auto;
}
.check-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4px 16px;
}
}
</style>
<style lang="scss">
.brand-dialog {
.el-dialog__body {
padding: 20px !important;
}
}
</style>
\ No newline at end of file
......@@ -12,10 +12,10 @@
<div class="content">
<div class="tree-box">
<div class="title">预选品牌</div>
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps" show-checkbox
@check-change="handleNodeClick"></el-tree>
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps"
show-checkbox @check-change="handleNodeClick"></el-tree>
</div>
<!-- <div class="check-box">
<div class="check-box">
<div class="title">已选品牌
<el-button type="text" @click="resetChecked">清空</el-button>
</div>
......@@ -24,10 +24,11 @@
</template>
<template v-else>
<div class="check-list">
<div class="check-item" v-for="item in checkList" :key="item.id">{{ item.label }}<i class="el-icon-close" @click="closeChecked(item)"></i></div>
<div class="check-item" v-for="item in checkList" :key="item.id">{{ item.label }}<i class="el-icon-close"
@click="closeChecked(item)"></i></div>
</div>
</template>
</div> -->
</div>
</div>
</d2-dialog>
......@@ -108,7 +109,7 @@ export default {
});
}
});
// 过滤掉一级项中 id 存在于 childrenIds 中的项
return checkList.filter(item => !childrenIds.has(item.id));
},
......@@ -173,6 +174,7 @@ export default {
height: 324px;
overflow-y: auto;
width: 100%;
// margin-right: 20px;
.tree-title {
display: flex;
......@@ -199,11 +201,13 @@ export default {
align-items: center;
justify-content: center;
}
.check-list {
margin-top: 12px;
height: calc(100% - 64px);
overflow-y: auto;
}
.check-item {
display: flex;
align-items: center;
......
......@@ -113,7 +113,10 @@
<el-tag v-for="(k, n) in subItem.labelList || subItem.child" :key="n" class="customer-tag"
size="small" type="info" :disable-transitions="false"
@close="handleDeleteCustomer(n, subIdx, iemSubIdx)">
<span>{{ subItem.labelGroup.name }}:{{ k.name }}</span>
<!-- <span>{{ subItem.labelGroup.name }}:{{ k.name }}</span> -->
<span v-if="item.selectStaffType == 1">{{ subItem.labelGroup.name }}:{{ k.name }}{{
k.tagName ? ':' + k.tagName : '' }}</span>
<span v-else>{{ subItem.labelGroup.name }}:{{ k.name || k.tagName }}</span>
</el-tag>
</div>
</span>
......@@ -212,7 +215,7 @@
<el-row slot>
<el-form :model="storeSearchForm" ref="relate" :inline="true">
<el-form-item label="关键字:">
<el-input v-model.trim="storeSearchForm.staffNameOrPhone" placeholder="请输入员工名称/手机号进行搜索"
<el-input v-model.trim="storeSearchForm.keyWord" placeholder="请输入员工名称/手机号进行搜索"
@keydown.native="handleStoreInput" clearable />
</el-form-item>
<el-button type="primary" @click="handleSearchStore">搜索</el-button>
......@@ -503,7 +506,7 @@ export default {
getList: contentManagerTaskListStaffPage,
customerDataList: [],
storeSearchForm: {
staffNameOrPhone: ""
keyWord: ""
}
}
},
......@@ -565,7 +568,7 @@ export default {
// }, 3000)
},
handleRelateStoreClose() {
this.storeSearchForm.staffNameOrPhone = ""
this.storeSearchForm.keyWord = ""
this.relateStoreVisible = false
},
handlePopStaff() {
......
......@@ -175,7 +175,7 @@ export default {
label: '创建时间',
prop: 'createdDate',
formatter: (cellValue) => {
return Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD')
return Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss')
}
}, {
label: '状态',
......@@ -229,8 +229,8 @@ export default {
}]
dateFormatList.forEach(item => {
if (params[item.attr] && params[item.attr].length) {
params[item.startAttr] = Util.dateFormate(params[item.attr][0], 'YYYY-MM-DD')
params[item.endAttr] = Util.dateFormate(params[item.attr][1], 'YYYY-MM-DD')
params[item.startAttr] = Util.dateFormate(params[item.attr][0], 'YYYY-MM-DD 00:00:00')
params[item.endAttr] = Util.dateFormate(params[item.attr][1], 'YYYY-MM-DD 23:59:59')
delete params[item.attr]
}
})
......
......@@ -39,7 +39,7 @@ export default {
formRules: {
templateName: [{ required: true, message: "请输入模版名称" }],
type: [{ required: true, message: "请选择对账单类型" }],
fieldIds: [{ required: true, message: "请选择对账单类型" }]
fieldIds: [{ required: true, message: "请选择对账单字段" }]
},
editData: {
templateName: '',
......@@ -85,6 +85,9 @@ export default {
this.getTmplById()
} else {
this.showTmpl = true
setTimeout(() => {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate("fieldIds")
}, 800)
}
},
......@@ -127,8 +130,8 @@ export default {
getTmplById({ id: this.routeInfo.id }).then(res => {
this.editData.templateName = res.templateName
this.editData.type = res.type + ''
this.editData.fieldIds = res.fieldIds
this.tmplSelectList = res.fieldIds
this.editData.fieldIds = res.fieldIds || []
this.tmplSelectList = res.fieldIds || []
this.showTmpl = true
})
},
......@@ -138,7 +141,7 @@ export default {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) {
let params = this.editData
if(this.routeInfo.editType == 'edit') {
if (this.routeInfo.editType == 'edit') {
params.id = this.routeInfo.id
}
tmplAddOrEdit(params).then(res => {
......
......@@ -23,7 +23,7 @@
<el-table-column prop="adjustReason" label="调整事由">
<template slot-scope="scope">
<el-form-item :prop="'tableData.' + scope.$index + '.adjustReason'" :rules="adjustReasonRules">
<el-input v-model="scope.row.adjustReason" placeholder="请输入调整事由" :disabled="!isEdit"></el-input>
<el-input v-model="scope.row.adjustReason" placeholder="请输入调整事由" maxlength="50" :disabled="!isEdit"></el-input>
</el-form-item>
</template>
</el-table-column>
......
......@@ -22,7 +22,7 @@
</template>
<!-- 选择框 -->
<div v-else-if="subItem.editType == 'select'">
<el-select style="width: 200px" v-model="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" clearable :placeholder="item.placeholder || '请选择'" :filterable="!item.noFilter" :disabled="!scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.editableAttr]" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, scope.$index, subItem)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode) }">
<el-select style="width: 200px" v-model="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" clearable :placeholder="item.placeholder || '请选择'" :filterable="!item.noFilter" :disabled="!scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.editableAttr]" no-data-text="无数据" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, scope.$index, subItem)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode) }">
<el-option v-for="k in baseData[subItem.editObj.optionsName]" :key="k[subItem.editObj.optionId]" :label="k[subItem.editObj.optionLabel]" :value="k[subItem.editObj.optionId]"></el-option>
</el-select>
<div v-if="hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.fieldCode)" class="el-form-item__error">
......@@ -33,7 +33,7 @@
<!-- 选择输入组合框 -->
<div v-else-if="subItem.editType == 'selectInput'">
<div class="select-input-container">
<el-input placeholder="请输入" v-model.trim="scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.inputField]" :clearable="item.isClear || false" :maxlength="item.maxlength || ''" class="input-with-select" @blur="billCompute(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.inputField)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.inputField) }">
<el-input placeholder="请输入" v-model.trim="scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.inputField]" :type="subItem.editObj.inputType || 'text'" class="input-with-select" @blur="billCompute(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.inputField)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.inputField) }">
<el-select v-model="scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.selectField]" style="width: 90px" :popper-append-to-body="false" slot="prepend" placeholder="请选择" @change="handleSelectInputChange(scope.$index, subItem)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.selectField) }">
<el-option v-for="(k, kIdx) in subItem.editObj.optionList" :key="kIdx" :label="k[subItem.editObj.optionLabel]" :value="k[subItem.editObj.optionId]" />
</el-select>
......@@ -464,6 +464,7 @@ export default {
k.editObj = {
selectField: k.fieldCode.split(',')[0],
inputField: k.fieldCode.split(',')[1],
inputType: 'number',
...this.editObj.selectInput.defaultConf[k.fieldCode]
}
k.width = '200px'
......@@ -525,8 +526,6 @@ export default {
handleBatchClose() {
this.handelBatchVisible()
this.headObj = {}
this.multipleSelecList = []
this.$refs.billMutiTable.clearSelection();
},
handleBatchConfirm() {
// console.log(this.multipleSelecList)
......@@ -646,11 +645,39 @@ export default {
},
handleInputDown(e, rowIndex, source, fieldConfig) {
// limitPrice
// 处理输入框按键事件
// console.log(e, rowIndex, source, fieldConfig)
const value = this.tableList[rowIndex][source][fieldConfig.fieldCode]
// console.log(value)
console.log(e)
// 只针对数字类型的输入框进行处理
if (fieldConfig.inputType === 'number') {
const value = e.target.value;
const sourceObj = this.tableList[rowIndex][source];
const fieldCode = fieldConfig.fieldCode;
// 禁止输入非数字和小数点
const filteredValue = value.replace(/[^\d.]/g, '');
// 检查是否包含多个小数点
const decimalCount = (filteredValue.match(/\./g) || []).length;
if (decimalCount > 1) {
// 如果超过一个小数点,恢复之前的值
e.target.value = sourceObj[fieldCode] || '';
return;
}
// 检查小数位数
if (decimalCount === 1) {
const parts = filteredValue.split('.');
if (parts[1] && parts[1].length > 2) {
// 如果小数位数超过2位,截断
e.target.value = parts[0] + '.' + parts[1].substring(0, 2);
sourceObj[fieldCode] = parts[0] + '.' + parts[1].substring(0, 2);
return;
}
}
// 更新值
sourceObj[fieldCode] = filteredValue;
e.target.value = filteredValue;
}
},
maxLengthInput(e, item) {
......
......@@ -38,8 +38,9 @@
<span v-else>{{scope.columnsObj.formatter(scope.scope, kIdx)}}</span>
</div>
</template>
<div v-if="scope.scope.businessTypeList.every(k => k.businessSceneType === null)">-</div>
</template>
<div v-else>——</div>
<div v-else>-</div>
</template>
<template v-for="(m, mIdx) in tableSlotList" :slot="m" slot-scope="scope">
<div v-if="scope.scope.businessTypeList && scope.scope.businessTypeList.length" :key="mIdx">
......@@ -55,6 +56,7 @@
<span v-else>{{scope.columnsObj.formatter(scope.scope, kIdx)}}</span>
</div>
</template>
<div v-if="scope.scope.businessTypeList.every(k => k.businessSceneType === null)">-</div>
</div>
</template>
<auth-button slot="auth-button" slot-scope="scope" :show-btn-ids="[
......@@ -151,12 +153,14 @@ import {
getSunshineIncentivePoint,
setShopMerchantPointConfig,
shopBatchSet,
busiBatchSet
busiBatchSet,
getDistrictDetail,
getMerService
} from "@/api/shopConfig.js"
import {
merchantOutputValueTargetExport,
merchantOutputValueTargetImport,
merchantStaffByRoleList
findMerchantStaffList
} from "@api/index"
import { businessNature, storeType } from "@/common/constants.js"
import qrcodeDialog from "./components/qRcodeDialog"
......@@ -208,6 +212,17 @@ export default {
optionsName: "provinceInfoList",
changeAttr: (value, targetItem) => {
this.searchForm.cityId = ''
this.baseData.cityList = []
this.getOptionsList()
if (value) {
const params = { districtName: this.baseData.provinceInfoList.find(item => item.adcode == value).name }
getDistrictDetail(params).then(res => {
if (res && res.length) {
this.baseData.cityList = res[0].districts
this.getOptionsList()
}
})
}
}
},
{
......@@ -215,7 +230,7 @@ export default {
name: "cityId",
type: "select",
optionList: [],
optionId: "adcode",
optionId: "code",
optionLabel: "name",
optionsName: "cityList"
},
......@@ -316,8 +331,8 @@ export default {
name: "serviceMerchantId",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionId: "merchantId",
optionLabel: "merchantName",
optionsName: "serviceMerList"
},
{
......@@ -371,7 +386,7 @@ export default {
formatter: (cellValue) => {
return this.baseData.businessNature.find(
(item) => item.confId === cellValue.businessType
)?.confName
)?.confName || '-'
}
},
{
......@@ -404,6 +419,9 @@ export default {
list.push(item.idAndName)
})
html = list.join("<br>")
} else {
list.push('-')
html = list.join("<br>")
}
return html
}
......@@ -426,7 +444,7 @@ export default {
formatter: (cellValue, idx) => {
const list = this.removeListAll('busiTypeList')
const target = list.find(item => item.confId == cellValue.businessTypeList[idx].businessSceneType + '')
return target ? target.confValue : '——'
return target ? target.confValue : '-'
}
},
{
......@@ -437,8 +455,8 @@ export default {
formatter: (cellValue, idx) => {
return cellValue.businessTypeList[idx].areaSupervisionList
? (cellValue.businessTypeList[idx].areaSupervisionList.length ? cellValue.businessTypeList[idx].areaSupervisionList.map(item => item.directorName).join('/')
: '——')
: '——'
: '-')
: '-'
}
},
{
......@@ -449,8 +467,8 @@ export default {
formatter: (cellValue, idx) => {
return cellValue.businessTypeList[idx].onlineSupervisionList
? (cellValue.businessTypeList[idx].onlineSupervisionList.length ? cellValue.businessTypeList[idx].onlineSupervisionList.map(item => item.directorName).join('/')
: '——')
: '——'
: '-')
: '-'
}
},
{
......@@ -461,7 +479,7 @@ export default {
formatter: (cellValue, idx) => {
const list = this.removeListAll('saleFlagList')
const target = list.find(item => item.confId == cellValue.businessTypeList[idx].directSalesFlag)
return target ? target.confValue : '——'
return target ? target.confValue : '-'
}
},
{
......@@ -477,7 +495,7 @@ export default {
str.push(list.find(k => k.confId == item)?.confValue)
})
}
return str.length ? str.join('/') : '——'
return str.length ? str.join('/') : '-'
}
},
{
......@@ -486,7 +504,7 @@ export default {
width: "200px",
addHtml: 'serviceMerchant',
formatter: (cellValue, idx) => {
return cellValue.businessTypeList[idx].serviceMerchantName || "——"
return cellValue.businessTypeList[idx].serviceMerchantName || "-"
}
},
{
......@@ -497,7 +515,7 @@ export default {
formatter: (cellValue, idx) => {
return cellValue.businessTypeList[idx].businessDevDate
? Util.dateFormate(cellValue.businessTypeList[idx].businessDevDate, "YYYY-MM-DD")
: "——"
: "-"
}
},
{
......@@ -508,7 +526,7 @@ export default {
formatter: (cellValue, idx) => {
return cellValue.businessTypeList[idx].latestOrderDate
? Util.dateFormate(cellValue.businessTypeList[idx].latestOrderDate, "YYYY-MM-DD")
: "——"
: "-"
}
}
]
......@@ -756,6 +774,7 @@ export default {
this.getBaseData()
this.getProvinceList()
this.getBrandList()
this.getMerService()
},
methods: {
......@@ -778,6 +797,12 @@ export default {
async getBaseData() {
this.getOptionsList()
},
getMerService() {
getMerService({}).then(res => {
this.baseData.serviceMerList = res
this.getOptionsList()
})
},
//员工注册码
employeeRegistrationCode(row) {
this.recordInfo = row
......@@ -1059,6 +1084,8 @@ export default {
serviceMerchantId: '',
onlineOperation: ''
}
this.baseData.cityList = []
this.getOptionsList()
this.$refs.recordTable.refreshTable()
},
......@@ -1358,7 +1385,7 @@ export default {
let sceneIdx = this.batchFormData.findIndex(item => item.name == 'businessDevelopmentScene')
if (['area', 'online'].includes(this.batchSetActive)) {
this.batchFormData[staffIdx].label = this.batchSetActive == 'area' ? '区域运营' : '线上运营'
await this.merchantStaffByRoleList()
await this.findMerchantStaffList()
} else {
this.baseData.busiSceneList = this.removeListAll('busiDelpList')
}
......@@ -1367,11 +1394,10 @@ export default {
this.batchRules.shopOperationMuti[0].required = ['area', 'online'].includes(this.batchSetActive)
this.batchRules.businessDevelopmentScene[0].required = this.batchSetActive == 'busiScene'
this.handleBatchVisible()
console.log(this.batchSetActive, 'this.batchSetActive---')
},
async merchantStaffByRoleList() {
async findMerchantStaffList() {
return new Promise((resolve, reject) => {
merchantStaffByRoleList({ roleName: "区域运营" }).then((result) => {
findMerchantStaffList({ merchantId: -1 }).then((result) => {
const copyResult = deepClone(result)
this.baseData.supervisionOptionsList = copyResult.map((item) => {
return {
......
......@@ -624,21 +624,24 @@ export default {
if (val.roleName == baseConfig.roleName) {
arr.push({
userId: val.uuid,
userName: val.staffName
userName: val.staffName,
userNum: val.staffPhone
})
}
})
res?.map((val) => {
arr2.push({
userId: val.uuid,
userName: val.staffName
userName: val.staffName,
userNum: val.staffPhone
})
})
res?.map((val) => {
if (val.roleName == '飞行督导') {
this.flySuperList.push({
userId: val.uuid,
userName: val.staffName
userName: val.staffName,
userNum: val.staffPhone
})
}
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!