浏览代码

发货单修改成多张图片上传

zhouhao 2 年之前
父节点
当前提交
38e3b0748f
共有 2 个文件被更改,包括 26 次插入4 次删除
  1. 13 2
      src/views/supply/apply/components/apply_form.vue
  2. 13 2
      src/views/supply/apply/components/engin_form.vue

+ 13 - 2
src/views/supply/apply/components/apply_form.vue

@@ -59,7 +59,7 @@
         </el-col>
         <el-col :xs="24" :sm="8" :lg="8">
           <el-form-item label="附件" prop="fileUrl">
-            <fileUpload :fileList="fileList" />
+            <fileUpload :fileList="fileList" multiple/>
           </el-form-item>
         </el-col>
       </el-row>
@@ -678,6 +678,16 @@ export default {
           if (!this.screenForm.warehouse) {
             return this.$errorMsg('请选择仓库')
           }
+          const salesOrderPictures = []
+          if (this.fileList.length) {
+            this.fileList.forEach(k => {
+              salesOrderPictures.push({
+                fileName: k.name,
+                fileUrl: k.url,
+                salesId: this.goodsList[0].id
+              })
+            })
+          }
 
           let correspondName = this.warehouseList[findElem(this.warehouseList, 'id', this.screenForm.warehouse)].name
           let params = {
@@ -690,7 +700,8 @@ export default {
             correspondId: this.screenForm.warehouse,
             correspondName,
             orders: this.goodsList,
-            examineStatus: status
+            examineStatus: status,
+            salesOrderPictures
           }
           if (this.listItem) {
             editApply(params).then(res => {

+ 13 - 2
src/views/supply/apply/components/engin_form.vue

@@ -134,7 +134,7 @@
       <el-row :gutter="20">
         <el-col :xs="24" :sm="8" :lg="8">
           <el-form-item label="附件" prop="fileUrl">
-            <fileUpload :fileList="fileList" />
+            <fileUpload :fileList="fileList" multiple/>
           </el-form-item>
         </el-col>
       </el-row>
@@ -922,6 +922,16 @@ export default {
           if (!this.screenForm.warehouse) {
             return this.$errorMsg('请选择仓库')
           }
+          const salesOrderPictures = []
+          if (this.fileList.length) {
+            this.fileList.forEach(k => {
+              salesOrderPictures.push({
+                fileName: k.name,
+                fileUrl: k.url,
+                salesId: this.goodsList[0].id
+              })
+            })
+          }
 
           let correspondName = this.warehouseList[findElem(this.warehouseList, 'id', this.screenForm.warehouse)].name
           let params = {
@@ -944,7 +954,8 @@ export default {
             correspondId: this.screenForm.warehouse,
             correspondName,
             orders: this.goodsList,
-            examineStatus: status
+            examineStatus: status,
+            salesOrderPictures
           }
           if (this.listItem) {
             params.id = this.listItem.id