Commit e78e2d1b by zhangquan

bug修复

1 parent 70799933
...@@ -845,7 +845,20 @@ export default { ...@@ -845,7 +845,20 @@ export default {
this.$set(this.productList[this.vailIndex], 'disabled', true) this.$set(this.productList[this.vailIndex], 'disabled', true)
this.$set(this.productList[this.vailIndex].groupAttributeList[this.vail_sale_price_index], 'disabled', true) this.$set(this.productList[this.vailIndex].groupAttributeList[this.vail_sale_price_index], 'disabled', true)
this.errGlassName = '车辆价格超过50万,无法购买' this.errGlassName = '车辆价格超过50万,无法购买'
if(this.tempAttributeList.length&&this.packageCodeList.length){ this.vaildGlassParams()
} else {
this.errGlassName = ''
if (this.vailIndex !=undefined) this.$set(this.productList[this.vailIndex], 'disabled', false)
if (this.vail_sale_price_index) this.$set(this.productList[this.vailIndex].groupAttributeList[this.vail_sale_price_index], 'disabled', false)
}
} else {
if (this.vailIndex) this.$set(this.productList[this.vailIndex], 'disabled', false)
if (this.vail_sale_price_index) this.$set(this.productList[this.vailIndex].groupAttributeList[this.vail_sale_price_index], 'disabled', false)
}
},
// 轮胎玻璃提单参数处理
vaildGlassParams(){
if(this.equityRadio == 1&&this.tempAttributeList.length&&this.packageCodeList.length){
if( this.packageCodeList.indexOf(this.vailGlassCode)!=-1){ if( this.packageCodeList.indexOf(this.vailGlassCode)!=-1){
let arr1 = [] let arr1 = []
let arr2 = [] let arr2 = []
...@@ -862,28 +875,6 @@ export default { ...@@ -862,28 +875,6 @@ export default {
this.handleProductArrParam(arr1, arr2) this.handleProductArrParam(arr1, arr2)
} }
} }
} else {
this.errGlassName = ''
if (this.vailIndex !=undefined) this.$set(this.productList[this.vailIndex], 'disabled', false)
if (this.vail_sale_price_index) this.$set(this.productList[this.vailIndex].groupAttributeList[this.vail_sale_price_index], 'disabled', false)
}
} else {
if (this.vailIndex) this.$set(this.productList[this.vailIndex], 'disabled', false)
if (this.vail_sale_price_index) this.$set(this.productList[this.vailIndex].groupAttributeList[this.vail_sale_price_index], 'disabled', false)
}
},
// 轮胎玻璃提单参数处理
vaildGlassParams(para){
const index = this.checkCodeList.indexOf(this.vailGlassCode)
if(index!=-1&&this.errGlassName){
for(let key in para){
if(key.indexOf(`attributes[${index}]`)!=-1){
delete para[key]
}
}
return para
}
return para
}, },
// 切换套餐---赋默认值 // 切换套餐---赋默认值
changeCheckBox(e, item, index) { changeCheckBox(e, item, index) {
...@@ -1662,6 +1653,7 @@ export default { ...@@ -1662,6 +1653,7 @@ export default {
}, },
// 草稿 // 草稿
handleDraft() { handleDraft() {
this.vaildGlassParams()
const vaidObj = this.equityRadio == 1 ? this.formatProduct : this.autoFormatProduct const vaidObj = this.equityRadio == 1 ? this.formatProduct : this.autoFormatProduct
if (this.submit) { if (this.submit) {
return true return true
...@@ -1732,6 +1724,7 @@ export default { ...@@ -1732,6 +1724,7 @@ export default {
} }
}, },
handleConfirm() { handleConfirm() {
this.vaildGlassParams()
const vaidObj = this.equityRadio == 1 ? this.formatProduct : this.autoFormatProduct const vaidObj = this.equityRadio == 1 ? this.formatProduct : this.autoFormatProduct
const isEmptyObj = JSON.stringify(vaidObj) == '{}' const isEmptyObj = JSON.stringify(vaidObj) == '{}'
if (isEmptyObj) { if (isEmptyObj) {
...@@ -1778,7 +1771,6 @@ export default { ...@@ -1778,7 +1771,6 @@ export default {
...params, ...params,
...vaidObj ...vaidObj
} }
params = this.vaildGlassParams(params)
this.$apis.beforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => { this.$apis.beforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => {
if (res.code == '0') { if (res.code == '0') {
this.updateEquity(params) this.updateEquity(params)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!