Commit 0fa678aa by 张权

核赔简易版

1 parent 3e21eee1
...@@ -163,7 +163,7 @@ const getProListApi = params => { ...@@ -163,7 +163,7 @@ const getProListApi = params => {
// 获取无忧卡套餐列表 // 获取无忧卡套餐列表
const getPackageListApi = params => { const getPackageListApi = params => {
params.method = `scrm.api.equity.service.package.dj.list.get` params.method = `scrm.api.equity.service.package.dj.list.get`
// params.method = `scrm.api.equity.service.package.list.get` // params.method = `scrm.api.equity.service.package.list.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'GET', method: 'GET',
...@@ -325,50 +325,106 @@ const spaAgressData = params => { ...@@ -325,50 +325,106 @@ 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
}) })
} }
// 店铺信息 // 店铺信息
const merchantInfo = params => { const merchantInfo = params => {
params.method = 'scrm.api.equity.common.merchant.detail.det' params.method = 'scrm.api.equity.common.merchant.detail.det'
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 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
})
}
// 获取活码列表-
const activeCodeList = params => {
params.method = 'entmicro.api.code.getFreeChannelCode'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 更新活码
const updateActiveCode = params => {
params.method = 'scrm.api.equity.service.merchant.qrcode.update'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
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 activeCodeList = params => {
params.method = 'entmicro.api.code.getFreeChannelCode'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true,
})
}
// 更新活码
const updateActiveCode = params => {
params.method = 'scrm.api.equity.service.merchant.qrcode.update'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: 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
// 核赔判断并获取服务
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, 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;
} }
} }
}
\ No newline at end of file \ No newline at end of file
}
.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,11 +12,11 @@ ...@@ -12,11 +12,11 @@
{{ 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'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)" @blur="e => handleInputBlur(e, item)"> <el-input :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)" @blur="e => handleInputBlur(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span> <span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span> <span v-if="item.append" slot="append">{{ item.append }}</span>
</el-input> </el-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 }">
...@@ -99,10 +104,10 @@ ...@@ -99,10 +104,10 @@
</template> </template>
<slot name="footer"></slot> <slot name="footer"></slot>
</el-form> </el-form>
<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),
......
<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!