Commit 3b8d4185 by 前端

Merge branch 'SAAS+V4.49.0-0121' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.49.0-0121
2 parents 0acc1191 62617590
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
按子订单产值累计 按子订单产值累计
<el-form-item :prop="`customerList[${scope.$index}].calculateValue`" :rules="rules.calculateValue"> <el-form-item :prop="`customerList[${scope.$index}].calculateValue`" :rules="rules.customerCalculateValue">
<el-input class="rate_input" @input="handleInput($event, 'calculateValue', scope, true)" v-model="scope.row['calculateValue']" placeholder="请输入"> <el-input class="rate_input" @input="handleInput($event, 'calculateValue', scope, true)" v-model="scope.row['calculateValue']" placeholder="请输入">
<span slot="suffix" class="suffix_text">%</span> <span slot="suffix" class="suffix_text">%</span>
</el-input> </el-input>
...@@ -158,6 +158,20 @@ export default { ...@@ -158,6 +158,20 @@ export default {
} }
}, },
data() { data() {
var outputCommissionRatioValidator = (rule, value, callback) => {
if (+value <= 0) {
callback(new Error('输入值应大于0'))
} else {
callback
}
}
var customerCalculateValueValidator = (rule, value, callback) => {
if (+value <= 0) {
callback(new Error('输入值应大于0'))
} else {
callback()
}
}
return { return {
levelData: [], levelData: [],
rules: { rules: {
...@@ -171,7 +185,8 @@ export default { ...@@ -171,7 +185,8 @@ export default {
{ required: true, message: '请输入比例', trigger: 'blur' } { required: true, message: '请输入比例', trigger: 'blur' }
], ],
outputCommissionRatio: [ outputCommissionRatio: [
{ required: true, message: '请输入比例', trigger: 'blur' } { required: true, message: '请输入比例', trigger: 'blur' },
{ validator: outputCommissionRatioValidator, trigger: 'blur' }
], ],
calculateValue: [ calculateValue: [
{ required: true, message: '请输入比例', trigger: 'blur' } { required: true, message: '请输入比例', trigger: 'blur' }
...@@ -184,6 +199,10 @@ export default { ...@@ -184,6 +199,10 @@ export default {
], ],
conditionEndValue: [ conditionEndValue: [
{ required: true, message: '请输入比例', trigger: 'blur' } { required: true, message: '请输入比例', trigger: 'blur' }
],
customerCalculateValue: [
{ required: true, message: '请输入比例', trigger: 'blur' },
{ validator: customerCalculateValueValidator, trigger: 'blur' }
] ]
}, },
selfBuildGoodsType: baseConfig.selfBuildGoodsType || '', // 服务商自建类目值 selfBuildGoodsType: baseConfig.selfBuildGoodsType || '', // 服务商自建类目值
...@@ -390,7 +409,7 @@ export default { ...@@ -390,7 +409,7 @@ export default {
let oldValue = `${this.levelData[_index].configInfo[listKey][index]['old' + key]}` let oldValue = `${this.levelData[_index].configInfo[listKey][index]['old' + key]}`
let maxLength = key == 'calculateValue' && !decimalFlag ? 2 : 3 let maxLength = key == 'calculateValue' && !decimalFlag ? 2 : 3
let maxValue = key == 'calculateValue' && !decimalFlag ? 10 : 100 let maxValue = key == 'calculateValue' && !decimalFlag ? 10 : 100
this.$set(this.levelData[_index].configInfo[listKey][index], key, limitPrice(e, oldValue, maxLength, (key == 'calculateValue' || decimalFlag) ? 2 : 0, 0, maxValue)) this.$set(this.levelData[_index].configInfo[listKey][index], key, limitPrice(e, oldValue, maxLength, (key == 'calculateValue' || key == 'outputCommissionRatio' || decimalFlag) ? 2 : 0, 0, maxValue))
this.$set(this.levelData[_index].configInfo[listKey][index], 'old' + key, this.levelData[_index].configInfo[listKey][index][key]) this.$set(this.levelData[_index].configInfo[listKey][index], 'old' + key, this.levelData[_index].configInfo[listKey][index][key])
}, },
copyConfig() { copyConfig() {
......
...@@ -490,7 +490,7 @@ export default { ...@@ -490,7 +490,7 @@ export default {
if (type == 'campus') { // 校招 if (type == 'campus') { // 校招
return res?.campusList.map(v => ({ return res?.campusList.map(v => ({
jobType: v.jobType, jobType: v.jobType,
performanceType: 1, performanceType: 1, // 绩效类型(1:渗透率,2:高产值,3:成交率,4:均客单,5:售后提成)
startValue: v.startValue, startValue: v.startValue,
endValue: v.endValue, endValue: v.endValue,
calculateValue: v.calculateValue, calculateValue: v.calculateValue,
...@@ -506,7 +506,7 @@ export default { ...@@ -506,7 +506,7 @@ export default {
items?.forEach(v => { items?.forEach(v => {
configItemList.push({ configItemList.push({
jobType: item.jobType, jobType: item.jobType,
performanceType: performanceType, performanceType: performanceType, // 绩效类型(1:渗透率,2:高产值,3:成交率,4:均客单,5:售后提成)
startValue: v.startValue, startValue: v.startValue,
endValue: v.endValue, endValue: v.endValue,
calculateValue: v.calculateValue, calculateValue: v.calculateValue,
...@@ -528,10 +528,29 @@ export default { ...@@ -528,10 +528,29 @@ export default {
res?.forEach(item => { res?.forEach(item => {
item?.performanceInfo?.forEach(it => { item?.performanceInfo?.forEach(it => {
it?.configInfo?.campusList?.forEach(v => { it?.configInfo?.campusList?.forEach(v => {
const conditionFields = v.conditionFlag ? {
conditionGoodsType: v.conditionGoodsType,
conditionGoodsTypeName: v.conditionGoodsTypeName,
conditionSecondaryGoodsType: v.conditionSecondaryGoodsType,
conditionSecondaryGoodsTypeName: v.conditionSecondaryGoodsTypeName,
conditionThirdLevelGoodsType: v.conditionThirdLevelGoodsType,
conditionThirdLevelGoodsTypeName: v.conditionThirdLevelGoodsTypeName,
conditionStartValue: v.conditionStartValue,
conditionEndValue: v.conditionEndValue
} : {
conditionGoodsType: '',
conditionGoodsTypeName: '',
conditionSecondaryGoodsType: '',
conditionSecondaryGoodsTypeName: '',
conditionThirdLevelGoodsType: '',
conditionThirdLevelGoodsTypeName: '',
conditionStartValue: '',
conditionEndValue: ''
}
configItemList.push({ configItemList.push({
jobType: it.jobType, jobType: it.jobType,
configCarType: item.carType, configCarType: item.carType,
performanceType: 1, performanceType: 1, // 绩效类型(1:渗透率,2:高产值,3:成交率,4:均客单,5:售后提成)
goodsType: v.goodsType, goodsType: v.goodsType,
goodsTypeName: v.goodsTypeName, goodsTypeName: v.goodsTypeName,
secondaryGoodsType: v.secondaryGoodsType, secondaryGoodsType: v.secondaryGoodsType,
...@@ -542,14 +561,7 @@ export default { ...@@ -542,14 +561,7 @@ export default {
endValue: v.endValue, endValue: v.endValue,
outputCommissionRatio: v.outputCommissionRatio, outputCommissionRatio: v.outputCommissionRatio,
calculateValue: v.calculateValue, calculateValue: v.calculateValue,
conditionGoodsType: v.conditionGoodsType, ...conditionFields
conditionGoodsTypeName: v.conditionGoodsTypeName,
conditionSecondaryGoodsType: v.conditionSecondaryGoodsType,
conditionSecondaryGoodsTypeName: v.conditionSecondaryGoodsTypeName,
conditionThirdLevelGoodsType: v.conditionThirdLevelGoodsType,
conditionThirdLevelGoodsTypeName: v.conditionThirdLevelGoodsTypeName,
conditionStartValue: v.conditionStartValue,
conditionEndValue: v.conditionEndValue
}) })
}) })
}) })
...@@ -567,7 +579,7 @@ export default { ...@@ -567,7 +579,7 @@ export default {
secondaryGoodsTypeName: v.secondaryGoodsTypeName, secondaryGoodsTypeName: v.secondaryGoodsTypeName,
thirdLevelGoodsType: v.thirdLevelGoodsType, thirdLevelGoodsType: v.thirdLevelGoodsType,
thirdLevelGoodsTypeName: v.thirdLevelGoodsTypeName, thirdLevelGoodsTypeName: v.thirdLevelGoodsTypeName,
performanceType: 5, performanceType: 5, // 绩效类型(1:渗透率,2:高产值,3:成交率,4:均客单,5:售后提成)
startValue: v.startValue, startValue: v.startValue,
endValue: v.endValue, endValue: v.endValue,
calculateValue: v.calculateValue calculateValue: v.calculateValue
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!