Commit ab2c1514 by zhangquan

核赔联调

1 parent 493c43e6
......@@ -38,6 +38,41 @@
<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>
......
......@@ -29,6 +29,41 @@
<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>
......
<template>
<div class="order-container-page">
<!-- 2.查看 6.重新提交 5.定损审核 7.核赔审核 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 == 7 || pageType == 8) && routeInfo.status < 11">
<CheckData @getCurrentLoosType="getLossType" :lossTypeList.sync="lossTypeList" :otherInfoData.sync="otherInfoData" :itemList.sync="itemList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs" :repotData.sync="repotData"></CheckData>
</template>
......@@ -10,9 +13,11 @@
<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>
......@@ -27,6 +32,7 @@
<el-button plain @click="toNoPassOrder">不通过</el-button>
<el-button type="primary" @click="toPassOrder">通过</el-button>
</div>
<!-- 状态 26 是待运营经理审核 -->
<div v-if="pageType != 2 && activeName != 'second' && orderMsg.status == 26" class="btn-box">
<el-button plain class="btn-three" @click="toBackList">取消</el-button>
<el-button plain @click="toNoPassOrder">不通过</el-button>
......@@ -65,6 +71,7 @@ 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',
......@@ -282,12 +289,19 @@ export default {
this.insuranceAttachmentConfigs = res.insuranceAttachmentConfigs
this.claimsAttachmentConfigs = res.claimsAttachmentConfigs
// 服务list
// 详情处理服务项目数据
res.itemsList.map(item => {
item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount
item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : 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.serviceItemCode == 'SC0006' && item.lossType) {
item.lossTypeList = item.lossType.split(',')
this.lossTypeList = item.lossTypeList
......@@ -411,7 +425,17 @@ export default {
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 == 12 || this.orderMsg.status == 2) {
// const checkList = ['purchaseTax','depreciation','commercialInsurance','registrationFee','retrofits', 'scooterFare']
// 购置税+折旧费+商业险保费+登记费+加改装件费用+代步车费用 至少一个必填
const priceTarget = this.itemList?.find(item => item.serviceItemType == 1 && ! 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?.damageType?.length)
if(injureTarget) return this.$message.error(`至少选择一个${injureTarget.serviceItemName}的损伤类型`)
const isPass = this.verifyImages(this.claimsAttachmentConfigs)
if (!isPass) {
this.$message({
......@@ -745,7 +769,7 @@ export default {
getLossType(e) {
this.lossTypeList = e
},
// 服务项目数据处理
// 核赔审核,定损审核提交的时候,金额那一块的数据处理
handlerServices() {
let itemObj = {}
this.itemList.forEach((item, index) => {
......@@ -757,24 +781,41 @@ export default {
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,
[writeOffCode]: this.repotData.writeOffCode,
[contractNo]: this.repotData.contractNo,
[approveAmount]: item.approveAmount ? (Number(item.approveAmount) * 10 * 10).toFixed(0) : 0,
[applyAmount]: item.applyAmount ? (Number(item.applyAmount) * 10 * 10).toFixed(0) : 0,
[lossAssessmentAmount]: item.lossAssessmentAmount ? (Number(item.lossAssessmentAmount) * 10 * 10).toFixed(0) : 0,
[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.serviceItemCode == 'SC0006' ? item.lossTypeList.join(',') : item.lossType
[lossType]: item.serviceItemCode == 'SC0006' ? 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
......
......@@ -401,7 +401,13 @@ export default {
this.accountForm.objectType = 0
}
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
this.serviceItemsList = serviceItemsList || []
this.serviceItemsList =
serviceItemsList.map(item => {
return {
...item,
damageType: item?.damageType ? item.damageType.split(',').map(ele => Number(ele)) : []
}
}) || []
console.log(this.serviceItemsList, ' this.serviceItemsList ')
// 以下是文件数据
......@@ -463,7 +469,13 @@ export default {
for (let key in this.editForm) {
this.editForm[key] = res[key] || this.editForm[key]
}
this.serviceItemsList = serviceItemsList || []
this.serviceItemsList =
serviceItemsList.map(item => {
return {
...item,
damageType: []
}
}) || []
this.getAccountInfo(contractNo)
})
},
......@@ -539,6 +551,17 @@ export default {
this.$message.error(`请输入${lossAssTipItem.serviceItemName}的保险公司定损金额`)
return false
}
const priceTarget = this.serviceItemsList?.find(item => item.serviceItemType == 1 && !item.purchaseTax && !item.depreciation && !item.commercialInsurance && !item.registrationFee && !item.retrofits && !item.scooterFare)
if (priceTarget) {
this.$message.error(`${priceTarget.serviceItemName}的购置税、折旧费、商业险保费、登记费、加改装件费用、代步车费用,至少输入一个`)
return false
}
const injureTarget = this.serviceItemsList?.find(item => item.serviceItemType == 2 && !item?.damageType?.length)
console.log(injureTarget, 'injureTarget')
if (injureTarget) {
this.$message.error(`至少选择一个${injureTarget.serviceItemName}的损伤类型`)
return false
}
let fileTip = false
for (let key in this.materialForm) {
if (this.materialForm[key].length < 1 && !fileTip) {
......@@ -593,6 +616,36 @@ export default {
lossAssessmentTarget[item.serviceItemCode] = item.lossAssessmentAmount
}
})
// this.serviceItemsList.forEach((item, index) => {
// const { purchaseTax, depreciation, commercialInsurance, registrationFee, retrofits, scooterFare, serviceItemType, damageType } = item
// const _purchaseTax = `serviceItemsList[${index}].purchaseTax`
// const _depreciation = `serviceItemsList[${index}].depreciation`
// const _commercialInsurance = `serviceItemsList[${index}].commercialInsurance`
// const _registrationFee = `serviceItemsList[${index}].registrationFee`
// const _retrofits = `serviceItemsList[${index}].retrofits`
// const _scooterFare = `serviceItemsList[${index}].scooterFare`
// const _damageType = `serviceItemsList[${index}].damageType`
// params[_purchaseTax] = purchaseTax
// params[_depreciation] = depreciation
// params[_commercialInsurance] = commercialInsurance
// params[_registrationFee] = registrationFee
// params[_retrofits] = retrofits
// params[_scooterFare] = scooterFare
// params[_damageType] = serviceItemType == 2 && damageType?.length ? damageType.join(',') : ''
// })
params.serviceItemsList = this.serviceItemsList.map(item => {
const { purchaseTax, depreciation, commercialInsurance, registrationFee, retrofits, scooterFare, serviceItemCode, serviceItemType, damageType } = item
return {
purchaseTax,
depreciation,
serviceItemCode,
commercialInsurance,
registrationFee,
retrofits,
scooterFare,
damageType: item.serviceItemType == 2 && item?.damageType?.length ? item.damageType.join(',') : ''
}
})
params.approveAmounts = JSON.stringify(tagetObj)
params.customerApplyAmounts = JSON.stringify(customesPriceObj)
params.lossAssessmentAmounts = JSON.stringify(lossAssessmentTarget)
......@@ -620,7 +673,6 @@ export default {
if (!this.routeInfo.isGH) {
params.equitySource = 2
}
console.log(params, 'params')
this.$apis.claims.commitClaimsOrder(params).then(res => {
loading.close()
if (res) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!