Commit 8f09f0a4 by 前端

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

上线合并

See merge request !71
2 parents e469cd81 38b66fe3
......@@ -21,6 +21,17 @@ const getContractListApi = params => {
})
}
//获取产品模板列表
const getBaseTempListApi = params => {
params.method = `scrm.api.equity.service.contract.base.template.list`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const saveContractTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.template.update`
return http({
......@@ -57,7 +68,8 @@ const copyTemplateApi = params => {
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
sign: true,
returnAll: true
})
}
......@@ -68,7 +80,8 @@ const copyBaseTemplateApi = params => {
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
sign: true,
returnAll: true
})
}
......@@ -79,7 +92,8 @@ const babchCopyTemplateApi = params => {
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
sign: true,
returnAll: true
})
}
......@@ -148,6 +162,7 @@ const addCategoryApi = params => {
export default {
getContractListApi,
getBaseTempListApi,
getBaseContractListApi,
saveContractTemplateApi,
getContractDetailApi,
......
......@@ -77,15 +77,17 @@ export default {
label: '合同编号',
name: 'id',
type: 'input',
maxlength: 9,
isClear: true,
isHide: this.changeContractObj.isBase
isHide: this.changeContractObj.isBase == 1
},
{
label: '合同名称',
name: 'templateName',
type: 'input',
maxlength: 20,
isClear: true,
isHide: !this.changeContractObj.isBase
isHide: this.changeContractObj.isBase != 1
}
],
tableParams: {
......@@ -98,7 +100,7 @@ export default {
}
},
created() {
if (this.changeContractObj.isBase) {
if (this.changeContractObj.isBase == 1) {
this.tableParams.tableColumns = [
...TABLE_HEAD,
{
......@@ -124,7 +126,7 @@ export default {
// 预览
handlePdf(row) {
if (this.changeContractObj.isBase) {
if (this.changeContractObj.isBase == 1) {
this.pdfUrl = row.previewUrl
this.handlePdfClose()
return
......@@ -135,14 +137,17 @@ export default {
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.contractManager.printContractApi({ packageCode: row.packageCode, merchantId: row.merchantId }).then(res => {
this.pdfUrl = res
this.handlePdfClose()
this.$apis.contractManager.printContractApi({ packageCode: row.packageCode, merchantId: row.merchantId || '', baseFlag: this.changeContractObj.isBase == 2 ? 1 : 0 }).then(res => {
loading.close()
if (res) {
this.pdfUrl = res
this.handlePdfClose()
}
})
},
beforeSearchFn() {
this.getListApi = this.changeContractObj.isBase ? this.$apis.contractManager.getBaseContractListApi : this.$apis.contractManager.getContractListApi
const _apiStr = this.changeContractObj.isBase == 1 ? 'getBaseContractListApi' : this.changeContractObj.isBase == 2 ? 'getBaseTempListApi' : 'getContractListApi'
this.getListApi = this.$apis.contractManager[_apiStr]
return new Promise(resolve => {
resolve()
})
......@@ -151,10 +156,15 @@ export default {
this.$refs.contractTableRef.refreshTable()
},
handleConfirm() {
if (!this.curId) return this.$message.error('请选择变更模板的合同')
if (!this.curId)
return this.$message({
message: '请选择变更模板的合同',
type: 'error',
customClass: 'msgHierarchy'
})
let params = {}
let API = 'babchCopyTemplateApi' //默认为商品合同批量更换接口
if (this.changeContractObj.isBase) {
if (this.changeContractObj.isBase == 1) {
//产品合同
API = 'copyBaseTemplateApi'
params = {
......@@ -164,13 +174,15 @@ export default {
}
} else {
params = {
sourceId: this.curId
sourceId: this.curId,
baseFlag: this.changeContractObj.isBase == 2 ? 1 : 0
}
if (this.changeContractObj.id) {
//单个商品合同更换
params.targetId = this.changeContractObj.id
API = 'copyTemplateApi'
} else {
//商品合同批量
params.targetIds = this.changeContractObj.ids
}
}
......@@ -182,9 +194,15 @@ export default {
})
this.$apis.contractManager[API](params)
.then(res => {
if (res) {
if (res.data) {
this.$message.success('变更模板成功')
this.handleClose()
} else {
this.$message({
message: res.message,
type: 'error',
customClass: 'msgHierarchy'
})
}
})
.finally(end => {
......
......@@ -18,8 +18,9 @@
<span slot="auth-button" slot-scope="row" :data="scope.scope">
<el-button type="text" v-if="scope.scope.packageType == 1" @click="handlePdf(row.scope)">打印</el-button>
<el-button type="text" v-if="scope.scope.packageType == 1" @click="editContract(row.scope)">编辑</el-button>
<el-button type="text" v-if="scope.scope.packageType == 1" @click="changeTmpl(row.scope)">更换模板</el-button>
<el-button type="text" v-if="scope.scope.packageType == 1" @click="changeTmpl(row.scope, 1)">更换模板</el-button>
<el-button type="text" v-if="scope.scope.packageType == 1" @click="initTmpl(row.scope)">初始化模板</el-button>
<el-button type="text" v-if="scope.scope.packageType == 1" @click="changeTmpl(row.scope, 2)">更换合同</el-button>
<el-button type="text" @click="editCategoryFn(row.scope, 1)">编辑分类</el-button>
</span>
</GLTable>
......@@ -328,7 +329,8 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
changeContractObj: {
visible: false,
isBase: true,
isBase: 1,
id: '',
skuId: '',
skuPackageCode: '',
baseTemplateId: ''
......@@ -426,11 +428,12 @@ export default {
this.drawer = true
},
// 更换模板
changeTmpl({ skuPackageCode, skuId }) {
changeTmpl({ skuPackageCode, skuId, contractId }, baseType) {
this.changeContractObj = {
visible: true,
isBase: true, // true产品模板
isBase: baseType, // true产品模板
skuId,
id: contractId,
skuPackageCode,
baseTemplateId: ''
}
......
......@@ -43,6 +43,7 @@ import caseDesc from '../Renew/components/CaseDesc/caseDesc.vue'
import claimsNote from '../Renew/components/ClaimsNote/index'
import util from '@/util/util'
import glsxCombiForm from '@/components/glsx-combi-form'
import NP from 'number-precision'
export default {
name: 'detail',
components: {
......@@ -196,7 +197,18 @@ 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,
purchaseTax: item.purchaseTax ? NP.divide(item.purchaseTax, 100) : item.purchaseTax,
depreciation: item.depreciation ? NP.divide(item.depreciation, 100) : item.depreciation,
commercialInsurance: item.commercialInsurance ? NP.divide(item.commercialInsurance, 100) : item.commercialInsurance,
registrationFee: item.registrationFee ? NP.divide(item.registrationFee, 100) : item.registrationFee,
retrofits: item.retrofits ? NP.divide(item.retrofits, 100) : item.retrofits,
scooterFare: item.scooterFare ? NP.divide(item.scooterFare, 100) : item.scooterFare
}
}) || []
// 以下是文件数据
res.files.forEach(item => {
let obj = { url: item.fileUrl, fileType: item.fileType, name: item.fileName, progress: 100, mark: item.mark, fileCode: item.fileCode }
......
......@@ -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>
......@@ -335,9 +370,9 @@ export default {
if (Number(e.target.value) < minPrice) {
this.$set(this.itemsList[id], type, 1)
}
let maxPrice = 200000
if(type == 'lossAssessmentAmount') {
maxPrice = 2000000
let maxPrice = 2000000
if(type == 'applyAmount' || type == 'approveAmount') {
maxPrice = 200000
}
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemsList[id], type, maxPrice)
......
......@@ -80,7 +80,8 @@ export default {
glsxCombiForm
},
props: {
images: Array
images: Array,
lossTypeList: Array,
},
data() {
return {
......@@ -196,7 +197,7 @@ export default {
} else {
el.secondClassifyList.forEach(ele => {
ele.attachmentList.forEach(ke => {
if (ke.attachmentFile) {
if ((ele.serviceItemCode != 'SC0006' || (ele.lossType && this.lossTypeList.includes(ele.lossType))) && ke.attachmentFile) {
ke.secondClassifyName = ele.secondClassifyName
arr.push(ke)
}
......
......@@ -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>
......@@ -177,6 +212,7 @@ export default {
handlerForm: [
{
label: '经办人:',
placeholder: '请输入经办人',
name: 'handlerName',
type: 'input',
isClear: true,
......@@ -185,6 +221,7 @@ export default {
},
{
label: '经办人联系号码:',
placeholder: '请输入经办人联系号码',
name: 'handlerPhone',
type: 'input',
maxlength: 11,
......@@ -341,9 +378,9 @@ export default {
if (Number(e.target.value) < minPrice) {
this.$set(this.serviceItemsList[id], key, 1)
}
let maxPrice = 200000
if(key == 'lossAssessmentAmount') {
maxPrice = 2000000
let maxPrice = 2000000
if(key == 'approveAmount' || key == 'customerApplyAmount') {
maxPrice = 200000
}
if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceItemsList[id], key, maxPrice)
......@@ -422,6 +459,7 @@ export default {
margin-bottom: 20px;
display: flex;
flex-direction: column;
height: fit-content;
.name {
font-weight: 600;
......@@ -435,7 +473,6 @@ export default {
margin-top: 10px;
display: flex;
align-items: baseline;
flex: 1;
label {
white-space: nowrap;
display: inline-block;
......
......@@ -119,7 +119,7 @@
</el-tab-pane>
</el-tabs>
</Card>
<fast-review :images.sync="insuranceAttachmentConfigs" ref="fastReviewDialog"></fast-review>
<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>
......
......@@ -28,7 +28,7 @@
</el-checkbox-group>
</div>
</div>
<div style="height: 36px" class="messag flex_scb">
<div style="height: 36px" class="messag price_felx">
<div class="ms">
<span>预估损失金额/元:</span>
<span class="price">{{ item.applyAmount || 0 }}</span>
......@@ -41,6 +41,23 @@
<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>
......@@ -341,7 +358,15 @@ export default {
activeNameClaims: '0',
currentServicesIndex: 0,
activeNameTabs: 'first',
srcList: []
srcList: [],
allinjureList: [
{name: '购置税', key: 'purchaseTax'},
{name: '折旧费', key: 'depreciation'},
{name: '商业险保费', key: 'commercialInsurance'},
{name: '登记费', key: 'registrationFee'},
{name: '加改装件费用', key: 'retrofits'},
{name: '代步车费用', key: 'scooterFare'}
]
}
},
props: {
......@@ -570,4 +595,21 @@ export default {
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="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.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({
......@@ -441,7 +465,10 @@ export default {
item.secondClassifyList.forEach(child => {
child.attachmentList.forEach(last => {
if (!last.auditStatus) {
pass = false
if (child.serviceItemCode != 'SC0006' || (child.lossType && this.lossTypeList.includes(child.lossType))) {
pass = false
}
// 判断auditStatus没通过就报错,但是钥匙及车牌重置服务会因为勾选才显示,存在没通过的
}
})
})
......@@ -745,7 +772,7 @@ export default {
getLossType(e) {
this.lossTypeList = e
},
// 服务项目数据处理
// 核赔审核,定损审核提交的时候,金额那一块的数据处理
handlerServices() {
let itemObj = {}
this.itemList.forEach((item, index) => {
......@@ -757,24 +784,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
......
......@@ -70,6 +70,7 @@ import material from './components/material.vue'
import util from '@/util/util'
import wraning from './components/wraning/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form'
import NP from 'number-precision'
export default {
name: 'order',
components: {
......@@ -307,6 +308,16 @@ export default {
if (!allEmpty) return this.$message.error(`请至少输入一项定损批准金额`)
const _approveTarget = this.serviceItemsList?.find(item => !item.approveAmount && item.lossAssessmentFlag && item.lossAssessmentAmount)
if (_approveTarget) return this.$message.error(`请输入${_approveTarget.serviceItemName}的定损批准金额`)
const priceTarget = this.serviceItemsList?.find(item => item.serviceItemType == 1 && item.approveAmount > 0 && !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.approveAmount > 0 && !item?.damageType?.length)
if (injureTarget) {
this.$message.error(`至少选择一个${injureTarget.serviceItemName}的损伤类型`)
return false
}
this.toCheckOrder(operation)
}
},
......@@ -333,6 +344,19 @@ export default {
...addQuery,
...claimsQuery
}
_para.serviceItemsList = this.serviceItemsList.map(item => {
const { purchaseTax, depreciation, commercialInsurance, registrationFee, retrofits, scooterFare, serviceItemCode, serviceItemType, damageType } = item
return {
purchaseTax: purchaseTax ? NP.times(purchaseTax, 100) : purchaseTax,
depreciation: depreciation ? NP.times(depreciation, 100) : depreciation,
serviceItemCode,
commercialInsurance: commercialInsurance ? NP.times(commercialInsurance, 100) : commercialInsurance,
registrationFee: registrationFee ? NP.times(registrationFee, 100) : registrationFee,
retrofits: retrofits ? NP.times(retrofits, 100) : retrofits,
scooterFare: scooterFare ? NP.times(scooterFare, 100) : scooterFare,
damageType: item.serviceItemType == 2 && item?.damageType?.length ? item.damageType.join(',') : ''
}
})
const loading = this.$loading({
lock: true,
text: 'Loading',
......@@ -401,7 +425,19 @@ 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,
purchaseTax: item.purchaseTax ? NP.divide(item.purchaseTax, 100) : item.purchaseTax,
depreciation: item.depreciation ? NP.divide(item.depreciation, 100) : item.depreciation,
commercialInsurance: item.commercialInsurance ? NP.divide(item.commercialInsurance, 100) : item.commercialInsurance,
registrationFee: item.registrationFee ? NP.divide(item.registrationFee, 100) : item.registrationFee,
retrofits: item.retrofits ? NP.divide(item.retrofits, 100) : item.retrofits,
scooterFare: item.scooterFare ? NP.divide(item.scooterFare, 100) : item.scooterFare,
damageType: item?.damageType ? item.damageType.split(',').map(ele => Number(ele)) : []
}
}) || []
console.log(this.serviceItemsList, ' this.serviceItemsList ')
// 以下是文件数据
......@@ -463,7 +499,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 +581,17 @@ export default {
this.$message.error(`请输入${lossAssTipItem.serviceItemName}的保险公司定损金额`)
return false
}
const priceTarget = this.serviceItemsList?.find(item => item.serviceItemType == 1 && item.approveAmount > 0 && !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.approveAmount > 0 && !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 +646,19 @@ export default {
lossAssessmentTarget[item.serviceItemCode] = item.lossAssessmentAmount
}
})
params.serviceItemsList = this.serviceItemsList.map(item => {
const { purchaseTax, depreciation, commercialInsurance, registrationFee, retrofits, scooterFare, serviceItemCode, serviceItemType, damageType } = item
return {
purchaseTax: purchaseTax ? NP.times(purchaseTax, 100) : purchaseTax,
depreciation: depreciation ? NP.times(depreciation, 100) : depreciation,
serviceItemCode,
commercialInsurance: commercialInsurance ? NP.times(commercialInsurance, 100) : commercialInsurance,
registrationFee: registrationFee ? NP.times(registrationFee, 100) : registrationFee,
retrofits: retrofits ? NP.times(retrofits, 100) : retrofits,
scooterFare: scooterFare ? NP.times(scooterFare, 100) : 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 +686,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!