Commit 27e252c9 by 张立顺

feat 权益下单 新增筛选

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