Commit a9d85a16 by 李伟康

fixed 修复

1 parent 9d9ef1da
...@@ -605,7 +605,7 @@ ...@@ -605,7 +605,7 @@
<div class="common el-form-item__content"> <div class="common el-form-item__content">
<div <div
class="el-input" class="el-input"
ref="groupZhanServerRef" ref="employeeBadgeRef"
> >
<div <div
class="el-input__inner" class="el-input__inner"
...@@ -626,7 +626,7 @@ ...@@ -626,7 +626,7 @@
v-if="!groupHideObj.employeeBadgeReport" v-if="!groupHideObj.employeeBadgeReport"
> >
<gl-select-menu <gl-select-menu
:domEl="domZhanServerEl" :domEl="domemployeeBadgeEl"
@changeStatu="hideSelect" @changeStatu="hideSelect"
> >
<el-form-item class="search-groomname"> <el-form-item class="search-groomname">
...@@ -675,7 +675,7 @@ ...@@ -675,7 +675,7 @@
<div class="group-box"> <div class="group-box">
<div <div
class="input-box" class="input-box"
v-for="(i, k) in groupCofListInput.employeeBadgeValue" v-for="(i, k) in groupCofListInput.employeeBadgeReportValue"
:key="k" :key="k"
> >
<el-select <el-select
...@@ -694,12 +694,12 @@ ...@@ -694,12 +694,12 @@
<i <i
class="el-icon-circle-plus" class="el-icon-circle-plus"
v-if="k == 0" v-if="k == 0"
@click="addGroup(groupCofListInput.employeeBadgeValue)" @click="addGroup(groupCofListInput.employeeBadgeReportValue)"
></i> ></i>
<i <i
class="el-icon-remove" class="el-icon-remove"
v-else v-else
@click="delGroup(groupCofListInput.employeeBadgeValue, k)" @click="delGroup(groupCofListInput.employeeBadgeReportValue, k)"
></i> ></i>
</div> </div>
</div> </div>
...@@ -882,7 +882,7 @@ export default { ...@@ -882,7 +882,7 @@ export default {
// scheduleReportValue: [], // scheduleReportValue: [],
zhanServerReportValue: [], zhanServerReportValue: [],
storeServerReportValue: [], storeServerReportValue: [],
employeeBadgeValue: [], employeeBadgeReportValue: [],
InvoicingReportValue: [] InvoicingReportValue: []
}, },
groupToType: [ groupToType: [
...@@ -1114,7 +1114,10 @@ export default { ...@@ -1114,7 +1114,10 @@ export default {
}, },
domInvoicingServerEl () { domInvoicingServerEl () {
return this.$refs.groupInvoicingServerRef return this.$refs.groupInvoicingServerRef
} },
domemployeeBadgeEl () {
return this.$refs.employeeBadgeRef
},
}, },
watch: { watch: {
filterText (val) { filterText (val) {
...@@ -1222,7 +1225,8 @@ export default { ...@@ -1222,7 +1225,8 @@ export default {
zhanReportValue: [{ name: '' }], zhanReportValue: [{ name: '' }],
zhanServerReportValue: [{ name: '' }], zhanServerReportValue: [{ name: '' }],
storeServerReportValue: [{ name: '' }], storeServerReportValue: [{ name: '' }],
InvoicingReportValue: [{ name: '' }] InvoicingReportValue: [{ name: '' }],
employeeBadgeReportValue: [{ name: '' }]
} }
}) })
}, },
...@@ -1352,72 +1356,77 @@ export default { ...@@ -1352,72 +1356,77 @@ export default {
}) })
return true return true
} }
let isGroupEmpty = Object.keys(this.groupCofList) try {
.map(item => this.groupCofList[item].length) let isGroupEmpty = Object.keys(this.groupCofList)
.every(item => item == 0) .map(item => this.groupCofList[item].length)
let isGroupEmptyInput = Object.keys(this.groupCofListInput) .every(item => item == 0)
.map(item => this.groupCofListInput[item].length) let isGroupEmptyInput = Object.keys(this.groupCofListInput)
.every(item => item == 0) .map(item => this.groupCofListInput[item].length)
if (isGroupEmpty && isGroupEmptyInput) { .every(item => item == 0)
this.$message({ if (isGroupEmpty && isGroupEmptyInput) {
message: '推送配置必须配置至少一项', this.$message({
type: 'error', message: '推送配置必须配置至少一项',
customClass: 'message-Z-zinde' 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: 0
}
this.setectList.forEach(item => {
params.yqMerchantIdList.push(item.yqMerchantId)
}) })
return true Object.keys(this.groupCofList).map(item => {
} console.log(item)
var params = { // console.log(this.groupCofList[item])
enterpriseMerchantId: this.config.merchantId, let type = this.groupToType.find(k => k.attr == item).type
enterpriseMerchantName: this.config.merchantName, if (this.groupCofList[item].length) {
staffId: this.wechat.staffId, this.groupCofList[item].forEach(k => {
staffName: this.wechat.automaticName, params.groupConfigList.push({
// groupId: this.wechat.groupId, groupId: k.groupId,
// groupName: this.wechat.roomName, groupName: k.roomName,
groupMerchantId: this.config.merchantId, groupMerchantId: this.config.merchantId,
updatedBy: this.$globalState.session.accountName, actionReportType: type
yqMerchantIdList: [], })
groupConfigList: [],
merchantId: this.setectList[0]?.merchantId,
scene: 0
}
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) {
} else if (this.groupCofListInput[item + 'Value'].length) { this.groupCofListInput[item + 'Value'].forEach(k => {
this.groupCofListInput[item + 'Value'].forEach(k => { params.groupConfigList.push({
params.groupConfigList.push({ groupId: this.idBefEncryption + '_R:' + k.name,
groupId: this.idBefEncryption + '_R:' + k.name, groupName: k.name,
groupName: k.name, groupMerchantId: this.config.merchantId,
groupMerchantId: this.config.merchantId, actionReportType: type
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
console.log(params, 'params---') this.handleSearch()
this.$apis.saasOrder.updateYqConfig(params).then(res => { this.clearData()
this.$message({ }
message: res.code == '0' ? '配置成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
}) })
if (res.data) { } catch (error) {
this.battleVisible = false console.log(error)
this.handleSearch() }
this.clearData()
}
})
}, },
handlebattleClose () { handlebattleClose () {
this.battleVisible = false this.battleVisible = false
...@@ -1458,7 +1467,7 @@ export default { ...@@ -1458,7 +1467,7 @@ export default {
// scheduleReportValue: [], // scheduleReportValue: [],
zhanServerReportValue: [], zhanServerReportValue: [],
storeServerReportValue: [], storeServerReportValue: [],
employeeBadgeValue: [], employeeBadgeReportValue: [],
InvoicingReportValue: [] InvoicingReportValue: []
} }
this.battleVisible = true this.battleVisible = true
...@@ -1512,7 +1521,8 @@ export default { ...@@ -1512,7 +1521,8 @@ export default {
// scheduleReportValue: [{ name: '' }], // scheduleReportValue: [{ name: '' }],
zhanServerReportValue: [{ name: '' }], zhanServerReportValue: [{ name: '' }],
storeServerReportValue: [{ name: '' }], storeServerReportValue: [{ name: '' }],
InvoicingReportValue: [{ name: '' }] InvoicingReportValue: [{ name: '' }],
employeeBadgeReportValue: [{ name: '' }]
} }
} }
this.getDepartmentTree() this.getDepartmentTree()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!