Commit 57f57b8f by 杨北旺

修复图片上传Bug

1 parent 21b7af73
......@@ -22,7 +22,7 @@
</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-group v-model="item.lossTypeList" @change="changeType">
<el-checkbox label="3">钥匙</el-checkbox>
<el-checkbox label="4">车牌重置</el-checkbox>
</el-checkbox-group>
......@@ -168,6 +168,7 @@ export default {
label: '经办人',
name: 'handlerName',
type: 'input',
maxlength: 20,
isClear: true
},
{
......@@ -182,6 +183,7 @@ export default {
name: 'reimbursementProcess',
type: 'input',
inputType: 'textarea',
maxlength: 200,
rows: 3,
isClear: true
},
......@@ -240,7 +242,7 @@ export default {
this.$set(Item.customPickerOptions, 'selectableRange', limitTime)
},
validPrice(e, id) {
let checkPlan = '' + this.itemList[id].approveAmount
let checkPlan = '' + this.itemList[id].applyAmount
checkPlan = checkPlan
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
......@@ -253,7 +255,7 @@ export default {
} else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
}
this.$set(this.itemList[id], 'approveAmount', checkPlan)
this.$set(this.itemList[id], 'applyAmount', checkPlan)
this.getTotal()
},
changePrice(e, id) {
......@@ -261,15 +263,15 @@ export default {
const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') {
this.$set(this.itemList[id], 'approveAmount', e.target.value.substr(0, len - 1))
this.$set(this.itemList[id], 'applyAmount', e.target.value.substr(0, len - 1))
}
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], 'approveAmount', 1)
this.$set(this.itemList[id], 'applyAmount', 1)
}
const maxPrice = 2000000
const maxPrice = 200000
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], 'approveAmount', maxPrice)
this.$set(this.itemList[id], 'applyAmount', maxPrice)
}
this.getTotal()
},
......@@ -278,10 +280,13 @@ export default {
},
getTotal() {
let total = this.itemList.reduce(function (prev, cur) {
let curPrice = cur.checked ? cur.approveAmount : 0
let curPrice = cur.checked ? cur.applyAmount : 0
return prev + +(curPrice * 100).toFixed(0)
}, 0)
this.repotData.approveAmount = (total / 100).toFixed(2)
this.repotData.applyAmount = (total / 100).toFixed(2)
},
changeType(e){
// this.$emit('')
}
}
}
......
......@@ -72,8 +72,8 @@
</div>
<div class="widget ma16">
<div class="title">寄回原件说明</div>
<div class="content pad20">
<div v-for="(first, ind) in repotData.claimsAttachmentConfigs2" :key="ind">
<div class="content pad20 ">
<div class="flex_sc" v-for="(first, ind) in repotData.claimsAttachmentConfigs2" :key="ind">
<div v-for="(img, i) in first.secondClassifyList" :key="i" class="img_box">
<div class="title_tip flex_sc">
<div class="">{{ img.secondClassifyName || '' }}</div>
......
......@@ -4,7 +4,7 @@
<div class="explanation">
<div class="explanation-list" v-for="(item, idx) in supplementList" :key="idx">
<label class="label" for="">{{ `说明${idx + 1}:` }}</label>
<el-input :disabled="isCheck || isDisabled" :placeholder="`请输入说明${idx + 1}`" v-model="item.content" type="textarea" :rows="3"></el-input>
<el-input :disabled="isCheck || isDisabled" :placeholder="`请输入说明${idx + 1}`" v-model="item.content" maxlength="200" type="textarea" :rows="3"></el-input>
<i class="el-icon-delete del" v-if="!isCheck&&supplementList.length > 1" @click="handleDel(idx)"></i>
</div>
</div>
......
......@@ -31,10 +31,15 @@
<i v-else-if="img.attachmentList.length&&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.length&&img.attachmentList[0].auditStatus == 0 }]">
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length&&img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList.length&&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.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div>
<!-- <div v-if="img.attachmentList.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div> -->
<div v-if="img.attachmentList.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="img.attachmentList[0].reasonForFailure">
<div class="intext" slot="reference">{{ img.attachmentList[0].reasonForFailure }}</div>
</el-popover>
</div>
</div>
<div v-if="!isDisabled" class="footer_btn">
<el-button style="margin-left: 39px" @click="toHandlerImage(img, i, 1)" type="text">通过</el-button>
......@@ -55,10 +60,15 @@
<i v-else-if="img.attachmentList.length&&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.length&&img.attachmentList[0].auditStatus == 0 }]">
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length&&img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList.length&&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.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div>
<!-- <div v-if="img.attachmentList.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div> -->
<div v-if="img.attachmentList.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="img.attachmentList[0].reasonForFailure">
<div class="intext" slot="reference">{{ img.attachmentList[0].reasonForFailure }}</div>
</el-popover>
</div>
</div>
<div v-if="!isDisabled" class="footer_btn">
<el-button style="margin-left: 39px" @click="toHandlerImage(img, i, 1)" type="text">通过</el-button>
......@@ -80,7 +90,12 @@
<div class="img_pannel flex_cc" :class="[{ errBorder: img.auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentFile]" v-if="img.attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentFile" :fit="fit"></el-image>
<img v-else :src="cameraUrl" style="width: 40px; height: 40px" />
<div v-if="img.auditStatus == 0" class="errMsg flex_cc">{{ img.reasonForFailure }}</div>
<!-- <div v-if="img.auditStatus == 0" class="errMsg flex_cc">{{ img.reasonForFailure }}</div> -->
<div v-if="img.auditStatus == 0" class="errMsg flex_cc">
<el-popover placement="top-start" width="200" trigger="hover" :content="img.reasonForFailure">
<div class="intext" slot="reference">{{ img.reasonForFailure }}</div>
</el-popover>
</div>
</div>
<div v-if="!isDisabled" class="footer_btn">
<el-button style="margin-left: 39px" @click="toHandlerImage(img, i, 1, true)" type="text">通过</el-button>
......@@ -179,7 +194,9 @@ export default {
handleReview() {
this.$refs.fastReviewDialog.initDialog()
},
// type 1通过 0不通过 2 上传
toHandlerImage(img, index, type, isOther = false) {
if(!img.attachmentList.length&&!isOther)return
this.uploadObj = {
img,
index
......@@ -188,8 +205,7 @@ export default {
if (isOther) {
this.otherUploadIndex = index
}
if (type == 2) {
this.isUploadOther = true
if (type == 2&&isOther) {
this.otherUploadIndex = index
return
}
......@@ -359,6 +375,7 @@ export default {
background: #f5f5f5;
position: relative;
border-radius: 4px;
background-size: 100% 100%;
.errMsg {
background: rgba(255, 82, 87, 0.5);
position: absolute;
......@@ -371,6 +388,18 @@ export default {
color: #ffffff;
z-index: 10;
word-break: break-all;
.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: 3;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.uplpad_pannel {
......
......@@ -715,8 +715,8 @@ export default {
editNo,
isGH: true,
contractNo: editNo == 4 ? row.writeOffCode : '',
orderId: editNo == 4 ? row.writeOffCode : '',
status: editNo == 4 ? row.writeOffCode : ''
orderId: editNo == 4 ? row.id : '',
status: editNo == 4 ? row.status : '',
}
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/order/' + temp, query: { $title: title } })
......
......@@ -133,7 +133,7 @@ export default {
inputType: 'textarea',
rows: 3,
isClear: true,
maxLenght: 50
maxlength: 200,
}
],
testServiceList: [],
......@@ -414,14 +414,13 @@ export default {
})
return pass
},
handleJieGpu(type) {
handleJieGpu(type,isNopass=true) {
let target = {}
let arr = []
if (type == 3) {
this.repotData.attachments3.forEach(el => {
let { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy } = el
let obj = { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy }
obj.auditStatus = 1
arr.push(obj)
})
return arr
......@@ -430,7 +429,6 @@ export default {
this.repotData.attachments2.forEach(el => {
let { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy } = el
let obj = { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy }
obj.auditStatus = 1
arr.push(obj)
})
return arr
......@@ -444,12 +442,14 @@ export default {
hepeiPass(isNopass) {
let obj = this.handlerServices()
let exobj = this.handlerExplain()
let imgObj = this.hanlerImg()
let para = {
...this.orderMsg,
attachments3: this.handleJieGpu(3),
attachments2: this.handleJieGpu(2),
...obj,
...exobj,
...imgObj,
bankAccount: this.handleJieGpu(4),
auditStatus: 1,
reasonForFailure: '',
......@@ -465,7 +465,7 @@ export default {
loading.close()
if (res) {
this.$message({
message: '审核成功',
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/claims/ghIndex' })
......@@ -505,7 +505,9 @@ export default {
para.auditStatus = 0
para.reasonForFailureCode = this.noPassObj.reason
para.reasonForFailure = this.noPassObj.desc
let loading = this.createLoading()
this.$apis.claims.checkOrderApi(para).then(res => {
loading.close()
if (res) {
this.$message({
message: '操作成功',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!