Browse Source

报价单调整

qymljy 1 year ago
parent
commit
20b92bf329

+ 3 - 2
src/HDrpManagement/projectChange/modules/modules/quotation/modules/add.vue

@@ -185,7 +185,7 @@
             </el-col>
             <el-col  :span="24">
               <el-form-item label="附件上传:" label-width="100px" prop="remarks">
-                <upload @uploadGet="loading = true" ref="uploadRef" class="inline-16" :folderid="folderid" :bindData="{ ownertable: 'sa_quotedprice', ownerid: ownerid, usetype: 'default' }" title="上传报价清单至附件" @onSuccess="uploadSuccess"></upload>
+                <upload @uploadGet="loading = true"  ref="uploadRef" class="inline-16" :folderid="folderid" :bindData="{ ownertable: 'sa_quotedprice', ownerid: ownerid, usetype: 'default' }" :ownerid=ownerid @onSuccess="uploadSuccess"></upload>
               </el-form-item>
             </el-col>
           </el-form>
@@ -631,7 +631,8 @@ export default {
       this.$refs.uploadRef.listFile = res.data.map(item=>{
         return {
           "name":item.document,
-          "url":item.url
+          "url":item.url,
+          "linksid":item.linksid
         }
 
       })

+ 3 - 2
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -167,7 +167,7 @@
             </el-col>
             <el-col  :span="24">
               <el-form-item label="附件上传:" label-width="100px" prop="remarks">
-                <upload @uploadGet="loading = true" ref="uploadRef" class="inline-16" :folderid="folderid" :bindData="{ ownertable: 'sa_quotedprice', ownerid: ownerid, usetype: 'default' }" title="上传报价清单至附件" @onSuccess="uploadSuccess"></upload>
+                <upload @uploadGet="loading = true"  ref="uploadRef" class="inline-16" :folderid="folderid" :bindData="{ ownertable: 'sa_quotedprice', ownerid: ownerid, usetype: 'default' }" :ownerid=ownerid @onSuccess="uploadSuccess"></upload>
               </el-form-item>
             </el-col>
           </el-form>
@@ -617,7 +617,8 @@ export default {
       this.$refs.uploadRef.listFile = res.data.map(item=>{
         return {
           "name":item.document,
-          "url":item.url
+          "url":item.url,
+          "linksid":item.linksid
         }
 
       })

+ 10 - 8
src/template/upload/index.vue

@@ -11,7 +11,6 @@
       :auto-upload="false"
       :file-list="listFile">
     <el-button icon="el-icon-upload2" type="primary" size="mini"  class="inline-16">上传文件</el-button>
-    <span>{{title}}</span>
   </el-upload>
 </template>
 
@@ -37,7 +36,16 @@ export default {
     };
   },
   methods: {
-    handleRemove(file, fileList) {
+    async handleRemove(file, fileList) {
+      this.$emit('uploadGet')
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "deleteFileLink",
+        "content": {
+          "linksids":[file.linksid]
+        }
+      })
+      this.$emit('onSuccess',res)
     },
     handleProgress(file,fileList){
 
@@ -122,12 +130,6 @@ export default {
           "usetype":""
         }
       })
-      this.$refs.uploadRef.listFile = res.data.map(item=>{
-        return {
-          "name":item.document,
-          "url":item.url
-        }
-      })
     }
   }
 }