Bläddra i källkod

编辑改为上传及bug 修改

Signed-off-by: lijunqing <lijunqing@dashoo.cn>
lijunqing 6 år sedan
förälder
incheckning
9e7f3093e1

+ 7 - 4
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -28,7 +28,7 @@
       <el-table :data="subfileList" border>
         <el-table-column label="操作" width="150" align="center" fixed>
           <template slot-scope="scope">
-            <el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)" :disabled="!canadd">编辑
+            <el-button type="primary" plain size="mini" title="上传" @click="openDialog(scope.row)" :disabled="!canadd">上传
             </el-button>
             <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px"
               :disabled="scope.row.FileType == '1' || !canadd" @click="deletedata(scope.row)">删除</el-button>
@@ -297,7 +297,7 @@
               message: '请上传文件!'
             })
           }
-        } else if (this.Title == '编辑文件') {
+        } else if (this.Title == '上传文件') {
           if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
             // 上传附件是否完成判断
             if (!this.attachissuccess()) {
@@ -307,7 +307,10 @@
             this.getattachissuccess()
             this.editSubfile()
           } else {
-            this.editSubfile()
+            this.$message({
+              type: 'warning',
+              message: '请上传文件!'
+            })
           }
         }
       },
@@ -441,7 +444,7 @@
         this.visible = true
       },
       openDialog(val) {
-        this.Title = '编辑文件'
+        this.Title = '上传文件'
         this.SubfileForm.Id = val.Id
         this.SubfileForm.SupplierId = val.SupplierId
         this.SubfileForm.SupplierTypeCode = val.SupplierTypeCode