Commit 5f57c40d by 前端

Merge branch 'v2.10.0' into 'develop'

合并理赔系统版本

See merge request !13
2 parents c77f4943 88e72599
Showing 46 changed files with 7448 additions and 2198 deletions
This diff could not be displayed because it is too large.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.3.7", "glsx-components": "^1.5.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
......
...@@ -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,81 @@ const spaAgressData = params => { ...@@ -325,50 +325,81 @@ 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, 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,
})
}
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 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 getOrdersummary = params => {
params.method = 'scrm.api.equity.service.order.summary.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取汇总产品列表
const getSummaryPackage = params => {
params.method = 'scrm.api.equity.service.summary.package'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getSummaryExportApi = params => {
params.method = `scrm.api.equity.service.order.summary.export`
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
export default { getOrdersummary, getSummaryPackage, getSummaryExportApi, 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 }
...@@ -124,4 +124,228 @@ const getAccountInfo = params => { ...@@ -124,4 +124,228 @@ const getAccountInfo = params => {
}) })
} }
export default { getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo } /**广汇端---接口 */
// 获取核赔列表接口
const getGHClaimsListApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.gh.list'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 新增跟进记录
const addGHClaimFollowsListApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.followLog.create'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取跟进记录
const getGHClaimFollowsListApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.followLog.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 导出核赔列表
const exportGHClaimsListApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.gh.list.export'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 运营端核赔订单审核通用接口
const checkGHClaimsListApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.audit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 历史赔付记录
const getGHhistoryListApi = params => {
params.method = 'scrm.api.equity.mini.service.claims.history.records.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取定损和核赔详情
const getGHClaimsDetailApi = params => {
params.method = 'scrm.api.equity.service.claims.merchant.detail.new'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔订单资料获取
const getGHattachmentApi = params => {
params.method = 'scrm.api.equity.service.claims.merchant.attachment.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔订单手机传图资料获取
const getGHPhoneImageApi = params => {
params.method = 'scrm.api.equity.service.claims.merchant.phone.attachment'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔订单获取订单数
const getGHCountApi = params => {
params.method = 'scrm.api.equity.service.claims.gh.list.count'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 图片上传
const uploadImgApi = params => {
params.method = 'scrm.api.carlife.common.uploadImg'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
// 获取其他资料
const getOrderOherInfo = params => {
params.method = 'scrm.api.equity.service.claims.merchant.package.info'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 定损审核接口
const checkOrderApi = params => {
params.method = 'scrm.api.equity.service.claims.draft.audit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔审核
const checkClaimsOrderApi = params => {
params.method = 'scrm.api.equity.service.claims.audit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 撤销审核
const cancelClaims = params => {
params.method = 'scrm.api.equity.service.claims.audit.cancel'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 定损保存草稿
const saveCG = params => {
params.method = 'scrm.api.equity.service.claims.merchant.lossDeter.draft.or.commit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔保存草稿
const saveClaimsCG = params => {
params.method = 'scrm.api.equity.service.claims.merchant.claims.draft.or.commit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 上传签名
const saveSign = params => {
params.method = 'scrm.api.equity.service.claims.sign.save'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取大区
const getBigMerchantApi = params => {
params.method = 'scrm.api.equity.service.merchant.province.merchant.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 根据大区获取片区
const getMidMerchantApi = params => {
params.method = 'scrm.api.equity.service.merchant.city.merchant.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 根据选择的片区获取门店
const getMerchantApi = params => {
params.method = 'scrm.api.equity.service.merchant.merchant.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default {getMerchantApi,getMidMerchantApi,getBigMerchantApi,saveSign,saveClaimsCG,saveCG,cancelClaims,checkClaimsOrderApi,checkOrderApi,getOrderOherInfo,uploadImgApi,getGHCountApi,getGHPhoneImageApi,getGHattachmentApi,getGHClaimsDetailApi,getGHhistoryListApi,checkGHClaimsListApi,exportGHClaimsListApi,getGHClaimFollowsListApi,addGHClaimFollowsListApi,getGHClaimsListApi,getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo }
...@@ -165,17 +165,20 @@ ...@@ -165,17 +165,20 @@
background: #ffffff; background: #ffffff;
margin: 0 0 20px 0; margin: 0 0 20px 0;
padding: 20px; padding: 20px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1); // box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1);
} }
.equity-wrap .contain .el-table__empty-text { .equity-wrap .contain .el-table__empty-text {
display: inline-block; display: inline-block;
width: 64px; width: 64px;
height: 41px; height: 41px;
} }
.fr-mr0 { .fr-mr0 {
float: right; float: right;
margin-right: 0px !important; margin-right: 0px !important;
} }
// 单行省略 // 单行省略
.ellipsis-1 { .ellipsis-1 {
overflow: hidden; overflow: hidden;
...@@ -184,9 +187,11 @@ ...@@ -184,9 +187,11 @@
-o-text-overflow: ellipsis; -o-text-overflow: ellipsis;
/* for Opera */ /* for Opera */
} }
.mb10 { .mb10 {
margin-bottom: 10px; margin-bottom: 10px;
} }
// 我这里以两行为例,该方法基本兼容市场上面所有主流浏览器。 // 我这里以两行为例,该方法基本兼容市场上面所有主流浏览器。
.ellipsis-2 { .ellipsis-2 {
overflow: hidden; overflow: hidden;
...@@ -211,6 +216,7 @@ ...@@ -211,6 +216,7 @@
background: -moz-linear-gradient(left, transparent, #fff 55%); background: -moz-linear-gradient(left, transparent, #fff 55%);
background: linear-gradient(to right, transparent, #fff 55%); background: linear-gradient(to right, transparent, #fff 55%);
} }
.el-scrollbar__bar.is-horizontal { .el-scrollbar__bar.is-horizontal {
height: 10px !important; height: 10px !important;
left: 10px; left: 10px;
...@@ -291,6 +297,7 @@ ...@@ -291,6 +297,7 @@
margin: 0 0 30px 0; margin: 0 0 30px 0;
padding-left: 8px; padding-left: 8px;
} }
// .app { // .app {
// background: #f4f5fa; // background: #f4f5fa;
// padding: 0px 0 20px 0; // padding: 0px 0 20px 0;
...@@ -305,17 +312,20 @@ ...@@ -305,17 +312,20 @@
.el-cascader-menu { .el-cascader-menu {
max-height: 250px; max-height: 250px;
} }
.primary_plain_btn { .primary_plain_btn {
.el-button--primary.is-plain { .el-button--primary.is-plain {
color: #5850ff; color: #5850ff;
background-color: #fff; background-color: #fff;
border-color: #5850ff; border-color: #5850ff;
} }
.el-button--primary.is-plain:hover { .el-button--primary.is-plain:hover {
color: #7973ff; color: #7973ff;
background-color: #fff; background-color: #fff;
border-color: #7973ff; border-color: #7973ff;
} }
.el-button--primary.is-plain:active { .el-button--primary.is-plain:active {
color: #3a32e1; color: #3a32e1;
background-color: #fff; background-color: #fff;
...@@ -325,6 +335,7 @@ ...@@ -325,6 +335,7 @@
.el-loading-mask { .el-loading-mask {
.el-loading-spinner { .el-loading-spinner {
.el-icon-loading, .el-icon-loading,
.el-loading-text { .el-loading-text {
color: #5850ff; color: #5850ff;
...@@ -332,6 +343,141 @@ ...@@ -332,6 +343,141 @@
} }
} }
// 核赔订单详情样式
.order-container-page {
.widget {
background: white;
.title {
padding: 0 20px;
height: 57px;
line-height: 57px;
border-bottom: 1px solid #e5e5e5;
}
.content {
.code {
padding: 8px 20px;
background: #f9f9f9;
}
.pannel {
.line {
margin-top: 20px;
.label {
width: 154px;
text-align: right;
}
.value {
width: 432px;
}
}
}
.element_wrap {
display: flex;
.label {
width: 154px;
text-align: right;
font-size: 16px;
font-weight: 400;
color: #333333;
}
.pannel {
.wrapper {
margin-bottom: 16px;
.name {
font-size: 16px;
font-weight: 400;
color: #333333;
margin-bottom: 8px;
}
.messag {
width: 686px;
// height: 60px;
background: #f9f9f9;
box-sizing: border-box;
padding: 0 20px;
.ms {
font-size: 14px;
font-weight: 400;
color: #666666;
}
.price {
color: #333333;
}
}
.pannel_box {
width: 686px;
background: #f9f9f9;
box-sizing: border-box;
padding: 20px;
display: flex;
flex-wrap: wrap;
.line {
margin-bottom: 20px;
.lab {
font-size: 14px;
font-weight: 400;
color: #666666;
text-align: right;
width: 154px;
}
.tip {
font-size: 14px;
font-weight: 400;
color: #333333;
}
}
}
}
}
.total {
padding: 12px 20px;
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
color: #333333;
}
}
}
.pad20 {
padding: 20px;
}
}
.flex_wrap {
display: flex;
flex-wrap: wrap;
}
.text_14_4_333 {
font-size: 14px;
font-weight: 400;
color: #333333;
}
.text_14_4_666 {
font-size: 14px;
font-weight: 400;
color: #666666;
}
}
// .equity-wrap table { // .equity-wrap table {
// width: 98%; // width: 98%;
// color: #666666; // color: #666666;
...@@ -359,3 +505,18 @@ ...@@ -359,3 +505,18 @@
// .equity-wrap table td { // .equity-wrap table td {
// min-width: 50px; // min-width: 50px;
// } // }
.page-btm-btn {
display: flex;
justify-content: center;
margin-top: 16px;
}
.el-message.msgHierarchy {
z-index: 5000 !important;
}
.el-popover.imgPopper {
.el-form-item {
margin: 0 !important;
}
}
\ No newline at end of file \ No newline at end of file
import GLCombiForm from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLCombiForm.install = function(Vue) {
Vue.component(GLCombiForm.name, GLCombiForm)
}
// 默认导出组件
export default GLCombiForm
\ No newline at end of file \ No newline at end of file
/**
* 时间控件-限制月份
*/
export const beforeRangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
<!-- 搜索 -->
<template>
<div class="glsx-combi-formwrap">
<div class="glsx-combi-form">
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :style="{ ...item.style }" :prop="item.name">
<GLSearchItem>
<div slot="name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
<span class="tips-icon"></span>
</el-tooltip>
{{ item.label }}:
</span>
<span v-else-if="!item.isHide && item.label" slot="label">
<span class="combi-form-label" :style="{ width: '112px', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}:</span>
</span>
<!-- // select 组件 作为label -->
<div v-if="item.type === 'selectInput'" id="selectlabel">
<el-select v-model="searchSelectObj[item.selectName].attr" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
</div>
</div>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
<div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" :prefix-icon="item.prefixIcon" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span>
</el-input>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- 选择-输入框 -->
<el-input class="select-inp" 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">
<!-- <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-select> -->
</el-input>
<!-- 选择-时间选择框 -->
<!-- <template v-else-if="item.type === 'selectDatePicker'">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
<el-date-picker v-model="searchSelectObj[item.selectName].value" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker>
</template> -->
<!-- 双选择框 -->
<!-- <template v-else-if="item.type === 'selectDouble'">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
<el-select v-model="searchSelectObj[item.selectName].value" :placeholder="'请选择' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label">
<el-option label="全部" value=""></el-option>
<el-option v-for="subItem in item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]"></el-option>
</el-select>
</template> -->
<!-- 选择框 -->
<div v-else-if="item.type === 'select'">
<el-select v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option>
</el-select>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- radio -->
<el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" v-bind="item.datePickerAttrs ? item.datePickerAttrs : {}" v-on="item.datePickerListeners ? item.datePickerListeners : {}" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker>
</GLSearchItem>
</el-form-item>
</template>
<slot name="footer"></slot>
</el-form>
</GLSearch>
</div>
</div>
</template>
<script>
import GLSearch from '../../GlSearch'
import GLSearchItem from '../../GlSearchItem'
import { beforeRangePickerOptions, afterRangePickerOptions } from './common'
export default {
name: 'GLCombiForm',
data() {
return {
pickerOption: {
beforeRangePickerOptions: beforeRangePickerOptions,
afterRangePickerOptions: afterRangePickerOptions
},
isImgVisible: false,
dialogObj: {
url: '',
uploadType: 'img'
}
}
},
props: {
isBlock: {
type: Boolean,
default: false
},
// defaultWidth: {
// type: String,
// default: '215px'
// },
formRef: {
type: String,
default: 'formRef'
},
isEdit: {
type: Boolean,
default: false
},
// labelWidth: {
// type: Number,
// // 默认是四个字符长度
// default: 56
// },
labelPaddingRight: {
type: Number,
default: 0
},
formData: {
type: Array,
default: () => []
},
formObj: {
type: Object,
default: () => {}
},
hasTitle: {
type: Boolean,
default: true
},
formRules: {
type: Object,
default: () => {}
},
// 搜索+输入框/搜索组合组件,搜索栏绑值
searchSelectObj: {
type: Object,
default: () => {}
}
},
mounted() {},
components: {
GLSearch,
GLSearchItem
},
methods: {
//gl-search 方法
handleOkFn() {
this.$emit('handleOk')
},
handleRestFn() {
this.$emit('handleRest')
},
// 选择框-添加其他属性
selectAddAttr(value, targetItem) {
targetItem.changeAttr && targetItem.changeAttr(value, targetItem)
},
handleInputDown(e, item) {
if (e.keyCode === 13 && item.hasOwnProperty('keyFn')) {
item.keyFn()
}
},
handleInputBlur(e, item) {
item.inputBlur && item.inputBlur(e, item)
}
}
}
</script>
<style lang="scss">
.glsx-combi-formwrap {
/* .glsx-combi-form {
min-width: 922px;
} */
.glsx-combi-form .glsx-combi-form-block {
width: 100%;
}
.glsx-combi-form .isBlock {
display: block !important;
}
/* .glsx-combi-form .el-form-item {
width: 65%;
} */
@media screen and (max-width: 1062px) {
.glsx-combi-form .el-form-item--small {
width: 100%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
@media screen and (min-width: 1062px) and (max-width: 1440px) {
.glsx-combi-form .el-form-item--small {
width: 50%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
@media screen and (min-width: 1440px) and (max-width: 1720px) {
.glsx-combi-form .el-form-item--small {
width: 33.33%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
@media screen and (min-width: 1720px) {
.glsx-combi-form .el-form-item--small {
width: 25%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
// .glsx-combi-form .el-form-item--small {
// width: 100%;
// }
// .glsx-combi-form .el-form-item--small .el-form-item__content {
// width: 100%;
// }
// .glsx-combi-form .el-form-item--small .el-form-item__content .search-item {
// width: 100%;
// }
// .glsx-combi-form .el-form-item--small .el-form-item__content .search-item .el-input {
// width: 100%;
// }
.glsx-combi-form .el-form-item--small.el-form-item {
margin: 0;
}
.glsx-combi-form .el-form-item--small .el-form-item__label {
padding: 0;
}
/* .glsx-combi-form .el-form-item--small .el-form-item__content {
width: calc(100% - 85px);
} */
.glsx-combi-form .el-col {
margin-bottom: 10px;
}
.glsx-combi-form .el-select {
width: 100%;
}
.glsx-combi-form .item-height {
height: 37px;
}
.glsx-combi-form input::-webkit-outer-spin-button,
.glsx-combi-form input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
.glsx-combi-form input[type='number'] {
-moz-appearance: textfield !important;
}
.glsx-combi-form .input-with-select .el-input-group__prepend {
background-color: #fff;
}
/* 提示图标 */
.glsx-combi-form .tips-block {
position: relative;
}
.glsx-combi-form .tips-label {
margin-right: 20px;
}
.glsx-combi-form .tips-icon {
position: absolute;
display: inline-block;
width: 12px;
height: 12px;
top: 3px;
right: 14px;
margin-right: 4px;
cursor: pointer;
border: 1px dotted #7f7f7f;
border-radius: 50%;
}
.glsx-combi-form .tips-icon::before {
content: '?';
position: absolute;
width: 8px;
height: 8px;
top: -8px;
left: 1px;
font-size: 10px;
}
/* .glsx-combi-form .tips {
margin: 0;
} */
.glsx-combi-form .combi-form-label {
display: inline-block;
box-sizing: border-box;
}
/* 图片上传 */
.glsx-combi-form .photo-top-tips {
/* height: 36px; */
margin: 0 0;
color: #999999;
}
.glsx-combi-form .img-w-h {
width: 80px;
height: 80px;
}
.glsx-combi-form .activity-img {
position: relative;
color: #999999;
background-color: #f7f7f7;
border: 1px dotted #d9d9d9;
cursor: pointer;
}
.glsx-combi-form .activity-Input {
position: absolute;
top: 0;
left: 0;
}
.glsx-combi-form .muti-imgs {
display: inline-block;
position: relative;
}
.activity-img .add {
position: absolute;
top: 40%;
font-size: 40px;
left: 50%;
transform: translate3d(-50%, -50%, 0);
}
.activity-img .number {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
#selectlabel {
.el-select {
width: 100% !important;
.el-input__inner {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
}
}
.select-inp {
.el-input__inner {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
}
.muti-imgs .img-btns {
display: none;
height: 100%;
position: absolute;
width: 80px;
height: 80px;
left: 0;
top: 0;
z-index: 2;
color: #fff;
background: rgba(0, 0, 0, 0.5);
}
.glsx-combi-form .el-icon-delete,
.glsx-combi-form .el-icon-zoom-in {
cursor: pointer;
}
.muti-imgs .img-btns .btn-item {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.muti-imgs .img-btns .btn-item {
display: flex;
width: 70%;
justify-content: space-around;
}
.muti-imgs:hover .img-btns {
display: block;
}
.glsx-combi-form .dialog-img {
width: 100%;
height: 100%;
}
.glsx-combi-form .dialog-look {
text-align: center;
}
.glsx-combi-form .dialog-video {
width: 50%;
height: 50%;
}
/* 图片上传 */
.glsx-combi-form .el-tag.el-tag--info .el-tag__close {
color: #e8e8ea;
background-color: #5850ff !important;
}
.glsx-combi-form .el-tag.el-tag--info {
border-color: #5850ff;
}
.glsx-combi-form .el-tag--plain.el-tag--info .el-tag__close:hover {
background-color: #e8e8ea;
}
.glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover {
background-color: #e8e8ea;
}
}
</style>
import GLSearch from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLSearch.install = function(Vue) {
Vue.component(GLSearch.name, GLSearch)
}
// 默认导出组件
export default GLSearch
\ No newline at end of file \ No newline at end of file
<!-- <content> -->
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-select v-model="value" size="small" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</GLSearchItem>
<GLSearchItem>
<el-select v-model="selvalue" placeholder="请选择" size="small" slot="name">
<el-option v-for="item in seloptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
</GLSearch>
<el-button type="warning" @click="toggleShow(1)">显示代码</el-button>
```js {mixin:true}
{
data() {
return {
demo1: true,
//gl-search数据
input: '',
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
seloptions: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎北京烤鸭'
},
{
value: '选项4',
label: '龙须面北京烤鸭'
},
{
value: '选项5',
label: '北京烤鸭北京烤鸭'
}
],
selvalue: ''
}
},
methods:{
toggleShow(num){
// console.log(123)
this['demo' + num] = !this['demo' + num]
},
//gl-search 方法
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
}
}
}
```
# 用来作为 markdown 代码的示例部分
<div v-if="demo1">
```vue
<template>
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-select v-model="value" size="small" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</GLSearchItem>
<GLSearchItem>
<el-select v-model="selvalue" placeholder="请选择" size="small" slot="name">
<el-option v-for="item in seloptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
</GLSearch>
</template>
<script>
import {GLSearch, GLSearchItem} from 'glsx-components'
// 全局引入一次css即可
import 'glsx-components/dist/glsx-components.css'
export default {
data() {
return {
//gl-search数据
input: '',
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
seloptions: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎北京烤鸭'
},
{
value: '选项4',
label: '龙须面北京烤鸭'
},
{
value: '选项5',
label: '北京烤鸭北京烤鸭'
}
],
selvalue: ''
}
},
methods: {
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
}
}
}
</script>
```
</div>
<!-- </content> -->
<template>
<div class="gl-search" id="gl-search" :class="{ transTo: !expand }">
<div class="search-list">
<!-- 默认插槽 -->
<slot></slot>
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div>
<div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
</div>
<div class="gl-operate">
<div class="operate">
<el-button size="small" type="primary" @click="handleOk">查询</el-button>
<el-button size="small" @click="handleRest">重置</el-button>
<el-button type="text" size="small" @click="expandFn" v-if="hasExpand">
<span>{{ !expand ? '展开' : '收起' }}</span>
<i class="expand" :class="classIcon"></i>
</el-button>
<!-- <i class="el-icon-arrow-down expand"></i> -->
<!-- <i class="el-icon-arrow-up"></i> -->
</div>
</div>
</div>
</template>
<script>
export default {
name: 'GLSearch',
props: {},
data() {
return {
// input: '',
expand: false,
itemNum: 0,
time: null,
hasExpand: false
}
},
created() {},
mounted() {
this.getItemNum()
// 判断宽度按,是否显示展开收起
this.getClientWith()
window.addEventListener('resize', this.getClientWith, false)
},
computed: {
classIcon() {
return !this.expand ? 'el-icon-arrow-down' : 'el-icon-arrow-up'
}
},
methods: {
// 展开收起
expandFn() {
this.expand = !this.expand
},
// 获取item 输入框 的个数
getItemNum() {
const items = document.getElementById('gl-search').getElementsByClassName('search-item').length
this.itemNum = items
},
// 判断是否有展开收起标志
ifHasExpand(nowCol) {
if (this.itemNum > nowCol) {
return true
}
return false
},
// 监听函数
getClientWith() {
if (this.time) clearTimeout(this.time)
this.time = setTimeout(() => {
const clientWidth = document.documentElement.clientWidth
// console.log('clientWidth: ', clientWidth)
if (clientWidth <= 800) {
// 1列
this.hasExpand = this.ifHasExpand(1)
} else if (clientWidth <= 1440 && clientWidth > 800) {
// 2列
this.hasExpand = this.ifHasExpand(2)
} else if (clientWidth <= 1720 && clientWidth > 1440) {
// 3列
this.hasExpand = this.ifHasExpand(3)
} else {
// 4列
this.hasExpand = this.ifHasExpand(4)
}
}, 300)
},
handleOk() {
// 点击确定的回调
this.$emit('onOk')
},
handleRest() {
// 点击重置的回调
this.$emit('onRest')
}
},
components: {},
watch: {},
beforeDestroy() {
window.removeEventListener('resize', this.getClientWith, false)
this.time = null
}
}
</script>
<style lang="scss">
.gl-search {
&.transTo {
height: 52px;
}
display: flex;
justify-content: space-between;
overflow: hidden;
// @media screen and (max-width: 1062px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1062px) and (max-width: 1440px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1440px) and (max-width: 1720px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1720px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
.search-list {
.search-item {
width: 100%;
}
}
.search-list {
flex: 1;
display: flex;
flex-wrap: wrap;
.search-item {
// flex: 1;
// padding-right: 12px;
margin-bottom: 20px;
min-width: 276px;
display: flex;
align-items: center;
box-sizing: border-box;
.name {
width: 112px;
text-align: right;
font-size: 14px;
font-weight: 400;
color: #666;
}
.input {
flex: 1;
// width:100%;
}
.el-input {
width: 100%;
}
.el-select {
width: 100%;
}
.el-date-editor {
width: 100%;
}
}
}
.gl-operate {
display: flex;
align-items: flex-end;
.operate {
text-align: left;
width: 190px;
margin-bottom: 20px;
.expand {
font-size: 14px;
}
.el-button + .el-button {
margin-left: 8px;
}
}
}
}
</style>
import GLSearchItem from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLSearchItem.install = function(Vue) {
Vue.component(GLSearchItem.name, GLSearchItem)
}
// 默认导出组件
export default GLSearchItem
\ No newline at end of file \ No newline at end of file
<template>
<div :style="{ 'padding-right': spacer + 'px' }" class="search-item">
<div class="name">
<!-- {{ label }} -->
<!-- name 插槽 -->
<slot name="name"></slot>
</div>
<div class="input">
<!-- 默认插槽 -->
<slot></slot>
<!-- <el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input> -->
</div>
</div>
</template>
<script>
export default {
name: 'GLSearchItem',
props: {
// 每个项间隙
spacer: {
type: Number,
default: 12
}
},
data () {
return {}
},
created () {},
mounted () {},
computed: {},
methods: {},
components: {},
watch: {}
}
</script>
<!-- 搜索 --> <!-- 搜索 -->
<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 :ref="formRef" :disabled="formDisable" :inline="isInline" :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">
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
<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>
<span :style="{ width: item.selectWidth || defaultWidth, display: 'inline-block' }" v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
<div v-else-if="item.type === 'input'"> <div v-else-if="item.type === 'input'">
<el-input @change="item.inputChange" :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)"> <el-input @change="item.inputChange" :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 || 3" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(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>
...@@ -133,6 +134,14 @@ export default { ...@@ -133,6 +134,14 @@ export default {
}, },
props: { props: {
formDisable:{
type: Boolean,
default: false
},
isInline: {
type: Boolean,
default: true
},
regionData: { regionData: {
type: Array, type: Array,
default: cityList default: cityList
...@@ -456,4 +465,7 @@ export default { ...@@ -456,4 +465,7 @@ export default {
.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;
} }
.el-textarea__inner {
font-family: auto !important;
}
</style> </style>
<!-- 弹窗 --> <!-- 弹窗 -->
<template> <template>
<div> <div>
<el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :width="width"> <GLDialog :bigTitle="bigTitle" :title="title" :mode="mode" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :width="width">
<span slot="title"> <span slot="title">
{{ title }} {{ title }}
<span class="dialog-sub-title"> <span class="dialog-sub-title">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-button v-if="!noCancel" :size="btnSize" @click="handleClose">取消</el-button> <el-button v-if="!noCancel" :size="btnSize" @click="handleClose">取消</el-button>
<slot name="btn-middle"></slot> <slot name="btn-middle"></slot>
</div> </div>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -53,6 +53,14 @@ export default { ...@@ -53,6 +53,14 @@ export default {
btnSize: { btnSize: {
type: String, type: String,
default: 'small' default: 'small'
},
mode:{
type: String,
default: 'mid'
},
bigTitle:{
type: String,
default: ''
} }
}, },
......
<template> <template>
<glsx-dialog title="选择商户" :isVisible.sync="relateStoreVisible" width="70%" btnOkLabel="确定" @confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateStore"> <glsx-dialog bigTitle="选择商户" mode="big" :isVisible.sync="relateStoreVisible" width="70%" btnOkLabel="确定" @confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateStore">
<slot></slot> <slot></slot>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
......
...@@ -48,6 +48,12 @@ const staticRoutes = Object.freeze([ ...@@ -48,6 +48,12 @@ const staticRoutes = Object.freeze([
meta: {} meta: {}
}, },
{ {
name: 'equitySummary',
path: '/beforeSale/equitySummary',
component: resolve => require([`@/views/beforeSale/equitySummary.vue`], resolve),
meta: {}
},
{
name: 'equityList', name: 'equityList',
path: '/beforeSale/equityList', path: '/beforeSale/equityList',
component: resolve => require([`@/views/beforeSale/equityList.vue`], resolve), component: resolve => require([`@/views/beforeSale/equityList.vue`], resolve),
......
import Vue from 'vue' import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js' import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable , GLCombiForm, GLTableButton,GLDialog} from 'glsx-components' //权限按钮 (根据权限动态创建)
// import GLCombiForm from '@/components/GlCombiForm'
// import GlSearch from '@/components/GlSearch'
// import GlSearchItem from '@/components/GlSearchItem'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
...@@ -12,29 +9,24 @@ import 'glsx-components/dist/glsx-components.css' ...@@ -12,29 +9,24 @@ import 'glsx-components/dist/glsx-components.css'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
Vue.use(GLTable) Vue.use(GLTable).use(GLCombiForm).use(GLTableButton).use(GLDialog)
// Vue.use(Table)
// Vue.use(TableColumn)
// Vue.use(GLCombiForm)
// Vue.use(GlSearch)
// Vue.use(GlSearchItem)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, sign, secret } = await fetchConfig() const { response, request, request_brand, sign, secret } = await fetchConfig()
// request.baseURL = 'https://scrm.test.glsx.com.cn' // request.baseURL = 'https://scrm.dev.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.test.glsx.com.cn' // request_brand.baseURL = 'https://scrm.dev.glsx.com.cn'
// request.baseURL = 'http://192.168.1.165:7226' // request.baseURL = 'http://192.168.1.53:7226'
// request_brand.baseURL = 'http://192.168.1.165:7226' // request_brand.baseURL = 'http://192.168.1.53:7226'
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$defaultStartDate = '2021-07-01' // // Vue.prototype.$defaultStartDate = '2021-07-01'
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-9ff7f674-bf61-4ca5-ae43-6c493ac13f31-rop' } }) // Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-811305a2-49a3-4e8a-b6dc-fb925c65c95c-rop' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-27c02d95-51f9-4576-86a9-70ba0f4d76e4-rop' } }) // Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-811305a2-49a3-4e8a-b6dc-fb925c65c95c-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: '781f08c5-c443-46fd-80e1-f98d94673a73' } }) // Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: '781f08c5-c443-46fd-80e1-f98d94673a73' } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
......
<template> <template>
<div class="equity-wrap" style="margin-top: 20px"> <div class="equity-wrap">
<div class="equity-wrap contain"> <div class="equity-wrap contain">
<el-button type="primary" @click="add" size="small" class="addButtom">生成</el-button> <el-button type="primary" @click="add" size="small" class="addButtom">生成</el-button>
<div class="blank"></div> <div class="blank"></div>
<GLTable ref="detailTable" :searchForm="addForm" :tableParams="addParams" :pageConf="addPageConf" style="margin-top: 10px" :hasNum="false" :getListApi="getWorryBatcnList"> <GLTable ref="detailTable" :searchForm="addForm" :tableParams="addParams" :pageConf="addPageConf" style="margin-top: 10px" :getListApi="getWorryBatcnList">
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="download(scope.scope)">批量下载</el-button> <!-- <el-button type="text" @click="download(scope.scope)">批量下载</el-button> -->
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span> </span>
</GLTable> </GLTable>
<!-- 生成弹窗 --> <!-- 生成弹窗 -->
<el-dialog title="生成无忧卡" v-if="addDialog" :visible.sync="addDialog" width="712px" :before-close="handleClose" class="detailDialog"> <GLDialog class="gl-form-page gl-form-min" title="生成无忧卡" mode="mid" v-if="addDialog" :visible.sync="addDialog" :before-close="handleClose" @onOk="submitForm('detailForm')" @onCancel="cancelDetailDialog">
<el-form :inline="true" :model="addDialogForm" :rules="addDialogRules" ref="detailForm" label-width="120px" class="detailForm"> <glsx-combi-form ref="productCard" labelWidth="154px" defaultWidth="284px" formRef="detailForm" :formObj="addDialogForm" :formData="addDialogFormData" :formRules="addDialogRules"></glsx-combi-form>
<div class="form"> </GLDialog>
<el-row>
<el-form-item label="版本:" prop="batchType">
<el-select v-model="addDialogForm.batchType" placeholder="请选择" size="small">
<el-option v-for="(item, index) in dialogEditOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="适用类型:" prop="packageCode">
<el-select v-model="addDialogForm.packageCode" placeholder="请选择" size="small">
<el-option v-for="(item, index) in dialogTypeOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="数量:" prop="quantity">
<el-input v-model="addDialogForm.quantity" placeholder="请输入1-5000的数字" size="small"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="具体价格(万)" prop="actualPrice">
<el-input v-model="addDialogForm.actualPrice" placeholder="请输入" size="small"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="使用年限:" prop="servicePeriod">
<el-select v-model="addDialogForm.servicePeriod" placeholder="请选择" size="small">
<el-option v-for="(item, index) in dialogYearOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="addDialogForm.remark" maxlength="200" style="width: 320px" placeholder="请输入活动详情或规则"></el-input>
</el-form-item>
</el-row>
</div>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="cancelDetailDialog">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm('detailForm')">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
function date_format(date) { function date_format(date) {
var date2 = new Date(date) var date2 = new Date(date)
var YY = date2.getFullYear() + '-' var YY = date2.getFullYear() + '-'
...@@ -105,55 +64,128 @@ const validatorQuantity = (rule, value, callback) => { ...@@ -105,55 +64,128 @@ const validatorQuantity = (rule, value, callback) => {
} }
export default { export default {
name: '', name: '',
components:{
glsxCombiForm
},
data() { data() {
return { return {
date_format, date_format,
getWorryBatcnList: this.$apis.addWorryFree.getWorryBatcnList, buttonList: [
addDialogForm: {},
addDialog: false,
addPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
dialogEditOptions: [
{ {
value: '1', type: 'el-button',
label: '尊享版' name: row => {
}, return '批量下载'
{ },
value: '2', attrs: {
label: '畅享版' type: 'text'
},
listeners: {
click: row => this.download(row.scope)
}
} }
], ],
dialogTypeOptions: [ getWorryBatcnList: this.$apis.addWorryFree.getWorryBatcnList,
addDialogForm: {
batchType: '',
packageCode:'',
quantity: '',
actualPrice:'',
servicePeriod: '',
remark: ''
},
addDialogFormData: [
{ {
value: 'PC0005', label: '版本',
label: '盗抢全损无忧' name: 'batchType',
type: 'select',
optionList: [
{
value: '1',
label: '尊享版'
},
{
value: '2',
label: '畅享版'
}
],
optionId: 'value',
optionLabel: 'label'
}, },
{ {
value: 'PC0006', label: '适用类型',
label: '轮胎无忧' name: 'packageCode',
type: 'select',
optionList: [
{
value: 'PC0005',
label: '盗抢全损无忧'
},
{
value: 'PC0006',
label: '轮胎无忧'
},
{
value: 'PC0007',
label: '整车全损无忧'
},
{
value: 'PC0008',
label: '碰撞无忧'
}
],
optionId: 'value',
optionLabel: 'label',
changeAttr:(e)=>{
this.changePgCode(e)
}
}, },
{ {
value: 'PC0007', type: 'input',
label: '整车全损无忧' label: '数量',
placeholder:'请输入1-5000的数字',
name: 'quantity',
isClear: true
}, },
{ {
value: 'PC0008', type: 'input',
label: '碰撞无忧' label: '具体价格/万',
} name: 'actualPrice',
], isClear: true
dialogYearOptions: [
{
value: '1',
label: '1年'
}, },
{ {
value: '2', label: '使用年限',
label: '2年' name: 'servicePeriod',
type: 'select',
isClear: true,
optionList: [
{
value: '1',
label: '1年'
},
{
value: '2',
label: '2年'
},
{
value: '3',
label: '3年'
}
],
optionId: 'value',
optionLabel: 'label'
}, },
{ {
value: '3', type: 'input',
label: '3年' label: '备注',
inputType:'textarea',
name: 'remark',
isClear: true,
placeholder:'请输入活动详情或规则',
maxlength: 200
} }
], ],
addDialog: false,
addPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
addDialogRules: { addDialogRules: {
batchType: [{ required: true, message: '请选择版本', trigger: 'change' }], batchType: [{ required: true, message: '请选择版本', trigger: 'change' }],
packageCode: [{ required: true, message: '请选择适应类型', trigger: 'change' }], packageCode: [{ required: true, message: '请选择适应类型', trigger: 'change' }],
...@@ -165,7 +197,9 @@ export default { ...@@ -165,7 +197,9 @@ export default {
addParams: { addParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: true, tableOption: {
width: 100
},
tableColumns: [ tableColumns: [
{ {
label: '批次号', label: '批次号',
...@@ -194,9 +228,33 @@ export default { ...@@ -194,9 +228,33 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
changePgCode(e){
const arr = [{
value: '1',
label: '1年'
},
{
value: '2',
label: '2年'
},
{
value: '3',
label: '3年'
}]
const moreArr = [{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
}]
const target = this.addDialogFormData.find(item => item.name=='servicePeriod')
target.optionList = (e=='PC0005' || e=='PC0007') ? [ ...arr, ...moreArr] : [...arr]
this.addDialogForm.servicePeriod = ''
},
//批量下载 //批量下载
download(e) { download(e) {
console.log(e, '111111111111')
this.$apis.addWorryFree.downLoads({ id: e.id }).then(res => { this.$apis.addWorryFree.downLoads({ id: e.id }).then(res => {
let tempaa = utils.getExplorer() let tempaa = utils.getExplorer()
if (tempaa == 'QQ') { if (tempaa == 'QQ') {
...@@ -214,12 +272,18 @@ export default { ...@@ -214,12 +272,18 @@ export default {
}, },
// 关闭弹窗界面 // 关闭弹窗界面
cancelDetailDialog() { cancelDetailDialog() {
console.log('1')
this.addDialog = false this.addDialog = false
this.addDialogForm = {} this.addDialogForm = {
batchType: '',
packageCode:'',
quantity: '',
actualPrice:'',
servicePeriod: '',
remark: ''
}
}, },
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate(valid => { this.$refs.productCard.$refs[formName].validate(valid => {
if (valid) { if (valid) {
this.$apis.addWorryFree.addCards(this.addDialogForm).then(res => { this.$apis.addWorryFree.addCards(this.addDialogForm).then(res => {
if (res.code == '0') { if (res.code == '0') {
...@@ -227,8 +291,7 @@ export default { ...@@ -227,8 +291,7 @@ export default {
message: '操作成功', message: '操作成功',
type: 'success' type: 'success'
}) })
this.addDialog = false this.cancelDetailDialog()
this.addDialogForm = {}
this.$refs.detailTable.refreshTable() this.$refs.detailTable.refreshTable()
} else { } else {
this.$message({ this.$message({
...@@ -256,36 +319,6 @@ export default { ...@@ -256,36 +319,6 @@ export default {
padding: 8px 16px; padding: 8px 16px;
// margin-bottom: 20px; // margin-bottom: 20px;
} }
/deep/ .el-dialog {
.el-dialog__body {
padding: 40px 20px;
display: flex;
justify-content: center;
.el-form-item__label {
color: #333;
}
input {
height: 36px;
width: 320px;
font-size: 14px;
}
}
.el-dialog__footer {
height: 70px;
padding: 16px 20px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
border-top: 1px solid #e6e6e6;
text-align: center;
.el-button {
width: 72px;
margin: 0 10px;
}
}
}
/deep/ .contain .el-input--small .el-input__inner {
width: 215px;
}
.row-btns { .row-btns {
margin-top: 5px; margin-top: 5px;
margin-bottom: 10px; margin-bottom: 10px;
...@@ -297,4 +330,4 @@ export default { ...@@ -297,4 +330,4 @@ export default {
/deep/ .el-pagination { /deep/ .el-pagination {
margin-top: 20px; margin-top: 20px;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -2,54 +2,26 @@ ...@@ -2,54 +2,26 @@
<div class="equity-wrap"> <div class="equity-wrap">
<el-button type="primary" icon="el-icon-plus" size="small" @click="showDialog('add')"><span style="margin-left: 5px">新增特别约定</span></el-button> <el-button type="primary" icon="el-icon-plus" size="small" @click="showDialog('add')"><span style="margin-left: 5px">新增特别约定</span></el-button>
<div class="equity-wrap contain" style="margin-top: 10px"> <div class="equity-wrap contain" style="margin-top: 10px">
<el-form :inline="true" label-width="auto" label-position="right" class="selectForm"> <GLCombiForm :rowNumber="1" ref="showSearch" :formObj="appointmentForm" :formData="searchFormData" @handleOk="seletTable('select')" @handleRest="seletTable('reset')"></GLCombiForm>
<el-row style="align-items: center"> <el-button plain style="float:right;margin-bottom:10px;" size="small" @click="exportTable" class="selectBtn">导出</el-button>
<el-form-item label="特约名称"> <GLTable ref="appointmentTable" :searchForm="appointmentForm" :tableParams="tableParams" :pageConf="tablePageConf" :getListApi="getAppointmentList">
<el-input v-model="appointmentForm.spaName" placeholder="请输入" size="small"></el-input>
</el-form-item>
<el-form-item label="特约内容">
<el-input v-model="appointmentForm.spaContent" placeholder="请输入" size="small"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px !important">
<el-button plain size="small" @click="seletTable('reset')" class="selectBtn">重置</el-button>
<el-button type="primary" size="small" @click="seletTable('select')" class="selectBtn">查询</el-button>
<el-button plain size="small" @click="exportTable" class="selectBtn">导出</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable ref="appointmentTable" style="margin-top:10px" :searchForm="appointmentForm" :tableParams="tableParams" :pageConf="tablePageConf" :getListApi="getAppointmentList">
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- 批次管理详情弹窗按钮 --> <!-- 批次管理详情弹窗按钮 -->
<el-button type="text" @click="showDialog(scope.scope)">修改</el-button> <!-- <el-button type="text" @click="showDialog(scope.scope)">修改</el-button>
<el-button type="text" @click="del(scope.scope)">删除</el-button> <el-button type="text" @click="del(scope.scope)">删除</el-button> -->
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span> </span>
</GLTable> </GLTable>
<!-- 修改界面弹窗 --> <!-- 修改界面弹窗 -->
<el-dialog :title="dialogTitle" v-if="modifyDialog" :visible.sync="modifyDialog" width="712px" :before-close="handleClose" class="detailDialog"> <GLDialog class="gl-form-page gl-form-min" :title="dialogTitle" mode="mid" v-if="modifyDialog" :visible.sync="modifyDialog" :before-close="handleClose" @onOk="submitForm('modifyForm')" @onCancel="cancelDialog">
<el-form :inline="true" :model="modifyDialogForm" :rules="modifyDialogRules" ref="modifyForm" label-width="120px" class="detailForm"> <glsx-combi-form ref="spaRef" labelWidth="154px" defaultWidth="284px" formRef="modifyForm" :formObj="modifyDialogForm" :formData="modifyDialogData" :formRules="modifyDialogRules"></glsx-combi-form>
<div class="form"> </GLDialog>
<el-row>
<el-form-item label="名称:" prop="spaName">
<el-input v-model="modifyDialogForm.spaName" placeholder="请输入" size="small"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="特约内容" prop="spaContent" style="margin-top: 24px">
<el-input type="textarea" v-model="modifyDialogForm.spaContent" maxlength="200" placeholder="请输入"></el-input>
</el-form-item>
</el-row>
</div>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="cancelDialog">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm('modifyForm')">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
function date_format(date) { function date_format(date) {
var date2 = new Date(date) var date2 = new Date(date)
var YY = date2.getFullYear() + '-' var YY = date2.getFullYear() + '-'
...@@ -63,9 +35,66 @@ function date_format(date) { ...@@ -63,9 +35,66 @@ function date_format(date) {
import utils from '../../util/util' import utils from '../../util/util'
export default { export default {
name: '', name: '',
components:{
glsxCombiForm
},
data() { data() {
return { return {
date_format, date_format,
buttonList: [
{
type: 'el-button',
name: row => {
return '修改'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.showDialog(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '删除'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.del(row.scope)
}
}
],
searchFormData:[
{
label: '特约名称',
name: 'spaName',
type: 'input'
},
{
label: '特约内容',
name: 'spaContent',
type: 'input'
}
],
modifyDialogData: [
{
type: 'input',
label: '特约名称',
name: 'spaName',
isClear: true,
},
{
type: 'input',
label: '特约内容',
name: 'spaContent',
isClear: true,
maxlength: 200,
inputType:'textarea',
}
],
isAdd: false, isAdd: false,
getAppointmentList: this.$apis.appointmentApi.getAppointmentList, getAppointmentList: this.$apis.appointmentApi.getAppointmentList,
dialogTitle: '', dialogTitle: '',
...@@ -83,27 +112,33 @@ export default { ...@@ -83,27 +112,33 @@ export default {
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: true, tableOption: {
width: 120
},
tableColumns: [ tableColumns: [
{ {
label: '特约名称', label: '特约名称',
prop: 'spaName' prop: 'spaName',
width: 400,
line:1
}, },
{ {
label: '特约内容', label: '特约内容',
prop: 'spaContent', prop: 'spaContent',
line:2, width: 400,
width:160 line:1
}, },
{ {
label: '操作人', label: '操作人',
prop: 'updatedBy' prop: 'updatedBy',
minWidth: 100,
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createdDate', prop: 'createdDate',
width:220,
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.createdDate) return this.date_format(cellValue.createdDate)
} }
...@@ -112,6 +147,7 @@ export default { ...@@ -112,6 +147,7 @@ export default {
{ {
label: '更新时间', label: '更新时间',
prop: 'updatedDate', prop: 'updatedDate',
width:220,
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.updatedDate) return this.date_format(cellValue.updatedDate)
} }
...@@ -135,7 +171,7 @@ export default { ...@@ -135,7 +171,7 @@ export default {
this.modifyDialogForm = {} this.modifyDialogForm = {}
}, },
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate(valid => { this.$refs.spaRef.$refs[formName].validate(valid => {
if (valid) { if (valid) {
this.$apis.appointmentApi.modifyAppointment(this.modifyDialogForm).then(res => { this.$apis.appointmentApi.modifyAppointment(this.modifyDialogForm).then(res => {
if (res.code == '0') { if (res.code == '0') {
...@@ -145,7 +181,7 @@ export default { ...@@ -145,7 +181,7 @@ export default {
}) })
this.modifyDialog = false this.modifyDialog = false
this.modifyDialogForm = {} this.modifyDialogForm = {}
this.$refs.modifyForm.clearValidate() this.$refs.spaRef.$refs.modifyForm.clearValidate()
this.$refs.appointmentTable.refreshTable() this.$refs.appointmentTable.refreshTable()
} else { } else {
this.$message({ this.$message({
...@@ -252,59 +288,4 @@ export default { ...@@ -252,59 +288,4 @@ export default {
} }
</script> </script>
<style lang="scss" scoped>
/deep/ .contain .el-input--small .el-input__inner {
width: 215px;
}
/deep/ .el-form-item {
margin-bottom: 0;
}
.selectForm .el-button + .el-button {
margin-left: 20px;
}
/deep/ .detailForm .el-input--small .el-input__inner {
height: 32px;
line-height: 32px;
width: 320px !important;
}
/deep/ .detailDialog .el-dialog__title {
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 28px;
}
/deep/ .detailDialog .el-dialog__body {
padding: 30px 0px;
color: #606266;
font-size: 14px;
word-break: break-all;
text-align: center;
}
/deep/ .detailDialog .el-dialog__footer {
padding: 15px;
border-top: 1px solid #e6e6e6;
text-align: center;
}
/deep/ .el-form-item__content .el-button--small:first-child, .row-btns>div .el-button--small:first-child {
border-color: #5850ff;
color: #5850ff;
}
/deep/ .el-textarea__inner {
display: block;
resize: vertical;
padding: 5px 15px;
line-height: 1.5;
box-sizing: border-box;
width: 100%;
font-size: inherit;
color: #606266;
background-color: #fff;
background-image: none;
border: 1px solid #dcdfe6;
border-radius: 4px;
transition: border-color .2s cubic-bezier(.645,.045,.355,1);
width: 320px;
height: 80px;
}
</style>
\ No newline at end of file \ No newline at end of file
<style lang="scss" scoped></style>
...@@ -188,25 +188,10 @@ ...@@ -188,25 +188,10 @@
</div> </div>
<!-- 底部固定按钮 --> <!-- 底部固定按钮 -->
<div style="height: 78px"></div> <div class="page-btm-btn">
<div <el-button v-if="![3, 5].includes(routeInfo.addOrEdit)" class="custom_black" @click="handleReset">重置</el-button>
class="fixed_bottom" <el-button class="custom_blue" v-if="![3, 5].includes(routeInfo.addOrEdit)" @click="handleDraft">草稿</el-button>
:style="{ <el-button v-if="routeInfo.addOrEdit != '5'" type="primary" @click="handleConfirm">{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}</el-button>
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<div class="ma_top"></div>
<div class="flex_cc ma_bot">
<el-button v-if="![3, 5].includes(routeInfo.addOrEdit)" size="small" class="custom_black" @click="handleReset">重置</el-button>
<div class="mar-10"></div>
<el-button class="custom_blue" v-if="![3, 5].includes(routeInfo.addOrEdit)" size="small" @click="handleDraft">草稿</el-button>
<div class="mar-10"></div>
<el-button v-if="routeInfo.addOrEdit != '5'" type="primary" size="small" @click="handleConfirm">{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}</el-button>
<div class="mar-10"></div>
<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>
</div>
</div> </div>
<!-- 二维码 --> <!-- 二维码 -->
...@@ -228,7 +213,10 @@ export default { ...@@ -228,7 +213,10 @@ export default {
size: 'small', size: 'small',
submit: false, submit: false,
isBlock: true, isBlock: true,
serviceObj: {
PC0005: '',
PC0007: ''
},
footerLeft: '0', footerLeft: '0',
footerWidth: '0', footerWidth: '0',
editCarChildRef: 'editChildRef', editCarChildRef: 'editChildRef',
...@@ -389,13 +377,15 @@ export default { ...@@ -389,13 +377,15 @@ export default {
{ {
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('请输入证件号码'))
}, },
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位数字或字母')) let reg = this.editForm.cardType == 1 || this.editForm.cardType == 2 ? /[a-zA-Z0-9]{18}/.test(value) : /\S\s{0,18}/.test(value)
let tip = this.editForm.cardType == 1 || this.editForm.cardType == 2 ? '请输入18位数字或字母' : '请输入证件号码'
return reg ? callback() : callback(new Error(tip))
}, },
trigger: 'change' trigger: 'change'
} }
...@@ -426,6 +416,7 @@ export default { ...@@ -426,6 +416,7 @@ export default {
this.editForm.cardType = value this.editForm.cardType = value
var idx = this.editFormDataUser.findIndex(item => item.name == 'cardNo') var idx = this.editFormDataUser.findIndex(item => item.name == 'cardNo')
this.editFormDataUser[idx].label = this.baseData.cardTypeList.find(item => item.confId == value).confName this.editFormDataUser[idx].label = this.baseData.cardTypeList.find(item => item.confId == value).confName
this.$refs.editFormRefUser.$refs.editChildRefUser.validateField('cardNo')
} }
}, },
{ {
...@@ -607,6 +598,10 @@ export default { ...@@ -607,6 +598,10 @@ export default {
{ {
confId: 5, confId: 5,
confName: '个人(军官)' confName: '个人(军官)'
},
{
confId: 7,
confName: '外国人'
} }
], ],
cardTypeList: [ cardTypeList: [
...@@ -629,6 +624,10 @@ export default { ...@@ -629,6 +624,10 @@ export default {
{ {
confId: 5, confId: 5,
confName: '军官证' confName: '军官证'
},
{
confId: 7,
confName: '护照'
} }
], ],
servicePeriodList: [ servicePeriodList: [
...@@ -768,14 +767,55 @@ export default { ...@@ -768,14 +767,55 @@ export default {
// 卡号获取期限 // 卡号获取期限
getDateList(seqNo, pack, attr) { getDateList(seqNo, pack, attr) {
this.$apis.beforeSale.dateBycarNo({ seqNo }).then(res => { this.$apis.beforeSale.dateBycarNo({ seqNo }).then(res => {
this.productModal[pack.idName]['service_period'] = `${res.servicePeriod}` if (res != null) {
pack.groupAttributeList.map(el => { let tip = false
if (el.attributeName == 'service_period') { if (pack.packageCode == 'PC0007' || pack.packageCode == 'PC0005') {
this.commonPart(res.servicePeriod, pack, el) this.productList.map(el => {
el.disabled = true if (el.packageCode == pack.packageCode) {
return el el.groupAttributeList.map(ele => {
ele.attributeList.map(item => {
if (item.attributeDesc == '服务期限') {
// if (item?.optionList?.length < 4) {
// item.optionList.push({ value: '4', label: '4年' })
// item.optionList.push({ value: '5', label: '5年' })
// } else if (item?.optionList?.length == 4) {
// item.optionList.push({ value: '5', label: '5年' })
// }
let optionObj = {
'4': { value: '4', label: '4年' },
'5': { value: '5', label: '5年' }
}
if (res.servicePeriod == '4' || res.servicePeriod == '5') {
const Target = item.optionList.find(item => {
return item.value == `${res.servicePeriod}`
})
if (this.serviceObj[el.packageCode].indexOf(res.servicePeriod) == -1) {
tip = true
}
if (!Target) {
item.optionList.push(optionObj[res.servicePeriod + ''])
}
}
}
})
})
}
})
} }
}) if (tip) {
this.productModal[pack.idName]['service_period'] = ''
this.$message.error('该卡号服务年限暂未配置,请联系运营平台人员')
} else {
this.productModal[pack.idName]['service_period'] = `${res.servicePeriod}`
}
pack.groupAttributeList.map(el => {
if (el.attributeName == 'service_period') {
this.commonPart(res.servicePeriod, pack, el)
el.disabled = true
return el
}
})
}
}) })
}, },
// 切换套餐---赋默认值 // 切换套餐---赋默认值
...@@ -1047,13 +1087,27 @@ export default { ...@@ -1047,13 +1087,27 @@ export default {
item.groupAttributeList.map(ele => { item.groupAttributeList.map(ele => {
ele.attributeList.map(e => { ele.attributeList.map(e => {
if ((item.idName == 'stolen' || item.idName == 'car') && e.attributeDesc == '服务期限') { if ((item.idName == 'stolen' || item.idName == 'car') && e.attributeDesc == '服务期限') {
e.optionList = this.baseData.servicePeriodList let serviceArr1 = { value: '4', label: '4年' }
let serviceArr2 = { value: '5', label: '5年' }
let arr = [...this.baseData.servicePeriodList]
if (item.servicePeriod && item.servicePeriod.indexOf('4') > -1) {
arr.push(serviceArr1)
}
if (item.servicePeriod && item.servicePeriod.indexOf('5') > -1) {
arr.push(serviceArr2)
}
e.optionList = [...arr]
this.serviceObj[item.packageCode] = item.servicePeriod
this.productModal[item.idName][e.attributeName] = '1' this.productModal[item.idName][e.attributeName] = '1'
} else if (e.attributeDesc == '购车类型') { } else if (e.attributeDesc == '购车类型') {
e.optionList = this.baseData.buyCarTypeList e.optionList = this.baseData.buyCarTypeList
this.productModal[item.idName][e.attributeName] = '0' this.productModal[item.idName][e.attributeName] = '0'
} else if ((item.idName == 'tire' || item.idName == 'crash' || item.idName == 'vip') && e.attributeDesc == '服务期限') { } else if ((item.idName == 'tire' || item.idName == 'crash' || item.idName == 'vip') && e.attributeDesc == '服务期限') {
e.optionList = this.baseData.servicePeriodList2 if (item.idName == 'tire' || item.idName == 'crash') {
e.optionList = this.baseData.servicePeriodList
} else {
e.optionList = this.baseData.servicePeriodList2
}
this.productModal[item.idName][e.attributeName] = '1' this.productModal[item.idName][e.attributeName] = '1'
e.disabled = true e.disabled = true
} else if (e.attributeDesc == '生效日期') { } else if (e.attributeDesc == '生效日期') {
...@@ -1166,8 +1220,8 @@ export default { ...@@ -1166,8 +1220,8 @@ export default {
}) })
}, },
getPackageList() { getPackageList() {
let contractNo = this.routeInfo.contractNo==-1? '': this.routeInfo.contractNo let contractNo = this.routeInfo.contractNo == -1 ? '' : this.routeInfo.contractNo
this.$apis.beforeSale.getPackageListApi({contractNo}).then(res => { this.$apis.beforeSale.getPackageListApi({ contractNo }).then(res => {
this.toTestProductData(res) this.toTestProductData(res)
}) })
}, },
...@@ -1727,9 +1781,6 @@ export default { ...@@ -1727,9 +1781,6 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.edit-equity {
margin-top: 17px;
}
.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);
...@@ -1992,40 +2043,6 @@ export default { ...@@ -1992,40 +2043,6 @@ export default {
.m-r-10 { .m-r-10 {
margin-right: 10px; margin-right: 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 {
box-sizing: border-box;
padding: 0 20px 0 40px;
height: 78px;
.custom_black {
background: #ffffff;
color: #333333;
border: 1px solid #333333;
}
.custom_blue {
background: #ffffff;
color: #5850ff;
border: 1px solid #5850ff;
}
.mar-10 {
width: 20px;
}
}
}
.app { .app {
background: #f4f5fa; background: #f4f5fa;
padding: 0px 20px 20px 40px; padding: 0px 20px 20px 40px;
......
...@@ -8,28 +8,15 @@ ...@@ -8,28 +8,15 @@
</div> </div>
<div class="container"> <div class="container">
<div class="find_wrap"> <div class="find_wrap">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData"></glsx-combi-form> <GLCombiForm :key="newKey" ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3">
<span slot="footer" class="footer-btns">
<el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="table_wrapper"> <div class="table_wrapper">
<el-button plain style="float:right;margin-bottom:10px;" :size="size" @click="handleExport">导出</el-button>
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <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-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[2, 4, 5].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
<!-- <el-button v-if="[2, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(5, scope.scope)">查看</el-button> -->
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<GLButton v-if="[0].includes(scope.scope.orderStatus)" fn="编辑" type="text" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="[2].includes(scope.scope.orderStatus)" fn="修改" type="text" @click="handleEdit(3, scope.scope)">修改</GLButton>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退单</el-button>
<GLButton v-if="[3, 4, 5].includes(scope.scope.orderStatus)" fn="重新提单" type="text" @click="handleEdit(4, scope.scope)">重新提单</GLButton>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -63,7 +50,7 @@ ...@@ -63,7 +50,7 @@
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import glsxCombiForm from '@/components/glsx-combi-form' // import glsxCombiForm from '@/components/glsx-combi-form'
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import pdfDialog from './pdfDialog' import pdfDialog from './pdfDialog'
import utils from '../../util/util' import utils from '../../util/util'
...@@ -72,6 +59,103 @@ export default { ...@@ -72,6 +59,103 @@ export default {
data() { data() {
return { return {
size: 'small', size: 'small',
newKey: new Date(),
buttonList: [
{
type: 'GLButton',
name: row => {
return '查看'
},
condition: row => {
return [2, 4, 5].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: row => this.handleEdit(5, row.scope)
}
},
{
type: 'el-button',
name: row => {
return '打印'
},
condition: row => {
return [2].includes(row.scope.orderStatus)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handlePdf(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '编辑'
},
condition: row => {
return [0].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit(2, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '修改'
},
condition: row => {
return [2].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '修改'
},
listeners: {
click: row => this.handleEdit(3, row.scope)
}
},
{
type: 'el-button',
name: row => {
return '退单'
},
condition: row => {
return [2].includes(row.scope.orderStatus)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handleBack(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '重新提单'
},
condition: row => {
return [3, 4, 5].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '重新提单'
},
listeners: {
click: row => this.handleEdit(4, row.scope)
}
}
],
noCancel: true, noCancel: true,
isBlock: true, isBlock: true,
isTipVisible: false, isTipVisible: false,
...@@ -163,9 +247,7 @@ export default { ...@@ -163,9 +247,7 @@ export default {
optionId: 'packageCode', optionId: 'packageCode',
optionLabel: 'packageName', optionLabel: 'packageName',
optionsName: 'goodsStatusList' optionsName: 'goodsStatusList'
} },
],
searchFormData2: [
{ {
label: '提单成功时间', label: '提单成功时间',
name: 'successDate', name: 'successDate',
...@@ -179,9 +261,7 @@ export default { ...@@ -179,9 +261,7 @@ export default {
name: 'effectiveDate', name: 'effectiveDate',
type: 'datePicker', type: 'datePicker',
isClear: true isClear: true
} },
],
searchFormData3: [
{ {
label: '总部', label: '总部',
name: 'merchantId', name: 'merchantId',
...@@ -192,16 +272,16 @@ export default { ...@@ -192,16 +272,16 @@ export default {
optionsName: 'merchantList', optionsName: 'merchantList',
isHide: true, isHide: true,
changeAttr: (val, targetItem) => { changeAttr: (val, targetItem) => {
var idx = this.searchFormData3.findIndex(item => item.name == this.levelToShow['2']) var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['2'])
this.searchFormData3[idx].isHide = false this.searchFormData[idx].isHide = false
this.searchForm[this.levelToShow['2']] = '' this.searchForm[this.levelToShow['2']] = ''
var tempIdx = '' var tempIdx = ''
for (var i = 3; i <= 4; i++) { for (var i = 3; i <= 4; i++) {
tempIdx = this.searchFormData3.findIndex(item => item.name == this.levelToShow[i + '']) tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow[i + ''])
this.searchFormData3[tempIdx].isHide = true this.searchFormData[tempIdx].isHide = true
this.searchForm[this.levelToShow[i + '']] = '' this.searchForm[this.levelToShow[i + '']] = ''
} }
this.getMerchantList(val, 2, this.searchFormData3[idx].name, this.searchFormData3[idx].optionsName) this.getMerchantList(val, 2, this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
} }
}, },
{ {
...@@ -214,13 +294,13 @@ export default { ...@@ -214,13 +294,13 @@ export default {
optionsName: 'dqList', optionsName: 'dqList',
isHide: true, isHide: true,
changeAttr: (val, targetItem) => { changeAttr: (val, targetItem) => {
var idx = this.searchFormData3.findIndex(item => item.name == this.levelToShow['3']) var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['3'])
this.searchFormData3[idx].isHide = false this.searchFormData[idx].isHide = false
this.searchForm[this.levelToShow['3']] = '' this.searchForm[this.levelToShow['3']] = ''
var tempIdx = this.searchFormData3.findIndex(item => item.name == this.levelToShow['4']) var tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow['4'])
this.searchFormData3[tempIdx].isHide = true this.searchFormData[tempIdx].isHide = true
this.searchForm[this.levelToShow['4']] = '' this.searchForm[this.levelToShow['4']] = ''
this.getMerchantList(val, 3, this.searchFormData3[idx].name, this.searchFormData3[idx].optionsName) this.getMerchantList(val, 3, this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
} }
}, },
{ {
...@@ -233,10 +313,10 @@ export default { ...@@ -233,10 +313,10 @@ export default {
optionsName: 'pqList', optionsName: 'pqList',
isHide: true, isHide: true,
changeAttr: (val, targetItem) => { changeAttr: (val, targetItem) => {
var idx = this.searchFormData3.findIndex(item => item.name == this.levelToShow['4']) var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow['4'])
this.searchFormData3[idx].isHide = false this.searchFormData[idx].isHide = false
this.searchForm[this.levelToShow['4']] = '' this.searchForm[this.levelToShow['4']] = ''
this.getMerchantList(val, 4, this.searchFormData3[idx].name, this.searchFormData3[idx].optionsName) this.getMerchantList(val, 4, this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
} }
}, },
{ {
...@@ -250,6 +330,22 @@ export default { ...@@ -250,6 +330,22 @@ export default {
isHide: true isHide: true
} }
], ],
searchFormData2: [
{
label: '提单成功时间',
name: 'successDate',
type: 'datePicker',
labelWidth: 95,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '生效时间',
name: 'effectiveDate',
type: 'datePicker',
isClear: true
}
],
// 表格 // 表格
getListApi: this.$apis.beforeSale.getListApi, getListApi: this.$apis.beforeSale.getListApi,
tableParams: { tableParams: {
...@@ -260,26 +356,23 @@ export default { ...@@ -260,26 +356,23 @@ export default {
label: '车主姓名', label: '车主姓名',
prop: 'customerName', prop: 'customerName',
line: 1, line: 1,
width: '200px', width: '200px'
formatter: cellValue => {
return cellValue.customerName || '-'
}
}, },
{ {
label: '合同号', label: '合同号',
prop: 'contractNo', prop: 'contractNo',
width: '200px', width: 250,
formatter: cellValue => { formatter: cellValue => {
return [2, 4, 5].includes(cellValue.orderStatus) ? cellValue.contractNo || '-' : '-' return [2, 4, 5].includes(cellValue.orderStatus) ? cellValue.contractNo || '--' : '--'
} }
}, },
{ {
label: '提单成功时间', label: '提单成功时间',
line: 1, line: 1,
prop: 'successDate', prop: 'successDate',
width: '160px', width: 200,
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') : '--'
} }
}, },
{ {
...@@ -288,76 +381,56 @@ export default { ...@@ -288,76 +381,56 @@ export default {
prop: 'billingDate', prop: 'billingDate',
width: '130px', width: '130px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.billingDate ? dayjs(cellValue.billingDate).format('YYYY-MM-DD') : '-' return cellValue.billingDate ? dayjs(cellValue.billingDate).format('YYYY-MM-DD') : '--'
} }
}, },
{ {
label: '店面名称', label: '店面名称',
line: 1, line: 1,
prop: 'merchantName', prop: 'merchantName',
width: '160px', width: '160px'
formatter: cellValue => {
return cellValue.merchantName || '-'
}
}, },
{ {
label: '车品牌', label: '车品牌',
line: 1, line: 1,
prop: 'vehicleBrandName', prop: 'vehicleBrandName',
width: '160px', width: '160px'
formatter: cellValue => {
return cellValue.vehicleBrandName || '-'
}
}, },
{ {
label: '车系', label: '车系',
line: 1, line: 1,
width: '160px', width: '160px',
prop: 'vehicleSeriesName', prop: 'vehicleSeriesName'
formatter: cellValue => {
return cellValue.vehicleSeriesName || '-'
}
}, },
{ {
label: '无忧卡卡号', label: '无忧卡卡号',
line: 1, line: 1,
prop: 'cardSeqNo', prop: 'cardSeqNo',
width: '200px', width: '200px'
formatter: cellValue => {
return cellValue.cardSeqNo || '-'
}
}, },
{ {
label: '车架号', label: '车架号',
prop: 'vin', prop: 'vin',
width: '200px', width: '200px'
formatter: cellValue => {
return cellValue.vin || '-'
}
}, },
{ {
label: '电话', label: '电话',
prop: 'customerPhone', prop: 'customerPhone',
width: '160px', width: '160px'
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
}, },
{ {
label: '产品名称', label: '产品名称',
prop: 'packageName', prop: 'packageName',
width: '200px', width: '200px'
formatter: cellValue => {
return cellValue.packageName || '-'
}
}, },
{ {
label: '无忧保障服务费', label: '无忧保障服务费',
line: 1, line: 1,
align: 'right',
prop: 'actualSalesPrice', prop: 'actualSalesPrice',
width: '160px', width: '160px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.actualSalesPrice ? (cellValue.actualSalesPrice / 100).toFixed(2) : '-' return cellValue.actualSalesPrice ? (cellValue.actualSalesPrice / 100).toFixed(2) : '0'
} }
}, },
// { // {
...@@ -381,9 +454,10 @@ export default { ...@@ -381,9 +454,10 @@ export default {
{ {
label: '服务期限', label: '服务期限',
line: 1, line: 1,
width: 130,
prop: 'servicePeriod', prop: 'servicePeriod',
formatter: cellValue => { formatter: cellValue => {
return cellValue.servicePeriod ? `${cellValue.servicePeriod}年` : '-' return cellValue.servicePeriod ? `${cellValue.servicePeriod}年` : '--'
} }
}, },
{ {
...@@ -392,7 +466,7 @@ export default { ...@@ -392,7 +466,7 @@ export default {
prop: 'effectiveDate', prop: 'effectiveDate',
width: '130px', width: '130px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '-' return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '--'
} }
}, },
{ {
...@@ -400,7 +474,7 @@ export default { ...@@ -400,7 +474,7 @@ export default {
prop: 'orderStatus', prop: 'orderStatus',
width: '170px', width: '170px',
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 : '--'
} }
}, },
// { // {
...@@ -480,28 +554,19 @@ export default { ...@@ -480,28 +554,19 @@ export default {
// }, // },
{ {
label: '省代', label: '省代',
line: 1, width: 150,
prop: 'provinceMerchantName', prop: 'provinceMerchantName'
formatter: cellValue => {
return cellValue.provinceMerchantName || '-'
}
}, },
{ {
label: '市代', label: '市代',
line: 1, width: 150,
prop: 'cityMerchantName', prop: 'cityMerchantName'
formatter: cellValue => {
return cellValue.cityMerchantName || '-'
}
}, },
{ {
label: '操作人', label: '操作人',
line: 1, line: 1,
prop: 'updatedBy', prop: 'updatedBy',
width: '140px', width: '140px'
formatter: cellValue => {
return cellValue.updatedBy || '-'
}
}, },
{ {
label: '操作', label: '操作',
...@@ -591,7 +656,7 @@ export default { ...@@ -591,7 +656,7 @@ export default {
}, },
components: { components: {
glsxCombiForm, // glsxCombiForm,
// glsxDialog, // glsxDialog,
pdfDialog pdfDialog
}, },
...@@ -618,10 +683,10 @@ export default { ...@@ -618,10 +683,10 @@ export default {
console.log(res) console.log(res)
this.userInfo = res this.userInfo = res
if (res.merchantAccountLevel != 4) { if (res.merchantAccountLevel != 4) {
var idx = this.searchFormData3.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.searchFormData3[idx].isHide = false this.searchFormData[idx].isHide = false
this.searchFormData3[idx].labelWidth = 95 this.searchFormData[idx].labelWidth = 95
this.getMerchantList('', '', this.searchFormData3[idx].name, this.searchFormData3[idx].optionsName) this.getMerchantList('', '', this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
} }
}) })
}, },
...@@ -639,7 +704,7 @@ export default { ...@@ -639,7 +704,7 @@ export default {
} }
this.$apis.beforeSale.getMerchantApi(params).then(res => { this.$apis.beforeSale.getMerchantApi(params).then(res => {
this.baseData[listName] = res this.baseData[listName] = res
this.getOptionsList('searchFormData3', false, attrName) this.getOptionsList('searchFormData', false, attrName)
}) })
}, },
getSelectInputParams() { getSelectInputParams() {
...@@ -709,6 +774,7 @@ export default { ...@@ -709,6 +774,7 @@ export default {
} }
}) })
} }
this.newKey = new Date()
}, },
secondConfirm(title, txt, apiModule, apiName, apiParams) { secondConfirm(title, txt, apiModule, apiName, apiParams) {
...@@ -763,7 +829,7 @@ export default { ...@@ -763,7 +829,7 @@ export default {
if (addOrEdit == 3 && !this.userInfo.admin && new Date(new Date().setDate(new Date().getDate() - 7)) > new Date(row.successDate)) { if (addOrEdit == 3 && !this.userInfo.admin && new Date(new Date().setDate(new Date().getDate() - 7)) > new Date(row.successDate)) {
const h = this.$createElement const h = this.$createElement
this.$message({ this.$message({
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:operation@didihu.com.cn,抄送:liuqm@didihu.com.cn,jiangfj@didihu.com.cn提交退单申请 ')]), message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:service@didihu.com.cn,提交修改申请 ,邮件标题:门店名称+合同号+修改内容,并备注门店接待姓名+电话')]),
type: 'error' type: 'error'
}) })
return true return true
...@@ -886,7 +952,7 @@ export default { ...@@ -886,7 +952,7 @@ export default {
if (!this.userInfo.admin && new Date(new Date().setDate(new Date().getDate() - 7)) > new Date(row.successDate)) { if (!this.userInfo.admin && new Date(new Date().setDate(new Date().getDate() - 7)) > new Date(row.successDate)) {
const h = this.$createElement const h = this.$createElement
this.$message({ this.$message({
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:operation@didihu.com.cn,抄送:liuqm@didihu.com.cn,jiangfj@didihu.com.cn提交退单申请 ')]), message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:service@didihu.com.cn,提交退单申请 ,邮件标题:门店名称+合同号+退单原因,并备注门店接待姓名+电话')]),
type: 'error' type: 'error'
}) })
return true return true
...@@ -938,8 +1004,8 @@ export default { ...@@ -938,8 +1004,8 @@ export default {
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.searchFormData3.findIndex(item => item.name == this.levelToShow[i + '']) tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow[i + ''])
this.searchFormData3[tempIdx].isHide = true this.searchFormData[tempIdx].isHide = true
this.searchForm[this.levelToShow[i + '']] = '' this.searchForm[this.levelToShow[i + '']] = ''
} }
} }
...@@ -961,15 +1027,12 @@ export default { ...@@ -961,15 +1027,12 @@ export default {
overflow-y: auto; overflow-y: auto;
height: 100%; height: 100%;
} }
.before-sale {
margin-top: 17px;
}
.before-sale .flex { .before-sale .flex {
display: flex; display: flex;
} }
.find_wrap { .find_wrap {
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; padding: 20px 20px 2px 20px;
.resetBtn { .resetBtn {
background: #ffffff; background: #ffffff;
...@@ -983,7 +1046,7 @@ export default { ...@@ -983,7 +1046,7 @@ export default {
.table_wrapper { .table_wrapper {
// margin-top: 10px; // margin-top: 10px;
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 20px 20px; padding: 0 20px 20px;
} }
...@@ -1028,14 +1091,14 @@ export default { ...@@ -1028,14 +1091,14 @@ export default {
/* margin-bottom: 18px; */ /* margin-bottom: 18px; */
} }
.before-sale .el-table .cell { // .before-sale .el-table .cell {
line-height: 16px; // line-height: 16px;
} // }
.before-sale .table-btns { // .before-sale .table-btns {
display: grid; // display: grid;
grid-template-columns: repeat(auto-fill, 33.33%); // grid-template-columns: repeat(auto-fill, 33.33%);
grid-row-gap: 10px; // grid-row-gap: 10px;
} // }
.before-sale .table-btns .el-button { .before-sale .table-btns .el-button {
// padding: 0 0 0 5px; // padding: 0 0 0 5px;
border-radius: 0; border-radius: 0;
......
<!-- 权益订单列表 -->
<template>
<div class="before-sale">
<div class="container">
<div class="find_wrap">
<GLCombiForm ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<!-- 表格区域 开始 -->
<div class="table_wrapper">
<el-button plain style="float:right;margin-bottom:10px;" :size="size" @click="handleExport">导出</el-button>
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
</div>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import utils from '../../util/util'
export default {
name: 'equityList',
data() {
return {
size: 'small',
searchForm: {
completionStatus: '',
packageCode: '',
channel: '',
successDate: [],
effectiveDate: []
},
tableSearchForm: {},
// 搜索
searchSelectObj: {
nameOrNoOrVin: {
attr: 'customerName',
value: ''
}
},
searchFormData: [
{
type: 'selectInput',
selectName: 'nameOrNoOrVin',
isClear: true,
inputWidth: '325px',
selectWidth: '110px',
selectOption: [
{
label: '车主姓名',
name: 'customerName'
},
{
label: '合同号',
name: 'contractNo'
},
{
label: '车架号',
name: 'vin'
},
{
label: '店面名称',
name: 'merchantName'
}
],
handleSelectChange: value => {
this.searchSelectObj.nameOrNoOrVin.value = ''
}
},
{
label: '完成状态',
name: 'completionStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'completList'
},
{
label: '产品名称',
name: 'packageCode',
type: 'select',
optionList: [],
optionId: 'packageCode',
optionLabel: 'packageName',
optionsName: 'goodsStatusList'
},
{
label: '渠道',
name: 'channel',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'channelList'
},
{
label: '提单成功时间',
name: 'successDate',
type: 'datePicker',
labelWidth: 95,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '生效时间',
name: 'effectiveDate',
type: 'datePicker',
isClear: true
}
],
// 表格
getListApi: this.$apis.beforeSale.getOrdersummary,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '车主姓名',
prop: 'customerName',
line: 1,
width: 200
},
{
label: '合同号',
prop: 'contractNo',
width: 250,
formatter: cellValue => {
return [2, 4, 5, 7, 8, 9, 10, 11].includes(cellValue.orderStatus) ? cellValue.contractNo || '--' : '--'
}
},
{
label: '提单成功时间',
line: 1,
prop: 'successDate',
width: 200,
formatter: cellValue => {
return cellValue.successDate ? dayjs(cellValue.successDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '店面名称',
line: 1,
prop: 'merchantName',
width: '160px'
},
{
label: '车品牌',
line: 1,
prop: 'vehicleBrandName',
width: '160px'
},
{
label: '车系',
line: 1,
width: '160px',
prop: 'vehicleSeriesName'
},
{
label: '车架号',
prop: 'vin',
width: '200px'
},
{
label: '电话',
prop: 'customerPhone',
width: '160px'
},
{
label: '产品名称',
prop: 'packageName',
width: '200px'
},
{
label: '服务期限',
line: 1,
width: 130,
prop: 'servicePeriod',
formatter: cellValue => {
return cellValue.servicePeriod ? `${cellValue.servicePeriod}年` : '--'
}
},
{
label: '生效时间',
line: 1,
prop: 'effectiveDate',
width: '130px',
formatter: cellValue => {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '--'
}
},
{
label: '完成状态',
prop: 'completionStatus',
width: '170px',
formatter: cellValue => {
return this.baseData.completList.map(item => item.confId).includes(cellValue.completionStatus) ? this.baseData.completList.find(item => item.confId == cellValue.completionStatus).confName : '--'
}
},
{
label: '操作人',
line: 1,
prop: 'updatedBy',
width: '140px'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageCount', totalCount: 'total' },
// 公共数据
baseData: {
goodsStatusList: [],
merchantList: [],
dqList: [],
pqList: [],
mdList: [],
channelList: [
{
confId: 1,
confName: '嘀加'
},
{
confId: 2,
confName: '广汇'
}
],
completList: [
{
confId: 2,
confName: '提单成功'
},
{
confId: 4,
confName: '已退单'
}
],
orderStatusList: [
{
confId: 0,
confName: '待提单'
},
{
confId: 2,
confName: '提单成功'
},
{
confId: 3,
confName: '提单失败'
},
{
confId: 4,
confName: '已退单'
},
{
confId: 5,
confName: '已过期'
}
],
dataPerfectionList: [
{
confId: 1,
confName: '已完成'
},
{
confId: 0,
confName: '未完成'
}
],
auditStatusList: [
{
confId: 0,
confName: '待审核'
},
{
confId: 1,
confName: '已审核'
}
]
}
}
},
mounted() {
this.$apis.beforeSale.getSummaryPackage({}).then(res => {
this.baseData.goodsStatusList = res
this.getOptionsList('searchFormData')
})
},
methods: {
getSelectInputParams() {
const list = Object.keys(this.searchSelectObj)
var params = {}
list.forEach(i => {
const item = this.searchSelectObj[i]
item.value && (params[item.attr] = item.value)
})
return params
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
const tempParams = this.getSelectInputParams()
params = {
...params,
...tempParams
}
if (this.searchForm.successDate.length) {
params.successStartDates = new Date(this.searchForm.successDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.successEndDates = new Date(this.searchForm.successDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
if (this.searchForm.effectiveDate.length) {
params.effectiveStartDates = new Date(this.searchForm.effectiveDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.effectiveEndDates = new Date(this.searchForm.effectiveDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.successDate
delete params.effectiveDate
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
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] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
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] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
// 导出
handleExport() {
var params = this.getParams()
this.$apis.beforeSale.getSummaryExportApi(params).then(res => {
// window.open(res)
let tempaa = utils.getExplorer()
if (tempaa == 'QQ') {
window.open(res)
} else {
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = res
document.body.appendChild(iframe)
}
})
},
handleSearch() {
this.$refs.equityRef.refreshTable()
},
handleReset() {
this.searchForm = {
completionStatus: '',
packageCode: '',
channel: '',
successDate: [],
effectiveDate: []
}
this.searchSelectObj = {
nameOrNoOrVin: {
attr: 'customerName',
value: ''
}
}
this.handleSearch()
}
}
}
</script>
<style lang="scss" scoped>
.app {
background: #f4f5fa;
padding: 0px 20px 20px 40px;
position: absolute;
box-sizing: border-box;
width: 100%;
top: 0px;
left: 0px;
overflow-y: auto;
height: 100%;
}
.before-sale .flex {
display: flex;
}
.find_wrap {
background: #ffffff;
padding: 20px 20px 2px 20px;
.resetBtn {
background: #ffffff;
color: #5850ff;
border: 1px solid #5850ff;
}
.m-r-l-20 {
margin: 0 20px;
}
}
.table_wrapper {
background: #ffffff;
padding: 0 20px 20px;
}
.before-sale .m-b-10 {
margin-bottom: 10px;
}
.before-sale .table-top-tips {
box-sizing: border-box;
margin-left: 10px;
width: 100%;
height: 32px;
line-height: 30px;
font-size: 12px;
background-color: #fff0bb;
border: 1px solid #ffca78;
padding: 0 10px;
border-radius: 2px;
}
.before-sale .table-top-tips .el-icon-warning {
font-size: 12px;
color: #f77315;
margin-right: 8px;
}
.before-sale .circule-tips {
position: absolute;
top: 0;
right: -6px;
display: inline-block;
height: 6px;
width: 6px;
border-radius: 100%;
background-color: red;
}
.before-sale .footer-btns {
float: right;
}
.before-sale .table-btns .el-button {
border-radius: 0;
border: 0;
padding: 0;
margin: 0;
}
.tips-dialog .el-icon-success {
margin-right: 10px;
font-size: 22px;
color: #228b22;
}
.tips-dialog .el-icon-warning {
margin-right: 10px;
font-size: 22px;
color: #f77315;
}
.tips-dialog .el-icon-error {
margin-right: 10px;
font-size: 22px;
color: #f56c6c;
}
.f-size {
font-size: 14px;
display: flex;
/* text-align: center; */
}
.tips-dialog .el-dialog__body {
padding: 10px 15px 20px !important;
}
</style>
<template> <template>
<div class="introduct_container"> <div class="introduct_container">
<div class="top_play_wrap flex_scb"> <div class="top_play_wrap flex_scb">
<div class="text_wrap"> <div class="text_wrap">
<span class="maxTitle">售前权益服务</span> <span class="maxTitle">售前权益服务</span>
<span class="maxTitle">一套可变现的权益服务系统</span> <span class="maxTitle">一套可变现的权益服务系统</span>
<span class="midTitle">帮您实现客户线上化闭环</span> <span class="midTitle">帮您实现客户线上化闭环</span>
<span>车生活权益促活跃,养车权益促返厂,赚钱锁客两不误</span> <span>车生活权益促活跃,养车权益促返厂,赚钱锁客两不误</span>
</div>
<div class="bg_wrap flex_cc">
<img class="max_icon" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/before_intro.png" />
<img @click="videoShow = true" class="play_icon" src="../../assets/play_icon.png" />
</div>
</div>
<div class="mid_wrapper">
<div class="content_one flex_sc">
<div class="title left">
<span>您提供的</span>
<i class="el-icon-caret-right"></i>
</div> </div>
<div class="bg_wrap flex_cc"> <div class="title right">
<img class="max_icon" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/before_intro.png" /> <span>您将获得的</span>
<img @click="videoShow = true" class="play_icon" src="../../assets/play_icon.png" /> <div class="icon_point"></div>
</div> </div>
</div> </div>
<div class="mid_wrapper"> <div class="content_two flex_scb">
<div class="content_one flex_sc"> <template v-for="(item, index) in localList">
<div class="title left"> <div :key="index" class="box_item_wrap flex_cc">
<span>您提供的</span> <img :src="item.icon" />
<i class="el-icon-caret-right"></i> <div class="box_title">{{ item.title }}</div>
</div>
<div class="title right">
<span>您将获得的</span>
<div class="icon_point"></div>
</div> </div>
</div> </template>
<div class="content_two flex_scb"> </div>
<template v-for="(item, index) in localList"> <div class="label_title">无忧案例</div>
<div :key="index" class="box_item_wrap flex_cc"> <div class="content_three">
<img :src="item.icon" /> <template v-for="(item, index) in localList2">
<div class="box_title">{{ item.title }}</div> <div :key="index" class="box_new_item_wrapper" :class="[{ noborder: index == 1 }]">
</div> <div class="left_wrap">
</template> <img class="image_wrap" :src="item.icon" />
</div> <div class="new_title">{{ item.title }}</div>
<div class="label_title">无忧案例</div> <div class="con_wrap">
<div class="content_three"> <div class="point flex_cc">
<template v-for="(item, index) in localList2"> <div class="icon_po"></div>
<div :key="index" class="box_new_item_wrapper" :class="[{ noborder: index == 1 }]">
<div class="left_wrap">
<img class="image_wrap" :src="item.icon" />
<div class="new_title">{{ item.title }}</div>
<div class="con_wrap">
<div class="point flex_cc">
<div class="icon_po"></div>
</div>
<div class="point_content">{{ item.desc1 }}</div>
</div>
<div style="height: 15px"></div>
<div class="con_wrap">
<div class="point flex_cc">
<div class="icon_po"></div>
</div>
<div class="point_content">{{ item.desc2 }}</div>
</div> </div>
<div class="point_content">{{ item.desc1 }}</div>
</div> </div>
<div class="right_wrap"> <div style="height: 15px"></div>
<img :src="item.img" /> <div class="con_wrap">
<div class="point flex_cc">
<div class="icon_po"></div>
</div>
<div class="point_content">{{ item.desc2 }}</div>
</div> </div>
</div> </div>
</template> <div class="right_wrap">
</div> <img :src="item.img" />
</div>
</div>
</template>
</div> </div>
<qrCode :codeUrl="code" :phone="phone"></qrCode>
<el-dialog :visible.sync="videoShow" width="50%" :before-close="handleClose">
<div slot="title" style="height: 18px"></div>
<video v-if="videoShow" width="100%" height="100%" autoplay controls src="https://img02.glsx.com.cn/scrm/video/beforeSale.mp4"></video>
</el-dialog>
</div> </div>
<qrCode :codeUrl="code" :phone="phone"></qrCode>
<el-dialog :visible.sync="videoShow" width="50%" :before-close="handleClose">
<div slot="title" style="height: 18px"></div>
<video v-if="videoShow" width="100%" height="100%" autoplay controls src="https://img02.glsx.com.cn/scrm/video/beforeSale.mp4"></video>
</el-dialog>
</div>
</template> </template>
<script> <script>
import qrCode from '../../components/qr-code/index.vue' import qrCode from '../../components/qr-code/index.vue'
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.app { .app {
background: #f4f5fa; background: #f4f5fa;
padding: 0px 20px 20px 40px; padding: 0px 20px 20px 40px;
position: absolute; position: absolute;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
...@@ -146,13 +146,9 @@ export default { ...@@ -146,13 +146,9 @@ export default {
overflow-y: auto; overflow-y: auto;
height: 100%; height: 100%;
} }
.introduct_container {
margin-top: 17px;
}
.top_play_wrap { .top_play_wrap {
height: 360px; height: 360px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box; box-sizing: border-box;
padding-right: 50px; padding-right: 50px;
.text_wrap { .text_wrap {
...@@ -205,7 +201,7 @@ export default { ...@@ -205,7 +201,7 @@ export default {
} }
.mid_wrapper { .mid_wrapper {
background: #ffffff; background: #ffffff;
margin-top: 20px; margin-top: 16px;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
.content_one { .content_one {
......
<template>
<div :style="{ 'margin-top': +marginTop + 'px' }" class="box">
<div v-if="title" class="header" :style="{ cursor: openBtn ? 'pointer' : 'unset' }" @click.stop="showBody()">
<i v-if="openBtn" class="el-icon-caret-right" :class="{ trans: open }"></i>
{{ title }}
<div style="float:right">
<slot name="right"></slot>
</div>
</div>
<div v-if="!openBtn || open" class="main-wrap">
<slot></slot>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'card',
data() {
return {
open: false
}
},
props: {
title: {
type: String,
default: ''
},
openBtn: {
type: Boolean,
default: false
},
marginTop:{
tyep: Number|String,
default: 16
}
},
mounted() {},
methods:{
showBody(){
if(!this.openBtn) return
this.open = !this.open
}
}
}
</script>
<style lang="scss" scoped>
.box {
background-color: #fff;
.header {
height: 58px;
background-color: #fff;
line-height: 58px;
padding: 0 20px;
box-sizing: border-box;
font-family: inherit;
font-size: 16px;
color: #333333;
// font-weight: 600;
}
.main-wrap {
border-top: 1px solid #e5e5e5;
padding: 20px;
height: 100%;
position: relative;
}
}
.header .trans {
transform: rotate(90deg);
}
.header .el-icon-caret-right {
transition: transform 0.3s ease 0s;
}
</style>
<template>
<div>
<div class="widget">
<div class="title">报案信息(客户提交)</div>
<div class="content">
<glsxCombiForm :formDisable="isDisabled" :isInline="false" :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="repotData" :formData="editFormData"></glsxCombiForm>
</div>
</div>
<!-- 报案信息(店面补充) -->
<div>
<Card title="报案信息(店面补充)" class="handler-info gl-form-page">
<glsx-combi-form :formDisable="isDisabled" ref="handlerRef" :isInline="false" labelWidth="154px" defaultWidth="432px" :formObj="repotData" :formData="handlerForm">
<div slot="approveAmountSlot" class="amount-wrap">
<div v-for="(item, index) in itemList" :key="index">
<el-checkbox @change="selectService" v-model="item.checked">{{ item.serviceItemName }}</el-checkbox>
<div v-if="item.serviceItemCode == 'SC0003'" class="loss_wrap flex_sc">
<label class="required" for="">损失类型:</label>
<el-radio v-model="item.lossType" label="1">全损</el-radio>
<el-radio v-model="item.lossType" label="2">局部</el-radio>
</div>
<div v-if="item.serviceItemCode == 'SC0006'" class="loss_wrap flex_sc">
<label class="required" for="">服务类型:</label>
<el-checkbox-group v-model="item.lossTypeList" @change="changeType">
<el-checkbox label="3">钥匙</el-checkbox>
<el-checkbox label="4">车牌重置</el-checkbox>
</el-checkbox-group>
</div>
<div class="unit-price" :class="[{ nopt20: item.serviceItemCode == 'SC0006' || item.serviceItemCode == 'SC0003' }]">
<label class="required" for="">预估损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input>
</div>
</div>
<div class="lump-sum">
<span>合计</span>
<span>
预估损失金额
<span class="sign">¥&nbsp;</span>
<span class="price">{{ repotData.applyAmount }}</span>
元
</span>
</div>
</div>
</glsx-combi-form>
</Card>
</div>
<!-- 上传资料 -->
<div>
<upload-material :lossTypeList.sync="lossTypeList" :isDisabled="isDisabled" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs"></upload-material>
</div>
<!-- 案件补充说明 -->
<div>
<explanation :isDisabled="isDisabled" :supplementList="repotData.supplementList1"></explanation>
</div>
<!-- 其他信息 -->
<div>
<other-info :otherInfoData="otherInfoData"></other-info>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import * as dayjs from 'dayjs'
import util from '@/util/util'
import glsxCombiForm from '@/components/glsx-combi-form'
import Card from '../card.vue'
import uploadMaterial from '../uploadMaterial.vue'
import explanation from '../explanation.vue'
import otherInfo from '../otherInfo.vue'
export default {
name: 'checkPage',
components: {
glsxCombiForm,
Card,
uploadMaterial,
explanation,
otherInfo
},
data() {
return {
current_lossType: '1',
regionData: [],
editFormData: [
{
label: '核销码',
name: 'writeOffCode',
type: 'input',
maxlength: 8,
isDisabled: true
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reimbursementDate')
}
}
},
{
label: '报案日期',
name: 'reportDate',
type: 'limitDatePicker',
dateType: 'datetime',
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reportDate')
}
},
handleDateChange: e => {
if (e) this.$refs.editFormRefReport.$refs.formRef.validateField('reimbursementDate')
}
},
{
label: '报案人',
name: 'reporterName',
type: 'input',
maxlength: 100,
isClear: true
},
{
label: '报案人联系号码',
name: 'reporterPhone',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
placeholder: '可输入省、市或区关键字搜索',
isClear: true,
handleChange: cellValue => {
if (!cellValue || !cellValue.length) {
return
}
}
},
{
label: '出险详细地址',
name: 'reimbursementAddr',
type: 'input',
isClear: true,
maxlength: 200,
inputType: 'textarea'
}
],
handlerForm: [
{
label: '经办人',
name: 'handlerName',
type: 'input',
maxlength: 20,
isClear: true
},
{
label: '经办人电话',
name: 'handlerPhone',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '出险经过描述',
name: 'reimbursementProcess',
type: 'input',
inputType: 'textarea',
maxlength: 200,
rows: 3,
isClear: true
},
{
label: '申请核赔服务',
name: 'serviceCodes',
type: 'checkbox',
border: true,
optionList: [],
addHtml: 'approveAmountSlot'
}
],
explanationObj: {
explanation1: ''
}
}
},
props: {
repotData: Object,
insuranceAttachmentConfigs: Array,
itemList: Array,
otherInfoData: Object,
isDisabled:Boolean,
lossTypeList:Array
},
watch: {
'editForm.reportDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reportDate')
}
},
'editForm.reimbursementDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reimbursementDate')
}
}
},
mounted() {
this.getCityList()
},
methods: {
getCityList() {
this.$apis.claims.getCityList({}).then(res => {
this.regionData = res
})
},
updateTimeLimit(newVal, key) {
let limitTime = ''
// 当不是同一天,时间限制为'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(new Date(new Date().setHours(new Date().getHours() + 1)), 'HH:mm:ss')}`
} else {
limitTime = '00:00:00 - 23:59:59'
}
const Item = this.editFormData.find(item => item.name === key)
this.$set(Item.customPickerOptions, 'selectableRange', limitTime)
},
validPrice(e, id) {
let checkPlan = '' + this.itemList[id].applyAmount
checkPlan = checkPlan
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace(/^\./g, '')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
if (checkPlan.indexOf('.') < 0 && checkPlan !== '') {
checkPlan = parseFloat(checkPlan) + ''
} else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
}
this.$set(this.itemList[id], 'applyAmount', checkPlan)
this.getTotal()
},
changePrice(e, id) {
if (!e.target.value) return
const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') {
this.$set(this.itemList[id], 'applyAmount', e.target.value.substr(0, len - 1))
}
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], 'applyAmount', 1)
}
const maxPrice = 200000
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], 'applyAmount', maxPrice)
}
this.getTotal()
},
selectService() {
this.getTotal()
},
getTotal() {
let total = this.itemList.reduce(function (prev, cur) {
let curPrice = cur.checked ? cur.applyAmount : 0
return prev + +(curPrice * 100).toFixed(0)
}, 0)
this.repotData.applyAmount = (total / 100).toFixed(2)
},
changeType(e){
// if(!e.length){
// this.$message({
// message: '至少选一个服务类型',
// type: 'error'
// })
// return
// }
this.lossTypeList = e
this.$emit('getCurrentLoosType',e)
}
}
}
</script>
<style lang="scss" scoped>
.edit-form-container {
padding: 32px 0 12px;
}
.handler-info {
/deep/ #serviceCodes {
display: block;
margin-bottom: 0;
}
}
.amount-wrap {
font-family: PingFangSC-Regular, PingFang SC;
width: fit-content;
color: #333333;
.loss_wrap {
background: #f9f9f9;
padding: 20px;
.required {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
}
}
.unit-price {
background: #f9f9f9;
padding: 20px;
display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
.required {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
}
.el-input {
width: 432px;
margin-right: 60px;
}
}
.nopt20 {
padding: 0 20px;
}
.dialog-unit {
background: #f9f9f9;
padding: 20px;
list-style: none;
margin-bottom: 10px;
li {
margin-bottom: 20px;
display: flex;
align-items: center;
&:last-child {
margin-bottom: 0;
}
label {
width: 154px;
flex-shrink: 0;
display: inline-block;
text-align: right;
}
}
}
.lump-sum {
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
padding: 0 16px;
height: 36px;
display: flex;
justify-content: space-between;
align-items: center;
.sign {
font-size: 16px;
color: #ff6d00;
}
.price {
color: #ff6d00;
font-size: 18px;
}
}
}
</style>
<template>
<div>
<div class="widget">
<div class="title">维修信息</div>
<div class="content pad3220">
<div class="element_wrap">
<div class="label">批准金额:</div>
<div class="pannel">
<template v-for="(item, index) in itemsList">
<div :key="index" class="wrapper">
<div class="name">{{ item.serviceItemName }}</div>
<div v-if="item.serviceItemCode == 'SC0003'" style="height: 36px" class="messag flex_sc">
<div class="ms flex_sc">
<span>损失类型:</span>
<el-radio v-model="item.lossType" label="1">全损</el-radio>
<el-radio v-model="item.lossType" label="2">局部</el-radio>
</div>
</div>
<div v-if="item.serviceItemCode == 'SC0006'" style="height: 36px" class="messag flex_sc">
<div class="ms flex_sc">
<span>服务类型:</span>
<el-checkbox-group v-model="item.lossTypeList" @change="changeType">
<el-checkbox label="3">钥匙</el-checkbox>
<el-checkbox label="4">车牌重置</el-checkbox>
</el-checkbox-group>
</div>
</div>
<div class="messag" :class="[{ pad20: item.serviceItemCode != 'SC0003' && item.serviceItemCode != 'SC0006' }]">
<div class="ms flex_sc">
<div class="ms_lab">预估损失金额/元:</div>
<el-input @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" v-model="item.applyAmount" size="mini" class="w432" maxlength="10"></el-input>
</div>
<div class="ms flex_sc ma20">
<div class="ms_lab">定损批准金额/元:</div>
<el-input @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" v-model="item.approveAmount" size="mini" class="w432" maxlength="10"></el-input>
</div>
</div>
</div>
</template>
<div class="total flex_scb">
<span>合计</span>
<span>
<span>预估损失金额:{{ repotData.applyAmount }}元</span>
<span style="margin: 0 10px">|</span>
<span>定损批准金额:{{ repotData.approveAmount }}元</span>
</span>
</div>
</div>
</div>
<div class="element_wrap ma20">
<div class="label">收款对象:</div>
<div class="pannel">
<div class="wrapper">
<div class="name">
<el-radio>{{ accountForm.objectType ? '其他' : '店面' }}</el-radio>
<!-- <el-radio-group disabled @change="changeObjectType" v-model="accountForm.objectType">
<el-radio :label="0">店面</el-radio>
<el-radio :label="1">其他</el-radio>
</el-radio-group> -->
</div>
<div class="pannel_box">
<glsx-combi-form ref="accountRef" :formRules="accountRule" labelWidth="154px" defaultWidth="432px" :formObj="accountForm" :formData="accountData"></glsx-combi-form>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<uploadMaterial :isClaims="true" :lossTypeList.sync="lossTypeList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs"></uploadMaterial>
</div>
<div class="widget ma16">
<div class="title">寄回原件说明</div>
<div class="content pad20">
<div class="flex_sc" v-for="(first, ind) in repotData.claimsAttachmentConfigs2" :key="ind">
<div v-for="(img, i) in first.secondClassifyList" :key="i" class="img_box">
<div class="title_tip flex_sc">
<div class="">{{ img.secondClassifyName || '' }}</div>
</div>
<div v-if="img.exampleUrl" class="img_pannel flex_cc">
<el-image :preview-src-list="[img.exampleUrl]" style="width: 216px; height: 135px; border-radius: 4px" :src="img.exampleUrl" :fit="fit"></el-image>
<div class="egTag flex_cc">示例</div>
</div>
</div>
</div>
</div>
</div>
<div>
<explanation :supplementList="repotData.supplementList2"></explanation>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import * as dayjs from 'dayjs'
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}$/
import glsxCombiForm from '@/components/glsx-combi-form'
import uploadMaterial from '../uploadMaterial.vue'
import explanation from '../explanation.vue'
export default {
name: 'checkClaimsPage',
components: {
glsxCombiForm,
uploadMaterial,
explanation
},
data() {
return {
accountRule: {
accountType: [{ required: true, message: '请选择账户类型', trigger: 'change' }],
branchBankCode: [{ required: true, message: '请选择开户行名称', trigger: 'change' }],
openBankCode: [{ required: true, message: '请选择开户行名称', trigger: 'change' }],
accountName: [{ required: true, message: '请输入账户名称', trigger: 'change' }],
accountNo: [
{
required: true,
validator: (rule, value, callback) => {
let numRef = /^[0-9]{1,25}$/
if (!value) {
callback(new Error('请输入收款账号'))
} else if (numRef.test(value)) {
callback()
} else {
callback(new Error('请输入正确的收款账号'))
}
},
trigger: 'change'
}
],
bankCity: [{ required: true, message: '请选择收款账号所在省市', trigger: 'change' }],
accountCityCode: [{ required: true, message: '请选择收款账号所在省市', trigger: 'change' }],
payeeIDCardType: [{ required: true, message: '请选择收款人证件类型', trigger: 'change' }],
cardTypeCode: [{ required: true, message: '请选择收款人证件类型', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
payeeIDCardNo: [{ required: true, message: '请输入收款人证件号码', trigger: 'change' }],
cardNo: [{ required: true, message: '请输入收款人证件号码', trigger: 'change' }],
payeePhone: [{ required: true, message: '请输入联系号码', 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'
}
],
phone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入手机号'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的手机号'))
}
},
trigger: 'change'
}
],
reimbursementDesc: [{ required: true, message: '请输入出险经过描述', trigger: 'change' }]
},
accountData: [
// {
// label: '账户类型',
// name: 'accountType',
// type: 'radio',
// optionList: [
// {
// confId: 0,
// confName: '对公'
// },
// {
// confId: 1,
// confName: '对私'
// }
// ],
// optionId: 'confId',
// optionLabel: 'confName',
// isHide: true,
// isClear: true,
// },
{
label: '开户行名称',
name: 'openBankCode',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true
},
{
label: '账户名称',
name: 'accountName',
type: 'input',
maxlength: 60,
isClear: true
},
{
label: '收款账号',
name: 'accountNo',
type: 'input',
maxlength: 25,
isClear: true
},
{
label: '收款账号所在省市',
name: 'accountCityCode',
type: 'select',
placeholder: '可输入所在市关键词查询',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true
},
{
label: '收款人证件类型',
name: 'cardTypeCode',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true
},
{
label: '收款人证件号码',
name: 'cardNo',
type: 'input',
maxlength: 25,
isClear: true
},
{
label: '收款人联系电话',
name: 'phone',
type: 'input',
maxlength: 15,
isClear: true
}
]
}
},
props: {
repotData: Object,
accountForm: Object,
itemsList: Array,
insuranceAttachmentConfigs: Array,
lossTypeList: Array
},
watch: {
'accountForm.objectType': {
handler(newVal, oldVal) {
const item = this.accountData.find(item => {
return item.name == 'accountType'
})
item.isHide = newVal == 0
},
immediate: true
}
},
mounted() {
this.getBankList()
},
methods: {
changeType(e) {
this.lossTypeList = e
this.$emit('getCurrentLoosType', e)
},
changeObjectType(newVal) {
this.$emit('changeObjectType', newVal)
},
// 获取银行信息
getBankList() {
this.$apis.claims.getBankList({}).then(res => {
const branchBankList = this.accountData.find(item => item.name === 'openBankCode')
branchBankList.optionList = res.branchBank
const accountCityList = this.accountData.find(item => item.name === 'accountCityCode')
accountCityList.optionList = res.accountCity
const IDCardTypeList = this.accountData.find(item => item.name === 'cardTypeCode')
IDCardTypeList.optionList = res.cardType
})
},
validPrice(e, id, type) {
let checkPlan = '' + this.itemsList[id][type]
checkPlan = checkPlan
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace(/^\./g, '')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
if (checkPlan.indexOf('.') < 0 && checkPlan !== '') {
checkPlan = parseFloat(checkPlan) + ''
} else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
}
this.$set(this.itemsList[id], type, checkPlan)
this.getTotal(type)
},
changePrice(e, id, type) {
if (!e.target.value) return
const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') {
this.$set(this.itemsList[id], type, e.target.value.substr(0, len - 1))
}
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.itemsList[id], type, 1)
}
const maxPrice = 200000
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemsList[id], type, maxPrice)
}
this.getTotal(type)
},
getTotal(type) {
let total = this.itemsList.reduce(function (prev, cur) {
let curPrice = cur.checked ? cur[type] : 0
return prev + +(curPrice * 100).toFixed(0)
}, 0)
this.repotData[type] = (total / 100).toFixed(2)
}
}
}
</script>
<style lang="scss" scoped>
.pad3220 {
padding: 32px 20px;
}
.pad20 {
padding: 20px !important;
}
.ms_lab {
width: 154px;
text-align: right;
}
.w432 {
width: 432px !important;
}
.ma20 {
margin-top: 20px;
}
.ma16 {
margin-top: 16px;
}
.img_box {
margin-bottom: 16px;
margin-right: 16px;
.service_title {
margin: 8px 0;
}
.title_tip {
font-size: 14px;
font-weight: 400;
color: #333333;
}
.img_pannel {
width: 216px;
height: 135px;
margin: 8px 0;
border: 1px solid #e5e5e5;
background: #f5f5f5;
position: relative;
border-radius: 4px;
.egTag {
position: absolute;
right: 8px;
top: 8px;
width: 36px;
height: 18px;
color: #666;
font-size: 12px;
border-radius: 2px;
background: #e5e5e5;
}
}
}
</style>
<template>
<div>
<Card title="案件补充说明">
<div class="explanation">
<div class="explanation-list" v-for="(item, idx) in supplementList" :key="idx">
<label class="label" for="">{{ `说明${idx + 1}:` }}</label>
<el-input :disabled="isCheck || isDisabled" :placeholder="`请输入说明${idx + 1}`" v-model="item.content" maxlength="200" type="textarea" :rows="3"></el-input>
<i class="el-icon-delete del" v-if="!isCheck&&supplementList.length > 1" @click="handleDel(idx)"></i>
</div>
</div>
<div v-if="!isCheck &&!isDisabled" class="add-explanation" @click="addExplanation">
<i class="el-icon-circle-plus-outline"></i>
<span>新增说明</span>
</div>
</Card>
</div>
</template>
<script type="text/ecmascript-6">
import Card from './card.vue'
export default {
name: 'explanation',
data() {
return {}
},
components: {
Card
},
props: {
supplementList: {
type: Array,
default: function () {
return [{ content: '' }]
}
},
isCheck:Boolean,
isDisabled:Boolean,
},
mounted() {},
methods: {
handleDel(idx) {
this.$delete(this.supplementList, idx)
},
addExplanation() {
const idx = this.supplementList.length
const newObj = { claimsId: this.supplementList[idx - 1].claimsId, content: '' }
this.$set(this.supplementList, idx, newObj)
}
}
}
</script>
<style lang="scss" scoped>
.explanation {
.explanation-list {
display: flex;
// align-items: center;
margin-bottom: 20px;
&:last-child {
margin-bottom: 10px;
}
/deep/ .el-textarea {
width: 580px;
}
.label {
width: 154px;
font-size: 14px;
font-weight: 400;
line-height: 32px;
color: #333;
text-align: right;
flex-shrink: 0;
}
}
.del {
color: #c6c6c6;
font-size: 16px;
margin-left: 10px;
cursor: pointer;
margin-top: 28px;
}
}
.add-explanation {
color: #5850FF;
display: flex;
align-items: center;
margin-left: 154px;
cursor: pointer;
.el-icon-circle-plus-outline {
font-size: 20px;
margin-right: 6px;
}
span {
font-size: 12px;
}
}
</style>
<template>
<GLDialog class="gl-form-page gl-form-min" title="快速审核" mode="mid" @onOk="closeDialog" @onCancel="closeDialog" v-if="visibility" :visible.sync="visibility">
<div class="review-container">
<div class="filter-wrap">
<!-- 筛选树 -->
<div class="filter-btn">
<span>筛选</span>
<i class="gl-icon-filter filter-icon" @click.stop="showFilter = !showFilter"></i>
<div v-show="showFilter" ref="closetree" class="tree-wrap">
<div class="filter-tree">
<el-tree ref="tree" :data="treeBasic" show-checkbox node-key="id" :props="defaultProps"></el-tree>
</div>
<div class="filter-all">
<el-checkbox v-model="treeChecked">全选</el-checkbox>
<span class="reset">
<el-button type="primary" @click="getCheckedKeys" size="small">确定</el-button>
<el-button size="small" @click="resetChecked">重置</el-button>
</span>
</div>
</div>
</div>
<!-- 左边小图片列表 -->
<div id="pic-list" class="pic-list">
<div class="pic-item" v-for="(item, index) in filterImgList" :key="index">
<span class="title">
<div class="name">{{ item.secondClassifyName }}</div>
<i v-if="item.auditStatus == 1" class="el-icon-success success"></i>
<i v-if="item.auditStatus == 0" class="el-icon-error error"></i>
</span>
<div @click="changeCurImg(item, index)" :class="['pic', { cur: curImg.idx == index }]">
<img :src="item.attachmentFile" alt="" />
</div>
<div v-if="item.auditStatus == 0" class="error_desc flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="item.reasonForFailure">
<div class="intext" slot="reference">{{ item.reasonForFailure }}</div>
</el-popover>
</div>
</div>
</div>
</div>
<!-- 右边大图区 -->
<div class="preview-wrap" :class="[{ flex_cc: !filterImgList.length }]">
<template v-if="filterImgList.length">
<span>{{ curImg.secondClassifyName }}</span>
<div class="preview-oper">
<div class="preview-pic">
<el-image :preview-src-list="[curImg.attachmentFile]" style="width: 100%; height: 100%" :src="curImg.attachmentFile" :fit="fit"></el-image>
<!-- <img :src="curImg.attachmentFile" alt="" /> -->
<!-- <div class="mask">
<i class="gl-icon-eye"></i>
<i class="gl-icon-a-testcaselibrary1"></i>
</div> -->
</div>
<!-- 按钮区 -->
<div class="pass-btn">
<!-- <el-button type="text" @click="changeLeaf('pre')">上一张</el-button> -->
<el-button type="text" @click="handleApproval(1)">通过</el-button>
<el-popover ref="descPopover" class="popover" popper-class="imgPopper" placement="top" width="314" trigger="click">
<div>
<glsx-combi-form ref="imgPassRef" :isInline="false" :formRules="imgPassRule" labelWidth="90px" defaultWidth="184px" :formObj="imgPassObj" :formData="imgPassForm"></glsx-combi-form>
</div>
<el-button slot="reference" type="text">不通过</el-button>
</el-popover>
<!-- <el-button type="text" @click="changeLeaf('next')">下一张</el-button> -->
</div>
</div>
</template>
<template v-else>
<span>筛选结果为空</span>
</template>
</div>
</div>
</GLDialog>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'fastReview',
components: {
glsxCombiForm
},
props: {
images: Array
},
data() {
return {
treeChecked: false,
showFilter: false,
visibility: false,
imgPassObj: {
desc: ''
},
imgPassForm: [
{
label: '具体描述',
name: 'desc',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true,
maxlength: 200,
inputChange: e => {
this.handleApproval(0, e)
}
}
],
curImg: {},
filterImgList: [],
imgList: [],
treeBasic: [
{
id: 10,
label: '资料名称',
children: []
},
{
id: 11,
label: '处理状态',
children: [
{
id: 12,
label: '已审核'
},
{
id: 13,
label: '未审核'
}
]
},
{
id: 14,
label: '审核状态',
children: [
{
id: 15,
label: '通过'
},
{
id: 16,
label: '未通过'
}
]
}
],
defaultProps: {
children: 'children',
label: 'label',
id: 'id'
}
}
},
watch: {
treeChecked(newVal) {
this.toChangeTreeAll(newVal)
}
},
mounted() {
this.filterImgList = []
document.addEventListener('click', e => {
if (!this.$refs['closetree']?.contains(e.target)) {
this.showFilter = false
}
})
},
methods: {
// changeLeaf(type){
// let idx = this.curImg.idx
// if((type == 'pre' && this.curImg.idx==0) || (type == 'next' && idx==this.imgList.length-1)){
// return this.$message({
// message: `${type == 'next' ? '当前是最后一张图片':'当前是第一张图片'}`,
// type: 'warning',
// customClass: 'msgHierarchy'
// });
// }
// this.curImg =type == 'next' ? this.imgList[idx+1] : this.imgList[idx-1]
// this.curImg.idx =type == 'next' ? idx + 1 : idx - 1
// },
handlerData(val) {
this.treeBasic[0].children = []
let arr = []
val.forEach((el, index) => {
let obj = {
label: el.firstClassifyName,
id: index
}
this.treeBasic[0].children.push(obj)
if (el.firstClassifyName.indexOf('其他') != -1) {
el.secondClassifyList.forEach(ele => {
el.allImages.forEach(ke => {
if (ke.attachmentFile) {
ke.secondClassifyName = ele.secondClassifyName
arr.push(ke)
}
})
})
} else {
el.secondClassifyList.forEach(ele => {
ele.attachmentList.forEach(ke => {
if (ke.attachmentFile) {
ke.secondClassifyName = ele.secondClassifyName
arr.push(ke)
}
})
})
}
})
this.filterImgList = arr
this.curImg = arr[0]
this.curImg.idx = 0
},
closeDialog() {
this.visibility = false
},
initDialog() {
this.visibility = true
this.handlerData(this.images)
},
changeCurImg(item, index) {
if (index > this.filterImgList.length - 1 || index < 0) return
this.curImg = this.filterImgList[index]
this.curImg.idx = index
},
handleApproval(type, desc) {
if (type == 0) {
this.curImg.reasonForFailure = desc
this.imgPassObj.desc = ''
this.$refs.descPopover.doClose()
}
this.curImg.auditStatus = type
this.images.forEach(item => {
item.secondClassifyList.forEach(child => {
child.attachmentList.forEach(last => {
if (last.id == this.curImg.id) {
last = this.curImg
}
})
})
})
const idx = this.curImg.idx
this.changeCurImg({}, idx + 1)
try {
let scrollH = document.getElementById('pic-list')
scrollH.scrollTop = 135 * (idx + 1)
} catch (err) {
console.log(err)
}
},
getCheckedKeys() {
let treeList = this.$refs.tree.getCheckedNodes()
let filtterList = []
if (treeList.length) {
treeList.forEach(el => {
if (el.children && el.children.length) {
// 代表这一级全选择
el.children.forEach(ele => {
filtterList.push(ele.label)
})
} else {
filtterList.push(el.label)
}
})
}
if (!filtterList.length) return
filtterList = [...new Set(filtterList)]
this.showFilter = false
this.filterImages(filtterList)
},
resetChecked() {
this.$refs.tree.setCheckedKeys([])
},
toChangeTreeAll(flag) {
if (flag) {
this.$refs.tree.setCheckedKeys([10, 11, 14])
} else {
this.$nextTick(() => {
this.$refs.tree.setCheckedKeys([])
})
}
},
// 过滤照片
filterImages(condition) {
let result = []
const approved = condition.includes('已审核')
const unChecked = condition.includes('未审核')
const pass = condition.includes('通过')
const noPass = condition.includes('未通过')
let tempArr = []
// 第一步:先筛选资料类型的
this.images.forEach(el => {
condition.forEach(con => {
if (con == el.firstClassifyName) {
el.secondClassifyList.forEach(ele => {
ele.attachmentList.forEach(ke => {
ke.secondClassifyName = ele.secondClassifyName
tempArr.push(ke)
})
})
}
})
})
// 第二步:如果此时tempArr不为空,则再次根据其他状态筛选一遍
if (tempArr.length && (approved || unChecked || pass || noPass)) {
tempArr.forEach(ke => {
if (approved && ke.attachmentFile && ke.auditStatus != null) {
result.push(ke)
} else if (unChecked && ke.attachmentFile && ke.auditStatus == null) {
result.push(ke)
} else if (pass && ke.attachmentFile && ke.auditStatus == 1) {
result.push(ke)
} else if (noPass && ke.attachmentFile && ke.auditStatus == 0) {
result.push(ke)
}
})
tempArr = result
}
// 第三步:如果tempArr为空,说明没有勾选任何资料类型,则只需要筛选状态类型
if (!tempArr.length) {
this.images.forEach(el => {
el.secondClassifyList.forEach(ele => {
ele.attachmentList.forEach(ke => {
ke.secondClassifyName = ele.secondClassifyName
if (approved && ke.attachmentFile && ke.auditStatus != null) {
tempArr.push(ke)
} else if (unChecked && ke.attachmentFile && ke.auditStatus == null) {
tempArr.push(ke)
} else if (pass && ke.attachmentFile && ke.auditStatus == 1) {
tempArr.push(ke)
} else if (noPass && ke.attachmentFile && ke.auditStatus == 0) {
tempArr.push(ke)
}
})
})
})
}
// 第四步:如果此时tempArr还是为空,则取所有数据
// if (!tempArr.length) {
// this.images.forEach(el => {
// el.secondClassifyList.forEach(ele => {
// ele.attachmentList.forEach(ke => {
// ke.secondClassifyName = ele.secondClassifyName
// tempArr.push(ke)
// })
// })
// })
// }
this.filterImgList = tempArr
if (tempArr.length) {
this.curImg = tempArr[0]
this.curImg.idx = 0
}
}
}
}
</script>
<style lang="scss" scoped>
.review-container {
display: flex;
flex-wrap: nowrap;
height: 374px;
color: #1d2129;
.filter-wrap {
width: 184px;
height: 100%;
display: flex;
flex-direction: column;
.filter-btn {
display: flex;
justify-content: space-between;
height: 40px;
background: #ececec;
margin-bottom: 1px;
line-height: 40px;
padding: 0 16px;
font-size: 14px;
position: relative;
.filter-icon {
color: #5850ff;
cursor: pointer;
}
.tree-wrap {
background-color: #fff;
z-index: 20;
position: absolute;
top: 100%;
left: 155px;
width: 260px;
box-shadow: 0px 6px 20px 0px rgba(122, 122, 122, 0.2);
border-radius: 4px;
.filter-tree {
height: 208px;
overflow-y: scroll;
&::-webkit-scrollbar {
width: 4px;
}
/deep/ .el-tree-node__content > label.el-checkbox {
margin-right: 3px;
}
// 修改三角形的颜色
/deep/ .el-tree-node__expand-icon {
color: #333;
font-size: 13px;
&.is-leaf {
color: transparent;
}
}
}
.filter-all {
height: 48px;
display: flex;
align-items: center;
padding: 0 10px;
justify-content: space-between;
border-top: 1px solid #e5e5e5;
.reset {
.el-button:last-child {
margin-left: 2px;
border: none;
}
}
/deep/ .el-checkbox__label {
padding-left: 8px;
}
}
}
}
.pic-list {
flex: 1;
background: #ececec;
padding: 10px 16px;
overflow-y: auto;
&::-webkit-scrollbar {
width: 2px;
}
.pic-item {
font-size: 14px;
margin-bottom: 12px;
position: relative;
.title {
height: 28px;
line-height: 28px;
display: flex;
align-items: center;
justify-content: space-between;
.name {
width: 130px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.success {
color: #2cca74;
}
.error {
color: #eb4e4e;
}
}
.pic {
width: 100%;
position: relative;
width: 150px;
height: 95px;
cursor: pointer;
border: 1px solid transparent;
img {
width: 100%;
height: 100%;
}
}
.cur {
border: 1px solid #5850ff;
}
.error_desc {
background: rgba(255, 82, 87, 0.5);
position: absolute;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
.intext {
box-sizing: border-box;
padding: 0 2px;
font-size: 12px;
font-weight: 400;
color: #ffffff;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
}
.preview-wrap {
flex: 1;
background: #f9f9f9;
padding: 20px;
box-sizing: border-box;
height: 374px;
.preview-oper {
width: 100%;
height: 100%;
margin-top: 8px;
.preview-pic {
height: 270px;
position: relative;
&:hover {
.mask {
display: block;
}
}
img {
width: 100%;
height: 100%;
}
.mask {
display: none;
background: rgba(0, 0, 0, 0.5);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
text-align: center;
line-height: 270px;
i {
color: #c6c6c6;
font-size: 18px;
cursor: pointer;
&:last-child {
margin-left: 12px;
}
}
}
}
.pass-btn {
margin-top: 16px;
display: flex;
height: 20px;
justify-content: center;
.popover {
line-height: 20px;
margin-left: 20px;
}
}
}
}
}
</style>
<template>
<div class="">
<div class="container">
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
<div class="wrap" v-for="(imgItem, imgKey) in list" :key="imgKey">
<span class="title">
<i v-if="imgItem.status == 1" class="el-icon-success success"></i>
<i v-if="imgItem.status == 2" class="el-icon-error error"></i>
<span>{{ imgItem.title }}</span>
<el-tooltip v-if="imgItem.tip" class="item" effect="dark" :content="imgItem.tip" placement="top">
<i v-if="imgItem.tip" class="el-icon-question question"></i>
</el-tooltip>
</span>
<div :class="['img-box', { 'has-img': imgItem.url, 'error-img': imgItem.status == 2, 'success-img': imgItem.status == 1 }]">
<!-- <img v-if="!imgItem.url" class="back-img" fit="cover" :src="url" alt="" @click="clickImg(imgKey)" /> -->
<img v-if="!imgItem.url" class="add-btn" :src="cameraUrl" alt="" @click="clickImg(imgKey)" />
<img v-else class="need-img" fit="cover" :src="imgItem.url" alt="" />
<div class="mask">
<i class="el-icon-view" @click="handlePreview(imgItem.url)"></i>
<i class="el-icon-delete" @click="handleDel(imgKey)"></i>
</div>
<div class="error-tip" v-if="imgItem.status == 2">
<el-popover placement="top-start" width="200" trigger="hover" :content="imgItem.reason || '--'">
<span slot="reference">{{ imgItem.reason || '--' }}</span>
</el-popover>
</div>
</div>
<slot name="footer" :scope="{ imgItem, imgKey }"></slot>
</div>
</div>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</template>
<script type="text/ecmascript-6">
import cameraUrl from '@/assets/camera.png'
import url from '@/assets/images/idCard.png'
// import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'imgList',
props:{
list:{
type: Array
}
},
data() {
return {
url,
cameraUrl,
dialogImageUrl: '',
dialogVisible: false,
activeName: 'base'
}
},
components: {
// glsxCombiForm
},
mounted() {
},
methods: {
handlePreview(url) {
this.dialogImageUrl = url;
this.dialogVisible = true;
},
handleDel(key){
this.list[key].url = ''
this.list[key].status = ''
},
clickImg(type) {
this.$refs.input.click();
},
upload(e){
const file = e.target.files[0]
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const base64 = file.name.split('.').pop() + '@' + arrBase64[1]
this.$apis.beforeSale.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
console.log(res,'resss')
})
}
}
}
}
</script>
<style lang="scss" scoped>
.container {
display: flex;
flex-wrap: wrap;
position: relative;
.file {
opacity: 0;
width: 0;
height: 0;
position: absolute;
}
.wrap {
margin: 0 16px 16px 0;
.title {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
.success {
color: #2cca74;
margin-right: 5px;
}
.error {
color: #eb4e4e;
margin-right: 5px;
}
.question {
color: #999;
cursor: pointer;
margin-left: 5px;
}
}
.has-img:hover {
.mask {
display: block;
}
}
.error-img {
border: 1px solid #ff5257 !important;
}
.success-img {
border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.img-box {
margin-top: 8px;
height: 135px;
width: 216px;
border: 1px dashed rgba(0, 0, 0, 0.15);
border-radius: 4px;
position: relative;
background-color: #f5f5f5;
.error-tip {
width: 100%;
background: rgba(255, 82, 87, 0.7);
position: absolute;
height: 54px;
line-height: 16px;
bottom: 0;
border-radius: 0 0 4px 4px;
z-index: 10;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
font-family: PingFangSC-Regular, PingFang SC;
font-size: 14px;
padding: 5px 10px;
display: -webkit-box;
box-sizing: border-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.need-img,
.mask {
position: absolute;
left: 0;
bottom: 0;
top: 0;
right: 0;
z-index: 2;
}
.mask {
display: none;
background: rgba(0, 0, 0, 0.5);
z-index: 9;
text-align: center;
line-height: 135px;
border-radius: 4px;
i {
color: #c6c6c6;
cursor: pointer;
font-size: 16px;
&:first-child {
margin-right: 12px;
}
}
}
.add-btn {
position: absolute;
width: 60px;
height: 60px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1;
cursor: pointer;
}
img {
width: 100%;
height: 100%;
border-radius: 4px;
}
}
}
}
</style>
...@@ -228,7 +228,7 @@ export default { ...@@ -228,7 +228,7 @@ export default {
.report-components { .report-components {
background: white; background: white;
margin: 20px 0 64px; margin: 20px 0 0;
.title { .title {
padding: 0 20px; padding: 0 20px;
font-size: 16px; font-size: 16px;
...@@ -368,7 +368,7 @@ export default { ...@@ -368,7 +368,7 @@ export default {
cursor: pointer; cursor: pointer;
} }
.del_img { .del_img {
right: -44px; right: -49px;
} }
/deep/ .el-progress-bar__outer { /deep/ .el-progress-bar__outer {
height: 26px !important; height: 26px !important;
......
<template>
<Card title="其他信息" class="" openBtn>
<div class="other-info" v-for="(item, idx) in form" :key="idx">
<span class="title">{{ item.parentTitle }}</span>
<div class="info-wrap">
<li v-for="sonItem in item.li" :key="sonItem.key">
<label class="label" for="">{{ sonItem.label }}</label>
<span class="content">{{ otherInfoData[sonItem.key] || '--' }}</span>
</li>
</div>
</div>
</Card>
</template>
<script type="text/ecmascript-6">
import Card from './card.vue'
export default {
name: 'otherInfo',
props: {
otherInfoData: Object
},
data() {
return {
form: [
{
parentTitle: '店面信息',
li: [
{
key: 'merchantName',
label: '店面名称:'
},
{
key: 'merchantPhone',
label: '店面联系方式:'
},
{
key: 'merchantAddr',
label: '店面地址:'
}
]
},
{
parentTitle: '产品详情',
li: [
{
key: 'packageName',
label: '产品名称:'
},
{
key: 'contractNo',
label: '合同编号:'
},
{
key: 'effectiveDate',
label: '生效时间:'
},
{
key: 'servicePeriod',
label: '服务期限/年:'
},
{
key: 'expirationDate',
label: '起止时间:'
}
]
},
{
parentTitle: '客户信息',
li: [
{
key: 'customerName',
label: '客户姓名:'
},
{
key: 'customerPhone',
label: '电话号码:'
},
{
key: 'customerAddr',
label: '联系地址:'
}
]
},
{
parentTitle: '车辆信息',
li: [
{
key: 'vin',
label: '车架号:'
},
{
key: 'brandAndShape',
label: '品牌车型:'
},
{
key: 'billingDate',
label: '新车开票日期:'
},
{
key: 'invoicePrice',
label: '车辆购置价:'
}
]
}
]
}
},
components: {
Card
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.other-info {
list-style: none;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 22px;
color: #333333;
margin-bottom: 16px;
.info-wrap {
background: #f9f9f9;
padding: 20px;
li {
display: inline-block;
line-height: 22px;
padding: 10px 0;
text-align: center;
width: 500px;
.label {
color: #666666;
}
}
}
}
</style>
<template> <template>
<div> <div>
<div v-if="isGH" class="report-components"> <div v-if="isGH" class="report-components gl-form-page">
<div class="title">报案信息(店面补充)</div> <div class="title">报案信息(店面补充)</div>
<glsx-combi-form class="edit-form-container" ref="handlerRef" :formRules="accountRule" labelWidth="144px" defaultWidth="320px" :formObj="accountForm" :formData="handlerForm"></glsx-combi-form> <glsx-combi-form :labelPaddingRight="0" :isInline="false" class="edit-form-container" ref="handlerRef" :formRules="accountRule" labelWidth="154px" defaultWidth="432px" :formObj="accountForm" :formData="handlerForm">
<!-- <div slot="serviceApply" class="serviceApply_container">
<template v-for="(item, index) in serviceItemsList">
<div :key="index" class="wrapper">
<el-checkbox-group v-model="checkList" @change="toChangeServices">
<div class="header">
<el-checkbox>{{ item.serviceItemName }}</el-checkbox>
</div>
</el-checkbox-group>
</div>
</template>
</div> -->
</glsx-combi-form>
</div> </div>
<div class="report-components repair-wrap"> <div class="report-components repair-wrap">
<div class="title">维修信息</div> <div class="title">维修信息</div>
...@@ -39,8 +51,8 @@ ...@@ -39,8 +51,8 @@
<el-radio :label="1">其他</el-radio> <el-radio :label="1">其他</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="account-info"> <div class="account-info gl-form-page">
<glsx-combi-form ref="accountRef" :formRules="accountRule" labelWidth="144px" defaultWidth="320px" :formObj="accountForm" :formData="accountData"></glsx-combi-form> <glsx-combi-form ref="accountRef" :formRules="accountRule" labelWidth="154px" defaultWidth="432px" :formObj="accountForm" :formData="accountData"></glsx-combi-form>
</div> </div>
</div> </div>
</div> </div>
...@@ -55,7 +67,7 @@ export default { ...@@ -55,7 +67,7 @@ export default {
props: { props: {
accountForm: Object, accountForm: Object,
serviceItemsList: Array, serviceItemsList: Array,
totalPrice:Number, totalPrice: Number,
isGH: Boolean, isGH: Boolean,
pageType: { pageType: {
type: Number, type: Number,
...@@ -63,29 +75,29 @@ export default { ...@@ -63,29 +75,29 @@ export default {
} }
}, },
components: { components: {
glsxCombiForm, glsxCombiForm
}, },
data() { data() {
return { return {
accountData:[ accountData: [
{ {
label: '账户类型', label: '账户类型',
name: 'accountType', name: 'accountType',
type: 'radio', type: 'radio',
optionList: [ optionList: [
{ {
confId:0, confId: 0,
confName:'对公' confName: '对公'
}, },
{ {
confId:1, confId: 1,
confName:'对私' confName: '对私'
} }
], ],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
isHide:true, isHide: true,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
{ {
...@@ -95,14 +107,14 @@ export default { ...@@ -95,14 +107,14 @@ export default {
optionList: [], optionList: [],
optionId: 'code', optionId: 'code',
optionLabel: 'name', optionLabel: 'name',
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
{ {
label: '账户名称', label: '账户名称',
name: 'accountName', name: 'accountName',
type: 'input', type: 'input',
maxlength:60, maxlength: 60,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
...@@ -110,7 +122,7 @@ export default { ...@@ -110,7 +122,7 @@ export default {
label: '收款账号', label: '收款账号',
name: 'accountNo', name: 'accountNo',
type: 'input', type: 'input',
maxlength:25, maxlength: 25,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
...@@ -118,11 +130,11 @@ export default { ...@@ -118,11 +130,11 @@ export default {
label: '收款账号所在省市', label: '收款账号所在省市',
name: 'bankCity', name: 'bankCity',
type: 'select', type: 'select',
placeholder:'可输入所在市关键词查询', placeholder: '可输入所在市关键词查询',
optionList: [], optionList: [],
optionId: 'code', optionId: 'code',
optionLabel: 'name', optionLabel: 'name',
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
{ {
...@@ -132,7 +144,7 @@ export default { ...@@ -132,7 +144,7 @@ export default {
optionList: [], optionList: [],
optionId: 'code', optionId: 'code',
optionLabel: 'name', optionLabel: 'name',
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
{ {
...@@ -150,32 +162,45 @@ export default { ...@@ -150,32 +162,45 @@ export default {
maxlength: 15, maxlength: 15,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, }
], ],
handlerForm: [ handlerForm: [
{ {
label: '经办人', label: '经办人:',
name: 'handlerName', name: 'handlerName',
type: 'input', type: 'input',
isClear: true, isClear: true,
maxlength:100, maxlength: 100,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
{ {
label: '经办人联系号码', label: '经办人联系号码:',
name: 'handlerPhone', name: 'handlerPhone',
type: 'input', type: 'input',
maxlength: 11, maxlength: 11,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
} },
// {
// label: '出险经过描述:',
// name: 'reimbursementDesc',
// type: 'input',
// inputType: 'textarea',
// maxlength: 200,
// isClear: true,
// isDisabled: this.pageType == 2
// },
// {
// label: '申请核赔服务:',
// addHtml: 'serviceApply'
// }
], ],
accountRule: { accountRule: {
accountType: [{ required: true, message: '请选择账户类型', trigger: 'change' }], accountType: [{ required: true, message: '请选择账户类型', trigger: 'change' }],
branchBankCode: [{ required: true, message: '请选择开户行名称', trigger: 'change' }], branchBankCode: [{ required: true, message: '请选择开户行名称', trigger: 'change' }],
accountName: [{ required: true, message: '请输入账户名称', trigger: 'change' }], accountName: [{ required: true, message: '请输入账户名称', trigger: 'change' }],
accountNo: [ accountNo: [
{ {
required: true, required: true,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
let numRef = /^[0-9]{1,25}$/ let numRef = /^[0-9]{1,25}$/
...@@ -210,30 +235,33 @@ export default { ...@@ -210,30 +235,33 @@ export default {
trigger: 'change' trigger: 'change'
} }
], ],
// reimbursementDesc: [{ required: true, message: '请输入出险经过描述', trigger: 'change' }]
}, },
checkList: []
} }
}, },
created(){ created() {
this.getBankList() this.getBankList()
this.initSaveObj() this.initSaveObj()
}, },
mounted() { mounted() {},
watch: {
}, 'accountForm.objectType': {
watch:{ handler(newVal, oldVal) {
'accountForm.objectType':{
handler(newVal,oldVal){
const item = this.accountData.find(item => { const item = this.accountData.find(item => {
return item.name == 'accountType' return item.name == 'accountType'
}) })
item.isHide = newVal==0 item.isHide = newVal == 0
}, },
immediate:true immediate: true
} }
}, },
methods:{ methods: {
initSaveObj(){ toChangeServices(e){
const obj = { console.log(e);
},
initSaveObj() {
const obj = {
accountType: 0, accountType: 0,
branchBankCode: '', branchBankCode: '',
accountName: '', accountName: '',
...@@ -243,11 +271,11 @@ export default { ...@@ -243,11 +271,11 @@ export default {
payeeIDCardNo: '', payeeIDCardNo: '',
payeePhone: '' payeePhone: ''
} }
this.saveObj = {...obj} this.saveObj = { ...obj }
this.otherSaveObj = {...obj} this.otherSaveObj = { ...obj }
}, },
changeObjectType(newVal){ changeObjectType(newVal) {
this.$emit('changeObjectType',newVal) this.$emit('changeObjectType', newVal)
// const item = this.accountData.find(item => { // const item = this.accountData.find(item => {
// return item.name == 'accountType' // return item.name == 'accountType'
// }) // })
...@@ -268,38 +296,44 @@ export default { ...@@ -268,38 +296,44 @@ export default {
}, },
getBankList() { getBankList() {
this.$apis.claims.getBankList({}).then(res => { this.$apis.claims.getBankList({}).then(res => {
const branchBankList = this.accountData.find(item => item.name ==='branchBankCode') const branchBankList = this.accountData.find(item => item.name === 'branchBankCode')
branchBankList.optionList = res.branchBank branchBankList.optionList = res.branchBank
const accountCityList = this.accountData.find(item => item.name ==='bankCity') const accountCityList = this.accountData.find(item => item.name === 'bankCity')
accountCityList.optionList = res.accountCity accountCityList.optionList = res.accountCity
const IDCardTypeList = this.accountData.find(item => item.name ==='payeeIDCardType') const IDCardTypeList = this.accountData.find(item => item.name === 'payeeIDCardType')
IDCardTypeList.optionList = res.cardType IDCardTypeList.optionList = res.cardType
}) })
}, },
validPrice(e,id){ validPrice(e, id) {
let checkPlan = '' + this.serviceItemsList[id].approveAmount let checkPlan = '' + this.serviceItemsList[id].approveAmount
checkPlan = checkPlan.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace(/^\./g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); checkPlan = checkPlan
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace(/^\./g, '')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
if (checkPlan.indexOf('.') < 0 && checkPlan !== '') { if (checkPlan.indexOf('.') < 0 && checkPlan !== '') {
checkPlan = parseFloat(checkPlan) + '' checkPlan = parseFloat(checkPlan) + ''
} else if (checkPlan.indexOf('.') >= 0) { } else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数 checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
} }
this.$set(this.serviceItemsList[id], 'approveAmount' , checkPlan) this.$set(this.serviceItemsList[id], 'approveAmount', checkPlan)
}, },
changePrice(e,id){ changePrice(e, id) {
if(!e.target.value) return; if (!e.target.value) return
const len = e.target.value.length const len = e.target.value.length
let lastStr = e.target.value.charAt(len-1) let lastStr = e.target.value.charAt(len - 1)
if(lastStr==='.'){ if (lastStr === '.') {
this.$set(this.serviceItemsList[id], 'approveAmount' , e.target.value.substr(0 ,len-1)) this.$set(this.serviceItemsList[id], 'approveAmount', e.target.value.substr(0, len - 1))
} }
const minPrice = 1 const minPrice = 1
if(Number(e.target.value)<minPrice){ if (Number(e.target.value) < minPrice) {
this.$set(this.serviceItemsList[id], 'approveAmount' , 1) this.$set(this.serviceItemsList[id], 'approveAmount', 1)
} }
const maxPrice = 2000000 const maxPrice = 2000000
if(Number(e.target.value)>maxPrice){ if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceItemsList[id], 'approveAmount' , maxPrice) this.$set(this.serviceItemsList[id], 'approveAmount', maxPrice)
} }
} }
} }
...@@ -321,7 +355,9 @@ export default { ...@@ -321,7 +355,9 @@ export default {
color: #333; color: #333;
} }
.edit-form-container { .edit-form-container {
margin-top: 20px; padding: 20px 0;
.serviceApply_container {
}
} }
.require { .require {
width: 115px; width: 115px;
...@@ -407,7 +443,7 @@ export default { ...@@ -407,7 +443,7 @@ export default {
} }
/deep/ .account-info { /deep/ .account-info {
margin: 10px 0 0 115px; margin: 10px 0 0 115px;
padding: 20px 10px 0 20px; padding: 20px;
background: #f9f9f9; background: #f9f9f9;
display: inline-block; display: inline-block;
.el-radio { .el-radio {
......
<template> <template>
<div class="report-components"> <div class="report-components gl-form-page">
<div class="title">报案信息(客户提交)</div> <div class="title">报案信息(客户提交)</div>
<glsxCombiForm :regionData="regionData" class="edit-form-container " ref="editFormRefReport" labelWidth="144px" defaultWidth="320px" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <template v-if="[1, 3, 4].includes(pageType)">
<div v-if="pageType == 1" style="display:inline-block;" slot="syncBtn"> <glsxCombiForm :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<el-button style="margin:0 12px;" type="primary" @click="toSearchOrderDetail">同步</el-button> <div v-if="pageType == 1" style="display: inline-block" slot="syncBtn">
<span style="font-weight: 400; color:#666;">{{ `同步${isGH ? '核销码关联合同中的' : '合同中'}以下信息,同步后的信息可手动编辑` }}</span> <el-button style="margin: 0 12px" type="primary" @click="toSearchOrderDetail">同步</el-button>
<span style="font-weight: 400; color: #666">{{ `同步${isGH ? '核销码关联合同中的' : '合同中'}以下信息,同步后的信息可手动编辑` }}</span>
</div>
</glsxCombiForm>
</template>
<template v-else>
<div class="detail_pannel">
<div class="top_line">{{ isGH ? '核销码' : '合同号' }}:{{ editForm.contractNo }}</div>
<div class="wrap flex_sc">
<template v-for="(item, index) in editDetail">
<div :key="index" class="line_widget flex_sc">
<div class="label">
<span class="required">*</span>
<span class="text">{{item.label}}</span>
<span class="text">:</span>
</div>
<div class="value">{{item.value}}</div>
</div>
</template>
</div>
</div> </div>
</glsxCombiForm> </template>
</div> </div>
</template> </template>
...@@ -70,7 +89,8 @@ export default { ...@@ -70,7 +89,8 @@ export default {
], ],
reimbursementAddress: [{ required: true, message: '请选择出险地点', trigger: 'change' }], reimbursementAddress: [{ required: true, message: '请选择出险地点', trigger: 'change' }],
reimbursementAddr: [{ required: true, message: '请输入出险详细地址', trigger: 'change' }] reimbursementAddr: [{ required: true, message: '请输入出险详细地址', trigger: 'change' }]
} },
editDetail: []
} }
}, },
created() { created() {
...@@ -78,6 +98,10 @@ export default { ...@@ -78,6 +98,10 @@ export default {
}, },
mounted() { mounted() {
this.diffKeyHandle(this.isGH) this.diffKeyHandle(this.isGH)
let _this = this
setTimeout(()=>{
_this.handlerDetail()
},500)
}, },
watch: { watch: {
'editForm.reportDate'(newVal, oldVal) { 'editForm.reportDate'(newVal, oldVal) {
...@@ -92,6 +116,33 @@ export default { ...@@ -92,6 +116,33 @@ export default {
} }
}, },
methods: { methods: {
//v2.10.0版本********
handlerDetail() {
this.editDetail = [
{
label: '报案人',
value: this.editForm.reporterName
},
{
label: '报案人电话',
value: this.editForm.reporterPhone
},
{
label: '报案日期',
value: this.editForm.reportDate
},
{
label: '出险日期',
value: this.editForm.reimbursementDate
},
{
label: '出险地点',
value: this.editForm.reimbursementAddr
}
]
console.log( this.editDetail);
},
//*************** */
getCityList() { getCityList() {
this.$apis.claims.getCityList({}).then(res => { this.$apis.claims.getCityList({}).then(res => {
this.regionData = res this.regionData = res
...@@ -335,4 +386,40 @@ export default { ...@@ -335,4 +386,40 @@ export default {
} }
} }
} }
.detail_pannel {
padding: 20px;
.top_line {
padding: 8px 20px;
background: #f9f9f9;
margin-bottom: 20px;
}
.wrap{
flex-wrap: wrap;
}
.line_widget {
margin-bottom: 20px;
.label {
width: 154px;
text-align: right;
.required {
color: #eb4e4e;
font-size: 6px;
margin-right: 4px;
}
.text {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
}
}
.value {
width: 348px;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
}
</style> </style>
<template>
<div class="">
<Card title="上传图片">
<el-button :disabled="isDisabled" type="text" slot="right" @click.stop="handleReview">快速审核</el-button>
<!-- <el-button type="text" class="multiBtn" @click.stop="toMutiCheck">批量通过</el-button> -->
<el-tabs class="tabs" v-model="activeName" @tab-click="changeTabs">
<el-tab-pane v-for="(item, index) in insuranceAttachmentConfigs" :key="index" :label="item.firstClassifyName">
<!-- <div class="all_select_wrap flex_scb">
<div class="wrap_widget flex_sc">
<img class="icon" :src="IMAGE+'check_box_icon.png'" />
<span class="text">全选</span>
<span class="text">已选6项内容</span>
</div>
<div class="wrap_widget flex_scb">
<el-button size="small" class="btn-three">取消</el-button>
<el-button size="small" type="primary">通过</el-button>
</div>
</div> -->
<div v-if="item.firstClassifyName.indexOf('细节') != -1" class="service_line_wrap flex_sc">
<template v-for="(serviceitems, serviceIndex) in item.services">
<div :key="serviceIndex" class="line_box flex_cc" @click="selectServices(serviceIndex)">
<div class="inner flex_cc" :class="[{ active: currentServicesIndex == serviceIndex }]">{{ serviceitems }}</div>
</div>
</template>
</div>
<div v-if="item.firstClassifyName.indexOf('细节') != -1" class="image_container">
<template v-for="(img, i) in insuranceAttachmentConfigs[currentIndx].secondClassifyList">
<div v-if="!isClaims && img.serviceItemName == '钥匙及车牌重置服务' && img.serviceItemName == item.services[currentServicesIndex] ? lossTypeList.includes(img.lossType) : img.serviceItemName == item.services[currentServicesIndex]" :key="i" class="img_box">
<div class="title flex_sc">
<i v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="el-icon-error error"></i>
<div class="">{{ img.secondClassifyName }}</div>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length && img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList.length && img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image>
<img v-else :src="cameraUrl" style="width: 40px; height: 40px" />
<!-- <div v-if="img.attachmentList.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div> -->
<div v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="img.attachmentList[0].reasonForFailure">
<div class="intext" slot="reference">{{ img.attachmentList[0].reasonForFailure }}</div>
</el-popover>
</div>
</div>
<div v-if="!isDisabled" class="footer_btn">
<el-button style="margin-left: 39px" @click="toHandlerImage(img, i, 1)" type="text">通过</el-button>
<el-button @click="toHandlerImage(img, i, 0)" type="text">不通过</el-button>
<div @click="toHandlerImage(img, i, 2)" class="up_wrap">
<span>上传</span>
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
</div>
</div>
</template>
</div>
<div v-else-if="item.firstClassifyName.indexOf('其他') == -1 && item.firstClassifyName.indexOf('细节') == -1" class="image_container">
<div v-for="(img, i) in insuranceAttachmentConfigs[currentIndx].secondClassifyList" :key="i" class="img_box">
<div v-if="img.serviceItemName" class="service_title">{{ img.serviceItemName }}</div>
<div class="title flex_sc">
<i v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="el-icon-error error"></i>
<div class="">{{ img.secondClassifyName }}</div>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length && img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList.length && img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image>
<img v-else :src="cameraUrl" style="width: 40px; height: 40px" />
<!-- <div v-if="img.attachmentList.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div> -->
<div v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="img.attachmentList[0].reasonForFailure">
<div class="intext" slot="reference">{{ img.attachmentList[0].reasonForFailure }}</div>
</el-popover>
</div>
</div>
<div v-if="!isDisabled" class="footer_btn">
<el-button style="margin-left: 39px" @click="toHandlerImage(img, i, 1)" type="text">通过</el-button>
<el-button @click="toHandlerImage(img, i, 0)" type="text">不通过</el-button>
<div @click="toHandlerImage(img, i, 2)" class="up_wrap">
<span>上传</span>
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
</div>
</div>
</div>
<div v-else class="image_container">
<div v-for="(img, i) in insuranceAttachmentConfigs[currentIndx].allImages" :key="i" class="img_box">
<div class="title">
<i v-if="img.auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.auditStatus == 0" class="el-icon-error error"></i>
<span>图片{{ i + 1 }}</span>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentFile]" v-if="img.attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentFile" :fit="fit"></el-image>
<img v-else :src="cameraUrl" style="width: 40px; height: 40px" />
<!-- <div v-if="img.auditStatus == 0" class="errMsg flex_cc">{{ img.reasonForFailure }}</div> -->
<div v-if="img.auditStatus == 0" class="errMsg flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="img.reasonForFailure">
<div class="intext" slot="reference">{{ img.reasonForFailure }}</div>
</el-popover>
</div>
</div>
<div v-if="!isDisabled" class="footer_btn">
<el-button style="margin-left: 39px" @click="toHandlerImage(img, i, 1, true)" type="text">通过</el-button>
<el-button @click="toHandlerImage(img, i, 0, true)" type="text">不通过</el-button>
<div @click="toHandlerImage(img, i, 2, true)" class="up_wrap">
<span>上传</span>
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
</div>
</div>
<div class="img_box">
<div class="title">
<span>图片上传</span>
</div>
<div @click="touploadOther" class="img_pannel uplpad_pannel flex_cc">
<img :src="cameraUrl" style="width: 40px; height: 40px" />
<input v-if="!isDisabled" type="file" class="file_1" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</Card>
<fast-review :images.sync="insuranceAttachmentConfigs" ref="fastReviewDialog"></fast-review>
<GLDialog class="gl-form-page gl-form-min" title="审核不通过" mode="mid" :visible.sync="showNoPassDialog" @onOk="submitForm" @onCancel="cancelDialog">
<div>
<glsx-combi-form ref="imgPassRef" :isInline="false" labelWidth="90px" defaultWidth="184px" :formObj="imgPassObj" :formData="imgPassForm"></glsx-combi-form>
</div>
</GLDialog>
</div>
</template>
<script type="text/ecmascript-6">
import cameraUrl from '@/assets/camera.png'
import write_off from '@/assets/logo.png'
import url from '@/assets/images/idCard.png'
import Card from './card.vue'
import fastReview from './fastReview'
import glsxCombiForm from '@/components/glsx-combi-form'
const BASE_IMAGE = 'https://img02.glsx.com.cn/weapp/resource/saas/scrm/'
export default {
name: 'uploadMaterial',
data() {
return {
IMAGE: BASE_IMAGE,
url,
cameraUrl,
write_off,
activeName: '0',
currentIndx: 0,
showNoPassDialog: false,
imgPassObj: {
desc: ''
},
imgPassForm: [
{
label: '具体描述',
name: 'desc',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true,
maxlength: 200
}
],
currentServicesIndex: 0,
otherUploadIndex: null
}
},
components: {
glsxCombiForm,
Card,
fastReview
},
props: {
insuranceAttachmentConfigs: Array,
isDisabled: Boolean,
lossTypeList: Array,
isClaims: Boolean
},
mounted() {},
methods: {
toMutiCheck() {
this.insuranceAttachmentConfigs.forEach((item, index) => {
item.secondClassifyList.forEach(child => {
child.attachmentList.forEach(lastChild => {
lastChild.isSelect = true
})
})
})
},
selectServices(index) {
this.currentServicesIndex = index
},
changeTabs(e) {
this.activeName = e.index.toString()
this.currentIndx = e.index
},
handleReview() {
this.$refs.fastReviewDialog.initDialog()
},
// type 1通过 0不通过 2 上传
toHandlerImage(img, index, type, isOther = false) {
if (!isOther && !img.attachmentList.length) {
img.attachmentList[0] = {
...img,
attachmentFile: '',
auditStatus: null,
reasonForFailure: ''
}
}
this.uploadObj = {
img,
index
}
this.isUploadOther = isOther
if (isOther) {
this.otherUploadIndex = index
}
if (type == 2) {
return
}
if (type == 1) {
if (!img.attachmentList) {
img.auditStatus = type
} else {
img.attachmentList[0].auditStatus = type
}
this.$forceUpdate()
return
}
if (type == 0) {
if (isOther) {
this.imgPassObj.desc = img.reasonForFailure
} else {
this.imgPassObj.desc = img.attachmentList[0].reasonForFailure
}
this.showNoPassDialog = true
}
// this.$set(this.insuranceAttachmentConfigs[this.currentIndx].secondClassifyList[index], img)
},
touploadOther() {
this.isUploadOther = true
this.otherUploadIndex = null
},
upload(e) {
let otherObj = {}
let copy = null
if (this.isUploadOther) {
if(this.uploadObj){
copy = this.uploadObj.img
}
this.classifyId = this.insuranceAttachmentConfigs[this.currentIndx].secondClassifyList[0].id
Object.assign(otherObj, copy?copy:this.insuranceAttachmentConfigs[this.currentIndx].allImages[0])
}
const file = e.target.files[0]
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const base64 = file.name.split('.').pop() + '@' + arrBase64[1]
this.$apis.claims.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
if (this.isUploadOther) {
otherObj.attachmentFile = res
otherObj.auditStatus = null
otherObj.attachmentType = file.name.split('.').pop()
if (this.otherUploadIndex != null) {
this.insuranceAttachmentConfigs[this.currentIndx].allImages[this.otherUploadIndex] = otherObj
this.$forceUpdate()
} else {
otherObj.id = null
otherObj.attachmentName = null
otherObj.auditStatus = null
otherObj.reasonForFailure = null
otherObj.auditBy = null
otherObj.classifyId = this.classifyId
otherObj.attachmentCode = 4
this.insuranceAttachmentConfigs[this.currentIndx].allImages.push(otherObj)
}
return
}
this.uploadObj.img.attachmentList[0].attachmentFile = res
this.uploadObj.img.attachmentList[0].auditStatus = null
this.$set(this.insuranceAttachmentConfigs[this.currentIndx].secondClassifyList[this.uploadObj.index], this.uploadObj.img)
})
}
},
submitForm() {
if (this.isUploadOther) {
this.insuranceAttachmentConfigs[this.currentIndx].allImages[this.otherUploadIndex].auditStatus = 0
this.insuranceAttachmentConfigs[this.currentIndx].allImages[this.otherUploadIndex].reasonForFailure = this.imgPassObj.desc
this.$forceUpdate()
} else {
this.uploadObj.img.attachmentList[0].auditStatus = 0
this.uploadObj.img.attachmentList[0].reasonForFailure = this.imgPassObj.desc
this.$set(this.insuranceAttachmentConfigs[this.currentIndx].secondClassifyList[this.uploadObj.index], this.uploadObj.img)
}
this.cancelDialog()
},
cancelDialog() {
this.imgPassObj.desc = ''
this.showNoPassDialog = false
}
}
}
</script>
<style lang="scss" scoped>
.mutiReview {
position: absolute;
right: 0;
top: 14px;
z-index: 2;
}
.tab_wrapper {
box-sizing: border-box;
padding: 20px;
}
.multiBtn {
position: absolute;
right: 20px;
top: 26px;
z-index: 2;
}
.all_select_wrap {
width: 100%;
height: 64px;
background: #f9f9f9;
margin-bottom: 16px;
box-sizing: border-box;
padding: 0 20px;
.wrap_widget {
.icon {
width: 20px;
height: 20px;
cursor: pointer;
}
.text {
font-size: 14px;
font-weight: 400;
color: #333333;
margin: 0 20px 0 4px;
}
}
}
.service_line_wrap {
border-radius: 4px;
margin-bottom: 16px;
.line_box {
height: 36px;
background: #f8f8f8;
box-sizing: border-box;
padding: 2px;
}
.inner {
font-size: 14px;
font-weight: 500;
color: #666666;
padding: 0 16px;
cursor: pointer;
}
.active {
height: 32px;
background: #ffffff;
border-radius: 3px;
color: #5850ff;
}
}
.image_container {
display: flex;
flex-wrap: wrap;
.img_box {
margin-bottom: 16px;
margin-right: 16px;
.service_title {
margin: 8px 0;
}
.title {
font-size: 14px;
font-weight: 400;
color: #333333;
}
// .tip{
// width: 60%;
// overflow: hidden;
// white-space: nowrap;
// text-overflow: ellipsis;
// }
.success {
color: #2cca74;
margin-right: 5px;
}
.error {
color: #eb4e4e;
margin-right: 5px;
}
.img_pannel {
width: 216px;
height: 135px;
margin: 8px 0;
border: 1px solid #e5e5e5;
background: #f5f5f5;
position: relative;
border-radius: 4px;
background-size: 100% 100%;
.errMsg {
background: rgba(255, 82, 87, 0.5);
position: absolute;
left: 0;
right: 0;
bottom: 0;
min-height: 44px;
font-size: 12px;
font-weight: 400;
color: #ffffff;
z-index: 10;
word-break: break-all;
.intext {
box-sizing: border-box;
padding: 0 2px;
font-size: 12px;
font-weight: 400;
color: #ffffff;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.uplpad_pannel {
background: #f5f5f5;
.file_1 {
position: absolute;
opacity: 0;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10;
}
}
.errBorder {
border: 1px solid #ff5257;
}
.footer_btn {
display: flex;
align-items: center;
// justify-content: center;
.up_wrap {
position: relative;
font-size: 14px;
font-weight: 400;
color: #5850ff;
margin-left: 20px;
cursor: pointer;
.file {
opacity: 0;
position: absolute;
left: 0;
top: 0;
width: 28px;
height: 23px;
z-index: 10;
}
}
}
.marlr20 {
margin-left: 20px;
}
}
}
/deep/ .el-tabs {
.el-tabs__nav-wrap::after {
height: 1px;
background-color: #e5e5e5;
}
.el-tabs__item {
height: 45px;
font-size: 16px;
font-weight: 500;
}
.pass-btn {
width: 216px;
display: flex;
padding: 0 20px;
box-sizing: border-box;
justify-content: space-around;
.el-button {
margin: 0;
}
}
}
</style>
<template>
<div>
<template>
<div class="tab_wrap">
<el-tabs v-model="activeNameTabs">
<el-tab-pane v-if="[1, 12, 13, 14, 2, 3, 4, 0, 10, 11, 8, 9, 7].includes(repotData.status)" class="bg" label="核赔信息" name="second">
<div class="widget">
<div class="title">维修信息</div>
<div class="content pad20">
<div class="element_wrap">
<div class="label">批准金额:</div>
<div class="pannel">
<template v-for="(item, index) in itemsList">
<div :key="index" class="wrapper">
<div class="name">{{ item.serviceItemName }}</div>
<div v-if="item.serviceItemCode == 'SC0003'" style="height: 36px" class="messag flex_sc">
<div class="ms flex_sc">
<span>损失类型:</span>
<el-radio value="1" label="1">{{ item.lossType == 1 ? '全损' : '局部' }}</el-radio>
</div>
</div>
<div v-if="item.serviceItemCode == 'SC0006'" style="height: 36px" class="messag flex_sc">
<div class="ms flex_sc">
<span>服务类型:</span>
<el-checkbox-group v-model="item.lossTypeList">
<el-checkbox disabled label="3">钥匙</el-checkbox>
<el-checkbox disabled label="4">车牌重置</el-checkbox>
</el-checkbox-group>
</div>
</div>
<div style="height: 36px" class="messag flex_scb">
<div class="ms">
<span>预估损失金额/元:</span>
<span class="price">{{ item.applyAmount || 0 }}</span>
</div>
<div class="ms">
<span>定损批准金额:</span>
<span class="price">{{ item.approveAmount || 0 }}</span>
</div>
</div>
</div>
</template>
<div class="total flex_scb">
<span>合计</span>
<span>
<span>预估损失金额:{{ repotData.applyAmount || 0 }}元</span>
<span style="margin: 0 10px">|</span>
<span>定损批准金额:{{ repotData.approveAmount || 0 }}元</span>
</span>
</div>
</div>
</div>
<div v-if="repotData.bankAccountDTO" class="element_wrap ma21">
<div class="label">收款对象:</div>
<div class="pannel">
<div class="wrapper">
<div class="name">
<el-radio value="1" label="1">{{ repotData.bankAccountDTO.objectType ? '其他' : '店面' }}</el-radio>
</div>
<div class="pannel_box">
<template v-for="(item, index) in accountList">
<div :key="index" class="line" style="display: flex">
<div class="lab">
<span style="color: #eb4e4e">*</span>
<span>{{ item.name }}</span>
</div>
<div class="tip" style="width: 160px; word-break: break-all">{{ item.value }}</div>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="widget ma16">
<div class="title">上传资料</div>
<div class="cotent pad20">
<el-tabs class="tabs" v-model="activeNameClaims" @tab-click="changeTabss">
<el-tab-pane v-for="(item, index) in images2" :key="index" :label="item.firstClassifyName">
<div v-if="item.firstClassifyName.indexOf('细节') != -1" class="service_line_wrap flex_sc">
<template v-for="(serviceitems, serviceIndex) in item.services">
<div :key="serviceIndex" class="line_box flex_cc" @click="selectServices(serviceIndex)">
<div class="inner flex_cc" :class="[{ active: currentServicesIndex == serviceIndex }]">{{ serviceitems }}</div>
</div>
</template>
</div>
<div v-if="item.firstClassifyName.indexOf('细节') != -1" class="image_container">
<template v-for="(img, i) in images2[currentIndxClaims].secondClassifyList">
<div v-if="img.serviceItemName == item.services[currentServicesIndex]" :key="i" class="img_box">
<div class="title_tip flex_sc">
<i v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="el-icon-error error"></i>
<div class="">{{ img.secondClassifyName }}</div>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length && img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList.length && img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image>
<el-image v-else style="width: 216px; height: 135px; border-radius: 4px" :preview-src-list="[img.exampleUrl]" :src="img.exampleUrl" :fit="fit"></el-image>
<!-- <img v-else :src="cameraUrl" style="width: 40px; height: 40px" /> -->
<div v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div>
<div v-if="!img.attachmentList.length" class="egTag flex_cc">示例</div>
</div>
</div>
</template>
</div>
<div v-else-if="item.firstClassifyName.indexOf('其他') == -1" class="image_container">
<div v-for="(img, i) in images2[currentIndxClaims].secondClassifyList" :key="i" class="img_box">
<template v-if="img.attachmentList.length">
<!-- <div v-if="img.serviceItemName" class="service_title">{{ img.serviceItemName }}</div> -->
<div class="title_tip">
<i v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="el-icon-error error"></i>
<span>{{ img.secondClassifyName }}</span>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length && img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList.length && img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image>
<el-image v-else style="width: 216px; height: 135px; border-radius: 4px" :preview-src-list="[img.exampleUrl]" :src="img.exampleUrl" :fit="fit"></el-image>
<!-- <img v-else :src="cameraUrl" style="width: 40px; height: 40px" /> -->
<div v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div>
<div v-if="!img.attachmentList.length" class="egTag flex_cc">示例</div>
</div>
</template>
</div>
</div>
<div v-else class="image_container">
<div v-for="(img, i) in images2[currentIndxClaims].allImages" :key="i" class="img_box">
<div class="title_tip">
<i v-if="img.auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.auditStatus == 0" class="el-icon-error error"></i>
<span>图片{{ i + 1 }}</span>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentFile]" v-if="img.attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentFile" :fit="fit"></el-image>
<el-image v-else style="width: 216px; height: 135px; border-radius: 4px" :preview-src-list="[img.exampleUrl]" :src="img.exampleUrl" :fit="fit"></el-image>
<!-- <img v-else :src="cameraUrl" style="width: 40px; height: 40px" /> -->
<div v-if="img.auditStatus == 0" class="errMsg flex_cc">{{ img.reasonForFailure }}</div>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
<div class="widget ma16">
<div class="title">寄回原件说明</div>
<div class="cotent pad20">
<div v-if="repotData.claimsAttachmentConfigs2.length" class="image_container">
<div v-for="(img, i) in repotData.claimsAttachmentConfigs2[0].secondClassifyList" :key="i" class="img_box">
<div class="title_tip">
<span>{{ img.secondClassifyName }}</span>
</div>
<div v-if="img.exampleUrl" class="img_pannel flex_cc">
<el-image :preview-src-list="[img.exampleUrl]" style="width: 216px; height: 135px; border-radius: 4px" :src="img.exampleUrl" :fit="fit"></el-image>
<div class="egTag flex_cc">示例</div>
</div>
</div>
</div>
</div>
</div>
<!-- 案件补充说明 -->
<div>
<explanation :isCheck="true" :supplementList="repotData.supplementList2"></explanation>
</div>
</el-tab-pane>
<el-tab-pane class="bg" label="定损信息" name="first">
<div class="widget">
<div class="title">报案信息(客户提交)</div>
<div class="content pad20">
<div class="code text_14_4_333">核销码:{{ repotData.writeOffCode }}</div>
<div class="pannel flex_wrap">
<div v-for="(item, index) in watchData" :key="index" class="line flex_sc">
<div class="label text_14_4_666">
<span style="color: #eb4e4e">*</span>
<span>{{ item.name }}</span>
</div>
<div class="value text_14_4_333">{{ item.value }}</div>
</div>
</div>
</div>
</div>
<div class="widget ma16">
<div class="title">报案信息(店面补充)</div>
<div class="content pad20">
<div class="pannel flex_wrap">
<div class="line flex_sc">
<div class="label text_14_4_666">
<span style="color: #eb4e4e">*</span>
<span>经办人:</span>
</div>
<div class="value text_14_4_333">{{ repotData.handlerName }}</div>
</div>
<div class="line flex_sc">
<div class="label text_14_4_666">
<span style="color: #eb4e4e">*</span>
<span>经办人联系号码:</span>
</div>
<div class="value text_14_4_333">{{ repotData.handlerPhone }}</div>
</div>
<div class="line flex_sc">
<div class="label text_14_4_666">
<span style="color: #eb4e4e">*</span>
<span>出险经过描述:</span>
</div>
<div class="value text_14_4_333">{{ repotData.reimbursementProcess }}</div>
</div>
</div>
</div>
</div>
<div class="widget ma16">
<div class="title">上传资料</div>
<div class="cotent pad20">
<el-tabs class="tabs" v-model="activeName" @tab-click="changeTabs">
<el-tab-pane v-for="(item, index) in images" :key="index" :label="item.firstClassifyName">
<div v-if="item.firstClassifyName.indexOf('细节') != -1" class="service_line_wrap flex_sc">
<template v-for="(serviceitems, serviceIndex) in item.services">
<div :key="serviceIndex" class="line_box flex_cc" @click="selectServices(serviceIndex)">
<div class="inner flex_cc" :class="[{ active: currentServicesIndex == serviceIndex }]">{{ serviceitems }}</div>
</div>
</template>
</div>
<div v-if="item.firstClassifyName.indexOf('细节') != -1" class="image_container">
<template v-for="(img, i) in images[currentIndx].secondClassifyList">
<div v-if="img.serviceItemName == '钥匙及车牌重置服务' && img.serviceItemName == item.services[currentServicesIndex] ? lossTypeList.includes(img.lossType) : img.serviceItemName == item.services[currentServicesIndex]" :key="i" class="img_box">
<div class="title_tip flex_sc">
<i v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="el-icon-error error"></i>
<div class="">{{ img.secondClassifyName }}</div>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length && img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList.length && img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image>
<el-image v-else style="width: 216px; height: 135px; border-radius: 4px" :preview-src-list="[img.exampleUrl]" :src="img.exampleUrl" :fit="fit"></el-image>
<!-- <img v-else :src="cameraUrl" style="width: 40px; height: 40px" /> -->
<!-- <div v-if="img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div> -->
<div v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="img.attachmentList[0].reasonForFailure">
<div class="intext" slot="reference">{{ img.attachmentList[0].reasonForFailure }}</div>
</el-popover>
</div>
<div v-if="!img.attachmentList.length" class="egTag flex_cc">示例</div>
</div>
</div>
</template>
</div>
<div v-else-if="item.firstClassifyName.indexOf('其他') == -1" class="image_container">
<div v-for="(img, i) in images[currentIndx].secondClassifyList" :key="i" class="img_box">
<template v-if="img.attachmentList.length">
<!-- <div v-if="img.serviceItemName" class="service_title">{{ img.serviceItemName }}</div> -->
<div class="title_tip">
<i v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="el-icon-error error"></i>
<span>{{ img.secondClassifyName }}</span>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length && img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList.length && img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image>
<el-image v-else style="width: 216px; height: 135px; border-radius: 4px" :preview-src-list="[img.exampleUrl]" :src="img.exampleUrl" :fit="fit"></el-image>
<!-- <img v-else :src="cameraUrl" style="width: 40px; height: 40px" /> -->
<!-- <div v-if="img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div> -->
<div v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="img.attachmentList[0].reasonForFailure">
<div class="intext" slot="reference">{{ img.attachmentList[0].reasonForFailure }}</div>
</el-popover>
</div>
<div v-if="!img.attachmentList.length" class="egTag flex_cc">示例</div>
</div>
</template>
</div>
</div>
<div v-else class="image_container">
<div v-for="(img, i) in images[currentIndx].allImages" :key="i" class="img_box">
<div class="title_tip">
<i v-if="img.auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.auditStatus == 0" class="el-icon-error error"></i>
<span>图片{{ i + 1 }}</span>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentFile]" v-if="img.attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentFile" :fit="fit"></el-image>
<el-image v-else style="width: 216px; height: 135px; border-radius: 4px" :preview-src-list="[img.exampleUrl]" :src="img.exampleUrl" :fit="fit"></el-image>
<!-- <img v-else :src="cameraUrl" style="width: 40px; height: 40px" /> -->
<!-- <div v-if="img.auditStatus == 0" class="errMsg flex_cc">{{ img.reasonForFailure }}</div> -->
<div v-if="img.auditStatus == 0" class="errMsg flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="img.reasonForFailure">
<div class="intext" slot="reference">{{ img.reasonForFailure }}</div>
</el-popover>
</div>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
<!-- 案件补充说明 -->
<div>
<explanation :isCheck="true" :supplementList="repotData.supplementList1"></explanation>
</div>
<!-- 其他信息 -->
<div>
<other-info :otherInfoData="otherInfoData"></other-info>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
</div>
</template>
<script type="text/ecmascript-6">
import explanation from '../explanation.vue'
import otherInfo from '../otherInfo.vue'
export default {
name: 'watchPage',
components: {
explanation,
otherInfo
},
data() {
return {
currentIndx: 0,
currentIndxClaims: 0,
activeName: '0',
activeNameClaims: '0',
currentServicesIndex: 0,
activeNameTabs: 'first'
}
},
props: {
repotData: Object,
watchData: Array,
accountList: Array,
itemsList: Array,
images: Array,
images2: Array,
otherInfoData: Object,
lossTypeList:Array
},
mounted() {},
methods: {
selectServices(index) {
this.currentServicesIndex = index
},
changeTabs(e) {
this.activeName = e.index.toString()
this.currentIndx = e.index
},
changeTabss(e) {
this.activeNameClaims = e.index.toString()
this.currentIndxClaims = e.index
}
}
}
</script>
<style lang="scss" scoped>
.ma16 {
margin-top: 16px;
}
.ma21 {
margin-top: 21px;
}
.image_container {
display: flex;
flex-wrap: wrap;
.img_box {
margin-bottom: 16px;
margin-right: 16px;
.service_title {
margin: 8px 0;
}
.title_tip {
font-size: 14px;
font-weight: 400;
color: #333333;
}
.success {
color: #2cca74;
margin-right: 5px;
}
.error {
color: #eb4e4e;
margin-right: 5px;
}
.img_pannel {
width: 216px;
height: 135px;
margin: 8px 0;
border: 1px solid #e5e5e5;
background: #f5f5f5;
position: relative;
border-radius: 4px;
.errMsg {
background: rgba(255, 82, 87, 0.5);
position: absolute;
left: 0;
right: 0;
bottom: 0;
min-height: 44px;
font-size: 12px;
font-weight: 400;
color: #ffffff;
z-index: 10;
.intext {
box-sizing: border-box;
padding: 0 2px;
font-size: 12px;
font-weight: 400;
color: #ffffff;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
text-overflow: ellipsis;
}
}
.egTag {
position: absolute;
right: 8px;
top: 8px;
width: 36px;
height: 18px;
color: #666;
font-size: 12px;
border-radius: 2px;
background: #e5e5e5;
}
}
.uplpad_pannel {
background: #f5f5f5;
.file_1 {
position: absolute;
opacity: 0;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10;
}
}
.errBorder {
border: 1px solid #ff5257;
}
.footer_btn {
display: flex;
align-items: center;
justify-content: center;
.up_wrap {
position: relative;
font-size: 14px;
font-weight: 400;
color: #5850ff;
margin-left: 20px;
cursor: pointer;
.file {
opacity: 0;
position: absolute;
left: 0;
top: 0;
width: 28px;
height: 23px;
z-index: 10;
}
}
}
.marlr20 {
margin-left: 20px;
}
}
}
.service_line_wrap {
border-radius: 4px;
margin-bottom: 16px;
.line_box {
height: 36px;
background: #f8f8f8;
box-sizing: border-box;
padding: 2px;
}
.inner {
font-size: 14px;
font-weight: 500;
color: #666666;
padding: 0 16px;
cursor: pointer;
}
.active {
height: 32px;
background: #ffffff;
border-radius: 3px;
color: #5850ff;
}
}
/deep/ .el-tabs {
.el-tabs__nav-wrap::after {
height: 1px;
background-color: #e5e5e5;
}
.el-tabs__item {
height: 45px;
font-size: 16px;
font-weight: 500;
}
.pass-btn {
width: 216px;
display: flex;
padding: 0 20px;
box-sizing: border-box;
justify-content: space-around;
.el-button {
margin: 0;
}
}
}
.text_wrap {
white-space: pre-wrap !important;
}
</style>
<!-- 权益订单 --> <!-- 权益订单 -->
<template> <template>
<div> <div>
<div class="header_btn_widget flex_sc"> <!-- <div class="header_btn_widget flex_sc">
<GLButton size="small" fn="广汇订单详情" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增核赔</GLButton> <GLButton size="small" fn="订单详情" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增核赔</GLButton>
</div> </div> -->
<div class="header_info_widget"> <div class="header_info_widget">
<span class="el-icon-warning"></span> <span class="el-icon-warning"></span>
请注意:订单列表还有 请注意:订单列表还有
<span class="count_num">{{ orderCount.toBeCommitCount || 0 }}</span> <span class="count_num">{{ orderCount.lossToBeDeterminedCount }}</span>
单待定损
<span class="count_num">{{ orderCount.pendingClaimCount }}</span>
单待核赔
<span class="count_num">{{ orderCount.ossFailCount }}</span>
单不通过退回处理,为保障客户权益,请尽快处理哦!
<!-- <span class="count_num">{{ orderCount.toBeCommitCount || 0 }}</span>
单待提交国任, 单待提交国任,
<span class="count_num">{{ orderCount.noPassCount || 0 }}</span> <span class="count_num">{{ orderCount.noPassCount || 0 }}</span>
单校验不通过退回处理,为保障客户权益,请尽快处理哦! 单校验不通过退回处理,为保障客户权益,请尽快处理哦! -->
</div> </div>
<div class="search_container"> <div class="search_container">
<glsx-combi-form ref="showSearch" labelWidth="112px" defaultWidth="218px" :formObj="searchForm" :formData="searchFormData"> <GLCombiForm :rowNumber="1" ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOkFn" @handleRest="handleRestFn()"></GLCombiForm>
<div slot="footer" class="footer-btns primary_plain_btn" style="float:right;">
<el-button size="small" @click="handleRestFn()">重置</el-button>
<el-button size="small" type="primary" @click="handleOkFn">查询</el-button>
<el-button size="small" type="primary" @click="exportList" plain>导出excel</el-button>
</div>
</glsx-combi-form>
</div> </div>
<div class="table_widget"> <div class="table_widget">
<div class="table_top_line flex_scb">
<span>核赔订单列表</span>
<div class="table_top_btn flex_sc">
<GLButton size="small" fn="订单详情" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增核赔</GLButton>
<el-button plain size="small" @click="exportList">导出</el-button>
</div>
</div>
<GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="searchParams" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="batchPageConf"> <GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="searchParams" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="batchPageConf">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ tableStatus[scope.scope.status] }}</span>
</div>
<div class="table-btns" slot="table-btns" slot-scope="scope"> <div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[0].includes(scope.scope.status)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
<GLButton v-if="[1, 3, 4].includes(scope.scope.status)" fn="查看" type="text" @click="handleEdit(2, scope.scope)">查看</GLButton>
<GLButton v-if="[2].includes(scope.scope.status)" fn="重新提交" type="text" @click="handleEdit(3, scope.scope)">重新提交</GLButton>
</div> </div>
</GLTable> </GLTable>
</div> </div>
<!-- 历史赔付记录 -->
<GLDialog :close-on-press-escape="false" :close-on-click-modal="false" :hasFooter="false" title="历史赔付记录" mode="big" :visible.sync="historyDialog">
<GLTable :hasPage="false" :tableData="historyListData" :tableParams="historyTableParams">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ tableStatus[scope.scope.status] }}</span>
</div>
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="historybuttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</GLDialog>
<!-- 跟进记录 -->
<GLDialog :title="followDialogTitle" mode="mid" :close-on-press-escape="false" :close-on-click-modal="false" :visible.sync="followDialog" bef :okText="followOkText" @onOk="toAddFollw" @onCancel="closeFollow">
<template v-if="!followEditStatus">
<div class="wrap_time_line">
<templatece v-if="!followResult">
<el-timeline reverse="true">
<el-timeline-item :class="[{ spec: !index }]" v-for="(item, index) in followListData" :key="index" :timestamp="item.createdDate">
{{ item.content }}
</el-timeline-item>
</el-timeline>
</templatece>
<template v-else>
<div style="margin-top: 60px; text-align: center">暂无跟进记录</div>
</template>
</div>
</template>
<template v-if="followEditStatus">
<div class="wrap_time_line">
<div class="col">
<div class="label">
<span style="color: #eb4e4e">*</span>
<span>具体描述:</span>
</div>
<div class="fill">
<el-input maxlength="200" style="width: 432px" type="textarea" :rows="3" placeholder="请输入" v-model="followContent"></el-input>
</div>
</div>
</div>
</template>
</GLDialog>
<!-- 上传签名授权书 -->
<GLDialog title="上传图片" mode="mid" :visible.sync="showUpload" @onOk="toUploadSignImg" @onCancel="closeUpload">
<div class="iamge_widget">
<div class="label">客户签名:</div>
<el-image :preview-src-list="[signImage]" v-if="signImage" style="width: 104px; height: 104px; border-radius: 4px; margin-right: 8px" :src="signImage" :fit="fit"></el-image>
<div class="upload flex_ccc">
<i class="el-icon-plus"></i>
<span class="tet">上传照片</span>
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
</div>
</GLDialog>
</div> </div>
</template> </template>
<script> <script>
import glsxCombiForm from '@/components/glsx-combi-form'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
//服务状态:0-待提交国任 1-待支付 2-校验不通过 3-支付成功 4-支付失败
const statusList = [ const statusList = [
{ {
confId: '', confId: '',
...@@ -59,31 +126,214 @@ const statusList = [ ...@@ -59,31 +126,214 @@ const statusList = [
{ {
confId: 4, confId: 4,
confName: '支付失败' confName: '支付失败'
},
{
confId: 5,
confName: '待受理'
},
{
confId: 6,
confName: '待定损'
},
{
confId: 7,
confName: '定损不通过'
},
{
confId: 8,
confName: '定损通过'
},
{
confId: 9,
confName: '待主管审核'
},
{
confId: 10,
confName: '主管审核不通过'
},
{
confId: 11,
confName: '待客户签字授权'
},
{
confId: 12,
confName: '待核赔'
},
{
confId: 13,
confName: '核赔不通过'
},
{
confId: 14,
confName: '核赔通过'
} }
] ]
const tableStatus = ['待提交国任', '待支付', '校验不通过', '支付成功', '支付失败', '待受理', '待定损', '定损不通过', '定损通过', '待主管审核', '主管审核不通过', '待客户签字授权', '待核赔', '核赔不通过', '核赔通过']
const colors = ['#FDB757', '#FDB757', '#EB4E4E', ' #2CCA74', '#EB4E4E', '#FDB757', '#FDB757', '#EB4E4E', ' #2CCA74', '#FDB757', '#EB4E4E', '#FDB757', '#FDB757', '#EB4E4E', '#2CCA74']
// 操作对应状态
const WATCH = [5, 7, 13, 8, 9, 10, 11, 1, 3] // 查看
const FOLLOW_HISTORY = [5, 6, 12, 7, 13, 8, 9, 10, 11, 2, 1, 3] //跟进记录和历史赔付
const CHECK = [6, 12] // 审核
const RE_SUMBIT = [2] //重新提交
const RETURN_IT = [7, 13] // 撤销
const UPLOAD_INFO = [11] // 上传资料
const TO_HANDLE = [0] // 去处理
export default { export default {
name: 'index', name: 'index',
data() { data() {
return { return {
signImage: '',
showUpload: false,
tableStatus,
orderCount: {}, orderCount: {},
getListApi: this.$apis.claims.getclaimsList, buttonList: [
{
type: 'GLButton',
name: row => {
return '审核'
},
condition: row => {
return CHECK.includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '审核'
},
listeners: {
click: row => this.handleEdit(5, row.scope)
}
},
{
type: 'el-button',
name: row => {
return '撤销'
},
condition: row => {
return RETURN_IT.includes(row.scope.status)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.toReturnOrder(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '跟进记录'
},
condition: row => {
return FOLLOW_HISTORY.includes(row.scope.status)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.showFollow(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '历史赔付'
},
condition: row => {
return FOLLOW_HISTORY.includes(row.scope.status)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.showHistory(row)
}
},
{
type: 'el-button',
name: row => {
return '上传资料'
},
condition: row => {
return UPLOAD_INFO.includes(row.scope.status)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.touploadSign(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '查看'
},
condition: row => {
return WATCH.includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: row => this.handleEdit(2, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '重新提交'
},
condition: row => {
return RE_SUMBIT.includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '重新提交'
},
listeners: {
click: row => this.handleEdit(6, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '去处理'
},
condition: row => {
return TO_HANDLE.includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '去处理'
},
listeners: {
click: row => this.handleEdit(4, row.scope)
}
}
],
getListApi: this.$apis.claims.getGHClaimsListApi,
sizeList: [5, 10, 20, 30, 40], sizeList: [5, 10, 20, 30, 40],
pageConf: { pageSize: 'pageCount', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageCount', pageNum: 'pageNum', totalCount: 'total' },
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchForm: { searchForm: {
searchText: '', searchText: '',
status: '', status: '',
commitDate: '' commitDate: '',
shopDate: '',
cityMerchantId: '',
provinceMerchantId: '',
merchantId: ''
}, },
searchParams: {}, searchParams: {},
searchFormData: [ searchFormData: [
{ {
label: '搜索内容',
name: 'searchText', name: 'searchText',
type: 'input', type: 'input',
placeholder: '请输入客户名|核销码|合同号|报案号',
isClear: true, isClear: true,
maxlength: 200 maxlength: 200,
// isHide: true placeholder: '客户|合同号|报案号'
}, },
{ {
label: '服务状态', label: '服务状态',
...@@ -95,6 +345,46 @@ export default { ...@@ -95,6 +345,46 @@ export default {
optionLabel: 'confName' optionLabel: 'confName'
}, },
{ {
label: '门店提交时间',
name: 'shopDate',
type: 'datePicker',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
},
{
label: '大区',
name: 'provinceMerchantId',
type: 'select',
isClear: true,
optionList: [],
optionId: 'provinceMerchantId',
optionLabel: 'merchantName',
changeAttr: val => {
this.getmidMerchantList(val)
}
},
{
label: '片区',
name: 'cityMerchantId',
type: 'select',
isClear: true,
optionList: [],
optionId: 'cityMerchantId',
optionLabel: 'merchantName',
changeAttr: val => {
this.getdMerchantList(val)
}
},
{
label: '门店',
name: 'merchantId',
type: 'select',
isClear: true,
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName'
},
{
label: '提交国任日期', label: '提交国任日期',
name: 'commitDate', name: 'commitDate',
type: 'datePicker', type: 'datePicker',
...@@ -109,7 +399,7 @@ export default { ...@@ -109,7 +399,7 @@ export default {
{ {
label: '核销码', label: '核销码',
prop: 'writeOffCode', prop: 'writeOffCode',
width: '90', width: 100,
formatter: cellValue => { formatter: cellValue => {
return cellValue.writeOffCode || '-' return cellValue.writeOffCode || '-'
} }
...@@ -117,7 +407,7 @@ export default { ...@@ -117,7 +407,7 @@ export default {
{ {
label: '报案号', label: '报案号',
prop: 'registNo', prop: 'registNo',
width: '220', width: 220,
formatter: cellValue => { formatter: cellValue => {
return cellValue.registNo || '-' return cellValue.registNo || '-'
} }
...@@ -125,7 +415,8 @@ export default { ...@@ -125,7 +415,8 @@ export default {
{ {
label: '客户名称', label: '客户名称',
prop: 'reporterName', prop: 'reporterName',
width: '200', width: 200,
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.reporterName || '-' return cellValue.reporterName || '-'
} }
...@@ -133,7 +424,7 @@ export default { ...@@ -133,7 +424,7 @@ export default {
{ {
label: '合同号', label: '合同号',
prop: 'contractNo', prop: 'contractNo',
width: '200', width: 200,
formatter: cellValue => { formatter: cellValue => {
return cellValue.contractNo || '-' return cellValue.contractNo || '-'
} }
...@@ -141,23 +432,23 @@ export default { ...@@ -141,23 +432,23 @@ export default {
{ {
label: '价格区间', label: '价格区间',
prop: 'priceSection', prop: 'priceSection',
width: '100', width: 200,
formatter: cellValue => { formatter: cellValue => {
return cellValue.priceSection || '-' return cellValue.priceSection || '-'
} }
}, },
{ {
label: '门店提交时间', label: '门店提交时间',
prop: 'commitTime', prop: 'merchantCommitDate',
width: '180', width: 180,
formatter: cellValue => { formatter: cellValue => {
return cellValue.commitTime ? dayjs(cellValue.commitTime).format('YYYY-MM-DD HH:mm:ss') : '-' return cellValue.merchantCommitDate ? dayjs(cellValue.merchantCommitDate).format('YYYY-MM-DD HH:mm:ss') : '-'
} }
}, },
{ {
label: '提交国任时间', label: '提交国任时间',
prop: 'commitGuoRenDate', prop: 'commitGuoRenDate',
width: '180', width: 180,
formatter: cellValue => { formatter: cellValue => {
return cellValue.commitGuoRenDate ? dayjs(cellValue.commitGuoRenDate).format('YYYY-MM-DD HH:mm:ss') : '-' return cellValue.commitGuoRenDate ? dayjs(cellValue.commitGuoRenDate).format('YYYY-MM-DD HH:mm:ss') : '-'
} }
...@@ -165,7 +456,7 @@ export default { ...@@ -165,7 +456,7 @@ export default {
{ {
label: '服务名称', label: '服务名称',
prop: 'serviceName', prop: 'serviceName',
width: '300', width: 300,
line: 1, line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.serviceName || '-' return cellValue.serviceName || '-'
...@@ -174,32 +465,45 @@ export default { ...@@ -174,32 +465,45 @@ export default {
{ {
label: '服务状态', label: '服务状态',
prop: 'status', prop: 'status',
width: '120', width: 200,
formatter: cellValue => { addHtml: 'colorStatus'
if (!cellValue) return '-' // formatter: cellValue => {
return statusList.map(item => item.confId).includes(cellValue.status) ? statusList.find(item => item.confId === cellValue.status).confName : '-' // if (!cellValue) return '-'
} // return statusList.map(item => item.confId).includes(cellValue.status) ? statusList.find(item => item.confId === cellValue.status).confName : '-'
// }
}, },
{ {
label: '状态描述', label: '状态描述',
prop: 'statusDesc', prop: 'statusDesc',
width: '200', width: 250,
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.statusDesc || '-' return cellValue.statusDesc || '-'
} }
}, },
{ {
label: '批准金额', label: '申请金额/元',
prop: 'applyAmount',
width: 150,
align: 'right',
formatter: cellValue => {
return cellValue.applyAmount || '-'
}
},
{
label: '批准金额/元',
prop: 'approvalAmount', prop: 'approvalAmount',
width: '100', width: 150,
align: 'right',
formatter: cellValue => { formatter: cellValue => {
return cellValue.approvalAmount || '-' return cellValue.approvalAmount || '-'
} }
}, },
{ {
label: '支付金额', label: '支付金额/元',
prop: 'paymentAmount', prop: 'paymentAmount',
width: '100', align: 'right',
width: 150,
formatter: cellValue => { formatter: cellValue => {
return cellValue.paymentAmount || '-' return cellValue.paymentAmount || '-'
} }
...@@ -207,7 +511,7 @@ export default { ...@@ -207,7 +511,7 @@ export default {
{ {
label: '操作人', label: '操作人',
prop: 'operatorName', prop: 'operatorName',
width: '100', width: 100,
formatter: cellValue => { formatter: cellValue => {
return cellValue.operatorName || '-' return cellValue.operatorName || '-'
} }
...@@ -215,52 +519,208 @@ export default { ...@@ -215,52 +519,208 @@ export default {
{ {
label: '操作', label: '操作',
prop: '', prop: '',
width: '200', width: 230,
fixed: 'right', fixed: 'right',
addHtml: 'table-btns' addHtml: 'table-btns'
} }
] ]
} },
historyDialog: false,
historyTableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '申请时间',
prop: 'merchantCommitDate',
width: 200,
formatter: cellValue => {
return cellValue.merchantCommitDate ? dayjs(cellValue.merchantCommitDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '申请服务',
prop: 'serviceName',
width: 200,
line: 1
},
{
label: '服务状态',
prop: 'status',
width: 200,
addHtml: 'colorStatus'
},
{
label: '支付金额/元',
minWidth: 180,
prop: 'paymentAmount',
formatter: cellValue => {
return cellValue.paymentAmount || '--'
}
},
{
label: '核销码',
width: 180,
prop: 'writeOffCode'
},
{
label: '操作',
prop: '',
width: 80,
fixed: 'right',
addHtml: 'table-btns'
}
]
},
historybuttonList: [
{
type: 'GLButton',
name: row => {
return '详情'
},
attrs: {
type: 'text',
fn: '详情'
},
listeners: {
click: row => this.handleEdit(2, row.scope)
}
}
],
historyListData: [],
followDialog: false,
followListData: [],
followDialogTitle: '跟进记录',
followOkText: '新增',
followEditStatus: false,
followContent: '',
followResult: false,
colors
} }
}, },
components: {
glsxCombiForm
},
created() { created() {
this.diffHost()
this.getClaimsCount() this.getClaimsCount()
this.getMerchantData()
}, },
mounted() { mounted() {},
// this.handleUploadBefore()
},
methods: { methods: {
// 获取当前登录人的商户层级
getMerchantData() {
this.$apis.claims.getBigMerchantApi({}).then(res => {
this.searchFormData[3].optionList = res || []
})
},
getmidMerchantList(provinceMerchantId) {
this.$apis.claims.getMidMerchantApi({ provinceMerchantId }).then(res => {
this.searchFormData[4].optionList = res || []
this.searchFormData[4].isHide = false
})
},
getdMerchantList(cityMerchantId) {
this.$apis.claims.getMerchantApi({ cityMerchantId }).then(res => {
this.searchFormData[5].optionList = res || []
this.searchFormData[5].isHide = false
})
},
showFollow(row) {
this.followDialog = true
this.curentFollowInfo = row
this.followListData = []
this.getFollowList(row)
},
closeFollow() {
if (this.followEditStatus) {
// 切换
this.followDialogTitle = '跟进记录'
this.followEditStatus = false
this.followOkText = '新增'
} else {
// 关闭弹窗
this.followDialog = false
this.curentFollowInfo = null
this.followOkText = '新增'
}
},
toAddFollw() {
if (!this.followEditStatus) {
// 切换新增
this.followDialogTitle = '新增记录'
this.followOkText = '提交'
this.followEditStatus = true
} else {
// 切换查看
this.followDialogTitle = '跟进记录'
this.followOkText = '新增'
this.followEditStatus = false
this.createFollow()
}
},
createFollow() {
let para = {
claimsId: this.curentFollowInfo.id,
content: this.followContent,
createdBy: this.curentFollowInfo.operatorName
}
this.$apis.claims.addGHClaimFollowsListApi(para).then(res => {
this.followDialogTitle = '跟进记录'
this.followOkText = '新增'
this.followEditStatus = false
this.getFollowList(this.curentFollowInfo)
this.$message({
message: '新增成功',
type: 'success'
})
})
},
getFollowList(row) {
this.$apis.claims.getGHClaimFollowsListApi({ claimsId: row.id }).then(res => {
res.forEach(el => {
el.createdDate = dayjs(el.createdDate).format('YYYY-MM-DD HH:mm:ss')
})
this.followListData = res || []
this.followResult = res.length ? false : true
})
},
getHistoryList(contractNo) {
this.$apis.claims.getGHhistoryListApi({ contractNo }).then(res => {
this.historyListData = res || []
})
},
showHistory(row) {
this.historyDialog = true
this.getHistoryList(row.scope.contractNo)
},
getClaimsCount() { getClaimsCount() {
this.$apis.claims.getclaimsCount({}).then(res => { this.$apis.claims.getGHCountApi({}).then(res => {
this.orderCount = res this.orderCount = res
}) })
}, },
// 从域名判断是不是广汇的 // 1.新增 2.查看 6.重新提交 4.去处理 5.审核
diffHost() {
let href = window.location.host
this.showGh = true
if (!this.showGh) this.searchFormData[0].placeholder = '请输入客户名 | 合同号 | 报案号'
},
// 1.新增 2.查看 3.重新提交 4.去处理
handleEdit(editNo, row) { handleEdit(editNo, row) {
let urlParam = { let urlParam = {}
editNo, const title = this.jumpTitle(editNo)
isGH: this.showGh, if (editNo != 1 && editNo != 4) {
// isGH: true, urlParam = {
contractNo: editNo == 1 ? '' : row.contractNo, // 嘀加的用合同号 editNo,
orderId: editNo == 1 ? '' : row.id isGH: true,
} writeOffCode: row.writeOffCode,
if (this.showGh) { orderId: row.id,
// 广汇的用核销码 status: row.status
urlParam.contractNo = editNo == 1 ? '' : row.writeOffCode }
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/ghOrder/' + temp, query: { $title: title } })
} else {
urlParam = {
editNo,
isGH: true,
contractNo: editNo == 4 ? row.writeOffCode : '',
orderId: editNo == 4 ? row.id : '',
status: editNo == 4 ? row.status : '',
}
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/order/' + temp, query: { $title: title } })
} }
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/ghOrder/' + temp })
}, },
handleOkFn() { handleOkFn() {
this.getParams() this.getParams()
...@@ -294,7 +754,7 @@ export default { ...@@ -294,7 +754,7 @@ export default {
}, },
exportList() { exportList() {
const parmas = { ...this.getParams() } const parmas = { ...this.getParams() }
this.$apis.claims.exportClaimsData(parmas).then(data => { this.$apis.claims.exportGHClaimsListApi(parmas).then(data => {
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('id', 'exportToExport') a.setAttribute('id', 'exportToExport')
a.setAttribute('href', data) a.setAttribute('href', data)
...@@ -302,6 +762,89 @@ export default { ...@@ -302,6 +762,89 @@ export default {
document.body.appendChild(a) document.body.appendChild(a)
a.click() a.click()
}) })
},
toReturnOrder(row) {
let para = {
id: row.id,
auditStatus: -1,
status: row.status
}
this.$confirm('是否确认撤销?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$apis.claims.cancelClaims(para).then(res => {
this.$refs.equityRef.refreshTable()
if (res) {
this.$message({
message: '撤销成功',
type: 'success'
})
}
})
})
},
touploadSign(row) {
this.showUpload = true
this.uploadItem = row
},
toUploadSignImg() {
this.saveSignImge()
this.closeUpload()
},
closeUpload() {
this.showUpload = false
},
upload(e) {
const file = e.target.files[0]
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const base64 = file.name.split('.').pop() + '@' + arrBase64[1]
this.$apis.claims.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.signImage = res
})
}
},
saveSignImge() {
let para = {
writeOffCode: this.uploadItem.writeOffCode,
signUrl: this.signImage
}
this.$apis.claims.saveSign(para).then(res => {
this.$message({
message: '上传成功',
type: 'success'
})
this.getTableData()
})
},
jumpTitle(addOrEdit) {
let title = '审核'
switch (addOrEdit) {
case 1:
title = '新增核赔'
break
case 2:
title = '查看'
break
case 6:
title = '重新提交'
break
case 4:
title = '去处理'
break
case 5:
title = '审核'
break
default:
title = '审核'
break
}
return title
} }
} }
} }
...@@ -309,7 +852,8 @@ export default { ...@@ -309,7 +852,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.header_info_widget { .header_info_widget {
box-sizing: border-box; box-sizing: border-box;
margin: 20px 0; // margin: 16px 0;
margin-bottom: 16px;
width: 100%; width: 100%;
height: 40px; height: 40px;
display: flex; display: flex;
...@@ -342,17 +886,82 @@ export default { ...@@ -342,17 +886,82 @@ export default {
.table_widget { .table_widget {
padding: 0px 20px 20px; padding: 0px 20px 20px;
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);
} }
.table_top_line {
/deep/ .el-form { margin-bottom: 10px;
.el-form-item { }
margin-right: 12px !important; .el-button + .el-button {
&:first-child { margin-left: 8px;
.el-input { }
width: 312px !important; .wrap_time_line {
} .col {
margin-top: 30px;
display: flex;
}
.label {
width: 154px;
font-size: 14px;
font-weight: 400;
color: #333333;
text-align: right;
}
.el-timeline-item:first-child {
/deep/ .el-timeline-item__node {
background: #5850ff !important;
}
}
}
.table_point {
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.iamge_widget {
margin-top: 20px;
display: flex;
.label {
width: 154px;
text-align: right;
font-size: 14px;
font-weight: 400;
color: #333333;
}
.upload {
width: 104px;
height: 104px;
font-size: 14px;
font-weight: 400;
color: #666666;
background: rgba(0, 0, 0, 0.04);
border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.15);
position: relative;
.tet {
margin-top: 13px;
}
.file {
position: absolute;
width: 104px;
height: 104px;
left: 0;
top: 0;
opacity: 0;
z-index: 2;
cursor: pointer;
} }
} }
} }
// /deep/ .el-form {
// .el-form-item {
// margin-right: 12px !important;
// &:first-child {
// .el-input {
// width: 312px !important;
// }
// }
// }
// }
</style> </style>
<!-- 权益订单 -->
<template> <template>
<div> <div class="order-container-page">
<report @toSearchOrderDetail="toSearchOrderDetail" ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report> <template v-if="pageType == 2">
<repair ref="repairRef" @changeObjectType="changeObjectType" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair> <WatchData :lossTypeList.sync="lossTypeList" :otherInfoData.sync="otherInfoData" :images="insuranceAttachmentConfigs" :images2="claimsAttachmentConfigs" :itemsList.sync="itemList" :repotData.sync="repotData" :accountList.sync="accountList" :watchData.sync="watchData"></WatchData>
<material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material> </template>
<div class="footer operate-btn primary_plain_btn"> <template v-else-if="pageType == 5 && routeInfo.status < 11">
<template v-if="pageType != 2"> <CheckData @getCurrentLoosType="getLossType" :lossTypeList.sync="lossTypeList" :otherInfoData.sync="otherInfoData" :itemList.sync="itemList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs" :repotData.sync="repotData"></CheckData>
<el-button size="small" type="primary" @click="confirmSubmit(1)">提交</el-button> </template>
<el-button size="small" type="primary" plain @click="confirmSubmit(2)">草稿</el-button> <template v-else-if="(pageType == 5 && routeInfo.status > 10) || (routeInfo.status == 2 && pageType == 6)">
<el-button size="small" @click="handleCancel">取消</el-button> <div class="tab_wrap">
</template> <el-tabs v-model="activeName">
<template v-else> <el-tab-pane class="bg" label="核赔信息" name="first">
<el-button size="small" type="primary" @click="handleCancel">返回</el-button> <CheckClaims ref="checkclaims" @getCurrentLoosType="getLossType" :lossTypeList.sync="lossTypeList" @changeObjectType="changeObjectType" :insuranceAttachmentConfigs.sync="claimsAttachmentConfigs" :repotData.sync="repotData" :itemsList.sync="itemList" :accountForm.sync="accountForm"></CheckClaims>
</template> </el-tab-pane>
<el-tab-pane class="bg" label="定损信息" name="second">
<CheckData @getCurrentLoosType="getLossType" :lossTypeList.sync="lossTypeList" :isDisabled="true" :otherInfoData.sync="otherInfoData" :itemList.sync="itemList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs" :repotData.sync="repotData"></CheckData>
</el-tab-pane>
</el-tabs>
</div>
</template>
<!-- 底部按钮 -->
<div v-if="pageType != 2 && activeName != 'second'" class="btn-box">
<el-button plain class="btn-three" @click="toBackList">取消</el-button>
<el-button plain class="btn-three" @click="toSaveOrder">保存</el-button>
<el-button plain @click="toNoPassOrder">不通过</el-button>
<el-button type="primary" @click="toPassOrder">通过</el-button>
</div> </div>
<qrCode :bottom="320" phone="400 6123 886" phoneTitle="定损及核赔服务咨询" :codeUrl="qrcodUrl"></qrCode>
<!-- 弹窗 -->
<GLDialog class="gl-form-page gl-form-min" title="审核不通过" mode="mid" :visible.sync="showNoPassDialog" @onOk="comfirmNoPass" @onCancel="cancleNoPass">
<glsx-combi-form ref="noPassRef" :isInline="false" labelWidth="154px" defaultWidth="284px" :formObj="noPassObj" :formData="noPassForm"></glsx-combi-form>
</GLDialog>
<GLDialog class="gl-form-page gl-form-min" title="审核通过,请输入批准金额" mode="mid" :visible.sync="showPassedDialog" @onOk="comfirmPass" @onCancel="canclePass">
<div class="passed-wrap">
<div class="passed-item" v-for="(item, index) in itemList" :key="index">
<span class="name">{{ item.serviceItemName }}</span>
<div class="set-price">
<li>
<label for="">预估损失金额/元:</label>
<el-input @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" size="small" maxlength="10" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input>
</li>
<li>
<label for="">定损批准金额/元:</label>
<el-input @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" size="small" maxlength="10" placeholder="请输入定损批准金额" v-model="item.approveAmount"></el-input>
</li>
</div>
</div>
</div>
</GLDialog>
</div> </div>
</template> </template>
<script> <script type="text/ecmascript-6">
import report from './components/report.vue' import * as dayjs from 'dayjs'
import repair from './components/repair.vue' import WatchData from './components/watch/index.vue'
import material from './components/material.vue' import CheckData from './components/check/index.vue'
import util from '@/util/util' import CheckClaims from './components/checkClaims/index.vue'
import qrCode from '@/components/qr-code'
import glsxCombiForm from '@/components/glsx-combi-form'
// import util from "@/util"
export default { export default {
name: 'order', name: 'ghOrder',
components: { components: {
report, WatchData,
repair, CheckData,
material CheckClaims,
qrCode,
glsxCombiForm
}, },
data() { data() {
return { return {
permitDraft: false, routeInfo: {},
routeInfo: null, pageType: 1,
isGH: false, watchData: [], // 查看状态下
editForm: { accountList: [],
contractNo: '', repotData: {
reportDate: '', writeOffCode: '',
reimbursementDate: '',
reimbursementAddress: '',
reporterName: '', reporterName: '',
reporterPhone: '', reporterPhone: '',
writeOffCode: '', reportDate: '',
reimbursementDate: '',
reimbursementAddr: '', reimbursementAddr: '',
reimbursementProvinceCode: '', handlerName: '',
reimbursementCityCode: '', handlerPhone: '',
reimbursementCountiesCode: '' serviceCodes: []
}, },
pageType: 1, activeName: 'first',
accountForm: { accountForm: {
objectType: 0, objectType: 0,
accountType: 0, accountType: 0,
...@@ -60,255 +100,768 @@ export default { ...@@ -60,255 +100,768 @@ export default {
handlerName: '', handlerName: '',
handlerPhone: '' handlerPhone: ''
}, },
saveObj: {}, // 弹窗
materialForm: { showNoPassDialog: false,
idCard: [], showPassedDialog: false,
idCardBack: [], noPassObj: {
billInfo: [], reason: '',
otherInfo: [] desc: ''
}, },
serviceItemsList: [] noPassForm: [
{
label: '原因',
name: 'reason',
type: 'select',
isClear: true,
optionList: [
{
confId: 1,
confName: '拒赔'
},
{
confId: 2,
confName: '资料不清晰'
}
],
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '具体描述:',
name: 'desc',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true,
maxlength: 200
}
],
testServiceList: [],
insuranceAttachmentConfigs: [],
itemList: [],
otherInfoData: {},
claimsAttachmentConfigs: [],
lossTypeList: []
} }
}, },
created() { mounted() {
this.initSaveObj() // 获取页面传参:主要是编辑状态和订单状态
// 5 审核+定损 审核+核赔
const urlParam = this.$route.params const urlParam = this.$route.params
const urlQuery = JSON.parse(decodeURIComponent(urlParam.id)) const urlQuery = JSON.parse(decodeURIComponent(urlParam.id))
this.pageType = urlQuery.editNo this.pageType = urlQuery.editNo
this.routeInfo = urlQuery this.routeInfo = urlQuery
this.handleFormInfo(urlQuery.contractNo, urlQuery.isGH) if (this.routeInfo.writeOffCode) {
// if(!this.isGH){ this.getDetailData(this.routeInfo.writeOffCode)
// }
if (this.routeInfo.orderId) {
this.getDetailById()
} }
}, },
computed: {
totalPrice() {
let total = this.serviceItemsList.reduce(function(prev, cur) {
return prev + (+(cur.approveAmount * 100).toFixed(0))
}, 0)
return total / 100
}
},
mounted() {},
methods: { methods: {
changeObjectType(newVal) { // 获取订单详情
if (newVal === 1) { getDetailData(writeOffCode) {
this.saveObj.objectType = newVal this.$apis.claims.getGHClaimsDetailApi({ writeOffCode }).then(res => {
delete this.saveObj.handlerName if (!res.supplementList1?.length) {
delete this.saveObj.handlerPhone res.supplementList1 = []
this.accountForm = { ...this.accountForm, ...this.saveObj } res.supplementList1.push({ content: '', claimsId: res.id })
} else {
this.saveObj = { ...this.accountForm }
this.getAccountInfo(this.editForm.contractNo)
}
},
initSaveObj() {
this.saveObj = { ...this.accountForm }
},
//详情
getDetailById() {
this.$apis.claims.getClaimsDetail({ id: this.routeInfo.orderId }).then(res => {
// 以下是report数据
for (let key in this.editForm) {
this.editForm[key] = res[key]
} }
this.editForm.reportDate = res.reporterDate if (!res.supplementList2?.length) {
this.editForm.reimbursementAddress = [] res.supplementList2 = []
const { reimbursementCityCode, reimbursementCountiesCode, reimbursementProvinceCode, serviceItemsList } = res res.supplementList2.push({ content: '', claimsId: res.id })
this.editForm.reimbursementAddress.push(reimbursementProvinceCode, reimbursementCityCode, reimbursementCountiesCode)
// 以下是repair数据
for (let key in this.accountForm) {
this.accountForm[key] = res[key]
} }
if (this.accountForm.accountType !== 1) { this.orderMsg = {
this.accountForm.accountType = 0 id: res.id,
this.accountForm.objectType = 0 status: res.status
} }
if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0 this.repotData = {
this.serviceItemsList = serviceItemsList id: res.id,
// 以下是文件数据 status: res.status,
res.files.forEach(item => { writeOffCode: res.writeOffCode,
let obj = { url: item.fileUrl, fileType: item.fileType, name: item.fileName, progress: 100 } reporterName: res.reporterName,
if (item.fileCode == '1') { reporterPhone: res.reporterPhone,
if (item.fileName.indexOf('&front&_') === 0) { reportDate: dayjs(res.reportDate).format('YYYY-MM-DD HH:mm:ss'),
this.materialForm.idCard.push(obj) reimbursementDate: dayjs(res.reimbursementDate).format('YYYY-MM-DD HH:mm:ss'),
} else { reimbursementAddr: res.reimbursementAddr,
this.materialForm.idCardBack.push(obj) handlerName: res.handlerName,
} handlerPhone: res.handlerPhone,
} else if (item.fileCode == '31') { serviceCodes: [],
this.materialForm.billInfo.push(obj) reimbursementProvinceName: res.reimbursementProvinceName || '',
} else if (item.fileCode == '4') { reimbursementCityName: res.reimbursementCityName || '',
this.materialForm.otherInfo.push(obj) reimbursementCountiesName: res.reimbursementCountiesName || '',
contractNo: res.contractNo,
reimbursementAddress: [res.reimbursementProvinceCode, res.reimbursementCityCode, res.reimbursementCountiesCode],
reimbursementProvinceCode: res.reimbursementProvinceCode,
reimbursementCityCode: res.reimbursementCityCode,
reimbursementCountiesCode: res.reimbursementCountiesCode,
reimbursementProcess: res.reimbursementProcess,
approveAmount: res.approveAmount ? (res.approveAmount / 100).toFixed(2) : res.approveAmount,
applyAmount: res.applyAmount ? (res.applyAmount / 100).toFixed(2) : res.applyAmount,
supplementList1: res.supplementList1,
supplementList2: res.supplementList2,
bankAccountDTO: res.bankAccountDTO,
attachments1: res.attachments1,
attachments2: res.attachments2,
attachments3: res.attachments3,
claimsAttachmentConfigs2: res.claimsAttachmentConfigs2
}
// 图片list
res.insuranceAttachmentConfigs.map(item => {
let arr = []
let services = []
if (item.firstClassifyName.indexOf('其他') != -1) {
item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => {
arr.push(ele)
})
})
item.allImages = arr
}
if (item.firstClassifyName.indexOf('定损细节照片') != -1) {
item.secondClassifyList.forEach(el => {
if (el.secondClassifyName.indexOf('钥匙') != -1 && el.serviceItemCode == 'SC0006') {
el.lossType = '3'
} else if (el.secondClassifyName.indexOf('车牌') != -1 && el.serviceItemCode == 'SC0006') {
el.lossType = '4'
}
services.push(el.serviceItemName)
})
item.services = [...new Set(services)]
}
})
res.claimsAttachmentConfigs.map(item => {
let arr = []
let services = []
if (item.firstClassifyName.indexOf('其他') != -1) {
item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => {
arr.push(ele)
})
})
item.allImages = arr
}
if (item.firstClassifyName.indexOf('核赔细节照') != -1) {
item.secondClassifyList.forEach(el => {
if (el.secondClassifyName.indexOf('钥匙') != -1 && el.serviceItemCode == 'SC0006') {
el.lossType = '3'
} else if (el.secondClassifyName.indexOf('车牌') != -1 && el.serviceItemCode == 'SC0006') {
el.lossType = '4'
}
services.push(el.serviceItemName)
})
item.services = [...new Set(services)]
}
// else {
// item.secondClassifyList.forEach(el => {
// if (!el.attachmentList.length) {
// el.attachmentList.forEach(ele => {
// ;(ele.auditStatus = null), (ele.attachmentFile = '')
// ele.reasonForFailure = ''
// })
// }
// })
// }
})
this.insuranceAttachmentConfigs = res.insuranceAttachmentConfigs
this.claimsAttachmentConfigs = res.claimsAttachmentConfigs
// 服务list
res.itemsList.map(item => {
item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount
item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : item.approveAmount
item.lossTypeList = []
if (item.serviceItemCode == 'SC0006' && item.lossType) {
item.lossTypeList = item.lossType.split(',')
this.lossTypeList = item.lossTypeList
} }
this.$set(item, 'checked', true)
}) })
this.itemList = res.itemsList
this.handlerWatch(this.repotData, 1)
this.handlerWatch(res.bankAccountDTO, 2)
// this.getAccountInfo(res.contractNo)
this.getOtherInfo(res.contractNo)
if (res.bankAccountDTO) {
this.accountForm = res.bankAccountDTO
}
}) })
}, },
// 新增的时候,输入合同号,带出信息 // 处理查看状态下数据展示
toSearchOrderDetail() { handlerWatch(obj, type) {
let param = {} if (type == 1) {
param.contractNo = this.editForm.contractNo this.watchData = [
let targetAPI = this.$apis.claims.checkContractNo {
if (this.routeInfo.isGH) { name: '报案人:',
param.writeOffCode = this.editForm.writeOffCode value: obj.reporterName
targetAPI = this.$apis.claims.getDetailByWOCode },
{
name: '报案人电话:',
value: obj.reporterPhone
},
{
name: '报案日期:',
value: obj.reportDate
},
{
name: '出险日期:',
value: obj.reimbursementDate
},
{
name: '出险地点:',
value: obj.reimbursementProvinceName + obj.reimbursementCityName + obj.reimbursementCountiesName + obj.reimbursementAddr
}
]
} else if (type == 2) {
if (!obj) return
this.accountList = [
{
name: '开户行名称:',
value: obj.openBankName
},
{
name: '账户名称:',
value: obj.accountName
},
{
name: '收款账号:',
value: obj.accountNo
},
{
name: '收款账号所在省市:',
value: obj.accountCityName
},
{
name: '收款人证件类型:',
value: obj.cardTypeName
},
{
name: '收款人证件号码:',
value: obj.cardNo
},
{
name: '收款人联系电话:',
value: obj.phone
}
]
} }
targetAPI(param).then(res => {
this.permitDraft = true
const { serviceItemsList, contractNo } = res
for (let key in this.editForm) {
this.editForm[key] = res[key] || this.editForm[key]
}
this.serviceItemsList = serviceItemsList
this.getAccountInfo(contractNo)
})
}, },
// 点击同步,获取收款人信息 changeObjectType(newVal) {
getAccountInfo(contractNo) { // if (newVal === 1) {
if (!contractNo) return // this.saveObj.objectType = newVal
this.$apis.claims.getAccountInfo({ contractNo }).then(res => { // delete this.saveObj.handlerName
const { accountName, accountCityCode: bankCity, openBankCode: branchBankCode, accountNo, accountType, cardNo: payeeIDCardNo, cardTypeCode: payeeIDCardType, phone: payeePhone } = res || {} // delete this.saveObj.handlerPhone
const result = { accountName, bankCity, branchBankCode, accountNo, accountType, payeeIDCardNo, payeeIDCardType, payeePhone } // this.accountForm = { ...this.accountForm, ...this.saveObj }
// for (let key in this.accountForm) { // } else {
// this.accountForm[key] = result[key] || this.accountForm[key] // this.saveObj = { ...this.accountForm }
// } // this.getAccountInfo(this.editForm.contractNo)
this.accountForm = { ...this.accountForm, ...result } // }
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0 },
if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0 // submitForm(val) {
// // val == 1 通过 ,2 不通过
// this.cancelDialog(val)
// },
// cancelDialog(val) {
// // val == 1 通过 ,2 不通过
// if (val == 1) {
// this.showPassedDialog = false
// } else {
// this.showNoPassDialog = false
// }
// },
// 获取其他信息
getOtherInfo(contractNo) {
this.$apis.claims.getOrderOherInfo({ contractNo }).then(res => {
if (res) {
res.expirationDate = res.expirationDate ? res.effectiveDate + ' 至 ' + dayjs(res.expirationDate).format('YYYY-MM-DD HH:mm:ss') : '2019-12-12 23:59:59'
res.billingDate = res.billingDate && dayjs(res.billingDate).format('YYYY-MM-DD HH:mm:ss')
res.invoicePrice = res.invoicePrice / 100
this.otherInfoData = { ...res, contractNo }
}
}) })
}, },
// 根据页面跳转参数处理表单信息-自动填入 // 通过订单
// 步骤流程:拿到核销码/合同号后==》请求接口获取该合同号/核销码下对应的套餐,下发数据到维修信息模块,上传资料模块,报案信息模块 toPassOrder() {
handleFormInfo(contractNo, isGH) { if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
if (isGH) { const isPass = this.verifyImages(this.claimsAttachmentConfigs)
this.editForm.writeOffCode = contractNo if (!isPass) {
this.$message({
message: '图片需要全部通过才允许此操作',
type: 'error'
})
return
}
this.hepeiPass()
return
} }
this.editForm.contractNo = contractNo const isPass = this.verifyImages(this.insuranceAttachmentConfigs)
if (!isPass) {
this.$message({
message: '图片需要全部通过才允许此操作',
type: 'error'
})
return
}
this.showPassedDialog = true
}, },
// 提交的时候校验,滴加不校验经办人信息 // 校验图片是否已全部校验
validAccountInfo() { verifyImages(arr) {
let valid = false let pass = true
this.$refs.repairRef.$refs.accountRef.$refs.formRef.validate(aValid => { arr.forEach(item => {
this.$refs.reportRef.$refs.editFormRefReport.$refs.formRef.validate(eValid => { if (item.firstClassifyName.indexOf('其他') == -1) {
if (aValid && eValid) { item.secondClassifyList.forEach(child => {
valid = true child.attachmentList.forEach(last => {
} if (!last.auditStatus) {
if (this.routeInfo.isGH) { pass = false
this.$refs.repairRef.$refs.handlerRef.$refs.formRef.validate(hValid => { }
valid = hValid
}) })
} })
} else {
item.allImages.forEach(child => {
if (!child.auditStatus) {
pass = false
}
})
}
})
return pass
},
handleJieGpu(type, isNopass = true) {
let target = {}
let arr = []
if (type == 3) {
this.repotData.attachments3.forEach(el => {
let { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy } = el
let obj = { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy }
arr.push(obj)
}) })
return arr
}
if (type == 2) {
this.repotData.attachments2.forEach(el => {
let { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy } = el
let obj = { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy }
arr.push(obj)
})
return arr
}
if (type == 4) {
let { id, merchantId, cardTypeName, objectType, accountType, openBankCode, accountName, accountNo, accountCityCode, cardTypeCode, phone, cardNo } = this.accountForm
target = { id, merchantId, cardTypeName, objectType, accountType, openBankCode, accountName, accountNo, accountCityCode, cardTypeCode, phone, cardNo }
return target
}
},
hepeiPass(isNopass) {
let obj = this.handlerServices()
let exobj = this.handlerExplain()
let imgObj = this.hanlerImg()
let para = {
...this.orderMsg,
attachments3: this.handleJieGpu(3),
attachments2: this.handleJieGpu(2),
...obj,
...exobj,
...imgObj,
bankAccount: this.handleJieGpu(4),
auditStatus: 1,
reasonForFailure: '',
writeOffCode: this.repotData.writeOffCode
}
if (isNopass) {
para.auditStatus = 0
para.reasonForFailureCode = this.noPassObj.reason
para.reasonForFailure = this.noPassObj.desc
}
let loading = this.createLoading()
this.$apis.claims.checkClaimsOrderApi(para).then(res => {
loading.close()
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/claims/ghIndex' })
}
}) })
if (!valid) return valid },
let requirePrice = true comfirmPass() {
this.serviceItemsList.forEach(item => { let para = this.handleParams()
if (item.approveAmount > 0) { para.auditStatus = 1
requirePrice = false let loading = this.createLoading()
this.$apis.claims.checkOrderApi(para).then(res => {
loading.close()
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/claims/ghIndex' })
} }
this.canclePass()
}) })
if (requirePrice) { },
this.$message.error('至少输入一项服务的定损批准金额') canclePass() {
return false this.showPassedDialog = false
},
// 不通过
toNoPassOrder() {
this.showNoPassDialog = true
},
// 点击不通过
comfirmNoPass() {
if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
this.hepeiPass(true)
return
} }
let para = this.handleParams()
let fileTip = false para.auditStatus = 0
for (let key in this.materialForm) { para.reasonForFailureCode = this.noPassObj.reason
if (this.materialForm[key].length < 1 && !fileTip) { para.reasonForFailure = this.noPassObj.desc
fileTip = true let loading = this.createLoading()
this.$apis.claims.checkOrderApi(para).then(res => {
loading.close()
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/claims/ghIndex' })
} }
this.cancleNoPass()
})
},
cancleNoPass() {
this.showNoPassDialog = false
},
// 处理定损提交参数
handleParams() {
let itemsObj = this.handlerServices()
let imageObj = this.hanlerImg()
let explainObj = {}
if (this.orderMsg.status != 12) {
explainObj = this.handlerExplain()
} }
if (fileTip) { let para = {
this.$message.error(`请补全资料`) ...explainObj,
return false ...imageObj,
...itemsObj,
...this.orderMsg,
writeOffCode: this.repotData.writeOffCode,
contractNo: this.repotData.contractNo,
reporterName: this.repotData.reporterName,
reporterPhone: this.repotData.reporterPhone,
reportDate: this.repotData.reportDate ? dayjs(this.repotData.reportDate).format('YYYY-MM-DD HH:mm:ss') : '',
reimbursementDate: this.repotData.reimbursementDate ? dayjs(this.repotData.reimbursementDate).format('YYYY-MM-DD HH:mm:ss') : '',
handlerName: this.repotData.handlerName,
handlerPhone: this.repotData.handlerPhone,
reimbursementCountiesCode: this.repotData.reimbursementCountiesCode,
reimbursementCityCode: this.repotData.reimbursementCityCode,
reimbursementProvinceCode: this.repotData.reimbursementProvinceCode,
reimbursementAddr: this.repotData.reimbursementAddr,
reimbursementProcess: this.repotData.reimbursementProcess,
applyAmount: this.repotData.applyAmount ? Number(this.repotData.applyAmount) * 100 : 0,
signatureAuth: this.repotData.signatureAuth || ''
} }
return valid
return para
}, },
// 提交核赔 // 案件补充说明
confirmSubmit(type) { handlerExplain() {
if (type == 1 && !this.validAccountInfo()) { let obj = {}
return false if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
} this.repotData.supplementList2.forEach((item, index) => {
let isUpload = false let idx = `supplementList2[${index}].id`
for (let key in this.materialForm) { let claimsId = `supplementList2[${index}].claimsId`
this.materialForm[key].forEach(item => { let content = `supplementList2[${index}].content`
if (!item.url) isUpload = true let suppType = `supplementList2[${index}].suppType`
let temp = {
[idx]: item.id,
[claimsId]: this.orderMsg.id,
[content]: item.content,
[suppType]: item.suppType
}
Object.assign(obj, temp)
})
} else {
this.repotData.supplementList1.forEach((item, index) => {
let idx = `supplementList1[${index}].id`
let claimsId = `supplementList1[${index}].claimsId`
let content = `supplementList1[${index}].content`
let suppType = `supplementList1[${index}].suppType`
let temp = {
[idx]: item.id,
[claimsId]: this.orderMsg.id,
[content]: item.content,
[suppType]: item.suppType
}
Object.assign(obj, temp)
}) })
} }
if (isUpload) {
this.$message.error(`文件正在上传,请稍后再${type == 1 ? '提交' : '保存草稿'}`) return obj
return false },
// 图片数据处理
hanlerImg() {
let imgs = []
let serviceImgs = []
if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
this.claimsAttachmentConfigs.forEach((item, index) => {
if (item.firstClassifyName.indexOf('其他') != -1) {
item.secondClassifyList.forEach(el => {
el.attachmentList = item.allImages
el.attachmentList.forEach(ele => {
ele.attachmentCode = el.attachmentCode
ele.secondClassifyName = el.secondClassifyName
imgs.push(ele)
})
})
} else {
item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => {
ele.secondClassifyName = el.secondClassifyName
imgs.push(ele)
})
})
}
})
} else {
this.insuranceAttachmentConfigs.forEach((item, index) => {
if (item.firstClassifyName.indexOf('其他') != -1) {
item.secondClassifyList.forEach(el => {
el.attachmentList = item.allImages
el.attachmentList.forEach(ele => {
ele.secondClassifyName = el.secondClassifyName
imgs.push(ele)
})
})
} else {
item.secondClassifyList.forEach(el => {
if (el.serviceItemName == '钥匙及车牌重置服务' && this.lossTypeList.includes(el.lossType)) {
el.attachmentList.forEach(ele => {
ele.secondClassifyName = el.secondClassifyName
serviceImgs.push(ele)
})
} else {
el.attachmentList.forEach(ele => {
ele.secondClassifyName = el.secondClassifyName
imgs.push(ele)
})
}
})
}
})
} }
if (!this.routeInfo.orderId && type == 2 && !this.permitDraft) { if (serviceImgs.length) {
this.$message.error('请同步信息之后再保存草稿') imgs = [...serviceImgs, ...imgs]
return
} }
const params = { ...this.editForm, ...this.accountForm } let obj = {}
if (params.accountType !== 1) { let type = this.orderMsg.status == 12 || this.orderMsg.status == 2 ? 2 : 1
params.accountType = 0 imgs.forEach((item, index) => {
let idx = `attachments${type}[${index}].id`
let claimsId = `attachments${type}[${index}].claimsId`
let secondClassifyName = `attachments${type}[${index}].secondClassifyName`
let attachmentCode = `attachments${type}[${index}].attachmentCode`
let attachmentFile = `attachments${type}[${index}].attachmentFile`
let attachmentType = `attachments${type}[${index}].attachmentType`
let attachmentName = `attachments${type}[${index}].attachmentName`
let auditStatus = `attachments${type}[${index}].auditStatus`
let reasonForFailure = `attachments${type}[${index}].reasonForFailure`
let auditBy = `attachments${type}[${index}].auditBy`
let classifyId = `attachments${type}[${index}].classifyId`
let temp = {
[idx]: item.id,
[claimsId]: this.orderMsg.id,
[secondClassifyName]: item.secondClassifyName,
[attachmentCode]: item.attachmentCode,
[attachmentFile]: item.attachmentFile,
[attachmentType]: item.attachmentType,
[attachmentName]: item.attachmentName,
[auditStatus]: item.auditStatus,
[reasonForFailure]: item.reasonForFailure,
[auditBy]: item.auditBy,
[classifyId]: item.classifyId
}
Object.assign(obj, temp)
})
return obj
},
// 获取车牌钥匙选择类型
getLossType(e) {
this.lossTypeList = e
},
// 服务项目数据处理
handlerServices() {
let itemObj = {}
this.itemList.forEach((item, index) => {
let idx = `itemsList[${index}].id`
let serviceItemCode = `itemsList[${index}].serviceItemCode`
let serviceItemName = `itemsList[${index}].serviceItemName`
let writeOffCode = `itemsList[${index}].writeOffCode`
let contractNo = `itemsList[${index}].contractNo`
let approveAmount = `itemsList[${index}].approveAmount`
let applyAmount = `itemsList[${index}].applyAmount`
let claimsId = `itemsList[${index}].claimsId`
let lossType = `itemsList[${index}].lossType`
let temp = {
[idx]: item.id,
[serviceItemCode]: item.serviceItemCode,
[serviceItemName]: item.serviceItemName,
[writeOffCode]: this.repotData.writeOffCode,
[contractNo]: this.repotData.contractNo,
[approveAmount]: item.approveAmount ? parseInt(Number(item.approveAmount) * 100) : 0,
[applyAmount]: item.applyAmount ? parseInt(Number(item.applyAmount) * 100) : 0,
[claimsId]: this.orderMsg.id,
[lossType]: item.serviceItemCode == 'SC0006' ? item.lossTypeList.join(',') : item.lossType
}
Object.assign(itemObj, temp)
})
return itemObj
},
// 保存草稿参数
savePara() {
const operation = 0
let itemObj = this.handlerServices()
let imgObj = this.hanlerImg()
let explainObj = this.handlerExplain()
let para = {
...itemObj,
...imgObj,
...explainObj,
operation,
...this.orderMsg,
writeOffCode: this.repotData.writeOffCode,
contractNo: this.repotData.contractNo,
reporterName: this.repotData.reporterName,
reporterPhone: this.repotData.reporterPhone,
reportDate: this.repotData.reportDate ? dayjs(this.repotData.reportDate).format('YYYY-MM-DD HH:mm:ss') : '',
reimbursementDate: this.repotData.reimbursementDate ? dayjs(this.repotData.reimbursementDate).format('YYYY-MM-DD HH:mm:ss') : '',
handlerName: this.repotData.handlerName,
handlerPhone: this.repotData.handlerPhone,
reimbursementCountiesCode: this.repotData.reimbursementCountiesCode,
reimbursementCityCode: this.repotData.reimbursementCityCode,
reimbursementProvinceCode: this.repotData.reimbursementProvinceCode,
reimbursementAddr: this.repotData.reimbursementAddr,
reimbursementProcess: this.repotData.reimbursementProcess,
applyAmount: this.repotData.applyAmount ? parseInt(Number(this.repotData.applyAmount) * 100) : 0
} }
params.operation = type
params.reimbursementDate = params.reimbursementDate ? util.dateFormat(params.reimbursementDate, 'YYYY-MM-DD HH:mm:ss') : '' let claims = {
params.reportDate = params.reportDate ? util.dateFormat(params.reportDate, 'YYYY-MM-DD HH:mm:ss') : '' operation,
if (params.reimbursementAddress.length == 3) { ...itemObj,
params.reimbursementProvinceCode = params.reimbursementAddress[0] ...explainObj,
params.reimbursementCityCode = params.reimbursementAddress[1] ...this.orderMsg,
params.reimbursementCountiesCode = params.reimbursementAddress[2] attachments3: this.handleJieGpu(3),
// attachments2: this.handleJieGpu(2),
bankAccount: this.handleJieGpu(4),
writeOffCode: this.repotData.writeOffCode,
...imgObj
} }
params.approveAmounts = '' return this.orderMsg.status == 12 || this.orderMsg.status == 2 ? claims : para
let tagetObj = {} },
this.serviceItemsList.forEach(item => { // 保存订单
tagetObj[item.serviceItemCode] = item.approveAmount toSaveOrder() {
}) let para = this.savePara()
params.approveAmounts = JSON.stringify(tagetObj) const name = this.orderMsg.status == 12 || this.orderMsg.status == 2 ? 'saveClaimsCG' : 'saveCG'
delete params.reimbursementAddress let loading = this.createLoading()
params.fileList = [] this.$apis.claims[name](para).then(res => {
for (let key in this.materialForm) { loading.close()
this.materialForm[key].forEach((item, index) => { this.$message({
const obj = {} message: '保存成功',
obj.fileType = item.fileType type: 'success'
obj.fileUrl = item.url
obj.fileCode = key == 'idCard' || key == 'idCardBack' ? 1 : key == 'billInfo' ? 31 : 4
obj.fileName = item.name
params.fileList.push(obj)
}) })
this.toBackList()
})
},
// 返回上一页
toBackList() {
this.$router.push({ path: '/claims/ghIndex' })
},
// 输入校验
validPrice(e, id, type) {
let checkPlan = '' + this.itemList[id][type]
checkPlan = checkPlan
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace(/^\./g, '')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
if (checkPlan.indexOf('.') < 0 && checkPlan !== '') {
checkPlan = parseFloat(checkPlan) + ''
} else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
} }
if (this.routeInfo.orderId) { this.$set(this.itemList[id], type, checkPlan)
params.id = this.routeInfo.orderId },
changePrice(e, id, type) {
if (!e.target.value) return
const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') {
this.$set(this.itemList[id], type, e.target.value.substr(0, len - 1))
}
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], type, 1)
} }
const maxPrice = 200000
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], type, maxPrice)
}
},
createLoading() {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'loading...',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)' background: 'rgba(0, 0, 0, 0.5)',
customClass: 'loadingClass'
}) })
this.$apis.claims.commitClaimsOrder(params).then(res => { return loading
loading.close()
if (res) {
this.$message({
message: type == 1 ? '提交成功' : '保存草稿成功',
type: 'success'
})
this.handleCancel()
}
})
},
handleCancel() {
this.$router.push({ path: '/claims/ghIndex' })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.footer { .passed-wrap {
width: 100%; font-family: PingFangSC-Regular, PingFang SC;
position: fixed; color: #333333;
bottom: 0; .passed-item {
height: 64px; margin-bottom: 20px;
left: 0; &:last-child {
text-align: center; margin-bottom: 0;
line-height: 64px; }
background: #ffffff; .name {
font-size: 14px;
}
.set-price {
background: #f9f9f9;
padding: 20px;
list-style: none;
margin-top: 10px;
li {
margin-bottom: 20px;
display: flex;
align-items: center;
&:last-child {
margin-bottom: 0;
}
label {
width: 154px;
display: inline-block;
text-align: right;
}
}
.el-input {
width: 284px;
margin-right: 60px;
}
}
}
}
.btn-box {
display: flex;
justify-content: center;
align-items: center;
margin: 16px 0 20px 0;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<div id="writeOff" class="writeOff">
<div v-if="false">
<template v-if="routeInfo.status != 12 && routeInfo.status != 14">
<!-- 非新建核赔订单详情 -->
<Card title="报案信息(客户提交)" class="custom-info">
<div class="code">
<span>核销码:</span>
<span>{{ customObj.writeOffCode }}</span>
</div>
<glsx-combi-form ref="customRef" :formRules="customRule" labelWidth="154px" defaultWidth="350px" :formObj="customObj" :formData="customForm"></glsx-combi-form>
</Card>
<!-- 定损店面补充 -->
<Card title="报案信息(店面补充)" class="handler-info gl-form-page">
<glsx-combi-form ref="handlerRef" :isInline="false" :formRules="customRule" labelWidth="154px" defaultWidth="432px" :formObj="customObj" :formData="handlerForm">
<div slot="approveAmountSlot" slot-scope="scope" class="amount-wrap">
<div v-for="(item, index) in scope.scope.optionList" :key="index">
<el-checkbox v-model="item.checked">{{ item.serviceItemName }}</el-checkbox>
<div class="unit-price">
<label class="required" for="">预计损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</div>
</div>
<div class="lump-sum">
<span>合计</span>
<span>
预估损失金额
<span class="sign">¥&nbsp;</span>
<span class="price">{{ totalPrice.toFixed(2) }}</span>
元
</span>
</div>
</div>
</glsx-combi-form>
</Card>
<!-- 上传图片 -->
<upload-material></upload-material>
<!-- 案件补充说明 -->
<explanation :obj="explanationObj"></explanation>
<!-- 其他信息 -->
<other-info></other-info>
<div class="btn-box">
<el-button plain class="btn-three" @click="handleCancel">取消</el-button>
<el-button plain class="btn-three" @click="handleCancel">保存</el-button>
<el-button plain @click="handleVerify(2)">不通过</el-button>
<el-button type="primary" @click="handleVerify(1)">通过</el-button>
</div>
</template>
<!-- 定损后到待核赔 -->
<template v-else>
<div class="tab_wrap">
<el-tabs v-model="activeName" @tab-click="changeTab">
<el-tab-pane class="bg" label="核赔信息" name="first">
<div class="widget">
<div class="title">维修信息</div>
<div class="content">
<div class="element_wrap">
<div class="label">批准金额:</div>
<div class="pannel">
<template v-for="index in 1">
<div :key="index" class="wrapper">
<div class="name">权益套餐A</div>
<div class="messag flex_scb">
<div class="ms">
<span>预估损失金额/元:</span>
<span class="price">888</span>
</div>
<div class="ms">
<span>定损批准金额:</span>
<span class="price">6666</span>
</div>
</div>
</div>
</template>
<div class="total flex_scb">
<span>合计</span>
<span>
<span>预估损失金额:2160元</span>
<span style="margin: 0 10px">|</span>
<span>定损批准金额:1800元</span>
</span>
</div>
</div>
</div>
<div class="element_wrap martop21">
<div class="label">收款对象:</div>
<div class="pannel">
<div class="wrapper">
<div class="name">
<el-radio value="1" label="1">店面</el-radio>
</div>
<div class="pannel_box">
<template v-for="index in 9">
<div :key="index" class="line flex_sc">
<div class="lab">
<span style="color: #eb4e4e">*</span>
<span>开户行名称:</span>
</div>
<div class="tip">招商银行泰阳支行</div>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane class="bg" label="定损信息" name="second">定损信息</el-tab-pane>
</el-tabs>
</div>
</template>
</div>
<template v-if="routeInfo.status != 12 && routeInfo.status != 14">
<div class="order_container">
<div class="report">
<report ref="reportRef" :isGH="true" :pageType="3" :editForm.sync="editForm"></report>
</div>
<div class="report store">
<Card title="报案信息(店面补充)" class="handler-info gl-form-page">
<glsx-combi-form ref="handlerRef" :isInline="false" :formRules="customRule" labelWidth="154px" defaultWidth="432px" :formObj="customObj" :formData="handlerForm">
<div slot="approveAmountSlot" slot-scope="scope" class="amount-wrap">
<div v-for="(item, index) in scope.scope.optionList" :key="index">
<el-checkbox v-model="item.checked">{{ item.serviceItemName }}</el-checkbox>
<div class="unit-price">
<label class="required" for="">预计损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</div>
</div>
<div class="lump-sum">
<span>合计</span>
<span>
预估损失金额
<span class="sign">¥&nbsp;</span>
<span class="price">{{ totalPrice.toFixed(2) }}</span>
元
</span>
</div>
</div>
</glsx-combi-form>
</Card>
</div>
<div class="upload">
<upload-material></upload-material>
</div>
<div class="buchong">
<explanation :obj="explanationObj"></explanation>
</div>
<div class="other">
<other-info></other-info>
</div>
</div>
</template>
<!-- tab切换 -->
<template v-else>
<div class="tab_wrap">
<el-tabs v-model="activeName" @tab-click="changeTab">
<el-tab-pane class="bg" label="核赔信息" name="first">
<repair ref="repairRef" :needStore="false" @changeObjectType="changeObjectType" :isGH="true" :pageType="3" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
</el-tab-pane>
<el-tab-pane class="bg" label="定损信息" name="second">定损信息</el-tab-pane>
</el-tabs>
</div>
</template>
<!-- 底部按钮 -->
<div class="btn-box">
<el-button plain class="btn-three" @click="handleCancel">取消</el-button>
<el-button plain class="btn-three" @click="handleCancel">保存</el-button>
<el-button plain @click="handleVerify(2)">不通过</el-button>
<el-button type="primary" @click="handleVerify(1)">通过</el-button>
</div>
<GLDialog class="gl-form-page gl-form-min" title="审核不通过" mode="mid" v-if="showNoPassDialog" :visible.sync="showNoPassDialog" @onOk="submitForm(2)" @onCancel="cancelDialog(2)">
<glsx-combi-form ref="noPassRef" :isInline="false" :formRules="noPassRule" labelWidth="154px" defaultWidth="284px" :formObj="noPassObj" :formData="noPassForm"></glsx-combi-form>
</GLDialog>
<GLDialog class="gl-form-page gl-form-min" title="审核通过,请输入批准金额" mode="mid" v-if="showPassedDialog" :visible.sync="showPassedDialog" @onOk="submitForm(1)" @onCancel="cancelDialog(1)">
<div class="passed-wrap">
<div class="passed-item" v-for="(item, index) in testServiceList" :key="index">
<span class="name">{{ item.serviceItemName }}</span>
<div class="set-price">
<li>
<label for="">预计损失金额/元:</label>
<el-input size="small" maxlength="10" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</li>
<li>
<label for="">定损批准金额/元:</label>
<el-input size="small" maxlength="10" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</li>
</div>
</div>
</div>
</GLDialog>
<qrCode :bottom="320" phone="400 6123 886" phoneTitle="定损及核赔服务咨询" :codeUrl="qrcodUrl"></qrCode>
</div>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
import qrCode from '@/components/qr-code'
import uploadMaterial from './components/uploadMaterial'
import otherInfo from './components/otherInfo.vue'
import explanation from './components/explanation'
import Card from './components/card.vue'
import report from './components/report.vue'
import repair from './components/repair.vue'
import util from '@/util/util'
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}$/
const testServiceList = [
{
serviceItemCode: 'SC0002',
serviceItemName: '车辆置换补偿服务',
approveAmount: null,
checked: false
},
{
serviceItemCode: 'SC0005',
serviceItemName: '轮胎更换补偿服务',
approveAmount: null,
checked: false
},
{
serviceItemCode: 'SC0006',
serviceItemName: '钥匙及车牌重置服务',
approveAmount: null,
checked: false
},
{
serviceItemCode: 'SC0007',
serviceItemName: '玻璃太阳膜更换补偿服务',
approveAmount: null,
checked: false
},
{
serviceItemCode: 'SC0009',
serviceItemName: '车辆补漆补偿服务',
approveAmount: null,
checked: false
},
{
serviceItemCode: 'SC0011',
serviceItemName: '代步车费用补偿服务',
approveAmount: null,
checked: false
}
]
export default {
name: 'addwriteOff',
components: {
glsxCombiForm,
qrCode,
uploadMaterial,
otherInfo,
explanation,
Card,
report,
repair
},
data() {
return {
// 报案
editForm: {
contractNo: '',
reportDate: '',
reimbursementDate: '',
reimbursementAddress: '',
reporterName: '',
reporterPhone: '',
writeOffCode: '',
reimbursementAddr: '',
reimbursementProvinceCode: '',
reimbursementCityCode: '',
reimbursementCountiesCode: ''
},
// 维修
accountForm: {
objectType: 0,
accountType: 0,
branchBankCode: '',
accountName: '',
accountNo: '',
bankCity: '',
payeeIDCardType: '',
payeeIDCardNo: '',
payeePhone: '',
handlerName: '',
handlerPhone: ''
},
tabs: ['核赔信息', '定损信息'],
activeName: 'first',
testServiceList,
showNoPassDialog: false,
showPassedDialog: false,
noPassObj: {
reason: '',
desc: ''
},
noPassForm: [
{
label: '原因:',
name: 'reason',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '具体描述:',
name: 'desc',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true
}
],
customRule: {
reporterName: [{ required: true, message: '请输入报案人', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
description: [{ required: true, message: '请输入出险经过描述', trigger: 'change' }],
reporterDate: [{ required: true, message: '请选择报案日期', trigger: 'change' }],
reimbursementDate: [{ required: true, message: '请选择出险日期', trigger: 'change' }],
reimbursementAddr: [{ required: true, message: '请输入出险地点', 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'
}
]
},
customObj: {
writeOffCode: '',
reporterName: '',
reporterPhone: '',
reporterDate: '',
reimbursementDate: '',
reimbursementAddr: '',
handlerName: '',
handlerPhone: '',
serviceCodes: []
},
customForm: [
{
label: '报案人',
name: 'reporterName',
type: 'showTxt'
},
{
label: '报案人电话',
name: 'reporterPhone',
type: 'showTxt'
},
{
label: '报案日期',
name: 'reporterDate',
type: 'showTxt'
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'showTxt'
},
{
label: '出险地点',
name: 'reimbursementAddr',
type: 'showTxt'
}
],
handlerForm: [
{
label: '经办人',
name: 'handlerName',
type: 'input',
isClear: true
},
{
label: '经办人电话',
name: 'handlerPhone',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '出险经过描述',
name: 'description',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true
},
{
label: '申请核赔服务',
name: 'serviceCodes',
type: 'checkbox',
border: true,
optionList: testServiceList,
addHtml: 'approveAmountSlot'
}
],
explanationObj: {
explanation1: ''
},
routeInfo: {},
serviceItemsList: []
}
},
computed: {
totalPrice() {
const target = this.handlerForm.find(item => item.name == 'serviceCodes')
let total = target.optionList.reduce(function (prev, cur) {
let curPrice = cur.checked ? cur.approveAmount : 0
return prev + +(curPrice * 100).toFixed(0)
}, 0)
return total / 100
}
},
mounted() {
const urlParam = this.$route.params
const urlQuery = JSON.parse(decodeURIComponent(urlParam.id))
// urlQuery.status = 12
this.pageType = urlQuery.editNo
this.routeInfo = urlQuery
if (this.routeInfo.writeOffCode) {
this.getDetailData(this.routeInfo.writeOffCode)
// this.getOrderZLData(this.routeInfo.writeOffCode)
// this.getPhoneData(this.routeInfo.writeOffCode)
}
},
methods: {
changeTab(tab) {},
changeObjectType(newVal) {
if (newVal === 1) {
this.saveObj.objectType = newVal
delete this.saveObj.handlerName
delete this.saveObj.handlerPhone
this.accountForm = { ...this.accountForm, ...this.saveObj }
} else {
this.saveObj = { ...this.accountForm }
this.getAccountInfo(this.editForm.contractNo)
}
},
validPrice(e, id) {
const target = this.handlerForm.find(item => item.name == 'serviceCodes')
let checkPlan = '' + target.optionList[id].approveAmount
checkPlan = checkPlan
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace(/^\./g, '')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
if (checkPlan.indexOf('.') < 0 && checkPlan !== '') {
checkPlan = parseFloat(checkPlan) + ''
} else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
}
this.$set(target.optionList[id], 'approveAmount', checkPlan)
},
changePrice(e, id) {
if (!e.target.value) return
const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') {
this.$set(this.serviceItemsList[id], 'approveAmount', e.target.value.substr(0, len - 1))
}
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.serviceItemsList[id], 'approveAmount', 1)
}
const maxPrice = 2000000
if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceItemsList[id], 'approveAmount', maxPrice)
}
},
handleSave() {
console.log(this.explanationForm, this.explanationObj)
// 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: '/beforeSale/index'
// })
// } 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: '/beforeSale/index'
})
},
handleVerify(val) {
// val == 1 通过 ,2 不通过
if (val == 1) {
this.showPassedDialog = true
} else {
this.showNoPassDialog = true
}
},
submitForm(val) {
// val == 1 通过 ,2 不通过
this.cancelDialog(val)
},
cancelDialog(val) {
// val == 1 通过 ,2 不通过
if (val == 1) {
this.showPassedDialog = false
} else {
this.showNoPassDialog = false
}
},
// 获取订单详情
getDetailData(writeOffCode) {
this.$apis.claims.getGHClaimsDetailApi({ writeOffCode }).then(res => {
this.editForm.reimbursementAddress = []
const { itemsList, contractNo, writeOffCode, reporterName, reporterPhone, reportDate, reimbursementDate, reimbursementAddr, reimbursementCityCode, reimbursementCountiesCode, reimbursementProvinceCode, reimbursementCityName, reimbursementCountiesName, reimbursementProvinceName } = res
this.editForm.reimbursementAddress.push(reimbursementProvinceCode, reimbursementCityCode, reimbursementCountiesCode)
let obj = {
contractNo,
reportDate,
reimbursementDate,
reporterName,
reporterPhone,
writeOffCode,
reimbursementAddr,
reimbursementCityCode,
reimbursementCountiesCode
}
Object.assign(this.editForm, obj)
this.serviceItemsList = itemsList
this.getAccountInfo(contractNo)
})
},
// 点击同步,获取收款人信息
getAccountInfo(contractNo) {
if (!contractNo) return
this.$apis.claims.getAccountInfo({ contractNo }).then(res => {
const { accountName, accountCityCode: bankCity, openBankCode: branchBankCode, accountNo, accountType, cardNo: payeeIDCardNo, cardTypeCode: payeeIDCardType, phone: payeePhone } = res || {}
const result = { accountName, bankCity, branchBankCode, accountNo, accountType, payeeIDCardNo, payeeIDCardType, payeePhone }
this.accountForm = { ...this.accountForm, ...result }
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0
})
}
}
}
</script>
<style lang="scss" scoped>
.writeOff {
/deep/ .el-form-item__label {
padding: 0;
}
.custom-info {
.code {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
line-height: 36px;
width: 100%;
height: 36px;
margin-bottom: 20px;
padding: 0 20px;
background: #f9f9f9;
}
}
.handler-info {
/deep/ #serviceCodes {
display: block;
margin-bottom: 0;
}
}
.amount-wrap {
font-family: PingFangSC-Regular, PingFang SC;
width: fit-content;
color: #333333;
.unit-price {
background: #f9f9f9;
padding: 20px;
display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
.required {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
}
.el-input {
width: 432px;
margin-right: 60px;
}
}
.dialog-unit {
background: #f9f9f9;
padding: 20px;
list-style: none;
margin-bottom: 10px;
li {
margin-bottom: 20px;
display: flex;
align-items: center;
&:last-child {
margin-bottom: 0;
}
label {
width: 154px;
flex-shrink: 0;
display: inline-block;
text-align: right;
}
}
}
.lump-sum {
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
padding: 0 16px;
height: 36px;
display: flex;
justify-content: space-between;
align-items: center;
.sign {
font-size: 16px;
color: #ff6d00;
}
.price {
color: #ff6d00;
font-size: 18px;
}
}
}
.btn-box {
display: flex;
justify-content: center;
align-items: center;
margin: 16px 0 20px 0;
}
}
.passed-wrap {
font-family: PingFangSC-Regular, PingFang SC;
color: #333333;
.passed-item {
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.name {
font-size: 14px;
}
.set-price {
background: #f9f9f9;
padding: 20px;
list-style: none;
margin-top: 10px;
li {
margin-bottom: 20px;
display: flex;
align-items: center;
&:last-child {
margin-bottom: 0;
}
label {
width: 154px;
display: inline-block;
text-align: right;
}
}
.el-input {
width: 284px;
margin-right: 60px;
}
}
}
}
.required::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
// 核赔信息
.order_container {
}
.tab_wrap {
.widget {
background: white;
.title {
padding: 15px 20px;
border-bottom: 1px solid #e5e5e5;
}
.content {
box-sizing: border-box;
padding: 32px 20px;
.element_wrap {
display: flex;
.label {
width: 154px;
text-align: right;
font-size: 16px;
font-weight: 400;
color: #333333;
}
.pannel {
.wrapper {
margin-bottom: 16px;
.name {
font-size: 16px;
font-weight: 400;
color: #333333;
margin-bottom: 8px;
}
.messag {
width: 686px;
height: 60px;
background: #f9f9f9;
box-sizing: border-box;
padding: 0 20px;
.ms {
font-size: 14px;
font-weight: 400;
color: #666666;
}
.price {
color: #333333;
}
}
.pannel_box {
width: 686px;
background: #f9f9f9;
box-sizing: border-box;
padding: 20px;
display: flex;
flex-wrap: wrap;
.line {
margin-bottom: 20px;
.lab {
font-size: 14px;
font-weight: 400;
color: #666666;
text-align: right;
width: 154px;
}
.tip {
font-size: 14px;
font-weight: 400;
color: #333333;
}
}
}
}
}
.total {
padding: 12px 20px;
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
color: #333333;
}
}
.martop21 {
margin-top: 21px;
}
}
}
}
</style>
...@@ -13,27 +13,22 @@ ...@@ -13,27 +13,22 @@
单校验不通过退回处理,为保障客户权益,请尽快处理哦! 单校验不通过退回处理,为保障客户权益,请尽快处理哦!
</div> </div>
<div class="search_container"> <div class="search_container">
<glsx-combi-form ref="showSearch" labelWidth="112px" defaultWidth="218px" :formObj="searchForm" :formData="searchFormData"> <GLCombiForm :rowNumber="1" ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOkFn" @handleRest="handleRestFn()"></GLCombiForm>
<div slot="footer" class="footer-btns primary_plain_btn" style="float:right;">
<el-button size="small" @click="handleRestFn()">重置</el-button>
<el-button size="small" type="primary" @click="handleOkFn">查询</el-button>
<el-button size="small" type="primary" @click="exportList" plain>导出excel</el-button>
</div>
</glsx-combi-form>
</div> </div>
<div class="table_widget"> <div class="table_widget">
<el-button plain style="float:right;margin-bottom:10px;" size="small" @click="exportList">导出</el-button>
<GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="searchParams" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="batchPageConf"> <GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="searchParams" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="batchPageConf">
<div class="table-btns" slot="table-btns" slot-scope="scope"> <div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[0].includes(scope.scope.status)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton> <!-- <GLButton v-if="[0].includes(scope.scope.status)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton>
<GLButton v-if="[1, 3, 4].includes(scope.scope.status)" fn="查看" type="text" @click="handleEdit(2, scope.scope)">查看</GLButton> <GLButton v-if="[1, 3, 4].includes(scope.scope.status)" fn="查看" type="text" @click="handleEdit(2, scope.scope)">查看</GLButton>
<GLButton v-if="[2].includes(scope.scope.status)" fn="重新提交" type="text" @click="handleEdit(3, scope.scope)">重新提交</GLButton> <GLButton v-if="[2].includes(scope.scope.status)" fn="重新提交" type="text" @click="handleEdit(3, scope.scope)">重新提交</GLButton> -->
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import glsxCombiForm from '@/components/glsx-combi-form'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
const statusList = [ const statusList = [
{ {
...@@ -66,6 +61,56 @@ export default { ...@@ -66,6 +61,56 @@ export default {
data() { data() {
return { return {
orderCount: {}, orderCount: {},
buttonList: [
{
type: 'GLButton',
name: row => {
return '去处理'
},
condition: row => {
return [0].includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '去处理'
},
listeners: {
click: row => this.handleEdit(4, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '查看'
},
condition: row => {
return [1, 3, 4].includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: row => this.handleEdit(2, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '重新提交'
},
condition: row => {
return [2].includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '重新提交'
},
listeners: {
click: row => this.handleEdit(3, row.scope)
}
}
],
getListApi: this.$apis.claims.getclaimsList, getListApi: this.$apis.claims.getclaimsList,
sizeList: [5, 10, 20, 30, 40], sizeList: [5, 10, 20, 30, 40],
pageConf: { pageSize: 'pageCount', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageCount', pageNum: 'pageNum', totalCount: 'total' },
...@@ -109,7 +154,7 @@ export default { ...@@ -109,7 +154,7 @@ export default {
{ {
label: '核销码', label: '核销码',
prop: 'writeOffCode', prop: 'writeOffCode',
width: '90', width: 100,
formatter: cellValue => { formatter: cellValue => {
return cellValue.writeOffCode || '-' return cellValue.writeOffCode || '-'
} }
...@@ -117,7 +162,7 @@ export default { ...@@ -117,7 +162,7 @@ export default {
{ {
label: '报案号', label: '报案号',
prop: 'registNo', prop: 'registNo',
width: '220', width: 220,
formatter: cellValue => { formatter: cellValue => {
return cellValue.registNo || '-' return cellValue.registNo || '-'
} }
...@@ -125,7 +170,7 @@ export default { ...@@ -125,7 +170,7 @@ export default {
{ {
label: '客户名称', label: '客户名称',
prop: 'reporterName', prop: 'reporterName',
width: '200', width: 160,
formatter: cellValue => { formatter: cellValue => {
return cellValue.reporterName || '-' return cellValue.reporterName || '-'
} }
...@@ -133,7 +178,7 @@ export default { ...@@ -133,7 +178,7 @@ export default {
{ {
label: '合同号', label: '合同号',
prop: 'contractNo', prop: 'contractNo',
width: '200', width: 200,
formatter: cellValue => { formatter: cellValue => {
return cellValue.contractNo || '-' return cellValue.contractNo || '-'
} }
...@@ -141,7 +186,7 @@ export default { ...@@ -141,7 +186,7 @@ export default {
{ {
label: '价格区间', label: '价格区间',
prop: 'priceSection', prop: 'priceSection',
width: '100', width: 100,
formatter: cellValue => { formatter: cellValue => {
return cellValue.priceSection || '-' return cellValue.priceSection || '-'
} }
...@@ -149,7 +194,7 @@ export default { ...@@ -149,7 +194,7 @@ export default {
{ {
label: '门店提交时间', label: '门店提交时间',
prop: 'commitTime', prop: 'commitTime',
width: '180', width: 180,
formatter: cellValue => { formatter: cellValue => {
return cellValue.commitTime ? dayjs(cellValue.commitTime).format('YYYY-MM-DD HH:mm:ss') : '-' return cellValue.commitTime ? dayjs(cellValue.commitTime).format('YYYY-MM-DD HH:mm:ss') : '-'
} }
...@@ -157,7 +202,7 @@ export default { ...@@ -157,7 +202,7 @@ export default {
{ {
label: '提交国任时间', label: '提交国任时间',
prop: 'commitGuoRenDate', prop: 'commitGuoRenDate',
width: '180', width: 180,
formatter: cellValue => { formatter: cellValue => {
return cellValue.commitGuoRenDate ? dayjs(cellValue.commitGuoRenDate).format('YYYY-MM-DD HH:mm:ss') : '-' return cellValue.commitGuoRenDate ? dayjs(cellValue.commitGuoRenDate).format('YYYY-MM-DD HH:mm:ss') : '-'
} }
...@@ -165,7 +210,7 @@ export default { ...@@ -165,7 +210,7 @@ export default {
{ {
label: '服务名称', label: '服务名称',
prop: 'serviceName', prop: 'serviceName',
width: '300', width: 300,
line: 1, line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.serviceName || '-' return cellValue.serviceName || '-'
...@@ -174,7 +219,7 @@ export default { ...@@ -174,7 +219,7 @@ export default {
{ {
label: '服务状态', label: '服务状态',
prop: 'status', prop: 'status',
width: '120', width: 120,
formatter: cellValue => { formatter: cellValue => {
if (!cellValue) return '-' if (!cellValue) return '-'
return statusList.map(item => item.confId).includes(cellValue.status) ? statusList.find(item => item.confId === cellValue.status).confName : '-' return statusList.map(item => item.confId).includes(cellValue.status) ? statusList.find(item => item.confId === cellValue.status).confName : '-'
...@@ -183,7 +228,8 @@ export default { ...@@ -183,7 +228,8 @@ export default {
{ {
label: '状态描述', label: '状态描述',
prop: 'statusDesc', prop: 'statusDesc',
width: '200', width: 250,
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.statusDesc || '-' return cellValue.statusDesc || '-'
} }
...@@ -191,7 +237,8 @@ export default { ...@@ -191,7 +237,8 @@ export default {
{ {
label: '批准金额', label: '批准金额',
prop: 'approvalAmount', prop: 'approvalAmount',
width: '100', width: 100,
align: 'right',
formatter: cellValue => { formatter: cellValue => {
return cellValue.approvalAmount || '-' return cellValue.approvalAmount || '-'
} }
...@@ -199,7 +246,8 @@ export default { ...@@ -199,7 +246,8 @@ export default {
{ {
label: '支付金额', label: '支付金额',
prop: 'paymentAmount', prop: 'paymentAmount',
width: '100', align: 'right',
width: 100,
formatter: cellValue => { formatter: cellValue => {
return cellValue.paymentAmount || '-' return cellValue.paymentAmount || '-'
} }
...@@ -207,7 +255,7 @@ export default { ...@@ -207,7 +255,7 @@ export default {
{ {
label: '操作人', label: '操作人',
prop: 'operatorName', prop: 'operatorName',
width: '100', width: 100,
formatter: cellValue => { formatter: cellValue => {
return cellValue.operatorName || '-' return cellValue.operatorName || '-'
} }
...@@ -215,7 +263,7 @@ export default { ...@@ -215,7 +263,7 @@ export default {
{ {
label: '操作', label: '操作',
prop: '', prop: '',
width: '200', width: 100,
fixed: 'right', fixed: 'right',
addHtml: 'table-btns' addHtml: 'table-btns'
} }
...@@ -223,10 +271,6 @@ export default { ...@@ -223,10 +271,6 @@ export default {
} }
} }
}, },
components: {
glsxCombiForm
},
created() { created() {
this.diffHost() this.diffHost()
this.getClaimsCount() this.getClaimsCount()
...@@ -309,7 +353,7 @@ export default { ...@@ -309,7 +353,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.header_info_widget { .header_info_widget {
box-sizing: border-box; box-sizing: border-box;
margin: 20px 0; margin: 16px 0;
width: 100%; width: 100%;
height: 40px; height: 40px;
display: flex; display: flex;
...@@ -344,7 +388,6 @@ export default { ...@@ -344,7 +388,6 @@ export default {
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);
} }
/deep/ .el-form { /deep/ .el-form {
.el-form-item { .el-form-item {
margin-right: 12px !important; margin-right: 12px !important;
......
...@@ -4,15 +4,9 @@ ...@@ -4,15 +4,9 @@
<report @toSearchOrderDetail="toSearchOrderDetail" ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report> <report @toSearchOrderDetail="toSearchOrderDetail" ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report>
<repair ref="repairRef" @changeObjectType="changeObjectType" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair> <repair ref="repairRef" @changeObjectType="changeObjectType" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
<material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material> <material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material>
<div class="footer operate-btn primary_plain_btn"> <div class="page-btm-btn" v-if="pageType != 2">
<template v-if="pageType != 2"> <el-button type="primary" @click="confirmSubmit(1)">提交</el-button>
<el-button size="small" type="primary" @click="confirmSubmit(1)">提交</el-button> <el-button type="primary" plain @click="confirmSubmit(2)">草稿</el-button>
<el-button size="small" type="primary" plain @click="confirmSubmit(2)">草稿</el-button>
<el-button size="small" @click="handleCancel">取消</el-button>
</template>
<template v-else>
<el-button size="small" type="primary" @click="handleCancel">返回</el-button>
</template>
</div> </div>
</div> </div>
</template> </template>
...@@ -86,7 +80,7 @@ export default { ...@@ -86,7 +80,7 @@ export default {
computed: { computed: {
totalPrice() { totalPrice() {
let total = this.serviceItemsList.reduce(function(prev, cur) { let total = this.serviceItemsList.reduce(function(prev, cur) {
return prev + (+(cur.approveAmount * 100).toFixed(0)) return prev + +(cur.approveAmount * 100).toFixed(0)
}, 0) }, 0)
return total / 100 return total / 100
} }
...@@ -212,7 +206,6 @@ export default { ...@@ -212,7 +206,6 @@ export default {
this.$message.error('至少输入一项服务的定损批准金额') this.$message.error('至少输入一项服务的定损批准金额')
return false return false
} }
let fileTip = false let fileTip = false
for (let key in this.materialForm) { for (let key in this.materialForm) {
if (this.materialForm[key].length < 1 && !fileTip) { if (this.materialForm[key].length < 1 && !fileTip) {
......
<template> <template>
<div class="equity-wrap container"> <div class="equity-wrap container">
<div class="equity-wrap contain" style="padding: 0; margin-bottom: 0"> <div class="equity-wrap contain" style="padding: 0; margin-bottom: 0">
<div class="top">{{configTitle}}配置</div> <div class="top">{{ configTitle }}配置</div>
</div> </div>
<div class="equity-wrap contain" style="padding-left: 72px"> <div class="equity-wrap contain" style="padding-left: 72px">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="left" size="medium" class="detailForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="left" size="medium" class="detailForm">
...@@ -16,56 +16,80 @@ ...@@ -16,56 +16,80 @@
<el-form-item class="special-config" size="small" label="特殊配置"></el-form-item> <el-form-item class="special-config" size="small" label="特殊配置"></el-form-item>
<el-form-item> <el-form-item>
<el-checkbox v-model="costPrice" @change="checkCostPrice">列表字段</el-checkbox> <el-checkbox v-model="costPrice" @change="checkCostPrice">列表字段</el-checkbox>
<el-checkbox style="display: block; margin-left: 30px;" v-model="costPrice" @change="checkCostPrice">门店成本</el-checkbox> <el-checkbox style="display: block; margin-left: 30px;" v-model="costPrice" @change="checkCostPrice">门店成本</el-checkbox>
</el-form-item> </el-form-item>
</template> </template>
<template v-if="!showGh"> <template v-if="!showGh">
<el-form-item size="small" label="配置可见产品及产品属性"></el-form-item> <el-form-item size="small" label="配置可见产品及产品属性"></el-form-item>
<el-form-item> <el-form-item>
<el-checkbox v-model="theftAll" @change="handleTheftAllChange">盗抢全损无忧</el-checkbox> <el-checkbox v-model="theftAll" @change="handleTheftAllChange">盗抢全损无忧</el-checkbox>
<el-checkbox-group v-model="againstTheft" @change="handleCheckedTheftsChange"> <el-checkbox-group v-model="againstTheft" @change="handleCheckedTheftsChange">
<el-checkbox v-for="theft in thefts" :label="theft" :key="theft">{{ theft }}</el-checkbox> <el-checkbox v-for="theft in thefts" :label="theft" :key="theft">{{ theft }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> <div>服务期限</div>
<el-form-item> <div style="margin-left: 20px;">
<el-checkbox v-model="vehicleAll" @change="changeVehicleAll">整车全损无忧</el-checkbox> <!-- <el-checkbox @change="setLimitTime('robberyServer', 'fiveYear', $event)" v-model="robberyServer.fourYear">4年</el-checkbox>
<el-checkbox-group v-model="againstVehicle" @change="changeAgainstVehicle"> <el-checkbox @change="setLimitTime('robberyServer', 'fourYear', $event)" v-model="robberyServer.fiveYear">5年</el-checkbox> -->
<el-checkbox v-for="vehicle in vehicles" :label="vehicle" :key="vehicle">{{ vehicle }}</el-checkbox> <el-checkbox-group v-model="robberyServerList" @change="changeRobbery">
</el-checkbox-group> <el-checkbox label="4">4年</el-checkbox>
<div>整车全损无忧模板</div> <el-checkbox label="5">5年</el-checkbox>
<el-radio-group v-model="vehicleRadio">
<el-radio label="1">模板一新版</el-radio>
<el-radio label="2">模板二旧版</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-checkbox v-model="tyreAll" @change="handleTyreAllChange">轮胎无忧</el-checkbox>
<el-checkbox-group v-model="againstTyre" @change="handleCheckedTyresChange">
<el-checkbox v-for="tyre in tyres" :label="tyre" :key="tyre">{{ tyre }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </div>
<el-form-item> </el-form-item>
<el-checkbox v-model="collisionAll" @change="changeCollisionAll">碰撞维修无忧</el-checkbox> <el-form-item>
<el-checkbox-group v-model="againstCollision" @change="changeAgainstCollision"> <el-checkbox v-model="vehicleAll" @change="changeVehicleAll">整车全损无忧</el-checkbox>
<el-checkbox v-for="collision in collisions" :label="collision" :key="collision">{{ collision }}</el-checkbox> <el-checkbox-group v-model="againstVehicle" @change="changeAgainstVehicle">
<el-checkbox v-for="vehicle in vehicles" :label="vehicle" :key="vehicle">{{ vehicle }}</el-checkbox>
</el-checkbox-group>
<div>整车全损无忧模板</div>
<el-radio-group v-model="vehicleRadio">
<el-radio label="1">模板一新版</el-radio>
<el-radio label="2">模板二旧版</el-radio>
</el-radio-group>
<div>服务期限</div>
<div style="margin-left: 20px;">
<!-- <el-checkbox @change="setLimitTime('vehicleServer', 'fiveYear', $event)" v-model="vehicleServer.fourYear">4年</el-checkbox>
<el-checkbox @change="setLimitTime('vehicleServer', 'fourYear', $event)" v-model="vehicleServer.fiveYear">5年</el-checkbox> -->
<el-checkbox-group @change="changeVehicle" v-model="vehicleServerList">
<el-checkbox label="4">4年</el-checkbox>
<el-checkbox label="5">5年</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div>配置碰撞赔偿模板</div> </div>
<el-radio-group v-model="collisionRadio" @change="changeRadio"> </el-form-item>
<el-radio label="1">方案一</el-radio> <el-form-item>
<el-radio label="2">方案二</el-radio> <el-checkbox v-model="tyreAll" @change="handleTyreAllChange">轮胎无忧</el-checkbox>
<el-radio label="3">方案三</el-radio> <el-checkbox-group v-model="againstTyre" @change="handleCheckedTyresChange">
<el-radio label="4">方案四</el-radio> <el-checkbox v-for="tyre in tyres" :label="tyre" :key="tyre">{{ tyre }}</el-checkbox>
</el-radio-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-checkbox v-model="honorable">舒享版</el-checkbox> <el-checkbox v-model="collisionAll" @change="changeCollisionAll">碰撞维修无忧</el-checkbox>
</el-form-item> <el-checkbox-group v-model="againstCollision" @change="changeAgainstCollision">
<el-form-item> <el-checkbox v-for="collision in collisions" :label="collision" :key="collision">{{ collision }}</el-checkbox>
<el-checkbox v-model="first">尊享版</el-checkbox> </el-checkbox-group>
</el-form-item> <div>配置碰撞赔偿模板</div>
<el-form-item> <el-radio-group v-model="collisionRadio" @change="changeRadio">
<el-checkbox v-model="carefree">优享版</el-checkbox> <el-radio label="1">方案一</el-radio>
</el-form-item> <el-radio label="2">方案二</el-radio>
<el-radio label="3">方案三</el-radio>
<el-radio label="4">方案四</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-checkbox v-model="checkPosition">位置点验证</el-checkbox>
<el-checkbox-group v-model="checkPosition">
<el-checkbox label="不验证位置点"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item>
<el-checkbox v-model="honorable">舒享版</el-checkbox>
</el-form-item>
<el-form-item>
<el-checkbox v-model="first">尊享版</el-checkbox>
</el-form-item>
<el-form-item>
<el-checkbox v-model="carefree">优享版</el-checkbox>
</el-form-item>
</template> </template>
</el-form> </el-form>
<!-- 弹窗 --> <!-- 弹窗 -->
...@@ -87,17 +111,8 @@ ...@@ -87,17 +111,8 @@
</el-row> </el-row>
</relateStoreDialog> </relateStoreDialog>
</div> </div>
<div <div class="page-btm-btn">
class="footer-panel" <el-button type="primary" @click="onSubmit">确定</el-button>
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<div class="wrap_driver">
<el-button type="primary" @click="onSubmit" size="small">确定</el-button>
</div>
<el-button @click="$router.go(-1)" size="small">取消</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -112,8 +127,11 @@ export default { ...@@ -112,8 +127,11 @@ export default {
name: '', name: '',
data() { data() {
return { return {
robberyServerList:[],
vehicleServerList:[],
configTitle:'', configTitle:'',
selectedTable: false, selectedTable: false,
checkPosition: false,
tableData: [], tableData: [],
merchantIds: [], merchantIds: [],
selectedList: [], selectedList: [],
...@@ -214,6 +232,11 @@ export default { ...@@ -214,6 +232,11 @@ export default {
// this.showGh = false // this.showGh = false
// } // }
}, },
setLimitTime(name,str,e){
if(this[name][str] && e){
this[name][str] = false
}
},
handleRelateStoreClose() { handleRelateStoreClose() {
this.relateStoreVisible = false this.relateStoreVisible = false
}, },
...@@ -275,6 +298,7 @@ export default { ...@@ -275,6 +298,7 @@ export default {
this.costPrice = res.openCostPrice == 1 this.costPrice = res.openCostPrice == 1
this.storeSelParams = res this.storeSelParams = res
this.id = res.id this.id = res.id
this.checkPosition = res.checkPosition == 0
let arrs = [] let arrs = []
arrs = res.packageConfigs arrs = res.packageConfigs
for (var i = 0; i < arrs.length; i++) { for (var i = 0; i < arrs.length; i++) {
...@@ -283,6 +307,12 @@ export default { ...@@ -283,6 +307,12 @@ export default {
if (arrs[i].cardName == 'card') { if (arrs[i].cardName == 'card') {
this.againstTheft = ['盗抢卡输入'] this.againstTheft = ['盗抢卡输入']
} }
if(arrs[i].servicePeriod.indexOf('4')>-1){
this.robberyServerList.push('4')
}
if(arrs[i].servicePeriod.indexOf('5')>-1){
this.robberyServerList.push('5')
}
} }
if (arrs[i].packageCode == 'PC0007') { if (arrs[i].packageCode == 'PC0007') {
this.vehicleAll = true this.vehicleAll = true
...@@ -290,7 +320,12 @@ export default { ...@@ -290,7 +320,12 @@ export default {
this.againstVehicle = ['全损卡输入'] this.againstVehicle = ['全损卡输入']
} }
this.vehicleRadio = arrs[i].templateFlag + '' this.vehicleRadio = arrs[i].templateFlag + ''
console.log(this.vehicleRadio, 'vehicleradio') if(arrs[i].servicePeriod.indexOf('4')>-1){
this.vehicleServerList.push('4')
}
if(arrs[i].servicePeriod.indexOf('5')>-1){
this.vehicleServerList.push('5')
}
} }
if (arrs[i].packageCode == 'PC0006') { if (arrs[i].packageCode == 'PC0006') {
this.tyreAll = true this.tyreAll = true
...@@ -319,6 +354,8 @@ export default { ...@@ -319,6 +354,8 @@ export default {
}) })
}, },
onSubmit() { onSubmit() {
// robberyServerList:[],
// vehicleServerList:[],
// 判断组装params // 判断组装params
let params = [] let params = []
if (this.theftAll == true) { if (this.theftAll == true) {
...@@ -327,6 +364,7 @@ export default { ...@@ -327,6 +364,7 @@ export default {
if (this.againstTheft.length > 0) { if (this.againstTheft.length > 0) {
theftObj.cardName = 'card' theftObj.cardName = 'card'
} }
theftObj.servicePeriod = `1,2,3${this.robberyServerList.length? ','+ this.robberyServerList.join(','):''}`
params.push(theftObj) params.push(theftObj)
console.log(params, 'params') console.log(params, 'params')
} }
...@@ -337,6 +375,7 @@ export default { ...@@ -337,6 +375,7 @@ export default {
vehicleObj.cardName = 'card' vehicleObj.cardName = 'card'
} }
vehicleObj.templateFlag = +this.vehicleRadio vehicleObj.templateFlag = +this.vehicleRadio
vehicleObj.servicePeriod = `1,2,3${this.vehicleServerList.length? ','+ this.vehicleServerList.join(','):''}`
params.push(vehicleObj) params.push(vehicleObj)
} }
if (this.tyreAll == true) { if (this.tyreAll == true) {
...@@ -345,6 +384,7 @@ export default { ...@@ -345,6 +384,7 @@ export default {
if (this.againstTyre.length > 0) { if (this.againstTyre.length > 0) {
tyreObj.cardName = 'card' tyreObj.cardName = 'card'
} }
tyreObj.servicePeriod = '1'
params.push(tyreObj) params.push(tyreObj)
} }
if (this.collisionAll == true) { if (this.collisionAll == true) {
...@@ -354,24 +394,28 @@ export default { ...@@ -354,24 +394,28 @@ export default {
collisionObj.cardName = 'card' collisionObj.cardName = 'card'
} }
collisionObj.planId = +this.collisionRadio collisionObj.planId = +this.collisionRadio
collisionObj.servicePeriod = '1'
params.push(collisionObj) params.push(collisionObj)
} }
if (this.honorable == true) { if (this.honorable == true) {
let honorableObj = {} let honorableObj = {}
honorableObj.packageCode = 'PC0009' honorableObj.packageCode = 'PC0009'
honorableObj.servicePeriod = '1'
params.push(honorableObj) params.push(honorableObj)
} }
if (this.carefree == true) { if (this.carefree == true) {
let carefreeObj = {} let carefreeObj = {}
carefreeObj.packageCode = 'PC0011' carefreeObj.packageCode = 'PC0011'
carefreeObj.servicePeriod = '1'
params.push(carefreeObj) params.push(carefreeObj)
} }
if (this.first == true) { if (this.first == true) {
let firstObj = {} let firstObj = {}
firstObj.packageCode = 'PC0010' firstObj.packageCode = 'PC0010'
firstObj.servicePeriod = '1'
params.push(firstObj) params.push(firstObj)
} }
let targetParams = { let targetParams = {
openCostPrice : this.costPrice ? 1 : 0, openCostPrice : this.costPrice ? 1 : 0,
createDetailRequests: params createDetailRequests: params
} }
...@@ -379,6 +423,7 @@ export default { ...@@ -379,6 +423,7 @@ export default {
delete targetParams.createDetailRequests delete targetParams.createDetailRequests
}else{ }else{
delete targetParams.openCostPrice delete targetParams.openCostPrice
targetParams.checkPosition = this.checkPosition ? 0 : 1
} }
if (this.add == true) { if (this.add == true) {
targetParams.merchantIds = this.merchantIds targetParams.merchantIds = this.merchantIds
...@@ -427,11 +472,17 @@ export default { ...@@ -427,11 +472,17 @@ export default {
if (this.vehicleAll == false) { if (this.vehicleAll == false) {
this.againstVehicle = [] this.againstVehicle = []
this.vehicleRadio = '' this.vehicleRadio = ''
this.vehicleServerList=[]
} else { } else {
this.againstVehicle = ['模板一新版'] this.againstVehicle = ['模板一新版']
this.vehicleRadio = '1' this.vehicleRadio = '1'
} }
}, },
changeVehicle(){
if(this.vehicleServerList.length>0){
this.vehicleAll = true
}
},
changeAgainstVehicle() { changeAgainstVehicle() {
if (this.againstVehicle.length > 0) { if (this.againstVehicle.length > 0) {
this.vehicleAll = true this.vehicleAll = true
...@@ -447,6 +498,12 @@ export default { ...@@ -447,6 +498,12 @@ export default {
handleTheftAllChange() { handleTheftAllChange() {
if (this.theftAll == false) { if (this.theftAll == false) {
this.againstTheft = [] this.againstTheft = []
this.robberyServerList= []
}
},
changeRobbery(){
if(this.robberyServerList.length>0){
this.theftAll = true
} }
}, },
handleTyreAllChange() { handleTyreAllChange() {
...@@ -477,14 +534,6 @@ export default { ...@@ -477,14 +534,6 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .el-dialog__footer {
padding: 15px;
border-top: 1px solid #e6e6e6;
text-align: center;
}
.container {
padding-bottom: 74px;
}
.allWrap { .allWrap {
padding-bottom: 80px; padding-bottom: 80px;
} }
...@@ -590,7 +639,7 @@ export default { ...@@ -590,7 +639,7 @@ export default {
} }
} }
.special-config{ .special-config {
margin-bottom: 0!important; margin-bottom: 0 !important;
} }
</style> </style>
...@@ -3,34 +3,14 @@ ...@@ -3,34 +3,14 @@
<GLButton fn="开通配置" class="addGood" type="primary" icon="el-icon-plus" @click="jump('add')">开通配置</GLButton> <GLButton fn="开通配置" class="addGood" type="primary" icon="el-icon-plus" @click="jump('add')">开通配置</GLButton>
<!-- <el-button fn="开通配置" class="addGood" type="primary" icon="el-icon-plus" @click="jump('add')">开通配置</el-button> --> <!-- <el-button fn="开通配置" class="addGood" type="primary" icon="el-icon-plus" @click="jump('add')">开通配置</el-button> -->
<div class="equity-wrap contain merchant-select"> <div class="equity-wrap contain merchant-select">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="85px" label-position="right"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" @handleOk="selConfig" @handleRest="selConfig('reset')"></GLCombiForm>
<el-row> <div class="row-btns">
<el-form-item size="small" label="">
<el-input placeholder="请输入内容" v-model="selectInput" class="input-with-select">
<el-select v-model="select" slot="prepend" placeholder="请选择">
<el-option label="商户名称" value="1"></el-option>
<el-option label="商户号" value="2"></el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item class="open-status" size="small" label="开通状态" style="margin-left: -10px">
<el-select size="small" v-model="openFlag">
<el-option v-for="item in openFlagList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button size="small" @click="selConfig('reset')">重置</el-button>
<el-button size="small" type="primary" @click="selConfig">查询</el-button>
<el-button size="small" @click="exportTable">导出</el-button>
</el-form-item>
</el-row>
</el-form>
<div class="row-btns" style="margin-top: 20px">
<!-- <el-button size="small" @click="toggleAll">全选</el-button> --> <!-- <el-button size="small" @click="toggleAll">全选</el-button> -->
<!-- <el-checkbox v-model="checkbox" @change="toggleAll" style="margin-left:20px">全选</el-checkbox> --> <!-- <el-checkbox v-model="checkbox" @change="toggleAll" style="margin-left:20px">全选</el-checkbox> -->
<div style="float: right"> <div style="float: right;" class="primary_plain_btn">
<el-button size="small" @click="batchOperation(1)">批量开通</el-button> <el-button size="small" plain @click="batchOperation(1)">批量开通</el-button>
<el-button size="small" @click="batchOperation(2)">批量关闭</el-button> <el-button size="small" @click="batchOperation(2)">批量关闭</el-button>
<el-button size="small" @click="exportTable">导出</el-button>
</div> </div>
</div> </div>
<GLTable v-if="flag" ref="table" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :getListApi="getConfigList" :beforeSearchFn="check"> <GLTable v-if="flag" ref="table" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :getListApi="getConfigList" :beforeSearchFn="check">
...@@ -46,7 +26,7 @@ ...@@ -46,7 +26,7 @@
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
function date_format(date) { function date_format(date) {
var date2 = new Date(date) var date2 = new Date(date)
var YY = date2.getFullYear() + '-' var YY = date2.getFullYear() + '-'
...@@ -76,10 +56,57 @@ export default { ...@@ -76,10 +56,57 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
flag: true, flag: true,
searchForm: { searchForm: {
merchantId: '', openFlag : ''
merchantName: ''
}, },
searchSelectObj: {
idOrName: {
attr: 'merchantName',
value: ''
}
},
searchFormData: [
{
type: 'selectInput',
selectName: 'idOrName',
isClear: true,
inputWidth: '325px',
selectWidth: '110px',
selectOption: [
{
label: '商户名称',
name: 'merchantName'
},
{
label: '商户号',
name: 'merchantId'
}
],
handleSelectChange: value => {
this.searchSelectObj.idOrName.value = ''
}
},
{
label: '开通状态',
name: 'openFlag',
type: 'select',
optionList: [
{
label: '全部',
value: ''
},
{
label: '未开通',
value: '0'
},
{
label: '已开通',
value: '1'
}
],
optionId: 'value',
optionLabel: 'label'
}
],
openFlagList: [ openFlagList: [
{ {
label: '全部', label: '全部',
...@@ -116,7 +143,7 @@ export default { ...@@ -116,7 +143,7 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商户名称', label: '商户名称',
prop: 'merchantName' prop: 'merchantName',
}, },
{ {
label: '商户号', label: '商户号',
...@@ -134,7 +161,8 @@ export default { ...@@ -134,7 +161,8 @@ export default {
label: '开通时间', label: '开通时间',
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.createdDate) return this.date_format(cellValue.createdDate)
} },
width: 170
}, },
{ {
label: '操作人', label: '操作人',
...@@ -142,12 +170,12 @@ export default { ...@@ -142,12 +170,12 @@ export default {
}, },
{ {
label: '操作', label: '操作',
minWidth: '200',
addHtml: 'operate' addHtml: 'operate'
}, },
{ {
label: '开通开关', label: '开通开关',
addHtml: 'openFlag', addHtml: 'openFlag',
width: 100,
formatter: cellValue => { formatter: cellValue => {
if (cellValue.openFlag == '1') { if (cellValue.openFlag == '1') {
return true return true
...@@ -163,7 +191,7 @@ export default { ...@@ -163,7 +191,7 @@ export default {
} }
}, },
mounted() { mounted() {
}, },
created(){ created(){
this.diffHost() this.diffHost()
...@@ -199,7 +227,7 @@ export default { ...@@ -199,7 +227,7 @@ export default {
if (e == 'add') { if (e == 'add') {
this.$router.push({ path: '/config/addConfig', query: { $title: encodeURI('开通配置') } }) this.$router.push({ path: '/config/addConfig', query: { $title: encodeURI('开通配置') } })
} else { } else {
let query = { $title: encodeURI('修改配置') } let query = { $title: encodeURI('修改配置') }
query.merchantId = e query.merchantId = e
console.log(query, 'query') console.log(query, 'query')
this.$router.push({ path: '/config/addConfig', query }) this.$router.push({ path: '/config/addConfig', query })
...@@ -214,26 +242,22 @@ export default { ...@@ -214,26 +242,22 @@ export default {
}) })
}, },
selConfig(e) { selConfig(e) {
if (this.select == 1) { this.searchForm = {
this.searchForm.merchantName = this.selectInput openFlag : this.searchForm.openFlag
this.searchForm.merchantId = ''
} else {
this.searchForm.merchantId = this.selectInput
this.searchForm.merchantName = ''
} }
if (e == 'reset') { if (e == 'reset') {
this.openFlag = '全部' this.searchForm = {
this.searchForm = {} openFlag: ''
this.selectInput = '' }
this.$refs.table.refreshTable() this.searchSelectObj = {
} else { idOrName: {
if (this.openFlag < 2) { attr: 'merchantName',
this.searchForm.openFlag = this.openFlag value: ''
this.$refs.table.refreshTable() }
} else {
this.$refs.table.refreshTable()
} }
} }
this.searchForm[this.searchSelectObj.idOrName.attr] = this.searchSelectObj.idOrName.value
this.$refs.table.refreshTable()
}, },
// ['开通', '关闭'] // // ['开通', '关闭'] //
batchOperation(status) { batchOperation(status) {
...@@ -352,7 +376,7 @@ export default { ...@@ -352,7 +376,7 @@ export default {
} }
/deep/ .equity-wrap { /deep/ .equity-wrap {
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 8px;
} }
.el-form--inline .el-form-item { .el-form--inline .el-form-item {
margin-bottom: 0; margin-bottom: 0;
...@@ -378,16 +402,6 @@ export default { ...@@ -378,16 +402,6 @@ export default {
width: 166px; width: 166px;
color: #999; color: #999;
} }
.el-form-item__content .el-button--small:first-child,
.row-btns > div .el-button--small:first-child {
border-color: #5850ff;
color: #5850ff;
}
.el-form-item__content .el-button--small:last-child,
.row-btns > div .el-button--small:last-child {
border-color: #999;
color: #666666;
}
.row-btns .el-checkbox__label { .row-btns .el-checkbox__label {
color: #333; color: #333;
padding-left: 8px; padding-left: 8px;
...@@ -409,4 +423,4 @@ export default { ...@@ -409,4 +423,4 @@ export default {
/deep/ .el-input-group__prepend { /deep/ .el-input-group__prepend {
background-color: #fff; background-color: #fff;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<template> <template>
<div class="equity-wrap" style="margin-top: 20px"> <div class="equity-wrap">
<div class="equity-wrap contain"> <div class="equity-wrap contain">
<el-form :inline="true" label-width="70px" label-position="right" class="detailForm"> <GLCombiForm ref="showSearch" :formObj="detailForm" :formData="detailFormData" @handleOk="detailSelect('select')" @handleRest="detailSelect('reset')"></GLCombiForm>
<el-row style="align-items: center"> <el-alert :closable="false" type="info" show-icon>总计{{ line.total }}张,已使用{{ line.usedAmount }}张</el-alert>
<el-form-item label="序列号">
<el-input v-model="detailForm.seqNo" placeholder="请输入" size="small" class="formItem"></el-input>
</el-form-item>
<el-form-item label="版本">
<el-select v-model="detailForm.batchType" placeholder="请选择" size="small" class="formItem">
<el-option v-for="(item, index) in editOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="适用类型" style="margin-left: 30px">
<el-select v-model="detailForm.packageCode" placeholder="请选择" size="small" class="formItem">
<el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="状态">
<el-select v-model="detailForm.status" placeholder="请选择" size="small" class="formItem">
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="具体价格">
<el-input v-model="detailForm.actualPrice" placeholder="请输入" size="small" class="formItem"></el-input>
</el-form-item>
<el-form-item label="使用年限" style="margin-left: 30px">
<el-select v-model="detailForm.servicePeriod" placeholder="请选择" size="small" class="formItem">
<el-option v-for="(item, index) in lifeOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px !important; padding-top: 5px">
<el-button class="selectBtn" size="small" @click="detailSelect('reset')" style="border-color: #5850ff; color: #5850ff; margin-right: 10px">重置</el-button>
<el-button class="selectBtn" size="small" type="primary" @click="detailSelect('select')" style="">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<el-alert style="margin-top: 20px" :closable="false" type="info" show-icon>总计{{ line.total }}张,已使用{{ line.usedAmount }}张</el-alert>
<GLTable ref="detailTable" :searchForm="detailForm" :tableParams="detailParams" :pageConf="detailPageConf" :getListApi="getDetailList" :beforeSearchFn="check" style="margin-top: 10px"> <GLTable ref="detailTable" :searchForm="detailForm" :tableParams="detailParams" :pageConf="detailPageConf" :getListApi="getDetailList" :beforeSearchFn="check" style="margin-top: 10px">
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="modify(scope.scope)" :disabled="scope.scope.status == 0 ? false : true">修改</el-button> <!-- <el-button type="text" @click="modify(scope.scope)" :disabled="scope.scope.status">修改</el-button> -->
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
<!-- 详情弹窗 --> <!-- 详情弹窗 -->
<el-dialog title="修改无忧卡" v-if="detailDialog" :visible.sync="detailDialog" width="712px" :before-close="handleClose" class="detailDialog"> <GLDialog class="gl-form-page gl-form-min" title="修改无忧卡" v-if="detailDialog" :visible.sync="detailDialog" mode="mid" :before-close="handleClose" @onOk="submitForm('detailForm')" @onCancel="cancelDetailDialog">
<el-form :inline="true" :model="detailDialogForm" :rules="detailDialogRules" ref="detailForm" label-width="120px" class="detailForm"> <glsx-combi-form ref="product" labelWidth="154px" defaultWidth="284px" formRef="detailForm" :formObj="detailDialogForm" :formData="addDialogFormData" :formRules="detailDialogRules"></glsx-combi-form>
<div class="form"> </GLDialog>
<el-row>
<el-form-item label="版本:" prop="batchType">
<el-select v-model="detailDialogForm.batchType" placeholder="请选择" size="small">
<el-option v-for="(item, index) in dialogEditOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="适用类型:" prop="packageCode">
<el-select v-model="detailDialogForm.packageCode" placeholder="请选择" size="small">
<el-option v-for="(item, index) in dialogTypeOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="具体价格(万)" prop="actualPrice">
<el-input v-model="detailDialogForm.actualPrice" placeholder="请输入" size="small"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="使用年限:" prop="servicePeriod">
<el-select v-model="detailDialogForm.servicePeriod" placeholder="请选择" size="small">
<el-option v-for="(item, index) in dialogYearOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-row>
</div>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="cancelDetailDialog">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm('detailForm')">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
function date_format(date) { function date_format(date) {
var date2 = new Date(date) var date2 = new Date(date)
var YY = date2.getFullYear() + '-' var YY = date2.getFullYear() + '-'
...@@ -113,9 +47,29 @@ const validatorActualPrice = (rule, value, callback) => { ...@@ -113,9 +47,29 @@ const validatorActualPrice = (rule, value, callback) => {
} }
export default { export default {
name: '', name: '',
components:{
glsxCombiForm
},
data() { data() {
return { return {
date_format, date_format,
buttonList: [
{
type: 'el-button',
name: row => {
return '修改'
},
attrs: {
type: 'text',
disabled:(row)=>{
return row.scope.status
}
},
listeners: {
click: row => this.modify(row.scope)
}
}
],
line: { line: {
total: '', total: '',
usedAmount: '' usedAmount: ''
...@@ -131,12 +85,208 @@ export default { ...@@ -131,12 +85,208 @@ export default {
actualPrice: '', actualPrice: '',
status: '' status: ''
}, },
detailFormData: [
{
type: 'input',
label: '序列号',
name: 'seqNo',
isClear: true
},
{
label: '版本',
name: 'batchType',
type: 'select',
isClear: true,
optionList: [ {
confId: '',
confName: '全部'
},
{
confId: '1',
confName: '尊享版'
},
{
confId: '2',
confName: '畅享版'
}
],
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '适用类型',
name: 'packageCode',
type: 'select',
isClear: true,
optionList: [
{
confId: '',
confName: '全部'
},
{
confId: 'PC0005',
confName: '盗抢全损无忧'
},
{
confId: 'PC0006',
confName: '轮胎无忧'
},
{
confId: 'PC0007',
confName: '整车全损无忧'
},
{
confId: 'PC0008',
confName: '碰撞无忧'
}
],
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '状态',
name: 'status',
isClear: true,
type: 'select',
optionList: [
{
confId: '',
confName: '全部'
},
{
confId: '0',
confName: '未使用'
},
{
confId: '1',
confName: '已使用'
}
],
optionId: 'confId',
optionLabel: 'confName'
},
{
type: 'input',
label: '具体价格',
name: 'actualPrice',
isClear: true
},
{
label: '使用年限',
name: 'servicePeriod',
type: 'select',
isClear: true,
optionList: [
{
confId: '',
confName: '全部'
},
{
confId: '1',
confName: '1年'
},
{
confId: '2',
confName: '2年'
},
{
confId: '3',
confName: '3年'
},
{
confId: '4',
confName: '4年'
},
{
confId: '5',
confName: '5年'
}
],
optionId: 'confId',
optionLabel: 'confName'
}
],
detailDialogForm: { detailDialogForm: {
batchType: '', batchType: '',
packageCode: '', packageCode: '',
actualPrice: '', actualPrice: '',
servicePeriod: '' servicePeriod: ''
}, },
addDialogFormData: [
{
label: '版本',
name: 'batchType',
type: 'select',
optionList: [
{
value: '1',
label: '尊享版'
},
{
value: '2',
label: '畅享版'
}
],
optionId: 'value',
optionLabel: 'label'
},
{
label: '适用类型',
name: 'packageCode',
type: 'select',
optionList: [
{
value: 'PC0005',
label: '盗抢全损无忧'
},
{
value: 'PC0006',
label: '轮胎无忧'
},
{
value: 'PC0007',
label: '整车全损无忧'
},
{
value: 'PC0008',
label: '碰撞无忧'
}
],
optionId: 'value',
optionLabel: 'label',
changeAttr:(e)=>{
this.changePgCode(e)
}
},
{
type: 'input',
label: '具体价格/万',
name: 'actualPrice',
isClear: true
},
{
label: '使用年限',
name: 'servicePeriod',
type: 'select',
isClear: true,
optionList: [
{
value: '1',
label: '1年'
},
{
value: '2',
label: '2年'
},
{
value: '3',
label: '3年'
}
],
optionId: 'value',
optionLabel: 'label'
}
],
editOptions: [ editOptions: [
{ {
value: '', value: '',
...@@ -203,6 +353,14 @@ export default { ...@@ -203,6 +353,14 @@ export default {
{ {
value: '3', value: '3',
label: '3年' label: '3年'
},
{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
} }
], ],
dialogEditOptions: [ dialogEditOptions: [
...@@ -256,11 +414,14 @@ export default { ...@@ -256,11 +414,14 @@ export default {
detailParams: { detailParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: true, tableOption: {
width: 70
},
tableColumns: [ tableColumns: [
{ {
label: '序列号', label: '序列号',
prop: 'seqNo' prop: 'seqNo',
width: 100
}, },
{ {
label: '版本', label: '版本',
...@@ -293,8 +454,8 @@ export default { ...@@ -293,8 +454,8 @@ export default {
PC0007: '整车全损无忧', PC0007: '整车全损无忧',
PC0008: '碰撞无忧' PC0008: '碰撞无忧'
}[cellValue.packageCode] }[cellValue.packageCode]
} },
// minWidth: '200' width: 220
}, },
{ {
label: '使用时间', label: '使用时间',
...@@ -305,22 +466,24 @@ export default { ...@@ -305,22 +466,24 @@ export default {
} else { } else {
return '' return ''
} }
} },
width: 220
}, },
{ {
label: '使用者', label: '使用者',
prop: 'useMerchantName' prop: 'useMerchantName',
// minWidth: '200' line: 1,
width: 200
}, },
{ {
label: '使用年限', label: '使用年限',
prop: 'servicePeriod' prop: 'servicePeriod',
// minWidth: '200' width: 100
}, },
{ {
label: '具体价格', label: '具体价格',
prop: 'actualPrice' prop: 'actualPrice',
// minWidth: '200' width: 100
} }
] ]
} }
...@@ -330,6 +493,31 @@ export default { ...@@ -330,6 +493,31 @@ export default {
this.getTotal() this.getTotal()
}, },
methods: { methods: {
changePgCode(e){
const arr = [{
value: '1',
label: '1年'
},
{
value: '2',
label: '2年'
},
{
value: '3',
label: '3年'
}]
const moreArr = [{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
}]
const target = this.addDialogFormData.find(item => item.name=='servicePeriod')
target.optionList = (e=='PC0005' || e=='PC0007') ? [ ...arr, ...moreArr] : [...arr]
this.detailDialogForm.servicePeriod = ''
},
check() { check() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
var reg = /^[+]{0,1}(\d+)$/g var reg = /^[+]{0,1}(\d+)$/g
...@@ -354,19 +542,29 @@ export default { ...@@ -354,19 +542,29 @@ export default {
// 详情table搜索 // 详情table搜索
detailSelect(e) { detailSelect(e) {
if (e == 'reset') { if (e == 'reset') {
this.detailForm = {} this.detailForm = {
seqNo: '',
batchType: '',
packageCode: '',
servicePeriod: '',
actualPrice: '',
status: ''
}
// this.detailForm = {}
this.$refs.detailTable.refreshTable() this.$refs.detailTable.refreshTable()
this.detailForm.batchType = '' // this.detailForm.batchType = ''
this.detailForm.packageCode = '' // this.detailForm.packageCode = ''
this.detailForm.status = '' // this.detailForm.status = ''
this.detailForm.servicePeriod = '' // this.detailForm.servicePeriod = ''
} else if (e == 'select') { } else if (e == 'select') {
this.$refs.detailTable.refreshTable() this.$refs.detailTable.refreshTable()
} }
}, },
modify(e) { modify(e) {
this.changePgCode(e.packageCode)
let obj = JSON.parse(JSON.stringify(e)) let obj = JSON.parse(JSON.stringify(e))
this.detailDialog = true this.detailDialog = true
obj.servicePeriod = obj.servicePeriod +''
this.detailDialogForm = obj this.detailDialogForm = obj
if (obj.batchType == '1') { if (obj.batchType == '1') {
this.detailDialogForm.batchType = '尊享版' this.detailDialogForm.batchType = '尊享版'
...@@ -378,20 +576,16 @@ export default { ...@@ -378,20 +576,16 @@ export default {
detailFormat() {}, detailFormat() {},
// 关闭弹窗界面 // 关闭弹窗界面
cancelDetailDialog() { cancelDetailDialog() {
console.log('1')
this.detailDialog = false this.detailDialog = false
this.detailDialogForm = {} this.detailDialogForm = {}
}, },
submitForm(formName) { submitForm(formName) {
console.log(this.detailDialogForm) this.$refs.product.$refs[formName].validate(valid => {
this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
if (this.detailDialogForm.batchType == '尊享版') { if (this.detailDialogForm.batchType == '尊享版') {
this.detailDialogForm.batchType = '1' this.detailDialogForm.batchType = '1'
console.log('1111')
} else if (this.detailDialogForm.batchType == '畅享版') { } else if (this.detailDialogForm.batchType == '畅享版') {
this.detailDialogForm.batchType = '2' this.detailDialogForm.batchType = '2'
console.log('22222')
} }
console.log(this.detailDialogForm.batchType) console.log(this.detailDialogForm.batchType)
this.$apis.worryDetailApi.modWorryDetailList(this.detailDialogForm).then(res => { this.$apis.worryDetailApi.modWorryDetailList(this.detailDialogForm).then(res => {
...@@ -424,60 +618,11 @@ export default { ...@@ -424,60 +618,11 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
margin-left: 40px; margin-left: 40px;
padding: 8px 16px; padding: 8px 16px;
// margin-bottom: 20px;
}
/deep/ .contain .el-input--small .el-input__inner {
width: 215px;
}
/deep/ .el-dialog {
.el-dialog__body {
padding: 40px 20px;
display: flex;
justify-content: center;
.el-form-item__label {
color: #333;
}
input {
height: 36px;
width: 320px;
font-size: 14px;
}
}
.el-dialog__footer {
height: 70px;
.el-button {
width: 72px;
margin: 0 10px;
}
}
}
.contain:first-child {
margin-bottom: 10px;
.el-row:first-child {
margin-bottom: 20px;
}
/deep/ .el-form-item {
margin-bottom: 0;
.el-form-item__label {
color: #333;
height: 32px;
}
.el-input__inner {
height: 32px;
}
}
} }
.row-btns { .row-btns {
margin-top: 5px; margin-top: 5px;
margin-bottom: 10px; margin-bottom: 10px;
} }
/deep/ .el-dialog__footer {
padding: 16px 20px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
border-top: 1px solid #e6e6e6;
text-align: center;
}
/deep/ .el-alert { /deep/ .el-alert {
height: 40px; height: 40px;
background: #e6e9ff; background: #e6e9ff;
...@@ -500,4 +645,4 @@ export default { ...@@ -500,4 +645,4 @@ export default {
/deep/ .el-pagination { /deep/ .el-pagination {
margin-top: 20px; margin-top: 20px;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!