|
@@ -43,11 +43,13 @@
|
|
|
<el-col :span="24" class="item file" style="width: 100%; height: auto">
|
|
|
<div class="label">附件</div>
|
|
|
<div class="value">
|
|
|
+
|
|
|
<div class="file-list">
|
|
|
<div class="file-item" v-for="item in detailData.salesOrderPictures">
|
|
|
<el-image
|
|
|
v-if="checkFileType(item.fileUrl) == 'image'"
|
|
|
class="img"
|
|
|
+ :fit="fill"
|
|
|
:src="$imageUrl + item.fileUrl"
|
|
|
:preview-src-list="[$imageUrl + item.fileUrl]"
|
|
|
></el-image>
|
|
@@ -60,11 +62,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
-
|
|
|
+ <div class="fileUpload" v-if="edit">
|
|
|
+ <div class="main-title">
|
|
|
+ <div class="title">上传附件</div>
|
|
|
+ </div>
|
|
|
+ <fileUpload :fileList="fileList" multiple />
|
|
|
+ </div>
|
|
|
<div class="main-title">
|
|
|
<div class="title">货品信息</div>
|
|
|
</div>
|
|
@@ -264,11 +272,16 @@
|
|
|
import print from 'vue-print-nb'
|
|
|
import { getDetail, updateNum } from '@/api/supply/sales'
|
|
|
import { getFileUrl } from '@/api/common'
|
|
|
+import fileUpload from '@/components/Common/file-upload.vue'
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
name: 'SalesDetail',
|
|
|
componentName: 'SalesDetail',
|
|
|
props: ['listItem', 'edit'],
|
|
|
+ components: {
|
|
|
+ fileUpload
|
|
|
+ },
|
|
|
directives: {
|
|
|
print
|
|
|
},
|
|
@@ -290,7 +303,8 @@ export default {
|
|
|
id: 'printMe'
|
|
|
},
|
|
|
detailData: {},
|
|
|
- srcList: []
|
|
|
+ srcList: [],
|
|
|
+ fileList: [],
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -309,8 +323,19 @@ export default {
|
|
|
item.remark = item.invoiceRemark
|
|
|
item.invoiceNum = +item.refundableQty
|
|
|
})
|
|
|
+ const salesOrderPictures = []
|
|
|
+ if (this.fileList.length) {
|
|
|
+ this.fileList.forEach(k => {
|
|
|
+ salesOrderPictures.push({
|
|
|
+ fileName: k.name,
|
|
|
+ fileUrl: k.url,
|
|
|
+ salesId: this.detailData.id
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
updateNum({
|
|
|
- ...this.detailData
|
|
|
+ ...this.detailData,
|
|
|
+ salesOrderPictures:[...this.detailData.salesOrderPictures,...salesOrderPictures]
|
|
|
}).then(res => {
|
|
|
this.$successMsg('修改成功')
|
|
|
this.$parent.edit = false
|
|
@@ -382,4 +407,7 @@ export default {
|
|
|
width: 64px;
|
|
|
height: 64px;
|
|
|
}
|
|
|
+.fileUpload{
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
</style>
|