Commit 27e252c9 by 张立顺

feat 权益下单 新增筛选

1 parent 11e769ae
......@@ -251,7 +251,7 @@
<!-- 改装件信息 -->
<div v-if="(refitFormObj.customFlag && equityRadio == '2') || (refitFormObj.autoFlag && equityRadio == '1') || refitFormObj.showFlag" class="container m-t-10">
<p class="edit-title">改装件信息</p>
<div style="padding: 20px 20px 1px;"><glsx-combi-form ref="refitRef" :isEdit="true" :isInline="false" defaultWidth="320px" :formObj="refitFormObj" :formData="refitFormData" :formRules="refitRules"></glsx-combi-form></div>
<div style="padding: 20px 20px 1px"><glsx-combi-form ref="refitRef" :isEdit="true" :isInline="false" defaultWidth="320px" :formObj="refitFormObj" :formData="refitFormData" :formRules="refitRules"></glsx-combi-form></div>
</div>
<!-- 其他信息 -->
......@@ -286,8 +286,8 @@
<el-tab-pane v-for="item in tabsList" :key="item.name" :label="item.label" :name="item.name"></el-tab-pane>
</el-tabs>
</div>
<secondDialog v-if="secondVisible" :secondVisible="secondVisible" :formRules="editRuleCar" :editForm="editForm" @handleSecondClose="handleSecondClose" @handleSecondOk="handleSecondOk"></secondDialog>
<secondDialog v-if="secondVisible" :secondVisible="secondVisible" :formRules="editRuleCar" :editForm="editForm" @handleSecondClose="handleSecondClose" @handleSecondOk="handleSecondOk"></secondDialog>
</div>
</template>
......@@ -337,7 +337,7 @@ export default {
size: 'small',
submit: false,
isBlock: true,
secondVisible: false,
secondVisible: false,
curDom: 'cardInfo',
tabsList: [
{ label: '车辆信息', name: 'cardInfo' },
......@@ -994,7 +994,7 @@ export default {
qrCode,
uploadInfo,
FormatInput,
secondDialog
secondDialog
},
async created() {
......@@ -1870,7 +1870,7 @@ export default {
if (res?.vehicle?.invoicePrice && this.editForm.orderStatus != 2) {
// 调用详情后先过滤一边定制权益商品
let autoList = this.packageToPrice(res.vehicle.invoicePrice, true) || []
productArrData = autoList.concat(this.productList)
productArrData = autoList.concat(this.productList)
}
this.editForm.packageCode && this.packageAttr(true, productArrData, res)
const spaItem = this.baseData.agreeList.find(item => item.id == this.editForm.specialAppointId)
......@@ -1972,13 +1972,30 @@ export default {
// })
// }
},
packageToCarType(cartype = '') {
if (cartype && this.editForm.orderStatus != 2) {
let _list = []
this.copyCustomProductList.forEach(item => {
// 套餐商品不做过滤
console.log(item, 'copyCustomProductList')
if (item.vehicleSeriesConfigs && item.vehicleSeriesConfigs.some(ele => ele.vehicleSeriesId == cartype)) {
_list.push(item)
} else {
if (this.autoPackageCodeList.includes(item.packageCode)) {
this.changeRaido(false, item, true)
}
}
})
this.customProductList = _list
}
},
packageAttr(recovery = false, productArrData, detailInfo) {
// 2023 7月底版本 改版
let attrList = [],
packCode = []
detailInfo.attributes.forEach(item => {
let targetItem = productArrData.find(k => k.packageCode == item.packageCode)
if(targetItem){
if (targetItem) {
if (targetItem && item.parentId) {
targetItem.parentId = item.parentId
targetItem.parentName = item.parentName
......@@ -2105,7 +2122,6 @@ export default {
this.showUploadInfo = true
}
}
packCode.push(item.packageCode)
const _curProdTarget = this.allProdList.find(el => el.packageCode == item.packageCode)
......@@ -2304,6 +2320,7 @@ export default {
this.$apis.beforeSale.getCarTypeListApi(params).then(res => {
this.baseData.carTypeOptions = res || []
})
this.packageToCarType(this.editForm.vehicle.vehicleSeriesId)
},
// 跳转
whereToGo(id) {
......@@ -2506,20 +2523,20 @@ export default {
}
return isEmpty
},
secondChange() {
this.secondVisible = !this.secondVisible
},
handleSecondClose() {
this.secondChange()
this.submit = false
this.params = {}
},
handleSecondOk(val) {
this.secondChange()
this.editForm.vehicle.vin = val
this.params.vehicle.vin = val
this.api()
},
secondChange() {
this.secondVisible = !this.secondVisible
},
handleSecondClose() {
this.secondChange()
this.submit = false
this.params = {}
},
handleSecondOk(val) {
this.secondChange()
this.editForm.vehicle.vin = val
this.params.vehicle.vin = val
this.api()
},
checkRefitInfo() {
if (this.$refs?.refitRef?.$refs?.formRef) {
this.$refs?.refitRef?.$refs.formRef.validate(valid => {
......@@ -2531,26 +2548,26 @@ export default {
this.handleConfirm()
}
},
api() {
this.$apis.beforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => {
if (res.code == '0') {
this.updateEquity(this.params)
} else {
this.submit = false
this.$confirm(res.message, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.submit = true
this.updateEquity(this.params)
}
api() {
this.$apis.beforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => {
if (res.code == '0') {
this.updateEquity(this.params)
} else {
this.submit = false
this.$confirm(res.message, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.submit = true
this.updateEquity(this.params)
}
})
}
})
},
}
})
}
})
},
handleConfirm() {
try {
this.vaildGlassParams()
......@@ -2613,8 +2630,8 @@ export default {
params.attachmentList = this.attachmentList || []
}
params.attachmentList = params.attachmentList || []
this.params = this.$common.utils.deepClone(params)
this.secondChange()
this.params = this.$common.utils.deepClone(params)
this.secondChange()
} catch (error) {
console.log(error)
this.submit = false
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!