Browse Source

按钮暂时注释,下版解放

lucky-lzx 2 years ago
parent
commit
a7b2cb7811
1 changed files with 6 additions and 5 deletions
  1. 6 5
      src/views/purchaseIn/purchaseOrder/detail.vue

+ 6 - 5
src/views/purchaseIn/purchaseOrder/detail.vue

@@ -11,9 +11,10 @@
         <span>采购单编号:</span><span>{{ queryId }} </span>
         <tolerance :newTime="newTime" v-if="newTime !== ''" :sitem="sitem" />
 
-        <el-button type="primary" style="margin-left:30px;" @click="download">
+        <!-- 暂时注释,下版需要导出 -->
+        <!-- <el-button type="primary" style="margin-left:30px;" @click="download">
           下载<i class="el-icon-download el-icon--right"></i>
-        </el-button>
+        </el-button> -->
       </div>
       <el-tabs v-model="activeTabs">
         <el-tab-pane label="业务详情" name="1">
@@ -235,7 +236,7 @@ export default {
     this.initData();
   },
   methods: {
-    //导出文件
+    //导出文件 (需要修改)
     download(){
       if (!this.loading) {
         this.loading = true;
@@ -253,8 +254,7 @@ export default {
           // },
         })
           .then((res) => {
-            if (res && res.status == 200 && res.data) {
-              this.$message.success(`${message}导出成功!`);
+            if (res && res.status == 200 && res.data) {   
               let url = window.URL.createObjectURL(new Blob([res.data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}))
               let link = document.createElement('a')
               link.style.display = 'none'
@@ -265,6 +265,7 @@ export default {
               link.click()
               link.remove()
               window.URL.revokeObjectURL(url); //释放掉blob对象
+              this.$message.success(`${message}导出成功!`);
               setTimeout(() => {
                 this.loading = false;
               }, 500);