Commit c959c287 by 杨明

fixed

1 parent a94f6a44
...@@ -1860,75 +1860,6 @@ ...@@ -1860,75 +1860,6 @@
"webpack-chain": "^6.4.0", "webpack-chain": "^6.4.0",
"webpack-dev-server": "^3.11.0", "webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2" "webpack-merge": "^4.2.2"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader-v16@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
} }
}, },
"@vue/cli-shared-utils": { "@vue/cli-shared-utils": {
...@@ -12703,6 +12634,75 @@ ...@@ -12703,6 +12634,75 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.6.5", "version": "3.6.5",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
......
...@@ -31,6 +31,16 @@ const getActivitylist = params => { ...@@ -31,6 +31,16 @@ const getActivitylist = params => {
sign: true sign: true
}) })
} }
//战报配置列表
const activityOpen = params => {
params.method = `scrm.api.shopmall.activity.action.report.open`
return http({
url,
method: 'post',
data: params,
sign: true
})
}
// 批量配置众筹活动战报专员 // 批量配置众筹活动战报专员
const insertStaff = params => { const insertStaff = params => {
...@@ -66,4 +76,4 @@ const getGroupList = params => { ...@@ -66,4 +76,4 @@ const getGroupList = params => {
}) })
} }
export default { getStaffList, getMerchantList, getlistDepartmentTree, getActivitylist, insertStaff, getGroupList } export default { getStaffList, getMerchantList, getlistDepartmentTree, getActivitylist, insertStaff, getGroupList, activityOpen }
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-01-04 16:41:09
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-06 10:42:09
* @FilePath: \scrm-micro-battles\src\views\battle\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 专区管理 --> <!-- 专区管理 -->
<template> <template>
<div class="activity"> <div class="activity">
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs> <GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex-between title"> <div class="flex-between title">
<div class="title-text">专员列表</div> <div class="title-text">专员列表</div>
<template v-if="activeName == 'first'"> <template v-if="activeName == 'first'">
...@@ -13,12 +22,14 @@ ...@@ -13,12 +22,14 @@
<GLTable ref="battleRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable"> <GLTable ref="battleRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
<div slot="activityTime" slot-scope="scope">{{ dateFormatFun(scope.scope.startTime) }}-{{ dateFormatFun(scope.scope.endTime) }}</div> <div slot="activityTime" slot-scope="scope">{{ dateFormatFun(scope.scope.startTime) }}-{{ dateFormatFun(scope.scope.endTime) }}</div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleClose(scope.scope, 'close')" v-if="scope.scope.actionReportSendFlag == 1">关闭</el-button>
<el-button type="text" @click="handleClose(scope.scope, 'open')" v-else>打开</el-button>
<el-button type="text" v-if="scope.scope.reportStaffs.length == 0" @click="handlebattleOn(scope.scope)">配置</el-button> <el-button type="text" v-if="scope.scope.reportStaffs.length == 0" @click="handlebattleOn(scope.scope)">配置</el-button>
<el-button type="text" v-else @click="handlebattleOn(scope.scope, 'edit')">编辑</el-button> <el-button type="text" v-else @click="handlebattleOn(scope.scope, 'edit')">编辑</el-button>
</div> </div>
</GLTable> </GLTable>
</div> </div>
<GLDialog :mode="mode" class="battle-dialog" title="配置专员" @onOk="handlebattleConfirm" @onCancel="handlebattleClose" :visible.sync="battleVisible" :beforeSearchFn="beforeSearchFn"> <GLDialog mode="big" class="battle-dialog" bigTitle="配置专员" @onOk="handlebattleConfirm" @onCancel="handlebattleClose" :visible.sync="battleVisible" :beforeSearchFn="beforeSearchFn">
<div class="gl-form-page gl-form-min"> <div class="gl-form-page gl-form-min">
<el-form ref="form" label-width="154px"> <el-form ref="form" label-width="154px">
<el-form-item label="发送人员:"> <el-form-item label="发送人员:">
...@@ -43,6 +54,9 @@ ...@@ -43,6 +54,9 @@
<GLFull :label="tag.staffName" :identi="`${tag.id}`" labelWidth="110" textType="user" :haveClose="true" v-for="(tag, idx) in userList" :key="idx" @handleRemove="removeStaff(idx)"></GLFull> <GLFull :label="tag.staffName" :identi="`${tag.id}`" labelWidth="110" textType="user" :haveClose="true" v-for="(tag, idx) in userList" :key="idx" @handleRemove="removeStaff(idx)"></GLFull>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="战报配置:">
<div class="config-pannel">
<div class="config-item">
<!-- 战报自动发送 --> <!-- 战报自动发送 -->
<el-form-item class="select-wrap" label="战报自动发送:"> <el-form-item class="select-wrap" label="战报自动发送:">
<div class="common el-form-item__content"> <div class="common el-form-item__content">
...@@ -101,6 +115,10 @@ ...@@ -101,6 +115,10 @@
</gl-select-menu> </gl-select-menu>
</transition> </transition>
</el-form-item> </el-form-item>
</div>
<div class="clear-btn" v-if="editStatus" @click="clearWechat">清空</div>
</div>
</el-form-item>
</el-form> </el-form>
</div> </div>
</GLDialog> </GLDialog>
...@@ -125,6 +143,7 @@ export default { ...@@ -125,6 +143,7 @@ export default {
return { return {
isgroup: true, isgroup: true,
isAutomatic: true, isAutomatic: true,
editStatus: false,
merchantId: '', merchantId: '',
merchantName: '', merchantName: '',
activeName: 'first', activeName: 'first',
...@@ -146,7 +165,22 @@ export default { ...@@ -146,7 +165,22 @@ export default {
name: 'second' name: 'second'
} }
], ],
tableSearchForm: {}, searchFormData: [
{
label: '活动门店',
name: 'merchantName',
type: 'input'
},
{
label: '活动名称',
name: 'activityName',
type: 'input'
}
],
tableSearchForm: {
merchantName: '',
activityName: ''
},
// 表格 // 表格
userList: [], userList: [],
selectArray: [], selectArray: [],
...@@ -315,6 +349,38 @@ export default { ...@@ -315,6 +349,38 @@ export default {
this.userList = [] this.userList = []
} }
}, },
handleClose(scope, status) {
const info = status == 'close' ? '关闭' : '打开'
const infoN = status == 'close' ? '取消' : '恢复'
this.$confirm(`${info}则${infoN}战报发送功能,是否确认${info}?`, info, {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
})
.then(() => {
this.activityOpen(scope)
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
},
activityOpen(scope) {
const { activityId, actionReportSendFlag } = scope
this.$apis.battle
.activityOpen({
activityId,
actionReportSendFlag: actionReportSendFlag == 1 ? 2 : 1
})
.then(res => {
if (res) {
this.handleSearch()
this.$message.success('操作成功')
}
})
},
battleSetHandle() { battleSetHandle() {
if (this.setectList.length == 0) { if (this.setectList.length == 0) {
this.$message({ this.$message({
...@@ -324,6 +390,7 @@ export default { ...@@ -324,6 +390,7 @@ export default {
return return
} }
this.userList = [] this.userList = []
this.editStatus = false
this.battleVisible = true this.battleVisible = true
}, },
dateFormatFun(date) { dateFormatFun(date) {
...@@ -353,7 +420,7 @@ export default { ...@@ -353,7 +420,7 @@ export default {
}) })
return return
} }
if (this.wechat.automaticName !== ''&&this.wechat.roomName == '') { if (this.wechat.automaticName !== '' && this.wechat.roomName == '') {
this.$message({ this.$message({
message: '请选择关联群', message: '请选择关联群',
type: 'error' type: 'error'
...@@ -371,13 +438,19 @@ export default { ...@@ -371,13 +438,19 @@ export default {
}) })
}) })
this.setectList.forEach(item => { this.setectList.forEach(item => {
batchstaffRequestList.push({ let autoStaff = {}
activityId: item.activityId, if (!this.editStatus) {
autoStaff = {
autoStaffId: this.wechat.staffId, autoStaffId: this.wechat.staffId,
autoStaffName: this.wechat.automaticName, autoStaffName: this.wechat.automaticName,
autoGroupId: this.wechat.groupId, autoGroupId: this.wechat.groupId,
autoGroupName: this.wechat.roomName, autoGroupName: this.wechat.roomName,
autoGroupMerchantId: this.$merchantId, autoGroupMerchantId: this.$merchantId
}
}
batchstaffRequestList.push({
activityId: item.activityId,
...autoStaff,
staffRequestList staffRequestList
}) })
}) })
...@@ -405,9 +478,16 @@ export default { ...@@ -405,9 +478,16 @@ export default {
this.userList = [] this.userList = []
this.setectList.push(data) this.setectList.push(data)
this.battleVisible = true this.battleVisible = true
if (sign) this.getStaffList(data) this.editStatus = false
if (sign) {
this.editStatus = true
this.getStaffList(data)
}
this.getDepartmentTree() this.getDepartmentTree()
}, },
clearWechat() {
this.wechat = {}
},
//获取编辑 //获取编辑
getStaffList(data) { getStaffList(data) {
this.$apis.battle.getStaffList({ id: data.activityId }).then(res => { this.$apis.battle.getStaffList({ id: data.activityId }).then(res => {
...@@ -434,8 +514,14 @@ export default { ...@@ -434,8 +514,14 @@ export default {
handleClick() { handleClick() {
this.handleSearch() this.handleSearch()
}, },
handleReset() {
this.tableSearchForm = {}
this.handleSearch()
},
getParams() { getParams() {
let params = {} let params = {
...this.tableSearchForm
}
this.activeName == 'first' ? (params.activityStatus = 2) : (params.activityStatus = 3) this.activeName == 'first' ? (params.activityStatus = 2) : (params.activityStatus = 3)
return params return params
}, },
...@@ -526,7 +612,26 @@ export default { ...@@ -526,7 +612,26 @@ export default {
} }
} }
} }
.config-pannel {
background: #f9f9f9;
width: 520px;
height: 168px;
display: flex;
.config-item {
padding: 26px 20px;
}
.clear-btn {
cursor: pointer;
background: #f1f1f1;
width: 40px;
height: 100%;
line-height: 20px;
font-size: 14px;
color: #666666;
padding: 60px 13px;
box-sizing: border-box;
}
}
.input-tag-wrapper { .input-tag-wrapper {
position: relative; position: relative;
font-size: 14px; font-size: 14px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!