Commit dc18ab99 by 张立顺

feat sop推送功能开发

1 parent 86f0dff0
......@@ -89,3 +89,15 @@ export function getStatisticPage(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.statistic.page`
return request(data, "POST")
}
// 员工群发-添加/修改记录
export function insertOrUpdate(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.insertOrUpdate`
return request(data, "POST")
}
// 根据ID查询详细信息
export function contentManagerTaskById(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.getById`
return request(data, "POST")
}
......@@ -120,8 +120,8 @@ export const routerName = {
cache: false,
activePath: "/contentManagerList"
},
// component: _import("contentManager/contentAdd")
component: _import("contentManager/SopContentAdd")
component: _import("contentManager/contentAdd")
// component: _import("contentManager/SopContentAdd")
},
91303: {
path: "/contentDetail",
......@@ -174,13 +174,27 @@ export const routerName = {
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
handle: "handleAdd",
addRoutePath: [
{
authId: "91306",
name: "内容编辑",
parentId: "91305"
}
]
},
{
authId: "9130502",
parentId: "91305",
label: "查看",
handle: "handleDetail"
handle: "handleDetail",
addRoutePath: [
{
authId: "91307",
name: "查看",
parentId: "91305"
}
]
},
{
authId: "9130503",
......@@ -232,5 +246,29 @@ export const routerName = {
}
],
component: _import("contentManager/staffMassSending/statisticsPage")
},
91306: {
path: "/SopContentAdd",
name: "SopContentAdd",
meta: {
title: "内容编辑",
authId: "91306",
parentId: "91301",
cache: false,
activePath: "/staffMassSending"
},
component: _import("contentManager/SopContentAdd")
},
91307: {
path: "/sopContentDetail",
name: "sopContentDetail",
meta: {
title: "查看",
authId: "91307",
parentId: "91301",
cache: false,
activePath: "/staffMassSending"
},
component: _import("contentManager/sopContentDetail")
}
}
......@@ -137,7 +137,8 @@
</template>
<script>
import { queryLabelGroupTree } from "@/api/shopConfig"
// import { queryLabelGroupTree } from "@/api/shopConfig"
import { queryLabelGroupTree } from "@/api/inStoreManage"
import { deepClone } from "@/common/util"
export default {
name: "activityModel",
......
<!-- 关联门店弹窗 -->
<template>
<d2-dialog
:title="title"
:is-visible.sync="relateStoreVisible"
width="50%"
btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose"
class="relateStore"
>
<slot />
<el-row class="tableCon">
<div class="tableBox">
<!-- height="300px" -->
<el-table
ref="seletingTable"
:data="selectingData"
class="table"
border
>
<!-- @select="handleChange"
@select-all="handleAll" -->
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<!-- <el-table-column prop="merchantName" label="门店名称" align="center">
</el-table-column> -->
<el-table-column prop="staffName" label="员工名称" align="center">
</el-table-column>
<el-table-column prop="phoneNumber" label="手机号" align="center">
</el-table-column>
</el-table>
<el-pagination
small
background
@current-change="handleCurrentChange"
:current-page.sync="pageNum"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total"
/>
</div>
<!-- <el-table
class="tableBox table"
:data="selectedData"
border
height="464px">
<el-table-column prop="merchantName" label="门店名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.merchantName }}</span>
</template>
</el-table-column>
<el-table-column prop="staffName" label="驻店员工名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.staffName }}</span>
</template>
</el-table-column>
<el-table-column prop="phoneNumber" label="手机号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.phoneNumber }}</span>
</template>
</el-table-column>
<el-table-column label="删除" align="center" width="50px">
<template slot-scope="scope">
<el-button
class="el-icon-delete"
@click="handleDelete(scope.row)"
type="text" />
</template>
</el-table-column>
</el-table> -->
</el-row>
</d2-dialog>
</template>
<script>
export default {
name: "SelectEmployees",
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
pageNum: 1,
pageSize: 20
}
},
props: {
title: {
type: String,
default: "选择驻店员工"
},
relateStoreVisible: {
type: Boolean,
default: false
},
storeApi: {
type: Function,
default: () => {}
},
storeSelected: {
type: Array,
default: () => []
},
storeSearchForm: {
type: Object,
default: () => {}
},
merchantIds: {
type: Array,
default: () => []
}
},
mounted() {
this.selectedData = this.storeSelected
this.getSelectingList()
console.log(this.selectedData, "---------")
},
methods: {
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.staffUuid)
this.selectingData.forEach((item) => {
exitIds.includes(item.staffUuid) &&
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
getSelectingList() {
const _storeSearchForm = this.storeSearchForm
// 会员权益/积分商城获取账户中心所有门店 接口不同 接口新增查询参数merchantName 不需单独处理
// if ([0, 4].includes(this.selectedScene)) {
// // 会员权益,积分商城场景查询门店名称参数
// _storeSearchForm.merchantIdName = _storeSearchForm.merchantName // 账户中心所有门店接口查询条件
// }
this.storeApi({
...this.storeSearchForm,
pageNum: this.pageNum,
pageSize: this.pageSize
// merchantNoList: this.merchantIds
}).then((res) => {
// res?.forEach((val) => {
// 账户中心门店返回商户号字段是merchantNo
// if (val.merchantNo) val.merchantId = Number(val.merchantNo)
// val?.sceneList?.forEach((subVal) => {
// if (subVal.scene == this.selectedScene) {
// val.yqMerchantId = subVal?.yqMerchant?.merchantId || "-"
// val.yqMerchantName = subVal?.yqMerchant?.merchantName || "-"
// }
// })
// })
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.staffUuid === row.staffUuid
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.staffUuid !== row.staffUuid
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.staffUuid === item.staffUuid
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
handleDelete(row) {
this.selectedData = this.selectedData.filter(
(item) => item.staffUuid !== row.staffUuid
)
const obj = this.selectingData.find((v) => v.staffUuid == row.staffUuid)
this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.pageNum = val
this.getSelectingList()
},
handleRelateStoreConfirm() {
this.$emit("handleRelateStoreConfirm", this.selectedData)
},
handleRelateStoreClose() {
this.$emit("handleRelateStoreClose")
}
}
}
</script>
<style lang="scss">
.relateStore .table {
margin: 0 auto 20px !important;
width: 98%;
}
.relateStore .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 1;
}
}
.service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell {
line-height: 26px !important;
}
.service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important;
}
.relateStore .red {
color: red;
}
.relateStore .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!