Commit 32d7549d by 杨北旺

门店信息获取

1 parent d2f3dae7
......@@ -697,7 +697,6 @@ export default {
this.getSpeAgreeOptions()
this.pickerOptions = this.setDateLimit()
this.pickerOptions2 = this.setDateLimit2()
this.getHotline()
},
mounted() {
......@@ -715,18 +714,18 @@ export default {
this.getOptionsList('editFormDataOther', false)
this.disabled && this.setDisabled()
this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate', 'merchantName', 'merchantPhone', 'merchantAddress'])
this.getHotline()
},
methods: {
// 查找服务热线
getHotline() {
if (this.routeInfo.addOrEdit == 3) {
return
if (this.routeInfo.addOrEdit == 1) {
this.$apis.beforeSale.getHotlineApi({}).then(res => {
this.hotline = res.serviceHotline
this.getStoreInfo()
})
}
this.$apis.beforeSale.getHotlineApi({}).then(res => {
this.hotline = res.serviceHotline
this.getStoreInfo()
})
},
// 设置日期组件时间范围---今天之后
setDateLimit() {
......@@ -1043,7 +1042,8 @@ export default {
},
// 处理数据结构对比后台所需的参数
handleProductArrParam(arr, codearr) {
let newArr = [],filterList = []
let newArr = [],
filterList = []
const codeList = Array.from(new Set(codearr))
this.checkCodeList = codeList
let blackArr = []
......@@ -1055,10 +1055,10 @@ export default {
filterList = this.unique(arr)
}
arr = filterList
arr.forEach(el=>{
arr.forEach(els=>{
if(el.packageCode==els.packageCode){
if(el.contractNo){
arr.forEach(el => {
arr.forEach(els => {
if (el.packageCode == els.packageCode) {
if (el.contractNo) {
els.contractNo = el.contractNo
}
}
......@@ -1182,11 +1182,11 @@ export default {
e.optionList = [...arr]
this.serviceObj[item.packageCode] = item.servicePeriod
// this.productModal[item.idName][e.attributeName] = '1'
this.$set(this.productModal[item.idName],`${e.attributeName}`,'1')
this.$set(this.productModal[item.idName], `${e.attributeName}`, '1')
} else if (e.attributeDesc == '购车类型') {
e.optionList = this.baseData.buyCarTypeList
// this.productModal[item.idName][e.attributeName] = '0'
this.$set(this.productModal[item.idName],`${e.attributeName}`,'0')
this.$set(this.productModal[item.idName], `${e.attributeName}`, '0')
} else if ((item.idName == 'tire' || item.idName == 'crash' || item.idName == `vip${item.packageCode}` || item.idName == 'glass') && e.attributeDesc == '服务期限') {
if (item.idName == 'tire' || item.idName == 'crash') {
e.optionList = this.baseData.servicePeriodList
......@@ -1201,15 +1201,15 @@ export default {
e.optionList = this.baseData.servicePeriodList
}
// this.productModal[item.idName][e.attributeName] = '1'
this.$set(this.productModal[item.idName],`${e.attributeName}`,'1')
this.$set(this.productModal[item.idName], `${e.attributeName}`, '1')
} else if (e.attributeDesc == '生效日期') {
let nextDay = new Date().getTime() + 24 * 60 * 60 * 1000
// this.productModal[item.idName][e.attributeName] = utils.dateFormat(nextDay)
this.$set(this.productModal[item.idName],`${e.attributeName}`,utils.dateFormat(nextDay))
this.$set(this.productModal[item.idName], `${e.attributeName}`, utils.dateFormat(nextDay))
if (item.idName == 'glass') {
let tAdd2 = new Date().getTime() + 24 * 60 * 60 * 1000 * 2
// this.productModal[item.idName][e.attributeName] = utils.dateFormat(tAdd2)
this.$set(this.productModal[item.idName],`${e.attributeName}`,utils.dateFormat(tAdd2))
this.$set(this.productModal[item.idName], `${e.attributeName}`, utils.dateFormat(tAdd2))
e.disabled = true
}
}
......@@ -1348,7 +1348,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 = [...defalutAttr, ...item.attributeDTOList]
}
if (targetItem.packageType == 1) {
this.equityRadio = 2
......@@ -1371,13 +1371,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 > 2) {
ele.disabled = true
}
if (ele.attributeName == 'card') {
ele.disabled = true
}
if (ele.attributeName == 'effective_date'&&this.routeInfo.addOrEdit==3) {
if (ele.attributeName == 'effective_date' && this.routeInfo.addOrEdit == 3) {
ele.disabled = true
}
})
......@@ -1419,13 +1419,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 > 2) {
elee.disabled = true
}
if (elee.attributeName == 'card') {
elee.disabled = true
}
if (elee.attributeName == 'effective_date'&&this.routeInfo.addOrEdit==3) {
if (elee.attributeName == 'effective_date' && this.routeInfo.addOrEdit == 3) {
elee.disabled = true
}
if (elee.attributeName == 'buy_car_type' && elee.attributeValue == 1) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!