maxianghua 4 лет назад
Родитель
Сommit
ce68cc7421

+ 8 - 0
src/api/warehouseBusiness/storageFeeCalculation.js

@@ -78,6 +78,14 @@ export function exportStorageFeeCalculation(query) {
     params: query
   })
 }
+
+// 导出计算明细从表
+export function exportWarehousebillsitems(fId) {
+  return request({
+    url: '/warehouseBusiness/storageFeeCalculation/exportItems/'+fId,
+    method: 'get'
+  })
+}
  // 撤销请核
 export function backFee(fId) {
   return request({

+ 22 - 1
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -391,6 +391,12 @@
         计费物资明细
         <el-button :disabled="browseStatus" @click="calculateCost">计算仓储费</el-button>
         <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          @click="handleExportItems"
+        >导出
+        </el-button>
       </div>
       <div class="dialogTableTitle flex a-center jlr"
            style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">
@@ -415,7 +421,7 @@
             <template slot-scope="scope">
               <span v-if="scope.row.fBilltype === 'SJRK'">入库</span>
               <span v-if="scope.row.fBilltype === 'SJCK'">出库</span>
-              <span v-if="scope.row.fBilltype === 'KCZZ'">库存总账</span>
+                <span v-if="scope.row.fBilltype === 'KCZZ'">库存总账</span>
             </template>
           </el-table-column>
           <el-table-column
@@ -844,6 +850,7 @@
     listStorageFeeCalculation,
     updateStorageFeeCalculation,
     exportStorageFeeCalculation,
+    exportWarehousebillsitems,
   } from "@/api/warehouseBusiness/storageFeeCalculation";
   import { listUser, queryUserVal } from "@/api/system/user";
   import { listGoods } from "@/api/basicdata/goods";
@@ -1490,6 +1497,20 @@
             this.download(response.msg);
           });
       },
+      handleExportItems() {
+        const fIds = this.form.fId
+        this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(function () {
+            return exportWarehousebillsitems(fIds);
+          })
+          .then((response) => {
+            this.download(response.msg);
+          });
+      },
       deleteRow(index, rows) {
         rows.splice(index, 1);
       },