Commit ca369f0e by 前端

售前权益UI修改

1 parent bb2bb88b
...@@ -2,27 +2,27 @@ ...@@ -2,27 +2,27 @@
<template> <template>
<div class="before-sale edit-equity"> <div class="before-sale edit-equity">
<!-- 车辆信息 --> <!-- 车辆信息 -->
<div class="container"> <div class="container" id="cardInfo">
<p class="edit-title">车辆信息</p> <p class="edit-title">车辆信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefCar" :isEdit="true" defaultWidth="320px" formRef="editChildRefCar" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(0, 7)" :formRules="editRuleCar"></glsx-combi-form> <glsx-combi-form :isInline="false" class="edit-form-container" ref="editFormRefCar" labelWidth="154px" defaultWidth="432px" formRef="editChildRefCar" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(0, 7)" :formRules="editRuleCar"></glsx-combi-form>
<glsx-combi-form ref="editFormRefBrand" :isEdit="true" defaultWidth="215px" formRef="editChildRefBrand" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(7)" :formRules="editRuleCar"> <glsx-combi-form class="vehicleForm" ref="editFormRefBrand" labelWidth="154px" defaultWidth="432px" formRef="editChildRefBrand" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(7)" :formRules="editRuleCar">
<template slot="vehicleBrandId" slot-scope="scope"> <template slot="vehicleBrandId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleBrandId" class="m-r-10" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicle.vehicleBrandId)" style="width: 160px" :disabled="scope.scope.isDisabled"> <el-select v-model="editForm.vehicle.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicle.vehicleBrandId)" style="width: 136px" :disabled="scope.scope.isDisabled">
<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" />
</el-select> </el-select>
</template> </template>
<template slot="vehicleSubBrandId" slot-scope="scope"> <template slot="vehicleSubBrandId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleSubBrandId" class="m-r-10" placeholder="请选择子品牌" filterable @change="getCarSeriesList()" style="width: 160px" :disabled="scope.scope.isDisabled"> <el-select v-model="editForm.vehicle.vehicleSubBrandId" placeholder="请选择子品牌" filterable @change="getCarSeriesList()" style="width: 136px" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carChildOptions" :key="item.id" :value="item.id" :label="item.name" /> <el-option v-for="item in baseData.carChildOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select> </el-select>
</template> </template>
<template slot="vehicleSeriesId" slot-scope="scope"> <template slot="vehicleSeriesId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleSeriesId" class="m-r-10" filterable placeholder="请选择车系" @change="getCarTypeList(editForm.vehicle.vehicleSeriesId)" style="width: 215px" :disabled="scope.scope.isDisabled"> <el-select v-model="editForm.vehicle.vehicleSeriesId" filterable placeholder="请选择车系" @change="getCarTypeList(editForm.vehicle.vehicleSeriesId)" style="width: 136px" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carSeriesOptions" :key="item.id" :value="item.id" :label="item.name" /> <el-option v-for="item in baseData.carSeriesOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select> </el-select>
</template> </template>
<template slot="vehicleShapeId" slot-scope="scope"> <template slot="vehicleShapeId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleShapeId" filterable placeholder="请选择车型" style="width: 215px" :disabled="scope.scope.isDisabled"> <el-select v-model="editForm.vehicle.vehicleShapeId" filterable placeholder="请选择车型" style="width: 136px" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carTypeOptions" :key="item.id" :value="item.id" :label="item.name" /> <el-option v-for="item in baseData.carTypeOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select> </el-select>
</template> </template>
...@@ -30,13 +30,13 @@ ...@@ -30,13 +30,13 @@
</div> </div>
<!-- 客户信息 --> <!-- 客户信息 -->
<div class="container m-t-10"> <div class="container m-t-10" id="customerInfo">
<p class="edit-title">客户信息</p> <p class="edit-title">客户信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefUser" :isEdit="true" defaultWidth="320px" formRef="editChildRefUser" :formObj="editForm" :formData="editFormDataUser" :formRules="editRuleUser"></glsx-combi-form> <glsx-combi-form :isInline="false" class="edit-form-container" ref="editFormRefUser" labelWidth="154px" defaultWidth="432px" formRef="editChildRefUser" :formObj="editForm" :formData="editFormDataUser" :formRules="editRuleUser"></glsx-combi-form>
</div> </div>
<!-- 选择产品 --> <!-- 选择产品 -->
<div class="container m-t-10"> <div class="container m-t-10" id="productInfo">
<p class="edit-title">选择产品</p> <p class="edit-title">选择产品</p>
<div class="edit_product_radio_wrap flex_sc"> <div class="edit_product_radio_wrap flex_sc">
<el-radio v-if="productList.length" :disabled="disabled || leftDisable" v-model="equityRadio" :label="1">自选权益</el-radio> <el-radio v-if="productList.length" :disabled="disabled || leftDisable" v-model="equityRadio" :label="1">自选权益</el-radio>
...@@ -176,22 +176,20 @@ ...@@ -176,22 +176,20 @@
</div> </div>
<!-- 其他信息 --> <!-- 其他信息 -->
<div class="container m-t-10"> <div class="container m-t-10" id="otherInfo">
<p class="edit-title">其他信息</p> <p class="edit-title">其他信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefOther" :isEdit="true" defaultWidth="320px" formRef="editChildRefOther" :formObj="editForm" :formData="editFormDataOther" :formRules="editRuleOther"></glsx-combi-form> <glsx-combi-form :isInline="false" class="edit-form-container" ref="editFormRefOther" labelWidth="154px" defaultWidth="432px" formRef="editChildRefOther" :formObj="editForm" :formData="editFormDataOther" :formRules="editRuleOther"></glsx-combi-form>
</div> </div>
<!-- 店面信息 --> <!-- 店面信息 -->
<div class="container m-t-10"> <div class="container m-t-10" id="merchantInfo">
<p class="edit-title">店面信息</p> <p class="edit-title">店面信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefShop" :isEdit="true" defaultWidth="320px" formRef="editChildRefShop" :formObj="editForm" :formData="editFormDataShop" :formRules="editRuleShop"></glsx-combi-form> <glsx-combi-form :isInline="false" class="edit-form-container" ref="editFormRefShop" labelWidth="154px" defaultWidth="432px" formRef="editChildRefShop" :formObj="editForm" :formData="editFormDataShop" :formRules="editRuleShop"></glsx-combi-form>
</div> </div>
<!-- 底部固定按钮 --> <!-- 底部固定按钮 -->
<!-- <div style="height: 78px"></div> --> <!-- <div style="height: 78px"></div> -->
<div <div class="fixed_bottom">
class="fixed_bottom"
>
<!-- <div class="ma_top"></div> --> <!-- <div class="ma_top"></div> -->
<div class="flex_cc ma_bot"> <div class="flex_cc ma_bot">
<el-button v-if="![3, 5].includes(routeInfo.addOrEdit)" class="custom_black" @click="handleReset">重置</el-button> <el-button v-if="![3, 5].includes(routeInfo.addOrEdit)" class="custom_black" @click="handleReset">重置</el-button>
...@@ -205,6 +203,12 @@ ...@@ -205,6 +203,12 @@
<!-- 二维码 --> <!-- 二维码 -->
<qrCode :bottom="320" phone="400 6123 886" phoneTitle="提单及服务咨询" :codeUrl="qrcodUrl"></qrCode> <qrCode :bottom="320" phone="400 6123 886" phoneTitle="提单及服务咨询" :codeUrl="qrcodUrl"></qrCode>
<div class="my-nav-tabs">
<el-tabs tab-position="right" v-model="curDom" @tab-click="changeArea">
<el-tab-pane v-for="item in tabsList" :key="item.name" :label="item.label" :name="item.name"></el-tab-pane>
</el-tabs>
</div>
</div> </div>
</template> </template>
...@@ -222,6 +226,14 @@ export default { ...@@ -222,6 +226,14 @@ export default {
size: 'small', size: 'small',
submit: false, submit: false,
isBlock: true, isBlock: true,
curDom: 'cardInfo',
tabsList: [
{ label: '车辆信息', name: 'cardInfo' },
{ label: '客户信息', name: 'customerInfo' },
{ label: '选择产品', name: 'productInfo' },
{ label: '其他信息', name: 'otherInfo' },
{ label: '店面信息', name: 'merchantInfo' }
],
serviceObj: { serviceObj: {
PC0005: '', PC0005: '',
PC0007: '' PC0007: ''
...@@ -738,9 +750,28 @@ export default { ...@@ -738,9 +750,28 @@ 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'])
window.addEventListener('scroll', this.handleScroll, true)
}, },
methods: { methods: {
changeArea({ name }) {
document.getElementById(name) && document.getElementById(name).scrollIntoView()
},
handleScroll(e) {
try {
if (e.target.scrollTop < document.getElementById('cardInfo').scrollHeight - 20) {
this.curDom = 'cardInfo'
} else if (e.target.scrollTop < document.getElementById('cardInfo').scrollHeight + document.getElementById('customerInfo').scrollHeight - 20) {
this.curDom = 'customerInfo'
} else if (e.target.scrollTop < document.getElementById('cardInfo').scrollHeight + document.getElementById('customerInfo').scrollHeight + document.getElementById('productInfo').scrollHeight / 2 - 20) {
this.curDom = 'productInfo'
} else {
this.curDom = 'otherInfo'
}
} catch (err) {
console.log(err)
}
},
// 查找服务热线 // 查找服务热线
getHotline() { getHotline() {
if (this.routeInfo.addOrEdit == 3) { if (this.routeInfo.addOrEdit == 3) {
...@@ -1792,13 +1823,16 @@ export default { ...@@ -1792,13 +1823,16 @@ export default {
} }
// } // }
}) })
}, }
// handleCancel() { // handleCancel() {
// // if (this.submit) { // // if (this.submit) {
// // return true // // return true
// // } // // }
// this.$router.back() // this.$router.back()
// } // }
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll)
} }
} }
</script> </script>
...@@ -1820,8 +1854,32 @@ export default { ...@@ -1820,8 +1854,32 @@ export default {
margin-bottom: 84px; margin-bottom: 84px;
} }
.vehicleForm {
/deep/ .el-form-item {
margin-right: 12px !important;
margin-bottom: 32px;
}
}
#customerInfo,
#otherInfo,
#merchantInfo {
.edit-form-container {
padding-bottom: 12px;
}
}
#productInfo .sub-el-form {
// width: 686px;
.edit-form-container {
// padding: 20px 0 1px 20px;
margin-top: 10px;
// background: #f9f9f9;
// margin-left: 25px;
}
}
.before-sale .edit-form-container { .before-sale .edit-form-container {
margin-top: 20px; margin-top: 32px;
} }
.before-sale .txt-center { .before-sale .txt-center {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!