Bladeren bron

面损表-附件上传

jbb 2 jaren geleden
bovenliggende
commit
9fab3a5ccf
2 gewijzigde bestanden met toevoegingen van 24 en 1 verwijderingen
  1. 1 1
      src/api/reportForms/fabric-loss-table.js
  2. 23 0
      src/views/reportForms/fabric-loss-table.vue

+ 1 - 1
src/api/reportForms/fabric-loss-table.js

@@ -1,5 +1,5 @@
 /** 报表 -- 面料损耗表 **/
-import { getAction, postAction } from '@/api/manage'
+import { getAction, postAction,deleteAction } from '@/api/manage'
 
 // 分页查询 染损列表
 const getFabricLossDatas = params => getAction('report/FabricLoss/getFabricLossDatas', params)

+ 23 - 0
src/views/reportForms/fabric-loss-table.vue

@@ -809,10 +809,33 @@ export default {
   methods: {
     uploadFlie(file) {
       this.fileName = file.name
+      },
+      handleImportExcel(data){
+        if(data.fileList.length>this.fileList.length){
+          this.fileList=[]
+          data.fileList.map(item=>{
+          this.fileList.push({
+            uid: '-1',
+            name: item.name,
+            status: 'done',
+            url:'http://www.myfitt.cn:18001/jeecg-boot/sys/common/static' +'/'+item.name
+          })
+        })
+        }
+        
+        
       },
       removeFile(data){
         deleteFileDetail({code:this.planNO,name:data.name}).then(res => {
             if (res.success) {
+              var cc=[]
+              this.fileList.map(item=>{
+                if(item.name !== data.name){
+                  cc.push(item)
+                }
+              })
+              this.fileList = cc
+              this.loading =false
               this.$message.success('删除成功');
             }else{
               this.$message.error(res.message);