Commit 32d7549d by 杨北旺

门店信息获取

1 parent d2f3dae7
...@@ -697,7 +697,6 @@ export default { ...@@ -697,7 +697,6 @@ export default {
this.getSpeAgreeOptions() this.getSpeAgreeOptions()
this.pickerOptions = this.setDateLimit() this.pickerOptions = this.setDateLimit()
this.pickerOptions2 = this.setDateLimit2() this.pickerOptions2 = this.setDateLimit2()
this.getHotline()
}, },
mounted() { mounted() {
...@@ -715,18 +714,18 @@ export default { ...@@ -715,18 +714,18 @@ export default {
this.getOptionsList('editFormDataOther', false) this.getOptionsList('editFormDataOther', false)
this.disabled && this.setDisabled() this.disabled && this.setDisabled()
this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate', 'merchantName', 'merchantPhone', 'merchantAddress']) this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate', 'merchantName', 'merchantPhone', 'merchantAddress'])
this.getHotline()
}, },
methods: { methods: {
// 查找服务热线 // 查找服务热线
getHotline() { getHotline() {
if (this.routeInfo.addOrEdit == 3) { if (this.routeInfo.addOrEdit == 1) {
return 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() { setDateLimit() {
...@@ -1043,7 +1042,8 @@ export default { ...@@ -1043,7 +1042,8 @@ export default {
}, },
// 处理数据结构对比后台所需的参数 // 处理数据结构对比后台所需的参数
handleProductArrParam(arr, codearr) { handleProductArrParam(arr, codearr) {
let newArr = [],filterList = [] let newArr = [],
filterList = []
const codeList = Array.from(new Set(codearr)) const codeList = Array.from(new Set(codearr))
this.checkCodeList = codeList this.checkCodeList = codeList
let blackArr = [] let blackArr = []
...@@ -1055,10 +1055,10 @@ export default { ...@@ -1055,10 +1055,10 @@ export default {
filterList = this.unique(arr) filterList = this.unique(arr)
} }
arr = filterList arr = filterList
arr.forEach(el=>{ arr.forEach(el => {
arr.forEach(els=>{ arr.forEach(els => {
if(el.packageCode==els.packageCode){ if (el.packageCode == els.packageCode) {
if(el.contractNo){ if (el.contractNo) {
els.contractNo = el.contractNo els.contractNo = el.contractNo
} }
} }
...@@ -1182,11 +1182,11 @@ export default { ...@@ -1182,11 +1182,11 @@ export default {
e.optionList = [...arr] e.optionList = [...arr]
this.serviceObj[item.packageCode] = item.servicePeriod this.serviceObj[item.packageCode] = item.servicePeriod
// this.productModal[item.idName][e.attributeName] = '1' // 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 == '购车类型') { } else if (e.attributeDesc == '购车类型') {
e.optionList = this.baseData.buyCarTypeList e.optionList = this.baseData.buyCarTypeList
// this.productModal[item.idName][e.attributeName] = '0' // 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 == '服务期限') { } 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') { if (item.idName == 'tire' || item.idName == 'crash') {
e.optionList = this.baseData.servicePeriodList e.optionList = this.baseData.servicePeriodList
...@@ -1201,15 +1201,15 @@ export default { ...@@ -1201,15 +1201,15 @@ export default {
e.optionList = this.baseData.servicePeriodList e.optionList = this.baseData.servicePeriodList
} }
// this.productModal[item.idName][e.attributeName] = '1' // 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 == '生效日期') { } else if (e.attributeDesc == '生效日期') {
let nextDay = new Date().getTime() + 24 * 60 * 60 * 1000 let nextDay = new Date().getTime() + 24 * 60 * 60 * 1000
// this.productModal[item.idName][e.attributeName] = utils.dateFormat(nextDay) // 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') { if (item.idName == 'glass') {
let tAdd2 = new Date().getTime() + 24 * 60 * 60 * 1000 * 2 let tAdd2 = new Date().getTime() + 24 * 60 * 60 * 1000 * 2
// this.productModal[item.idName][e.attributeName] = utils.dateFormat(tAdd2) // 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 e.disabled = true
} }
} }
...@@ -1348,7 +1348,7 @@ export default { ...@@ -1348,7 +1348,7 @@ export default {
let targetItem = productArrData.find(k => k.packageCode == item.packageCode) let targetItem = productArrData.find(k => k.packageCode == item.packageCode)
const defalutAttr = this.handleDefaultValue(targetItem, item.attributeDTOList) const defalutAttr = this.handleDefaultValue(targetItem, item.attributeDTOList)
if (defalutAttr.length) { if (defalutAttr.length) {
item.attributeDTOList = [...defalutAttr,...item.attributeDTOList] item.attributeDTOList = [...defalutAttr, ...item.attributeDTOList]
} }
if (targetItem.packageType == 1) { if (targetItem.packageType == 1) {
this.equityRadio = 2 this.equityRadio = 2
...@@ -1371,13 +1371,13 @@ export default { ...@@ -1371,13 +1371,13 @@ export default {
this.customProductList.map(c => { this.customProductList.map(c => {
c.disabled = true c.disabled = true
c.groupAttributeList.map(ele => { 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 ele.disabled = true
} }
if (ele.attributeName == 'card') { if (ele.attributeName == 'card') {
ele.disabled = true ele.disabled = true
} }
if (ele.attributeName == 'effective_date'&&this.routeInfo.addOrEdit==3) { if (ele.attributeName == 'effective_date' && this.routeInfo.addOrEdit == 3) {
ele.disabled = true ele.disabled = true
} }
}) })
...@@ -1419,13 +1419,13 @@ export default { ...@@ -1419,13 +1419,13 @@ export default {
this.productList.map(d => { this.productList.map(d => {
d.disabled = true d.disabled = true
d.groupAttributeList.map(elee => { 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 elee.disabled = true
} }
if (elee.attributeName == 'card') { if (elee.attributeName == 'card') {
elee.disabled = true elee.disabled = true
} }
if (elee.attributeName == 'effective_date'&&this.routeInfo.addOrEdit==3) { if (elee.attributeName == 'effective_date' && this.routeInfo.addOrEdit == 3) {
elee.disabled = true elee.disabled = true
} }
if (elee.attributeName == 'buy_car_type' && elee.attributeValue == 1) { 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!