Commit d850bdac by 李伟康

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

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

See merge request !861
2 parents 1492e5c4 388c653e
......@@ -171,62 +171,58 @@ export default {
color: #333333;
}
.el-table__body-wrapper {
.el-table--medium {
td {
padding: 18px 0 !important;
}
}
}
.el-table__header-wrapper {
th {
}
font-weight: bold;
}
.el-table__header-wrapper {
th {
font-weight: bold;
}
}
}
.radio-wrapper {
display: block;
position: relative;
width: 12px;
height: 12px;
border-radius: 50%;
border: 1px solid #dcdfe6;
cursor: pointer;
transition: all 0.3s;
margin: 0 auto;
&:hover {
border-color: #2A58AD;
}
::v-deep .el-table__body-wrapper {}
.radio-wrapper {
display: block;
position: relative;
width: 12px;
height: 12px;
border-radius: 50%;
border: 1px solid #dcdfe6;
cursor: pointer;
transition: all 0.3s;
margin: 0 auto;
&:hover {
border-color: #2A58AD;
}
&.is-checked {
border-color: #2A58AD;
.radio {
display: block;
&::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #2A58AD;
}
&.is-checked {
border-color: #2A58AD;
.radio {
display: block;
&::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #2A58AD;
}
}
}
&.disabled {
opacity: 0.6;
cursor: not-allowed;
}
&.disabled {
opacity: 0.6;
cursor: not-allowed;
}
}
</style>
\ No newline at end of file
......@@ -318,27 +318,6 @@ export default {
componentData.ladderConditions = JSON.stringify(data)
}
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) {
return val === '' || val === null || val === undefined
......
......@@ -222,26 +222,44 @@ export default {
if (!message) message = `${label} ${valuesKey[key]}不能为空`
}
})
if (item.hasGuarantee == 1) {
if (item.guaranteeConfigs && item.guaranteeConfigs.length) {
item.guaranteeConfigs.forEach(i => {
if (i.guaranteeStandard == null || i.guaranteeIndex == '') {
flag = false
if (!message) message = ` ${label} 兜底条件不能为空`
}
})
} else item.guaranteeConfigs = []
} else item.guaranteeConfigs = []
}
if (item.hasGuarantee == 1) {
console.log('item.guaranteeConfigs', item.guaranteeConfigs)
if (item.guaranteeConfigs && item.guaranteeConfigs.length) {
item.guaranteeConfigs.forEach((c, num) => {
if (c.guaranteeStandard == null || c.guaranteeIndex == '') {
flag = false
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 {
flag = false
if (!message) message = ` ${label} 兜底条件不能为空`
item.guaranteeConfigs = []
}
} else item.guaranteeConfigs = []
})
params.trafficPartyDetails = i.trafficPartyDetails
sceneConfigs.push(params)
})
console.log(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!