Commit 2b680b7d by 张权

数据迁移第一轮bug修复

1 parent d82a9838
...@@ -228,7 +228,10 @@ export default { ...@@ -228,7 +228,10 @@ export default {
size: 'small', size: 'small',
submit: false, submit: false,
isBlock: true, isBlock: true,
serviceObj: {
PC0005: '',
PC0007: ''
},
footerLeft: '0', footerLeft: '0',
footerWidth: '0', footerWidth: '0',
editCarChildRef: 'editChildRef', editCarChildRef: 'editChildRef',
...@@ -389,13 +392,15 @@ export default { ...@@ -389,13 +392,15 @@ export default {
{ {
required: true, required: true,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
return value ? callback() : callback(new Error('请输入' + (this.editForm.cardType == '1' ? '身份证' : '统一社会信息代码'))) return value ? callback() : callback(new Error('请输入证件号码'))
}, },
trigger: 'change' trigger: 'change'
}, },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
return /[a-zA-Z0-9]{18}/.test(value) ? callback() : callback(new Error('请输入18位数字或字母')) let reg = this.editForm.cardType == 1 || this.editForm.cardType == 2 ? /[a-zA-Z0-9]{18}/.test(value) : /\S\s{0,18}/.test(value)
let tip = this.editForm.cardType == 1 || this.editForm.cardType == 2 ? '请输入18位数字或字母' : '请输入证件号码'
return reg ? callback() : callback(new Error(tip))
}, },
trigger: 'change' trigger: 'change'
} }
...@@ -426,6 +431,7 @@ export default { ...@@ -426,6 +431,7 @@ export default {
this.editForm.cardType = value this.editForm.cardType = value
var idx = this.editFormDataUser.findIndex(item => item.name == 'cardNo') var idx = this.editFormDataUser.findIndex(item => item.name == 'cardNo')
this.editFormDataUser[idx].label = this.baseData.cardTypeList.find(item => item.confId == value).confName this.editFormDataUser[idx].label = this.baseData.cardTypeList.find(item => item.confId == value).confName
this.$refs.editFormRefUser.$refs.editChildRefUser.validateField('cardNo')
} }
}, },
{ {
...@@ -790,13 +796,21 @@ export default { ...@@ -790,13 +796,21 @@ export default {
// } else if (item?.optionList?.length == 4) { // } else if (item?.optionList?.length == 4) {
// item.optionList.push({ value: '5', label: '5年' }) // item.optionList.push({ value: '5', label: '5年' })
// } // }
let optionObj = {
'4': { value: '4', label: '4年' },
'5': { value: '5', label: '5年' }
}
if (res.servicePeriod == '4' || res.servicePeriod == '5') {
const Target = item.optionList.find(item => { const Target = item.optionList.find(item => {
return item.value == `${res.servicePeriod}` return item.value == `${res.servicePeriod}`
}) })
if (!Target) { if (this.serviceObj[el.packageCode].indexOf(res.servicePeriod) == -1) {
tip = true tip = true
} }
console.log(Target, 78978979) if (!Target) {
item.optionList.push(optionObj[res.servicePeriod + ''])
}
}
} }
}) })
}) })
...@@ -805,9 +819,10 @@ export default { ...@@ -805,9 +819,10 @@ export default {
} }
if (tip) { if (tip) {
this.productModal[pack.idName]['service_period'] = '' this.productModal[pack.idName]['service_period'] = ''
return this.$message.error('该卡号服务年限暂未配置,请联系运营平台人员') this.$message.error('该卡号服务年限暂未配置,请联系运营平台人员')
} } else {
this.productModal[pack.idName]['service_period'] = `${res.servicePeriod}` this.productModal[pack.idName]['service_period'] = `${res.servicePeriod}`
}
pack.groupAttributeList.map(el => { pack.groupAttributeList.map(el => {
if (el.attributeName == 'service_period') { if (el.attributeName == 'service_period') {
this.commonPart(res.servicePeriod, pack, el) this.commonPart(res.servicePeriod, pack, el)
...@@ -1088,19 +1103,25 @@ export default { ...@@ -1088,19 +1103,25 @@ export default {
if ((item.idName == 'stolen' || item.idName == 'car') && e.attributeDesc == '服务期限') { if ((item.idName == 'stolen' || item.idName == 'car') && e.attributeDesc == '服务期限') {
let serviceArr1 = { value: '4', label: '4年' } let serviceArr1 = { value: '4', label: '4年' }
let serviceArr2 = { value: '5', label: '5年' } let serviceArr2 = { value: '5', label: '5年' }
let arr = [...this.baseData.servicePeriodList]
if (item.servicePeriod && item.servicePeriod.indexOf('4') > -1) {
arr.push(serviceArr1)
}
if (item.servicePeriod && item.servicePeriod.indexOf('5') > -1) { if (item.servicePeriod && item.servicePeriod.indexOf('5') > -1) {
e.optionList = [...this.baseData.servicePeriodList, serviceArr1, serviceArr2] arr.push(serviceArr2)
} else if (item.servicePeriod && item.servicePeriod.indexOf('4') > -1) {
e.optionList = [...this.baseData.servicePeriodList, serviceArr1]
} else {
e.optionList = this.baseData.servicePeriodList
} }
e.optionList = [...arr]
this.serviceObj[item.packageCode] = item.servicePeriod
this.productModal[item.idName][e.attributeName] = '1' this.productModal[item.idName][e.attributeName] = '1'
} else if (e.attributeDesc == '购车类型') { } else if (e.attributeDesc == '购车类型') {
e.optionList = this.baseData.buyCarTypeList e.optionList = this.baseData.buyCarTypeList
this.productModal[item.idName][e.attributeName] = '0' this.productModal[item.idName][e.attributeName] = '0'
} else if ((item.idName == 'tire' || item.idName == 'crash' || item.idName == 'vip') && e.attributeDesc == '服务期限') { } else if ((item.idName == 'tire' || item.idName == 'crash' || item.idName == 'vip') && e.attributeDesc == '服务期限') {
if (item.idName == 'tire' || item.idName == 'crash') {
e.optionList = this.baseData.servicePeriodList
} else {
e.optionList = this.baseData.servicePeriodList2 e.optionList = this.baseData.servicePeriodList2
}
this.productModal[item.idName][e.attributeName] = '1' this.productModal[item.idName][e.attributeName] = '1'
e.disabled = true e.disabled = true
} else if (e.attributeDesc == '生效日期') { } else if (e.attributeDesc == '生效日期') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!