Commit b341153f by 前端

Merge branch 'SAAS+V4.55.0-0730' into 'master'

上线合并

See merge request !90
2 parents b36c19e4 8e2492a2
......@@ -565,6 +565,49 @@ const getContractUrlApi = params => {
returnAll: true
})
}
// 查询合同服务项目
const getContractServiceListApi = params => {
params.method = 'scrm.api.equity.service.items.get.termination.info'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取合同终止服务项目操作记录
const getTermationRecordApi = params => {
params.method = 'scrm.api.equity.service.items.page.termination.record'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 终止服务项目
const saveTerminationInfoApi = params => {
params.method = 'scrm.api.equity.service.items.save.termination.info'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 批量校验合同服务项目是否终止
const batchCheckItemsApi = params => {
params.method = 'scrm.api.equity.service.items.batch.check.termination'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
uploadImageApi,
newSaveWriteOff,
......@@ -616,5 +659,9 @@ export default {
exportErrorDataApi,
getProductListApi,
saveClaims,
getContractUrlApi
getContractUrlApi,
getContractServiceListApi,
getTermationRecordApi,
saveTerminationInfoApi,
batchCheckItemsApi
}
......@@ -47,6 +47,41 @@
<label class="required" for="">保险公司定损金额/元:</label>
<el-input maxlength="13" :disabled="disabled || !item.checked" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入" v-model="item.lossAssessmentAmount"></el-input>
</div>
<div v-if="item.serviceItemType == 1 && ![32, 35].includes(curRouteInfo.status)">
<div class="unit-price">
<label class="required" for="">购置税/元:</label>
<el-input :disabled="disabled || !item.checked" @input="validPrice($event, index, 'purchaseTax')" @blur="changePrice($event, index, 'purchaseTax')" v-model="item.purchaseTax" size="mini" maxlength="10"></el-input>
</div>
<div class="unit-price">
<label class="required" for="">折旧费/元:</label>
<el-input :disabled="disabled || !item.checked" @input="validPrice($event, index, 'depreciation')" @blur="changePrice($event, index, 'depreciation')" v-model="item.depreciation" size="mini" maxlength="10"></el-input>
</div>
<div class="unit-price">
<label class="required" for="">商业险保费/元:</label>
<el-input :disabled="disabled || !item.checked" @input="validPrice($event, index, 'commercialInsurance')" @blur="changePrice($event, index, 'commercialInsurance')" v-model="item.commercialInsurance" size="mini" maxlength="10"></el-input>
</div>
<div class="unit-price">
<label class="required" for="">登记费/元:</label>
<el-input :disabled="disabled || !item.checked" @input="validPrice($event, index, 'registrationFee')" @blur="changePrice($event, index, 'registrationFee')" v-model="item.registrationFee" size="mini" maxlength="10"></el-input>
</div>
<div class="unit-price">
<label class="required" for="">加改装件费用/元:</label>
<el-input :disabled="disabled || !item.checked" @input="validPrice($event, index, 'retrofits')" @blur="changePrice($event, index, 'retrofits')" v-model="item.retrofits" size="mini" maxlength="10"></el-input>
</div>
<div class="unit-price">
<label class="required" for="">代步车费用/元:</label>
<el-input :disabled="disabled || !item.checked" @input="validPrice($event, index, 'scooterFare')" @blur="changePrice($event, index, 'scooterFare')" v-model="item.scooterFare" size="mini" maxlength="10"></el-input>
</div>
</div>
<div v-if="item.serviceItemType == 2 && ![32, 35].includes(curRouteInfo.status)" class="unit-price">
<label class="required" for="">损伤类型:</label>
<el-checkbox-group v-model="item.damageType" :disabled="disabled || !item.checked">
<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>
......@@ -68,6 +103,10 @@
<!-- <div v-if="!disabled" slot="right" class="transport-pic" @click.stop="transportPic">手机传图</div> -->
<upload-material :isCustomerCommit="!!isCustomerCommit" :curLossType="curLossType" :disabled="disabled" :curRouteInfo="curRouteInfo" @handleClick="handleClick" ref="materialRef" :id="resData.id" :tabs.sync="tabs" :detailImgList.sync="serviceCodesList" :attachmentList.sync="attachmentList"></upload-material>
</Card>
<!-- 终止记录 -->
<div v-if="resData.itemsTerminationList && resData.itemsTerminationList.length">
<termination-log :terminationLogList="resData.itemsTerminationList"></termination-log>
</div>
<explanation :disabled="disabled" :supplementList="resData.supplementList1"></explanation>
<otherInfo :otherInfoData="otherInfoData"></otherInfo>
</template>
......@@ -101,6 +140,16 @@
</div>
<!-- 查看合同 -->
<contract-dialog :isVisible="contractVisible" :pdfUrl="pdfUrl" @handleContractPdf="handleContractPdf" @closeDialog="closeDialog"></contract-dialog>
<!-- 服务项目终止提示弹窗 -->
<el-dialog :visible.sync="reasonVisible" width="400px" class="tips-dialog" top="10%" title="终止说明">
<div class="reason-f-size">
<span>{{ reasonObj.txt }}</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="reasonVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="reasonVisible = false">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script type="text/ecmascript-6">
......@@ -115,6 +164,7 @@ import otherInfo from './components/otherInfo'
import util from '@/util/util'
import url from '@/assets/write_off.png'
import contractDialog from '../../djClaims/components/contractDialog.vue'
import terminationLog from '../../claims/components/terminationLog.vue'
const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
const tabs = [
{
......@@ -153,7 +203,8 @@ export default {
// helpService,
otherInfo,
titleTip,
contractDialog
contractDialog,
terminationLog
},
props: {
curRouteInfo: Object,
......@@ -336,7 +387,9 @@ export default {
explanation1: ''
},
contractVisible: false,
pdfUrl: ''
pdfUrl: '',
reasonVisible: false,
reasonObj: {}
}
},
computed: {
......@@ -694,6 +747,9 @@ export default {
item.lossType = item.lossType ? item.lossType?.split(',') : []
this.curLossType = [...item.lossType]
}
if (item.serviceItemType == 2) {
item.damageType = item?.damageType ? item.damageType.split(',').map(ele => Number(ele)) : []
}
item.checked = item.checked == 1
})
this.serviceCodesList = [...res.data.itemsList]
......@@ -844,40 +900,58 @@ export default {
this.openTip(target.tip)
return
}
this.$refs.customRef.$refs.formRef.validate(valid => {
if (!type || valid) {
this.$refs.handlerRef.$refs.formRef.validate(secondValid => {
if (!type || secondValid) {
let params = { ...target }
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.beforeSale.newSaveWriteOff(params).then(res => {
loading.close()
if (res.code == '0') {
this.$message({
message: '保存成功',
type: 'success'
})
this.$router.push({
path: '/claims/index'
})
} else {
this.gotoValidView('writeOff')
this.openTip(res.message, '错误提示', true)
}
})
} else {
this.gotoValidView('reporterName')
// 校验合同服务项目是否已终止
if (type == 1) {
const itemsList = target.itemsList?.map(val => { return { serviceItemCode: val.serviceItemCode } })
this.$apis.beforeSale.batchCheckItemsApi({ contractNo: target.contractNo, itemsList }).then(res => {
if (res.checkFlag) {
this.reasonObj = {
txt: res.reason
}
})
} else {
this.gotoValidView('reporterName')
}
})
this.reasonVisible = !this.reasonVisible
return
}
event()
})
} else {
event()
}
const event = () => {
this.$refs.customRef.$refs.formRef.validate(valid => {
if (!type || valid) {
this.$refs.handlerRef.$refs.formRef.validate(secondValid => {
if (!type || secondValid) {
let params = { ...target }
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.beforeSale.newSaveWriteOff(params).then(res => {
loading.close()
if (res.code == '0') {
this.$message({
message: '保存成功',
type: 'success'
})
this.$router.push({
path: '/claims/index'
})
} else {
this.gotoValidView('writeOff')
this.openTip(res.message, '错误提示', true)
}
})
} else {
this.gotoValidView('reporterName')
}
})
} else {
this.gotoValidView('reporterName')
}
})
}
},
openTip(txt, title = '错误提示', hide) {
this.secondObj = {
......@@ -1081,4 +1155,9 @@ export default {
.tips-dialog .el-dialog__body {
padding: 10px 15px 20px !important;
}
.reason-f-size{
font-size: 14px;
font-family: PingFangSC-Regular;
line-height: 20px;
}
</style>
......@@ -27,7 +27,8 @@
<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>
<!-- 校验合同服务项目是否终止 -->
<el-input :disabled="pageType == 2 || renewDisable || item.terminationFlag" maxlength="10" @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" :placeholder="item.terminationFlag ? '合同已终止' : '请输入'" v-model="item.approveAmount"></el-input>
</div>
<div class="price-wrap" v-if="item.serviceItemType == 2">
<label class="label" for="">损伤类型:</label>
......
<template>
<div class="report-components">
<div class="title">终止记录</div>
<div class="termination-log">
<GLTable ref="mutiProRef" :hasPage="false" :tableData="terminationLogList" :tableParams="logTableParams">
<div slot="projectDetails" slot-scope="scope">
<div class="service_name">{{ `${scope.scope.serviceName}${scope.scope.serviceGrade}` }}</div>
<div class="service_Info">{{ `服务年限${scope.scope.servicePeriod}年,有效期${scope.scope.startDate} 至 ${scope.scope.endDate}` }}</div>
</div>
<div slot="reason" slot-scope="scope" style="width: 240px;">
<el-popover v-if="scope.scope.periodDetail.reason && scope.scope.periodDetail.reason.length >= Math.ceil((200 - 36) / 14) * 2" placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.periodDetail.reason">
<span slot="reference" class="line-ellipsis">
{{ scope.scope.periodDetail.reason }}
</span>
</el-popover>
<span v-else class="line-ellipsis">
{{ scope.scope.periodDetail.reason }}
</span>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'TerminationLog',
props: {
terminationLogList: Array
},
data() {
return {
logTableParams: {
listName: 'list',
tableColumns: [
{
label: '终止项目明细',
prop: '',
addHtml: 'projectDetails'
},
{
label: '终止时间',
prop: '',
formatter: cellValue => {
return `${cellValue.periodDetail.startDate} 至 ${cellValue.periodDetail.endDate}`
}
},
{
label: '终止原因',
width: 260,
addHtml: 'reason'
},
{
label: '状态',
prop: '',
width: 80,
formatter: cellValue => {
return cellValue.periodDetail?.operationType == 0 ? '终止' : cellValue.periodDetail?.operationType == 1 ? '取消' : '-'
}
},
{
label: '操作人',
prop: '',
width: 150,
formatter: cellValue => {
return cellValue.periodDetail?.updatedBy
}
},
{
label: '操作时间',
prop: '',
formatter: cellValue => {
return cellValue.periodDetail?.updatedDate ? dayjs(cellValue.periodDetail?.updatedDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
}
]
},
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.report-components {
background: white;
margin: 20px 0 0;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: 500;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333333;
}
.termination-log{
margin: 20px;
padding-bottom: 30px;
}
.line-ellipsis{
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2 ;
}
}
</style>
......@@ -9,6 +9,10 @@
<!-- 维修信息 -->
<repair ref="repairRef" @changeObjectType="changeObjectType" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
<material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material>
<!-- 终止记录 -->
<div v-if="refitInfo.itemsTerminationList && refitInfo.itemsTerminationList.length">
<termination-log :terminationLogList="refitInfo.itemsTerminationList"></termination-log>
</div>
<!-- 查看和待核赔 2个页面查看上传加装件信息 v-if="pageType == 2 || pageType == 6" -->
<div v-if="refitInfo.addOnsFlag == 1 && (pageType == 2 || pageType == 6)" class="refit-info">
<div class="title">上传加改装件凭证</div>
......@@ -63,6 +67,16 @@
</GLDialog>
<!-- 查看合同 -->
<contract-dialog v-if="(editForm.contractNo && searchDetailFlag) || pageType != 1" ref="contract-dialog" :isVisible="contractVisible" :pdfUrl="pdfUrl" @handleContractPdf="handleContractPdf" @closeDialog="closeDialog"></contract-dialog>
<!-- 服务项目终止提示弹窗 -->
<el-dialog :visible.sync="isSecondVisible" width="400px" class="tips-dialog" top="10%" title="终止说明">
<div class="f-size">
<span>{{ secondObj.txt }}</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isSecondVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="isSecondVisible = false">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
......@@ -74,6 +88,7 @@ import wraning from './components/wraning/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form'
import NP from 'number-precision'
import contractDialog from '../djClaims/components/contractDialog.vue'
import terminationLog from './components/terminationLog.vue'
export default {
name: 'order',
components: {
......@@ -82,7 +97,8 @@ export default {
material,
wraning,
glsxCombiForm,
contractDialog
contractDialog,
terminationLog
},
data() {
return {
......@@ -180,7 +196,10 @@ export default {
isWatchOrder: false,
refitInfo: {},
contractVisible: false,
searchDetailFlag: false
searchDetailFlag: false,
terminationLogList: [], // 终止记录数据
secondObj: {},
isSecondVisible: false
}
},
created() {
......@@ -638,7 +657,7 @@ export default {
return valid
},
// 提交核赔
confirmSubmit(type) {
async confirmSubmit(type) {
if (type == 1 && !this.validAccountInfo()) {
return false
}
......@@ -720,6 +739,26 @@ export default {
if (!this.routeInfo.isGH) {
params.equitySource = 2
}
// 校验合同服务项目是否已终止
const keysWithValue = Object.keys(tagetObj).filter(key => tagetObj[key] !== null && tagetObj[key] !== undefined) // 是否有输入定损批准金额
if (type == 1) {
const itemsList = keysWithValue?.map(val => ({serviceItemCode: val}))
this.$apis.beforeSale.batchCheckItemsApi({ contractNo: params.contractNo, itemsList }).then(res => {
if (res.checkFlag) {
this.secondObj = {
txt: res.reason
}
this.isSecondVisible = !this.isSecondVisible
loading.close()
return
}
this.event(params, type, loading)
})
} else {
this.event(params, type, loading)
}
},
event(params, type, loading) {
this.$apis.claims.commitClaimsOrder(params).then(res => {
loading.close()
if (res) {
......@@ -884,4 +923,9 @@ export default {
font-weight: 600;
}
}
.f-size{
font-size: 14px;
font-family: PingFangSC-Regular;
line-height: 20px;
}
</style>
......@@ -36,6 +36,41 @@
<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 v-if="item.serviceItemType == 1">
<div class="mt10">
<label class="required" for="">购置税/元:</label>
<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="mt10">
<label class="required" for="">折旧费/元:</label>
<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="mt10">
<label class="required" for="">商业险保费/元:</label>
<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="mt10">
<label class="required" for="">登记费/元:</label>
<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="mt10">
<label class="required" for="">加改装件费用/元:</label>
<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="mt10">
<label class="required" for="">代步车费用/元:</label>
<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>
</div>
<div v-if="item.serviceItemType == 2" class="loss_wrap flex_sc">
<label class="required" for="">损伤类型:</label>
<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>
<div class="lump-sum">
......@@ -57,6 +92,11 @@
<upload-material :lossTypeList.sync="lossTypeList" :isDisabled="isDisabled" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs"></upload-material>
</div>
<!-- 终止记录 -->
<div v-if="repotData.itemsTerminationList && repotData.itemsTerminationList.length">
<termination-log :terminationLogList="repotData.itemsTerminationList"></termination-log>
</div>
<!-- 案件补充说明 -->
<div>
<explanation :isDisabled="isDisabled" :supplementList="repotData.supplementList1" :operatorName="repotData.updatedBy" :id="repotData.id"></explanation>
......@@ -87,6 +127,7 @@ import uploadMaterial from '../uploadMaterial.vue'
import explanation from '../explanation.vue'
import otherInfo from '../otherInfo.vue'
import contractDialog from '../contractDialog.vue'
import terminationLog from '../../../claims/components/terminationLog.vue'
export default {
name: 'checkPage',
components: {
......@@ -95,7 +136,8 @@ export default {
uploadMaterial,
explanation,
otherInfo,
contractDialog
contractDialog,
terminationLog
},
data() {
return {
......@@ -425,6 +467,10 @@ export default {
font-size: 14px;
}
.mt10{
margin-top: 10px;
}
.el-input {
width: 432px;
margin-right: 60px;
......
......@@ -325,6 +325,10 @@
</el-tabs>
</div>
</div>
<!-- 终止记录 -->
<div v-if="repotData.itemsTerminationList && repotData.itemsTerminationList.length">
<termination-log :terminationLogList="repotData.itemsTerminationList"></termination-log>
</div>
<!-- 案件补充说明 -->
<div>
<explanation :isCheck="true" :supplementList="repotData.supplementList1" :operatorName="repotData.updatedBy" :id="repotData.id"></explanation>
......@@ -347,13 +351,15 @@ import explanation from '../explanation.vue'
import otherInfo from '../otherInfo.vue'
import wraning from '../wraning/index.vue'
import contractDialog from '../contractDialog.vue'
import terminationLog from '../../../claims/components/terminationLog.vue'
export default {
name: 'watchPage',
components: {
explanation,
otherInfo,
wraning,
contractDialog
contractDialog,
terminationLog
},
data() {
return {
......
......@@ -228,7 +228,8 @@ export default {
exceptionImgUrl: res.exceptionImgUrl,
preStatus: res.preStatus,
writeOffCode: res.writeOffCode,
source: res.source
source: res.source,
itemsTerminationList: res.itemsTerminationList || []
}
// 图片list
......@@ -444,6 +445,25 @@ export default {
this.hepeiPass()
return
}
// 定损审核添加整车全损无忧/轮胎更换服务字段校验
if (this.orderMsg.status == 33) {
// 购置税+折旧费+商业险保费+登记费+加改装件费用+代步车费用 至少一个必填
const priceTarget = this.itemList?.find(item => item.serviceItemType == 1 && item.applyAmount > 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.applyAmount > 0 && !item?.damageType?.length)
if (injureTarget) return this.$message.error(`至少选择一个${injureTarget.serviceItemName}的损伤类型`)
const isPass = this.verifyImages(this.insuranceAttachmentConfigs)
if (!isPass) {
this.$message({
message: '图片需要全部通过才允许此操作',
type: 'error'
})
return
}
this.showPassedDialog = true
return
}
const isPass = this.verifyImages(this.insuranceAttachmentConfigs)
if (!isPass) {
this.$message({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!