Commit 3f4072c3 by 张权

数据迁移优化

1 parent fe480935
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="适用类型:" prop="packageCode"> <el-form-item label="适用类型:" prop="packageCode">
<el-select v-model="addDialogForm.packageCode" placeholder="请选择" size="small"> <el-select @change="changePgCode" v-model="addDialogForm.packageCode" placeholder="请选择" size="small">
<el-option v-for="(item, index) in dialogTypeOptions" :key="index" :label="item.label" :value="item.value"></el-option> <el-option v-for="(item, index) in dialogTypeOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -194,9 +194,34 @@ export default { ...@@ -194,9 +194,34 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
changePgCode(e){
let arr = [ {
value: '1',
label: '1年'
},
{
value: '2',
label: '2年'
},
{
value: '3',
label: '3年'
}]
if(e=='PC0005' || e=='PC0007'){
this.dialogYearOptions = [ ...arr, {
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
}]
}else{
this.dialogYearOptions = [...arr]
}
},
//批量下载 //批量下载
download(e) { download(e) {
console.log(e, '111111111111')
this.$apis.addWorryFree.downLoads({ id: e.id }).then(res => { this.$apis.addWorryFree.downLoads({ id: e.id }).then(res => {
let tempaa = utils.getExplorer() let tempaa = utils.getExplorer()
if (tempaa == 'QQ') { if (tempaa == 'QQ') {
......
...@@ -607,6 +607,10 @@ export default { ...@@ -607,6 +607,10 @@ export default {
{ {
confId: 5, confId: 5,
confName: '个人(军官)' confName: '个人(军官)'
},
{
confId: 7,
confName: '外国人'
} }
], ],
cardTypeList: [ cardTypeList: [
...@@ -629,6 +633,10 @@ export default { ...@@ -629,6 +633,10 @@ export default {
{ {
confId: 5, confId: 5,
confName: '军官证' confName: '军官证'
},
{
confId: 7,
confName: '护照'
} }
], ],
servicePeriodList: [ servicePeriodList: [
...@@ -768,14 +776,34 @@ export default { ...@@ -768,14 +776,34 @@ export default {
// 卡号获取期限 // 卡号获取期限
getDateList(seqNo, pack, attr) { getDateList(seqNo, pack, attr) {
this.$apis.beforeSale.dateBycarNo({ seqNo }).then(res => { this.$apis.beforeSale.dateBycarNo({ seqNo }).then(res => {
this.productModal[pack.idName]['service_period'] = `${res.servicePeriod}` if (res != null) {
pack.groupAttributeList.map(el => { if (pack.packageCode == 'PC0007' || pack.packageCode == 'PC0005') {
if (el.attributeName == 'service_period') { this.productList.map(el => {
this.commonPart(res.servicePeriod, pack, el) if (el.packageCode == pack.packageCode) {
el.disabled = true el.groupAttributeList.map(ele => {
return el ele.attributeList.map(item => {
if (item.attributeDesc == '服务期限') {
if (item?.optionList?.length < 4) {
item.optionList.push({ value: '4', label: '4年' })
item.optionList.push({ value: '5', label: '5年' })
} else if (item?.optionList?.length == 4) {
item.optionList.push({ value: '5', label: '5年' })
}
}
})
})
}
})
} }
}) this.productModal[pack.idName]['service_period'] = `${res.servicePeriod}`
pack.groupAttributeList.map(el => {
if (el.attributeName == 'service_period') {
this.commonPart(res.servicePeriod, pack, el)
el.disabled = true
return el
}
})
}
}) })
}, },
// 切换套餐---赋默认值 // 切换套餐---赋默认值
...@@ -1047,7 +1075,15 @@ export default { ...@@ -1047,7 +1075,15 @@ export default {
item.groupAttributeList.map(ele => { item.groupAttributeList.map(ele => {
ele.attributeList.map(e => { ele.attributeList.map(e => {
if ((item.idName == 'stolen' || item.idName == 'car') && e.attributeDesc == '服务期限') { if ((item.idName == 'stolen' || item.idName == 'car') && e.attributeDesc == '服务期限') {
e.optionList = this.baseData.servicePeriodList let serviceArr1 = { value: '4', label: '4年' }
let serviceArr2 = { value: '5', label: '5年' }
if (item.servicePeriod && item.servicePeriod.indexOf('5') > -1) {
e.optionList = [...this.baseData.servicePeriodList, serviceArr1, serviceArr2]
} else if (item.servicePeriod && item.servicePeriod.indexOf('4') > -1) {
e.optionList = [...this.baseData.servicePeriodList, serviceArr1]
} else {
e.optionList = this.baseData.servicePeriodList
}
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
...@@ -1166,8 +1202,8 @@ export default { ...@@ -1166,8 +1202,8 @@ export default {
}) })
}, },
getPackageList() { getPackageList() {
let contractNo = this.routeInfo.contractNo==-1? '': this.routeInfo.contractNo let contractNo = this.routeInfo.contractNo == -1 ? '' : this.routeInfo.contractNo
this.$apis.beforeSale.getPackageListApi({contractNo}).then(res => { this.$apis.beforeSale.getPackageListApi({ contractNo }).then(res => {
this.toTestProductData(res) this.toTestProductData(res)
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!