Commit 0ede34d7 by 王志慧

七月份喜报1.4需求开发

1 parent d2afcda2
import { http } from '@/main'
const url1 = '/rop-scrm-entmicro/router'
const url = '/rop-scrm-shopmall/router'
//门店号选择服务
const getMerchantList = params => {
params.method = 'entmicro.api.merchant.listDepartmentTree.select.merchant'
return http({
url: url1,
method: 'post',
data: params,
sign: true
})
}
//分页查询线索喜报配置信息
const getClueReportList = params => {
params.method = `scrm.api.shopmall.clueReportConfig.page`
return http({
url,
method: 'post',
data: params,
sign: true
})
}
// 新增或修改喜报配置
const updateClueReportConfig = params => {
params.method = `scrm.api.shopmall.clueReportConfig.insertOrUpdate`
return http({
url,
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
export default { getMerchantList, getClueReportList, updateClueReportConfig }
...@@ -19,8 +19,8 @@ export const fetchConfig = function(isEnv = true) { ...@@ -19,8 +19,8 @@ export const fetchConfig = function(isEnv = true) {
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config') return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config')
return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config') // return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -3,23 +3,18 @@ ...@@ -3,23 +3,18 @@
<div class="activity"> <div class="activity">
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :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>
<!-- <el-button :size="size" <el-button :size="size" type="primary" class="battle-set-btn" @click="handlebattleOn()">新增</el-button>
type="primary"
class="battle-set-btn"
@click="battleSetHandle">批量配置专员</el-button> -->
</div> </div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable ref="battleRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable"> <GLTable ref="battleRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @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 slot="content" slot-scope="scope"> <div slot="content" slot-scope="scope">
<div v-for="(item, index) in formatterContent(scope.scope)" :key="index">{{ item }}</div> <div v-for="(item, index) in formatterContent(scope.scope)" :key="index">{{ item }}</div>
</div> </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" v-if="!scope.scope.staffId" @click="handlebattleOn(scope.scope)">配置</el-button> <el-button type="text" @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>
...@@ -459,35 +454,38 @@ export default { ...@@ -459,35 +454,38 @@ export default {
// }], // }],
// 搜索 // 搜索
searchForm: { searchForm: {
yqMerchantId: '', merchantId: '',
yqMerchantName: '', merchantName: '',
enterpriseMerchantId: '', groupMerchantName: ''
scene: 1
}, },
searchFormData: [ searchFormData: [
{ {
label: '园区店', label: '4S店',
name: 'yqMerchantName', name: 'merchantName',
type: 'input', type: 'input',
maxlength: 128 maxlength: 128
}, },
{ {
label: '商户号', label: '商户号',
name: 'unionMerchantId', name: 'merchantId',
type: 'input', type: 'input',
maxlength: 11 maxlength: 11
}, },
{ {
label: '4S店', label: '企微名称',
name: 'merchantName', name: 'groupMerchantName',
type: 'input', type: 'select',
maxlength: 128 width: '215px',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantList'
} }
], ],
// 表格 // 表格
// userList: [], // userList: [],
selectArray: [], selectArray: [],
getListApi: this.$apis.saasOrder.getYqReportlist, getListApi: this.$apis.clewOrder.getClueReportList,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: true,
...@@ -649,10 +647,9 @@ export default { ...@@ -649,10 +647,9 @@ export default {
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
yqMerchantId: '', merchantId: '',
yqMerchantName: '', merchantName: '',
enterpriseMerchantId: '', groupMerchantName: ''
scene: 1
} }
this.handleSearch() this.handleSearch()
}, },
...@@ -793,99 +790,10 @@ export default { ...@@ -793,99 +790,10 @@ export default {
handlestaffbattleClose() { handlestaffbattleClose() {
this.battlestaffVisible = false this.battlestaffVisible = false
}, },
handlebattleConfirm() {
if (!this.wechat.staffId) {
this.$message({
message: '请选择推送人',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
let isGroupEmpty = Object.keys(this.groupCofList)
.map(item => this.groupCofList[item].length)
.every(item => item == 0)
let isGroupEmptyInput = Object.keys(this.groupCofListInput)
.map(item => this.groupCofListInput[item].length)
.every(item => item == 0)
if (isGroupEmpty && isGroupEmptyInput) {
this.$message({
message: '推送配置必须配置至少一项',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
var params = {
enterpriseMerchantId: this.config.merchantId,
enterpriseMerchantName: this.config.merchantName,
staffId: this.wechat.staffId,
staffName: this.wechat.automaticName,
// groupId: this.wechat.groupId,
// groupName: this.wechat.roomName,
groupMerchantId: this.config.merchantId,
updatedBy: this.$globalState.session.accountName,
yqMerchantIdList: [],
groupConfigList: [],
merchantId: this.setectList[0]?.merchantId,
scene: 1
}
this.setectList.forEach(item => {
params.yqMerchantIdList.push(item.yqMerchantId)
})
Object.keys(this.groupCofList).map(item => {
// console.log(this.groupCofList[item])
let type = this.groupToType.find(k => k.attr == item).type
if (this.groupCofList[item].length) {
this.groupCofList[item].forEach(k => {
params.groupConfigList.push({
groupId: k.groupId,
groupName: k.roomName,
groupMerchantId: this.config.merchantId,
actionReportType: type
})
})
} else if (this.groupCofListInput[item + 'Value'].length) {
this.groupCofListInput[item + 'Value'].forEach(k => {
params.groupConfigList.push({
groupId: this.idBefEncryption + '_R:' + k.name,
groupName: k.name,
groupMerchantId: this.config.merchantId,
actionReportType: type
})
})
}
})
console.log(params, 'params---')
this.$apis.saasOrder.updateYqConfig(params).then(res => {
this.$message({
message: res.code == '0' ? '配置成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.data) {
this.battleVisible = false
this.handleSearch()
this.clearData()
}
})
},
handlebattleClose() {
this.battleVisible = false
this.clearData()
},
handleDetails() {}, handleDetails() {},
addGroup(group) {
group.push({ name: '' })
},
delGroup(group, i) {
group.splice(i, 1)
},
handlebattleOn(data, sign) { handlebattleOn(data, sign) {
let params = { let params = {
data: data, data: data
sign: sign ? sign : ''
} }
this.$router.push({ this.$router.push({
path: '/bulletin/addClewConfig', path: '/bulletin/addClewConfig',
...@@ -957,23 +865,6 @@ export default { ...@@ -957,23 +865,6 @@ export default {
// } // }
// this.getDepartmentTree() // this.getDepartmentTree()
}, },
getGroupList(id, isReset = false) {
this.$apis.saasOrder.getGroupList({ msgStaffIdList: id }).then(res => {
if (res.code == 0) {
this.groupList = res.data
if (isReset) {
this.groupCofList = {
xiReport: [],
zhanReport: [],
orderReport: [],
saReport: [],
saPerReport: [],
scheduleReport: []
}
}
}
})
},
handleSetting() { handleSetting() {
this.drawer = true this.drawer = true
}, },
......
...@@ -34,16 +34,17 @@ ...@@ -34,16 +34,17 @@
</template> </template>
<script> <script>
import dialog from './dialog'
export default { export default {
mixins: [dialog], props: {
content: {
type: String,
default: ''
},
isDialogVisible: Boolean
},
data() { data() {
return { return {
mode: 'big', mode: 'big',
wordType: {
switchType: 701,
switchText: ''
},
btnList: [ btnList: [
{ {
type: 1, type: 1,
...@@ -70,39 +71,31 @@ export default { ...@@ -70,39 +71,31 @@ export default {
name: '浏览时长' name: '浏览时长'
} }
], ],
params: ['wordType'],
mapList: { mapList: {
销售顾问: '${employeeName}',
客户姓名: '${customerName}', 客户姓名: '${customerName}',
车型: '${carType}', 手机号: '${employeeName}',
订单总金额: '${totalPrice}', 线索来源: '${source}',
阳光激励费: '${sunshineInspiration}', 具体线索: '${clue}',
商品名称: '${goodsNames}' 浏览时长: '${browseTime}'
} }
} }
}, },
watch: {
methods: { content(val) {
initData() {
this.switchList.wordReport.forEach(i => {
this.params.find(data => {
if (this[data].switchType == i.switchType) {
this[data] = this.$common.utils.deepClone(i)
}
})
})
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.verbalRef && this.$refs.verbalRef.update(this.wordType.switchText) this.$refs.verbalRef && this.$refs.verbalRef.update(val)
}) })
}
}, },
methods: {
handlebattleConfirm() { handlebattleConfirm() {
this.isDialogVisible = false this.isDialogVisible = false
let switchList = [] let content = this.$refs.verbalRef.getTextValue()
this.params.forEach(data => {
if (data == 'wordType') this[data].switchText = this.$refs.verbalRef.getTextValue() this.$emit('handlePreview', { data: content })
switchList.push(this[data]) },
}) handlebattleClose() {
this.$emit('handlePreview', { key: 'wordReport', data: switchList }) this.$emit('handleClose')
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!