Commit d850bdac by 李伟康

Merge branch 'feature/584/lwk' into 'SAAS+V5.8.4'

fix(sales): 修复销售合同步骤二验证逻辑和样式问题

See merge request !861
2 parents 1492e5c4 388c653e
...@@ -171,12 +171,7 @@ export default { ...@@ -171,12 +171,7 @@ export default {
color: #333333; color: #333333;
} }
.el-table__body-wrapper {
.el-table--medium {
td {
padding: 18px 0 !important;
}
}
} }
...@@ -186,9 +181,11 @@ export default { ...@@ -186,9 +181,11 @@ export default {
font-weight: bold; font-weight: bold;
} }
} }
} }
::v-deep .el-table__body-wrapper {}
.radio-wrapper { .radio-wrapper {
display: block; display: block;
position: relative; position: relative;
width: 12px; width: 12px;
...@@ -227,6 +224,5 @@ export default { ...@@ -227,6 +224,5 @@ export default {
opacity: 0.6; opacity: 0.6;
cursor: not-allowed; cursor: not-allowed;
} }
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -318,27 +318,6 @@ export default { ...@@ -318,27 +318,6 @@ export default {
componentData.ladderConditions = JSON.stringify(data) componentData.ladderConditions = JSON.stringify(data)
} }
callback(componentData) callback(componentData)
// this.formRef.validate(valid => {
// if (valid) {
// let { componentData, num } = this,
// { compensationMode, fixedCompensation } = componentData
// if (compensationMode != 3) {
// if (compensationMode == 1 && (fixedCompensation === '' || fixedCompensation === null || fixedCompensation === undefined)) return callback(false, `兜底条件${num + 1}:固定赔付金额不能为空`)
// if (compensationMode == 2) {
// let ladderConditions = deepClone(this.ladderConditions)
// if (ladderConditions.some(e => e.startValue === '' || e.endValue === '' || e.compensationAmount === '' || e.compensationAmount === null || e.compensationAmount === undefined)) return callback(false, `兜底条件${num + 1}:阶梯模式不能为空`)
// ladderConditions.forEach(item => {
// delete item.aError
// delete item.bError
// })
// componentData.ladderConditions = JSON.stringify(ladderConditions)
// }
// return callback(true, componentData)
// } else callback(true, componentData)
// } else callback(false, componentData)
// callback(true, this.componentData)
// })
}, },
disabled(val) { disabled(val) {
return val === '' || val === null || val === undefined return val === '' || val === null || val === undefined
......
...@@ -222,26 +222,44 @@ export default { ...@@ -222,26 +222,44 @@ export default {
if (!message) message = `${label} ${valuesKey[key]}不能为空` if (!message) message = `${label} ${valuesKey[key]}不能为空`
} }
}) })
}
if (item.hasGuarantee == 1) { if (item.hasGuarantee == 1) {
console.log('item.guaranteeConfigs', item.guaranteeConfigs)
if (item.guaranteeConfigs && item.guaranteeConfigs.length) { if (item.guaranteeConfigs && item.guaranteeConfigs.length) {
item.guaranteeConfigs.forEach(i => { item.guaranteeConfigs.forEach((c, num) => {
if (i.guaranteeStandard == null || i.guaranteeIndex == '') { if (c.guaranteeStandard == null || c.guaranteeIndex == '') {
flag = false flag = false
if (!message) message = ` ${label} 兜底条件不能为空` if (!message) message = ` ${label} 兜底条件不能为空`
} else {
if (c.compensationMode != 3) {
if (c.compensationMode == 1 && (c.fixedCompensation === '' || c.fixedCompensation === null || c.fixedCompensation === undefined)) {
flag = false
if (!message) message = `${label} 兜底条件${num + 1} 固定赔付金额不能为空`
}
if (c.compensationMode == 2) {
let ladderConditions = JSON.parse(c.ladderConditions)
if (ladderConditions.some(f => f.startValue === '' || f.endValue === '' || f.compensationAmount === '' || f.compensationAmount === null || f.compensationAmount === undefined)) {
flag = false
if (!message) message = `${label} 兜底条件${num + 1} 阶梯模式不能为空`
}
}
}
} }
}) })
} else item.guaranteeConfigs = [] } else {
flag = false
} else item.guaranteeConfigs = [] if (!message) message = ` ${label} 兜底条件不能为空`
item.guaranteeConfigs = []
} }
} else item.guaranteeConfigs = []
}) })
params.trafficPartyDetails = i.trafficPartyDetails params.trafficPartyDetails = i.trafficPartyDetails
sceneConfigs.push(params) sceneConfigs.push(params)
}) })
console.log(sceneConfigs) console.log(sceneConfigs)
if (flag) callback(true, { sceneConfigs }) if (flag) callback(true, { sceneConfigs })
else callback(false) else callback(false, message)
} } else callback(false)
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!