Commit d910fd6f by 张立顺

fix 核销码回显

1 parent f7aad381
......@@ -619,7 +619,7 @@ export default {
this.customObj.reportDate = !res.data.isCustomerCommit && !this.disabled && !res.data['reportDate'] ? new Date() : util.dateFormat(res.data['reportDate'], 'YYYY-MM-DD HH:mm:ss')
this.customObj.reimbursementDate = !res.data.isCustomerCommit && !this.disabled && !res.data['reimbursementDate'] ? new Date() : util.dateFormat(res.data['reimbursementDate'], 'YYYY-MM-DD HH:mm:ss')
const formatKey = ['reportDate', 'reimbursementDate', 'reimbursementAddress', 'writeOffCode']
const formatKey = ['reportDate', 'reimbursementDate', 'reimbursementAddress']
for (let key in this.customObj) {
if (!formatKey.includes(key)) {
this.customObj[key] = res.data[key] || ''
......@@ -627,7 +627,7 @@ export default {
}
let { reimbursementCountiesCode, reimbursementCityCode, reimbursementProvinceCode } = res.data
this.customObj.reimbursementAddress.push(reimbursementProvinceCode, reimbursementCityCode, reimbursementCountiesCode)
console.log(this.customObj, 'customObj')
//说明list
if (!res.data.supplementList1?.length) {
res.data.supplementList1 = []
......
......@@ -198,7 +198,7 @@
</el-tab-pane>
<el-tab-pane class="bg" label="定损信息" name="first">
<div class="widget">
<div class="title">报案信息(客户提交1111)</div>
<div class="title">报案信息(客户提交)</div>
<div class="content pad20">
<div class="code text_14_4_333">核销码:{{ repotData.writeOffCode }}</div>
<div class="pannel flex_wrap">
......@@ -360,12 +360,12 @@ export default {
activeNameTabs: 'first',
srcList: [],
allinjureList: [
{name: '购置税', key: 'purchaseTax'},
{name: '折旧费', key: 'depreciation'},
{name: '商业险保费', key: 'commercialInsurance'},
{name: '登记费', key: 'registrationFee'},
{name: '加改装件费用', key: 'retrofits'},
{name: '代步车费用', key: 'scooterFare'}
{ name: '购置税', key: 'purchaseTax' },
{ name: '折旧费', key: 'depreciation' },
{ name: '商业险保费', key: 'commercialInsurance' },
{ name: '登记费', key: 'registrationFee' },
{ name: '加改装件费用', key: 'retrofits' },
{ name: '代步车费用', key: 'scooterFare' }
]
}
},
......
<template>
<div>
<div class="widget">
<div class="title">报案信息(客户提交11)</div>
<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>
<glsxCombiForm :formDisable="isDisabled" :isInline="false" :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="repotData" :formData="editFormData"></glsxCombiForm>
</div>
</div>
......@@ -13,8 +11,7 @@
<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">
<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>
......@@ -33,16 +30,11 @@
<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>
<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;">
<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>
<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>
......@@ -62,22 +54,19 @@
<!-- 上传资料 -->
<div>
<upload-material :lossTypeList.sync="lossTypeList" :isDisabled="isDisabled"
:insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs"></upload-material>
<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>
<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>
<el-image class="img" :preview-src-list="[repotData.exceptionImgUrl]" :src="repotData.exceptionImgUrl"></el-image>
</div>
</Card>
......@@ -247,6 +236,27 @@ export default {
lossTypeList: Array
},
watch: {
repotData(newVal, oldVal) {
console.log('repotData', newVal)
if (newVal.source == 4) {
let itemIndex = this.editFormData.findIndex(item => item.name === 'contractNo')
console.log(itemIndex)
this.editFormData[itemIndex] = {
label: '核销码',
name: 'writeOffCode',
type: 'input',
maxlength: 8,
isDisabled: true
}
// this.$set(this.editFormData[itemIndex], {
// label: '核销码',
// name: 'writeOffCode',
// type: 'input',
// maxlength: 8,
// isDisabled: true
// })
}
},
'editForm.reportDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reportDate')
......@@ -277,6 +287,7 @@ export default {
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) {
......
<template>
<div class="report-components gl-form-page">
<div class="title">报案信息(客户提交11)</div>
<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">
<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>
......
......@@ -200,7 +200,8 @@
<div class="widget">
<div class="title">报案信息(客户提交)</div>
<div class="content pad20">
<div class="code text_14_4_333">核销码:{{ repotData.writeOffCode }}</div>
<div class="code text_14_4_333" v-if="repotData.source == 4">核销码:{{ repotData.writeOffCode }}</div>
<div class="code text_14_4_333" v-if="repotData.source == 3">合同号:{{ repotData.contractNo }}</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">
......@@ -360,12 +361,12 @@ export default {
activeNameTabs: 'first',
srcList: [],
allinjureList: [
{name: '购置税', key: 'purchaseTax'},
{name: '折旧费', key: 'depreciation'},
{name: '商业险保费', key: 'commercialInsurance'},
{name: '登记费', key: 'registrationFee'},
{name: '加改装件费用', key: 'retrofits'},
{name: '代步车费用', key: 'scooterFare'}
{ name: '购置税', key: 'purchaseTax' },
{ name: '折旧费', key: 'depreciation' },
{ name: '商业险保费', key: 'commercialInsurance' },
{ name: '登记费', key: 'registrationFee' },
{ name: '加改装件费用', key: 'retrofits' },
{ name: '代步车费用', key: 'scooterFare' }
]
}
},
......
......@@ -83,7 +83,7 @@ export default {
data() {
return {
damageList: [32, 33, 35, 34],
claimsList: [21, 22, 23, 25, 1, 2, 3],
claimsList: [21, 22, 23, 25, 1, 2, 3],
routeInfo: {},
pageType: 1,
watchData: [], // 查看状态下
......@@ -169,6 +169,7 @@ export default {
// 5 审核+定损 审核+核赔
const urlParam = this.$route.params
const urlQuery = JSON.parse(decodeURIComponent(urlParam.id))
console.log(urlQuery)
this.pageType = urlQuery.editNo
this.routeInfo = urlQuery
if (this.routeInfo.orderId) {
......@@ -222,11 +223,12 @@ export default {
attachments3: res.attachments3,
claimsAttachmentConfigs2: res.claimsAttachmentConfigs2,
updatedBy: res.updatedBy,
expressName:res.expressName,
expressNo:res.expressNo,
expressName: res.expressName,
expressNo: res.expressNo,
exceptionImgUrl: res.exceptionImgUrl,
preStatus: res.preStatus,
writeOffCode:res.writeOffCode,
writeOffCode: res.writeOffCode,
source: res.source
}
// 图片list
......@@ -287,10 +289,10 @@ export default {
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[eleKey] = item[eleKey] ? Number((item[eleKey] / 100).toFixed(2)) : item[eleKey]
})
item.lossTypeList = []
if(item.serviceItemType == 2) {
if (item.serviceItemType == 2) {
item.damageType = item?.damageType ? item.damageType.split(',').map(ele => Number(ele)) : []
}
if (item.serviceItemType == 4 && item.lossType) {
......@@ -419,17 +421,17 @@ export default {
toPassOrder() {
this.isSave = false
const _target = this.itemList?.find(item => item.applyAmount && item.lossAssessmentFlag && !item.lossAssessmentAmount)
if(_target) return this.$message.error(`请输入${_target.serviceItemName}的保险公司定损金额`)
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 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}的损伤类型`)
if (injureTarget) return this.$message.error(`至少选择一个${injureTarget.serviceItemName}的损伤类型`)
const isPass = this.verifyImages(this.claimsAttachmentConfigs)
if (!isPass) {
......@@ -547,7 +549,7 @@ export default {
}
})
},
endCaseFn(){
endCaseFn() {
this.$confirm('确定结束此案件吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -561,7 +563,7 @@ export default {
},
comfirmPass(isEndCase) {
let para = this.handleParams()
para.auditStatus = isEndCase ? 2 : 1 // 2结束案件,1 通过
para.auditStatus = isEndCase ? 2 : 1 // 2结束案件,1 通过
let loading = this.createLoading()
this.$apis.claims.checkDjOrderApi(para).then(res => {
loading.close()
......@@ -795,16 +797,16 @@ export default {
[contractNo]: this.repotData.contractNo,
[approveAmount]: this.handlePrice(item.approveAmount) || 0,
[applyAmount]: this.handlePrice(item.applyAmount) || 0,
[lossAssessmentAmount]: this.handlePrice(item.lossAssessmentAmount) || 0,
[lossAssessmentAmount]: this.handlePrice(item.lossAssessmentAmount) || 0,
[purchaseTax]: this.handlePrice(item.purchaseTax),
[depreciation]: this.handlePrice(item.depreciation),
[commercialInsurance]: this.handlePrice(item.commercialInsurance),
[commercialInsurance]: this.handlePrice(item.commercialInsurance),
[registrationFee]: this.handlePrice(item.registrationFee),
[retrofits]: this.handlePrice(item.retrofits),
[scooterFare]: this.handlePrice(item.scooterFare),
[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(',') : ''
[damageType]: item.serviceItemType == 2 && item?.damageType?.length ? item.damageType.join(',') : ''
}
Object.assign(itemObj, temp)
})
......@@ -859,17 +861,19 @@ export default {
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()
})
this.$apis.claims[name](para)
.then(res => {
if (res) {
this.$message({
message: '保存成功',
type: 'success'
})
this.toBackList()
}
})
.finally(end => {
loading.close()
})
},
// 返回上一页
toBackList() {
......@@ -899,7 +903,7 @@ export default {
if (lastStr === '.') {
this.$set(this.itemList[id], type, e.target.value.substr(0, len - 1))
}
if(type == 'applyAmount'){
if (type == 'applyAmount') {
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], type, 1)
......@@ -935,32 +939,40 @@ export default {
.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;
......@@ -968,6 +980,7 @@ export default {
}
}
}
.btn-box {
display: flex;
justify-content: center;
......@@ -979,11 +992,13 @@ export default {
border-color: #f56c6c;
color: #f56c6c;
}
.danger-btn:hover {
background: #f56c6c;
border-color: #f56c6c;
color: #fff;
}
.danger-btn:focus {
background: #dd6161;
border-color: #dd6161;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!