Commit dd4fcae0 by 杨北旺

售前权益

1 parent 94e39a70
...@@ -330,7 +330,17 @@ const spaAgressData = params => { ...@@ -330,7 +330,17 @@ const spaAgressData = params => {
// 店铺信息 // 店铺信息
const merchantInfo = params => { const merchantInfo = params => {
params.method = 'scrm.api.equity.common.merchant.detail.det' params.method = 'scrm.api.equity.common.merchant.detail.det'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
})
}
// 卡号---获取期限
const dateBycarNo = params => {
params.method = 'scrm.api.equity.service.cfc.get.by.seqno'
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
...@@ -340,4 +350,4 @@ const merchantInfo = params => { ...@@ -340,4 +350,4 @@ const merchantInfo = params => {
} }
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo }
\ No newline at end of file \ No newline at end of file
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo }
\ No newline at end of file \ No newline at end of file
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
</div> </div>
<div class="arrt_pannel"> <div class="arrt_pannel">
<template v-if="attr.attributeType == 'input'"> <template v-if="attr.attributeType == 'input'">
<el-input class="arrt_pannel" :disabled="disabled" @input="getCurChangeInput($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" size="small" :maxlength="attr.maxLength" clearable :placeholder="'请输入' + attr.attributeDesc"></el-input> <el-input class="arrt_pannel" :disabled="disabled || attr.disabled" @input="getCurChangeInput($event, item, attr, index, attrindex)" v-model="productModal[item.idName][attr.attributeName]" size="small" :maxlength="attr.maxLength" clearable :placeholder="'请输入' + attr.attributeDesc"></el-input>
</template> </template>
<template v-if="attr.attributeType == 'select'"> <template v-if="attr.attributeType == 'select'">
<el-select class="arrt_pannel" :disabled="disabled" size="small" @change="getCurChangeSelect($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" clearable :placeholder="'请选择' + attr.attributeDesc"> <el-select class="arrt_pannel" :disabled="disabled || attr.disabled" size="small" @change="getCurChangeSelect($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" clearable :placeholder="'请选择' + attr.attributeDesc">
<el-option v-for="option in attr.optionList" :key="option.value" :label="option.label" :value="option.value"></el-option> <el-option v-for="option in attr.optionList" :key="option.value" :label="option.label" :value="option.value"></el-option>
</el-select> </el-select>
</template> </template>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<el-radio-group v-model="curSelectCustomPro" :disabled="disabled"> <el-radio-group v-model="curSelectCustomPro" :disabled="disabled">
<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 style="padding-left: 73px"> <div style="padding-left: 73px">
<el-radio @change="changeRaido($event,item)" :disabled="item.disabled" :label="item.packageName"></el-radio> <el-radio @change="changeRaido($event, item)" :disabled="item.disabled" :label="item.packageName"></el-radio>
<p class="h20_title product_intro">包括服务项目:{{ item.serviceItems }}</p> <p class="h20_title product_intro">包括服务项目:{{ item.serviceItems }}</p>
</div> </div>
<div v-if="curSelectCustomPro == item.packageName" :key="indexs" class="child_wrap"> <div v-if="curSelectCustomPro == item.packageName" :key="indexs" class="child_wrap">
...@@ -522,7 +522,7 @@ export default { ...@@ -522,7 +522,7 @@ export default {
label: '约定内容', label: '约定内容',
name: 'specialAppoint', name: 'specialAppoint',
type: 'input', type: 'input',
inputType: 'textarea', inputType: 'textarea'
} }
], ],
// 店面信息 // 店面信息
...@@ -631,6 +631,14 @@ export default { ...@@ -631,6 +631,14 @@ export default {
{ {
value: '1', value: '1',
label: '1年' label: '1年'
},
{
value: '2',
label: '2年'
},
{
value: '3',
label: '3年'
} }
], ],
carBrandOptions: [], carBrandOptions: [],
...@@ -762,6 +770,19 @@ export default { ...@@ -762,6 +770,19 @@ export default {
}, },
methods: { methods: {
// 卡号获取期限
getDateList(seqNo, pack, attr) {
this.$apis.beforeSale.dateBycarNo({ seqNo }).then(res => {
this.productModal[pack.idName]['service_period'] = `${res.servicePeriod}`
pack.groupAttributeList.map(el => {
if (el.attributeName == 'service_period') {
this.commonPart(res.servicePeriod, pack, el)
el.disabled = true
return el
}
})
})
},
// 切换套餐---赋默认值 // 切换套餐---赋默认值
changeCheckBox(e, item) { changeCheckBox(e, item) {
if (e) { if (e) {
...@@ -776,23 +797,9 @@ export default { ...@@ -776,23 +797,9 @@ export default {
} }
}) })
} }
}else{ } else {
this.checkCodeList = this.checkCodeList.filter(t => t != item.packageCode) this.checkCodeList = this.checkCodeList.filter(t => t != item.packageCode)
this.packageCodeList = this.packageCodeList.filter(t => t != item.packageCode) this.packageCodeList = this.packageCodeList.filter(t => t != item.packageCode)
// let arr1 = []
// let arr2 = []
// this.checkCodeList.forEach(ele=>{
// if(ele!=item.packageCode){
// arr1.push(ele)
// }
// })
// this.packageCodeList.forEach(ele=>{
// if(ele!=item.packageCode){
// arr2.push(ele)
// }
// })
// this.checkCodeList = arr1
// this.packageCodeList = arr2
for (let key in this.productModal[item.idName]) { for (let key in this.productModal[item.idName]) {
item.groupAttributeList.forEach(attr => { item.groupAttributeList.forEach(attr => {
if (attr.attributeName == key) { if (attr.attributeName == key) {
...@@ -802,8 +809,8 @@ export default { ...@@ -802,8 +809,8 @@ export default {
} }
} }
}, },
changeRaido(e,item){ changeRaido(e, item) {
if (e) { if (e) {
this.checkCodeList = [] this.checkCodeList = []
this.autoPackageCodeList = [] this.autoPackageCodeList = []
this.checkCodeList.push(item.packageCode) this.checkCodeList.push(item.packageCode)
...@@ -847,7 +854,7 @@ export default { ...@@ -847,7 +854,7 @@ export default {
this.commonPart(e, pack, attr) this.commonPart(e, pack, attr)
}, },
// 自选权益产品套餐处理参数---输入框 // 自选权益产品套餐处理参数---输入框
getCurChangeInput(e, pack, attr) { getCurChangeInput(e, pack, attr, faIndex, childIndex) {
if (!e) { if (!e) {
return return
} }
...@@ -859,6 +866,15 @@ export default { ...@@ -859,6 +866,15 @@ export default {
return return
} }
} }
if (attr.attributeName == 'card') {
this.productList[faIndex].groupAttributeList.map(el => {
if (el.attributeName == 'service_period') {
el.disabled = true
return el
}
})
this.getDateList(e, pack, attr)
}
this.commonPart(e, pack, attr) this.commonPart(e, pack, attr)
}, },
// 公共部分 // 公共部分
...@@ -956,7 +972,6 @@ export default { ...@@ -956,7 +972,6 @@ export default {
concactArr.forEach(item => { concactArr.forEach(item => {
this.formatProduct = Object.assign(this.formatProduct, item) this.formatProduct = Object.assign(this.formatProduct, item)
}) })
console.log(this.formatProduct,'********');
} else { } else {
concactArr.forEach(item => { concactArr.forEach(item => {
this.autoFormatProduct = Object.assign(this.autoFormatProduct, item) this.autoFormatProduct = Object.assign(this.autoFormatProduct, item)
...@@ -1168,8 +1183,17 @@ export default { ...@@ -1168,8 +1183,17 @@ export default {
this.productList.map(item => { this.productList.map(item => {
if (item.packageCode != this.editForm.packageCode) { if (item.packageCode != this.editForm.packageCode) {
item.disabled = true item.disabled = true
return item } else {
item.groupAttributeList.map(ele => {
if (ele.attributeName == 'service_period') {
ele.disabled = true
}
if (ele.attributeName == 'card') {
ele.disabled = true
}
})
} }
return item
}) })
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!