Commit 43cc2b5b by 杨北旺

修改bug

1 parent 7973539a
......@@ -12,8 +12,8 @@ let instance = null
Vue.use(GLTable).use(GLCombiForm).use(GLTableButton).use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, sign, secret } = await fetchConfig()
// request.baseURL = 'https://scrm.dev.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.dev.glsx.com.cn'
// request.baseURL = 'https://scrm.test.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.test.glsx.com.cn'
// request.baseURL = 'http://192.168.1.53:7226'
// request_brand.baseURL = 'http://192.168.1.53:7226'
Vue.prototype.$history = history
......
......@@ -61,6 +61,7 @@ export default {
border-top: 1px solid #e5e5e5;
padding: 20px;
height: 100%;
position: relative;
}
}
......
<template>
<GLDialog class="gl-form-page gl-form-min" title="快速审核" mode="mid" @onCancel="closeDialog" v-if="visibility" :visible.sync="visibility">
<GLDialog class="gl-form-page gl-form-min" title="快速审核" mode="mid" @onOk="closeDialog" @onCancel="closeDialog" v-if="visibility" :visible.sync="visibility">
<div class="review-container">
<div class="filter-wrap">
<!-- 筛选树 -->
......@@ -8,7 +8,7 @@
<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 @check-change="checkChange" :data="treeBasic" show-checkbox node-key="id" :default-expanded-keys="[2, 3]" :default-checked-keys="[5]" :props="defaultProps"></el-tree>
<el-tree @node-click="checkChange" :data="treeBasic" show-checkbox node-key="id" :props="defaultProps"></el-tree>
</div>
<div class="filter-all">
<el-checkbox v-model="checked">全选</el-checkbox>
......@@ -30,6 +30,11 @@
<div @click="changeCurImg(item, index)" :class="['pic', { cur: curImg.idx == index }]">
<img :src="item.attachmentFile" alt="" />
</div>
<div v-if="item.auditStatus == 0" class="error_desc flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="item.reasonForFailure">
<div class="intext" slot="reference">{{ item.reasonForFailure }}</div>
</el-popover>
</div>
</div>
</div>
</div>
......@@ -38,7 +43,7 @@
<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>
<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>
......@@ -49,11 +54,11 @@
<div class="pass-btn">
<!-- <el-button type="text" @click="changeLeaf('pre')">上一张</el-button> -->
<el-button type="text" @click="handleApproval(1)">通过</el-button>
<el-popover class="popover" popper-class="imgPopper" placement="top" width="314" trigger="click">
<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" @click="handleApproval(2)">不通过</el-button>
<el-button slot="reference" type="text">不通过</el-button>
</el-popover>
<!-- <el-button type="text" @click="changeLeaf('next')">下一张</el-button> -->
</div>
......@@ -87,7 +92,10 @@ export default {
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true
isClear: true,
inputChange: e => {
this.handleApproval(0, e)
}
}
],
curImg: {},
......@@ -127,7 +135,11 @@ export default {
}
]
}
]
],
defaultProps: {
children: 'children',
label: 'label'
}
}
},
mounted() {
......@@ -184,10 +196,24 @@ export default {
this.curImg = this.filterImgList[index]
this.curImg.idx = index
},
handleApproval() {
handleApproval(type, desc) {
if (type == 0) {
this.curImg.reasonForFailure = desc
this.imgPassObj.desc = ''
this.$refs.descPopover.doClose()
}
this.curImg.auditStatus = type
this.images.forEach(item => {
item.secondClassifyList.forEach(child => {
child.attachmentList.forEach(last => {
if (last.id == this.curImg.id) {
last = this.curImg
}
})
})
})
const idx = this.curImg.idx
this.filterImgList[idx].status = 1
this.changeCurImg(idx + 1)
this.changeCurImg({}, idx + 1)
try {
let scrollH = document.getElementById('pic-list')
scrollH.scrollTop = 135 * (idx + 1)
......@@ -285,6 +311,7 @@ export default {
.pic-item {
font-size: 14px;
margin-bottom: 12px;
position: relative;
.title {
height: 28px;
line-height: 28px;
......@@ -319,6 +346,26 @@ export default {
.cur {
border: 1px solid #5850ff;
}
.error_desc {
background: rgba(255, 82, 87, 0.5);
position: absolute;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
.intext {
box-sizing: border-box;
padding: 0 2px;
font-size: 12px;
font-weight: 400;
color: #ffffff;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
}
......
......@@ -2,18 +2,52 @@
<div class="">
<Card title="上传图片">
<el-button type="text" slot="right" @click.stop="handleReview">快速审核</el-button>
<!-- <el-button type="text" class="multiBtn" @click.stop="toMutiCheck">批量通过</el-button> -->
<el-tabs class="tabs" v-model="activeName" @tab-click="changeTabs">
<el-tab-pane v-for="(item, index) in insuranceAttachmentConfigs" :key="index" :label="item.firstClassifyName">
<!-- <div v-if="item.firstClassifyName.indexOf('定损') != -1" class="service_line_wrap flex_sc">
<el-checkbox-group v-model="checkList">
<template v-for="(service, serviceIndex) in item.secondClassifyList">
<div :key="serviceIndex" class="line_box">
<el-checkbox :label="service.serviceItemName"></el-checkbox>
</div>
</template>
</el-checkbox-group>
<!-- <div class="all_select_wrap flex_scb">
<div class="wrap_widget flex_sc">
<img class="icon" :src="IMAGE+'check_box_icon.png'" />
<span class="text">全选</span>
<span class="text">已选6项内容</span>
</div>
<div class="wrap_widget flex_scb">
<el-button size="small" class="btn-three">取消</el-button>
<el-button size="small" type="primary">通过</el-button>
</div>
</div> -->
<div v-if="item.firstClassifyName.indexOf('其他') == -1" class="image_container">
<div v-if="item.firstClassifyName.indexOf('细节') != -1" class="service_line_wrap flex_sc">
<template v-for="(serviceitems, serviceIndex) in item.services">
<div :key="serviceIndex" class="line_box flex_cc" @click="selectServices(serviceIndex)">
<div class="inner flex_cc" :class="[{ active: currentServicesIndex == serviceIndex }]">{{ serviceitems }}</div>
</div>
</template>
</div>
<div v-if="item.firstClassifyName.indexOf('细节') != -1" class="image_container">
<template v-for="(img, i) in insuranceAttachmentConfigs[currentIndx].secondClassifyList">
<div v-if="img.serviceItemName == item.services[currentServicesIndex]" :key="i" class="img_box">
<div class="title flex_sc">
<i v-if="img.attachmentList[0].auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.attachmentList[0].auditStatus == 0" class="el-icon-error error"></i>
<div class="">{{ img.secondClassifyName }}</div>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image>
<img v-else :src="cameraUrl" style="width: 40px; height: 40px" />
<div v-if="img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div>
</div>
<div class="footer_btn">
<el-button style="margin-left: 39px" @click="toHandlerImage(img, i, 1)" type="text">通过</el-button>
<el-button @click="toHandlerImage(img, i, 0)" type="text">不通过</el-button>
<div @click="toHandlerImage(img, i, 2)" class="up_wrap">
<span>上传</span>
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
</div>
</div>
</template>
</div>
<div v-else-if="item.firstClassifyName.indexOf('其他') == -1 && item.firstClassifyName.indexOf('细节') == -1" class="image_container">
<div v-for="(img, i) in insuranceAttachmentConfigs[currentIndx].secondClassifyList" :key="i" class="img_box">
<div v-if="img.serviceItemName" class="service_title">{{ img.serviceItemName }}</div>
<div class="title flex_sc">
......@@ -85,10 +119,12 @@ import url from '@/assets/images/idCard.png'
import Card from './card.vue'
import fastReview from './fastReview'
import glsxCombiForm from '@/components/glsx-combi-form'
const BASE_IMAGE = 'https://img02.glsx.com.cn/weapp/resource/saas/scrm/'
export default {
name: 'uploadMaterial',
data() {
return {
IMAGE: BASE_IMAGE,
url,
cameraUrl,
write_off,
......@@ -108,7 +144,7 @@ export default {
isClear: true
}
],
checkList: []
currentServicesIndex: 0
}
},
components: {
......@@ -121,6 +157,19 @@ export default {
},
mounted() {},
methods: {
toMutiCheck() {
this.insuranceAttachmentConfigs.forEach((item,index)=>{
item.secondClassifyList.forEach(child=>{
child.attachmentList.forEach(lastChild=>{
lastChild.isSelect = true
})
})
})
console.log(this.insuranceAttachmentConfigs);
},
selectServices(index) {
this.currentServicesIndex = index
},
changeTabs(e) {
this.activeName = e.index.toString()
this.currentIndx = e.index
......@@ -136,7 +185,11 @@ export default {
this.isUploadOther = false
if (type == 2) return
if (type == 1) {
img.attachmentList[0].auditStatus = type
if (!img.attachmentList) {
img.auditStatus = type
} else {
img.attachmentList[0].auditStatus = type
}
return
}
if (type == 0) {
......@@ -149,8 +202,9 @@ export default {
this.isUploadOther = true
},
upload(e) {
let otherObj = {
...this.insuranceAttachmentConfigs[this.currentIndx].allImages[0]
let otherObj = {}
if(this.isUploadOther){
Object.assign(otherObj,this.insuranceAttachmentConfigs[this.currentIndx].allImages[0])
}
const file = e.target.files[0]
const reader = new FileReader()
......@@ -168,6 +222,7 @@ export default {
return
}
this.uploadObj.img.attachmentList[0].attachmentFile = res
this.uploadObj.img.attachmentList[0].auditStatus = null
this.$set(this.insuranceAttachmentConfigs[this.currentIndx].secondClassifyList[this.uploadObj.index], this.uploadObj.img)
})
}
......@@ -196,8 +251,55 @@ export default {
box-sizing: border-box;
padding: 20px;
}
.multiBtn {
position: absolute;
right: 20px;
top: 26px;
z-index: 2;
}
.all_select_wrap {
width: 100%;
height: 64px;
background: #f9f9f9;
margin-bottom: 16px;
box-sizing: border-box;
padding: 0 20px;
.wrap_widget {
.icon {
width: 20px;
height: 20px;
cursor: pointer;
}
.text {
font-size: 14px;
font-weight: 400;
color: #333333;
margin: 0 20px 0 4px;
}
}
}
.service_line_wrap {
padding: 16px 0;
border-radius: 4px;
margin-bottom: 16px;
.line_box {
height: 36px;
background: #f8f8f8;
box-sizing: border-box;
padding: 2px;
}
.inner {
font-size: 14px;
font-weight: 500;
color: #666666;
padding: 0 16px;
cursor: pointer;
}
.active {
height: 32px;
background: #ffffff;
border-radius: 3px;
color: #5850ff;
}
}
.image_container {
display: flex;
......
......@@ -393,7 +393,8 @@ export default {
{
label: '客户名称',
prop: 'reporterName',
width: 160,
width: 200,
line:1,
formatter: cellValue => {
return cellValue.reporterName || '-'
}
......
<template>
<div class="order-container-page">
<template v-if="pageType == 2">
<WatchData :otherInfoData.sync="otherInfoData" :images="insuranceAttachmentConfigs" :itemsList.sync="itemList" :repotData.sync="repotData" :accountList.sync="accountList" :watchData.sync="watchData"></WatchData>
<WatchData :otherInfoData.sync="otherInfoData" :images="insuranceAttachmentConfigs" :images2="claimsAttachmentConfigs" :itemsList.sync="itemList" :repotData.sync="repotData" :accountList.sync="accountList" :watchData.sync="watchData"></WatchData>
</template>
<template v-else-if="pageType == 5 && routeInfo.status < 11">
<CheckData :otherInfoData.sync="otherInfoData" :itemList.sync="itemList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs" :repotData.sync="repotData"></CheckData>
......@@ -20,7 +20,7 @@
</template>
<!-- 底部按钮 -->
<div v-if="pageType != 2" 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>
......@@ -166,6 +166,7 @@ export default {
status: res.status
}
this.repotData = {
status:res.status,
writeOffCode: res.writeOffCode,
reporterName: res.reporterName,
reporterPhone: res.reporterPhone,
......@@ -197,6 +198,8 @@ export default {
// 图片list
res.insuranceAttachmentConfigs.map(item => {
let arr = []
let services = []
if (item.firstClassifyName.indexOf('其他') != -1) {
item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => {
......@@ -205,15 +208,17 @@ export default {
})
item.allImages = arr
}
// if (item.firstClassifyName.indexOf('定损') != -1) {
// item.secondClassifyList.forEach((el, index) => {
// })
// }
if (item.firstClassifyName.indexOf('定损细节照片') != -1) {
item.secondClassifyList.forEach(el => {
services.push(el.serviceItemName)
})
item.services = [...new Set(services)]
}
})
res.claimsAttachmentConfigs.map(item => {
let arr = []
let services = []
if (item.firstClassifyName.indexOf('其他') != -1) {
item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => {
......@@ -221,16 +226,23 @@ export default {
})
})
item.allImages = arr
} else {
}
if (item.firstClassifyName.indexOf('核赔细节照') != -1) {
item.secondClassifyList.forEach(el => {
if (!el.attachmentList.length) {
el.attachmentList.forEach(ele => {
;(ele.auditStatus = null), (ele.attachmentFile = '')
ele.reasonForFailure = ''
})
}
services.push(el.serviceItemName)
})
item.services = [...new Set(services)]
}
// else {
// item.secondClassifyList.forEach(el => {
// if (!el.attachmentList.length) {
// el.attachmentList.forEach(ele => {
// ;(ele.auditStatus = null), (ele.attachmentFile = '')
// ele.reasonForFailure = ''
// })
// }
// })
// }
})
this.insuranceAttachmentConfigs = res.insuranceAttachmentConfigs
this.claimsAttachmentConfigs = res.claimsAttachmentConfigs
......@@ -350,8 +362,9 @@ export default {
getOtherInfo(contractNo) {
this.$apis.claims.getOrderOherInfo({ contractNo }).then(res => {
if (res) {
res.expirationDate = res.expirationDate ? dayjs(res.expirationDate).format('YYYY-MM-DD HH:mm:ss') + ' 至 ' + res.effectiveDate : '2019-12-12 23:59:59'
res.expirationDate = res.expirationDate ? res.effectiveDate + ' 至 ' + dayjs(res.expirationDate).format('YYYY-MM-DD HH:mm:ss') : '2019-12-12 23:59:59'
res.billingDate = res.billingDate && dayjs(res.billingDate).format('YYYY-MM-DD HH:mm:ss')
res.invoicePrice = res.invoicePrice / 100
this.otherInfoData = { ...res, contractNo }
}
})
......@@ -359,11 +372,49 @@ export default {
// 通过订单
toPassOrder() {
if (this.orderMsg.status == 12) {
const isPass = this.verifyImages(this.claimsAttachmentConfigs)
if (!isPass) {
this.$message({
message: '图片需要全部通过才允许此操作',
type: 'error'
})
return
}
this.hepeiPass()
return
}
const isPass = this.verifyImages(this.insuranceAttachmentConfigs)
if (!isPass) {
this.$message({
message: '图片需要全部通过才允许此操作',
type: 'error'
})
return
}
this.showPassedDialog = true
},
// 校验图片是否已全部校验
verifyImages(arr) {
let pass = true
arr.forEach(item => {
if (item.firstClassifyName.indexOf('其他') == -1) {
item.secondClassifyList.forEach(child => {
child.attachmentList.forEach(last => {
if (!last.auditStatus) {
pass = false
}
})
})
} else {
item.allImages.forEach(child => {
if (!child.auditStatus) {
pass = false
}
})
}
})
return pass
},
handleJieGpu(type) {
let target = {}
let arr = []
......@@ -426,7 +477,7 @@ export default {
this.$apis.claims.checkOrderApi(para).then(res => {
if (res) {
this.$message({
message: '审核成功',
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/claims/ghIndex' })
......@@ -441,6 +492,7 @@ export default {
toNoPassOrder() {
this.showNoPassDialog = true
},
// 点击不通过
comfirmNoPass() {
if (this.orderMsg.status == 12) {
this.hepeiPass(true)
......@@ -453,7 +505,7 @@ export default {
this.$apis.claims.checkOrderApi(para).then(res => {
if (res) {
this.$message({
message: '审核成功',
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/claims/ghIndex' })
......@@ -490,7 +542,7 @@ export default {
reimbursementProvinceCode: this.repotData.reimbursementProvinceCode,
reimbursementAddr: this.repotData.reimbursementAddr,
reimbursementProcess: this.repotData.reimbursementProcess,
applyAmount: this.repotData.applyAmount?Number(this.repotData.applyAmount)*100:0,
applyAmount: this.repotData.applyAmount ? Number(this.repotData.applyAmount) * 100 : 0,
signatureAuth: this.repotData.signatureAuth || ''
}
......@@ -553,7 +605,6 @@ export default {
})
})
}
let obj = {}
let type = this.orderMsg.status == 12 ? 2 : 1
imgs.forEach((item, index) => {
......@@ -620,7 +671,6 @@ export default {
},
// 保存草稿参数
savePara() {
// const operation = this.orderMsg.status == 12 ? 2 : 0
const operation = 0
let itemObj = this.handlerServices()
let imgObj = this.hanlerImg()
......@@ -644,7 +694,7 @@ export default {
reimbursementProvinceCode: this.repotData.reimbursementProvinceCode,
reimbursementAddr: this.repotData.reimbursementAddr,
reimbursementProcess: this.repotData.reimbursementProcess,
applyAmount: this.repotData.applyAmount?Number(this.repotData.applyAmount)*100:0
applyAmount: this.repotData.applyAmount ? Number(this.repotData.applyAmount) * 100 : 0
}
let claims = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!