Commit a9d85a16 by 李伟康

fixed 修复

1 parent 9d9ef1da
......@@ -605,7 +605,7 @@
<div class="common el-form-item__content">
<div
class="el-input"
ref="groupZhanServerRef"
ref="employeeBadgeRef"
>
<div
class="el-input__inner"
......@@ -626,7 +626,7 @@
v-if="!groupHideObj.employeeBadgeReport"
>
<gl-select-menu
:domEl="domZhanServerEl"
:domEl="domemployeeBadgeEl"
@changeStatu="hideSelect"
>
<el-form-item class="search-groomname">
......@@ -675,7 +675,7 @@
<div class="group-box">
<div
class="input-box"
v-for="(i, k) in groupCofListInput.employeeBadgeValue"
v-for="(i, k) in groupCofListInput.employeeBadgeReportValue"
:key="k"
>
<el-select
......@@ -694,12 +694,12 @@
<i
class="el-icon-circle-plus"
v-if="k == 0"
@click="addGroup(groupCofListInput.employeeBadgeValue)"
@click="addGroup(groupCofListInput.employeeBadgeReportValue)"
></i>
<i
class="el-icon-remove"
v-else
@click="delGroup(groupCofListInput.employeeBadgeValue, k)"
@click="delGroup(groupCofListInput.employeeBadgeReportValue, k)"
></i>
</div>
</div>
......@@ -882,7 +882,7 @@ export default {
// scheduleReportValue: [],
zhanServerReportValue: [],
storeServerReportValue: [],
employeeBadgeValue: [],
employeeBadgeReportValue: [],
InvoicingReportValue: []
},
groupToType: [
......@@ -1114,7 +1114,10 @@ export default {
},
domInvoicingServerEl () {
return this.$refs.groupInvoicingServerRef
}
},
domemployeeBadgeEl () {
return this.$refs.employeeBadgeRef
},
},
watch: {
filterText (val) {
......@@ -1222,7 +1225,8 @@ export default {
zhanReportValue: [{ name: '' }],
zhanServerReportValue: [{ name: '' }],
storeServerReportValue: [{ name: '' }],
InvoicingReportValue: [{ name: '' }]
InvoicingReportValue: [{ name: '' }],
employeeBadgeReportValue: [{ name: '' }]
}
})
},
......@@ -1352,72 +1356,77 @@ export default {
})
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'
try {
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: 0
}
this.setectList.forEach(item => {
params.yqMerchantIdList.push(item.yqMerchantId)
})
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)
})
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
Object.keys(this.groupCofList).map(item => {
console.log(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
} 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'
})
}
})
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()
}
})
if (res.data) {
this.battleVisible = false
this.handleSearch()
this.clearData()
}
})
} catch (error) {
console.log(error)
}
},
handlebattleClose () {
this.battleVisible = false
......@@ -1458,7 +1467,7 @@ export default {
// scheduleReportValue: [],
zhanServerReportValue: [],
storeServerReportValue: [],
employeeBadgeValue: [],
employeeBadgeReportValue: [],
InvoicingReportValue: []
}
this.battleVisible = true
......@@ -1512,7 +1521,8 @@ export default {
// scheduleReportValue: [{ name: '' }],
zhanServerReportValue: [{ name: '' }],
storeServerReportValue: [{ name: '' }],
InvoicingReportValue: [{ name: '' }]
InvoicingReportValue: [{ name: '' }],
employeeBadgeReportValue: [{ name: '' }]
}
}
this.getDepartmentTree()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!