Commit 6a3a968d by 杨北旺

修复bug

1 parent ee0e895c
......@@ -71,7 +71,7 @@
</el-select>
</template>
<template v-if="attr.attributeType == 'datePicker'">
<el-date-picker class="arrt_pannel" :picker-options="pickerOptions" :disabled="disabled || attr.disabled" @change="getCurChangeDate($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" size="small" type="date" :placeholder="'请选择' + attr.attributeDesc"></el-date-picker>
<el-date-picker class="arrt_pannel" :picker-options="attr.attributeName=='additional_date'?pickerOptions2: pickerOptions" :disabled="disabled || attr.disabled" @change="getCurChangeDate($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" size="small" type="date" :placeholder="'请选择' + attr.attributeDesc"></el-date-picker>
</template>
</div>
</div>
......@@ -120,15 +120,15 @@
</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)" 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>
<template v-if="attr.attributeType == 'datePicker'">
<el-date-picker class="arrt_pannel" :disabled="disabled" @change="getCurChangeDate($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" size="small" type="date" :placeholder="'请选择' + attr.attributeDesc"></el-date-picker>
<el-date-picker class="arrt_pannel" :picker-options="attr.attributeName=='additional_date'?pickerOptions2: pickerOptions" :disabled="disabled || attr.disabled" @change="getCurChangeDate($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" size="small" type="date" :placeholder="'请选择' + attr.attributeDesc"></el-date-picker>
</template>
</div>
</div>
......@@ -209,7 +209,7 @@
</div>
<!-- 二维码 -->
<qrCode :bottom="320" phone="189 3890 7441" :codeUrl="qrcodUrl"></qrCode>
<qrCode :bottom="320" phone="400 6123 886" :codeUrl="qrcodUrl"></qrCode>
</div>
</template>
......@@ -674,7 +674,9 @@ export default {
checkCodeList: [],
rightDisable: false,
leftDisable: false,
pickerOptions:{}
pickerOptions:{},
pickerOptions2:{},
hotline:''
}
},
......@@ -688,57 +690,6 @@ export default {
'editFormPro.additional_price'(newValue, oldValue) {
this.editFormPro.additional_price = limitPrice(newValue, oldValue, 6, 2)
}
// curSelectPro(newValue, oldValue) {
// console.log(newValue);
// if (this.equityRadio == 1) {
// this.checkCodeList = []
// this.curSelectPro = newValue
// newValue.forEach(item => {
// this.productList.forEach(ele => {
// if (item == ele.packageName) {
// this.checkCodeList.push(ele.packageCode)
// for (let key in this.productModal[ele.idName]) {
// ele.groupAttributeList.forEach(attr => {
// if (attr.attributeName == key) {
// this.commonPart(this.productModal[ele.idName][key], ele, attr)
// }
// })
// }
// }
// })
// })
// if (!this.checkCodeList.length) {
// this.formatProduct = {}
// this.tempAttributeList = []
// this.packageCodeList = []
// }
// this.submit = false
// }
// },
// curSelectCustomPro(newValue, oldValue) {
// if (this.equityRadio == 2) {
// this.checkCodeList = []
// this.curSelectPro = newValue
// this.customProductList.forEach(ele => {
// if (newValue == ele.packageName) {
// this.checkCodeList.push(ele.packageCode)
// for (let key in this.productModal[ele.idName]) {
// ele.groupAttributeList.forEach(attr => {
// if (attr.attributeName == key) {
// this.commonPart(this.productModal[ele.idName][key], ele, attr)
// }
// })
// }
// }
// })
// if (!newValue) {
// this.autoFormatProduct = {}
// this.autoAttriButeList = []
// this.autoPackageCodeList = []
// }
// this.submit = false
// }
// }
},
components: {
......@@ -749,10 +700,10 @@ export default {
async created() {
this.getAllVehicleBrand()
this.getCarChildList(false, true)
// 测试时使用
this.getSpeAgreeOptions()
this.getStoreInfo()
this.pickerOptions = this.setDateLimit()
this.pickerOptions2 = this.setDateLimit2()
this.getHotline()
},
mounted() {
......@@ -769,11 +720,21 @@ export default {
this.getOptionsList('editFormDataUser', false)
this.getOptionsList('editFormDataOther', false)
this.disabled && this.setDisabled()
this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate'])
this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate','merchantName','merchantPhone','merchantAddress'])
},
methods: {
// 设置日期组件时间范围
// 查找服务热线
getHotline() {
if(this.routeInfo.addOrEdit==3){
return
}
this.$apis.beforeSale.getHotlineApi({}).then(res => {
this.hotline = res
this.getStoreInfo()
})
},
// 设置日期组件时间范围---今天之后
setDateLimit() {
let obj = {
disabledDate(time) {
......@@ -782,6 +743,15 @@ export default {
}
return obj
},
// 设置日期组件时间范围---今天之前
setDateLimit2() {
let obj = {
disabledDate(time) {
return time.getTime() > Date.now()
}
}
return obj
},
// 卡号获取期限
getDateList(seqNo, pack, attr) {
this.$apis.beforeSale.dateBycarNo({ seqNo }).then(res => {
......@@ -809,6 +779,13 @@ export default {
}
})
}
if(item.idName=='crash'){
const customAttr = {
attributeGroup:'planId',
attributeName:'planId'
}
this.commonPart(this.productModal[item.idName]['planId'], item, customAttr)
}
} else {
this.checkCodeList = this.checkCodeList.filter(t => t != item.packageCode)
this.packageCodeList = this.packageCodeList.filter(t => t != item.packageCode)
......@@ -826,6 +803,7 @@ export default {
this.checkCodeList = []
this.autoPackageCodeList = []
this.checkCodeList.push(item.packageCode)
this.autoPackageCodeList.push(item.packageCode)
for (let key in this.productModal[item.idName]) {
item.groupAttributeList.forEach(attr => {
if (attr.attributeName == key) {
......@@ -843,7 +821,7 @@ export default {
}
this.$apis.beforeSale.merchantInfo(para).then(res => {
this.editForm.merchantName = res.merchantName
this.editForm.merchantPhone = res.residentPhone
this.editForm.merchantPhone = this.hotline
this.editForm.merchantAddress = res.merchantAddress
})
},
......@@ -984,6 +962,7 @@ 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)
......@@ -1019,6 +998,7 @@ export default {
item.idName = 'tire'
} else if (item.packageName.includes('碰撞无忧')) {
item.idName = 'crash'
this.productModal[item.idName]['planId'] = item.planId
this.getCase(item.planId)
} else if (item.packageName.includes('盗抢全损无忧')) {
item.idName = 'stolen'
......@@ -1177,8 +1157,20 @@ export default {
this.customProductList.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
}
if (ele.attributeName == 'effective_date') {
ele.disabled = true
}
})
}
return item
})
}
} else {
......@@ -1187,6 +1179,8 @@ export default {
this.editForm.attributeList.forEach(item => {
if (item.attributeName.includes('price')) {
item.attributeValue = item.attributeValue / 100
}else if(item.attributeName=='planId'){
this.getCase(parseInt(item.attributeValue))
}
this.productModal[targetItem.idName][item.attributeName] = item.attributeValue
})
......@@ -1478,6 +1472,7 @@ export default {
},
// 草稿
handleDraft() {
const vaidObj = this.equityRadio == 1 ? this.formatProduct : this.autoFormatProduct
if (this.submit) {
return true
}
......@@ -1494,6 +1489,10 @@ export default {
} else {
params.contractNo = ''
}
if(!params.attributes){
params.attributes = []
}
params = Object.assign(params, vaidObj)
this.updateEquity(params)
},
updateEquity(params) {
......@@ -1515,7 +1514,7 @@ export default {
return
}
this.$router.push({
path: '/beforeSale/index',
path: '/beforeSale/checkSet',
// name: 'beforeSale',
params: res
})
......@@ -1736,7 +1735,7 @@ export default {
margin-left: 24px;
}
.child_wrap {
padding: 16px 0 0 0;
padding: 16px 0 0 0px;
display: flex;
flex-wrap: wrap;
.child_wrap_pannel {
......
......@@ -190,13 +190,13 @@ export default {
label: '车主姓名',
prop: 'customerName',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.customerName || '-'
}
},
{
label: '合同号',
line: 1,
prop: 'contractNo',
width: '200px',
formatter: cellValue => {
......@@ -259,7 +259,6 @@ export default {
},
{
label: '车架号',
line: 1,
prop: 'vin',
width: '200px',
formatter: cellValue => {
......@@ -268,7 +267,6 @@ export default {
},
{
label: '电话',
line: 1,
prop: 'customerPhone',
width: '160px',
formatter: cellValue => {
......@@ -277,8 +275,8 @@ export default {
},
{
label: '产品名称',
line: 1,
prop: 'packageName',
width: '200px',
formatter: cellValue => {
return cellValue.packageName || '-'
}
......@@ -306,7 +304,7 @@ export default {
line: 1,
prop: 'servicePeriod',
formatter: cellValue => {
return cellValue.servicePeriod ? '1年' : '-'
return cellValue.servicePeriod ? `${cellValue.servicePeriod}年` : '-'
}
},
{
......@@ -661,9 +659,16 @@ export default {
// )
// return true
// }
this.handlePdfClose()
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.beforeSale.getPriteApi({ contractNo: row.contractNo }).then(res => {
this.pdfUrl = res
this.handlePdfClose()
loading.close();
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!