Commit 0fa678aa by 张权

核赔简易版

1 parent 3e21eee1
...@@ -325,7 +325,7 @@ const spaAgressData = params => { ...@@ -325,7 +325,7 @@ const spaAgressData = params => {
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true
}) })
} }
...@@ -336,39 +336,95 @@ const merchantInfo = params => { ...@@ -336,39 +336,95 @@ const merchantInfo = params => {
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true
}) })
} }
// 卡号---获取期限 // 卡号---获取期限
const dateBycarNo = params => { const dateBycarNo = params => {
params.method = 'scrm.api.equity.service.cfc.get.by.seqno' params.method = 'scrm.api.equity.service.cfc.get.by.seqno'
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true
}) })
} }
// 获取活码列表- // 获取活码列表-
const activeCodeList = params => { const activeCodeList = params => {
params.method = 'entmicro.api.code.getFreeChannelCode' params.method = 'entmicro.api.code.getFreeChannelCode'
return http({ return http({
url: 'rop-scrm-entmicro/router', url: 'rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true
}) })
} }
// 更新活码 // 更新活码
const updateActiveCode = params => { const updateActiveCode = params => {
params.method = 'scrm.api.equity.service.merchant.qrcode.update' params.method = 'scrm.api.equity.service.merchant.qrcode.update'
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true
})
}
const getWriteOffList = params => {
params.method = `scrm.api.equity.service.claims.list`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 导出核赔列表
const exportWriteOffData = params => {
params.method = `scrm.api.equity.service.claims.list.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true, sign: true,
returnAll: true
}) })
} }
// 核赔判断并获取服务
const getWriteOffService = params => {
params.method = `scrm.api.equity.service.claims.create.before.init`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取核赔订单详情
const getWriteOffDetail = params => {
params.method = `scrm.api.equity.service.claims.detail`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 保存核赔订单
const saveWriteOff = params => {
params.method = `scrm.api.equity.service.claims.save`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo,activeCodeList,updateActiveCode }
\ No newline at end of file \ No newline at end of file
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo, activeCodeList, updateActiveCode, getWriteOffList, exportWriteOffData, getWriteOffService, getWriteOffDetail, saveWriteOff }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/ /*滚动条里面小方块*/
border-radius: 4px; border-radius: 4px;
background-color: rgba(144, 147, 153, .3); background-color: rgba(144, 147, 153, 0.3);
} }
.h1_title { .h1_title {
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
.h6_title { .h6_title {
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
color: #3A3A3A; color: #3a3a3a;
} }
.h7_title { .h7_title {
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
.h8_title { .h8_title {
font-size: 24px; font-size: 24px;
font-weight: 600; font-weight: 600;
color: #3A3A3A; color: #3a3a3a;
} }
.h9_title { .h9_title {
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
.h10_title { .h10_title {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #3A3A3A; color: #3a3a3a;
} }
.h11_title { .h11_title {
...@@ -92,19 +92,19 @@ ...@@ -92,19 +92,19 @@
.h14_title { .h14_title {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #37383A; color: #37383a;
} }
.h15_title { .h15_title {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #5850FF; color: #5850ff;
} }
.h16_title { .h16_title {
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: 500;
color: #5850FF; color: #5850ff;
} }
.h17_title { .h17_title {
...@@ -161,20 +161,32 @@ ...@@ -161,20 +161,32 @@
flex-direction: column; flex-direction: column;
} }
.el-message{ .el-message {
z-index: 3000!important; z-index: 3000 !important;
} }
.customConfirm{ .customConfirm {
.el-message-box__btns button:nth-child(2) { .el-message-box__btns button:nth-child(2) {
margin-left: 20px; margin-left: 20px;
} }
} }
.el-message.el-message--error.customMessage{ .el-message.el-message--error.customMessage {
&>p{ & > p {
&>p{ & > p {
white-space: nowrap; white-space: nowrap;
} }
} }
} }
.my-footer {
width: 100%;
position: fixed;
bottom: 0;
height: 64px;
left: 0;
text-align: center;
line-height: 64px;
background: #ffffff;
z-index: 0;
}
<!-- 搜索 --> <!-- 搜索 -->
<template> <template>
<div class="glsx-combi-form"> <div class="glsx-combi-form">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block"> <el-form @submit.native.prevent :ref="formRef" :inline="true" :model="formObj" :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" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px': '30px', ...item.style }" :label="item.label" :prop="item.name"> <el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :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'">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
{{ item.label }} {{ item.label }}
</span> </span>
<span v-else-if="!item.isHide && item.label" slot="label"> <span v-else-if="!item.isHide && item.label" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth ? (item.labelWidth + labelPaddingRight) + 'px' : '', 'padding-right': isEdit ? '12px' : (labelPaddingRight + 'px') }">{{ item.label }}</span> <span class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}</span>
</span> </span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot> <slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<div v-else-if="item.type === 'input'"> <div v-else-if="item.type === 'input'">
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
<!-- 选择-输入框 --> <!-- 选择-输入框 -->
<el-input v-else-if="item.type === 'selectInput'" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" :maxlength="item.maxlength" v-model.trim="searchSelectObj[item.selectName].value" :clearable="item.isClear || false" :style="{ width: item.inputWidth || defaultWidth }" class="input-with-select"> <el-input v-else-if="item.type === 'selectInput'" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" :maxlength="item.maxlength" v-model.trim="searchSelectObj[item.selectName].value" :clearable="item.isClear || false" :style="{ width: item.inputWidth || defaultWidth }" class="input-with-select">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange"> <el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || labelWidth + 'px' }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option> <el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select> </el-select>
</el-input> </el-input>
...@@ -57,6 +57,11 @@ ...@@ -57,6 +57,11 @@
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio> <el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group> </el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" :disabled="item.isDisabled" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker> <el-date-picker v-else-if="item.type === 'datePicker'" :disabled="item.isDisabled" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker>
<!-- 当存在range-separato,start-placeholder,end-placeholder这几个属性时,日期可以限制,时间不可以限制 -->
<el-date-picker v-else-if="item.type === 'limitDatePicker'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.selectWidth || defaultWidth }" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]" @change="e => handleDateChange(e, item)" @focus="e => item.focus(e)"></el-date-picker>
<el-checkbox-group v-else-if="item.type === 'checkbox'" v-model="formObj[item.name]">
<el-checkbox v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionId]" :border="item.border">{{ subItem[item.optionLabel] }}</el-checkbox>
</el-checkbox-group>
<template v-else-if="item.type === 'upload'"> <template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p> <p class="photo-top-tips">{{ item.topTips }}</p>
<div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }"> <div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }">
...@@ -102,7 +107,7 @@ ...@@ -102,7 +107,7 @@
<el-dialog v-if="isImgVisible" :append-to-body="true" :modal-append-to-body="true" title="查看" :visible.sync="isImgVisible"> <el-dialog v-if="isImgVisible" :append-to-body="true" :modal-append-to-body="true" title="查看" :visible.sync="isImgVisible">
<div class="dialog-look"> <div class="dialog-look">
<video v-if="dialogObj.uploadType == 'video'" class="dialog-video" controls> <video v-if="dialogObj.uploadType == 'video'" class="dialog-video" controls>
<source :src="dialogObj.url" type="video/mp4"> <source :src="dialogObj.url" type="video/mp4" />
</video> </video>
<img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" /> <img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" />
</div> </div>
...@@ -111,7 +116,7 @@ ...@@ -111,7 +116,7 @@
</template> </template>
<script> <script>
import { beforeRangePickerOptions, afterRangePickerOptions,afterTodayRangePickerOptions } from './common' import { beforeRangePickerOptions, afterRangePickerOptions, afterTodayRangePickerOptions } from './common'
export default { export default {
name: 'glsx-combi-form', name: 'glsx-combi-form',
data() { data() {
...@@ -185,8 +190,8 @@ export default { ...@@ -185,8 +190,8 @@ export default {
selectAddAttr(value, targetItem) { selectAddAttr(value, targetItem) {
targetItem.changeAttr && targetItem.changeAttr(value, targetItem) targetItem.changeAttr && targetItem.changeAttr(value, targetItem)
}, },
remoteMethod(value){ remoteMethod(value) {
console.log(value,111) console.log(value, 111)
}, },
handleInputDown(e, item) { handleInputDown(e, item) {
if (e.keyCode === 13 && item.hasOwnProperty('keyFn')) { if (e.keyCode === 13 && item.hasOwnProperty('keyFn')) {
...@@ -358,7 +363,7 @@ export default { ...@@ -358,7 +363,7 @@ export default {
.glsx-combi-form .activity-img { .glsx-combi-form .activity-img {
position: relative; position: relative;
color: #999999; color: #999999;
background-color: #F7F7F7; background-color: #f7f7f7;
border: 1px dotted #d9d9d9; border: 1px dotted #d9d9d9;
cursor: pointer; cursor: pointer;
} }
...@@ -438,16 +443,16 @@ export default { ...@@ -438,16 +443,16 @@ export default {
/* 图片上传 */ /* 图片上传 */
.glsx-combi-form .el-tag.el-tag--info .el-tag__close { .glsx-combi-form .el-tag.el-tag--info .el-tag__close {
color: #E8E8EA; color: #e8e8ea;
background-color: #5850ff !important; background-color: #5850ff !important;
} }
.glsx-combi-form .el-tag.el-tag--info { .glsx-combi-form .el-tag.el-tag--info {
border-color: #5850ff; border-color: #5850ff;
} }
.glsx-combi-form .el-tag--plain.el-tag--info .el-tag__close:hover { .glsx-combi-form .el-tag--plain.el-tag--info .el-tag__close:hover {
background-color: #E8E8EA; background-color: #e8e8ea;
} }
.glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover { .glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover {
background-color: #E8E8EA; background-color: #e8e8ea;
} }
</style> </style>
...@@ -72,6 +72,24 @@ const staticRoutes = Object.freeze([ ...@@ -72,6 +72,24 @@ const staticRoutes = Object.freeze([
meta: {} meta: {}
}, },
{ {
name: 'writeOffList',
path: '/ghPreSale/index',
component: resolve => require([`@/views/ghPreSale/writeOff/writeOffList`], resolve),
meta: {}
},
{
name: 'addwriteOff',
path: '/ghPreSale/writeOff/addwriteOff',
component: resolve => require([`@/views/ghPreSale/writeOff/addwriteOff`], resolve),
meta: {}
},
{
name: 'writeOffDetail',
path: '/ghPreSale/writeOff/writeOffDetail/:id',
component: resolve => require([`@/views/ghPreSale/writeOff/writeOffDetail`], resolve),
meta: {}
},
{
name: 'index', name: 'index',
path: '/expert/index', path: '/expert/index',
component: resolve => require([`@/views/expert/index.vue`], resolve), component: resolve => require([`@/views/expert/index.vue`], resolve),
......
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
</div> --> </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="144px" 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="144px" 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="144px" defaultWidth="215px" formRef="editChildRefBrand" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(7)" :formRules="editRuleCar"> <glsx-combi-form ref="editFormRefBrand" labelWidth="144px" 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:144px;" :disabled="scope.scope.isDisabled"> <el-select v-model="editForm.vehicle.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicle.vehicleBrandId)" style="width:144px;" :disabled="scope.scope.isDisabled">
...@@ -87,7 +86,7 @@ ...@@ -87,7 +86,7 @@
<div class="footer operate-btn"> <div class="footer operate-btn">
<el-button size="small" class="reset-btn" v-show="routeInfo.addOrEdit == '1'" @click="handleReset">重置</el-button> <el-button size="small" class="reset-btn" v-show="routeInfo.addOrEdit == '1'" @click="handleReset">重置</el-button>
<el-button size="small" v-show="!['3', '5'].includes(routeInfo.addOrEdit)" class="plain" @click="handleDraft">草稿</el-button> <el-button size="small" v-show="!['3', '5'].includes(routeInfo.addOrEdit)" class="plain" @click="handleDraft">草稿</el-button>
<el-button size="small" v-show="routeInfo.addOrEdit != '5'" type="primary" @click="handleConfirm">{{routeInfo.addOrEdit != '3' ? '提单' : '确定'}}</el-button> <el-button size="small" v-show="routeInfo.addOrEdit != '5'" type="primary" @click="handleConfirm">{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}</el-button>
<el-button v-if="routeInfo.addOrEdit != 5" size="small" @click="handleCancel">返回</el-button> <el-button v-if="routeInfo.addOrEdit != 5" size="small" @click="handleCancel">返回</el-button>
<el-button v-else size="small" type="primary" @click="handleCancel">返回</el-button> <el-button v-else size="small" type="primary" @click="handleCancel">返回</el-button>
</div> </div>
...@@ -148,30 +147,39 @@ export default { ...@@ -148,30 +147,39 @@ export default {
seatesNum: 5, seatesNum: 5,
billingDate: new Date() billingDate: new Date()
}, },
actualSalesPerson:'', actualSalesPerson: '',
actualSalesPersonId:'', actualSalesPersonId: '',
insuranceType: 'i' insuranceType: 'i'
}, },
// 车辆信息 // 车辆信息
editRuleCar: { editRuleCar: {
// licensing: [{ required: true, message: '请选择是否上牌', trigger: 'change' }], // licensing: [{ required: true, message: '请选择是否上牌', trigger: 'change' }],
licensePlate: [{ licensePlate: [
{
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
return value ? ((/.{7,8}/).test(value) ? callback() : callback(new Error('请输入7位或8位车牌号码'))) : callback() return value ? (/.{7,8}/.test(value) ? callback() : callback(new Error('请输入7位或8位车牌号码'))) : callback()
}, trigger: 'change' },
}], trigger: 'change'
vin: [{ required: true, message: '请输入车架号', trigger: 'change' }, }
],
vin: [
{ required: true, message: '请输入车架号', trigger: 'change' },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
return (/^[a-zA-Z0-9]{17}$/).test(value) ? callback() : callback(new Error('请输入17位数字和字母')) return /^[a-zA-Z0-9]{17}$/.test(value) ? callback() : callback(new Error('请输入17位数字和字母'))
}, trigger: 'change' },
}], trigger: 'change'
engineNo: [{ required: true, message: '请输入发动机号', trigger: 'change' }, }
],
engineNo: [
{ required: true, message: '请输入发动机号', trigger: 'change' },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
return (/^[a-zA-Z0-9]{6,16}$/).test(value) ? callback() : callback(new Error('请输入6-16位数字和字母组合')) return /^[a-zA-Z0-9]{6,16}$/.test(value) ? callback() : callback(new Error('请输入6-16位数字和字母组合'))
}, trigger: 'change' },
}], 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' }],
...@@ -263,24 +271,31 @@ export default { ...@@ -263,24 +271,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: [{ cardNo: [
{
required: true, required: true,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
return value ? callback() : callback(new Error('请输入' + (this.editForm.cardType == '1' ? '身份证' : '统一社会信息代码'))) return value ? callback() : callback(new Error('请输入' + (this.editForm.cardType == '1' ? '身份证' : '统一社会信息代码')))
}, trigger: 'change' },
trigger: 'change'
}, },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
return (/[a-zA-Z0-9]{18}/).test(value) ? callback() : callback(new Error('请输入18位数字或字母')) return /[a-zA-Z0-9]{18}/.test(value) ? callback() : callback(new Error('请输入18位数字或字母'))
}, trigger: 'change' },
}], trigger: 'change'
customerPhone: [{ required: true, message: '请输入联系号码', trigger: 'change' }, }
],
customerPhone: [
{ required: true, message: '请输入联系号码', trigger: 'change' },
{ {
validator: (rule, value, callback) => { 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}$/; 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('请输入正确的联系号码')) return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码'))
}, trigger: 'change' },
}], trigger: 'change'
}
],
customerAddress: [{ required: true, message: '请输入联系地址', trigger: 'change' }] customerAddress: [{ required: true, message: '请输入联系地址', trigger: 'change' }]
}, },
editFormDataUser: [ editFormDataUser: [
...@@ -420,7 +435,7 @@ export default { ...@@ -420,7 +435,7 @@ export default {
optionList: [], optionList: [],
optionId: 'userOneid', optionId: 'userOneid',
optionLabel: 'staffName', optionLabel: 'staffName',
changeAttr: (userOneid,targetItem)=>{ changeAttr: (userOneid, targetItem) => {
const target = targetItem.optionList.find(item => { const target = targetItem.optionList.find(item => {
return item.userOneid == userOneid return item.userOneid == userOneid
}) })
...@@ -433,12 +448,12 @@ export default { ...@@ -433,12 +448,12 @@ export default {
type: 'radio', type: 'radio',
optionList: [ optionList: [
{ {
confLabel:'无忧卡首保', confLabel: '无忧卡首保',
confId:'i' confId: 'i'
}, },
{ {
confLabel:'无忧卡续保', confLabel: '无忧卡续保',
confId:'c' confId: 'c'
} }
], ],
optionId: 'confId', optionId: 'confId',
...@@ -560,17 +575,17 @@ export default { ...@@ -560,17 +575,17 @@ export default {
}, },
methods: { methods: {
getSalePeople(val){ getSalePeople(val) {
const params = { const params = {
staffName: val ? val.trim() : '' staffName: val ? val.trim() : ''
// departmentId: '' // departmentId: ''
} }
this.$apis.ghBeforeSale.getSalesPersonApi(params).then(res => { this.$apis.ghBeforeSale.getSalesPersonApi(params).then(res => {
if(res.code==='0') { if (res.code === '0') {
const id = this.editFormDataOther.findIndex((item)=>{ const id = this.editFormDataOther.findIndex(item => {
return item.name == 'actualSalesPersonId' return item.name == 'actualSalesPersonId'
}) })
this.$nextTick(() =>{ this.$nextTick(() => {
this.editFormDataOther[id].optionList = res.data this.editFormDataOther[id].optionList = res.data
}) })
} }
...@@ -592,7 +607,7 @@ export default { ...@@ -592,7 +607,7 @@ export default {
}) })
} }
}, },
handleCancelBubble(e) { }, handleCancelBubble(e) {},
getDefaultCarbrand() { getDefaultCarbrand() {
this.$apis.ghBeforeSale.getDefaultCarbrandApi({}).then(res => { this.$apis.ghBeforeSale.getDefaultCarbrandApi({}).then(res => {
// 获取套餐列表 // 获取套餐列表
...@@ -615,11 +630,12 @@ export default { ...@@ -615,11 +630,12 @@ export default {
}, },
getInfo() { getInfo() {
this.$apis.ghBeforeSale.getEquityApi({ contractNo: this.routeInfo.contractNo }).then(res => { this.$apis.ghBeforeSale.getEquityApi({ contractNo: this.routeInfo.contractNo }).then(res => {
if(this.routeInfo.isSuper){ //超管不能修改以及不能获取到全部员工的列表 if (this.routeInfo.isSuper) {
const id = this.editFormDataOther.findIndex((item)=>{ //超管不能修改以及不能获取到全部员工的列表
const id = this.editFormDataOther.findIndex(item => {
return item.name == 'actualSalesPersonId' return item.name == 'actualSalesPersonId'
}) })
this.editFormDataOther[id].optionList = [{userOneid: res?.actualSalesPersonId ,staffName: res?.actualSalesPerson}] this.editFormDataOther[id].optionList = [{ userOneid: res?.actualSalesPersonId, staffName: res?.actualSalesPerson }]
this.editFormDataOther[id].isDisabled = true this.editFormDataOther[id].isDisabled = true
} }
...@@ -677,25 +693,26 @@ export default { ...@@ -677,25 +693,26 @@ 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 &&
targetItem.servicePackagePrices.forEach(item => {
if (+invoicePrice >= +item.carButtomPrice && +invoicePrice < +item.carHighestPrice) { if (+invoicePrice >= +item.carButtomPrice && +invoicePrice < +item.carHighestPrice) {
this.editForm.suggestedSellingPrice = (item.retailPrice / 100).toFixed(2) this.editForm.suggestedSellingPrice = (item.retailPrice / 100).toFixed(2)
this.editForm.actualSalesPrice = recovery ? (this.editForm.actualSalesPrice || (item.retailPrice / 100).toFixed(2)) : (item.retailPrice / 100).toFixed(2) this.editForm.actualSalesPrice = recovery ? this.editForm.actualSalesPrice || (item.retailPrice / 100).toFixed(2) : (item.retailPrice / 100).toFixed(2)
} }
}) })
} }
}, },
// 舒享版只能续保,'尊享版', '优享版'只能首保 // 舒享版只能续保,'尊享版', '优享版'只能首保
setInsuranceType(targetItem){ setInsuranceType(targetItem) {
const targetNameList = ['尊享版', '优享版', '舒享版'] const targetNameList = ['尊享版', '优享版', '舒享版']
if(targetNameList.includes(targetItem.packageName)){ if (targetNameList.includes(targetItem.packageName)) {
if(targetItem.packageName==='舒享版'){ if (targetItem.packageName === '舒享版') {
this.editForm.insuranceType = 'c' this.editForm.insuranceType = 'c'
}else{ } else {
this.editForm.insuranceType = 'i' this.editForm.insuranceType = 'i'
} }
const id = this.editFormDataOther.findIndex((item)=>{ const id = this.editFormDataOther.findIndex(item => {
return item.name == 'insuranceType' return item.name == 'insuranceType'
}) })
this.editFormDataOther[id].isDisabled = true this.editFormDataOther[id].isDisabled = true
...@@ -709,7 +726,8 @@ export default { ...@@ -709,7 +726,8 @@ export default {
this.editRulePro = {} this.editRulePro = {}
this.editFormPro = {} this.editFormPro = {}
var attrName = '' var attrName = ''
targetItem && targetItem.groupAttributeList.forEach(item => { targetItem &&
targetItem.groupAttributeList.forEach(item => {
if (item.attributeList.length == 1) { if (item.attributeList.length == 1) {
attrName = item.attributeList[0].attributeName attrName = item.attributeList[0].attributeName
this.$set(this.editFormPro, attrName, tempObj.hasOwnProperty(attrName) ? tempObj[attrName] : '') this.$set(this.editFormPro, attrName, tempObj.hasOwnProperty(attrName) ? tempObj[attrName] : '')
...@@ -737,12 +755,15 @@ export default { ...@@ -737,12 +755,15 @@ export default {
} }
}, },
recoveryEditFormPro() { recoveryEditFormPro() {
this.editForm.attributeList.length && this.editForm.attributeList.forEach((item, idx) => { this.editForm.attributeList.length &&
this.editForm.attributeList.forEach((item, idx) => {
let hashObj = {} let hashObj = {}
this.editForm.attributeList.map(i => i.attributeName).forEach((i, subIdx) => { this.editForm.attributeList
.map(i => i.attributeName)
.forEach((i, subIdx) => {
Object.keys(hashObj).includes(i) ? (hashObj[i] = hashObj[i] + 1) : (hashObj[i] = 1) 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)
}) })
}, },
autoGenerate() { autoGenerate() {
...@@ -760,8 +781,7 @@ export default { ...@@ -760,8 +781,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 = []
...@@ -815,7 +835,7 @@ export default { ...@@ -815,7 +835,7 @@ export default {
} }
} else { } else {
this[formName].forEach((item, index) => { this[formName].forEach((item, index) => {
if(item.optionsName){ if (item.optionsName) {
if (item.type === 'select' && this.baseData[item.optionsName].length) { if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName])) this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') { if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
...@@ -830,7 +850,7 @@ export default { ...@@ -830,7 +850,7 @@ export default {
} }
}, },
// 获取品牌车型 // 获取品牌车型
getAllVehicleBrand(fn = () => { }) { getAllVehicleBrand(fn = () => {}) {
const params = {} const params = {}
this.$apis.ghBeforeSale.getCarBrandListApi(params).then(res => { this.$apis.ghBeforeSale.getCarBrandListApi(params).then(res => {
this.baseData.carBrandOptions = res || [] this.baseData.carBrandOptions = res || []
...@@ -924,11 +944,11 @@ export default { ...@@ -924,11 +944,11 @@ export default {
targetItem.groupAttributeList.forEach(item => { targetItem.groupAttributeList.forEach(item => {
if (item.attributeList.length == 1) { if (item.attributeList.length == 1) {
let targetAttributeValue = '' let targetAttributeValue = ''
if(item.attributeList[0].attributeGroup == 'additional_price'){ if (item.attributeList[0].attributeGroup == 'additional_price') {
targetAttributeValue = this.editFormPro[item.attributeList[0].attributeGroup] ? (this.editFormPro[item.attributeList[0].attributeGroup] * 100).toFixed(0) : '' targetAttributeValue = this.editFormPro[item.attributeList[0].attributeGroup] ? (this.editFormPro[item.attributeList[0].attributeGroup] * 100).toFixed(0) : ''
}else if(item.attributeList[0].attributeGroup == 'additional_date'){ } else if (item.attributeList[0].attributeGroup == 'additional_date') {
targetAttributeValue = this.editFormPro[item.attributeList[0].attributeGroup] ? utils.dateFormat(this.editFormPro[item.attributeList[0].attributeGroup]) : '' targetAttributeValue = this.editFormPro[item.attributeList[0].attributeGroup] ? utils.dateFormat(this.editFormPro[item.attributeList[0].attributeGroup]) : ''
}else{ } else {
targetAttributeValue = this.editFormPro[item.attributeList[0].attributeGroup] ? this.editFormPro[item.attributeList[0].attributeGroup] : '' targetAttributeValue = this.editFormPro[item.attributeList[0].attributeGroup] ? this.editFormPro[item.attributeList[0].attributeGroup] : ''
} }
params.attributeList.push({ params.attributeList.push({
...@@ -982,7 +1002,7 @@ export default { ...@@ -982,7 +1002,7 @@ export default {
background: 'rgba(0, 0, 0, 0.3)' background: 'rgba(0, 0, 0, 0.3)'
}) })
this.$apis.ghBeforeSale.updateEquityApi(params).then(res => { this.$apis.ghBeforeSale.updateEquityApi(params).then(res => {
loading.close(); loading.close()
this.submit = false this.submit = false
if (res.errId == 'A1307') { if (res.errId == 'A1307') {
this.whereToGo('vin') this.whereToGo('vin')
...@@ -1071,8 +1091,8 @@ export default { ...@@ -1071,8 +1091,8 @@ export default {
seatesNum: 5, seatesNum: 5,
billingDate: new Date() billingDate: new Date()
}, },
actualSalesPerson:'', actualSalesPerson: '',
actualSalesPersonId:'', actualSalesPersonId: '',
insuranceType: 'i' insuranceType: 'i'
} }
this.$apis.ghBeforeSale.getDefaultCarbrandApi({}).then(res => { this.$apis.ghBeforeSale.getDefaultCarbrandApi({}).then(res => {
...@@ -1120,10 +1140,10 @@ export default { ...@@ -1120,10 +1140,10 @@ export default {
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12); box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
} }
.edit-order{ .edit-order {
padding-top: 0!important; padding-top: 0 !important;
height:100%; height: 100%;
overflow-y:auto; overflow-y: auto;
} }
.help-service .service-img { .help-service .service-img {
...@@ -1146,7 +1166,7 @@ export default { ...@@ -1146,7 +1166,7 @@ export default {
.edit-order .container { .edit-order .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: 0!important; padding: 0 !important;
margin-bottom: 10px; margin-bottom: 10px;
} }
...@@ -1160,14 +1180,14 @@ export default { ...@@ -1160,14 +1180,14 @@ export default {
.before-sale .footer { .before-sale .footer {
width: 100%; width: 100%;
position: absolute; position: fixed;
bottom: 0; bottom: 0;
height: 64px; height: 64px;
left: 0; left: 0;
text-align: center; text-align: center;
line-height: 64px; line-height: 64px;
background: #ffffff; background: #ffffff;
z-index: 999; z-index: 0;
} }
/* .operate-btn .el-button{ /* .operate-btn .el-button{
...@@ -1179,7 +1199,6 @@ export default { ...@@ -1179,7 +1199,6 @@ export default {
margin-top: 20px; margin-top: 20px;
} }
.before-sale .flex { .before-sale .flex {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -1232,25 +1251,25 @@ export default { ...@@ -1232,25 +1251,25 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
/deep/ .select-product{ /deep/ .select-product {
.package-code>.el-radio__input{ .package-code > .el-radio__input {
margin-left: 73px; margin-left: 73px;
} }
.package-code>.el-radio__label>.radio-add-block>.package-subtitle{ .package-code > .el-radio__label > .radio-add-block > .package-subtitle {
margin-left: 76px; margin-left: 76px;
} }
} }
.select-product .el-radio__label{ .select-product .el-radio__label {
padding-left: 7px; padding-left: 7px;
} }
.select-product .package-title{ .select-product .package-title {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 600; font-weight: 600;
} }
.select-product .package-subtitle{ .select-product .package-subtitle {
font-size: 12px; font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
...@@ -1314,16 +1333,16 @@ export default { ...@@ -1314,16 +1333,16 @@ export default {
cursor: pointer; cursor: pointer;
} }
.plain{ .plain {
border: 1px solid #5850ff; border: 1px solid #5850ff;
color: #5850ff; color: #5850ff;
} }
.reset-btn{ .reset-btn {
border: 1px solid #909090; border: 1px solid #909090;
color: #333333; color: #333333;
} }
.sub-el-form{ .sub-el-form {
margin-left: 50px; margin-left: 50px;
} }
/* 表格 */ /* 表格 */
......
<template>
<div id="writeOff" class="writeOff">
<template v-if="!isSavePage">
<div class="header">客户信息</div>
<div class="main box">
<glsx-combi-form ref="writeOff" :formRules="checkRule" labelWidth="128px" defaultWidth="308px" :formObj="batchListSearch" :formData="writeOffForm"></glsx-combi-form>
<div class="signal-img">
<p>核销码示意图</p>
<img :src="url" alt="" />
</div>
</div>
</template>
<template v-if="isSavePage">
<div class="custom box">
<div class="header">报案信息(客户提交)</div>
<div class="custom-info">
<span class="code label">核销码:</span>
<span class="code">{{ customObj.writeOffCode }}</span>
<glsx-combi-form ref="customRef" :formRules="customRule" labelWidth="160px" defaultWidth="300px" :formObj="customObj" :formData="customForm"></glsx-combi-form>
</div>
</div>
<div class="handler box" style="margin-top: 10px">
<div class="header">报案信息(店面补充)</div>
<div class="handler-info">
<glsx-combi-form ref="handlerRef" :formRules="customRule" labelWidth="160px" defaultWidth="300px" :formObj="customObj" :formData="handlerForm"></glsx-combi-form>
</div>
</div>
</template>
<div class="my-footer btn-box box">
<el-button v-if="!isSavePage" size="small" type="primary" @click="handleNextStep">下一步</el-button>
<el-button v-else size="small" type="primary" @click="handleSave">提交</el-button>
<el-button type="default" size="small" @click="handleCancel">取消</el-button>
</div>
<qrCode :bottom="320" :codeUrl="serviceImg" phoneTitle="提单及服务咨询" phone="189 3890 7441"></qrCode>
</div>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
import url from '@/assets/write_off.png'
import serviceImg from '../image/code.png'
import qrCode from '@/components/qr-code/index.vue'
const 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}$/
export default {
name: 'addwriteOff',
data() {
return {
url,
serviceImg,
isSavePage: false,
batchListSearch: {
writeOffCode: ''
},
errMeg: '',
checkRule: {
writeOffCode: [
{
validator: (rule, value, callback) => {
let writeOffCodeReg = /^[0-9]{8}$/
return writeOffCodeReg.test(value) ? callback() : callback(new Error('请输入正确的核销码'))
},
trigger: 'change'
},
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('核销码不能为空'))
} else if (this.errMeg) {
callback(new Error(this.errMeg))
} else {
callback()
}
},
trigger: 'blur'
}
]
},
writeOffForm: [
{
label: '核销码',
name: 'writeOffCode',
type: 'input',
maxlength: 8,
placeholder: '请输入核销码',
isClear: true
}
],
customObj: {
writeOffCode: '',
reporterName: '',
reporterPhone: '',
reporterDate: '',
reimbursementDate: '',
handlerName: '',
handlerPhone: '',
serviceCodes: []
},
customRule: {
reporterName: [{ required: true, message: '请输入报案人', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
reporterDate: [{ required: true, message: '请选择报案日期', trigger: 'change' }],
reimbursementDate: [
{ required: true, message: '请选择出险日期', trigger: 'change' }
// {
// required: true,
// validator: (rule, value, callback) => {
// if (!value) {
// callback(new Error('请选择出险日期'))
// } else {
// if(new Date(value).getTime() > new Date(this.customObj.reporterDate).getTime()){
// callback(new Error('出险日期不能大于报案日期'))
// }else{
// callback()
// }
// }
// },
// trigger: 'change'
// }
],
reporterPhone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入手机号'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的手机号'))
}
},
trigger: 'change'
}
],
handlerPhone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入手机号'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的手机号'))
}
},
trigger: 'change'
}
],
serviceCodes: [
{
type: 'array',
required: true,
message: '请选择最少一项核赔服务',
trigger: 'change'
}
]
},
customForm: [
{
label: '报案人',
name: 'reporterName',
type: 'input',
isClear: true
},
{
label: '报案人联系号码',
name: 'reporterPhone',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '报案日期',
name: 'reporterDate',
type: 'limitDatePicker',
dateType: 'datetime',
isClear: true,
customPickerOptions: {
disabledDate(date) {
return date > new Date();
},
selectableRange: ''
},
focus:(e)=>{
if(e.value){
this.updateTimeLimit(e.value, 'reporterDate')
}
}
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
isClear: true,
customPickerOptions: {
disabledDate:(date)=> {
// if(this.customObj.reporterDate){
// return date > new Date(this.customObj.reporterDate);
// }else{
// return date > new Date();
// }
return date > new Date();
},
selectableRange: ''
},
focus:(e)=>{
if(e.value){
this.updateTimeLimit(e.value, 'reimbursementDate')
}
}
}
],
handlerForm: [
{
label: '经办人',
name: 'handlerName',
type: 'input',
isClear: true
},
{
label: '经办人联系号码',
name: 'handlerPhone',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '申请核赔服务',
name: 'serviceCodes',
type: 'checkbox',
border: true,
optionList: [],
optionId: 'serviceItemCode',
optionLabel: 'serviceItemName'
}
]
}
},
components: {
glsxCombiForm,
qrCode
},
mounted() {},
watch:{
'customObj.reporterDate'(newVal, oldVal){
if(newVal){
this.updateTimeLimit(newVal,'reporterDate')
}
},
'customObj.reimbursementDate'(newVal, oldVal){
if(newVal){
this.updateTimeLimit(newVal, 'reimbursementDate')
}
}
},
methods: {
updateTimeLimit(newVal,key){
let limitTime = '';
// 当报案时间存在或者是报案日期,结束时间是当前时间,否则结束时间是报案时间
// let endTime = (key === 'reporterDate' || !this.customObj.reporterDate) ? new Date().getTime() : new Date(this.customObj.reporterDate).getTime();
// 当不是同一天,时间限制为'00:00:00 - 23:59:59',否则'00:00:00 - endTime'
let endTime = new Date().getTime();
if(util.dateFormat(endTime) === util.dateFormat(new Date(newVal))){
limitTime = `00:00:00 - ${util.dateFormat(endTime,'HH:mm:ss')}`
}else{
limitTime = '00:00:00 - 23:59:59'
}
const Item = this.customForm.find(item => item.name === key)
this.$set(Item.customPickerOptions,'selectableRange',limitTime)
},
handleNextStep() {
this.$refs.writeOff.$refs.formRef.validate(valid => {
if (valid) {
const { writeOffCode } = this.batchListSearch
this.$apis.beforeSale.getWriteOffService({ writeOffCode }).then(res => {
if (res.code == '0') {
this.isSavePage = true
const { writeOffCode, reporterName, reporterPhone, serviceItemsList } = res.data
const reporterDate = new Date();
const reimbursementDate = new Date();
this.customObj = { ...this.customObj, writeOffCode, reporterName, reporterPhone, reporterDate, reimbursementDate }
const id = this.handlerForm.findIndex(item => {
return item.name === 'serviceCodes'
})
this.$nextTick(() => {
this.handlerForm[id].optionList = serviceItemsList
})
} else {
this.errMeg = res.message
this.$refs.writeOff.$refs.formRef.validate(valid => {
this.gotoValidView('writeOffCode')
this.errMeg = ''
})
}
})
} else {
this.gotoValidView('writeOffCode')
}
})
},
handleSave() {
this.$refs.customRef.$refs.formRef.validate(valid => {
if (valid) {
this.$refs.handlerRef.$refs.formRef.validate(secondValid => {
if (secondValid) {
let params = {...this.customObj}
params.reimbursementDate = util.dateFormat(this.customObj.reimbursementDate, 'YYYY-MM-DD HH:mm:ss')
params.reporterDate = util.dateFormat(this.customObj.reporterDate, 'YYYY-MM-DD HH:mm:ss')
this.$apis.beforeSale.saveWriteOff({ ...params }).then(res => {
if (res.code == '0') {
this.$message({
message: '保存成功',
type: 'success'
})
this.$router.push({
path: '/ghPreSale/writeOff/writeOffList'
})
} else {
this.gotoValidView('writeOff')
this.$message({
message: res.message,
type: 'error'
})
}
})
} else {
this.gotoValidView('reporterName')
}
})
} else {
this.gotoValidView('reporterName')
}
})
},
gotoValidView(id) {
document.getElementById(id) && document.getElementById(id).scrollIntoView()
},
handleCancel() {
this.$router.push({
path: '/ghPreSale/writeOff/writeOffList'
})
}
}
}
</script>
<style lang="scss" scoped>
.writeOff {
margin-top: 17px;
height: calc(100vh - 206px);
background-color: #fff;
.header {
height: 60px;
line-height: 60px;
padding: 0 20px;
border-bottom: 1px solid #eeeeee;
font-family: PingFangSC-Medium;
font-size: 14px;
color: #333333;
font-weight: 700;
}
/deep/ .el-form-item__label {
padding: 0;
}
/deep/ .el-form-item {
margin-right: 0;
}
.custom-info {
padding: 30px 0;
box-sizing: border-box;
.code {
color: #666;
font-size: 14px;
display: inline-block;
width: 160px;
height: 32px;
line-height: 32px;
margin-bottom: 10px;
box-sizing: border-box;
}
.label {
text-align: right;
}
}
.handler-info {
height: 437px;
padding: 30px 0;
box-sizing: border-box;
/deep/ #serviceCodes {
display: block;
.el-form-item__content {
max-width: 800px;
}
}
/deep/ .el-checkbox {
width: 240px;
margin-right: 20px;
margin-left: 0;
display: inline-block;
}
}
.main {
padding: 30px 0 15px;
.signal-img {
margin-left: 128px;
p {
height: 18px;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #5850ff;
line-height: 20px;
}
img {
width: 824px;
height: 568px;
}
}
}
// .btn-box {
// display: flex;
// justify-content: center;
// align-items: center;
// }
}
</style>
<template>
<div class="writeOff">
<div class="box">
<div class="header title" style="height: 53px; line-height: 53px">
<span style="height: 53px; cursor: pointer; display: flex; align-items: center" @click="back">
<i class="el-icon-arrow-left" style="font-size: 18px"></i>
返回
</span>
</div>
<div class="custom-info">
<p class="title" style="margin-bottom: 20px">报案信息(客户提交)</p>
<div class="info">
<span class="item" v-for="(val, key) in customObj" :key="key">
<span class="label">{{ val ? val + ':' : '' }}</span>
{{ info[key] }}
</span>
</div>
</div>
</div>
<div class="box" style="margin-top: 10px">
<div class="header title">报案信息(店面补充)</div>
<div class="handler-info">
<span class="item" v-for="(val, key) in handlerObj" :key="key">
<span class="label">{{ val ? val + ':' : '' }}</span>
{{ info[key] }}
</span>
<div class="item service">
<span class="label">申请核赔服务:</span>
<div class="sevice-box">
<div v-for="(item, index) in info.serviceItemsList" :key="index" class="service-item">
{{ item.serviceItemName }}
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import util from '@/util/util'
export default {
name: 'writeOffDetail',
data() {
return {
info: {},
customObj: {
writeOffCode: '核销码',
nullval: '',
reporterName: '报案人',
reporterPhone: '报案人联系号码',
reporterDate: '报案日期',
reimbursementDate: '出险日期'
},
handlerObj: {
handlerName: '经办人',
handlerPhone: '经办人联系号码'
}
}
},
mounted() {
this.getDetail(this.$route.params)
},
methods: {
getDetail({ id }) {
this.$apis.beforeSale.getWriteOffDetail({ writeOffCode: id }).then(res => {
if (res.code == '0') {
this.info = res.data
}
})
},
back() {
this.$router.push({
path: '/ghPreSale/writeOff/writeOffList'
})
}
}
}
</script>
<style lang="scss" scoped>
.writeOff {
margin-top: 17px;
.box {
background-color: #fff;
}
p {
margin: 0;
}
.item {
width: 350px;
padding: 15px 0;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6c6f71;
line-height: 17px;
display: inline-block;
margin-right: 120px;
.label {
width: 140px;
text-align: right;
display: inline-block;
}
}
.service {
margin-right: 0 !important;
display: flex;
width: 100%;
.label {
height: 36px;
line-height: 36px;
white-space: nowrap;
}
.sevice-box {
width: 800px;
.service-item {
width: 240px;
height: 36px;
background: #f7f7f7;
border: 1px solid #e9e9e9;
display: inline-flex;
align-items: center;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6c6f71;
line-height: 17px;
padding: 0 12px;
box-sizing: border-box;
margin: 0 20px 20px 0;
}
}
}
.title {
font-family: PingFangSC-Medium;
font-size: 14px;
color: #333333;
font-weight: 700;
}
.header {
border-bottom: 1px solid #eeeeee;
height: 60px;
background-color: #fff;
line-height: 60px;
padding: 0 20px;
}
.custom-info {
height: 220px;
padding: 20px;
box-sizing: border-box;
.info {
width: 950px;
}
}
.handler-info {
padding: 20px;
}
}
</style>
<template>
<div class="writeOff">
<div class="contain equity-wrap">
<GLButton size="small" fn="新增核赔" class="el-icon-plus" type="primary" @click="addWriteOff(1)">新增核赔</GLButton>
<div class="search-wrap">
<glsx-combi-form ref="showSearch" labelWidth="120px" defaultWidth="230px" :formObj="batchListSearch" :formData="writeOffForm">
<span slot="footer" class="footer-btns"></span>
</glsx-combi-form>
</div>
<div>
<div>
<el-button size="small" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
<el-button size="small" icon="el-icon-refresh" @click="handleReset('reset')">重置</el-button>
</div>
</div>
</div>
<div class="contain equity-wrap" style="margin-top: 10px">
<el-button type="primary" size="small" @click="handleExport" style="float: right; margin-right: 0; margin-bottom: 20px" class="selectBtn">导出Excel</el-button>
<GLTable ref="writeOffTable" :pageSizes="sizeList" :searchForm="searchForm" :tableParams="batchTableParams" :getListApi="getListApi" :pageConf="batchPageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<el-button type="text" @click="handleView(scope.scope)">查看</el-button>
</div>
</GLTable>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
export default {
name: 'writeOffList',
data() {
return {
sizeList: [5, 10, 20, 30, 40],
getListApi: this.$apis.beforeSale.getWriteOffList,
batchListSearch: {
searchText: '',
activeTime: []
},
searchForm: {},
writeOffForm: [
{
label: '搜索内容',
name: 'searchText',
type: 'input',
placeholder: '请输入车主姓名、核销码、合同号',
isClear: true
},
{
label: '提交时间',
name: 'activeTime',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
}
],
// 序号、核销码、客户名、合同号、价格区间、门店提交时间、服务名称、操作
batchTableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '核销码',
prop: 'writeOffCode',
width: 120,
formatter: cellValue => {
return cellValue.writeOffCode || '-'
}
},
{
label: '客户名',
prop: 'reporterName',
width: 200,
formatter: cellValue => {
return cellValue.reporterName || '-'
}
},
{
label: '合同号',
prop: 'contractNo',
width: 200,
formatter: cellValue => {
return cellValue.contractNo || '-'
}
},
{
label: '价格区间',
prop: 'priceSection',
width: 200,
formatter: cellValue => {
return cellValue.priceSection || '-'
}
},
{
label: '门店提交时间',
prop: 'commitTime',
width: 200,
formatter: cellValue => {
return cellValue.commitTime ? util.dateFormat(cellValue.commitTime, 'YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '服务名称',
prop: 'serviceName',
formatter: cellValue => {
return cellValue.serviceName || '-'
}
},
{
label: '操作',
prop: '',
width: '100px',
fixed: 'right',
addHtml: 'table-btns'
}
]
},
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
components: {
glsxCombiForm
},
mounted() {},
methods: {
handleView({ writeOffCode }) {
this.$router.push(`/ghPreSale/writeOff/writeOffDetail/${writeOffCode}`)
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchForm = { ...this.setParams() }
console.log(this.searchForm, 963)
resolve()
})
},
setParams() {
const params = {}
if (Array.isArray(this.batchListSearch.activeTime) && this.batchListSearch.activeTime.length > 0) {
params.commitTimeStart = util.dateFormat(this.batchListSearch.activeTime[0]) + ' 00:00:00'
params.commitTimeEnd = util.dateFormat(this.batchListSearch.activeTime[1]) + ' 23:59:59'
}
params.searchText = this.batchListSearch.searchText
return params
},
handleExport() {
const parmas = { ...this.setParams() }
this.$apis.beforeSale.exportWriteOffData(parmas).then(({ code, data, message }) => {
if (code == '0') {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', data)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
} else {
this.$message.error(message)
}
})
},
handleSearch() {
this.$refs.writeOffTable.refreshTable()
},
handleReset(type) {
this.batchListSearch = {
searchText: '',
activeTime: []
}
if (type === 'reset') {
this.handleSearch()
}
},
addWriteOff(type) {
this.$router.push('/ghPreSale/writeOff/addwriteOff')
}
}
}
</script>
<style lang="scss" scoped>
.writeOff {
margin-top: 17px;
.equity-wrap {
background-color: #fff;
padding: 20px;
.search-wrap {
margin-top: 20px;
// padding: 20px 20px 0;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!