Переглянути джерело

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

Your Name 3 роки тому
батько
коміт
26adfb2240

+ 1 - 1
config/index.js

@@ -58,7 +58,7 @@ let proxyTable = {
   "/api/v1": {
     target: "http://172.16.33.166:8080",
     // target: "http://172.16.33.162:8019",
-    // target: "http://localhost:8019",
+    // target: "http://localhost:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 39 - 22
src/components/DilCommonUI/packages/table/src/table.js

@@ -27,7 +27,6 @@ export default {
   created() {
     this.dataCurrentPage = this.currentPage;
     this.dataPageSize = this.pageSize;
-    console.log(this)
     this.requestData();
   },
   mounted() {
@@ -45,7 +44,6 @@ export default {
       if (options) {
         pageNum = options.pageNum;
         pageSize = options.pageSize;
-        
       }
       
       if (this.requestUrl) {
@@ -56,27 +54,41 @@ export default {
         } else {
           url = this.requestUrl;
         }
-        // 处理请求地址逻辑
-
-        if (
-          !this.dataTotal ||
-          (this.dataCurrentPage - 1) * this.dataPageSize < this.dataTotal
-        ) {
-          // 判断是否需要在请求体中放入参数
-          if(this.requestQuery){
-            console.log(" 判断是否需要在请求体中放入参数")
-            this.dataRequestQuery=this.requestQuery;
-            // console.log(this.dataRequestQuery.resultBreakId)
+        // 判断是否需要在请求体中放入参数
+        if(this.requestQuery){
+          this.dataRequestQuery=this.requestQuery;
+          // console.log(this.dataRequestQuery.resultBreakId)
+        }
+        let data = undefined;
+        for (const key in this.dataRequestQuery) {
+          const val = this.dataRequestQuery[key];
+          console.log(val)
+          if (val||val==0) {
+            if (!data) data = {};
+            data[key] = val;
           }
-          let data = undefined;
-          for (const key in this.dataRequestQuery) {
-            const val = this.dataRequestQuery[key];
-            console.log(val)
-            if (val||val==0) {
-              if (!data) data = {};
-              data[key] = val;
+        }
+        //判断是否是带分页查询
+        if(this.isKuang){
+          // 发送请求
+          this.axios
+          .post(url, data, {
+            // 请求地址 中
+            params: {
+              pageNum: 1,
+              pageSize: pageSize || this.dataPageSize
             }
-          }
+          })
+          .then(response => {
+            let d = response.data.data;
+            this.dataTabel = d.list;
+            this.dataTotal = d.total;
+            //执行成功的回调
+            this.$emit('func',response.data.data);
+            this.refreshColumnData(d.columnData);
+            this.isShow = true;
+          });
+        }else{
           // 发送请求
           this.axios
             .post(url, data, {
@@ -93,7 +105,13 @@ export default {
               //执行成功的回调
               this.$emit('func',response.data.data);
               this.refreshColumnData(d.columnData);
+
               this.isShow = true;
+              //若父组件存在要合计的值
+              if(this.$parent.totalNumber>=0){
+                //将筛选的字段传给父组件
+                this.$parent.calculationTotalNumber(this.dataRequestQuery);
+              }
             });
         }
       } else {
@@ -289,7 +307,6 @@ export default {
         for (const key in val) {
           q[key] = val[key] ? val[key] : undefined;
         }
-
         this.setDataRequestQuery(q);
       }
     },

+ 11 - 2
src/components/DilCommonUI/packages/table/src/table.vue

@@ -116,7 +116,11 @@ export default {
   name: "DilTable",
   extends: table,
   props: {
-    isChang:{
+    drawer:{
+      default:false,
+    },
+    //判断是否带分页查询
+    isKuang:{
       default:false,
     },
     // 请求地址
@@ -213,7 +217,7 @@ export default {
     },
     // 每页显示条目个数,支持 .sync 修饰符
     pageSize: {
-      default: 10,
+      default: 100,
     },
     //组件布局,子组件名用逗号分隔
     layout: {
@@ -223,6 +227,11 @@ export default {
   watch:{
     requestUrl(){
       this.refreshData();
+    },
+    drawer(val){
+      if(val){
+        this.dataRadioId = null;
+      }
     }
   },
   methods: {

+ 78 - 60
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -130,40 +130,58 @@
           <i class="el-icon-search"></i>查询
         </el-button>
       </div>
-      <div v-show="onDrawerNumber == 1">
+      <div v-if="onDrawerNumber == 1">
         <dilTable
           v-bind.sync="frist"
           @radio-change="currentRadioChange1"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="onDrawerNumber == 2">
+      <div v-else-if="onDrawerNumber == 2">
         <dilTable
           v-bind.sync="secend"
           @radio-change="currentRadioChange2"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="onDrawerNumber == 3">
+      <div v-else-if="onDrawerNumber == 3">
         <dilTable
           v-bind.sync="third"
           @selection-change="currentRadioChange3"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="onDrawerNumber == 4">
+      <div v-else-if="onDrawerNumber == 4">
         <dilTable
           v-bind.sync="unloadPoint"
           @radio-change="currentRadioChange4"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="onDrawerNumber == 5">
+      <div v-else-if="onDrawerNumber == 5">
         <dilTable
           v-bind.sync="line"
           @radio-change="currentRadioChange5"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="onDrawerNumber == 6">
+      <div v-else-if="onDrawerNumber == 6">
         <dilTable
           v-bind.sync="purchaseOrder"
           @radio-change="currentRadioChange6"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
     </el-drawer>
@@ -181,6 +199,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isKuang:false,
       //采购订单号
       purchaseOrderNo:'',
       isMoreTrips:false,
@@ -247,7 +266,7 @@ export default {
       direction: "rtl",
       input: "",
       frist: {
-        requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
+        requestUrl: "",
         selectionType: "radio",
         mapList1: [],
       },
@@ -278,7 +297,7 @@ export default {
   },
   watch: {
     drawer(val) {
-      if (!val) {
+      if (val) {
         this.input = null;
       }
     },
@@ -336,72 +355,71 @@ export default {
         });
       }
     },
+    func(res){
+      this.isKuang = false;
+    },
     onclick() {
-      if (this.onDrawerNumber == 1) {
-        this.frist.requestUrl =
-          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
-          this.input;
-      } else if (this.onDrawerNumber == 2) {
-        this.secend.requestUrl =
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
-          this.materialId +
-          "&index=" +
-          this.input;
-      } else if (this.onDrawerNumber == 3) {
-        //判断是否是承运商查询车辆
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            getCookie("userId") +
-            "&index=" +
-            this.input;
-        } else {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            null +
-            "&index=" +
-            this.input;
+      if(this.input){
+        this.isKuang = true;
+        if (this.onDrawerNumber == 1) {
+          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" + this.input;
+        } else if (this.onDrawerNumber == 2) {
+          this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId + "&index=" + this.input;
+        } else if (this.onDrawerNumber == 3) {
+          //判断是否是承运商查询车辆
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId") + "&index=" + this.input;
+          } else {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index=" + this.input;
+          }
+        } else if (this.onDrawerNumber == 4) {
+          this.unloadPoint.requestUrl =  "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input;
+        } else if (this.onDrawerNumber == 5) {
+          this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
+        }else if (this.onDrawerNumber == 6) {
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&con=" + this.input+"&i="+new Date();
+        }
+      }else{
+        if (this.onDrawerNumber == 1) {
+          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050"
+        } else if (this.onDrawerNumber == 2) {
+          this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId;
+        } else if (this.onDrawerNumber == 3) {
+          //判断是否是承运商查询车辆
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId");
+          } else {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null;
+          }
+        } else if (this.onDrawerNumber == 4) {
+          this.unloadPoint.requestUrl =  "/api/v1/uc/getUnloadingMesByLike?apiId=374";
+        } else if (this.onDrawerNumber == 5) {
+          this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
+        }else if (this.onDrawerNumber == 6) {
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81";
         }
-      } else if (this.onDrawerNumber == 4) {
-        this.unloadPoint.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input;
-      } else if (this.onDrawerNumber == 5) {
-        this.option.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
-      }else if (this.onDrawerNumber == 6) {
-        console.log("caig")
-        this.purchaseOrder.requestUrl =
-          "/api/v1/ams/getPurchaseOrderList?apiId=81&con=" + this.input+"&i="+new Date();
       }
     },
     ondrawer(num) {
-      this.drawer = true;
       this.onDrawerNumber = num;
-      if (num == 2) {
-        this.secend.requestUrl =
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
-          this.materialId;
+      this.drawer = true;
+      if(num == 1){
+        this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050"
+      }else if (num == 2) {
+        this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId;
       } else if (num == 3) {
         //判断是否是承运商查询车辆
         if (getCookie("orgCode") == "chengyunshang") {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            getCookie("userId") +
-            "&i=" + new Date();
+          this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId") + "&i=" + new Date();
         } else {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            null  + "&i=" + new Date();
+          this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null  + "&i=" + new Date();
         }
       } else if (num == 4) {
-        this.unloadPoint.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
+        this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
       } else if (num == 5) {
-        this.option.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
       }else if (num == 6) {
-        this.purchaseOrder.requestUrl =
-        "/api/v1/ams/getPurchaseOrderList?apiId=81&i=" + new Date();
+        this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&i=" + new Date();
       }
     },
     // 返回

+ 68 - 46
src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue

@@ -134,36 +134,54 @@
         <dilTable
           v-bind.sync="frist"
           @radio-change="currentRadioChange1"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
       <div v-show="onDrawerNumber == 2">
         <dilTable
           v-bind.sync="secend"
           @radio-change="currentRadioChange2"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
       <div v-show="onDrawerNumber == 3">
         <dilTable
           v-bind.sync="third"
           @selection-change="currentRadioChange3"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
       <div v-show="onDrawerNumber == 4">
         <dilTable
           v-bind.sync="unloadPoint"
           @radio-change="currentRadioChange4"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
       <div v-show="onDrawerNumber == 5">
         <dilTable
           v-bind.sync="line"
           @radio-change="currentRadioChange5"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
       <div v-show="onDrawerNumber == 6">
         <dilTable
           v-bind.sync="purchaseOrder"
           @radio-change="currentRadioChange6"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
     </el-drawer>
@@ -181,6 +199,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isKuang:false,
       //采购订单号
       purchaseOrderNo:'',
       isMoreTrips:false,
@@ -278,7 +297,7 @@ export default {
   },
   watch: {
     drawer(val) {
-      if (!val) {
+      if (val) {
         this.input = null;
       }
     },
@@ -337,61 +356,60 @@ export default {
       }
     },
     onclick() {
-      if (this.onDrawerNumber == 1) {
-        this.frist.requestUrl =
-          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
-          this.input;
-      } else if (this.onDrawerNumber == 2) {
-        this.secend.requestUrl =
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
-          this.materialId +
-          "&index=" +
-          this.input;
-      } else if (this.onDrawerNumber == 3) {
-        //判断是否是承运商查询车辆
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            getCookie("userId") +
-            "&index=" +
-            this.input;
-        } else {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            null +
-            "&index=" +
-            this.input;
+      if(this.input){
+        this.isKuang = true;
+        if (this.onDrawerNumber == 1) {
+          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" + this.input;
+        } else if (this.onDrawerNumber == 2) {
+          this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId + "&index=" + this.input;
+        } else if (this.onDrawerNumber == 3) {
+          //判断是否是承运商查询车辆
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId") + "&index=" + this.input;
+          } else {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index=" + this.input;
+          }
+        } else if (this.onDrawerNumber == 4) {
+          this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input;
+        } else if (this.onDrawerNumber == 5) {
+          this.option.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
+        }else if (this.onDrawerNumber == 6) {
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&con=" + this.input+"&i="+new Date();
+        }
+      }else{
+        if (this.onDrawerNumber == 1) {
+          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&i="+new Date();
+        } else if (this.onDrawerNumber == 2) {
+          this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId+"&i="+new Date();
+        } else if (this.onDrawerNumber == 3) {
+          //判断是否是承运商查询车辆
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId")+"&i="+new Date();
+          } else {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null+"&i="+new Date();
+          }
+        } else if (this.onDrawerNumber == 4) {
+          this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i="+new Date();
+        } else if (this.onDrawerNumber == 5) {
+          this.option.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i="+new Date();
+        }else if (this.onDrawerNumber == 6) {
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&i="+new Date();
         }
-      } else if (this.onDrawerNumber == 4) {
-        this.unloadPoint.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input;
-      } else if (this.onDrawerNumber == 5) {
-        this.option.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
-      }else if (this.onDrawerNumber == 6) {
-        console.log("caig")
-        this.purchaseOrder.requestUrl =
-          "/api/v1/ams/getPurchaseOrderList?apiId=81&con=" + this.input+"&i="+new Date();
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.onDrawerNumber = num;
-      if (num == 2) {
-        this.secend.requestUrl =
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
-          this.materialId;
+      if(num == 1){
+        this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" + this.input;
+      }else if (num == 2) {
+        this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId;
       } else if (num == 3) {
         //判断是否是承运商查询车辆
         if (getCookie("orgCode") == "chengyunshang") {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            getCookie("userId") +
-            "&i=" + new Date();
+          this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId") + "&i=" + new Date();
         } else {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            null  + "&i=" + new Date();
+          this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null  + "&i=" + new Date();
         }
       } else if (num == 4) {
         this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
@@ -431,6 +449,10 @@ export default {
       this.selectionList = [];
       this.selectionList = selection;
     },
+    func(res){
+      console.log(res)
+      this.isKuang = false;
+    },
     // 确认
     onClickConfirm() {
       var state = 0;

+ 66 - 2
src/views/statisticalReport/components/salesLogisticsStatistics/transportationPerformance.vue

@@ -17,9 +17,13 @@
       <el-button type="primary" @click="refresh">
         <i class="el-icon-refresh"></i>刷新
       </el-button>
+      <span style="margin-left: 1rem;">合计净重:</span>
+      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
+      <span style="margin-left: 1rem;">合计车数:</span>
+      <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
     </div>
     <div class="table">
-      <dilTable ref="excelDom" v-bind.sync="option"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" :isKuang="isKuang" @func="func"></dilTable>
     </div>
   </div>
 </template>
@@ -29,17 +33,32 @@ import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
+      isKuang:false,
       option: {
         requestUrl: "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&i=" +new Date(),
       },
-      Time:'',
+      Time:null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
       tableTitle:'销售统计报表'
     };
   },
+  created(){
+      var startTime = this.dataFormat(sjTime(new Date()));
+      var endTime = this.dataFormat(sjTime(new Date()));
+      this.tableTitle = startTime + ' 至 ' + endTime;
+  },
   methods: {
     refresh(){
       this.$router.go(0);
     },
+    func(res){
+      //获取总记录条数作为合计车数
+      this.totalCapacity = res.total;
+      this.isKuang = false;
+    },
     onclick() {
       let startTime = null;
       let endTime = null;
@@ -48,7 +67,52 @@ export default {
         endTime = sjTime(this.Time[1]);
       }
       this.option.requestUrl = "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      //修改报表名称
+      this.tableTitle = this.dataFormat(startTime) + ' 至 ' + this.dataFormat(endTime);
     },
+    //获取当前条件下的总净重
+    calculationTotalNumber(dataRequestQuery){
+      //初始化时间
+      let startTime = null;
+      let endTime = null;
+      if(this.Time != null){
+        startTime = sjTime(this.Time[0]);
+        endTime = sjTime(this.Time[1]);
+      }
+      //放入子组件筛选的值
+      let mapValue = undefined;
+          for (const key in dataRequestQuery) {
+         
+            const val = dataRequestQuery[key];
+            if (val||val==0) {
+             
+              if (!mapValue) mapValue = {};
+            
+              mapValue[key] = val;
+            }
+          }
+      this.axios.post("/api/v1/tms/getAllSaleReportTotal?startTime=" + startTime +"&endTime="+ endTime +"&i=" +new Date(),mapValue)
+      .then((res) => {
+          this.totalNumber = res.data.data;
+        });  
+    },
+    //格式化日期
+    dataFormat(value){
+      let date = new Date(value);
+        let y = date.getFullYear();
+        let MM = date.getMonth() + 1;
+        MM = MM < 10 ? ('0' + MM) : MM;
+        let d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        let h = date.getHours();
+        h = h < 10 ? ('0' + h) : h;
+        let m = date.getMinutes();
+        m = m < 10 ? ('0' + m) : m;
+        let s = date.getSeconds();
+        s = s < 10 ? ('0' + s) : s;
+        return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
+    }
+
   },
 };
 </script>