maxianghua 4 лет назад
Родитель
Сommit
5b1532937d
2 измененных файлов с 30 добавлено и 2 удалено
  1. 8 0
      src/api/finance/contrast.js
  2. 22 2
      src/views/finance/contrast/index.vue

+ 8 - 0
src/api/finance/contrast.js

@@ -99,3 +99,11 @@ export function RevocationApproval(data){
     data:data
   })
 }
+
+// 导出计算明细从表
+export function exportWarehousebillsitems(fId) {
+  return request({
+    url: '/finance/contrast/exportItems/'+fId,
+    method: 'get'
+  })
+}

+ 22 - 2
src/views/finance/contrast/index.vue

@@ -297,7 +297,7 @@
           <el-button type="warning" size="small" @click="reconciliation" :disabled="notChange" v-if="queryParams.fBillstatus < '4'"
             >对账</el-button>
           <el-button type="primary" size="small" @click="confirmReconciliation" :disabled="notChange" v-if="queryParams.fBillstatus < '4'">确认对账</el-button>
-          <el-button type="warning" size="small" @click="">导出</el-button>
+          <el-button type="warning" size="small" @click="handleExportItems">导出</el-button>
           <el-button type="success" size="small" @click="backrRconciliation" v-if="queryParams.fBillstatus === '6'">撤销对账</el-button>
 <!--          <el-button type="info" size="small" @click="exportData">导出</el-button>-->
           <el-button type="danger" size="small" :disabled="disappear" v-if="queryParams.fBillstatus === '4'" @click="backApproval">撤销审批</el-button>
@@ -652,7 +652,7 @@
 </template>
 
 <script>
-import { RevocationApproval, backFee, detailFee, Cfee, listFee, getFee, delFee, addFee, updateFee, exportFee, importFee} from "@/api/finance/contrast";
+import { RevocationApproval, backFee, detailFee, Cfee, listFee, getFee, delFee, addFee, updateFee, exportFee, importFee,exportWarehousebillsitems} from "@/api/finance/contrast";
 import { listCorps } from '@/api/basicdata/corps'
 import { listFees } from '@/api/basicdata/fees'
 import AddOrUpdate from '@/views/viewApproval'
@@ -1001,6 +1001,26 @@ export default {
         }
       })
     },
+    //导出
+    handleExportItems() {
+      const fIds = this.queryParams.fId
+      if(fIds !== null){
+        this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(function () {
+            return exportWarehousebillsitems(fIds);
+          })
+          .then((response) => {
+            this.download(response.msg);
+          });
+      }else{
+        this.$message("请先保存")
+      }
+
+    },
     // 对账按钮功能
     reconciliation(){
       this.queryParameter = {