Commit dd4fcae0 by 杨北旺

售前权益

1 parent 94e39a70
......@@ -330,7 +330,17 @@ const spaAgressData = 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({
url: 'rop-scrm-equity/router',
method: 'POST',
......@@ -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
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
......@@ -63,10 +63,10 @@
</div>
<div class="arrt_pannel">
<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 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-select>
</template>
......@@ -108,7 +108,7 @@
<el-radio-group v-model="curSelectCustomPro" :disabled="disabled">
<div v-for="(item, index) in customProductList" :key="index" class="product_wrapper">
<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>
</div>
<div v-if="curSelectCustomPro == item.packageName" :key="indexs" class="child_wrap">
......@@ -522,7 +522,7 @@ export default {
label: '约定内容',
name: 'specialAppoint',
type: 'input',
inputType: 'textarea',
inputType: 'textarea'
}
],
// 店面信息
......@@ -631,6 +631,14 @@ export default {
{
value: '1',
label: '1年'
},
{
value: '2',
label: '2年'
},
{
value: '3',
label: '3年'
}
],
carBrandOptions: [],
......@@ -762,6 +770,19 @@ export default {
},
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) {
if (e) {
......@@ -776,23 +797,9 @@ export default {
}
})
}
}else{
} else {
this.checkCodeList = this.checkCodeList.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]) {
item.groupAttributeList.forEach(attr => {
if (attr.attributeName == key) {
......@@ -802,8 +809,8 @@ export default {
}
}
},
changeRaido(e,item){
if (e) {
changeRaido(e, item) {
if (e) {
this.checkCodeList = []
this.autoPackageCodeList = []
this.checkCodeList.push(item.packageCode)
......@@ -847,7 +854,7 @@ export default {
this.commonPart(e, pack, attr)
},
// 自选权益产品套餐处理参数---输入框
getCurChangeInput(e, pack, attr) {
getCurChangeInput(e, pack, attr, faIndex, childIndex) {
if (!e) {
return
}
......@@ -859,6 +866,15 @@ export default {
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)
},
// 公共部分
......@@ -956,7 +972,6 @@ export default {
concactArr.forEach(item => {
this.formatProduct = Object.assign(this.formatProduct, item)
})
console.log(this.formatProduct,'********');
} else {
concactArr.forEach(item => {
this.autoFormatProduct = Object.assign(this.autoFormatProduct, item)
......@@ -1168,8 +1183,17 @@ export default {
this.productList.map(item => {
if (item.packageCode != this.editForm.packageCode) {
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!