فهرست منبع

上湾瓦斯巡检-导出瓦斯小票对接提交

lxh 3 هفته پیش
والد
کامیت
2571450cf3
1فایلهای تغییر یافته به همراه14 افزوده شده و 0 حذف شده
  1. 14 0
      src/views/vent/gas/gasReport/index.vue

+ 14 - 0
src/views/vent/gas/gasReport/index.vue

@@ -45,6 +45,7 @@
           <a-button preIcon="ant-design:sync-outlined" style="margin: 0px 15px" @click="onReset">重置</a-button>
           <a-button type="primary" preIcon="ant-design:download-outlined" @click="getExport">导出日报表</a-button>
           <a-button type="primary" preIcon="ant-design:download-outlined" @click="getExport1" style="margin: 0px 15px">导出瓦斯三对照报表</a-button>
+          <a-button type="primary" preIcon="ant-design:download-outlined" @click="getExport2" style="margin-right:15px">导出瓦斯检查小票</a-button>
           <a-dropdown>
             <template #overlay>
               <a-menu @click="handleMenuClick">
@@ -180,6 +181,19 @@
       message.warning('请选择需要导出数据的填报日期!');
     }
   }
+  //导出瓦斯检查小票
+  async function getExport2() {
+    if (searchData.reportTime && searchData.sbr) {
+      let res = await expComReportByParam({ tempName: 'wsjcxp', reportTime: searchData.reportTime,checkName:searchData.sbr });
+      console.log(res, '导出------------');
+      let filename = searchData.reportTime + '.xlsx';
+      downFilePublic(res, filename);
+    } else if(!searchData.reportTime) {
+      message.warning('请选择需要导出数据的填报日期!');
+    }else if(!searchData.sbr){
+      message.warning('请输入上报人名称!');
+    }
+  }
 
   // 下载公用方法
   function downFilePublic(content, fileName) {