Commit 57f57b8f by 杨北旺

修复图片上传Bug

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