|
@@ -51,7 +51,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-form-item label="采购单图片" prop="image">
|
|
|
+ <el-form-item label="采购单图片" prop="imageUrl">
|
|
|
<template v-if="inputParam.openType !== 'view'">
|
|
|
<el-upload
|
|
|
v-loading="imageLoading"
|
|
@@ -67,17 +67,17 @@
|
|
|
:before-upload="beforeUpload"
|
|
|
:on-error="uploadError"
|
|
|
>
|
|
|
- <img v-if="dataForm.image" :src="$showImgUrl(dataForm.image)" class="avatar" alt="" />
|
|
|
+ <img v-if="dataForm.imageUrl" :src="$showImgUrl(dataForm.imageUrl)" class="avatar" alt="" />
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon" />
|
|
|
<div slot="tip" class="el-upload__tip" style="margin-top: 0; line-height: 20px">只支持上传jpg/png文件</div>
|
|
|
</el-upload>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<el-image
|
|
|
- v-if="dataForm.image"
|
|
|
+ v-if="dataForm.imageUrl"
|
|
|
style="width: 100px; height: 100px"
|
|
|
- :src="$showImgUrl(dataForm.image)"
|
|
|
- :preview-src-list="[$showImgUrl(dataForm.image)]"
|
|
|
+ :src="$showImgUrl(dataForm.imageUrl)"
|
|
|
+ :preview-src-list="[$showImgUrl(dataForm.imageUrl)]"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-form-item>
|
|
@@ -270,7 +270,7 @@ export default {
|
|
|
venderId: '', // 供应商ID
|
|
|
venderName: '', // 供应商名称
|
|
|
purchaseTime: '', // 采购日期
|
|
|
- image: '',
|
|
|
+ imageUrl: '',
|
|
|
notes: '', // 备注
|
|
|
flag: '',
|
|
|
items: [] // 关系辅材列表
|
|
@@ -328,7 +328,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
this.$refs.dataForm.validate(valid => {
|
|
|
- if (!this.dataForm.image) {
|
|
|
+ if (!this.dataForm.imageUrl) {
|
|
|
this.$errorMsg('请添加附件图片')
|
|
|
return
|
|
|
}
|
|
@@ -349,7 +349,7 @@ export default {
|
|
|
venderId: data.venderId, // 供应商Id
|
|
|
purchaseTime: data.purchaseTime, // 采购日期
|
|
|
flag: data.flag,
|
|
|
- image: data.image,
|
|
|
+ imageUrl: data.imageUrl,
|
|
|
notes: data.notes, // 备注
|
|
|
items: data.items, // 关系商品列表
|
|
|
isRecheck: data.isRecheck
|
|
@@ -411,7 +411,7 @@ export default {
|
|
|
// 上传成功回调
|
|
|
uploadSuccess(res) {
|
|
|
this.imageLoading = false
|
|
|
- this.dataForm.image = res.data.url
|
|
|
+ this.dataForm.imageUrl = res.data.url
|
|
|
},
|
|
|
// 上传前检查
|
|
|
beforeUpload(file) {
|