Commit fa5aba15 by 前端

Merge branch 'SAAS+V4.44.1' into 'master'

上线合并

See merge request !74
2 parents 0181795e 0cf5a0fa
...@@ -430,4 +430,35 @@ const delCaseApi = params => { ...@@ -430,4 +430,35 @@ const delCaseApi = params => {
}) })
} }
export default { renewalAudit, getMerchantApi, getMidMerchantApi, getBigMerchantApi, saveSign, saveClaimsCG, saveCG, cancelClaims, batchPassApi, checkClaimsOrderApi, checkOrderApi, getOrderOherInfo, uploadImgApi, getGHCountApi, getGHPhoneImageApi, getGHattachmentApi, getGHClaimsDetailApi, getGHhistoryListApi, checkGHClaimsListApi, exportGHClaimsListApi, getExportUrlApi, getGHClaimFollowsListApi, addGHClaimFollowsListApi, getGHClaimsListApi, getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo, getFollowPersonList, delFollowPerson, addFollowPerson, getMerchantSubList, delCaseApi } const getDjClaimsDetailApi = params => {
params.method = 'scrm.api.equity.service.claims.gl.get.claims.detail'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 定损审核接口
const checkDjOrderApi = params => {
params.method = 'scrm.api.equity.service.claims.gl.audit.for.lossAssessment'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔审核
const checkDjClaimsOrderApi = params => {
params.method = 'scrm.api.equity.service.claims.gl.audit.for.claims'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { renewalAudit, getMerchantApi, getMidMerchantApi, getBigMerchantApi, saveSign, saveClaimsCG, saveCG, cancelClaims, batchPassApi, checkClaimsOrderApi, checkOrderApi, getOrderOherInfo, uploadImgApi, getGHCountApi, getGHPhoneImageApi, getGHattachmentApi, getGHClaimsDetailApi, getGHhistoryListApi, checkGHClaimsListApi, exportGHClaimsListApi, getExportUrlApi, getGHClaimFollowsListApi, addGHClaimFollowsListApi, getGHClaimsListApi, getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo, getFollowPersonList, delFollowPerson, addFollowPerson, getMerchantSubList, delCaseApi, getDjClaimsDetailApi, checkDjOrderApi, checkDjClaimsOrderApi }
...@@ -210,7 +210,7 @@ export default { ...@@ -210,7 +210,7 @@ export default {
.add-explanation { .add-explanation {
color: #5850ff; color: #5850ff;
display: flex; display: inline-flex;
align-items: center; align-items: center;
margin-left: 154px; margin-left: 154px;
cursor: pointer; cursor: pointer;
......
...@@ -86,6 +86,22 @@ const statusList = [ ...@@ -86,6 +86,22 @@ const statusList = [
{ {
confId: 25, confId: 25,
confName: '核赔不通过' confName: '核赔不通过'
},
{
confId: 32,
confName: '待受理'
},
{
confId: 33,
confName: '待定损'
},
{
confId: 35,
confName: '定损不通过'
},
{
confId: 34,
confName: '定损通过'
} }
] ]
export default { export default {
...@@ -97,10 +113,26 @@ export default { ...@@ -97,10 +113,26 @@ export default {
{ {
type: 'GLButton', type: 'GLButton',
name: row => { name: row => {
return '定损审核'
},
condition: row => {
return [33].includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '定损审核'
},
listeners: {
click: row => this.handleEdit(5, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '去处理' return '去处理'
}, },
condition: row => { condition: row => {
return [0, 19, 22, 25].includes(row.scope.status) return [0, 19].includes(row.scope.status) || ([22, 25].includes(row.scope.status) && row.scope.source != 3)
}, },
attrs: { attrs: {
type: 'text', type: 'text',
...@@ -116,7 +148,11 @@ export default { ...@@ -116,7 +148,11 @@ export default {
return '查看' return '查看'
}, },
condition: row => { condition: row => {
return row.scope.status != 19 const { status, source } = row.scope
if (status == 2) {
return source != 3
}
return ![19, 33].includes(status)
}, },
attrs: { attrs: {
type: 'text', type: 'text',
...@@ -215,6 +251,9 @@ export default { ...@@ -215,6 +251,9 @@ export default {
listName: 'list', listName: 'list',
mutiSelectName: 'djIndex', mutiSelectName: 'djIndex',
mutiSelectUniqueKey: 'id', mutiSelectUniqueKey: 'id',
checkSelectable: row => {
return row.source != 3
},
tableColumns: [ tableColumns: [
{ {
label: '核销码', label: '核销码',
...@@ -315,6 +354,15 @@ export default { ...@@ -315,6 +354,15 @@ export default {
} }
}, },
{ {
label: '申请金额/元',
prop: 'applyAmount',
width: 150,
align: 'right',
formatter: cellValue => {
return cellValue.applyAmount || '-'
}
},
{
label: '批准金额/元', label: '批准金额/元',
prop: 'approvalAmount', prop: 'approvalAmount',
width: 150, width: 150,
...@@ -390,6 +438,22 @@ export default { ...@@ -390,6 +438,22 @@ export default {
name: '核赔不通过', name: '核赔不通过',
color: '#EB4E4E' color: '#EB4E4E'
}, },
32: {
name: '待受理',
color: '#f0f1f7'
},
33: {
name: '待定损',
color: '#5850FF'
},
35: {
name: '定损不通过',
color: '#EB4E4E'
},
34: {
name: '定损通过',
color: '#2CCA74'
},
// 广汇的状态 // 广汇的状态
6: { 6: {
name: '待定损', name: '待定损',
...@@ -470,6 +534,19 @@ export default { ...@@ -470,6 +534,19 @@ export default {
}, },
// 1.新增 2.查看 3.重新提交 4.去处理 5.运营经理审核 6 核赔审核 // 1.新增 2.查看 3.重新提交 4.去处理 5.运营经理审核 6 核赔审核
handleEdit(editNo, row) { handleEdit(editNo, row) {
const title = this.jumpTitle(editNo)
if (row && row.source == 3) {
const params = {
editNo,
isGH: true,
contractNo: row.contractNo,
orderId: row.id,
status: row.status
}
const temp = encodeURIComponent(JSON.stringify(params))
this.$router.push({ path: '/djClaims/djOrder/' + temp, query: { $title: editNo == 5 && row && row.status == 33 ? '定损审核' : title } })
return
}
let urlParam = { let urlParam = {
editNo, editNo,
isGH: this.showGh, isGH: this.showGh,
...@@ -482,7 +559,6 @@ export default { ...@@ -482,7 +559,6 @@ export default {
urlParam.contractNo = editNo == 1 ? '' : row.writeOffCode urlParam.contractNo = editNo == 1 ? '' : row.writeOffCode
} }
const temp = encodeURIComponent(JSON.stringify(urlParam)) const temp = encodeURIComponent(JSON.stringify(urlParam))
const title = this.jumpTitle(editNo)
this.$router.push({ path: '/claims/order/' + temp, query: { $title: title } }) this.$router.push({ path: '/claims/order/' + temp, query: { $title: title } })
}, },
handleOkFn() { handleOkFn() {
......
<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.serviceItemType == 5" 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.serviceItemType == 4" 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.serviceItemType == 4 || item.serviceItemType == 5 }]">
<div>
<label class="required" for="">预估损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input>
</div>
<div v-if="item.lossAssessmentFlag" style="margin-top: 10px;">
<label class="required" for="">保险公司定损金额/元:</label>
<el-input :disabled="!item.applyAmount" maxlength="10" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入保险定损金额" v-model="item.lossAssessmentAmount"></el-input>
</div>
</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" :operatorName="repotData.updatedBy" :id="repotData.id"></explanation>
</div>
<!-- 待定损和待核赔的时候才显示案件通融说明 -->
<Card v-if="repotData.exceptionImgUrl && (repotData.status == 6 || repotData.status == 12)" title="案件通融说明">
<div class="tr-wrap">
<label class="label" for="">通融说明:</label>
<el-image class="img" :preview-src-list="[repotData.exceptionImgUrl]" :src="repotData.exceptionImgUrl"></el-image>
</div>
</Card>
<!-- 其他信息 -->
<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: 'contractNo',
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: 'internalReimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
}
},
{
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, key) {
let checkPlan = '' + this.itemList[id][key]
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], key, checkPlan)
this.getTotal()
},
changePrice(e, id, key) {
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], key, e.target.value.substr(0, len - 1))
}
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], key, 1)
}
let maxPrice = 200000
if(key == 'lossAssessmentAmount') {
maxPrice = 2000000
}
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], key, 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;
display: inline-block;
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;
}
}
}
.tr-wrap {
.label {
width: 154px;
display: inline-block;
vertical-align: top;
text-align: right;
height: 20px;
font-size: 14px;
color: #333333;
line-height: 20px;
margin-top: 6px;
}
.img {
width: 104px;
height: 104px;
}
}
</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.serviceItemType == 5" 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.serviceItemType == 4" 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.serviceItemType != 5 && item.serviceItemType != 4 }]">
<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 v-if="item.lossAssessmentFlag" class="ma20 ms flex_sc">
<div class="ms_lab">保险公司定损金额/元:</div>
<el-input @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" v-model="item.lossAssessmentAmount" 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>
<template v-if="item.serviceItemType == 1">
<div class="ms flex_sc ma20">
<div class="ms_lab">购置税/元:</div>
<el-input @input="validPrice($event, index, 'purchaseTax')" @blur="changePrice($event, index, 'purchaseTax')" v-model="item.purchaseTax" 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, 'depreciation')" @blur="changePrice($event, index, 'depreciation')" v-model="item.depreciation" 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, 'commercialInsurance')" @blur="changePrice($event, index, 'commercialInsurance')" v-model="item.commercialInsurance" 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, 'registrationFee')" @blur="changePrice($event, index, 'registrationFee')" v-model="item.registrationFee" 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, 'retrofits')" @blur="changePrice($event, index, 'retrofits')" v-model="item.retrofits" 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, 'scooterFare')" @blur="changePrice($event, index, 'scooterFare')" v-model="item.scooterFare" size="mini" class="w432" maxlength="10"></el-input>
</div>
</template>
<div class="ms flex_sc ma20" v-if="item.serviceItemType == 2">
<div class="ms_lab">损伤类型:</div>
<el-checkbox-group v-model="item.damageType">
<el-checkbox :label="1">鼓包</el-checkbox>
<el-checkbox :label="2">爆胎</el-checkbox>
<el-checkbox :label="3">开裂</el-checkbox>
<el-checkbox :label="4">扎伤</el-checkbox>
</el-checkbox-group>
</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 class="messag">
<div class="ms flex_sc">
<div class="ms_txt">寄件快递公司:</div>
<el-input v-model="repotData.expressName" size="mini" class="w432" disabled></el-input>
</div>
<div class="ms flex_sc ma20">
<div class="ms_txt">寄件快递单号:</div>
<el-input v-model="repotData.expressNo" size="mini" class="w432" disabled></el-input>
</div>
</div>
</div>
</div>
<div>
<explanation :supplementList="repotData.supplementList2" :operatorName="repotData.updatedBy" :id="repotData.id"></explanation>
</div>
<div v-if="accountMatchResultList.length" class="widget">
<wraning style="margin-top: 16px" :isWatchOrder="isWatchOrder" @getWarningData="getWarningData" :list="accountMatchResultList"></wraning>
</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'
import wraning from '../wraning/index.vue'
export default {
name: 'checkClaimsPage',
components: {
glsxCombiForm,
uploadMaterial,
explanation,
wraning
},
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,
accountMatchResultList: Array,
isWatchOrder: Boolean
},
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)
}
let maxPrice = 2000000
if(type == 'applyAmount' || type == 'approveAmount') {
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)
},
getWarningData(e) {
if (e) {
let arr = []
e.forEach(el => {
let obj = {
id: el.id,
verifyResultDesc: el.verifyResultDesc,
accountVerifyImagesList: el.accountVerifyImagesList,
matchType: el.matchType
}
arr.push(obj)
})
console.log(arr)
this.$emit('getWarningInfo', arr)
}
}
}
}
</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;
}
}
}
.ms_txt {
font-size: 14px;
font-weight: 400;
color: #666666;
}
</style>
<template>
<div>
<Card title="案件补充说明">
<div class="explanation">
<div class="explanation-item" v-for="(item, idx) in supplementListTemp" :key="idx">
<div class="explanation-list">
<label class="label" for="">{{ `说明${idx + 1}:` }}</label>
<el-input :disabled="isCheck || isDisabled || item.operation == 1" :placeholder="`请输入说明${idx + 1}`" v-model="item.content" maxlength="200" type="textarea" :rows="3"></el-input>
<i class="el-icon-delete del" v-if="!isCheck && supplementListTemp.length > 1 && item.operation != 1" @click="handleDel(idx)"></i>
<div class="follow-list" @click="showFollow">跟进记录</div>
</div>
<div class="operator">
<div>操作人:{{ item.operationUser ? item.operationUser : '--' }}</div>
<div>操作时间:{{ item.operationTime ? item.operationTime : '--' }}</div>
</div>
</div>
</div>
<div v-if="!isCheck && !isDisabled" class="add-explanation" @click="addExplanation">
<i class="el-icon-circle-plus-outline"></i>
<span>新增说明</span>
</div>
</Card>
<!-- 跟进记录 -->
<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>
</div>
</template>
<script type="text/ecmascript-6">
import Card from './card.vue'
import * as dayjs from 'dayjs'
export default {
name: 'explanation',
data() {
return {
followDialog: false,
followListData: [],
followDialogTitle: '跟进记录',
followOkText: '新增',
followEditStatus: false,
followContent: '',
followResult: false,
curentFollowInfo:'',
supplementListTemp:[{ content: '' }]
}
},
components: {
Card
},
props: {
supplementList: {
type: Array,
default: function () {
return [{ content: '' }]
}
},
isCheck:Boolean,
isDisabled:Boolean,
operatorName:String,
id:Number
},
mounted() {
},
watch:{
supplementList:{
deep:true,
handler(val){
this.supplementListTemp = val
val.forEach(item=>{
item.operationTime = dayjs( item.operationTime).format('YYYY-MM-DD HH:mm:ss')
})
},
immediate:true
}
},
methods: {
showFollow() {
this.followDialog = true
this.curentFollowInfo = {
id:this.id,
operatorName:this.operatorName
}
this.followListData = []
this.getFollowList(this.curentFollowInfo)
},
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
})
},
handleDel(idx) {
this.$delete(this.supplementListTemp, idx)
},
addExplanation() {
const idx = this.supplementListTemp.length
const newObj = { claimsId: this.supplementListTemp[idx - 1].claimsId, content: '' }
this.$set(this.supplementListTemp, idx, newObj)
}
}
}
</script>
<style lang="scss" scoped>
.explanation {
.explanation-item {
margin-bottom: 20px;
&:last-child {
margin-bottom: 10px;
}
}
.explanation-list {
position: relative;
display: flex;
/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: inline-flex;
align-items: center;
margin-left: 154px;
cursor: pointer;
.el-icon-circle-plus-outline {
font-size: 20px;
margin-right: 6px;
}
span {
font-size: 12px;
}
}
.operator {
font-size: 12px;
color: #666666;
display: flex;
justify-content: space-between;
margin-left: 154px;
width: 580px;
margin-top: 4px;
margin-bottom: 20px;
}
.follow-list {
font-size: 14px;
color: #5850ff;
bottom: 0;
position: absolute;
left: 742px;
cursor: pointer;
}
</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,
lossTypeList: 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 ((ele.serviceItemType != 4 || (ele.lossType && this.lossTypeList.includes(ele.lossType))) && 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>
<GLDialog :destroy-on-close="isdestroy" :close-on-click-modal="false" title="跟进人配置" mode="mid" :visible.sync="isFollowSync" :before-close="handleCancel">
<GLTable :hasPage="false" :hasNum="true" :tableData="followListData" :tableParams="followTableParams">
<div slot="followName" slot-scope="scope">
<el-form v-if="scope.scope.followName == ''">
<el-form-item style="margin-bottom: 0px">
<el-input v-model="followName" placeholder="请输入" maxlength="5"></el-input>
</el-form-item>
</el-form>
<span v-else>{{ scope.scope.followName }}</span>
</div>
<div class="table-btns" slot="table-btns" slot-scope="scope">
<el-button type="text" size="small" @click="handleDelete(scope.scope, scope.index)">删除</el-button>
</div>
</GLTable>
<div class="add-wrap" @click="addLine">
<i class="el-icon-circle-plus-outline add-icon"></i>
添加
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel">取消</el-button>
<el-button type="primary" size="small" @click="handleSave">确定</el-button>
</span>
</GLDialog>
</template>
<script>
export default {
data() {
return {
isdestroy: true,
followListData: [],
followName: '',
followTableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '跟进人',
prop: 'followName',
addHtml: 'followName'
},
{
label: '操作',
prop: '',
width: 80,
fixed: 'right',
addHtml: 'table-btns'
}
]
}
}
},
props: {
isFollowSync: {
type: Boolean,
default: false
}
},
created() {
this.getFollowPersonList()
},
methods: {
getFollowPersonList() {
this.$apis.claims
.getFollowPersonList({
pageSize: 10000,
pageNum: 1
})
.then(res => {
this.followListData = res.list
})
},
addLine() {
if (this.followListData.length > 0 && this.followListData[this.followListData.length - 1].followName == '') {
return
}
this.followName = ''
this.followListData.push({ followName: '' })
},
handleSave() {
if (this.followListData[this.followListData.length - 1].followName == '' && this.followName == '') {
this.$message({
type: 'error',
message: '请输入跟进人'
})
return
}
if (this.followName) {
this.$apis.claims.addFollowPerson({ followName: this.followName }).then(res => {
this.$message({
type: 'success',
message: '添加成功!'
})
})
}
this.$emit('handleClose')
},
handleCancel() {
// this.isFollowSync = false
this.$emit('handleClose')
},
handleCalculate() {},
//删除
handleDelete(data, index) {
if (data.id) {
this.$confirm('确定要删除吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
if (data.id) {
this.$apis.claims.delFollowPerson({ id: data.id }).then(res => {})
this.followListData.splice(index, 1)
}
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.followListData.splice(index, 1)
}
}
}
}
</script>
<style scoped lang="scss">
.add-wrap {
display: flex;
align-items: center;
font-size: 12px;
color: #5850ff;
margin-top: 10px;
cursor: pointer;
.add-icon {
margin-right: 6px;
font-size: 20px;
color: #5850ff;
}
}
</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>
<template>
<div class="report-components">
<div class="title">上传资料</div>
<div class="material">
<div class="material-item" v-for="item in materialData" :key="item.name">
<label :class="{ require: item.label }">{{ item.label }}</label>
<el-upload :disabled="pageType == 2 || renewDisable" :id="item.name" :ref="item.name + 'Ref'" :file-list="materialForm[item.name]" :list-type="item.listType ? item.listType : 'picture-card'" :class="[ pageType == 2 || item.limit == materialForm[item.name].length ? 'hidePlusBtn' : '', 'upload-item',{'renewDisable':renewDisable&&!materialForm[item.name].length}]" :limit="item.limit" action="#" :before-upload="e => beforeAvatarUpload(e, item.name)" :on-preview="handlePictureCardPreview" :on-remove="e => handleRemove(e, item.name)" :http-request="e => httpRequest(e, item.name)">
<!-- <i v-if="item.name == 'billInfo'" slot="default" class="el-icon-plus">
<p>上传图片</p>
</i> -->
<img v-if="item.name === 'billInfo'" slot="default" :src="upload_img" alt="" />
<img v-if="item.name === 'idCard'" slot="default" :src="idCard" alt="" />
<img v-if="item.name === 'idCardBack'" slot="default" :src="idCardBack" alt="" />
<el-button v-if="item.name == 'otherInfo'" slot="default" :disabled="renewDisable || pageType == 2 || item.limit == materialForm[item.name].length" size="small" class="el-icon-plus">上传文件</el-button>
<!-- <div slot="tip" class="remark" v-if="item.name == 'idCard'">身份证人像面</div>
<div slot="tip" class="remark" v-if="item.name == 'idCardBack'">身份证国徽面</div> -->
<div slot="tip" class="file-box" v-if="item.name == 'otherInfo'">
<span class="file_tip">支持扩展名:.doc .docx .pdf .jpg .png .jpeg。图片类型大小不能超过9M,其他类型文件大小不能超过30M。</span>
<template>
<div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId">
<template v-if="!imgItem.mark">
<el-progress
color="#F5F7FA"
text-inside
:format="
() => {
return imgItem.name
}
"
:percentage="imgItem.progress"
></el-progress>
<el-tooltip class="item" effect="dark" content="下载" placement="top">
<img v-if="imgItem.progress == 100" class="download" :src="download" alt="" @click="downloadFile(imgItem)" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<i v-if="imgItem.progress == 100 && pageType != 2" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</el-tooltip>
</template>
</div>
</template>
</div>
<!-- 续保图 -->
<div slot="tip" v-if="item.name == 'otherInfo' && isXB" class="file-box xuBao">
<template>
<div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId">
<template v-if="imgItem.mark">
<el-progress
color="#F5F7FA"
text-inside
:format="
() => {
return markMapItem[imgItem.mark]
}
"
:percentage="imgItem.progress"
></el-progress>
<el-tooltip class="item" effect="dark" content="下载" placement="top">
<img v-if="imgItem.progress == 100" class="download" :src="download" alt="" @click="downloadFile(imgItem)" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<i v-if="imgItem.progress == 100 && pageType != 2&&!renewDisable" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</el-tooltip>
</template>
</div>
</template>
</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</div>
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
import idCard from '@/assets/images/idCard.png'
import idCardBack from '@/assets/images/idCardBack.png'
import upload_img from '@/assets/images/upload.png'
import download from '@/assets/images/download.png'
export default {
name: '',
components: {
// glsxCombiForm
},
props: {
materialForm: Object,
pageType: {
type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
},
isXB: Boolean,
renewDisable:Boolean
},
data() {
return {
progress: 0,
progressName: '',
idCard,
idCardBack,
upload_img,
download,
dialogVisible: false,
// materialForm: {
// idCard: [],
// idCardBack: [],
// billInfo: [],
// otherInfo: []
// },
materialData: [
{
label: '身份证照:',
name: 'idCard',
limit: 1
},
{
name: 'idCardBack',
limit: 1
},
{
label: '发票:',
name: 'billInfo',
limit: 10
},
{
label: '其他:',
name: 'otherInfo',
listType: 'fileList',
limit: 20
}
],
markMapItem: {
drivingLicense: '驾驶证',
accident: '事故责任认定书或相关凭证',
vin: '车架号VIN照片',
carAndPeople: '45°车头角度全车照片及人车合照',
vehicleDamage: '车辆受损细节照片',
InsuranceLossStatement: '保险定损单',
repiare:'维修单'
}
}
},
methods: {
downloadFile(file) {
window.open(file.url)
},
beforeAvatarUpload(e, fieldName) {
console.log(e)
return new Promise((resolve, reject) => {
let AllImgExt = '.png|.jpg|.jpeg'
if (fieldName === 'otherInfo') {
AllImgExt = '.jpeg|.png|.jpg|.pdf|.doc|.docx'
}
let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
return reject(false)
}
const size = e.size / 1024 / 1024
let maxSize = 9
let filetype = this.getFileType(e.type)
if (filetype == 'image') {
maxSize = 9
} else {
maxSize = 30
}
if (size > maxSize) {
this.$message.error(`上传文件不可超过${maxSize}M`)
return reject(false)
}
return resolve(true)
})
},
getFileType(type) {
if (!type) return 'doc'
if (type.indexOf('image') > -1) {
return 'image'
} else {
return 'doc'
}
},
httpRequest({ file: e }, fieldName) {
let size = e.size / 1024 / 1024
let loading = null
// 大于2给loading
if (size > 2) {
loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
}
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const targetNameList = e.name.split('.')
const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1]
const fileType = this.getFileType(e.type)
const fileItem = { name: e.name, progress: 0, fileType: fileType }
if (fieldName === 'idCard') fileItem.name = '&front&_' + e.name
if (fieldName === 'idCardBack') fileItem.name = '&behind&_' + e.name
this.materialForm[fieldName].push(fileItem)
const id = this.materialForm[fieldName].length - 1
const paramObj = { file: fileInfo, fileType: fileType }
let param = {}
param.fileList = [paramObj]
this.$apis.common
.uploadFileApi(param, res => {
if (loading != null) {
loading.close()
loading = null
}
let progress = ((res.loaded / res.total) * 100).toFixed(2)
if (progress > 90) {
progress = 90
}
this.$set(this.materialForm[fieldName][id], 'progress', progress)
})
.then(res => {
if (res.code == '0') {
this.$set(this.materialForm[fieldName][id], 'url', res.data[0])
this.$set(this.materialForm[fieldName][id], 'progress', 100)
} else {
// this.materialForm[fieldName] = this.materialForm[fieldName].filter(item => item.url)
// console.log(this.materialForm[fieldName])
this.$set(this.materialForm[fieldName][id], 'progress', 100)
this.materialForm[fieldName].splice(id, 1)
this.$message.error('该文件上传失败')
}
})
}
},
handleRemove(e, fieldName) {
if (e.status == 'ready') return
// let id = this.$refs[fieldName + 'Ref'][0].uploadFiles.findIndex(item => item.uid === e.uid)
// this.$refs[fieldName + 'Ref'][0].uploadFiles.splice(id, 1)
const index = this.materialForm[fieldName].findIndex(item => item.url == e)
setTimeout(() => {
this.materialForm[fieldName].splice(index, 1)
})
//加定时是因为去除element删除有一个闪动
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .hidePlusBtn {
.el-upload--picture-card {
display: none;
}
}
/deep/ .renewDisable {
.el-upload--picture-card {
display: block;
cursor: not-allowed;
}
}
// 上传闪屏问题
/deep/.el-upload-list__item.is-ready {
display: none;
}
.report-components {
background: white;
margin: 20px 0 0;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.edit-form-container {
margin-top: 20px;
}
.material {
padding: 32px 20px;
min-width: 650px;
.material-item {
display: flex;
margin-bottom: 20px;
.upload-item {
position: relative;
}
/deep/ .el-upload-list__item-status-label {
display: none;
}
&:nth-child(-n + 3) {
/deep/.el-upload-list__item,
/deep/.el-upload--picture-card {
width: 180px;
height: 104px;
background: rgba(0, 0, 0, 0.04);
border-radius: 4px;
border: 1px dashed rgba(0, 0, 0, 0.15);
img {
width: 100%;
height: 100%;
}
}
// 删除动画
/deep/ .el-upload-list__item {
transition: none;
margin: 0;
}
}
&:nth-child(1) {
display: inline-block;
position: relative;
padding-left: 118px;
margin-bottom: 20px;
height: 104px;
.require {
position: absolute;
left: 0;
top: 0;
}
}
&:nth-child(2) {
margin-left: 12px;
display: inline-block;
}
&:nth-child(3) {
flex: 1;
margin-bottom: 0;
.upload-item {
max-width: 650px;
}
/deep/.el-upload-list__item,
/deep/.el-upload--picture-card {
width: 104px;
margin-right: 12px;
margin-bottom: 15px;
p {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
}
}
&:nth-child(4) {
margin-top: 5px;
.require {
margin-top: 9px;
}
/deep/ .el-upload {
text-align: left;
}
/deep/.el-upload-list--fileList {
display: none;
}
/deep/ .el-button:hover,
.el-button:active,
.el-button:focus {
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
}
/deep/ .el-button.is-disabled:hover {
color: #c0c4cc;
background: #fff;
border-color: #ebeef5;
}
}
.remark {
left: 50%;
transform: translateX(-50%);
white-space: nowrap;
font-size: 14px;
color: #999;
top: 112px;
position: absolute;
}
.file-box {
margin-top: 8px;
.file_tip {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 22px;
}
.bar_outer {
width: 320px;
position: relative;
margin-bottom: 4px;
margin-top: 8px;
.download {
width: 20px;
height: 18px;
}
.del_img,
.download {
color: #c6c6c6;
position: absolute;
right: -25px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
}
.del_img {
right: -49px;
}
/deep/ .el-progress-bar__outer {
height: 26px !important;
border-radius: 4px;
background-color: transparent !important;
border: 1px solid #f4f6fc;
.el-progress-bar__inner {
border-radius: 4px;
text-align: left;
.el-progress-bar__innerText {
color: #333;
width: 310px;
overflow: hidden;
height: 13px;
text-overflow: ellipsis;
}
}
}
.file-name {
left: 0;
top: 50%;
transform: translateY(-50%);
position: absolute;
}
}
.imgTip {
font-weight: 400;
font-size: 14px;
color: #333333;
}
.wrapper {
display: inline-block;
}
.xbImg {
display: inline-block;
width: 104px;
height: 104px;
}
}
.require {
width: 118px;
text-align: right;
display: inline-block;
white-space: nowrap;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.require::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
.xuBao {
margin-top: 22px;
width: 522px;
min-height: 24px;
}
}
.material-item:last-child {
display: flex;
}
}
}
</style>
<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>
<div>
<div v-if="isGH" class="report-components gl-form-page">
<div class="title">报案信息(店面补充)</div>
<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 class="report-components repair-wrap">
<div class="title">维修信息</div>
<div class="repair-body">
<div class="type-wrap">
<label class="require" for="">批准金额:</label>
<div class="service-wrap">
<template v-if="serviceItemsList.length > 0">
<div class="service-item" v-for="(item, index) in serviceItemsList" :key="item.serviceItemCode">
<p class="name">{{ item.serviceItemName }}</p>
<div class="price-wrap">
<label class="label" for="">定损批准金额:</label>
<el-input :disabled="pageType == 2 || renewDisable" maxlength="10" @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" placeholder="请输入" v-model="item.approveAmount"></el-input>
</div>
<div class="price-wrap" v-if="item.serviceItemType == 2">
<label class="label" for="">损伤类型:</label>
<el-checkbox-group :disabled="pageType == 2" v-model="item.damageType">
<el-checkbox :label="1">鼓包</el-checkbox>
<el-checkbox :label="2">爆胎</el-checkbox>
<el-checkbox :label="3">开裂</el-checkbox>
<el-checkbox :label="4">扎伤</el-checkbox>
</el-checkbox-group>
</div>
<template v-if="!isXB && item.serviceItemType == 1">
<div class="price-wrap">
<label class="label" for="">购置税:</label>
<el-input :disabled="pageType == 2" maxlength="10" @input="validPrice($event, index, 'purchaseTax')" @blur="changePrice($event, index, 'purchaseTax')" placeholder="请输入" v-model="item.purchaseTax"></el-input>
</div>
<div class="price-wrap">
<label class="label" for="">折旧费:</label>
<el-input :disabled="pageType == 2" maxlength="10" @input="validPrice($event, index, 'depreciation')" @blur="changePrice($event, index, 'depreciation')" placeholder="请输入" v-model="item.depreciation"></el-input>
</div>
<div class="price-wrap">
<label class="label" for="">商业险保费:</label>
<el-input :disabled="pageType == 2" maxlength="10" @input="validPrice($event, index, 'commercialInsurance')" @blur="changePrice($event, index, 'commercialInsurance')" placeholder="请输入" v-model="item.commercialInsurance"></el-input>
</div>
<div class="price-wrap">
<label class="label" for="">登记费:</label>
<el-input :disabled="pageType == 2" maxlength="10" @input="validPrice($event, index, 'registrationFee')" @blur="changePrice($event, index, 'registrationFee')" placeholder="请输入" v-model="item.registrationFee"></el-input>
</div>
<div class="price-wrap">
<label class="label" for="">加改装件费用:</label>
<el-input :disabled="pageType == 2" maxlength="10" @input="validPrice($event, index, 'retrofits')" @blur="changePrice($event, index, 'retrofits')" placeholder="请输入" v-model="item.retrofits"></el-input>
</div>
<div class="price-wrap">
<label class="label" for="">代步车费用:</label>
<el-input :disabled="pageType == 2" maxlength="10" @input="validPrice($event, index, 'scooterFare')" @blur="changePrice($event, index, 'scooterFare')" placeholder="请输入" v-model="item.scooterFare"></el-input>
</div>
</template>
<div v-if="!isGH && !isXB" class="price-wrap">
<label class="label" for="">申请金额:</label>
<el-input :disabled="pageType == 2 || renewDisable || !item.approveAmount" maxlength="10" @input="validPrice($event, index, 'customerApplyAmount')" @blur="changePrice($event, index, 'customerApplyAmount')" placeholder="请输入" v-model="item.customerApplyAmount"></el-input>
</div>
<div v-if="!isXB && item.lossAssessmentFlag" class="price-wrap">
<label class="label" for="">保险公司定损金额:</label>
<el-input :disabled="pageType == 2 || renewDisable || !item.approveAmount" maxlength="10" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入" v-model="item.lossAssessmentAmount"></el-input>
</div>
</div>
</template>
<div class="tip" v-else>{{ `同步${isGH ? '核销码' : '合同号'}后自动代入` }}</div>
</div>
</div>
<div v-if="serviceItemsList.length > 0" class="total-price">
<label for="">合计:</label>
<span>
定损批准金为
<span class="price">
<span class="sign">¥</span>
<span>{{ totalPrice }}</span>
</span>
</span>
</div>
<div class="collecter">
<label class="require" for="">收款对象:</label>
<el-radio-group @change="changeObjectType" :disabled="pageType == 2 || renewDisable" v-model="accountForm.objectType">
<el-radio :label="0">店面</el-radio>
<el-radio :label="1">其他</el-radio>
</el-radio-group>
</div>
<div class="account-info gl-form-page">
<glsx-combi-form ref="accountRef" :formRules="accountRule" labelWidth="154px" defaultWidth="432px" :formObj="accountForm" :formData="accountData"></glsx-combi-form>
</div>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
export default {
name: 'repair',
props: {
accountForm: Object,
serviceItemsList: Array,
totalPrice: Number,
isGH: Boolean,
isXB: Boolean,
pageType: {
type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
},
renewDisable:Boolean
},
components: {
glsxCombiForm
},
data() {
return {
accountData: [
{
label: '账户类型',
name: 'accountType',
type: 'radio',
optionList: [
{
confId: 0,
confName: '对公'
},
{
confId: 1,
confName: '对私'
}
],
optionId: 'confId',
optionLabel: 'confName',
isHide: true,
isClear: true,
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '开户行名称',
name: 'branchBankCode',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '账户名称',
name: 'accountName',
type: 'input',
maxlength: 60,
isClear: true,
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '收款账号',
name: 'accountNo',
type: 'input',
maxlength: 25,
isClear: true,
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '收款账号所在省市',
name: 'bankCity',
type: 'select',
placeholder: '可输入所在市关键词查询',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '收款人证件类型',
name: 'payeeIDCardType',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '收款人证件号码',
name: 'payeeIDCardNo',
type: 'input',
maxlength: 25,
isClear: true,
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '收款人联系电话',
name: 'payeePhone',
type: 'input',
maxlength: 15,
isClear: true,
isDisabled: this.pageType == 2 || this.renewDisable
}
],
handlerForm: [
{
label: '经办人:',
placeholder: '请输入经办人',
name: 'handlerName',
type: 'input',
isClear: true,
maxlength: 100,
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '经办人联系号码:',
placeholder: '请输入经办人联系号码',
name: 'handlerPhone',
type: 'input',
maxlength: 11,
isClear: true,
isDisabled: this.pageType == 2 || this.renewDisable
},
// {
// label: '出险经过描述:',
// name: 'reimbursementDesc',
// type: 'input',
// inputType: 'textarea',
// maxlength: 200,
// isClear: true,
// isDisabled: this.pageType == 2
// },
// {
// label: '申请核赔服务:',
// addHtml: 'serviceApply'
// }
],
accountRule: {
accountType: [{ required: true, message: '请选择账户类型', trigger: 'change' }],
branchBankCode: [{ 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' }],
payeeIDCardType: [{ required: true, message: '请选择收款人证件类型', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
payeeIDCardNo: [{ 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'
}
],
// reimbursementDesc: [{ required: true, message: '请输入出险经过描述', trigger: 'change' }]
},
checkList: []
}
},
created() {
this.getBankList()
this.initSaveObj()
},
mounted() {},
watch: {
'accountForm.objectType': {
handler(newVal, oldVal) {
const item = this.accountData.find(item => {
return item.name == 'accountType'
})
item.isHide = newVal == 0
},
immediate: true
}
},
methods: {
toChangeServices(e){
console.log(e);
},
initSaveObj() {
const obj = {
accountType: 0,
branchBankCode: '',
accountName: '',
accountNo: '',
bankCity: '',
payeeIDCardType: '',
payeeIDCardNo: '',
payeePhone: ''
}
this.saveObj = { ...obj }
this.otherSaveObj = { ...obj }
},
changeObjectType(newVal) {
this.$emit('changeObjectType', newVal)
// const item = this.accountData.find(item => {
// return item.name == 'accountType'
// })
// item.isHide = newVal==0
// const obj = {}
// for(let key in this.saveObj){
// obj[key] = this.accountForm[key]
// }
// if(newVal==0){
// this.accountForm.accountType = 0
// this.saveObj = {...obj}
// this.accountForm = {...this.accountForm,...this.otherSaveObj}
// }else{
// this.otherSaveObj = {...obj}
// this.accountForm = {...this.accountForm,...this.saveObj}
// }
// console.log(this.accountForm)
},
getBankList() {
this.$apis.claims.getBankList({}).then(res => {
const branchBankList = this.accountData.find(item => item.name === 'branchBankCode')
branchBankList.optionList = res.branchBank
const accountCityList = this.accountData.find(item => item.name === 'bankCity')
accountCityList.optionList = res.accountCity
const IDCardTypeList = this.accountData.find(item => item.name === 'payeeIDCardType')
IDCardTypeList.optionList = res.cardType
})
},
validPrice(e, id, key) {
let checkPlan = '' + this.serviceItemsList[id][key]
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.serviceItemsList[id], key, checkPlan)
},
changePrice(e, id, key) {
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], key, e.target.value.substr(0, len - 1))
}
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.serviceItemsList[id], key, 1)
}
let maxPrice = 2000000
if(key == 'approveAmount' || key == 'customerApplyAmount') {
maxPrice = 200000
}
if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceItemsList[id], key, maxPrice)
}
}
}
}
</script>
<style lang="scss" scoped>
.report-components {
background: white;
margin-top: 20px;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.edit-form-container {
padding: 20px 0;
.serviceApply_container {
}
}
.require {
width: 115px;
text-align: right;
display: inline-block;
white-space: nowrap;
}
.require::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
.repair-wrap {
.repair-body {
padding: 32px 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
.type-wrap {
display: flex;
& > label {
line-height: 20px;
}
.service-wrap {
max-width: 1250px;
display: flex;
flex-wrap: wrap;
.tip {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 20px;
}
label {
width: 115px;
height: 16px;
}
.service-item {
width: 294px;
box-sizing: border-box;
padding: 10px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e8e8ea;
margin-right: 20px;
margin-bottom: 20px;
display: flex;
flex-direction: column;
height: fit-content;
.name {
font-weight: 600;
height: 20px;
line-height: 20px;
}
.price-wrap {
&:first-child {
margin-top: 0;
}
margin-top: 10px;
display: flex;
align-items: baseline;
label {
white-space: nowrap;
display: inline-block;
width: 130px;
flex-shrink: 0;
}
/deep/ .el-input__inner {
height: 32px;
}
}
}
}
}
.total-price {
margin-left: 115px;
.price {
.sign {
font-size: 14px;
}
font-size: 20px;
font-weight: 500;
color: #ff6d00;
}
}
.collecter {
margin-top: 22px;
}
/deep/ .account-info {
margin: 10px 0 0 115px;
padding: 20px;
background: #f9f9f9;
display: inline-block;
.el-radio {
margin-right: 40px;
}
.el-form-item {
display: block;
}
}
}
}
</style>
<template>
<div class="report-components gl-form-page">
<div class="title">报案信息(客户提交)</div>
<template v-if="[1, 3, 4, 5, 6].includes(pageType) && !renewDisable">
<glsxCombiForm :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div v-if="pageType == 1" style="display: inline-block" slot="syncBtn">
<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>
</template>
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
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}$/
export default {
name: '',
components: {
glsxCombiForm
},
props: {
editForm: Object,
isGH: Boolean,
pageType: {
type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
},
renewDisable: Boolean
},
data() {
return {
regionData: [],
editFormData: [],
showGh: false,
editRule: {
contractNo: [{ required: true, message: '请输入合同号', trigger: 'change' }],
reportDate: [{ required: true, message: '请选择报案日期', trigger: 'change' }],
reimbursementDate: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请选择出险日期'))
} else {
if (new Date(value).getTime() > new Date(this.editForm.reportDate).getTime()) {
callback(new Error('出险日期不能大于报案日期'))
} else {
callback()
}
}
},
trigger: 'change'
}
],
internalReimbursementDate: [{ required: true, message: '请选择出险时间(内部)', trigger: 'change' }],
reporterName: [{ 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'
}
],
reimbursementAddress: [{ required: true, message: '请选择出险地点', trigger: 'change' }],
reimbursementAddr: [{ required: true, message: '请输入出险详细地址', trigger: 'change' }]
},
editDetail: []
}
},
created() {
this.getCityList()
},
mounted() {
this.diffKeyHandle(this.isGH)
let _this = this
setTimeout(() => {
_this.handlerDetail()
}, 500)
},
watch: {
'editForm.reportDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reportDate')
}
},
'editForm.reimbursementDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reimbursementDate')
}
}
},
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.internalReimbursementDate
},
{
label: '出险地点',
value: this.editForm.reimbursementAddr
}
]
console.log(this.editDetail)
},
//*************** */
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)
},
// 处理广汇嘀加不同字段显示
diffKeyHandle(showGh) {
const isDisabled = this.pageType == 2 ? true : false
const dj = [
{
label: '合同号',
name: 'contractNo',
type: 'input',
maxlength: 50,
isDisabled: this.pageType != 1,
isClear: true,
suffixSlot: 'syncBtn'
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
isDisabled,
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reimbursementDate')
}
}
},
{
label: '出险时间(内部)',
name: 'internalReimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
}
},
{
label: '报案日期',
name: 'reportDate',
type: 'limitDatePicker',
dateType: 'datetime',
isDisabled,
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,
isDisabled,
isClear: true
},
{
label: '报案人联系号码',
name: 'reporterPhone',
type: 'input',
maxlength: 11,
isDisabled,
isClear: true
},
{
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
placeholder: '可输入省、市或区关键字搜索',
isDisabled,
isClear: true,
handleChange: cellValue => {
if (!cellValue || !cellValue.length) {
return
}
}
},
{
label: '出险详细地址',
name: 'reimbursementAddr',
type: 'input',
isDisabled,
maxlength: 200,
isClear: true,
inputType: 'textarea'
}
]
const gh = [
{
label: '核销码',
name: 'writeOffCode',
type: 'input',
maxlength: 8,
isDisabled: this.pageType != 1,
isClear: true,
suffixSlot: 'syncBtn'
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
isDisabled,
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reimbursementDate')
}
}
},
{
label: '出险时间(内部)',
name: 'internalReimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
}
},
{
label: '报案日期',
name: 'reportDate',
type: 'limitDatePicker',
dateType: 'datetime',
isDisabled,
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,
isDisabled,
isClear: true
},
{
label: '报案人联系号码',
name: 'reporterPhone',
type: 'input',
maxlength: 11,
isDisabled,
isClear: true
},
{
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
placeholder: '可输入省、市或区关键字搜索',
isDisabled,
isClear: true,
handleChange: cellValue => {
if (!cellValue || !cellValue.length) {
return
}
}
},
{
label: '出险详细地址',
name: 'reimbursementAddr',
type: 'input',
isDisabled,
isClear: true,
maxlength: 200,
inputType: 'textarea'
}
]
this.editFormData = showGh ? gh : dj
},
// 查询订单详情信息(嘀加:合同号,广汇:核销码)
toSearchOrderDetail() {
this.$emit('toSearchOrderDetail')
}
}
}
</script>
<style lang="scss" scoped>
.report-components {
background: white;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.edit-form-container {
padding: 32px 0 12px;
}
/deep/ .el-form-item {
display: flex;
.el-textarea {
textarea {
font-family: auto;
}
}
}
/deep/ #reportDate,
/deep/ #internalReimbursementDate,
/deep/ #reimbursementDate {
.el-date-editor {
.el-input__inner {
padding-left: 15px;
}
.el-input__prefix {
right: 5px;
text-align: right;
left: unset;
}
}
}
}
.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>
<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="srcList" 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="srcList" 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="srcList" 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 :lossTypeList="lossTypeList" :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,
srcList:[]
}
},
components: {
glsxCombiForm,
Card,
fastReview
},
props: {
insuranceAttachmentConfigs: Array,
isDisabled: Boolean,
lossTypeList: Array,
isClaims: Boolean
},
mounted() {},
watch:{
insuranceAttachmentConfigs(val){
this.getImgList(val[0])
}
},
methods: {
getImgList(data){
this.srcList=[]
data.secondClassifyList.forEach(item=>{
item.attachmentList.forEach(img=>{
this.srcList.push(img.attachmentFile)
})
})
},
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
this.getImgList(this.insuranceAttachmentConfigs[this.currentIndx])
},
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="[19, 21, 22, 23, 25, 1, 3].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.serviceItemType == 5" 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.serviceItemType == 4" 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 price_felx">
<div class="ms">
<span>预估损失金额/元:</span>
<span class="price">{{ item.applyAmount || 0 }}</span>
</div>
<div v-if="item.lossAssessmentFlag" class="ms">
<span>保险公司定损金额/元:</span>
<span class="price">{{ item.lossAssessmentAmount || 0 }}</span>
</div>
<div class="ms">
<span>定损批准金额:</span>
<span class="price">{{ item.approveAmount || 0 }}</span>
</div>
<div class="ms type-ms" v-if="item.serviceItemType == 2">
<span>损伤类型:</span>
<el-checkbox-group :disabled="true" v-model="item.damageType">
<el-checkbox :label="1">鼓包</el-checkbox>
<el-checkbox :label="2">爆胎</el-checkbox>
<el-checkbox :label="3">开裂</el-checkbox>
<el-checkbox :label="4">扎伤</el-checkbox>
</el-checkbox-group>
</div>
<template v-if="item.serviceItemType == 1">
<template v-for="ele in allinjureList">
<div :key="ele.key" class="ms" v-if="item[ele.key]">
<span>{{ ele.name }}/元:</span>
<span class="price">{{ item[ele.key] || 0 }}</span>
</div>
</template>
</template>
</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="srcList" 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="srcList" 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 class="messag">
<div class="ms flex_sc">
<div class="ms_txt">寄件快递公司:</div>
<el-input v-model="repotData.expressName" size="mini" class="w432" disabled></el-input>
</div>
<div class="ms flex_sc ma20">
<div class="ms_txt">寄件快递单号:</div>
<el-input v-model="repotData.expressNo" size="mini" class="w432" disabled></el-input>
</div>
</div>
</div>
</div>
<!-- 案件补充说明 -->
<div>
<explanation :isCheck="true" :supplementList="repotData.supplementList2" :operatorName="repotData.updatedBy" :id="repotData.id"></explanation>
</div>
<div v-if="accountMatchResultList.length" class="widget">
<wraning style="margin-top: 16px" :isWatchOrder="true" :list="accountMatchResultList"></wraning>
</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="srcList" 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="srcList" 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="srcList" 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" :operatorName="repotData.updatedBy" :id="repotData.id"></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'
import wraning from '../wraning/index.vue'
export default {
name: 'watchPage',
components: {
explanation,
otherInfo,
wraning
},
data() {
return {
currentIndx: 0,
currentIndxClaims: 0,
activeName: '0',
activeNameClaims: '0',
currentServicesIndex: 0,
activeNameTabs: 'first',
srcList: [],
allinjureList: [
{name: '购置税', key: 'purchaseTax'},
{name: '折旧费', key: 'depreciation'},
{name: '商业险保费', key: 'commercialInsurance'},
{name: '登记费', key: 'registrationFee'},
{name: '加改装件费用', key: 'retrofits'},
{name: '代步车费用', key: 'scooterFare'}
]
}
},
props: {
repotData: Object,
watchData: Array,
accountList: Array,
itemsList: Array,
images: Array,
images2: Array,
otherInfoData: Object,
lossTypeList: Array,
accountMatchResultList: Array
},
mounted() {},
watch: {
images(val) {
this.getImgList(val[0])
},
activeNameTabs(val) {
if (val == 'first') {
this.getImgList(this.images[0])
} else {
this.getImgList(this.images2[0])
}
}
},
methods: {
selectServices(index) {
this.currentServicesIndex = index
},
changeTabs(e) {
this.activeName = e.index.toString()
this.currentIndx = e.index
this.getImgList(this.images[this.currentIndx])
},
changeTabss(e) {
this.activeNameClaims = e.index.toString()
this.currentIndxClaims = e.index
this.getImgList(this.images2[this.currentIndxClaims])
},
getImgList(data) {
this.srcList = []
data.secondClassifyList.forEach(item => {
item.attachmentList.forEach(img => {
this.srcList.push(img.attachmentFile)
})
})
}
}
}
</script>
<style lang="scss" scoped>
.ma16 {
margin-top: 16px;
}
.ma21 {
margin-top: 21px;
}
.ms_lab {
width: 154px;
text-align: right;
}
.w432 {
width: 432px !important;
}
.ma20 {
margin-top: 20px;
}
.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;
}
.ms_txt {
font-size: 14px;
font-weight: 400;
color: #666666;
}
.price_felx {
display: flex;
flex-wrap: wrap;
height: unset !important;
padding: 10px 20px !important;
.ms {
width: 323px;
display: flex;
margin-top: 8px;
.el-checkbox-group {
display: inline-block;
}
}
.type-ms {
width: 100%;
}
}
</style>
<template>
<div class="warning-contianer">
<div class="title">预警信息</div>
<div class="widget">
<template v-for="(item, index) in list">
<div :key="index" class="element">
<label class="label">风险预警{{ index + 1 }}:</label>
<div class="wrap">
<div class="cell">
<label class="cell-label">预警原因:</label>
<div class="cell-value">{{ matchResultDesc[item.matchResult] }}</div>
</div>
<div class="cell">
<label class="cell-label">具体描述:</label>
<div class="cell-value">{{ item.matchResultDesc }}</div>
</div>
<div class="cell">
<label class="cell-label">核实情况说明:</label>
<el-input :disabled="isWatchOrder || item.matchType==1" @input="inputExplain" class="input-value" v-model="item.verifyResultDesc" type="textarea" placeholder="请输入核实后的情况说明" show-word-limit maxlength="100"></el-input>
</div>
<div class="cell">
<label class="cell-label">核实资料补充:</label>
<div class="inner">
<div class="image_group">
<template v-if="item.accountVerifyImagesList.length">
<div v-for="(imgItem, i) in item.accountVerifyImagesList" :key="i" class="imagBox">
<img class="imgItem" :src="imgItem.verifyImage" alt="" />
<div class="img_mask">
<i @click="handlePictureCardPreview(imgItem.verifyImage)" class="el-icon-zoom-in"></i>
<i v-if="!isWatchOrder&&item.matchType!=1" @click="toDeleteImg(index, i)" class="el-icon-delete"></i>
</div>
</div>
</template>
<div class="upload-value">
<el-upload :disabled="isWatchOrder || item.matchType==1" list-type="picture" class="upload_item" action="#" :before-upload="e => beforeAvatarUpload(e)" :on-remove="e => handleRemove(e, index)" :http-request="e => httpRequest(e, index)">
<img class="img" slot="default" :src="upload_img" alt="" />
</el-upload>
</div>
</div>
<p class="tips">图片格式为jpg,jpeg,png,大小10M以内</p>
</div>
</div>
</div>
</div>
</template>
</div>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</template>
<script type="text/ecmascript-6">
import upload_img from '@/assets/images/upload.png'
export default {
name: 'wraning',
components: {},
data() {
return {
upload_img,
dialogVisible: false,
matchResultDesc: {
1: '支付账号异常',
2: '金额过大'
}
}
},
props: {
list: Array,
isWatchOrder: Boolean
},
mounted() {},
methods: {
inputExplain() {
this.$emit('getWarningData', this.list)
},
toDeleteImg(index, i) {
this.list[index].accountVerifyImagesList.splice(i, 1)
this.$emit('getWarningData', this.list)
},
handlePictureCardPreview(url) {
this.dialogImageUrl = url
this.dialogVisible = true
},
beforeAvatarUpload(e) {
console.log(e)
return new Promise((resolve, reject) => {
let AllImgExt = '.png|.jpg|.jpeg'
let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
return reject(false)
}
const size = e.size / 1024 / 1024
let maxSize = 10
let filetype = this.getFileType(e.type)
if (filetype == 'image') {
maxSize = 10
} else {
maxSize = 30
}
if (size > maxSize) {
this.$message.error(`上传文件不可超过${maxSize}M`)
return reject(false)
}
return resolve(true)
})
},
httpRequest({ file: e }, index) {
let size = e.size / 1024 / 1024
let loading = null
// 大于2给loading
if (size > 2) {
loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
}
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const targetNameList = e.name.split('.')
const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1]
const fileType = this.getFileType(e.type)
const paramObj = { file: fileInfo, fileType: fileType }
let param = {}
param.fileList = [paramObj]
this.$apis.common
.uploadFileApi(param, res => {
if (loading != null) {
loading.close()
loading = null
}
// let progress = ((res.loaded / res.total) * 100).toFixed(2)
// if (progress > 90) {
// progress = 90
// }
})
.then(res => {
if (res.code == 0) {
const url = res.data[0]
this.list[index].accountVerifyImagesList.push({ verifyImage: url })
this.$emit('getWarningData', this.list)
}
})
}
},
handleRemove(e, fieldName) {
if (e.status == 'ready') return
},
getFileType(type) {
if (!type) return 'doc'
if (type.indexOf('image') > -1) {
return 'image'
} else {
return 'doc'
}
}
}
}
</script>
<style lang="scss" scoped>
.warning-contianer {
background: white;
margin: 20px 0 0;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.widget {
padding: 32px 20px;
.element {
display: flex;
margin-bottom: 20px;
.label {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
color: #333333;
}
.wrap {
width: 792px;
background: #f9f9f9;
box-sizing: border-box;
padding: 20px;
.cell {
display: flex;
margin-bottom: 20px;
.cell-label {
width: 134px;
font-weight: 400;
font-size: 14px;
color: #666666;
text-align: right;
}
.cell-value {
font-weight: 400;
font-size: 14px;
color: #333333;
}
.input-value {
width: 580px;
}
.inner {
.image_group {
display: flex;
flex-wrap: wrap;
.imagBox {
position: relative;
.imgItem {
width: 104px;
height: 104px;
border-radius: 4px;
margin-right: 10px;
margin-bottom: 10px;
border: 1px dashed #00000026;
}
.img_mask {
display: none;
}
}
.imagBox:hover {
.img_mask {
display: block;
width: 104px;
height: 104px;
border-radius: 4px;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
transition: opacity 0.3s;
display: flex;
align-items: center;
justify-content: center;
i {
color: white;
cursor: pointer;
font-weight: 400;
font-size: 21px;
}
i:first-child {
margin-right: 12px;
}
i:last-child {
margin-right: 0;
}
}
}
}
.upload-value {
width: 104px;
height: 104px;
border: 1px dashed #00000026;
border-radius: 4px;
.upload_item {
width: 104px;
height: 104px;
.img {
width: 104px;
height: 104px;
border-radius: 4px;
}
/deep/.el-upload-list--picture {
display: none;
}
}
}
.tips {
font-weight: 400;
font-size: 14px;
color: #999999;
margin-top: 8px;
}
}
}
.cell:last-child {
margin-bottom: 0;
}
}
}
.element:last-child {
margin-bottom: 0;
}
}
}
</style>
<template>
<div class="order-container-page">
<!-- 2.查看 3.重新提交 5.定损审核 6.核赔审核 8.运营经理审核 -->
<template v-if="pageType == 2">
<!-- 该组件是详情页,在里面判断是否有是核赔环节还是定损环节来是否展示两个tab -->
<WatchData :accountMatchResultList="accountMatchResultList" :lossTypeList.sync="lossTypeList" :otherInfoData.sync="otherInfoData" :images="insuranceAttachmentConfigs" :images2="claimsAttachmentConfigs" :itemsList.sync="itemList" :repotData.sync="repotData" :accountList.sync="accountList" :watchData.sync="watchData"></WatchData>
</template>
<!-- routeInfo.status 查看ghIndex.vue文件的statusList,status>10就是签名授权以及待核赔往后的流程了 -->
<template v-else-if="(pageType == 5 || pageType == 6 || pageType == 8) && damageList.includes(routeInfo.status)">
<CheckData @getCurrentLoosType="getLossType" :lossTypeList.sync="lossTypeList" :otherInfoData.sync="otherInfoData" :itemList.sync="itemList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs" :repotData.sync="repotData"></CheckData>
</template>
<template v-else-if="(pageType == 5 || pageType == 4 || pageType == 3 || pageType == 6 || pageType == 8) && claimsList.includes(routeInfo.status)">
<div class="tab_wrap">
<el-tabs v-model="activeName">
<el-tab-pane class="bg" label="核赔信息" name="first">
<!-- 该组件是核赔提交信息 -->
<CheckClaims @getWarningInfo="getWarningInfo" :accountMatchResultList="accountMatchResultList" ref="checkclaims" @getCurrentLoosType="getLossType" :lossTypeList.sync="lossTypeList" @changeObjectType="changeObjectType" :insuranceAttachmentConfigs.sync="claimsAttachmentConfigs" :repotData.sync="repotData" :itemsList.sync="itemList" :accountForm.sync="accountForm"></CheckClaims>
</el-tab-pane>
<el-tab-pane class="bg" label="定损信息" name="second">
<!-- 该组件是定损提交信息 此时是核赔阶段,定损是只能看的,所以isDisabled为true-->
<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' && orderMsg.status != 21" class="btn-box">
<el-button plain class="btn-three" @click="toBackList">取消</el-button>
<el-button plain @click="toNoPassOrder">不通过</el-button>
<el-button type="primary" @click="toPassOrder">通过</el-button>
</div>
<!-- 状态 21 是待运营经理审核 -->
<div v-if="pageType != 2 && activeName != 'second' && orderMsg.status == 21" class="btn-box">
<el-button plain class="btn-three" @click="toBackList">取消</el-button>
<el-button plain @click="toNoPassOrder">不通过</el-button>
<el-button type="primary" @click="toPassOrderAddWarning">通过</el-button>
</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>
</template>
<script type="text/ecmascript-6">
import * as dayjs from 'dayjs'
import WatchData from './components/watch/index.vue'
import CheckData from './components/check/index.vue'
import CheckClaims from './components/checkClaims/index.vue'
import qrCode from '@/components/qr-code'
import glsxCombiForm from '@/components/glsx-combi-form'
const injureTypeList = ['drumPack', 'flatTires', 'dehiscence', 'punctureWounds']
// import util from "@/util"
export default {
name: 'ghOrder',
components: {
WatchData,
CheckData,
CheckClaims,
qrCode,
glsxCombiForm
},
data() {
return {
damageList: [32, 33, 35, 34],
claimsList: [21, 22, 23, 25, 1, 2, 3],
routeInfo: {},
pageType: 1,
watchData: [], // 查看状态下
accountList: [],
repotData: {
contractNo: '',
reporterName: '',
reporterPhone: '',
reportDate: '',
reimbursementDate: '',
internalReimbursementDate: '',
reimbursementAddr: '',
handlerName: '',
handlerPhone: '',
serviceCodes: []
},
activeName: 'first',
accountForm: {
objectType: 0,
accountType: 0,
branchBankCode: '',
accountName: '',
accountNo: '',
bankCity: '',
payeeIDCardType: '',
payeeIDCardNo: '',
payeePhone: '',
handlerName: '',
handlerPhone: ''
},
// 弹窗
showNoPassDialog: false,
showPassedDialog: false,
noPassObj: {
reason: '',
desc: ''
},
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
}
],
isSave: true,
testServiceList: [],
insuranceAttachmentConfigs: [],
itemList: [],
otherInfoData: {},
claimsAttachmentConfigs: [],
lossTypeList: [],
accountMatchResultList: [],
orderMsg: {
id: 0,
status: 0
}
}
},
mounted() {
// 获取页面传参:主要是编辑状态和订单状态
// 5 审核+定损 审核+核赔
const urlParam = this.$route.params
const urlQuery = JSON.parse(decodeURIComponent(urlParam.id))
this.pageType = urlQuery.editNo
this.routeInfo = urlQuery
if (this.routeInfo.orderId) {
this.getDetailData(this.routeInfo.orderId)
}
},
methods: {
// 获取订单详情
getDetailData(id) {
this.$apis.claims.getDjClaimsDetailApi({ id }).then(res => {
if (!res.supplementList1?.length) {
res.supplementList1 = []
res.supplementList1.push({ content: '', claimsId: res.id })
}
if (!res.supplementList2?.length) {
res.supplementList2 = []
res.supplementList2.push({ content: '', claimsId: res.id })
}
this.orderMsg = {
id: res.id,
status: res.status
}
this.repotData = {
id: res.id,
status: res.status,
contractNo: res.contractNo,
reporterName: res.reporterName,
reporterPhone: res.reporterPhone,
reportDate: dayjs(res.reportDate).format('YYYY-MM-DD HH:mm:ss'),
reimbursementDate: dayjs(res.reimbursementDate).format('YYYY-MM-DD HH:mm:ss'),
internalReimbursementDate: dayjs(res.internalReimbursementDate || res.reimbursementDate).format('YYYY-MM-DD HH:mm:ss'),
reimbursementAddr: res.reimbursementAddr,
handlerName: res.handlerName,
handlerPhone: res.handlerPhone,
serviceCodes: [],
reimbursementProvinceName: res.reimbursementProvinceName || '',
reimbursementCityName: res.reimbursementCityName || '',
reimbursementCountiesName: res.reimbursementCountiesName || '',
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,
updatedBy: res.updatedBy,
expressName:res.expressName,
expressNo:res.expressNo,
exceptionImgUrl: res.exceptionImgUrl,
preStatus: res.preStatus
}
// 图片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.serviceItemType == 4) {
el.lossType = '3'
} else if (el.secondClassifyName.indexOf('车牌') != -1 && el.serviceItemType == 4) {
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.serviceItemType == 4) {
let lossType = res.itemsList?.[0] ? res.itemsList[0].lossType : 3
el.lossType = lossType
}
services.push(el.serviceItemName)
})
item.services = [...new Set(services)]
}
})
this.insuranceAttachmentConfigs = res.insuranceAttachmentConfigs
this.claimsAttachmentConfigs = res.claimsAttachmentConfigs
// 详情处理服务项目数据
res.itemsList.map(item => {
item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount
item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : null
item.lossAssessmentAmount = item.lossAssessmentAmount ? (item.lossAssessmentAmount / 100).toFixed(2) : item.lossAssessmentAmount
const priceList = ['purchaseTax', 'depreciation', 'commercialInsurance', 'registrationFee', 'retrofits', 'scooterFare']
priceList.forEach(eleKey => {
item[eleKey] = item[eleKey] ? Number((item[eleKey] / 100).toFixed(2)) : item[eleKey]
})
item.lossTypeList = []
if(item.serviceItemType == 2) {
item.damageType = item?.damageType ? item.damageType.split(',').map(ele => Number(ele)) : []
}
if (item.serviceItemType == 4 && 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
}
res.accountMatchResultList.forEach(el => {
let arr = []
el.accountVerifyImagesList.forEach(ele => {
let obj = { verifyImage: ele.verifyImage }
arr.push(obj)
})
el.accountVerifyImagesList = arr
})
this.accountMatchResultList = res.accountMatchResultList
})
},
// 处理查看状态下数据展示
handlerWatch(obj, type) {
if (type == 1) {
this.watchData = [
{
name: '报案人:',
value: obj.reporterName
},
{
name: '报案人电话:',
value: obj.reporterPhone
},
{
name: '报案日期:',
value: obj.reportDate
},
{
name: '出险日期:',
value: obj.reimbursementDate
},
{
name: '出险时间(内部):',
value: obj.internalReimbursementDate
},
{
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
}
]
}
},
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)
// }
},
// 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() {
this.isSave = false
const _target = this.itemList?.find(item => item.applyAmount && item.lossAssessmentFlag && !item.lossAssessmentAmount)
if(_target) return this.$message.error(`请输入${_target.serviceItemName}的保险公司定损金额`)
// applyAmount 预估损失金额 approveAmount 定损批准金额
if (this.orderMsg.status == 23 || this.orderMsg.status == 2) {
// const checkList = ['purchaseTax','depreciation','commercialInsurance','registrationFee','retrofits', 'scooterFare']
// 购置税+折旧费+商业险保费+登记费+加改装件费用+代步车费用 至少一个必填
const priceTarget = this.itemList?.find(item => item.serviceItemType == 1 && item.approveAmount > 0 && !item.purchaseTax && !item.depreciation && !item.commercialInsurance && !item.registrationFee && !item.retrofits && !item.scooterFare)
if(priceTarget) return this.$message.error(`${priceTarget.serviceItemName}的购置税、折旧费、商业险保费、登记费、加改装件费用、代步车费用,至少输入一个`)
// 最少选择一个损伤类型
const injureTarget = this.itemList?.find(item => item.serviceItemType == 2 && item.approveAmount > 0 && !item?.damageType?.length)
if(injureTarget) return this.$message.error(`至少选择一个${injureTarget.serviceItemName}的损伤类型`)
const isPass = this.verifyImages(this.claimsAttachmentConfigs)
if (!isPass) {
this.$message({
message: '图片需要全部通过才允许此操作',
type: 'error'
})
return
}
this.hepeiPass()
return
}
const isPass = this.verifyImages(this.insuranceAttachmentConfigs)
if (!isPass) {
this.$message({
message: '图片需要全部通过才允许此操作',
type: 'error'
})
return
}
this.showPassedDialog = true
},
// 校验图片是否已全部校验
verifyImages(arr) {
let pass = true
arr.forEach(item => {
if (item.firstClassifyName.indexOf('其他') == -1) {
item.secondClassifyList.forEach(child => {
child.attachmentList.forEach(last => {
if (!last.auditStatus) {
if (child.serviceItemType != 4 || (child.lossType && this.lossTypeList.includes(child.lossType))) {
console.log(child)
pass = false
}
// 判断auditStatus没通过就报错,但是钥匙及车牌重置服务会因为勾选才显示,存在没通过的
}
})
})
} 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: '',
contractNo: this.repotData.contractNo
}
if (isNopass) {
para.auditStatus = 0
para.reasonForFailureCode = this.noPassObj.reason
para.reasonForFailure = this.noPassObj.desc
}
if (this.orderMsg.status == 21) {
let _accountMatchResultList = []
if (this.queryList && this.queryList.length > 0) {
const _temArr = JSON.stringify(this.queryList)
_accountMatchResultList = JSON.parse(_temArr)
_accountMatchResultList.forEach(el => {
delete el.matchType
})
}
para.accountMatchResultList = _accountMatchResultList
}
let loading = this.createLoading()
this.$apis.claims.checkDjClaimsOrderApi(para).then(res => {
loading.close()
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/claims/index' })
}
})
},
endCaseFn(){
this.$confirm('确定结束此案件吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.comfirmPass(1)
}
}
})
},
comfirmPass(isEndCase) {
let para = this.handleParams()
para.auditStatus = isEndCase ? 2 : 1 // 2结束案件,1 通过
let loading = this.createLoading()
this.$apis.claims.checkDjOrderApi(para).then(res => {
loading.close()
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/claims/index' })
}
this.canclePass()
})
},
canclePass() {
this.showPassedDialog = false
},
// 不通过
toNoPassOrder() {
this.showNoPassDialog = true
},
// 点击不通过
comfirmNoPass() {
if (this.orderMsg.status == 23 || this.orderMsg.status == 2 || this.orderMsg.status == 21) {
this.hepeiPass(true)
return
}
let para = this.handleParams()
para.auditStatus = 0
para.reasonForFailureCode = this.noPassObj.reason
para.reasonForFailure = this.noPassObj.desc
let loading = this.createLoading()
this.$apis.claims.checkDjOrderApi(para).then(res => {
loading.close()
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/claims/index' })
}
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()
}
let para = {
...explainObj,
...imageObj,
...itemsObj,
...this.orderMsg,
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') : '',
internalReimbursementDate: this.repotData.internalReimbursementDate ? dayjs(this.repotData.internalReimbursementDate).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) * 10 * 10).toFixed(0) : 0,
signatureAuth: this.repotData.signatureAuth || ''
}
return para
},
// 案件补充说明
handlerExplain() {
let obj = {}
if (this.orderMsg.status == 23 || this.orderMsg.status == 2) {
this.repotData.supplementList2.forEach((item, index) => {
let idx = `supplementList2[${index}].id`
let claimsId = `supplementList2[${index}].claimsId`
let content = `supplementList2[${index}].content`
let suppType = `supplementList2[${index}].suppType`
let operation = `supplementList2[${index}].operation`
let temp = {
[idx]: item.id,
[claimsId]: this.orderMsg.id,
[content]: item.content,
[suppType]: item.suppType,
[operation]: this.isSave && !item.id ? 0 : 1
}
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 operation = `supplementList1[${index}].operation`
let temp = {
[idx]: item.id,
[claimsId]: this.orderMsg.id,
[content]: item.content,
[suppType]: item.suppType,
[operation]: this.isSave && !item.id ? 0 : 1
}
Object.assign(obj, temp)
})
}
return obj
},
// 图片数据处理
hanlerImg() {
let imgs = []
let serviceImgs = []
if (this.orderMsg.status == 23 || 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 (serviceImgs.length) {
imgs = [...serviceImgs, ...imgs]
}
let obj = {}
let type = this.orderMsg.status == 23 || this.orderMsg.status == 2 ? 2 : 1
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 contractNo = `itemsList[${index}].contractNo`
let approveAmount = `itemsList[${index}].approveAmount`
let applyAmount = `itemsList[${index}].applyAmount`
let lossAssessmentAmount = `itemsList[${index}].lossAssessmentAmount`
let purchaseTax = `itemsList[${index}].purchaseTax`
let depreciation = `itemsList[${index}].depreciation`
let commercialInsurance = `itemsList[${index}].commercialInsurance`
let registrationFee = `itemsList[${index}].registrationFee`
let retrofits = `itemsList[${index}].retrofits`
let scooterFare = `itemsList[${index}].scooterFare`
let claimsId = `itemsList[${index}].claimsId`
let lossType = `itemsList[${index}].lossType`
let damageType = `itemsList[${index}].damageType`
let temp = {
[idx]: item.id,
[serviceItemCode]: item.serviceItemCode,
[serviceItemName]: item.serviceItemName,
[contractNo]: this.repotData.contractNo,
[approveAmount]: this.handlePrice(item.approveAmount) || 0,
[applyAmount]: this.handlePrice(item.applyAmount) || 0,
[lossAssessmentAmount]: this.handlePrice(item.lossAssessmentAmount) || 0,
[purchaseTax]: this.handlePrice(item.purchaseTax),
[depreciation]: this.handlePrice(item.depreciation),
[commercialInsurance]: this.handlePrice(item.commercialInsurance),
[registrationFee]: this.handlePrice(item.registrationFee),
[retrofits]: this.handlePrice(item.retrofits),
[scooterFare]: this.handlePrice(item.scooterFare),
[claimsId]: this.orderMsg.id,
[lossType]: item.serviceItemType == 4 ? item.lossTypeList.join(',') : item.lossType,
[damageType] : item.serviceItemType == 2 && item?.damageType?.length ? item.damageType.join(',') : ''
}
Object.assign(itemObj, temp)
})
return itemObj
},
handlePrice(price) {
return price ? (Number(price) * 10 * 10).toFixed(0) : null
},
// 保存草稿参数
savePara() {
const operation = 0
let itemObj = this.handlerServices()
let imgObj = this.hanlerImg()
let explainObj = this.handlerExplain()
let para = {
...itemObj,
...imgObj,
...explainObj,
operation,
...this.orderMsg,
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') : '',
internalReimbursementDate: this.repotData.internalReimbursementDate ? dayjs(this.repotData.internalReimbursementDate).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) * 10 * 10).toFixed(0) : 0
}
let claims = {
operation,
...itemObj,
...explainObj,
...this.orderMsg,
attachments3: this.handleJieGpu(3),
// attachments2: this.handleJieGpu(2),
bankAccount: this.handleJieGpu(4),
contractNo: this.repotData.contractNo,
...imgObj
}
return this.orderMsg.status == 23 || this.orderMsg.status == 2 ? claims : para
},
// 保存订单
toSaveOrder() {
this.isSave = true
let para = this.savePara()
const name = this.orderMsg.status == 23 || this.orderMsg.status == 2 ? 'saveClaimsCG' : 'saveCG'
let loading = this.createLoading()
this.$apis.claims[name](para).then(res => {
if(res){
this.$message({
message: '保存成功',
type: 'success'
})
this.toBackList()
}
}).finally(end => {
loading.close()
})
},
// 返回上一页
toBackList() {
this.$router.push({ path: '/claims/index' })
},
// 输入校验
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') // 只能输入两个小数
}
this.$set(this.itemList[id], type, checkPlan)
},
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))
}
if(type == 'applyAmount'){
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({
lock: true,
text: 'loading...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)',
customClass: 'loadingClass'
})
return loading
},
// 预警信息版本
getWarningInfo(e) {
this.queryList = e
},
toPassOrderAddWarning() {
this.hepeiPass()
}
}
}
</script>
<style lang="scss" scoped>
.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;
}
}
}
}
.btn-box {
display: flex;
justify-content: center;
align-items: center;
margin: 16px 0 20px 0;
}
.danger-btn {
border-color: #f56c6c;
color: #f56c6c;
}
.danger-btn:hover {
background: #f56c6c;
border-color: #f56c6c;
color: #fff;
}
.danger-btn:focus {
background: #dd6161;
border-color: #dd6161;
color: #fff;
outline: 0;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!