Commit 23c707ca by 杨北旺

售前权益UI样式调整

1 parent ce92adad
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="glsx-combi-form"> <div class="glsx-combi-form">
<el-form :ref="formRef" :inline="true" :model="formObj" :label-width="labelWidth" :rules="formRules" size="small" class="glsx-combi-form-block"> <el-form :ref="formRef" :inline="true" :model="formObj" :label-width="labelWidth" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData"> <template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ ...item.style }" :label="item.label ? item.label + ':' : ''" :prop="item.name"> <el-form-item v-if="!item.isHide" :key="index" :id="item.name" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ ...item.style }" :label="item.label ? item.label + '' : ''" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label"> <span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span> <span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'"> <el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
......
<!-- 编辑权益 --> <!-- 编辑权益 -->
<template> <template>
<div class="before-sale edit-equity"> <div class="before-sale edit-equity">
<div class="help-service">
<img class="service-img" src="./image/code.png"/>
<p>提单及服务咨询</p>
<!-- <p>在线客服随时咨询</p> -->
<p class="service-hotline">服务热线</p>
<p class="service-phone">18938907441</p>
</div>
<div class="container"> <div class="container">
<p class="edit-title">车辆信息</p> <p class="edit-title">车辆信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefCar" labelWidth="160px" defaultWidth="320px" formRef="editChildRefCar" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(0, 7)" :formRules="editRuleCar"> <glsx-combi-form class="edit-form-container" ref="editFormRefCar" labelWidth="160px" defaultWidth="320px" formRef="editChildRefCar" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(0, 7)" :formRules="editRuleCar"></glsx-combi-form>
</glsx-combi-form> <glsx-combi-form ref="editFormRefBrand" labelWidth="160px" defaultWidth="215px" formRef="editChildRefBrand" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(7)" :formRules="editRuleCar">
<glsx-combi-form ref="editFormRefBrand" labelWidth="160px" defaultWidth="215px" 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" 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: 160px" :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" placeholder="请选择子品牌" filterable @change="getCarSeriesList()" style="width:160px;" :disabled="scope.scope.isDisabled"> <el-select v-model="editForm.vehicle.vehicleSubBrandId" placeholder="请选择子品牌" filterable @change="getCarSeriesList()" style="width: 160px" :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" placeholder="请选择车系" @change="getCarTypeList(editForm.vehicle.vehicleSeriesId)" style="width:215px;" :disabled="scope.scope.isDisabled"> <el-select v-model="editForm.vehicle.vehicleSeriesId" placeholder="请选择车系" @change="getCarTypeList(editForm.vehicle.vehicleSeriesId)" style="width: 215px" :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" placeholder="请选择车型" style="width:215px;" :disabled="scope.scope.isDisabled"> <el-select v-model="editForm.vehicle.vehicleShapeId" placeholder="请选择车型" style="width: 215px" :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>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="container"> <div class="container m-t-10">
<p class="edit-title">客户信息</p> <p class="edit-title">客户信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefUser" labelWidth="160px" defaultWidth="320px" formRef="editChildRefUser" :formObj="editForm" :formData="editFormDataUser" :formRules="editRuleUser"></glsx-combi-form> <glsx-combi-form class="edit-form-container" ref="editFormRefUser" labelWidth="160px" defaultWidth="320px" formRef="editChildRefUser" :formObj="editForm" :formData="editFormDataUser" :formRules="editRuleUser"></glsx-combi-form>
</div> </div>
<div class="container"> <div class="container m-t-10">
<p class="edit-title">选择产品</p> <p class="edit-title">选择产品</p>
<!-- <glsx-combi-form class="edit-form-container" ref="editFormRefPro" labelWidth="160px" formRef="editChildRefPro" :formObj="editForm" :formData="editFormDataPro" :formRules="editRulePro"> -->
<glsx-combi-form class="edit-form-container" labelWidth="160px" defaultWidth="320px" :formObj="editForm" :formData="editFormDataPro"> <glsx-combi-form class="edit-form-container" labelWidth="160px" defaultWidth="320px" :formObj="editForm" :formData="editFormDataPro">
<template slot="packageCode" slot-scope="scope"> <template slot="packageCode" slot-scope="scope">
<el-radio-group class="package-code-box" v-model="editForm[scope.scope.name]" :disabled="scope.scope.isDisabled" @change="scope.scope.handleRadioChange"> <el-radio-group class="package-code-box" v-model="editForm[scope.scope.name]" :disabled="scope.scope.isDisabled" @change="scope.scope.handleRadioChange">
...@@ -77,17 +68,34 @@ ...@@ -77,17 +68,34 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="container"> <div class="container m-t-10">
<p class="edit-title">其他信息</p> <p class="edit-title">其他信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefOther" labelWidth="160px" defaultWidth="320px" formRef="editChildRefOther" :formObj="editForm" :formData="editFormDataOther" :formRules="editRuleOther"></glsx-combi-form> <glsx-combi-form class="edit-form-container" ref="editFormRefOther" labelWidth="160px" defaultWidth="320px" formRef="editChildRefOther" :formObj="editForm" :formData="editFormDataOther" :formRules="editRuleOther"></glsx-combi-form>
</div> </div>
<!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> --> <div class="container m-t-10">
<div class="footer" :style="{ width: '100%' }"> <p class="edit-title">店面信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefShop" labelWidth="160px" defaultWidth="320px" formRef="editChildRefShop" :formObj="editForm" :formData="editFormDataShop" :formRules="editRuleShop"></glsx-combi-form>
</div>
<div style="height: 78px"></div>
<div
class="fixed_bottom"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<div class="ma_top"></div>
<div class="flex_cc ma_bot">
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button>
</div>
</div>
<!-- <div class="footer" :style="{ width: '100%' }">
<el-button v-show="routeInfo.addOrEdit != '5'" type="primary" @click="handleConfirm">{{routeInfo.addOrEdit != '3' ? '提单' : '确定'}}</el-button> <el-button v-show="routeInfo.addOrEdit != '5'" type="primary" @click="handleConfirm">{{routeInfo.addOrEdit != '3' ? '提单' : '确定'}}</el-button>
<el-button v-show="routeInfo.addOrEdit == '1'" type="primary" @click="handleReset">重置</el-button> <el-button v-show="routeInfo.addOrEdit == '1'" type="primary" @click="handleReset">重置</el-button>
<el-button v-show="!['3', '5'].includes(routeInfo.addOrEdit)" type="primary" @click="handleDraft">草稿</el-button> <el-button v-show="!['3', '5'].includes(routeInfo.addOrEdit)" type="primary" @click="handleDraft">草稿</el-button>
<el-button type="default" @click="handleCancel">取消</el-button> <el-button type="default" @click="handleCancel">取消</el-button>
</div> </div> -->
<qrCode phone="189 3890 7441" :codeUrl="qrcodUrl"></qrCode>
</div> </div>
</template> </template>
...@@ -95,6 +103,7 @@ ...@@ -95,6 +103,7 @@
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import { limitPrice } from '@/common/constant' import { limitPrice } from '@/common/constant'
import glsxCombiForm from '@/components/glsx-combi-form' import glsxCombiForm from '@/components/glsx-combi-form'
import qrCode from '@/components/qr-code'
export default { export default {
name: 'editEquity', name: 'editEquity',
data() { data() {
...@@ -108,8 +117,8 @@ export default { ...@@ -108,8 +117,8 @@ export default {
// 2: '编辑权益', // 2: '编辑权益',
// 3: '查看权益' // 3: '查看权益'
// }, // },
// footerLeft: '0', footerLeft: '0',
// footerWidth: '0', footerWidth: '0',
editCarChildRef: 'editChildRef', editCarChildRef: 'editChildRef',
disabled: false, disabled: false,
successDisable: false, successDisable: false,
...@@ -144,19 +153,32 @@ export default { ...@@ -144,19 +153,32 @@ export default {
// 车辆信息 // 车辆信息
editRuleCar: { editRuleCar: {
// licensing: [{ required: true, message: '请选择是否上牌', trigger: 'change' }], // licensing: [{ required: true, message: '请选择是否上牌', trigger: 'change' }],
licensePlate: [{ validator: (rule, value, callback) => { licensePlate: [
return value ? ((/.{7,8}/).test(value) ? callback() : callback(new Error('请输入7位或8位车牌号码'))) : callback() {
}, trigger: 'change' }], validator: (rule, value, callback) => {
vin: [{ required: true, message: '请输入车架号', trigger: 'change' }, return value ? (/.{7,8}/.test(value) ? callback() : callback(new Error('请输入7位或8位车牌号码'))) : callback()
{ validator: (rule, value, callback) => { },
return (/^[a-zA-Z0-9]{17}$/).test(value) ? callback() : callback(new Error('请输入17位数字和字母')) trigger: 'change'
}, trigger: 'change' }
}], ],
engineNo: [{ required: true, message: '请输入发动机号', trigger: 'change' }, vin: [
{ validator: (rule, value, callback) => { { required: true, message: '请输入车架号', trigger: 'change' },
return (/^[a-zA-Z0-9]{6,16}$/).test(value) ? callback() : callback(new Error('请输入6-16位数字和字母组合')) {
}, trigger: 'change' validator: (rule, value, callback) => {
}], return /^[a-zA-Z0-9]{17}$/.test(value) ? callback() : callback(new Error('请输入17位数字和字母'))
},
trigger: 'change'
}
],
engineNo: [
{ required: true, message: '请输入发动机号', trigger: 'change' },
{
validator: (rule, value, callback) => {
return /^[a-zA-Z0-9]{6,16}$/.test(value) ? callback() : callback(new Error('请输入6-16位数字和字母组合'))
},
trigger: 'change'
}
],
invoicePrice: [{ required: true, message: '请输入发票价格', trigger: 'change' }], invoicePrice: [{ required: true, message: '请输入发票价格', trigger: 'change' }],
// vehicleColor: [{ required: true, message: '请输入车身颜色', trigger: 'change' }], // vehicleColor: [{ required: true, message: '请输入车身颜色', trigger: 'change' }],
vehicleBrandId: [{ required: true, message: '请选择车品牌', trigger: 'change' }], vehicleBrandId: [{ required: true, message: '请选择车品牌', trigger: 'change' }],
...@@ -248,21 +270,31 @@ export default { ...@@ -248,21 +270,31 @@ export default {
customerType: [{ required: true, message: '请选择客户类型', trigger: 'change' }], customerType: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
customerName: [{ required: true, message: '请输入客户姓名', trigger: 'change' }], customerName: [{ required: true, message: '请输入客户姓名', trigger: 'change' }],
cardType: [{ required: true, message: '请选择证件类型', trigger: 'change' }], cardType: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
cardNo: [{ required: true, cardNo: [
validator: (rule, value, callback) => { {
return value ? callback() : callback(new Error('请输入' + (this.editForm.cardType == '1' ? '身份证' : '统一社会信息代码' ))) required: true,
}, trigger: 'change' validator: (rule, value, callback) => {
}, return value ? callback() : callback(new Error('请输入' + (this.editForm.cardType == '1' ? '身份证' : '统一社会信息代码')))
{ validator: (rule, value, callback) => { },
return (/[a-zA-Z0-9]{18}/).test(value) ? callback() : callback(new Error('请输入18位数字或字母')) trigger: 'change'
}, trigger: 'change' },
}], {
customerPhone: [{ required: true, message: '请输入联系号码', trigger: 'change' }, validator: (rule, value, callback) => {
{ validator: (rule, value, callback) => { return /[a-zA-Z0-9]{18}/.test(value) ? callback() : callback(new Error('请输入18位数字或字母'))
let phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/; },
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码')) trigger: 'change'
}, trigger: 'change' }
}], ],
customerPhone: [
{ required: true, message: '请输入联系号码', trigger: 'change' },
{
validator: (rule, value, callback) => {
let phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码'))
},
trigger: 'change'
}
],
customerAddress: [{ required: true, message: '请输入联系地址', trigger: 'change' }] customerAddress: [{ required: true, message: '请输入联系地址', trigger: 'change' }]
}, },
editFormDataUser: [ editFormDataUser: [
...@@ -336,65 +368,111 @@ export default { ...@@ -336,65 +368,111 @@ export default {
], ],
// 其他信息 // 其他信息
editRuleOther: { editRuleOther: {
suggestedSellingPrice: [{ required: true, message: '请输入建议销售价', trigger: 'change' }], // suggestedSellingPrice: [{ required: true, message: '请输入建议销售价', trigger: 'change' }],
actualSalesPrice: [ // actualSalesPrice: [
{ required: true, message: '请输入实际销售价', trigger: 'change' }, // { required: true, message: '请输入实际销售价', trigger: 'change' },
{ // {
validator: (rule, value, callback) => { // validator: (rule, value, callback) => {
return +this.editForm.suggestedSellingPrice > +value ? callback(new Error('输入价格有误')) : callback() // return +this.editForm.suggestedSellingPrice > +value ? callback(new Error('输入价格有误')) : callback()
}, // },
trigger: 'change' // trigger: 'change'
} // }
], // ],
servicePeriod: [{ required: true, message: '请选择服务期限', trigger: 'change' }], // servicePeriod: [{ required: true, message: '请选择服务期限', trigger: 'change' }],
effectiveDate: [{ required: true, message: '请选择生效日期', trigger: 'change' }], // effectiveDate: [{ required: true, message: '请选择生效日期', trigger: 'change' }],
actualSalesPerson: [{ required: true, message: '请输入实际销售人', trigger: 'change' }] // actualSalesPerson: [{ required: true, message: '请输入实际销售人', trigger: 'change' }],
deviceNo: [{ required: false, message: '请输入设备号', trigger: 'change' }],
speAgree: [{ required: false, message: '请输入特别约定', trigger: 'change' }],
speContent: [{ required: false, message: '请输入约定内容', trigger: 'change' }]
}, },
editFormDataOther: [ editFormDataOther: [
{ {
label: '建议销售价', label: '设备号',
name: 'suggestedSellingPrice', name: 'deviceNo',
type: 'input', type: 'input',
append: '元', maxlength: 100
isDisabled: true,
maxlength: 11
}, },
{ {
label: '实际销售价', label: '特别约定',
name: 'actualSalesPrice', name: 'speAgree',
type: 'input', type: 'input',
append: '元', maxlength: 100
maxlength: 11
}, },
{ {
label: '服务期限', label: '约定内容',
name: 'servicePeriod', name: 'speContent',
type: 'select', type: 'input'
noFilter: true, }
optionList: [], // {
optionId: 'confId', // label: '建议销售价',
optionLabel: 'confName', // name: 'suggestedSellingPrice',
optionsName: 'servicePeriodList' // type: 'input',
// append: '元',
// isDisabled: true,
// maxlength: 11
// },
// {
// label: '实际销售价',
// name: 'actualSalesPrice',
// type: 'input',
// append: '元',
// maxlength: 11
// },
// {
// label: '服务期限',
// name: 'servicePeriod',
// type: 'select',
// noFilter: true,
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'servicePeriodList'
// },
// {
// label: '生效日期',
// name: 'effectiveDate',
// type: 'datePicker',
// dateType: 'date',
// valueFormat: 'yyyy-MM-dd',
// customPickerOptions: {
// disabledDate(date) {
// const yesterday = new Date(new Date().setDate(new Date().getDate()))
// if (date < yesterday) {
// return true
// }
// return false
// }
// }
// },
// {
// label: '实际销售人员',
// name: 'actualSalesPerson',
// type: 'input',
// maxlength: 100
// },
],
// 店面信息
editRuleShop: {
shopName: [{ required: true, message: '店面名称', trigger: 'change' }],
shopPhone: [{ required: true, message: '店铺联系号码', trigger: 'change' }],
shopAddress: [{ required: true, message: '店铺联系地址', trigger: 'change' }]
},
editFormDataShop: [
{
label: '店面名称',
name: 'shopName',
type: 'input',
maxlength: 50
}, },
{ {
label: '生效日期', label: '店铺联系号码',
name: 'effectiveDate', name: 'shopPhone',
type: 'datePicker', type: 'input',
dateType: 'date', maxlength: 11
valueFormat: 'yyyy-MM-dd',
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date < yesterday) {
return true
}
return false
}
}
}, },
{ {
label: '实际销售人员', label: '店铺联系地址',
name: 'actualSalesPerson', name: 'shopAddress',
type: 'input', type: 'input',
maxlength: 100 maxlength: 100
} }
...@@ -439,6 +517,18 @@ export default { ...@@ -439,6 +517,18 @@ export default {
{ {
confId: 2, confId: 2,
confName: '企业' confName: '企业'
},
{
confId: 3,
confName: '个人(港澳)'
},
{
confId: 4,
confName: '个人(台)'
},
{
confId: 5,
confName: '个人(军官)'
} }
], ],
cardTypeList: [ cardTypeList: [
...@@ -449,6 +539,18 @@ export default { ...@@ -449,6 +539,18 @@ export default {
{ {
confId: 2, confId: 2,
confName: '统一社会信息代码' confName: '统一社会信息代码'
},
{
confId: 3,
confName: '港澳返乡证'
},
{
confId: 4,
confName: '台胞证'
},
{
confId: 5,
confName: '军官证'
} }
], ],
servicePeriodList: [ servicePeriodList: [
...@@ -462,24 +564,26 @@ export default { ...@@ -462,24 +564,26 @@ export default {
carSeriesOptions: [], carSeriesOptions: [],
carTypeOptions: [] carTypeOptions: []
}, },
allCarChildList: [] allCarChildList: [],
qrcodUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/beforesale_equity_code.png'
} }
}, },
watch: { watch: {
'editForm.vehicle.invoicePrice'(newValue, oldValue){ 'editForm.vehicle.invoicePrice'(newValue, oldValue) {
this.editForm.vehicle.invoicePrice = limitPrice(newValue, oldValue, 7, 2, 0, 2000000) this.editForm.vehicle.invoicePrice = limitPrice(newValue, oldValue, 7, 2, 0, 2000000)
}, },
'editForm.actualSalesPrice'(newValue, oldValue){ 'editForm.actualSalesPrice'(newValue, oldValue) {
this.editForm.actualSalesPrice = limitPrice(newValue, oldValue, 7, 2) this.editForm.actualSalesPrice = limitPrice(newValue, oldValue, 7, 2)
}, },
'editFormPro.additional_price'(newValue, oldValue){ 'editFormPro.additional_price'(newValue, oldValue) {
this.editFormPro.additional_price = limitPrice(newValue, oldValue, 6, 2) this.editFormPro.additional_price = limitPrice(newValue, oldValue, 6, 2)
} }
}, },
components: { components: {
glsxCombiForm glsxCombiForm,
qrCode
}, },
created() { created() {
...@@ -488,14 +592,14 @@ export default { ...@@ -488,14 +592,14 @@ export default {
}, },
mounted() { mounted() {
// this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
// this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
const urlParam = this.$route.params const urlParam = this.$route.params
this.routeInfo = JSON.parse(decodeURIComponent(urlParam.id)) this.routeInfo = JSON.parse(decodeURIComponent(urlParam.id))
console.log(this.routeInfo); console.log(this.routeInfo)
this.disabled = this.routeInfo.addOrEdit == '5' this.disabled = this.routeInfo.addOrEdit == '5'
// 提单成功 - 修改 // 提单成功 - 修改
if(this.routeInfo.isSuper != 'true') { if (this.routeInfo.isSuper != 'true') {
this.successDisable = this.routeInfo.addOrEdit == '3' this.successDisable = this.routeInfo.addOrEdit == '3'
} }
this.getOptionsList('editFormDataCar', false) this.getOptionsList('editFormDataCar', false)
...@@ -531,16 +635,16 @@ export default { ...@@ -531,16 +635,16 @@ export default {
this.$apis.beforeSale.getDefaultCarbrandApi({}).then(res => { this.$apis.beforeSale.getDefaultCarbrandApi({}).then(res => {
// 获取套餐列表 // 获取套餐列表
this.getPackageList() this.getPackageList()
if(res) { if (res) {
this.defaultBrandForm.vehicleBrandId = res.vehicleBrandId this.defaultBrandForm.vehicleBrandId = res.vehicleBrandId
this.defaultBrandForm.vehicleSubBrandId = res.vehicleSubBrandId this.defaultBrandForm.vehicleSubBrandId = res.vehicleSubBrandId
if(this.routeInfo.addOrEdit == '1') { if (this.routeInfo.addOrEdit == '1') {
this.editForm.vehicle.vehicleBrandId = res.vehicleBrandId this.editForm.vehicle.vehicleBrandId = res.vehicleBrandId
this.editForm.vehicle.vehicleSubBrandId = res.vehicleSubBrandId this.editForm.vehicle.vehicleSubBrandId = res.vehicleSubBrandId
if (this.editForm.vehicle.vehicleBrandId) { if (this.editForm.vehicle.vehicleBrandId) {
this.baseData.carChildOptions = this.allCarChildList.find(item => item.id == this.editForm.vehicle.vehicleBrandId).childs this.baseData.carChildOptions = this.allCarChildList.find(item => item.id == this.editForm.vehicle.vehicleBrandId).childs
} }
if(this.editForm.vehicle.vehicleSubBrandId) { if (this.editForm.vehicle.vehicleSubBrandId) {
this.getCarSeriesList(true) this.getCarSeriesList(true)
} }
} }
...@@ -563,13 +667,13 @@ export default { ...@@ -563,13 +667,13 @@ export default {
if (this.editForm.actualSalesPrice) { if (this.editForm.actualSalesPrice) {
this.editForm.actualSalesPrice = (this.editForm.actualSalesPrice / 100).toFixed(2) this.editForm.actualSalesPrice = (this.editForm.actualSalesPrice / 100).toFixed(2)
} }
if(this.editForm.attributeList && this.editForm.attributeList.length) { if (this.editForm.attributeList && this.editForm.attributeList.length) {
var idxPrice = this.editForm.attributeList.findIndex(i => i.attributeName == 'additional_price') var idxPrice = this.editForm.attributeList.findIndex(i => i.attributeName == 'additional_price')
this.editForm.attributeList[idxPrice].attributeValue = this.editForm.attributeList[idxPrice].attributeValue ? (this.editForm.attributeList[idxPrice].attributeValue / 100).toFixed(2) : '' this.editForm.attributeList[idxPrice].attributeValue = this.editForm.attributeList[idxPrice].attributeValue ? (this.editForm.attributeList[idxPrice].attributeValue / 100).toFixed(2) : ''
} }
this.editForm.vehicle.billingDate = this.editForm.vehicle.billingDate ? new Date(this.editForm.vehicle.billingDate) : '' this.editForm.vehicle.billingDate = this.editForm.vehicle.billingDate ? new Date(this.editForm.vehicle.billingDate) : ''
this.editForm.effectiveDate = this.editForm.effectiveDate ? new Date(this.editForm.effectiveDate) : '' this.editForm.effectiveDate = this.editForm.effectiveDate ? new Date(this.editForm.effectiveDate) : ''
if(['2', '3', '4'].includes(this.routeInfo.addOrEdit)) { if (['2', '3', '4'].includes(this.routeInfo.addOrEdit)) {
this.editForm.vehicle.vehicleBrandId = this.editForm.vehicle.vehicleBrandId || this.defaultBrandForm.vehicleBrandId this.editForm.vehicle.vehicleBrandId = this.editForm.vehicle.vehicleBrandId || this.defaultBrandForm.vehicleBrandId
this.editForm.vehicle.vehicleSubBrandId = this.editForm.vehicle.vehicleSubBrandId || this.defaultBrandForm.vehicleSubBrandId this.editForm.vehicle.vehicleSubBrandId = this.editForm.vehicle.vehicleSubBrandId || this.defaultBrandForm.vehicleSubBrandId
} }
...@@ -604,12 +708,13 @@ export default { ...@@ -604,12 +708,13 @@ export default {
this.editForm.suggestedSellingPrice = '' this.editForm.suggestedSellingPrice = ''
if (this.editForm.vehicle.invoicePrice) { if (this.editForm.vehicle.invoicePrice) {
var invoicePrice = (this.editForm.vehicle.invoicePrice * 100).toFixed(2) var invoicePrice = (this.editForm.vehicle.invoicePrice * 100).toFixed(2)
targetItem && targetItem.servicePackagePrices.forEach(item => { targetItem &&
if (+invoicePrice >= +item.carButtomPrice && +invoicePrice < +item.carHighestPrice) { targetItem.servicePackagePrices.forEach(item => {
this.editForm.suggestedSellingPrice = (item.retailPrice / 100).toFixed(2) if (+invoicePrice >= +item.carButtomPrice && +invoicePrice < +item.carHighestPrice) {
this.editForm.actualSalesPrice = (item.retailPrice / 100).toFixed(2) this.editForm.suggestedSellingPrice = (item.retailPrice / 100).toFixed(2)
} this.editForm.actualSalesPrice = (item.retailPrice / 100).toFixed(2)
}) }
})
} }
}, },
packageAttr(recovery = false) { packageAttr(recovery = false) {
...@@ -619,40 +724,44 @@ export default { ...@@ -619,40 +724,44 @@ export default {
this.editRulePro = {} this.editRulePro = {}
this.editFormPro = {} this.editFormPro = {}
var attrName = '' var attrName = ''
targetItem && targetItem.groupAttributeList.forEach(item => { targetItem &&
if (item.attributeList.length == 1) { targetItem.groupAttributeList.forEach(item => {
attrName = item.attributeList[0].attributeName if (item.attributeList.length == 1) {
this.$set(this.editFormPro, attrName, tempObj.hasOwnProperty(attrName) ? tempObj[attrName] : '') attrName = item.attributeList[0].attributeName
if (item.attributeList[0].required == 1) { this.$set(this.editFormPro, attrName, tempObj.hasOwnProperty(attrName) ? tempObj[attrName] : '')
this.editRulePro[item.attributeList[0].attributeName] = [ if (item.attributeList[0].required == 1) {
{ this.editRulePro[item.attributeList[0].attributeName] = [
required: true, {
message: '请输入' + item.attributeList[0].attributeDesc, required: true,
trigger: 'change' message: '请输入' + item.attributeList[0].attributeDesc,
} trigger: 'change'
] }
} ]
} else { }
for(var i = 0; i < item.num; i++) { } else {
item.attributeList.forEach(k => { for (var i = 0; i < item.num; i++) {
attrName = k.attributeName item.attributeList.forEach(k => {
this.$set(this.editFormPro, attrName + i, tempObj.hasOwnProperty(attrName + i) ? tempObj[attrName + i] : '') attrName = k.attributeName
}) this.$set(this.editFormPro, attrName + i, tempObj.hasOwnProperty(attrName + i) ? tempObj[attrName + i] : '')
})
}
} }
} })
})
if (recovery) { if (recovery) {
this.recoveryEditFormPro() this.recoveryEditFormPro()
} }
}, },
recoveryEditFormPro() { recoveryEditFormPro() {
this.editForm.attributeList.length && this.editForm.attributeList.forEach((item, idx) => { this.editForm.attributeList.length &&
let hashObj = {} this.editForm.attributeList.forEach((item, idx) => {
this.editForm.attributeList.map(i => i.attributeName).forEach((i, subIdx) => { let hashObj = {}
Object.keys(hashObj).includes(i) ? (hashObj[i] = hashObj[i] + 1) : (hashObj[i] = 1) this.editForm.attributeList
.map(i => i.attributeName)
.forEach((i, subIdx) => {
Object.keys(hashObj).includes(i) ? (hashObj[i] = hashObj[i] + 1) : (hashObj[i] = 1)
})
this.$set(this.editFormPro, hashObj[item.attributeName] != 1 ? item.attributeName + item.sort : item.attributeName, item.attributeValue)
}) })
this.$set(this.editFormPro, hashObj[item.attributeName] != 1 ? (item.attributeName + item.sort) : item.attributeName, item.attributeValue)
})
// console.log(this.editFormPro) // console.log(this.editFormPro)
}, },
autoGenerate() { autoGenerate() {
...@@ -670,8 +779,7 @@ export default { ...@@ -670,8 +779,7 @@ export default {
}) })
if (k.attributeList[0].attributeType == 'datePicker') { if (k.attributeList[0].attributeType == 'datePicker') {
tempList[idx].dateType = 'date' tempList[idx].dateType = 'date'
tempList[idx].valueFormat = 'yyyy-MM-dd', ;(tempList[idx].valueFormat = 'yyyy-MM-dd'), (tempList[idx].pickerOptions = 'beforeRangePickerOptions')
tempList[idx].pickerOptions = 'beforeRangePickerOptions'
} }
} else { } else {
var tableList = [] var tableList = []
...@@ -858,7 +966,7 @@ export default { ...@@ -858,7 +966,7 @@ export default {
if (this.submit) { if (this.submit) {
return true return true
} }
if(!this.editForm.customerName) { if (!this.editForm.customerName) {
this.$refs.editFormRefUser.$refs.editChildRefUser.validateField('customerName') this.$refs.editFormRefUser.$refs.editChildRefUser.validateField('customerName')
this.whereToGo('customerName') this.whereToGo('customerName')
return true return true
...@@ -900,7 +1008,7 @@ export default { ...@@ -900,7 +1008,7 @@ export default {
var flag = true var flag = true
var errorObjList = [] var errorObjList = []
for (var i = 0; i < list.length; i++) { for (var i = 0; i < list.length; i++) {
if(this.$refs['editFormRef' + list[i]]) { if (this.$refs['editFormRef' + list[i]]) {
var pRef = list[i] == 'Pro' ? this.$refs['editFormRef' + list[i]][0] : this.$refs['editFormRef' + list[i]] var pRef = list[i] == 'Pro' ? this.$refs['editFormRef' + list[i]][0] : this.$refs['editFormRef' + list[i]]
pRef.$refs['editChildRef' + list[i]].validate((valid, errorObj) => { pRef.$refs['editChildRef' + list[i]].validate((valid, errorObj) => {
!valid && errorObjList.push(errorObj) !valid && errorObjList.push(errorObj)
...@@ -916,7 +1024,7 @@ export default { ...@@ -916,7 +1024,7 @@ export default {
var params = this.getParams() var params = this.getParams()
params.operationType = 1 params.operationType = 1
if (['2', '3', '4'].includes(this.routeInfo.addOrEdit)) { if (['2', '3', '4'].includes(this.routeInfo.addOrEdit)) {
if(this.routeInfo.addOrEdit == '4' && this.editForm.orderStatus != 3) { if (this.routeInfo.addOrEdit == '4' && this.editForm.orderStatus != 3) {
params.contractNo = '' params.contractNo = ''
} else { } else {
params.contractNo = this.routeInfo.contractNo params.contractNo = this.routeInfo.contractNo
...@@ -925,7 +1033,7 @@ export default { ...@@ -925,7 +1033,7 @@ export default {
params.contractNo = '' params.contractNo = ''
} }
this.$apis.beforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => { this.$apis.beforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => {
if(res.code == '0') { if (res.code == '0') {
this.updateEquity(params) this.updateEquity(params)
} else { } else {
this.submit = false this.submit = false
...@@ -964,7 +1072,7 @@ export default { ...@@ -964,7 +1072,7 @@ export default {
} }
} }
this.$apis.beforeSale.getDefaultCarbrandApi({}).then(res => { this.$apis.beforeSale.getDefaultCarbrandApi({}).then(res => {
if(res) { if (res) {
this.defaultBrandForm.vehicleBrandId = res.vehicleBrandId this.defaultBrandForm.vehicleBrandId = res.vehicleBrandId
this.defaultBrandForm.vehicleSubBrandId = res.vehicleSubBrandId this.defaultBrandForm.vehicleSubBrandId = res.vehicleSubBrandId
// if(this.routeInfo.addOrEdit == '1') { // if(this.routeInfo.addOrEdit == '1') {
...@@ -973,7 +1081,7 @@ export default { ...@@ -973,7 +1081,7 @@ export default {
if (this.editForm.vehicle.vehicleBrandId) { if (this.editForm.vehicle.vehicleBrandId) {
this.baseData.carChildOptions = this.allCarChildList.find(item => item.id == this.editForm.vehicle.vehicleBrandId).childs this.baseData.carChildOptions = this.allCarChildList.find(item => item.id == this.editForm.vehicle.vehicleBrandId).childs
} }
if(this.editForm.vehicle.vehicleSubBrandId) { if (this.editForm.vehicle.vehicleSubBrandId) {
this.getCarSeriesList(true) this.getCarSeriesList(true)
} }
} }
...@@ -991,44 +1099,13 @@ export default { ...@@ -991,44 +1099,13 @@ export default {
} }
} }
</script> </script>
<style> <style lang="scss" scoped>
/* 客服 - start */ .edit-equity {
.before-sale .help-service { margin-top: 17px;
position: fixed;
z-index: 9999;
font-size: 14px;
color: #333333;
top: 10%;
right: 10px;
width: 144px;
height: 268px;
text-align: center;
background: #FFFFFF;
border: 1px solid rgb(220, 223, 230, 0.5);
box-shadow: 0px 3px 6px -4px rgba(0,0,0,0.12);
} }
.help-service .service-img {
width: 124px;
height: 124px;
margin: 16px 0;
}
.help-service p {
margin: 0;
}
.help-service .service-hotline {
margin: 16px 0 5px;
font-size: 16px;
font-weight: bold;
}
.help-service .service-phone {
color: #5850FF;
}
/* 客服 - end */
.before-sale .container { .before-sale .container {
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
margin-bottom: 20px;
} }
.before-sale .edit-container { .before-sale .edit-container {
...@@ -1066,9 +1143,10 @@ export default { ...@@ -1066,9 +1143,10 @@ export default {
.before-sale .edit-title { .before-sale .edit-title {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: 600;
height: 48px; padding: 15px 20px;
line-height: 48px; // height: 48px;
// line-height: 48px;
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #e7eaec;
margin: 0 0; margin: 0 0;
} }
...@@ -1171,4 +1249,26 @@ export default { ...@@ -1171,4 +1249,26 @@ export default {
cursor: pointer; cursor: pointer;
} }
/* 表格 */ /* 表格 */
.m-t-10 {
margin-top: 10px;
}
.fixed_bottom {
position: fixed;
width: 100%;
bottom: 0px;
height: 82px;
// display: flex;
// align-items: center;
// justify-content: center;
background: #ffffff;
z-index: 999;
// box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
.ma_top{
height: 4px;
background: #F4F5FA;
}
.ma_bot{
height: 78px;
}
}
</style> </style>
<!-- 权益订单列表 --> <!-- 权益订单列表 -->
<template> <template>
<div class="before-sale"> <div class="before-sale">
<div class="flex m-b-20"> <div class="flex m-b-10">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增权益</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增权益</el-button>
<div class="table-top-tips"><span class="el-icon-warning"></span>请注意:订单列表还有{{countNoData}}单未上传客户凭证等资料,若发生事故无法获得补偿,请尽快在列表操作-上传资料中完善。</div> <!-- <div class="table-top-tips"><span class="el-icon-warning"></span>请注意:订单列表还有{{countNoData}}单未上传客户凭证等资料,若发生事故无法获得补偿,请尽快在列表操作-上传资料中完善。</div> -->
</div> </div>
<div class="container"> <div class="container">
<div> <div class="find_wrap">
<glsx-combi-form ref="showSearch" labelWidth="110px" defaultWidth="210px" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData"> <glsx-combi-form ref="showSearch" labelWidth="110px" defaultWidth="215px" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns">
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button> <el-button :size="size" @click="handleExport">导出</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope"> <div class="table_wrapper">
<el-button v-if="[2, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(5, scope.scope)">查看</el-button> <GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button> <div class="table-btns" slot="table-btns" slot-scope="scope">
<el-button v-if="[2].includes(scope.scope.orderStatus)" style="position: relative;" type="text" @click="handleUpload(scope.scope)">上传资料<span v-show="scope.scope.dataPerfection == 0" class="circule-tips"></span></el-button> <el-button v-if="[2, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(5, scope.scope)">查看</el-button>
<el-button v-if="[0].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> <el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(3, scope.scope)">修改</el-button> <el-button v-if="[2].includes(scope.scope.orderStatus)" style="position: relative" type="text" @click="handleUpload(scope.scope)">
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退单</el-button> 上传资料
<el-button v-if="[3, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(4, scope.scope)">重新提单</el-button> <span v-show="scope.scope.dataPerfection == 0" class="circule-tips"></span>
</div> </el-button>
</GLTable> <el-button v-if="[0].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(3, scope.scope)">修改</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退单</el-button>
<el-button v-if="[3, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(4, scope.scope)">重新提单</el-button>
</div>
</GLTable>
</div>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog> <pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
<glsx-dialog title="上传资料" :isVisible.sync="isFileVisible" width="547px" :noCancel="noCancel" btnOkLabel="关闭" @confirmDialog="handleUploadFileClose" @closeDialog="handleUploadFileClose"> <glsx-dialog title="上传资料" :isVisible.sync="isFileVisible" width="547px" :noCancel="noCancel" btnOkLabel="关闭" @confirmDialog="handleUploadFileClose" @closeDialog="handleUploadFileClose">
<div style="height: 284px; overflow-y: scroll;"> <div style="height: 284px; overflow-y: scroll">
<glsx-combi-form labelWidth="300px" :isBlock="isBlock" ref="uploadFormRef" formRef="uploadChildRef" :formRules="uploadRule" :formObj.sync="uploadForm" :formData="uploadFormData"></glsx-combi-form> <glsx-combi-form labelWidth="300px" :isBlock="isBlock" ref="uploadFormRef" formRef="uploadChildRef" :formRules="uploadRule" :formObj.sync="uploadForm" :formData="uploadFormData"></glsx-combi-form>
</div> </div>
</glsx-dialog> </glsx-dialog>
...@@ -40,13 +45,13 @@ ...@@ -40,13 +45,13 @@
<div class="f-size"> <div class="f-size">
<i v-show="editNotify.code == '0'" class="el-icon-success"></i> <i v-show="editNotify.code == '0'" class="el-icon-success"></i>
<i v-show="editNotify.code != '0'" class="el-icon-error"></i> <i v-show="editNotify.code != '0'" class="el-icon-error"></i>
<span>{{editNotify.code == '0' ? '操作成功' : editNotify.message}}</span> <span>{{ editNotify.code == '0' ? '操作成功' : editNotify.message }}</span>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="isSecondVisible" width="400px" class="tips-dialog" top="30%" :title="secondObj.title"> <el-dialog :visible.sync="isSecondVisible" width="400px" class="tips-dialog" top="30%" :title="secondObj.title">
<div class="f-size"> <div class="f-size">
<i class="el-icon-warning"></i> <i class="el-icon-warning"></i>
<span>{{secondObj.txt}}</span> <span>{{ secondObj.txt }}</span>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button :size="size" @click="handleSecondCancel">取 消</el-button> <el-button :size="size" @click="handleSecondCancel">取 消</el-button>
...@@ -116,27 +121,31 @@ export default { ...@@ -116,27 +121,31 @@ export default {
} }
}, },
searchFormData: [ searchFormData: [
{ {
type: 'selectInput', type: 'selectInput',
selectName: 'nameOrNoOrVin', selectName: 'nameOrNoOrVin',
isClear: true, isClear: true,
inputWidth: '320px', inputWidth: '320px',
selectWidth: '110px', selectWidth: '110px',
selectOption: [{ selectOption: [
label: '客户姓名', {
name: 'customerName' label: '客户姓名',
}, { name: 'customerName'
label: '合同号', },
name: 'contractNo' {
}, { label: '合同号',
label: '车架号', name: 'contractNo'
name: 'vin' },
}], {
handleSelectChange: (value) => { label: '车架号',
this.searchSelectObj.nameOrNoOrVin.value = '' name: 'vin'
} }
}, ],
{ handleSelectChange: value => {
this.searchSelectObj.nameOrNoOrVin.value = ''
}
},
{
label: '服务状态', label: '服务状态',
name: 'orderStatus', name: 'orderStatus',
type: 'select', type: 'select',
...@@ -166,92 +175,92 @@ export default { ...@@ -166,92 +175,92 @@ export default {
name: 'effectiveDate', name: 'effectiveDate',
type: 'datePicker', type: 'datePicker',
isClear: true isClear: true
},
{
label: '财务审核状态',
name: 'auditStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'auditStatusList'
},
{
label: '上传资料',
name: 'dataPerfection',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'dataPerfectionList'
},
{
label: '总部',
name: 'merchantId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'merchantList',
isHide: true,
changeAttr: (val, targetItem) => {
var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['2'])
this.searchFormData[idx].isHide = false
this.searchForm[this.levelToShow['2']] = ''
var tempIdx = ''
for(var i = 3; i <= 4; i++) {
tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow[i + ''])
this.searchFormData[tempIdx].isHide = true
this.searchForm[this.levelToShow[i + '']] = ''
}
this.getMerchantList(val, 2, this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
}
},
{
label: '大区',
name: 'dqtId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'dqList',
isHide: true,
changeAttr: (val, targetItem) => {
var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['3'])
this.searchFormData[idx].isHide = false
this.searchForm[this.levelToShow['3']] = ''
var tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow['4'])
this.searchFormData[tempIdx].isHide = true
this.searchForm[this.levelToShow['4']] = ''
this.getMerchantList(val, 3, this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
}
},
{
label: '片区',
name: 'pqId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'pqList',
isHide: true,
changeAttr: (val, targetItem) => {
var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['4'])
this.searchFormData[idx].isHide = false
this.searchForm[this.levelToShow['4']] = ''
this.getMerchantList(val, 4, this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
}
},
{
label: '门店',
name: 'mdId',
type: 'select',
optionList: [],
optionId: 'merchantNo',
optionLabel: 'merchantName',
optionsName: 'mdList',
isHide: true
} }
// {
// label: '财务审核状态',
// name: 'auditStatus',
// type: 'select',
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'auditStatusList'
// },
// {
// label: '上传资料',
// name: 'dataPerfection',
// type: 'select',
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'dataPerfectionList'
// },
// {
// label: '总部',
// name: 'merchantId',
// type: 'select',
// optionList: [],
// optionId: 'merchantNo',
// optionLabel: 'merchantName',
// optionsName: 'merchantList',
// isHide: true,
// changeAttr: (val, targetItem) => {
// var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['2'])
// this.searchFormData[idx].isHide = false
// this.searchForm[this.levelToShow['2']] = ''
// var tempIdx = ''
// for(var i = 3; i <= 4; i++) {
// tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow[i + ''])
// this.searchFormData[tempIdx].isHide = true
// this.searchForm[this.levelToShow[i + '']] = ''
// }
// this.getMerchantList(val, 2, this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
// }
// },
// {
// label: '大区',
// name: 'dqtId',
// type: 'select',
// optionList: [],
// optionId: 'merchantNo',
// optionLabel: 'merchantName',
// optionsName: 'dqList',
// isHide: true,
// changeAttr: (val, targetItem) => {
// var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['3'])
// this.searchFormData[idx].isHide = false
// this.searchForm[this.levelToShow['3']] = ''
// var tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow['4'])
// this.searchFormData[tempIdx].isHide = true
// this.searchForm[this.levelToShow['4']] = ''
// this.getMerchantList(val, 3, this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
// }
// },
// {
// label: '片区',
// name: 'pqId',
// type: 'select',
// optionList: [],
// optionId: 'merchantNo',
// optionLabel: 'merchantName',
// optionsName: 'pqList',
// isHide: true,
// changeAttr: (val, targetItem) => {
// var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['4'])
// this.searchFormData[idx].isHide = false
// this.searchForm[this.levelToShow['4']] = ''
// this.getMerchantList(val, 4, this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
// }
// },
// {
// label: '门店',
// name: 'mdId',
// type: 'select',
// optionList: [],
// optionId: 'merchantNo',
// optionLabel: 'merchantName',
// optionsName: 'mdList',
// isHide: true
// }
], ],
// 表格 // 表格
getListApi: this.$apis.beforeSale.getListApi, getListApi: this.$apis.beforeSale.getListApi,
...@@ -262,7 +271,6 @@ export default { ...@@ -262,7 +271,6 @@ export default {
{ {
label: '车主姓名', label: '车主姓名',
prop: 'customerName', prop: 'customerName',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.customerName || '-' return cellValue.customerName || '-'
} }
...@@ -271,25 +279,22 @@ export default { ...@@ -271,25 +279,22 @@ export default {
label: '合同号', label: '合同号',
prop: 'contractNo', prop: 'contractNo',
width: '200px', width: '200px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return [2, 4, 5].includes(cellValue.orderStatus) ? (cellValue.contractNo || '-') : '-' return [2, 4, 5].includes(cellValue.orderStatus) ? cellValue.contractNo || '-' : '-'
} }
}, },
{ {
label: '提单成功时间', label: '提单成功时间',
prop: 'successDate', prop: 'successDate',
width: '160px', width: '160px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.successDate ? dayjs(cellValue.successDate).format('YYYY-MM-DD HH:mm:ss') : '-' return cellValue.successDate ? dayjs(cellValue.successDate).format('YYYY-MM-DD HH:mm:ss') : '-'
} }
}, },
{ {
label: '新车开票日期', label: '购车日期',
prop: 'billingDate', prop: 'billingDate',
width: '130px', width: '130px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.billingDate ? dayjs(cellValue.billingDate).format('YYYY-MM-DD') : '-' return cellValue.billingDate ? dayjs(cellValue.billingDate).format('YYYY-MM-DD') : '-'
} }
...@@ -298,7 +303,6 @@ export default { ...@@ -298,7 +303,6 @@ export default {
label: '店面名称', label: '店面名称',
prop: 'merchantName', prop: 'merchantName',
width: '160px', width: '160px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.merchantName || '-' return cellValue.merchantName || '-'
} }
...@@ -307,7 +311,6 @@ export default { ...@@ -307,7 +311,6 @@ export default {
label: '车品牌', label: '车品牌',
prop: 'vehicleBrandName', prop: 'vehicleBrandName',
width: '160px', width: '160px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.vehicleBrandName || '-' return cellValue.vehicleBrandName || '-'
} }
...@@ -315,13 +318,20 @@ export default { ...@@ -315,13 +318,20 @@ export default {
{ {
label: '车系', label: '车系',
prop: 'vehicleSeriesName', prop: 'vehicleSeriesName',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.vehicleSeriesName || '-' return cellValue.vehicleSeriesName || '-'
} }
}, },
{
label: '无忧卡卡号',
prop: 'carNo',
width: '200px',
formatter: cellValue => {
return cellValue.carNo || '-'
}
},
{ {
label: '车架', label: '车架号',
prop: 'vin', prop: 'vin',
line: 1, line: 1,
width: '200px', width: '200px',
...@@ -333,7 +343,6 @@ export default { ...@@ -333,7 +343,6 @@ export default {
label: '电话', label: '电话',
prop: 'customerPhone', prop: 'customerPhone',
width: '160px', width: '160px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.customerPhone || '-' return cellValue.customerPhone || '-'
} }
...@@ -341,24 +350,30 @@ export default { ...@@ -341,24 +350,30 @@ export default {
{ {
label: '产品名称', label: '产品名称',
prop: 'packageName', prop: 'packageName',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.packageName || '-' return cellValue.packageName || '-'
} }
}, },
{ {
label: '实际销售价', label: '无忧保障服务费',
prop: 'actualSalesPrice', prop: 'actualSalesPrice',
width: '160px', width: '160px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.actualSalesPrice ? (cellValue.actualSalesPrice / 100).toFixed(2) : '-' return cellValue.actualSalesPrice ? (cellValue.actualSalesPrice / 100).toFixed(2) : '-'
} }
}, },
// {
// label: '实际销售价',
// prop: 'actualSalesPrice',
// width: '160px',
// line: 1,
// formatter: cellValue => {
// return cellValue.actualSalesPrice ? (cellValue.actualSalesPrice / 100).toFixed(2) : '-'
// }
// },
{ {
label: '服务期限', label: '服务期限',
prop: 'servicePeriod', prop: 'servicePeriod',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.servicePeriod ? '1年' : '-' return cellValue.servicePeriod ? '1年' : '-'
} }
...@@ -367,71 +382,67 @@ export default { ...@@ -367,71 +382,67 @@ export default {
label: '生效时间', label: '生效时间',
prop: 'effectiveDate', prop: 'effectiveDate',
width: '130px', width: '130px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '-' return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '-'
} }
}, },
{ {
label: '状态', label: '服务状态',
prop: 'orderStatus', prop: 'orderStatus',
width: '100px', width: '100px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return this.baseData.orderStatusList.map(item => item.confId).includes(cellValue.orderStatus) ? this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName : '-' return this.baseData.orderStatusList.map(item => item.confId).includes(cellValue.orderStatus) ? this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName : '-'
} }
}, },
// {
// label: '审核状态',
// prop: 'auditStatus',
// width: '100px',
// line: 1,
// formatter: cellValue => {
// var auditStatusTxt = '-'
// if ([2, 4, 5].includes(cellValue.orderStatus)) {
// auditStatusTxt = this.baseData.auditStatusList.map(item => item.confId).includes(cellValue.auditStatus) ? this.baseData.auditStatusList.find(item => item.confId == cellValue.auditStatus).confName : '-'
// }
// return auditStatusTxt
// }
// },
// {
// label: '审核人',
// prop: 'auditBy',
// width: '140px',
// line: 1,
// formatter: cellValue => {
// return cellValue.auditBy || '-'
// }
// },
// {
// label: '门店编码',
// prop: 'sap',
// line: 1,
// formatter: cellValue => {
// return cellValue.sap || '-'
// }
// },
// {
// label: '实际销售人员',
// prop: 'actualSalesPerson',
// width: '160',
// line: 1,
// formatter: cellValue => {
// return cellValue.actualSalesPerson || '-'
// }
// },
{ {
label: '审核状态', label: '省代',
prop: 'auditStatus',
width: '100px',
line: 1,
formatter: cellValue => {
var auditStatusTxt = '-'
if([2, 4, 5].includes(cellValue.orderStatus)) {
auditStatusTxt = this.baseData.auditStatusList.map(item => item.confId).includes(cellValue.auditStatus) ? this.baseData.auditStatusList.find(item => item.confId == cellValue.auditStatus).confName : '-'
}
return auditStatusTxt
}
},
{
label: '审核人',
prop: 'auditBy',
width: '140px',
line: 1,
formatter: cellValue => {
return cellValue.auditBy || '-'
}
},
{
label: '门店编码',
prop: 'sap',
line: 1,
formatter: cellValue => {
return cellValue.sap || '-'
}
},
{
label: '实际销售人员',
prop: 'actualSalesPerson',
width: '160',
line: 1,
formatter: cellValue => {
return cellValue.actualSalesPerson || '-'
}
},
{
label: '大区',
prop: 'provinceMerchantName', prop: 'provinceMerchantName',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.provinceMerchantName || '-' return cellValue.provinceMerchantName || '-'
} }
}, },
{ {
label: '片区', label: '市代',
prop: 'cityMerchantName', prop: 'cityMerchantName',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.cityMerchantName || '-' return cellValue.cityMerchantName || '-'
} }
...@@ -440,7 +451,6 @@ export default { ...@@ -440,7 +451,6 @@ export default {
label: '操作人', label: '操作人',
prop: 'updatedBy', prop: 'updatedBy',
width: '140px', width: '140px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.updatedBy || '-' return cellValue.updatedBy || '-'
} }
...@@ -516,13 +526,16 @@ export default { ...@@ -516,13 +526,16 @@ export default {
mounted() { mounted() {
this.editNotify = this.$route.params this.editNotify = this.$route.params
if(this.isFirst && this.editNotify.hasOwnProperty('code')) { if (this.isFirst && this.editNotify.hasOwnProperty('code')) {
this.isFirst = false this.isFirst = false
this.isTipVisible = true this.isTipVisible = true
clearTimeout(this.timer) clearTimeout(this.timer)
this.timer = setTimeout(() => { this.timer = setTimeout(
this.isTipVisible = false () => {
}, this.editNotify.code == '0' ? 1500 : 3000) this.isTipVisible = false
},
this.editNotify.code == '0' ? 1500 : 3000
)
} }
this.$apis.beforeSale.getProListApi({}).then(res => { this.$apis.beforeSale.getProListApi({}).then(res => {
this.baseData.goodsStatusList = res this.baseData.goodsStatusList = res
...@@ -531,7 +544,7 @@ export default { ...@@ -531,7 +544,7 @@ export default {
this.getCountNoData() this.getCountNoData()
this.$apis.beforeSale.getUserInfoApi({}).then(res => { this.$apis.beforeSale.getUserInfoApi({}).then(res => {
this.userInfo = res this.userInfo = res
if(res.merchantAccountLevel != 4) { if (res.merchantAccountLevel != 4) {
var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow[this.userInfo.admin ? res.merchantAccountLevel : res.merchantAccountLevel + 1]) var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow[this.userInfo.admin ? res.merchantAccountLevel : res.merchantAccountLevel + 1])
this.searchFormData[idx].isHide = false this.searchFormData[idx].isHide = false
this.getMerchantList('', '', this.searchFormData[idx].name, this.searchFormData[idx].optionsName) this.getMerchantList('', '', this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
...@@ -572,8 +585,8 @@ export default { ...@@ -572,8 +585,8 @@ export default {
...tempParams ...tempParams
} }
// 商户-merchantId // 商户-merchantId
for(var i = 1; i <= 4; i++) { for (var i = 1; i <= 4; i++) {
if(this.searchForm[this.levelToShow[i]]) { if (this.searchForm[this.levelToShow[i]]) {
params.merchantId = this.searchForm[this.levelToShow[i]] params.merchantId = this.searchForm[this.levelToShow[i]]
params.accountLevel = i params.accountLevel = i
} }
...@@ -641,9 +654,12 @@ export default { ...@@ -641,9 +654,12 @@ export default {
this.isTipVisible = true this.isTipVisible = true
this.editNotify = res this.editNotify = res
clearTimeout(this.timer) clearTimeout(this.timer)
this.timer = setTimeout(() => { this.timer = setTimeout(
this.isTipVisible = false () => {
}, this.editNotify.code == '0' ? 1500 : 3000) this.isTipVisible = false
},
this.editNotify.code == '0' ? 1500 : 3000
)
if (res.code == '0') { if (res.code == '0') {
this.handleSearch() this.handleSearch()
} }
...@@ -666,8 +682,8 @@ export default { ...@@ -666,8 +682,8 @@ export default {
} }
let paraFormat = { let paraFormat = {
addOrEdit, addOrEdit,
contractNo:addOrEdit==1?-1: row.contractNo, contractNo: addOrEdit == 1 ? -1 : row.contractNo,
isSuper:this.userInfo.admin isSuper: this.userInfo.admin
} }
const urlpara = encodeURIComponent(JSON.stringify(paraFormat)) const urlpara = encodeURIComponent(JSON.stringify(paraFormat))
addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + urlpara) : this.$router.push('/beforeSale/editEquity/' + urlpara) addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + urlpara) : this.$router.push('/beforeSale/editEquity/' + urlpara)
...@@ -687,9 +703,12 @@ export default { ...@@ -687,9 +703,12 @@ export default {
message: '财务未审核,合同无法打印' message: '财务未审核,合同无法打印'
} }
clearTimeout(this.timer) clearTimeout(this.timer)
this.timer = setTimeout(() => { this.timer = setTimeout(
this.isTipVisible = false () => {
}, this.editNotify.code == '0' ? 1500 : 3000) this.isTipVisible = false
},
this.editNotify.code == '0' ? 1500 : 3000
)
return true return true
} }
this.handlePdfClose() this.handlePdfClose()
...@@ -813,8 +832,8 @@ export default { ...@@ -813,8 +832,8 @@ export default {
} }
var tempIdx = '' var tempIdx = ''
var addNum = this.userInfo.admin ? 1 : 2 var addNum = this.userInfo.admin ? 1 : 2
if(this.userInfo.merchantAccountLevel != 4) { if (this.userInfo.merchantAccountLevel != 4) {
for(var i = this.userInfo.merchantAccountLevel + addNum; i <= 4; i++) { for (var i = this.userInfo.merchantAccountLevel + addNum; i <= 4; i++) {
tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow[i + '']) tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow[i + ''])
this.searchFormData[tempIdx].isHide = true this.searchFormData[tempIdx].isHide = true
this.searchForm[this.levelToShow[i + '']] = '' this.searchForm[this.levelToShow[i + '']] = ''
...@@ -826,23 +845,35 @@ export default { ...@@ -826,23 +845,35 @@ export default {
} }
</script> </script>
<style> <style lang="scss" scoped>
.before-sale { .before-sale {
margin-top: 17px; margin-top: 17px;
} }
.before-sale .flex { .before-sale .flex {
display: flex; display: flex;
} }
.before-sale .container { .find_wrap {
padding: 0px 20px 20px 40px;
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px 20px 2px 20px;
.resetBtn {
background: #ffffff;
color: #5850ff;
border: 1px solid #5850ff;
}
.m-r-l-20 {
margin: 0 20px;
}
}
.table_wrapper{
margin-top: 10px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px; padding: 20px;
} }
.before-sale .m-b-20 { .before-sale .m-b-10 {
margin-bottom: 20px; margin-bottom: 10px;
} }
.before-sale .table-top-tips { .before-sale .table-top-tips {
...@@ -852,8 +883,8 @@ export default { ...@@ -852,8 +883,8 @@ export default {
height: 32px; height: 32px;
line-height: 30px; line-height: 30px;
font-size: 12px; font-size: 12px;
background-color: #FFF0BB; background-color: #fff0bb;
border: 1px solid #FFCA78; border: 1px solid #ffca78;
padding: 0 10px; padding: 0 10px;
border-radius: 2px; border-radius: 2px;
} }
......
<!-- 店面服务设置 --> <!-- 店面服务设置 -->
<template> <template>
<div class="before-sale edit-equity"> <div class="edit-equity">
<div class="container edit-container"> <div class="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="320px" 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: 320px" 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" />
</el-select> </el-select>
</template> </template>
<template slot="vehicleSubBrandId"> <template slot="vehicleSubBrandId">
<el-select v-model="editForm.vehicleSubBrandId" placeholder="请选择子品牌" filterable style="width:160px;" clearable> <el-select v-model="editForm.vehicleSubBrandId" placeholder="请选择子品牌" filterable style="width: 320px" clearable>
<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>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div
class="fixed_bottom"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button>
</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%' }">
<el-button type="primary" @click="handleConfirm">确定</el-button> <el-button type="primary" @click="handleConfirm">确定</el-button>
</div> </div> -->
</div> </div>
</template> </template>
...@@ -55,7 +64,7 @@ export default { ...@@ -55,7 +64,7 @@ export default {
], ],
editFormDataCar: [ editFormDataCar: [
{ {
label: '主营品牌', label: '品牌',
name: 'vehicleBrandId', name: 'vehicleBrandId',
addHtml: 'vehicleBrandId' addHtml: 'vehicleBrandId'
}, },
...@@ -86,6 +95,8 @@ export default { ...@@ -86,6 +95,8 @@ export default {
mounted() { mounted() {
this.getHotline() this.getHotline()
// this.getDefaultCarbrand() // this.getDefaultCarbrand()
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
}, },
methods: { methods: {
...@@ -97,7 +108,7 @@ export default { ...@@ -97,7 +108,7 @@ export default {
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 +144,8 @@ export default { ...@@ -133,8 +144,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()
...@@ -145,57 +156,59 @@ export default { ...@@ -145,57 +156,59 @@ export default {
} }
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.before-sale .container { .edit-equity {
padding: 0px 20px 20px 40px; margin-top: 17px;
width: 100%;
height: calc(100% - 108px);
}
.edit-container {
width: 100%;
height: 100%;
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
} }
/* .before-sale .edit-equity{
.before-sale .edit-container { height: 100vh;
margin-bottom: 84px; }
.before-sale .container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
} }
.before-sale .edit-form-container { .before-sale .edit-form-container {
margin-top: 20px; margin-top: 20px;
} } */
.before-sale .txt-center { /* .before-sale .footer {
text-align: center;
}
.before-sale .footer {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 64px; height: 64px;
/* left: 220px; */
text-align: center; text-align: center;
line-height: 64px; line-height: 64px;
background: #ffffff; background: #ffffff;
z-index: 999; z-index: 999;
} } */
.before-sale .flex { /* .before-sale .flex {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.before-sale .flex-grow { .before-sale .flex-grow {
flex: 1; flex: 1;
} } */
.before-sale .edit-title { .edit-title {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: 600;
height: 48px; border-bottom: 1px solid #e7eaec;
line-height: 48px; padding: 15px 20px;
border-bottom: 1px solid #E7EAEC; margin-bottom: 32px;
margin: 0 0;
} }
.before-sale .edit-sub-title { /* .before-sale .edit-sub-title {
position: relative; position: relative;
font-size: 13px; font-size: 13px;
font-weight: 700; font-weight: 700;
...@@ -205,21 +218,33 @@ export default { ...@@ -205,21 +218,33 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
padding-left: 8px; padding-left: 8px;
background-color: rgba(242, 242, 242, 1); background-color: rgba(242, 242, 242, 1);
} } */
.before-sale .message-Z-zinde { /* .before-sale .message-Z-zinde {
z-index: 3000 !important; z-index: 3000 !important;
} } */
.before-sale .txt-red { /* .before-sale .txt-red {
color: red; color: red;
} } */
.one-line-ellipsis { /* .one-line-ellipsis {
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} */
.fixed_bottom {
position: fixed;
width: 100%;
bottom: 0px;
height: 78px;
display: flex;
align-items: center;
justify-content: center;
background: #ffffff;
z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!