Commit c58e1cf1 by 杨北旺

更新爱车保镖代码

1 parent 2ee99d7d
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form>
<glsx-combi-form ref="editFormRefBrand" labelWidth="140px" defaultWidth="215px" formRef="editChildRefBrand" :formObj.sync="editForm" :formData="editFormDataCar"> <glsx-combi-form ref="editFormRefBrand" labelWidth="140px" defaultWidth="215px" formRef="editChildRefBrand" :formObj.sync="editForm" :formData="editFormDataCar">
<template slot="vehicleBrandId"> <template slot="vehicleBrandId">
<el-select v-model="editForm.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicleBrandId)" style="width:160px;" clearable> <el-select v-model="editForm.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicleBrandId)" style="width:160px;" clearable>
<el-option v-for="item in baseData.carBrandOptions" :key="item.id" :value="item.id" :label="item.name" /> <el-option v-for="item in baseData.carBrandOptions" :key="item.id" :value="item.id" :label="item.name" />
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
</el-select> </el-select>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
<div style="margin-left: 140px">
<p>针对包含“车主生活权益服务”的服务套餐,提供通过扫描小程序码进行领取“车主生活权益服务”。</p>
<img class="qrcodeImg" :src="qrcodeUrl" />
</div>
</div> </div>
<!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> --> <!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> -->
<div class="footer" :style="{ width: '100%' }"> <div class="footer" :style="{ width: '100%' }">
...@@ -36,6 +40,7 @@ export default { ...@@ -36,6 +40,7 @@ export default {
footerLeft: '0', footerLeft: '0',
footerWidth: '0', footerWidth: '0',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
qrcodeUrl: '',
editForm: { editForm: {
hotline: '', hotline: '',
vehicleBrandId: '', vehicleBrandId: '',
...@@ -91,13 +96,14 @@ export default { ...@@ -91,13 +96,14 @@ export default {
methods: { methods: {
getHotline() { getHotline() {
this.$apis.beforeSale.getHotlineApi({}).then(res => { this.$apis.beforeSale.getHotlineApi({}).then(res => {
this.editForm.hotline = res this.editForm.hotline = res.serviceHotline
this.qrcodeUrl = res.qrcodeUrl
}) })
}, },
getDefaultCarbrand() { getDefaultCarbrand() {
this.$apis.beforeSale.getDefaultCarbrandApi({}).then(res => { this.$apis.beforeSale.getDefaultCarbrandApi({}).then(res => {
// console.log(res) // console.log(res)
if(res) { if (res) {
this.editForm.id = res.id this.editForm.id = res.id
this.editForm.vehicleBrandId = res.vehicleBrandId this.editForm.vehicleBrandId = res.vehicleBrandId
this.editForm.vehicleSubBrandId = res.vehicleSubBrandId this.editForm.vehicleSubBrandId = res.vehicleSubBrandId
...@@ -133,8 +139,8 @@ export default { ...@@ -133,8 +139,8 @@ export default {
var params = this.$common.utils.deepClone(this.editForm) var params = this.$common.utils.deepClone(this.editForm)
Promise.all([this.$apis.beforeSale.updateHotlineApi(params), this.$apis.beforeSale.updateCarBrandApi(params)]).then(([hotlineRes, carBrandRes]) => { Promise.all([this.$apis.beforeSale.updateHotlineApi(params), this.$apis.beforeSale.updateCarBrandApi(params)]).then(([hotlineRes, carBrandRes]) => {
this.$message({ this.$message({
message: (hotlineRes.code == '0' && carBrandRes.code == '0') ? '操作成功' : '操作失败', message: hotlineRes.code == '0' && carBrandRes.code == '0' ? '操作成功' : '操作失败',
type: (hotlineRes.code == '0' && carBrandRes.code == '0') ? 'success' : 'error' type: hotlineRes.code == '0' && carBrandRes.code == '0' ? 'success' : 'error'
}) })
this.getHotline() this.getHotline()
this.getDefaultCarbrand() this.getDefaultCarbrand()
...@@ -191,7 +197,7 @@ export default { ...@@ -191,7 +197,7 @@ export default {
font-weight: bold; font-weight: bold;
height: 48px; height: 48px;
line-height: 48px; line-height: 48px;
border-bottom: 1px solid #E7EAEC; border-bottom: 1px solid #e7eaec;
margin: 0 0; margin: 0 0;
} }
...@@ -222,4 +228,8 @@ export default { ...@@ -222,4 +228,8 @@ export default {
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.before-sale .qrcodeImg {
width: 160px;
height: 160px;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!