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 { ...@@ -171,62 +171,58 @@ export default {
color: #333333; 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 { ::v-deep .el-table__body-wrapper {}
display: block;
position: relative; .radio-wrapper {
width: 12px; display: block;
height: 12px; position: relative;
border-radius: 50%; width: 12px;
border: 1px solid #dcdfe6; height: 12px;
cursor: pointer; border-radius: 50%;
transition: all 0.3s; border: 1px solid #dcdfe6;
margin: 0 auto; cursor: pointer;
transition: all 0.3s;
&:hover { margin: 0 auto;
border-color: #2A58AD;
} &:hover {
border-color: #2A58AD;
}
&.is-checked { &.is-checked {
border-color: #2A58AD; border-color: #2A58AD;
.radio { .radio {
display: block; display: block;
&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 8px; width: 8px;
height: 8px; height: 8px;
border-radius: 50%; border-radius: 50%;
background-color: #2A58AD; background-color: #2A58AD;
}
} }
} }
}
&.disabled { &.disabled {
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.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 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!