Commit a83c5279 by 杨北旺

修复Bug

1 parent 43cc2b5b
...@@ -15,7 +15,19 @@ ...@@ -15,7 +15,19 @@
<div slot="approveAmountSlot" class="amount-wrap"> <div slot="approveAmountSlot" class="amount-wrap">
<div v-for="(item, index) in itemList" :key="index"> <div v-for="(item, index) in itemList" :key="index">
<el-checkbox @change="selectService" v-model="item.checked">{{ item.serviceItemName }}</el-checkbox> <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> <label class="required" for="">预计损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input> <el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</div> </div>
...@@ -69,6 +81,7 @@ export default { ...@@ -69,6 +81,7 @@ export default {
}, },
data() { data() {
return { return {
current_lossType: '1',
regionData: [], regionData: [],
editFormData: [ editFormData: [
{ {
...@@ -190,7 +203,7 @@ export default { ...@@ -190,7 +203,7 @@ export default {
repotData: Object, repotData: Object,
insuranceAttachmentConfigs: Array, insuranceAttachmentConfigs: Array,
itemList: Array, itemList: Array,
otherInfoData:Object otherInfoData: Object
}, },
watch: { watch: {
'editForm.reportDate'(newVal, oldVal) { 'editForm.reportDate'(newVal, oldVal) {
...@@ -259,7 +272,7 @@ export default { ...@@ -259,7 +272,7 @@ export default {
} }
this.getTotal() this.getTotal()
}, },
selectService(){ selectService() {
this.getTotal() this.getTotal()
}, },
getTotal() { getTotal() {
...@@ -267,7 +280,7 @@ export default { ...@@ -267,7 +280,7 @@ export default {
let curPrice = cur.checked ? cur.approveAmount : 0 let curPrice = cur.checked ? cur.approveAmount : 0
return prev + +(curPrice * 100).toFixed(0) return prev + +(curPrice * 100).toFixed(0)
}, 0) }, 0)
this.repotData.approveAmount = (total/100).toFixed(2) this.repotData.approveAmount = (total / 100).toFixed(2)
} }
} }
} }
...@@ -286,6 +299,16 @@ export default { ...@@ -286,6 +299,16 @@ export default {
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
width: fit-content; width: fit-content;
color: #333333; color: #333333;
.loss_wrap {
background: #f9f9f9;
padding: 20px;
.required {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
}
}
.unit-price { .unit-price {
background: #f9f9f9; background: #f9f9f9;
padding: 20px; padding: 20px;
...@@ -303,6 +326,9 @@ export default { ...@@ -303,6 +326,9 @@ export default {
margin-right: 60px; margin-right: 60px;
} }
} }
.nopt20 {
padding: 0 20px;
}
.dialog-unit { .dialog-unit {
background: #f9f9f9; background: #f9f9f9;
padding: 20px; padding: 20px;
......
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
<i class="gl-icon-filter filter-icon" @click.stop="showFilter = !showFilter"></i> <i class="gl-icon-filter filter-icon" @click.stop="showFilter = !showFilter"></i>
<div v-show="showFilter" ref="closetree" class="tree-wrap"> <div v-show="showFilter" ref="closetree" class="tree-wrap">
<div class="filter-tree"> <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>
<div class="filter-all"> <div class="filter-all">
<el-checkbox v-model="checked">全选</el-checkbox> <el-checkbox v-model="treeChecked">全选</el-checkbox>
<span class="reset"> <span class="reset">
<el-button type="primary" size="small">确定</el-button> <el-button type="primary" @click="getCheckedKeys" size="small">确定</el-button>
<el-button size="small">重置</el-button> <el-button size="small" @click="resetChecked">重置</el-button>
</span> </span>
</div> </div>
</div> </div>
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
</div> </div>
</div> </div>
<!-- 右边大图区 --> <!-- 右边大图区 -->
<div class="preview-wrap"> <div class="preview-wrap" :class="[{ flex_cc: !filterImgList.length }]">
<template v-if="filterImgList.length">
<span>{{ curImg.secondClassifyName }}</span> <span>{{ curImg.secondClassifyName }}</span>
<div class="preview-oper"> <div class="preview-oper">
<div class="preview-pic"> <div class="preview-pic">
...@@ -63,6 +64,10 @@ ...@@ -63,6 +64,10 @@
<!-- <el-button type="text" @click="changeLeaf('next')">下一张</el-button> --> <!-- <el-button type="text" @click="changeLeaf('next')">下一张</el-button> -->
</div> </div>
</div> </div>
</template>
<template v-else>
<span>筛选结果为空</span>
</template>
</div> </div>
</div> </div>
</GLDialog> </GLDialog>
...@@ -79,7 +84,7 @@ export default { ...@@ -79,7 +84,7 @@ export default {
}, },
data() { data() {
return { return {
checked: true, treeChecked: true,
showFilter: false, showFilter: false,
visibility: false, visibility: false,
imgPassObj: { imgPassObj: {
...@@ -103,34 +108,34 @@ export default { ...@@ -103,34 +108,34 @@ export default {
imgList: [], imgList: [],
treeBasic: [ treeBasic: [
{ {
id: 1, id: 10,
label: '资料名称', label: '资料名称',
children: [] children: []
}, },
{ {
id: 2, id: 11,
label: '处理状态', label: '处理状态',
children: [ children: [
{ {
id: 5, id: 12,
label: '已审核' label: '已审核'
}, },
{ {
id: 6, id: 13,
label: '未审核' label: '未审核'
} }
] ]
}, },
{ {
id: 3, id: 14,
label: '审核状态', label: '审核状态',
children: [ children: [
{ {
id: 7, id: 15,
label: '通过' label: '通过'
}, },
{ {
id: 8, id: 16,
label: '未通过' label: '未通过'
} }
] ]
...@@ -138,10 +143,16 @@ export default { ...@@ -138,10 +143,16 @@ export default {
], ],
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label',
id: 'id'
} }
} }
}, },
watch: {
treeChecked(newVal) {
this.toChangeTreeAll(newVal)
}
},
mounted() { mounted() {
this.filterImgList = [] this.filterImgList = []
document.addEventListener('click', e => { document.addEventListener('click', e => {
...@@ -164,6 +175,7 @@ export default { ...@@ -164,6 +175,7 @@ export default {
// this.curImg.idx =type == 'next' ? idx + 1 : idx - 1 // this.curImg.idx =type == 'next' ? idx + 1 : idx - 1
// }, // },
handlerData(val) { handlerData(val) {
this.treeBasic[0].children = []
let arr = [] let arr = []
val.forEach((el, index) => { val.forEach((el, index) => {
let obj = { let obj = {
...@@ -221,10 +233,116 @@ export default { ...@@ -221,10 +233,116 @@ export default {
console.log(err) console.log(err)
} }
}, },
checkChange(e) { // checkChange(data, checked, indeterminate) {
console.log(e) // console.log(data, checked, indeterminate)
// const list = this.imgList.filter(item => {}) // },
// this.filterImgList = [...this.imgList] 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 @@ ...@@ -134,11 +134,11 @@
<div style="height: 36px" class="messag flex_scb"> <div style="height: 36px" class="messag flex_scb">
<div class="ms"> <div class="ms">
<span>预估损失金额/元:</span> <span>预估损失金额/元:</span>
<span class="price">{{ item.applyAmount || 0 }}</span> <span class="price">{{ item.approveAmount || 0 }}</span>
</div> </div>
<div class="ms"> <div class="ms">
<span>定损批准金额:</span> <span>定损批准金额:</span>
<span class="price">{{ item.approveAmount || 0 }}</span> <span class="price">{{ item.applyAmount || 0 }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -146,9 +146,9 @@ ...@@ -146,9 +146,9 @@
<div class="total flex_scb"> <div class="total flex_scb">
<span>合计</span> <span>合计</span>
<span> <span>
<span>预估损失金额:{{ repotData.applyAmount || 0 }}元</span> <span>预估损失金额:{{ repotData.approveAmount || 0 }}元</span>
<span style="margin: 0 10px">|</span> <span style="margin: 0 10px">|</span>
<span>定损批准金额:{{ repotData.approveAmount || 0 }}元</span> <span>定损批准金额:{{ repotData.applyAmount || 0 }}元</span>
</span> </span>
</div> </div>
</div> </div>
......
...@@ -291,7 +291,7 @@ export default { ...@@ -291,7 +291,7 @@ export default {
fn: '重新提交' fn: '重新提交'
}, },
listeners: { listeners: {
click: row => this.handleEdit(5, row.scope) click: row => this.handleEdit(6, row.scope)
} }
} }
], ],
...@@ -317,7 +317,6 @@ export default { ...@@ -317,7 +317,6 @@ export default {
isClear: true, isClear: true,
maxlength: 200, maxlength: 200,
placeholder: '客户|合同号|报案号' placeholder: '客户|合同号|报案号'
// isHide: true
}, },
{ {
label: '服务状态', label: '服务状态',
...@@ -342,7 +341,8 @@ export default { ...@@ -342,7 +341,8 @@ export default {
isClear: true, isClear: true,
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName' optionLabel: 'confName',
isHide:true
}, },
{ {
label: '片区', label: '片区',
...@@ -351,7 +351,8 @@ export default { ...@@ -351,7 +351,8 @@ export default {
isClear: true, isClear: true,
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName' optionLabel: 'confName',
isHide:true
}, },
{ {
label: '门店', label: '门店',
...@@ -360,7 +361,8 @@ export default { ...@@ -360,7 +361,8 @@ export default {
isClear: true, isClear: true,
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName' optionLabel: 'confName',
isHide:true
}, },
{ {
label: '提交国任日期', label: '提交国任日期',
...@@ -394,7 +396,7 @@ export default { ...@@ -394,7 +396,7 @@ export default {
label: '客户名称', label: '客户名称',
prop: 'reporterName', prop: 'reporterName',
width: 200, width: 200,
line:1, line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.reporterName || '-' return cellValue.reporterName || '-'
} }
...@@ -573,15 +575,42 @@ export default { ...@@ -573,15 +575,42 @@ export default {
followEditStatus: false, followEditStatus: false,
followContent: '', followContent: '',
followResult: false, followResult: false,
colors colors,
levelToShow: {
1: 'merchantId',
2: 'dqtId',
3: 'pqId',
4: 'mdId'
}
} }
}, },
created() { created() {
this.getClaimsCount() this.getClaimsCount()
// this.getMerchantData()
}, },
mounted() {}, mounted() {},
methods: { 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) { showFollow(row) {
this.followDialog = true this.followDialog = true
this.curentFollowInfo = row this.curentFollowInfo = row
...@@ -658,7 +687,8 @@ export default { ...@@ -658,7 +687,8 @@ export default {
// 1.新增 2.查看 6.重新提交 4.去处理 5.审核 // 1.新增 2.查看 6.重新提交 4.去处理 5.审核
handleEdit(editNo, row) { handleEdit(editNo, row) {
let urlParam = {} let urlParam = {}
if (editNo != 1 && editNo != 6) { console.log(editNo)
if (editNo != 1 || editNo == 6) {
urlParam = { urlParam = {
editNo, editNo,
isGH: true, isGH: true,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<template v-else-if="pageType == 5 && routeInfo.status < 11"> <template v-else-if="pageType == 5 && routeInfo.status < 11">
<CheckData :otherInfoData.sync="otherInfoData" :itemList.sync="itemList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs" :repotData.sync="repotData"></CheckData> <CheckData :otherInfoData.sync="otherInfoData" :itemList.sync="itemList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs" :repotData.sync="repotData"></CheckData>
</template> </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"> <div class="tab_wrap">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane class="bg" label="核赔信息" name="first"> <el-tab-pane class="bg" label="核赔信息" name="first">
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</template> </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="toBackList">取消</el-button>
<el-button plain class="btn-three" @click="toSaveOrder">保存</el-button> <el-button plain class="btn-three" @click="toSaveOrder">保存</el-button>
<el-button plain @click="toNoPassOrder">不通过</el-button> <el-button plain @click="toNoPassOrder">不通过</el-button>
...@@ -40,11 +40,11 @@ ...@@ -40,11 +40,11 @@
<div class="set-price"> <div class="set-price">
<li> <li>
<label for="">预计损失金额/元:</label> <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>
<li> <li>
<label for="">定损批准金额/元:</label> <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> </li>
</div> </div>
</div> </div>
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
status: res.status status: res.status
} }
this.repotData = { this.repotData = {
status:res.status, status: res.status,
writeOffCode: res.writeOffCode, writeOffCode: res.writeOffCode,
reporterName: res.reporterName, reporterName: res.reporterName,
reporterPhone: res.reporterPhone, reporterPhone: res.reporterPhone,
...@@ -251,6 +251,9 @@ export default { ...@@ -251,6 +251,9 @@ export default {
res.itemsList.map(item => { res.itemsList.map(item => {
item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount
item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : item.approveAmount 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) this.$set(item, 'checked', true)
}) })
...@@ -335,29 +338,18 @@ export default { ...@@ -335,29 +338,18 @@ export default {
// this.getAccountInfo(this.editForm.contractNo) // this.getAccountInfo(this.editForm.contractNo)
// } // }
}, },
// 获取收款对象数据 // submitForm(val) {
// getAccountInfo(contractNo) { // // val == 1 通过 ,2 不通过
// if (!contractNo) return // this.cancelDialog(val)
// this.$apis.claims.getAccountInfo({ contractNo }).then(res => { // },
// const { accountName, accountCityCode: bankCity, openBankCode: branchBankCode, accountNo, accountType, cardNo: payeeIDCardNo, cardTypeCode: payeeIDCardType, phone: payeePhone } = res || {} // cancelDialog(val) {
// const result = { accountName, bankCity, branchBankCode, accountNo, accountType, payeeIDCardNo, payeeIDCardType, payeePhone } // // val == 1 通过 ,2 不通过
// this.accountForm = { ...this.accountForm, ...result } // if (val == 1) {
// if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0 // this.showPassedDialog = false
// if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0 // } 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) { getOtherInfo(contractNo) {
this.$apis.claims.getOrderOherInfo({ contractNo }).then(res => { this.$apis.claims.getOrderOherInfo({ contractNo }).then(res => {
...@@ -371,7 +363,7 @@ export default { ...@@ -371,7 +363,7 @@ export default {
}, },
// 通过订单 // 通过订单
toPassOrder() { toPassOrder() {
if (this.orderMsg.status == 12) { if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
const isPass = this.verifyImages(this.claimsAttachmentConfigs) const isPass = this.verifyImages(this.claimsAttachmentConfigs)
if (!isPass) { if (!isPass) {
this.$message({ this.$message({
...@@ -494,7 +486,7 @@ export default { ...@@ -494,7 +486,7 @@ export default {
}, },
// 点击不通过 // 点击不通过
comfirmNoPass() { comfirmNoPass() {
if (this.orderMsg.status == 12) { if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
this.hepeiPass(true) this.hepeiPass(true)
return return
} }
...@@ -551,7 +543,7 @@ export default { ...@@ -551,7 +543,7 @@ export default {
// 案件补充说明 // 案件补充说明
handlerExplain() { handlerExplain() {
let obj = {} let obj = {}
if (this.orderMsg.status == 12) { if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
this.repotData.supplementList2.forEach((item, index) => { this.repotData.supplementList2.forEach((item, index) => {
let idx = `supplementList2[${index}].id` let idx = `supplementList2[${index}].id`
let claimsId = `supplementList2[${index}].claimsId` let claimsId = `supplementList2[${index}].claimsId`
...@@ -586,7 +578,7 @@ export default { ...@@ -586,7 +578,7 @@ export default {
// 图片数据处理 // 图片数据处理
hanlerImg() { hanlerImg() {
let imgs = [] let imgs = []
if (this.orderMsg.status == 12) { if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
this.claimsAttachmentConfigs.forEach((item, index) => { this.claimsAttachmentConfigs.forEach((item, index) => {
item.secondClassifyList.forEach(el => { item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => { el.attachmentList.forEach(ele => {
...@@ -606,7 +598,7 @@ export default { ...@@ -606,7 +598,7 @@ export default {
}) })
} }
let obj = {} 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) => { imgs.forEach((item, index) => {
let idx = `attachments${type}[${index}].id` let idx = `attachments${type}[${index}].id`
let claimsId = `attachments${type}[${index}].claimsId` let claimsId = `attachments${type}[${index}].claimsId`
...@@ -658,12 +650,7 @@ export default { ...@@ -658,12 +650,7 @@ export default {
[approveAmount]: item.approveAmount ? Number(item.approveAmount) * 100 : 0, [approveAmount]: item.approveAmount ? Number(item.approveAmount) * 100 : 0,
[applyAmount]: item.applyAmount ? Number(item.applyAmount) * 100 : 0, [applyAmount]: item.applyAmount ? Number(item.applyAmount) * 100 : 0,
[claimsId]: this.orderMsg.id, [claimsId]: this.orderMsg.id,
// [createdDate]: item.id, [lossType]: item.serviceItemCode == 'SC0006' ? item.lossTypeList.join(',') : item.lossType
// [createdBy]: item.createdBy,
// [updatedDate]: item.createdDate,
// [updatedBy]: item.updatedBy,
// [deletedFlag]: item.deletedFlag,
[lossType]: item.lossType
} }
Object.assign(itemObj, temp) Object.assign(itemObj, temp)
}) })
...@@ -708,12 +695,12 @@ export default { ...@@ -708,12 +695,12 @@ export default {
writeOffCode: this.repotData.writeOffCode writeOffCode: this.repotData.writeOffCode
} }
return this.orderMsg.status == 12 ? claims : para return this.orderMsg.status == 12 || this.orderMsg.status == 2 ? claims : para
}, },
// 保存订单 // 保存订单
toSaveOrder() { toSaveOrder() {
let para = this.savePara() 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.$apis.claims[name](para).then(res => {
this.$message({ this.$message({
message: '保存成功', message: '保存成功',
...@@ -725,6 +712,39 @@ export default { ...@@ -725,6 +712,39 @@ export default {
// 返回上一页 // 返回上一页
toBackList() { toBackList() {
this.$router.push({ path: '/claims/ghIndex' }) 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!