Commit eb287a02 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 fec32db0 61af887e
...@@ -250,6 +250,14 @@ export function getCustomerInfoDetail(data) { ...@@ -250,6 +250,14 @@ export function getCustomerInfoDetail(data) {
data.method = `dj.api.mindworkplate.customervisit.getCustomerInfoDetail` data.method = `dj.api.mindworkplate.customervisit.getCustomerInfoDetail`
return request(data, "post") return request(data, "post")
} }
export function listMerchantStaffPage(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.listMerchantStaffPage`
return request(data, "post")
}
export function listBrandStaffPage(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.listBrandStaffPage`
return request(data, "post")
}
/** 标签列表 */ /** 标签列表 */
export function findAllTags(data = {}) { export function findAllTags(data = {}) {
......
...@@ -1170,7 +1170,13 @@ export const teaching_storeTypeOpt = [ ...@@ -1170,7 +1170,13 @@ export const teaching_storeTypeOpt = [
{ confId: 0, confValue: "老店" }, { confId: 0, confValue: "老店" },
{ confId: 1, confValue: "新店" } { confId: 1, confValue: "新店" }
] ]
// 话术业务场景 // 话术业务场景
export const channelTypeList = [
{ confId: 1, confValue: "企业微信" },
{ confId: 2, confValue: "展业app" }
]
// 预警管理 所属业务 // 预警管理 所属业务
export const businessSceneOpt = [ export const businessSceneOpt = [
{ confId: 0, confValue: "延保" }, { confId: 0, confValue: "延保" },
......
...@@ -118,21 +118,64 @@ ...@@ -118,21 +118,64 @@
<el-form-item <el-form-item
label-width="120px" label-width="120px"
label="员工对象:" label="员工对象:"
prop="customerDataList" prop="selectStaffType"
> >
<div>
<el-radio-group v-model="formData.selectStaffType">
<el-radio
:label="item.type"
v-for="item in empTypeList"
:key="item.type"
>{{ item.label }}</el-radio
>
</el-radio-group>
</div>
<template v-if="getEmpType.btn">
<el-button class="radio-box" size="small" @click="addEmp"
>添加{{ getEmpType.btn }}</el-button
>
<div
class="emp-table-box"
v-if="
[2, 3].includes(formData.selectStaffType) &&
empTableData.length
"
>
<el-table :data="empTableData" style="width: 100%">
<el-table-column type="index" width="50"> </el-table-column>
<el-table-column
prop="merchantName"
label="门店名称"
v-if="formData.selectStaffType == 2"
>
</el-table-column>
<el-table-column
prop="merchantId"
v-if="formData.selectStaffType == 2"
label="门店号"
width="100"
></el-table-column>
<el-table-column
prop="label"
v-if="formData.selectStaffType == 3"
label="品牌名称"
>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button <el-button
v-show=" @click.native.prevent="
formData.customerDataList.length == 0 || deleteRow(scope.$index, empTableData)
formData.customerDataList.every(
(item) => item.labelList.length == 0
)
" "
class="screeningCustomers default-blue-btn el-icon-plus m-t-10" type="text"
size="small" size="small"
@click="viewMembers()"
> >
去选择 删除
</el-button> </el-button>
</template>
</el-table-column>
</el-table>
</div>
<div <div
v-show=" v-show="
formData.customerDataList.length != 0 && formData.customerDataList.length != 0 &&
...@@ -143,19 +186,6 @@ ...@@ -143,19 +186,6 @@
> >
<div class="customer-box m-t-10"> <div class="customer-box m-t-10">
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
<div class="customer-title">
发送员工:预估
<el-button
type="text"
:loading="customerLoading"
@click="handlePopStaff"
>
<span v-if="!customerLoading">{{
estimatedNumberOfPeople
}}</span>
</el-button>
人
</div>
<div> <div>
<div <div
v-for="(subItem, subIdx) in formData.customerDataList" v-for="(subItem, subIdx) in formData.customerDataList"
...@@ -179,15 +209,22 @@ ...@@ -179,15 +209,22 @@
</div> </div>
</div> </div>
</div> </div>
<div class="m-t-10 screeningCustomers"> </div>
<el-button type="text" @click="handleSelectCustomer()"
>编辑</el-button <div class="customer-title">
发送员工:预估{{ estimatedNumberOfPeople || 0 }}
人
<el-button
type="text"
:loading="customerLoading"
@click="handlePopStaff"
> >
<el-button type="text" @click="handleResetCustomer()" <span v-if="!customerLoading && estimatedNumberOfPeople"
>重置</el-button >查看明细</span
> >
</el-button>
</div> </div>
</div> </template>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -227,6 +264,16 @@ ...@@ -227,6 +264,16 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item
label-width="120px"
label="发送渠道:"
prop="sendChannelType"
>
<el-radio-group v-model="formData.sendChannelType">
<el-radio :label="1">企业微信</el-radio>
<el-radio :label="2">展业助手</el-radio>
</el-radio-group>
</el-form-item>
</el-form> </el-form>
</div> </div>
</div> </div>
...@@ -286,12 +333,23 @@ ...@@ -286,12 +333,23 @@
<el-dialog :visible.sync="lookImgVisible"> <el-dialog :visible.sync="lookImgVisible">
<img width="100%" :src="dialogObj.url" alt="图片" /> <img width="100%" :src="dialogObj.url" alt="图片" />
</el-dialog> </el-dialog>
<select-tag <component
:is="getEmpType.componentName"
:labelTypesStr="'企业标签'"
:relateStoreVisible="groupVisible"
:dialogVisible="groupVisible"
:config="{
scene: 2
}"
ref="selectTagForm" ref="selectTagForm"
@tagSelected="handleDialogConfirm" @tagSelected="handleDialogConfirm"
:dialogVisible="isTagVisible" @closeDialogFn="closeGroupDialog"
:labelTypesStr="'企业标签'" :storeSelected="empTableData"
></select-tag> :selectedRecord="empTableData"
@handleRelateStoreClose="closeGroupDialog"
@handleRelateStoreConfirm="confirmGroup"
@confirmDialogFn="confirmGroup"
></component>
</d2-container> </d2-container>
</template> </template>
...@@ -302,27 +360,59 @@ import selectTag from "./components/selectTag" ...@@ -302,27 +360,59 @@ import selectTag from "./components/selectTag"
import preview from "./components/preview" import preview from "./components/preview"
import uploadPdf from "./components/uploadPdf" import uploadPdf from "./components/uploadPdf"
import tableDialog from "./components/tableDialog" import tableDialog from "./components/tableDialog"
import brandDialog from "./components/brandDialog"
import merchantDialog from "./components/merchantDialog"
import previewEffectDialog from "./components/previewEffectDialog" import previewEffectDialog from "./components/previewEffectDialog"
import { getList, getAccountMerchantList } from "@/api/merchant" import { getList, getAccountMerchantList } from "@/api/merchant"
import textBox from "@/components/glsx-combi-form/textBox" import textBox from "@/components/glsx-combi-form/textBox"
import { import {
insertOrUpdate, insertOrUpdate,
contentManagerTaskById, contentManagerTaskById,
getListLabelStaffPage getListLabelStaffPage,
listMerchantStaffPage,
listBrandStaffPage
} from "@api/contentManager" } from "@api/contentManager"
export default { export default {
name: "SopContentAdd", name: "SopContentAdd",
components: { components: {
brandDialog,
glsxPreview: preview, glsxPreview: preview,
uploadPdf, uploadPdf,
tableDialog, tableDialog,
previewEffectDialog, previewEffectDialog,
merchantDialog,
textBox, textBox,
selectTag: selectTag selectTag: selectTag
}, },
data() { data() {
return { return {
empTableData: [],
empTypeList: [
{
label: "员工标签",
type: 1,
btn: "标签",
componentName: "selectTag"
},
{
label: "指令门店",
type: 2,
btn: "门店",
componentName: "merchantDialog"
},
{
label: "指令品牌",
type: 3,
btn: "品牌",
componentName: "brandDialog"
},
{
label: "全部员工",
type: 4
}
],
loading: false, loading: false,
groupVisible: false,
type: 1, type: 1,
estimatedNumberOfPeople: "", estimatedNumberOfPeople: "",
customerDataList: [], customerDataList: [],
...@@ -398,7 +488,9 @@ export default { ...@@ -398,7 +488,9 @@ export default {
sendTime: "", sendTime: "",
formData: [], formData: [],
customerDataList: [], customerDataList: [],
content: "" content: "",
selectStaffType: 1,
sendChannelType: 1
}, },
rules: { rules: {
title: [{ required: true, message: "请输入标题", trigger: "change" }], title: [{ required: true, message: "请输入标题", trigger: "change" }],
...@@ -502,6 +594,11 @@ export default { ...@@ -502,6 +594,11 @@ export default {
} }
}, },
watch: { watch: {
"formData.selectStaffType"() {
this.empTableData = []
this.estimatedNumberOfPeople = 0
this.formData.customerDataList = []
},
"formData.sendTime"(selectTime) { "formData.sendTime"(selectTime) {
const selectedDate = new Date(selectTime) const selectedDate = new Date(selectTime)
const selectedDateWithoutTime = new Date( const selectedDateWithoutTime = new Date(
...@@ -575,7 +672,14 @@ export default { ...@@ -575,7 +672,14 @@ export default {
// } // }
// } // }
}, },
computed: {
getEmpType() {
const val = this.empTypeList.find(
(i) => i.type == this.formData.selectStaffType
)
return val || this.empTypeList[0]
}
},
mounted() { mounted() {
const { id } = this.$route.query const { id } = this.$route.query
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
...@@ -585,6 +689,10 @@ export default { ...@@ -585,6 +689,10 @@ export default {
}, },
methods: { methods: {
deleteRow(index, rows) {
rows.splice(index, 1)
this.getCustomerList()
},
getSelectableRange() { getSelectableRange() {
const currentDate = new Date() const currentDate = new Date()
currentDate.setMinutes(currentDate.getMinutes() + 30) currentDate.setMinutes(currentDate.getMinutes() + 30)
...@@ -595,6 +703,7 @@ export default { ...@@ -595,6 +703,7 @@ export default {
this.customerLoading = true this.customerLoading = true
this.getCustomerByTagList("filtrate") this.getCustomerByTagList("filtrate")
}, },
handlePopStaff() { handlePopStaff() {
this.relateStoreVisible = true this.relateStoreVisible = true
}, },
...@@ -624,7 +733,6 @@ export default { ...@@ -624,7 +733,6 @@ export default {
} }
// params.labelInfoList = params.labelInfoList || [] // params.labelInfoList = params.labelInfoList || []
this.storeSearchForm.labelInfoList = params.labelInfoList || [] this.storeSearchForm.labelInfoList = params.labelInfoList || []
console.log(params, "params") console.log(params, "params")
params.labelInfoList.length && params.labelInfoList.length &&
getListLabelStaffPage(params) getListLabelStaffPage(params)
...@@ -640,19 +748,57 @@ export default { ...@@ -640,19 +748,57 @@ export default {
handleDialogConfirm(val) { handleDialogConfirm(val) {
this.formData.customerDataList = val this.formData.customerDataList = val
this.customerLoading = true this.customerLoading = true
this.getList = getListLabelStaffPage
this.getCustomerByTagList("filtrate") this.getCustomerByTagList("filtrate")
}, },
closeGroupDialog() {
this.groupVisible = false
},
confirmGroup(val) {
this.empTableData = val
this.groupVisible = false
this.getCustomerList()
},
getCustomerList() {
const merchantIds = this.empTableData.map((item) => item.merchantId)
const brandIds = this.empTableData.map((item) => item.id)
if (!merchantIds.length && !brandIds.length) {
this.estimatedNumberOfPeople = 0
return
}
const params = {
pageSize: 999999,
merchantIds,
brandIds,
pageNum: 1
}
this.getList =
this.formData.selectStaffType == 2
? listMerchantStaffPage
: listBrandStaffPage
this.storeSearchForm = params
this.customerLoading = true
this.getList(params).then((res) => {
this.estimatedNumberOfPeople = res?.total || 0
this.customerLoading = false
})
},
addEmp() {
if (this.getEmpType.type == 1) {
this.viewMembers()
} else {
this.groupVisible = true
this.$refs.selectTagForm.searchList &&
this.$refs.selectTagForm.searchList()
this.$refs.selectTagForm.getSelectingList &&
this.$refs.selectTagForm.getSelectingList()
}
},
// 查看群发人数 // 查看群发人数
viewMembers() { viewMembers() {
this.handleSelectCustomer() this.handleSelectCustomer()
}, },
handleResetCustomer() {
this.formData.customerDataList = []
this.customerLoading = false
this.estimatedNumberOfPeople = ""
this.$refs.selectTagForm.labelTreeRetSelect = []
},
handleSelectCustomer() { handleSelectCustomer() {
this.isTagVisible = !this.isTagVisible this.isTagVisible = !this.isTagVisible
this.$refs.selectTagForm.init( this.$refs.selectTagForm.init(
...@@ -724,13 +870,37 @@ export default { ...@@ -724,13 +870,37 @@ export default {
this.formData[key] = res[key] this.formData[key] = res[key]
} }
} }
this.$nextTick(() => {
const selectStaffValue = JSON.parse(res.selectStaffValue || "{}")
if (this.formData.selectStaffType == 2) {
for (let [key, value] of Object.entries(selectStaffValue)) {
this.empTableData.push({
merchantId: key,
merchantName: value
})
}
this.getCustomerList()
}
if (this.formData.selectStaffType == 3) {
for (let [key, value] of Object.entries(selectStaffValue)) {
this.empTableData.push({
id: +key,
label: value
})
}
this.getCustomerList()
}
if (this.formData.selectStaffType == 1) {
this.formData.customerDataList = this.transformLabelList( this.formData.customerDataList = this.transformLabelList(
res.labelList res.labelList
) )
this.getCustomerByTagList("filtrate")
}
})
// 初始化 富文本内容 // 初始化 富文本内容
this.formData.contentType == 1 && this.handleTextBoxFocus() this.formData.contentType == 1 && this.handleTextBoxFocus()
this.getCustomerByTagList("filtrate")
} }
}) })
}, },
...@@ -837,6 +1007,16 @@ export default { ...@@ -837,6 +1007,16 @@ export default {
commitFn(type) { commitFn(type) {
const params = this.getParams(type) const params = this.getParams(type)
params.saveDraft = !Boolean(type) params.saveDraft = !Boolean(type)
const selectStaffValue = {}
this.empTableData.forEach((i) => {
if (i.merchantId) {
selectStaffValue[i.merchantId] = i.merchantName
}
if (i.id) {
selectStaffValue[i.id] = i.label
}
})
params.selectStaffValue = JSON.stringify(selectStaffValue)
// const _api = params.id ? updateContent : addContent // const _api = params.id ? updateContent : addContent
this.loading = true this.loading = true
insertOrUpdate(params).then((res) => { insertOrUpdate(params).then((res) => {
...@@ -1019,10 +1199,16 @@ export default { ...@@ -1019,10 +1199,16 @@ export default {
.publish-info { .publish-info {
padding: 16px 20px; padding: 16px 20px;
} }
.radio-box {
margin-bottom: 10px;
}
.btn-class { .btn-class {
background: #f8f8f8; background: #f8f8f8;
} }
} }
.emp-table-box {
width: 567px;
}
.customer-box { .customer-box {
width: 567px; width: 567px;
background-color: #fff; background-color: #fff;
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
btn-ok-label="确定" btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm" @confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose" @closeDialog="handleRelateStoreClose"
class="relateStore"> class="relateStore"
>
<el-form :model="storeSearchForm" ref="relate" :inline="true"> <el-form :model="storeSearchForm" ref="relate" :inline="true">
<el-form-item label="品牌名称:"> <el-form-item label="品牌名称:">
<el-input <el-input
...@@ -15,7 +16,8 @@ ...@@ -15,7 +16,8 @@
placeholder="品牌名称" placeholder="品牌名称"
max-length="20" max-length="20"
@keydown.native="handleStoreInput" @keydown.native="handleStoreInput"
clearable /> clearable
/>
</el-form-item> </el-form-item>
<el-button type="primary" @click="handleCurrentChange(1)">搜索</el-button> <el-button type="primary" @click="handleCurrentChange(1)">搜索</el-button>
</el-form> </el-form>
...@@ -28,7 +30,8 @@ ...@@ -28,7 +30,8 @@
class="table" class="table"
border border
@select="handleChange" @select="handleChange"
@select-all="handleAll"> @select-all="handleAll"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="label" label="品牌名称" align="center"> <el-table-column prop="label" label="品牌名称" align="center">
</el-table-column> </el-table-column>
...@@ -40,13 +43,15 @@ ...@@ -40,13 +43,15 @@
:current-page.sync="currentPage" :current-page.sync="currentPage"
:page-size="pageSize" :page-size="pageSize"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="total" /> :total="total"
/>
</div> </div>
<el-table <el-table
class="tableBox table" class="tableBox table"
:data="selectedData" :data="selectedData"
border border
height="464px"> height="464px"
>
<el-table-column prop="merchantName" label="品牌名称" align="center"> <el-table-column prop="merchantName" label="品牌名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.label }}</span> <span>{{ scope.row.label }}</span>
...@@ -57,7 +62,8 @@ ...@@ -57,7 +62,8 @@
<el-button <el-button
class="el-icon-delete" class="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
type="text" /> type="text"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -102,6 +108,7 @@ export default { ...@@ -102,6 +108,7 @@ export default {
var exitIds = this.selectedData.map((item) => item.id) var exitIds = this.selectedData.map((item) => item.id)
this.selectingData.forEach((item) => { this.selectingData.forEach((item) => {
exitIds.includes(item.id) && exitIds.includes(item.id) &&
this.$refs.seletingTable &&
this.$refs.seletingTable.toggleRowSelection(item, true) this.$refs.seletingTable.toggleRowSelection(item, true)
}) })
}, },
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
title="选择门店" title="选择门店"
width="720px" width="720px"
@confirmDialog="handleAddConfirm" @confirmDialog="handleAddConfirm"
@closeDialog="handleClose"> @closeDialog="handleClose"
>
<div class="tableBox"> <div class="tableBox">
<div style="padding: 10px 50px"> <div style="padding: 10px 50px">
<el-input <el-input
...@@ -14,7 +15,8 @@ ...@@ -14,7 +15,8 @@
maxlength="20" maxlength="20"
clearable clearable
size="small" size="small"
style="width: 300px; margin-right: 12px" /> style="width: 300px; margin-right: 12px"
/>
<el-button size="small" type="primary" @click="searchList"> <el-button size="small" type="primary" @click="searchList">
查询 查询
</el-button> </el-button>
...@@ -24,7 +26,9 @@ ...@@ -24,7 +26,9 @@
:search-form="realSearchForm" :search-form="realSearchForm"
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
</d2-table> </d2-table>
</div> </div>
</d2-dialog> </d2-dialog>
...@@ -75,6 +79,21 @@ export default { ...@@ -75,6 +79,21 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
recoverySelection(list) {
var exitIds = this.selectedRecord.map((item) => item.merchantId)
console.log(
"this.$refs.merchantTable.toggleRowSelection",
this.$refs.merchantTable.$refs.merchantIndexMutiTable.toggleRowSelection
)
list.forEach((item) => {
console.log(exitIds.includes(item.merchantId + ""))
exitIds.includes(item.merchantId + "") &&
this.$refs.merchantTable.$refs.merchantIndexMutiTable.toggleRowSelection(
item,
true
)
})
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
if (this.config.scene == 0 || this.config.scene == 4) { if (this.config.scene == 0 || this.config.scene == 4) {
...@@ -86,6 +105,11 @@ export default { ...@@ -86,6 +105,11 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun(data) {
this.$nextTick(() => {
this.recoverySelection(data)
})
},
searchList() { searchList() {
this.$refs?.merchantTable?.refreshTable(true, true) this.$refs?.merchantTable?.refreshTable(true, true)
}, },
......
...@@ -333,7 +333,7 @@ export default { ...@@ -333,7 +333,7 @@ export default {
} }
} }
</script> </script>
<style scoped lang="scss" > <style scoped lang="scss">
// .dialog-jump { // .dialog-jump {
// color: #5850ff; // color: #5850ff;
// float: left; // float: left;
......
...@@ -84,7 +84,9 @@ ...@@ -84,7 +84,9 @@
</el-tooltip> </el-tooltip>
</div> </div>
<div class="tag-select-box"> <div class="tag-select-box">
<div class="tag-box-header">标签名称({{ selectNum }}项)</div> <div class="tag-box-header">
标签名称({{ selectNum }}项)<span @click="clearTag">清空</span>
</div>
<div class="tag-selected-box" :style="{ height: heightBox + 'px' }"> <div class="tag-selected-box" :style="{ height: heightBox + 'px' }">
<div <div
v-show="!!selectNum" v-show="!!selectNum"
...@@ -176,6 +178,18 @@ export default { ...@@ -176,6 +178,18 @@ export default {
} }
}, },
methods: { methods: {
clearTag() {
this.labelTreeRets.forEach((i) => {
i.checked = false
i.tagChecked = []
i.isIndeterminate = false
i.checkAll = false
})
this.labelTreeRetSelect.forEach((i) => {
i.tagChecked = []
})
this.selectNum = 0
},
init(item) { init(item) {
this.labelGroupName = "" this.labelGroupName = ""
this.labelTreeRetSelect = [] this.labelTreeRetSelect = []
...@@ -362,6 +376,7 @@ export default { ...@@ -362,6 +376,7 @@ export default {
}, },
//选中 //选中
handleCheckedChange(value, index, status) { handleCheckedChange(value, index, status) {
console.log(value, index, status)
let checkedCount = value.length let checkedCount = value.length
this.labelTreeRets[index].checkAll = this.labelTreeRets[index].checkAll =
checkedCount === this.labelTreeRets[index].labelList.length checkedCount === this.labelTreeRets[index].labelList.length
...@@ -386,7 +401,7 @@ export default { ...@@ -386,7 +401,7 @@ export default {
} }
</script> </script>
<style scoped lang="scss" > <style scoped lang="scss">
.select-tag { .select-tag {
.label-box { .label-box {
margin-left: 42px; margin-left: 42px;
...@@ -453,7 +468,13 @@ export default { ...@@ -453,7 +468,13 @@ export default {
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
padding-left: 20px !important; padding: 0 20px !important;
display: flex;
span {
margin-left: auto;
cursor: pointer;
color: #5579bd;
}
} }
} }
.tag-title { .tag-title {
......
...@@ -112,7 +112,6 @@ export default { ...@@ -112,7 +112,6 @@ export default {
// _storeSearchForm.merchantIdName = _storeSearchForm.merchantName // 账户中心所有门店接口查询条件 // _storeSearchForm.merchantIdName = _storeSearchForm.merchantName // 账户中心所有门店接口查询条件
// } // }
console.log(this.storeSearchForm, "this.storeSearchForm") console.log(this.storeSearchForm, "this.storeSearchForm")
this.storeSearchForm.labelInfoList.length &&
this.storeApi({ this.storeApi({
...this.storeSearchForm, ...this.storeSearchForm,
pageNum: this.pageNum, pageNum: this.pageNum,
......
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
<div v-else-if="item.type == 'list'" class="table-box"> <div v-else-if="item.type == 'list'" class="table-box">
<!-- 表格数据 --> <!-- 表格数据 -->
<div class="table-title"> <div class="table-title">
{{ {{ orderInfo.showMerchant ?
orderInfo.showMerchant == 1 orderInfo.showMerchant == 1
? "指定品牌" ? "指定品牌"
: orderInfo.showMerchant == 2 : orderInfo.showMerchant == 2
? "指定门店" ? "指定门店"
: "全部门店" : "全部门店": "-"
}} }}
</div> </div>
<el-table v-if="orderInfo.showMerchant" :data="orderInfo[item.prop]" border :header-cell-style="{ <el-table v-if="orderInfo.showMerchant" :data="orderInfo[item.prop]" border :header-cell-style="{
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
<div v-if="sceneConfig" class="file-box"> <div v-if="sceneConfig" class="file-box">
<div @click="toOpenPDF(i)" class="file-box-inner"> <div @click="toOpenPDF(i)" class="file-box-inner">
<img class="icon" src="../../assets/pdf.png" /> <img class="icon" src="../../assets/pdf.png" />
<div class="title-desc">{{ orderInfo.title }}.pdf</div> <div class="title-desc">{{ orderInfo.detailInfos[0].imageName }}</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -73,8 +73,43 @@ ...@@ -73,8 +73,43 @@
<div class="main-box"> <div class="main-box">
<div class="cell"> <div class="cell">
<div class="label">员工对象:</div> <div class="label">员工对象:</div>
<div>
<div class="label m-b-10">
{{ getStaffVal(formData.selectStaffType) }}
</div>
<template>
<div
class="emp-table-box"
v-if="
[2, 3].includes(formData.selectStaffType) &&
empTableData.length
"
>
<el-table :data="empTableData" style="width: 100%">
<el-table-column type="index" width="50"> </el-table-column>
<el-table-column
prop="merchantName"
label="门店名称"
v-if="formData.selectStaffType == 2"
>
</el-table-column>
<el-table-column
prop="merchantId"
v-if="formData.selectStaffType == 2"
label="门店号"
width="100"
></el-table-column>
<el-table-column
prop="label"
v-if="formData.selectStaffType == 3"
label="品牌名称"
>
</el-table-column>
</el-table>
</div>
<div <div
v-show=" v-show="
formData.customerDataList &&
formData.customerDataList.length != 0 && formData.customerDataList.length != 0 &&
formData.customerDataList.some( formData.customerDataList.some(
(item) => item.labelList.length !== 0 (item) => item.labelList.length !== 0
...@@ -83,19 +118,6 @@ ...@@ -83,19 +118,6 @@
> >
<div class="customer-box m-t-10"> <div class="customer-box m-t-10">
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
<div class="customer-title">
发送员工:预估
<el-button
type="text"
:loading="customerLoading"
@click="handlePopStaff"
>
<span v-if="!customerLoading">{{
estimatedNumberOfPeople
}}</span>
</el-button>
人
</div>
<div> <div>
<div <div
v-for="(subItem, subIdx) in formData.customerDataList" v-for="(subItem, subIdx) in formData.customerDataList"
...@@ -107,16 +129,35 @@ ...@@ -107,16 +129,35 @@
class="customer-tag" class="customer-tag"
size="small" size="small"
type="info" type="info"
:closable="true"
:disable-transitions="false" :disable-transitions="false"
@close="handleDeleteCustomer(n, subIdx)" @close="handleDeleteCustomer(n, subIdx)"
> >
<span>{{ subItem.labelGroup.name }}:{{ k.name }}</span> <span
>{{ subItem.labelGroup.name }}:{{ k.name }}</span
>
</el-tag> </el-tag>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="customer-title">
发送员工:预估{{ estimatedNumberOfPeople || 0 }}
人
<el-button
type="text"
:loading="customerLoading"
@click="handlePopStaff"
>
<span v-if="!customerLoading && estimatedNumberOfPeople"
>查看明细</span
>
</el-button>
</div>
</template>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -132,6 +173,12 @@ ...@@ -132,6 +173,12 @@
{{ formData[item.prop] || "--" }} {{ formData[item.prop] || "--" }}
</div> </div>
</div> </div>
<div class="cell">
<div class="label">发送渠道:</div>
<div class="value">
{{ formData.sendChannelType == 1 ? "企业微信" : "展业助手" }}
</div>
</div>
</div> </div>
</div> </div>
<p style="text-align: center"> <p style="text-align: center">
...@@ -176,7 +223,9 @@ import { Util, deepClone } from "@/common/util" ...@@ -176,7 +223,9 @@ import { Util, deepClone } from "@/common/util"
import tableDialog from "./components/tableDialog" import tableDialog from "./components/tableDialog"
import { import {
contentManagerTaskById, contentManagerTaskById,
getListLabelStaffPage getListLabelStaffPage,
listMerchantStaffPage,
listBrandStaffPage
} from "@api/contentManager" } from "@api/contentManager"
import previewEffectDialog from "./components/previewEffectDialog" import previewEffectDialog from "./components/previewEffectDialog"
import textBox from "@/components/glsx-combi-form/textBox" import textBox from "@/components/glsx-combi-form/textBox"
...@@ -189,6 +238,31 @@ export default { ...@@ -189,6 +238,31 @@ export default {
}, },
data() { data() {
return { return {
empTableData: [],
empTypeList: [
{
label: "员工标签",
type: 1,
btn: "标签",
componentName: "selectTag"
},
{
label: "指令门店",
type: 2,
btn: "门店",
componentName: "merchantDialog"
},
{
label: "指令品牌",
type: 3,
btn: "品牌",
componentName: "brandDialog"
},
{
label: "全部员工",
type: 4
}
],
contentListData: [ contentListData: [
{ {
label: "标题:", label: "标题:",
...@@ -239,7 +313,8 @@ export default { ...@@ -239,7 +313,8 @@ export default {
sendTime: "", sendTime: "",
// formData: [], // formData: [],
customerDataList: [], customerDataList: [],
content: "" content: "",
selectStaffType: ""
}, },
showImageView: false, showImageView: false,
customerLoading: false, customerLoading: false,
...@@ -264,6 +339,9 @@ export default { ...@@ -264,6 +339,9 @@ export default {
handleStoreInput(e) { handleStoreInput(e) {
e.keyCode === 13 && this.handleSearchStore() e.keyCode === 13 && this.handleSearchStore()
}, },
getStaffVal(type) {
return this.empTypeList.find((i) => i.type == type)?.label
},
// 门店弹窗点击查询 // 门店弹窗点击查询
handleSearchStore() { handleSearchStore() {
this.$refs.formRelateStore.handleCurrentChange(1) this.$refs.formRelateStore.handleCurrentChange(1)
...@@ -294,6 +372,30 @@ export default { ...@@ -294,6 +372,30 @@ export default {
handlePopStaff() { handlePopStaff() {
this.relateStoreVisible = true this.relateStoreVisible = true
}, },
getCustomerList() {
const merchantIds = this.empTableData.map((item) => item.merchantId)
const brandIds = this.empTableData.map((item) => item.id)
if (!merchantIds.length && !brandIds.length) {
this.estimatedNumberOfPeople = 0
return
}
const params = {
pageSize: 999999,
merchantIds,
brandIds,
pageNum: 1
}
this.getList =
this.formData.selectStaffType == 2
? listMerchantStaffPage
: listBrandStaffPage
this.storeSearchForm = params
this.customerLoading = true
this.getList(params).then((res) => {
this.estimatedNumberOfPeople = res?.total || 0
this.customerLoading = false
})
},
getCustomerByTagList(type) { getCustomerByTagList(type) {
let params = {} let params = {}
if (type == "filtrate") { if (type == "filtrate") {
...@@ -381,14 +483,35 @@ export default { ...@@ -381,14 +483,35 @@ export default {
this.formData[key] = res[key] this.formData[key] = res[key]
} }
} }
this.formData.customerDataList = this.transformLabelList(
res.labelList
)
// 初始化 富文本内容 // 初始化 富文本内容
this.formData.contentType == 1 && this.handleTextBoxFocus() this.formData.contentType == 1 && this.handleTextBoxFocus()
if (this.formData.selectStaffType == 1) {
this.formData.customerDataList = this.transformLabelList(
res.labelList
)
this.getCustomerByTagList("filtrate") this.getCustomerByTagList("filtrate")
} }
const selectStaffValue = JSON.parse(res.selectStaffValue || "{}")
if (this.formData.selectStaffType == 2) {
for (let [key, value] of Object.entries(selectStaffValue)) {
this.empTableData.push({
merchantId: key,
merchantName: value
})
}
this.getCustomerList()
}
if (this.formData.selectStaffType == 3) {
for (let [key, value] of Object.entries(selectStaffValue)) {
this.empTableData.push({
id: key,
label: value
})
}
this.getCustomerList()
}
}
}) })
// contentManagerTaskById({ id }).then((res) => { // contentManagerTaskById({ id }).then((res) => {
// const typeNameMap = { // const typeNameMap = {
...@@ -614,6 +737,9 @@ export default { ...@@ -614,6 +737,9 @@ export default {
.img-size { .img-size {
cursor: pointer; cursor: pointer;
} }
.emp-table-box {
width: 567px;
}
.customer-box { .customer-box {
width: 567px; width: 567px;
background-color: #fff; background-color: #fff;
......
...@@ -65,7 +65,11 @@ ...@@ -65,7 +65,11 @@
<script> <script>
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import { contentTypeList, sendStatusList } from "@/common/constants.js" import {
contentTypeList,
sendStatusList,
channelTypeList
} from "@/common/constants.js"
// import { rewithdraw } from '@api/withdrawalManage' // import { rewithdraw } from '@api/withdrawalManage'
import { contentManagerTaskPage, deleteTaskById } from "@api/contentManager" import { contentManagerTaskPage, deleteTaskById } from "@api/contentManager"
// import addDialog from './components/addDialog' // import addDialog from './components/addDialog'
...@@ -109,6 +113,15 @@ export default { ...@@ -109,6 +113,15 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "sendStatusList" optionsName: "sendStatusList"
},
{
label: "发送渠道",
name: "sendChannelType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "channelTypeList"
} }
], ],
getListApi: contentManagerTaskPage, getListApi: contentManagerTaskPage,
...@@ -134,6 +147,16 @@ export default { ...@@ -134,6 +147,16 @@ export default {
} }
}, },
{ {
label: "发送渠道",
prop: "sendChannelType",
width: "100px",
formatter: (cellValue) => {
return this.baseData.channelTypeList.find(
(item) => item.confId === cellValue.sendChannelType
)?.confValue
}
},
{
label: "发送时间", label: "发送时间",
prop: "sendTime", prop: "sendTime",
width: "150px", width: "150px",
...@@ -177,7 +200,8 @@ export default { ...@@ -177,7 +200,8 @@ export default {
}, },
baseData: { baseData: {
contentTypeList: deepClone(contentTypeList), contentTypeList: deepClone(contentTypeList),
sendStatusList: deepClone(sendStatusList) sendStatusList: deepClone(sendStatusList),
channelTypeList: deepClone(channelTypeList)
}, },
infos: [], infos: [],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!