瀏覽代碼

财务模块新增明细导出

wengyuwen 4 年之前
父節點
當前提交
f4747f5db3

+ 7 - 0
src/api/finance/charge.js

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

+ 7 - 0
src/api/finance/payment.js

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

+ 4 - 0
src/views/agreement/agreementTask/index.vue

@@ -854,6 +854,8 @@ export default {
         this.$set(this.form, 'fBegindate', Date.parse(this.form.fBegindate))
         this.operator = this.form.createBy
         this.agreementitemsList = response.data.tWarehouseAgreementitems
+        this.form.fBilltype = response.data.tWarehouseAgreement.fBilltype.replace(/\[|]/g, '').replace(/\"/g, "").split(",")
+
         for (let item in this.agreementitemsList) {
           this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
         }
@@ -1062,6 +1064,7 @@ export default {
       let fDc = this.form.fDc
       let queryParams = { pageNum: 1, pageSize: 10, fName: name, fDc:fDc};
       listFees(queryParams).then((response) => {
+        console.log(response)
         this.fWbuOptions = response.rows
       });
     },
@@ -1107,6 +1110,7 @@ export default {
       if(num === 2){
         console.log("111")
         getAgreement(this.idCopy).then(response => {
+          console.log(response)
           this.register()
           this.deptName = response.data.dept.deptName
           this.form = response.data.tWarehouseAgreement

+ 79 - 50
src/views/finance/charge/index.vue

@@ -580,6 +580,9 @@
           v-if="queryParams.fBillstatus < '4'"
           >确认收费</el-button
         >
+        <el-button type="warning" size="small" @click="handleExportItems"
+        >导出</el-button
+        >
         <el-button
           type="success"
           size="small"
@@ -1045,6 +1048,7 @@ import {
   delCharge_ss,
   backCharge,
   revocation,
+  exportWarehousebillsitems
 } from "@/api/finance/charge";
 import { listFees } from "@/api/basicdata/fees";
 import print from "print-js";
@@ -1472,6 +1476,25 @@ export default {
     this.adoPt();
   },
   methods: {
+    //导出明细
+    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("请先保存");
+      }
+    },
     full() {
       this.dialogFull = !this.dialogFull;
     },
@@ -2032,18 +2055,20 @@ export default {
       this.getDicts("approval_process").then((response) => {
         this.options = response.data;
       });
-      // listCharge(this.tableFilter).then(response => {
-      //   console.log(response)
-      //   this.chargeList = response.rows
-      //   this.total = response.total
-      //   this.loading = false
-      // })
-      listCharges(this.tableFilter).then((response) => {
-        console.log(response);
-        this.chargeList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
+      //大木
+      listCharge(this.tableFilter).then(response => {
+        console.log(response)
+        this.chargeList = response.rows
+        this.total = response.total
+        this.loading = false
+      })
+      //车队
+      // listCharges(this.tableFilter).then((response) => {
+      //   console.log(response);
+      //   this.chargeList = response.rows;
+      //   this.total = response.total;
+      //   this.loading = false;
+      // });
     },
     // 取消按钮
     cancel() {
@@ -2250,22 +2275,8 @@ export default {
         fCorpid: "", //结算单位ID
       };
       const fId = row.fId || this.ids;
-      // getCharge(fId).then((response) => {
-      //   this.Operator = response.data.tFee.createBy;
-      //   this.increase_s = response.data.feeDoList;
-      //   this.fWbuOptions = response.data.feesList;
-      //   this.queryParams = response.data.tFee;
-      //   this.fWbuOptions = response.data.feesList;
-      //   this.fMblnoOptions = response.data.corps;
-      //   this.open = true;
-      //   this.title = "修改收费列表";
-      //   if (this.DzfeeList) {
-      //     this.doNot = true;
-      //   } else {
-      //     this.doNot = false;
-      //   }
-      // });
-      getCharges(fId).then((response) => {
+      //大木
+      getCharge(fId).then((response) => {
         this.Operator = response.data.tFee.createBy;
         this.increase_s = response.data.feeDoList;
         this.fWbuOptions = response.data.feesList;
@@ -2280,6 +2291,22 @@ export default {
           this.doNot = false;
         }
       });
+      //车队
+    //   getCharges(fId).then((response) => {
+    //     this.Operator = response.data.tFee.createBy;
+    //     this.increase_s = response.data.feeDoList;
+    //     this.fWbuOptions = response.data.feesList;
+    //     this.queryParams = response.data.tFee;
+    //     this.fWbuOptions = response.data.feesList;
+    //     this.fMblnoOptions = response.data.corps;
+    //     this.open = true;
+    //     this.title = "修改收费列表";
+    //     if (this.DzfeeList) {
+    //       this.doNot = true;
+    //     } else {
+    //       this.doNot = false;
+    //     }
+    //   });
     },
     /** 提交按钮 */
     submitForm() {
@@ -2331,28 +2358,8 @@ export default {
     handleDelete(row) {
       const fIds = row.fId || this.ids;
       let tips = "";
-      // delCharge_s(fIds).then((data) => {
-      //   switch (data.msg) {
-      //     case "0": {
-      //       this.$message.error("当前数据已被其他操作员操作请刷新页面");
-      //       break;
-      //     }
-      //     case "1": {
-      //       tips = "当前主表有数据从表无数据是否删除";
-      //       this.delete_S(fIds, tips);
-      //       break;
-      //     }
-      //     case "2": {
-      //       tips = "当前主表有数据从表有数据是否删除";
-      //       this.delete_S(fIds, tips);
-      //       break;
-      //     }
-      //     default: {
-      //       return this.$message.error("未知错误,无状态");
-      //     }
-      //   }
-      // });
-      delCharge_ss(fIds).then((data) => {
+      //大木
+      delCharge_s(fIds).then((data) => {
         switch (data.msg) {
           case "0": {
             this.$message.error("当前数据已被其他操作员操作请刷新页面");
@@ -2373,6 +2380,28 @@ export default {
           }
         }
       });
+      //车队
+      // delCharge_ss(fIds).then((data) => {
+      //   switch (data.msg) {
+      //     case "0": {
+      //       this.$message.error("当前数据已被其他操作员操作请刷新页面");
+      //       break;
+      //     }
+      //     case "1": {
+      //       tips = "当前主表有数据从表无数据是否删除";
+      //       this.delete_S(fIds, tips);
+      //       break;
+      //     }
+      //     case "2": {
+      //       tips = "当前主表有数据从表有数据是否删除";
+      //       this.delete_S(fIds, tips);
+      //       break;
+      //     }
+      //     default: {
+      //       return this.$message.error("未知错误,无状态");
+      //     }
+      //   }
+      // });
     },
     delete_S(fIds, tips) {
       this.$confirm(tips, "警告", {

+ 3 - 7
src/views/finance/contrast/index.vue

@@ -867,12 +867,8 @@
                 <span v-else-if="scope.row.fBilltype == '1030'">司机接单</span>
                 <span v-else-if="scope.row.fBilltype == '1080'">司机出车</span>
                 <span v-else-if="scope.row.fBilltype == '1040'">司机提箱</span>
-                <span v-else-if="scope.row.fBilltype == '1050'"
-                  >司机装卸柜</span
-                >
-                <span v-else-if="scope.row.fBilltype == '1060'"
-                  >司机还卸柜</span
-                >
+                <span v-else-if="scope.row.fBilltype == '1050'">司机装卸柜</span>
+                <span v-else-if="scope.row.fBilltype == '1060'">司机还卸柜</span>
                 <span v-else-if="scope.row.fBilltype == '1070'">司机回单</span>
                 <span v-else-if="scope.row.fBilltype == '1090'">费用补充</span>
               </template>
@@ -995,7 +991,7 @@ import {
   listFleet,
   getFleet,
   delFleet,
-  detailFleet,
+  detailFleet
 } from "@/api/finance/contrast";
 import { listCorps } from "@/api/basicdata/corps";
 import { listFees } from "@/api/basicdata/fees";

+ 148 - 115
src/views/finance/payment/index.vue

@@ -494,6 +494,9 @@
           v-if="queryParams.fBillstatus < '4'"
           >确认付费</el-button
         >
+        <el-button type="warning" size="small" @click="handleExportItems"
+        >导出</el-button
+        >
         <el-button
           type="success"
           size="small"
@@ -984,6 +987,7 @@ import {
   delCharge_ss,
   backCharge,
   revocation,
+  exportWarehousebillsitems
 } from "@/api/finance/payment";
 import { listFees } from "@/api/basicdata/fees";
 import print from "print-js";
@@ -1212,6 +1216,25 @@ export default {
     this.adoPt();
   },
   methods: {
+    //导出明细
+    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("请先保存");
+      }
+    },
     full() {
       this.dialogFull = !this.dialogFull;
     },
@@ -1327,17 +1350,8 @@ export default {
           fFeesName: "", //结算单位
           fCorpid: "", //结算单位ID
         };
-        // getCharge(this.approval.billId).then((response) => {
-        //   this.Operator = response.data.tFee.createBy;
-        //   this.increase_s = response.data.feeDoList;
-        //   this.fWbuOptions = response.data.feesList;
-        //   this.queryParams = response.data.tFee;
-        //   this.fWbuOptions = response.data.feesList;
-        //   this.fMblnoOptions = response.data.corps;
-        //   this.open = true;
-        //   this.title = "修改付费列表";
-        // });
-        getCharges(this.approval.billId).then((response) => {
+        //大木
+        getCharge(this.approval.billId).then((response) => {
           this.Operator = response.data.tFee.createBy;
           this.increase_s = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
@@ -1347,6 +1361,17 @@ export default {
           this.open = true;
           this.title = "修改付费列表";
         });
+        //车队
+        // getCharges(this.approval.billId).then((response) => {
+        //   this.Operator = response.data.tFee.createBy;
+        //   this.increase_s = response.data.feeDoList;
+        //   this.fWbuOptions = response.data.feesList;
+        //   this.queryParams = response.data.tFee;
+        //   this.fWbuOptions = response.data.feesList;
+        //   this.fMblnoOptions = response.data.corps;
+        //   this.open = true;
+        //   this.title = "修改付费列表";
+        // });
       }
     },
     homePage() {
@@ -1413,65 +1438,8 @@ export default {
     // 查看按钮
     check(row, res) {
       this.notChange = true;
-      // getCharge(row.fId).then((response) => {
-      //   this.Operator = response.data.tFee.createBy;
-      //   this.increase_s = response.data.feeDoList;
-      //   this.fWbuOptions = response.data.feesList;
-      //   this.queryParams = response.data.tFee;
-      //   this.fWbuOptions = response.data.feesList;
-      //   this.fMblnoOptions = response.data.corps;
-      //   this.open = true;
-      //   this.title = "付费列表";
-      //   this.tablefilter = true;
-      //   if (res == 1) {
-      //     this.notChange = true;
-      //     if (this.Operator == this.Lander) {
-      //       this.tablefilter = false;
-      //       this.reset();
-      //       this.pass = {
-      //         fAmtdr: 0, //应收合计
-      //         fAmtcr: 0, //应付合计
-      //         fMblno: "", //提单号
-      //         fName: "", //货权方
-      //         fFeesName: "", //结算单位
-      //         fCorpid: "", //结算单位ID
-      //       };
-      //       const fId = row.fId || this.ids;
-      //       getCharge(fId).then((response) => {
-      //         this.increase_s = response.data.feeDoList;
-      //         this.fWbuOptions = response.data.feesList;
-      //         this.queryParams = response.data.tFee;
-      //         this.fWbuOptions = response.data.feesList;
-      //         this.fMblnoOptions = response.data.corps;
-      //         this.open = true;
-      //       });
-      //     } else {
-      //       this.notChange = true;
-      //       // this.$message.error('未知异常,请联系管理员')
-      //     }
-      //   } else {
-      //     this.notChange = true;
-      //     this.reset();
-      //     this.pass = {
-      //       fAmtdr: 0, //应收合计
-      //       fAmtcr: 0, //应付合计
-      //       fMblno: "", //提单号
-      //       fName: "", //货权方
-      //       fFeesName: "", //结算单位
-      //       fCorpid: "", //结算单位ID
-      //     };
-      //     const fId = row.fId || this.ids;
-      //     getCharge(fId).then((response) => {
-      //       this.increase_s = response.data.feeDoList;
-      //       this.fWbuOptions = response.data.feesList;
-      //       this.queryParams = response.data.tFee;
-      //       this.fWbuOptions = response.data.feesList;
-      //       this.fMblnoOptions = response.data.corps;
-      //       this.open = true;
-      //     });
-      //   }
-      // });
-      getCharges(row.fId).then((response) => {
+      //大木
+      getCharge(row.fId).then((response) => {
         this.Operator = response.data.tFee.createBy;
         this.increase_s = response.data.feeDoList;
         this.fWbuOptions = response.data.feesList;
@@ -1495,7 +1463,7 @@ export default {
               fCorpid: "", //结算单位ID
             };
             const fId = row.fId || this.ids;
-            getCharges(fId).then((response) => {
+            getCharge(fId).then((response) => {
               this.increase_s = response.data.feeDoList;
               this.fWbuOptions = response.data.feesList;
               this.queryParams = response.data.tFee;
@@ -1519,7 +1487,7 @@ export default {
             fCorpid: "", //结算单位ID
           };
           const fId = row.fId || this.ids;
-          getCharges(fId).then((response) => {
+          getCharge(fId).then((response) => {
             this.increase_s = response.data.feeDoList;
             this.fWbuOptions = response.data.feesList;
             this.queryParams = response.data.tFee;
@@ -1529,6 +1497,65 @@ export default {
           });
         }
       });
+      //车队
+      // getCharges(row.fId).then((response) => {
+      //   this.Operator = response.data.tFee.createBy;
+      //   this.increase_s = response.data.feeDoList;
+      //   this.fWbuOptions = response.data.feesList;
+      //   this.queryParams = response.data.tFee;
+      //   this.fWbuOptions = response.data.feesList;
+      //   this.fMblnoOptions = response.data.corps;
+      //   this.open = true;
+      //   this.title = "付费列表";
+      //   this.tablefilter = true;
+      //   if (res == 1) {
+      //     this.notChange = true;
+      //     if (this.Operator == this.Lander) {
+      //       this.tablefilter = false;
+      //       this.reset();
+      //       this.pass = {
+      //         fAmtdr: 0, //应收合计
+      //         fAmtcr: 0, //应付合计
+      //         fMblno: "", //提单号
+      //         fName: "", //货权方
+      //         fFeesName: "", //结算单位
+      //         fCorpid: "", //结算单位ID
+      //       };
+      //       const fId = row.fId || this.ids;
+      //       getCharges(fId).then((response) => {
+      //         this.increase_s = response.data.feeDoList;
+      //         this.fWbuOptions = response.data.feesList;
+      //         this.queryParams = response.data.tFee;
+      //         this.fWbuOptions = response.data.feesList;
+      //         this.fMblnoOptions = response.data.corps;
+      //         this.open = true;
+      //       });
+      //     } else {
+      //       this.notChange = true;
+      //       // this.$message.error('未知异常,请联系管理员')
+      //     }
+      //   } else {
+      //     this.notChange = true;
+      //     this.reset();
+      //     this.pass = {
+      //       fAmtdr: 0, //应收合计
+      //       fAmtcr: 0, //应付合计
+      //       fMblno: "", //提单号
+      //       fName: "", //货权方
+      //       fFeesName: "", //结算单位
+      //       fCorpid: "", //结算单位ID
+      //     };
+      //     const fId = row.fId || this.ids;
+      //     getCharges(fId).then((response) => {
+      //       this.increase_s = response.data.feeDoList;
+      //       this.fWbuOptions = response.data.feesList;
+      //       this.queryParams = response.data.tFee;
+      //       this.fWbuOptions = response.data.feesList;
+      //       this.fMblnoOptions = response.data.corps;
+      //       this.open = true;
+      //     });
+      //   }
+      // });
     },
     //打印功能
     printing() {
@@ -1722,16 +1749,18 @@ export default {
       this.getDicts("approval_process").then((response) => {
         this.options = response.data;
       });
-      // listCharge(this.tableFilter).then(response => {
-      //   this.chargeList = response.rows
-      //   this.total = response.total
-      //   this.loading = false
-      // })
-      listCharges(this.tableFilter).then((response) => {
-        this.chargeList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
+      //大木
+      listCharge(this.tableFilter).then(response => {
+        this.chargeList = response.rows
+        this.total = response.total
+        this.loading = false
+      })
+      //车队
+      // listCharges(this.tableFilter).then((response) => {
+      //   this.chargeList = response.rows;
+      //   this.total = response.total;
+      //   this.loading = false;
+      // });
     },
     // 取消按钮
     cancel() {
@@ -1937,17 +1966,8 @@ export default {
         fCorpid: "", //结算单位ID
       };
       const fId = row.fId || this.ids;
-      getCharges(fId).then((response) => {
-        this.Operator = response.data.tFee.createBy;
-        this.increase_s = response.data.feeDoList;
-        this.fWbuOptions = response.data.feesList;
-        this.queryParams = response.data.tFee;
-        this.fWbuOptions = response.data.feesList;
-        this.fMblnoOptions = response.data.corps;
-        this.open = true;
-        this.title = "修改付费列表";
-      });
-      //   getCharge(fId).then((response) => {
+      //车队
+      // getCharges(fId).then((response) => {
       //   this.Operator = response.data.tFee.createBy;
       //   this.increase_s = response.data.feeDoList;
       //   this.fWbuOptions = response.data.feesList;
@@ -1957,6 +1977,17 @@ export default {
       //   this.open = true;
       //   this.title = "修改付费列表";
       // });
+      //大木
+        getCharge(fId).then((response) => {
+        this.Operator = response.data.tFee.createBy;
+        this.increase_s = response.data.feeDoList;
+        this.fWbuOptions = response.data.feesList;
+        this.queryParams = response.data.tFee;
+        this.fWbuOptions = response.data.feesList;
+        this.fMblnoOptions = response.data.corps;
+        this.open = true;
+        this.title = "修改付费列表";
+      });
     },
     /** 提交按钮 */
     submitForm() {
@@ -2021,28 +2052,8 @@ export default {
     handleDelete(row) {
       const fIds = row.fId || this.ids;
       let tips = "";
-      // delCharge_s(fIds).then((data) => {
-      //   switch (data.msg) {
-      //     case "0": {
-      //       this.$message.error("当前数据已被其他操作员操作请刷新页面");
-      //       break;
-      //     }
-      //     case "1": {
-      //       tips = "当前主表有数据从表无数据是否删除";
-      //       this.delete_S(fIds, tips);
-      //       break;
-      //     }
-      //     case "2": {
-      //       tips = "当前主表有数据从表有数据是否删除";
-      //       this.delete_S(fIds, tips);
-      //       break;
-      //     }
-      //     default: {
-      //       return this.$message.error("未知错误,无状态");
-      //     }
-      //   }
-      // });
-      delCharge_ss(fIds).then((data) => {
+      //大木
+      delCharge_s(fIds).then((data) => {
         switch (data.msg) {
           case "0": {
             this.$message.error("当前数据已被其他操作员操作请刷新页面");
@@ -2063,6 +2074,28 @@ export default {
           }
         }
       });
+      //车队
+      // delCharge_ss(fIds).then((data) => {
+      //   switch (data.msg) {
+      //     case "0": {
+      //       this.$message.error("当前数据已被其他操作员操作请刷新页面");
+      //       break;
+      //     }
+      //     case "1": {
+      //       tips = "当前主表有数据从表无数据是否删除";
+      //       this.delete_S(fIds, tips);
+      //       break;
+      //     }
+      //     case "2": {
+      //       tips = "当前主表有数据从表有数据是否删除";
+      //       this.delete_S(fIds, tips);
+      //       break;
+      //     }
+      //     default: {
+      //       return this.$message.error("未知错误,无状态");
+      //     }
+      //   }
+      // });
     },
     delete_S(fIds, tips) {
       this.$confirm(tips, "警告", {