diff --git a/fuintAdmin_zt/src/views/components/Service/payment.vue b/fuintAdmin_zt/src/views/components/Service/payment.vue index 8724bdda0..b72a13eed 100644 --- a/fuintAdmin_zt/src/views/components/Service/payment.vue +++ b/fuintAdmin_zt/src/views/components/Service/payment.vue @@ -97,6 +97,29 @@ :data="tableData1" style="width: 100%;margin-bottom: 20px;" border> + + + - + + + - + @@ -249,10 +272,10 @@ + v-for="(item1,i) in merchantList" + :key="item1.id" + :label="item1.remark ? (item1.merchantName+'('+item1.remark+')') : (item1.merchantName+'(--)')" + :value="item1.id"> @@ -275,10 +298,10 @@ + v-for="(item1,i) in merchantList" + :key="item1.id" + :label="item1.remark ? (item1.merchantName+'('+item1.remark+')') : (item1.merchantName+'(--)')" + :value="item1.id"> @@ -286,20 +309,21 @@ style="width: 300px" disabled> - + + - - + + + v-for="item1 in oilGunList" + :key="item1.id" + :label="item1.oilNumber+'-'+item1.gunName" + :value="item1.id+''"> @@ -697,6 +721,9 @@ export default { deptId: [ {required: true, message: '请选择机构信息', trigger: 'blur'}, ], + ruleName: [ + {required: true, message: '请输入规则名称', trigger: 'blur'}, + ], } } }, @@ -721,7 +748,49 @@ export default { // 确定信息 submitAddRule(){ this.$refs["formRule"].validate(valid => { + if (this.formRule.ruleType == 2) { + let typeList = [] + let oilGunIds = [] + this.formRule.ruleList.forEach(item => { + if (item.oilGunId) { + oilGunIds.push(...item.oilGunId) + } + if (item.transactionType) { + typeList.push(...item.transactionType) + } + }) + typeList = typeList.filter((item, index, arr) => arr.indexOf(item) === index); + oilGunIds = oilGunIds.filter((item, index, arr) => arr.indexOf(item) === index); + if (typeList.length < 5) { + this.$message.error("请确保交易类型全部选择") + return + } + if (oilGunIds.length < this.oilGunList.length) { + this.$message.error("请确保油枪号全部选择") + return; + } + }else { + let proportion = 0 + this.formRule.ruleList.forEach(item => { + if (item.proportion) { + proportion += Number(item.proportion) + } + }) + console.log(proportion) + if (proportion!=100){ + this.$message.error("请确保交易占比相加为百分之百") + return; + } + } if (valid) { + this.formRule.ruleList.forEach(item => { + if (item.oilGunId){ + item.oilGunId = item.oilGunId.toString() + } + if (item.transactionType){ + item.transactionType = item.transactionType.toString() + } + }) if (this.formRule.id) { editRuleConfig(this.formRule).then(res => { if (res.data === 1) { @@ -798,6 +867,14 @@ export default { this.Ruletitle = '修改商户信息' this.addRule = true this.formRule = res.data + this.formRule.ruleList.forEach(item => { + if (item.oilGunId){ + item.oilGunId = item.oilGunId.split(",") + } + if (item.transactionType){ + item.transactionType = item.transactionType.split(",") + } + }) }) }, EnableRule(data){ diff --git a/fuintAdmin_zt/src/views/components/Service/staff.vue b/fuintAdmin_zt/src/views/components/Service/staff.vue index c5ce29c78..7bcd27f95 100644 --- a/fuintAdmin_zt/src/views/components/Service/staff.vue +++ b/fuintAdmin_zt/src/views/components/Service/staff.vue @@ -49,7 +49,9 @@