Commit 061278ac by 杨北旺

修复线上问题&提单修改权限优化

1 parent 41585f26
......@@ -713,7 +713,7 @@ export default {
this.getOptionsList('editFormDataUser', false)
this.getOptionsList('editFormDataOther', false)
this.disabled && this.setDisabled()
this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate', 'merchantName', 'merchantPhone', 'merchantAddress'])
this.successDisable && this.setDisabled(['packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate', 'merchantName', 'merchantPhone', 'merchantAddress'])
this.getHotline()
},
......@@ -1194,6 +1194,9 @@ export default {
e.optionList = this.baseData.servicePeriodList2
}
e.disabled = true
if(this.routeInfo.addOrEdit==3){
e.disabled = false
}
// v3.1.2--新版的定制权益-服务期限--改为1,2,3年---旧版的依然是一年
let isOld = item.packageName.includes('尊享版') || item.packageName.includes('舒享版') || item.packageName.includes('优享版')
if (item.idName == `vip${item.packageCode}` && !isOld) {
......@@ -1348,7 +1351,7 @@ export default {
let targetItem = productArrData.find(k => k.packageCode == item.packageCode)
const defalutAttr = this.handleDefaultValue(targetItem, item.attributeDTOList)
if (defalutAttr.length) {
item.attributeDTOList = [...defalutAttr, ...item.attributeDTOList]
item.attributeDTOList = this.handlerAttrSetValue(this.unique(defalutAttr), item.attributeDTOList)
}
if (targetItem.packageType == 1) {
this.equityRadio = 2
......@@ -1371,13 +1374,13 @@ export default {
this.customProductList.map(c => {
c.disabled = true
c.groupAttributeList.map(ele => {
if (ele.attributeName == 'service_period' && this.routeInfo.addOrEdit > 2) {
if (ele.attributeName == 'service_period' && this.routeInfo.addOrEdit == 4) {
ele.disabled = true
}
if (ele.attributeName == 'card') {
if (ele.attributeName == 'card'&& this.routeInfo.addOrEdit == 4) {
ele.disabled = true
}
if (ele.attributeName == 'effective_date' && this.routeInfo.addOrEdit == 3) {
if (ele.attributeName == 'effective_date' && this.routeInfo.addOrEdit == 4) {
ele.disabled = true
}
})
......@@ -1419,13 +1422,13 @@ export default {
this.productList.map(d => {
d.disabled = true
d.groupAttributeList.map(elee => {
if (elee.attributeName == 'service_period' && this.routeInfo.addOrEdit > 2) {
if (elee.attributeName == 'service_period' && this.routeInfo.addOrEdit == 4) {
elee.disabled = true
}
if (elee.attributeName == 'card') {
if (elee.attributeName == 'card'&& this.routeInfo.addOrEdit == 4) {
elee.disabled = true
}
if (elee.attributeName == 'effective_date' && this.routeInfo.addOrEdit == 3) {
if (elee.attributeName == 'effective_date' && this.routeInfo.addOrEdit == 4) {
elee.disabled = true
}
if (elee.attributeName == 'buy_car_type' && elee.attributeValue == 1) {
......@@ -1509,6 +1512,24 @@ export default {
this.$set(this.editFormPro, hashObj[item.attributeName] != 1 ? item.attributeName + item.sort : item.attributeName, item.attributeValue)
})
},
// 处理详情属性值赋值
handlerAttrSetValue(defaultList, targetList) {
let arr = [],
nameList = [],
result = []
targetList.forEach(el => {
nameList.push(el.attributeName)
})
defaultList.forEach(el => {
if (nameList.includes(el.attributeName)) {
// console.log(el)
} else {
arr.push(el)
}
})
result = [...arr, ...targetList]
return result
},
// 处理默认值赋值
handleDefaultValue(targetItem, attributeDTOList) {
const currentPackageValue = this.productModal[targetItem.idName]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!