查验附件

This commit is contained in:
zzyuan 2025-07-18 14:42:41 +08:00
parent 90c8899d5c
commit 24ff935bc8
2 changed files with 14 additions and 8 deletions

View File

@ -42,6 +42,12 @@
<template slot="label">备注</template> <template slot="label">备注</template>
{{ baseInfo.remark }} {{ baseInfo.remark }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item>
<template slot="label">查验附件</template>
<div v-for="(item,index) in baseInfo.inspectAttachmentList" :key="index">
<a :href="item" download="demo">{{ item }}</a>
</div>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>

View File

@ -61,7 +61,7 @@
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="baseInfo.remark" placeholder="请输入备注" maxlength="30" clearable style="width: 240px"/> <el-input v-model="baseInfo.remark" placeholder="请输入备注" maxlength="30" clearable style="width: 240px"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="查验附件" prop="purchaseAttachmentList"> <el-form-item label="查验附件" prop="inspectAttachmentList">
<el-upload <el-upload
ref="upload" ref="upload"
:http-request="fileUpLoad" :http-request="fileUpLoad"
@ -78,7 +78,7 @@
>上传附件 >上传附件
</el-button> </el-button>
</el-upload> </el-upload>
</el-form-item> --> </el-form-item>
</el-form> </el-form>
</div> </div>
<div style="width: 100%;height: 450px;padding: 10px;border-radius: 10px;margin-bottom: 10px;background: #FFF;"> <div style="width: 100%;height: 450px;padding: 10px;border-radius: 10px;margin-bottom: 10px;background: #FFF;">
@ -554,10 +554,10 @@ export default {
param.inspectQualifiedNum = 0;// param.inspectQualifiedNum = 0;//
param.status=1 param.status=1
param.inspectGoodsDetails = [] param.inspectGoodsDetails = []
param.purchaseAttachmentList = "" param.inspectAttachmentList = ""
if(this.attachmentList.length>0){ if(this.attachmentList.length>0){
let arr = this.attachmentList.map(item=>item.url) let arr = this.attachmentList.map(item=>item.url)
param.purchaseAttachmentList = arr.join(',') param.inspectAttachmentList = arr.join(',')
console.log(param) console.log(param)
} }
this.noMaterial = false; this.noMaterial = false;
@ -620,10 +620,10 @@ export default {
param.inspectQualifiedNum = 0;// param.inspectQualifiedNum = 0;//
param.status=2 param.status=2
param.inspectGoodsDetails = [] param.inspectGoodsDetails = []
param.purchaseAttachmentList = "" param.inspectAttachmentList = ""
if(this.attachmentList.length>0){ if(this.attachmentList.length>0){
let arr = this.attachmentList.map(item=>item.url) let arr = this.attachmentList.map(item=>item.url)
param.purchaseAttachmentList = arr.join(',') param.inspectAttachmentList = arr.join(',')
console.log(param) console.log(param)
} }
this.noMaterial = false; this.noMaterial = false;
@ -748,7 +748,7 @@ export default {
imgUpLoadTwo(param).then((res) => { imgUpLoadTwo(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.attachmentList.push(res.data) this.attachmentList.push(res.data)
this.baseInfo.purchaseAttachmentList.push(res.data.url) this.baseInfo.inspectAttachmentList.push(res.data.url)
} else { } else {
this.$modal.msgError(res.msg); this.$modal.msgError(res.msg);
} }
@ -764,7 +764,7 @@ export default {
} }
}) })
this.attachmentList.splice(sum, 1) this.attachmentList.splice(sum, 1)
this.baseInfo.purchaseAttachmentList.splice(sum, 1) this.baseInfo.inspectAttachmentList.splice(sum, 1)
}, },
// //
formatDate(date) { formatDate(date) {