浏览代码

0331团组操作文件下载

liuhj 3 月之前
父节点
当前提交
a6677f800e
共有 1 个文件被更改,包括 56 次插入2 次删除
  1. 56 2
      src/components/OP/OPgroup.vue

+ 56 - 2
src/components/OP/OPgroup.vue

@@ -3,8 +3,8 @@
         <el-dialog top="35vh" width="640px" title="文件下载" :visible.sync="contractVisible">
             <el-button @click="DownGroupContractFile(hetonggroupId,1)" type="primary">预付款80%合同</el-button>
             <el-button @click="DownGroupContractFile(hetonggroupId,2)" type="primary">团组结束后付款合同</el-button>
-            <el-button type="primary">报价单(收款单)</el-button>
-            <el-button type="primary">报价细项单</el-button>
+            <el-button @click="GroupQuotationsFileDown(hetonggroupId)" type="primary">报价单(收款单)</el-button>
+            <el-button @click="GroupQuotationsDetailFileDown(hetonggroupId)" type="primary">报价细项单</el-button>
         </el-dialog>
         <el-dialog top="35vh" width="400px" title="团组清单下载" :visible.sync="groupVisible">
             <el-date-picker
@@ -351,6 +351,60 @@ export default {
 
             })
         },
+        //报价word
+        GroupQuotationsFileDown(val){
+            var url = "/api/Groups/GroupQuotationsFileDown"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data: {
+                    diid:val,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message:res.data.msg ,
+                        type: 'success',
+                    });
+                    window.open(res.data.data.url);
+                    that.contractVisible=false;
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+
+            })
+        },
+        //报价word
+        GroupQuotationsDetailFileDown(val){
+            var url = "/api/Groups/GroupQuotationsDetailFileDown"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data: {
+                    diid:val,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message:res.data.msg ,
+                        type: 'success',
+                    });
+                    window.open(res.data.data.url);
+                    that.contractVisible=false;
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+
+            })
+        },
         contracton(val){
             this.hetonggroupId=0;
             this.hetonggroupId=val.id;