Commit a83c5279 by 杨北旺

修复Bug

1 parent 43cc2b5b
......@@ -15,7 +15,19 @@
<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 class="unit-price">
<div v-if="item.serviceItemCode == 'SC0003'" 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.serviceItemCode == 'SC0006'" class="loss_wrap flex_sc">
<label class="required" for="">服务类型:</label>
<el-checkbox-group v-model="item.lossTypeList">
<el-checkbox label="3">钥匙</el-checkbox>
<el-checkbox label="4">车牌重置</el-checkbox>
</el-checkbox-group>
</div>
<div class="unit-price" :class="[{ nopt20: item.serviceItemCode == 'SC0006' || item.serviceItemCode == 'SC0003' }]">
<label class="required" for="">预计损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</div>
......@@ -69,6 +81,7 @@ export default {
},
data() {
return {
current_lossType: '1',
regionData: [],
editFormData: [
{
......@@ -190,7 +203,7 @@ export default {
repotData: Object,
insuranceAttachmentConfigs: Array,
itemList: Array,
otherInfoData:Object
otherInfoData: Object
},
watch: {
'editForm.reportDate'(newVal, oldVal) {
......@@ -259,7 +272,7 @@ export default {
}
this.getTotal()
},
selectService(){
selectService() {
this.getTotal()
},
getTotal() {
......@@ -267,7 +280,7 @@ export default {
let curPrice = cur.checked ? cur.approveAmount : 0
return prev + +(curPrice * 100).toFixed(0)
}, 0)
this.repotData.approveAmount = (total/100).toFixed(2)
this.repotData.approveAmount = (total / 100).toFixed(2)
}
}
}
......@@ -286,6 +299,16 @@ export default {
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;
......@@ -303,6 +326,9 @@ export default {
margin-right: 60px;
}
}
.nopt20 {
padding: 0 20px;
}
.dialog-unit {
background: #f9f9f9;
padding: 20px;
......
......@@ -8,13 +8,13 @@
<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 @node-click="checkChange" :data="treeBasic" show-checkbox node-key="id" :props="defaultProps"></el-tree>
<el-tree ref="tree" :data="treeBasic" :default-checked-keys="[10, 11, 14]" show-checkbox node-key="id" :props="defaultProps"></el-tree>
</div>
<div class="filter-all">
<el-checkbox v-model="checked">全选</el-checkbox>
<el-checkbox v-model="treeChecked">全选</el-checkbox>
<span class="reset">
<el-button type="primary" size="small">确定</el-button>
<el-button size="small">重置</el-button>
<el-button type="primary" @click="getCheckedKeys" size="small">确定</el-button>
<el-button size="small" @click="resetChecked">重置</el-button>
</span>
</div>
</div>
......@@ -39,30 +39,35 @@
</div>
</div>
<!-- 右边大图区 -->
<div class="preview-wrap">
<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">
<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>
<!-- 按钮区 -->
<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>
......@@ -79,7 +84,7 @@ export default {
},
data() {
return {
checked: true,
treeChecked: true,
showFilter: false,
visibility: false,
imgPassObj: {
......@@ -103,34 +108,34 @@ export default {
imgList: [],
treeBasic: [
{
id: 1,
id: 10,
label: '资料名称',
children: []
},
{
id: 2,
id: 11,
label: '处理状态',
children: [
{
id: 5,
id: 12,
label: '已审核'
},
{
id: 6,
id: 13,
label: '未审核'
}
]
},
{
id: 3,
id: 14,
label: '审核状态',
children: [
{
id: 7,
id: 15,
label: '通过'
},
{
id: 8,
id: 16,
label: '未通过'
}
]
......@@ -138,10 +143,16 @@ export default {
],
defaultProps: {
children: 'children',
label: 'label'
label: 'label',
id: 'id'
}
}
},
watch: {
treeChecked(newVal) {
this.toChangeTreeAll(newVal)
}
},
mounted() {
this.filterImgList = []
document.addEventListener('click', e => {
......@@ -164,6 +175,7 @@ export default {
// this.curImg.idx =type == 'next' ? idx + 1 : idx - 1
// },
handlerData(val) {
this.treeBasic[0].children = []
let arr = []
val.forEach((el, index) => {
let obj = {
......@@ -221,10 +233,116 @@ export default {
console.log(err)
}
},
checkChange(e) {
console.log(e)
// const list = this.imgList.filter(item => {})
// this.filterImgList = [...this.imgList]
// checkChange(data, checked, indeterminate) {
// console.log(data, checked, indeterminate)
// },
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)
}
})
}
filtterList = [...new Set(filtterList)]
this.showFilter = false
this.filterImages(filtterList)
},
resetChecked() {
console.log(2525);
this.$refs.tree.setCheckedKeys([])
},
toChangeTreeAll(flag) {
if (flag) {
this.$refs.tree.setCheckedKeys([10, 11, 14])
} else {
console.log(1158641);
this.resetChecked()
}
},
// 过滤照片
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
}
}
}
}
......
......@@ -134,11 +134,11 @@
<div style="height: 36px" class="messag flex_scb">
<div class="ms">
<span>预估损失金额/元:</span>
<span class="price">{{ item.applyAmount || 0 }}</span>
<span class="price">{{ item.approveAmount || 0 }}</span>
</div>
<div class="ms">
<span>定损批准金额:</span>
<span class="price">{{ item.approveAmount || 0 }}</span>
<span class="price">{{ item.applyAmount || 0 }}</span>
</div>
</div>
</div>
......@@ -146,9 +146,9 @@
<div class="total flex_scb">
<span>合计</span>
<span>
<span>预估损失金额:{{ repotData.applyAmount || 0 }}元</span>
<span>预估损失金额:{{ repotData.approveAmount || 0 }}元</span>
<span style="margin: 0 10px">|</span>
<span>定损批准金额:{{ repotData.approveAmount || 0 }}元</span>
<span>定损批准金额:{{ repotData.applyAmount || 0 }}元</span>
</span>
</div>
</div>
......
......@@ -196,7 +196,7 @@ export default {
},
attrs: {
type: 'text',
fn: '审核'
fn: '审核'
},
listeners: {
click: row => this.handleEdit(5, row.scope)
......@@ -291,7 +291,7 @@ export default {
fn: '重新提交'
},
listeners: {
click: row => this.handleEdit(5, row.scope)
click: row => this.handleEdit(6, row.scope)
}
}
],
......@@ -317,7 +317,6 @@ export default {
isClear: true,
maxlength: 200,
placeholder: '客户|合同号|报案号'
// isHide: true
},
{
label: '服务状态',
......@@ -342,7 +341,8 @@ export default {
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName'
optionLabel: 'confName',
isHide:true
},
{
label: '片区',
......@@ -351,7 +351,8 @@ export default {
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName'
optionLabel: 'confName',
isHide:true
},
{
label: '门店',
......@@ -360,7 +361,8 @@ export default {
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName'
optionLabel: 'confName',
isHide:true
},
{
label: '提交国任日期',
......@@ -394,7 +396,7 @@ export default {
label: '客户名称',
prop: 'reporterName',
width: 200,
line:1,
line: 1,
formatter: cellValue => {
return cellValue.reporterName || '-'
}
......@@ -573,15 +575,42 @@ export default {
followEditStatus: false,
followContent: '',
followResult: false,
colors
colors,
levelToShow: {
1: 'merchantId',
2: 'dqtId',
3: 'pqId',
4: 'mdId'
}
}
},
created() {
this.getClaimsCount()
// this.getMerchantData()
},
mounted() {},
methods: {
// 获取当前登录人的商户层级
getMerchantData() {
this.$apis.beforeSale.getUserInfoApi({}).then(res => {
if (res.merchantAccountLevel != 4) {
var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow[res.admin ? res.merchantAccountLevel : res.merchantAccountLevel + 1])
this.searchFormData[idx].isHide = false
this.getMerchantList(res.merchantNo, res.merchantAccountLevel)
}
})
},
getMerchantList(merchantId, accountLevel) {
var params = {
merchantId: merchantId,
accountLevel: 2
}
this.$apis.beforeSale.getMerchantApi(params).then(res => {
// this.baseData[listName] = res
// this.getOptionsList('searchFormData', false, attrName)
})
},
showFollow(row) {
this.followDialog = true
this.curentFollowInfo = row
......@@ -658,7 +687,8 @@ export default {
// 1.新增 2.查看 6.重新提交 4.去处理 5.审核
handleEdit(editNo, row) {
let urlParam = {}
if (editNo != 1 && editNo != 6) {
console.log(editNo)
if (editNo != 1 || editNo == 6) {
urlParam = {
editNo,
isGH: true,
......
......@@ -6,7 +6,7 @@
<template v-else-if="pageType == 5 && routeInfo.status < 11">
<CheckData :otherInfoData.sync="otherInfoData" :itemList.sync="itemList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs" :repotData.sync="repotData"></CheckData>
</template>
<template v-else-if="pageType == 5 && routeInfo.status > 10">
<template v-else-if="(pageType == 5 && routeInfo.status > 10) || (routeInfo.status == 2 && pageType == 6)">
<div class="tab_wrap">
<el-tabs v-model="activeName">
<el-tab-pane class="bg" label="核赔信息" name="first">
......@@ -20,7 +20,7 @@
</template>
<!-- 底部按钮 -->
<div v-if="pageType != 2&&activeName!='second'" class="btn-box">
<div v-if="pageType != 2 && activeName != 'second'" class="btn-box">
<el-button plain class="btn-three" @click="toBackList">取消</el-button>
<el-button plain class="btn-three" @click="toSaveOrder">保存</el-button>
<el-button plain @click="toNoPassOrder">不通过</el-button>
......@@ -40,11 +40,11 @@
<div class="set-price">
<li>
<label for="">预计损失金额/元:</label>
<el-input size="small" maxlength="10" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
<el-input @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" size="small" maxlength="10" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</li>
<li>
<label for="">定损批准金额/元:</label>
<el-input size="small" maxlength="10" placeholder="请选择定损批准金额" v-model="item.applyAmount"></el-input>
<el-input @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" size="small" maxlength="10" placeholder="请选择定损批准金额" v-model="item.applyAmount"></el-input>
</li>
</div>
</div>
......@@ -166,7 +166,7 @@ export default {
status: res.status
}
this.repotData = {
status:res.status,
status: res.status,
writeOffCode: res.writeOffCode,
reporterName: res.reporterName,
reporterPhone: res.reporterPhone,
......@@ -251,6 +251,9 @@ export default {
res.itemsList.map(item => {
item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount
item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : item.approveAmount
if (item.serviceItemCode == 'SC0006') {
item.lossTypeList = item.lossType.split(',')
}
this.$set(item, 'checked', true)
})
......@@ -335,29 +338,18 @@ export default {
// this.getAccountInfo(this.editForm.contractNo)
// }
},
// 获取收款对象数据
// getAccountInfo(contractNo) {
// if (!contractNo) return
// this.$apis.claims.getAccountInfo({ contractNo }).then(res => {
// const { accountName, accountCityCode: bankCity, openBankCode: branchBankCode, accountNo, accountType, cardNo: payeeIDCardNo, cardTypeCode: payeeIDCardType, phone: payeePhone } = res || {}
// const result = { accountName, bankCity, branchBankCode, accountNo, accountType, payeeIDCardNo, payeeIDCardType, payeePhone }
// this.accountForm = { ...this.accountForm, ...result }
// if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
// if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0
// })
// submitForm(val) {
// // val == 1 通过 ,2 不通过
// this.cancelDialog(val)
// },
// cancelDialog(val) {
// // val == 1 通过 ,2 不通过
// if (val == 1) {
// this.showPassedDialog = false
// } else {
// this.showNoPassDialog = false
// }
// },
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 => {
......@@ -371,7 +363,7 @@ export default {
},
// 通过订单
toPassOrder() {
if (this.orderMsg.status == 12) {
if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
const isPass = this.verifyImages(this.claimsAttachmentConfigs)
if (!isPass) {
this.$message({
......@@ -494,7 +486,7 @@ export default {
},
// 点击不通过
comfirmNoPass() {
if (this.orderMsg.status == 12) {
if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
this.hepeiPass(true)
return
}
......@@ -551,7 +543,7 @@ export default {
// 案件补充说明
handlerExplain() {
let obj = {}
if (this.orderMsg.status == 12) {
if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
this.repotData.supplementList2.forEach((item, index) => {
let idx = `supplementList2[${index}].id`
let claimsId = `supplementList2[${index}].claimsId`
......@@ -586,7 +578,7 @@ export default {
// 图片数据处理
hanlerImg() {
let imgs = []
if (this.orderMsg.status == 12) {
if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
this.claimsAttachmentConfigs.forEach((item, index) => {
item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => {
......@@ -606,7 +598,7 @@ export default {
})
}
let obj = {}
let type = this.orderMsg.status == 12 ? 2 : 1
let type = this.orderMsg.status == 12 || this.orderMsg.status == 2 ? 2 : 1
imgs.forEach((item, index) => {
let idx = `attachments${type}[${index}].id`
let claimsId = `attachments${type}[${index}].claimsId`
......@@ -658,12 +650,7 @@ export default {
[approveAmount]: item.approveAmount ? Number(item.approveAmount) * 100 : 0,
[applyAmount]: item.applyAmount ? Number(item.applyAmount) * 100 : 0,
[claimsId]: this.orderMsg.id,
// [createdDate]: item.id,
// [createdBy]: item.createdBy,
// [updatedDate]: item.createdDate,
// [updatedBy]: item.updatedBy,
// [deletedFlag]: item.deletedFlag,
[lossType]: item.lossType
[lossType]: item.serviceItemCode == 'SC0006' ? item.lossTypeList.join(',') : item.lossType
}
Object.assign(itemObj, temp)
})
......@@ -708,12 +695,12 @@ export default {
writeOffCode: this.repotData.writeOffCode
}
return this.orderMsg.status == 12 ? claims : para
return this.orderMsg.status == 12 || this.orderMsg.status == 2 ? claims : para
},
// 保存订单
toSaveOrder() {
let para = this.savePara()
const name = this.orderMsg.status == 12 ? 'saveClaimsCG' : 'saveCG'
const name = this.orderMsg.status == 12 || this.orderMsg.status == 2 ? 'saveClaimsCG' : 'saveCG'
this.$apis.claims[name](para).then(res => {
this.$message({
message: '保存成功',
......@@ -725,6 +712,39 @@ export default {
// 返回上一页
toBackList() {
this.$router.push({ path: '/claims/ghIndex' })
},
// 输入校验
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))
}
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)
}
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!