Commit ba0bb9ae by zhangquan

修复bug

1 parent c488188b
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<!-- 自选权益 --> <!-- 自选权益 -->
<div v-if="equityRadio == '1'" class="auto_widget"> <div v-if="equityRadio == '1'" class="auto_widget">
<el-checkbox-group v-model="curSelectPro" :disabled="disabled || dataSourceDisable"> <el-checkbox-group v-model="curSelectPro" :disabled="disabled || (dataSourceDisable && curSelectPro.length)">
<div v-for="(item, index) in productList" :key="index" class="product_wrapper"> <div v-for="(item, index) in productList" :key="index" class="product_wrapper">
<div> <div>
<!-- <el-checkbox @change="changeCheckBox($event, item, index)" :disabled="item.disabled" :label="errGlassName&&item.idName=='glass'?item.packageName+`(${errGlassName})`:item.packageName"> --> <!-- <el-checkbox @change="changeCheckBox($event, item, index)" :disabled="item.disabled" :label="errGlassName&&item.idName=='glass'?item.packageName+`(${errGlassName})`:item.packageName"> -->
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
<!-- 定制权益 --> <!-- 定制权益 -->
<div v-if="equityRadio == '2'" class="auto_widget"> <div v-if="equityRadio == '2'" class="auto_widget">
<el-checkbox-group v-model="curSelectCustomPro" :disabled="disabled || dataSourceDisable"> <el-checkbox-group v-model="curSelectCustomPro" :disabled="disabled || (dataSourceDisable && curSelectCustomPro.length)">
<div v-for="(item, index) in customProductList" :key="index" class="product_wrapper"> <div v-for="(item, index) in customProductList" :key="index" class="product_wrapper">
<div> <div>
<el-checkbox @change="changeRaido($event, item)" :label="item.packageCode" :disabled="item.disabled"> <el-checkbox @change="changeRaido($event, item)" :label="item.packageCode" :disabled="item.disabled">
...@@ -1715,6 +1715,9 @@ export default { ...@@ -1715,6 +1715,9 @@ export default {
this.editForm.effectiveDate = new Date(new Date().setDate(new Date().getDate() + 1)) this.editForm.effectiveDate = new Date(new Date().setDate(new Date().getDate() + 1))
} }
this.dataSourceDisable = res.dataSource == 'car' this.dataSourceDisable = res.dataSource == 'car'
if (res?.vehicle?.invoicePrice && this.editForm.orderStatus != 2) {
productArrData = this.packageToPrice(res.vehicle.invoicePrice, true)
}
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)
if (spaItem) { if (spaItem) {
...@@ -1772,8 +1775,8 @@ export default { ...@@ -1772,8 +1775,8 @@ export default {
}) })
}, },
// 改建议价,实际销售价 // 改建议价,实际销售价
packageToPrice(e) { packageToPrice(e, formDetail) {
let _price = e?.target?.value || '' let _price = formDetail ? e : e?.target?.value || ''
if (_price && this.editForm.orderStatus != 2) { if (_price && this.editForm.orderStatus != 2) {
let _list = [] let _list = []
this.copyCustomProductList.forEach(item => { this.copyCustomProductList.forEach(item => {
...@@ -1784,6 +1787,7 @@ export default { ...@@ -1784,6 +1787,7 @@ export default {
this.changeRaido(false, item, true) this.changeRaido(false, item, true)
} }
} }
if (formDetail) return _list
}) })
this.customProductList = _list this.customProductList = _list
} }
...@@ -1806,6 +1810,7 @@ export default { ...@@ -1806,6 +1810,7 @@ export default {
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 && item.parentId) { if (targetItem && item.parentId) {
targetItem.parentId = item.parentId targetItem.parentId = item.parentId
targetItem.parentName = item.parentName targetItem.parentName = item.parentName
...@@ -1931,6 +1936,8 @@ export default { ...@@ -1931,6 +1936,8 @@ export default {
if (targetItem.printType == 2) { if (targetItem.printType == 2) {
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)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!