luobang преди 3 години
родител
ревизия
58e2e118c5

+ 1 - 1
build/utils.js

@@ -18,7 +18,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // let devModules = ['index','inward']
 // let devModules = ['index','appoint','sale','statisticalReport']
 // let devModules = ['index','sale']
-// let devModules = ['index','appoint','TMS','statisticalReport']
+// let devModules = ['index','appoint']
 let devModules = ['all']
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;

+ 1 - 1
config/index.js

@@ -66,7 +66,7 @@ let proxyTable = {
   "/api/v1": {
       target: "http://172.16.33.166:8080",
     //  target: "http://localhost:8080",
-    // target: "http://192.168.1.106:8080",
+    // target: "http://192.168.1.104:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 1 - 4
src/components/DilCommonUI/packages/table/src/table.js

@@ -64,13 +64,11 @@ export default {
         // 判断是否需要在请求体中放入参数
         if(this.requestQuery){
           this.dataRequestQuery=this.requestQuery;
-          console.log("表头数据")
-          console.log(this.dataRequestQuery)
         }
         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;
@@ -241,7 +239,6 @@ export default {
     },
     // current-page 改变时会触发
     currentChange(val, isRequest = true) {
-      console.log(val);
       if (isRequest) {
         this.requestData({ pageNum: val });
       }

+ 9 - 1
src/components/DilCommonUI/packages/table/src/table.vue

@@ -154,6 +154,9 @@ export default {
     showIndex: {
       default: true
     },
+    isClear: {
+      default: null
+    },
     // 是否显示选择框
     // radio : 显示单选框
     // select : 显示多选框
@@ -252,7 +255,12 @@ export default {
     refreshData() {
       this.requestData();
       // 多选表格清空用户的选择
-      this.$refs.mainTable.clearSelection();
+      console.log("我正在执行这里");
+      console.log(this.isClear);
+      if (this.isClear != "1") {
+        console.log("我正在执行这里1");
+        this.$refs.mainTable.clearSelection();
+      }
     },
     rowDbClick(row) {
       this.$emit("rowDbClick", row);

+ 16 - 3
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -106,6 +106,7 @@
     </div>
     <div class="truckListTable">
       <el-table
+        ref="table1"
         :data="selectionList"
         border
         style="width: 100%"
@@ -186,6 +187,7 @@
       <div v-show="onDrawerNumber == 3">
         <dilTable
           v-bind.sync="third"
+          :isClear="1"
           @selection-change="currentRadioChange3"
           :isHeigth="isHeigth2"
           :shiyHeigth="shiyHeigth2"
@@ -528,7 +530,7 @@ export default {
         } else if (this.onDrawerNumber == 8) {
           this.loadName.requestUrl =
             "/api/v1/uc/getUnloadingMesByLike?apiId=374" +
-            "&con=" +
+            "&index=" +
             this.input +
             "&i=" +
             new Date();
@@ -595,6 +597,7 @@ export default {
           "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
           this.materialId;
       } else if (num == 3) {
+        let arr = this.selectionList;
         //判断是否是承运商查询车辆
         if (getCookie("orgCode") == "chengyunshang") {
           this.third.requestUrl =
@@ -609,6 +612,16 @@ export default {
             "&i=" +
             new Date();
         }
+        this.selectionList = [];
+        let i = 0;
+        arr.forEach(e => {
+          if (this.selectionList.indexOf(e) === -1) {
+            console.log("执行力");
+            this.$set(this.selectionList, i, e);
+            i++;
+          }
+        });
+        console.log(this.selectionList);
       } else if (num == 4) {
         this.unloadPoint.requestUrl =
           "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
@@ -670,9 +683,9 @@ export default {
       this.purchaseOrderNo = selection.purchaseOrderNo;
       this.purchaseOrderId = selection.purchaseOrderId;
     },
-    currentRadioChange3(selection) {
+    currentRadioChange3(select) {
       this.selectionList = [];
-      this.selectionList = selection;
+      this.selectionList = JSON.parse(JSON.stringify(select));
     },
     func(res) {
       console.log(res);

+ 34 - 15
src/views/inward/components/inwardFactory/unload.vue

@@ -2,7 +2,7 @@
 <template>
   <!-- 卸货卸货实绩页面 -->
   <div class="homeworkPath">
-   <div class="top">
+    <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
@@ -22,31 +22,50 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "",
-      },
+        requestUrl: ""
+      }
     };
   },
-  created(){
-      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=360&orderType=11"
-      }else{
-          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=360&orderType=11&userId=" + getCookie("orgCode")
-      }
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.option.requestUrl =
+        "/api/v1/tms/getUnloadResult?apiId=360&orderType=11";
+    } else {
+      this.option.requestUrl =
+        "/api/v1/tms/getUnloadResult?apiId=360&orderType=11&userId=" +
+        getCookie("orgCode");
+    }
   },
   methods: {
     onclick() {
-          this.$message.info("功能暂时关闭")
-    },
-   }
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.option.requestUrl =
+          "/api/v1/tms/getUnloadResult?apiId=360&orderType=11&con=" +
+          this.input;
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getUnloadResult?apiId=360&orderType=11&userId=" +
+          getCookie("orgCode") +
+          "&con=" +
+          this.input;
+      }
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .homeworkPath {
   .top {
     padding: 1.25rem 1.875rem;
-    .el-input{
+    .el-input {
       width: 20%;
     }
   }
 }
-</style>
+</style>

+ 73 - 85
src/views/statisticalReport/components/inwardReport/allInwardReport.vue

@@ -40,6 +40,8 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
+      //导出excel标题
+      tableTitle: null,
       //报表所有数据
       totalArr: [],
       //纯内转数据
@@ -88,7 +90,7 @@ export default {
           }
         )
           .then(() => {
-            this.openFullScreen();
+            this.openFullScreen1();
           })
           .catch(() => {
             this.$message.info("取消导出");
@@ -119,148 +121,121 @@ export default {
     openFullScreen1() {
       let startTime = null;
       let endTime = null;
+      let orgCode = null;
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime);
         endTime = sjTime(this.endTime);
       }
+      if (
+        getCookie("orgCode") != "dagangadmin" &&
+        getCookie("orgCode") != "zidonghuabu"
+      ) {
+        orgCode = getCookie("orgCode");
+      }
       const loading = this.$loading({
         lock: true,
         text: "请等待导出",
         spinner: "el-icon-loading",
         background: "rgba(0, 0, 0, 0.7)"
       });
-      if (
-        getCookie("orgCode") == "dagangadmin" ||
-        getCookie("orgCode") == "zidonghuabu"
-      ) {
-        this.axios
-          .post(
-            "/api/v1/tms/getInwardInFactory?apiId=486&orgCode=null&isPage=yes&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&index=" +
-              this.input
-          )
-          .then(res => {
-            this.inwardArr = res.data.data;
-            this.totalArr = this.totalArr.concat(this.inwardArr);
-            this.axios
-              .post(
-                "/api/v1/tms/getPurchaseInwardList?apiId=486&orgCode=null&isPage=yes&startTime=" +
-                  startTime +
-                  "&endTime=" +
-                  endTime +
-                  "&index=" +
-                  this.input +
-                  "&i=" +
-                  new Date()
-              )
-              .then(res => {
-                this.purInward = res.data.data;
-                this.totalArr = this.totalArr.concat(this.purInward);
-                this.axios
-                  .post(
-                    "/api/v1/tms/getSaleOrderList?apiId=486&orgCode=null&isPage=yes&startTime=" +
-                      startTime +
-                      "&endTime=" +
-                      endTime +
-                      "&index=" +
-                      this.input +
-                      "&i=" +
-                      new Date()
-                  )
-                  .then(res => {
-                    this.saleReport = res.data.data;
-                    this.totalArr = this.totalArr.concat(this.saleReport);
-                    this.axios
-                      .post(
-                        "/api/v1/tms/getPurchaseOrderList?apiId=486&orgCode=null&isPage=yes&startTime=" +
-                          startTime +
-                          "&endTime=" +
-                          endTime +
-                          "&index=" +
-                          this.input +
-                          "&i=" +
-                          new Date()
-                      )
-                      .then(res => {
-                        this.purReport = res.data.data;
-                        this.totalArr = this.totalArr.concat(this.purReport);
-                        this.exportAllReportToExcel();
-                        loading.close();
-                      });
-                  });
-              });
-          });
-      } else {
+      if (this.activeName == "first") {
         this.axios
           .post(
-            "/api/v1/tms/getInwardInFactory?apiId=486&isPage=yes&orgCode=" +
-              getCookie("orgCode") +
-              "&startTime=" +
+            "/api/v1/tms/getInwardInFactory?apiId=486&isPage=yes&startTime=" +
               startTime +
               "&endTime=" +
               endTime +
               "&index=" +
-              this.input
+              this.input +
+              "&orgCode=" +
+              orgCode
           )
           .then(res => {
+            this.totalArr = [];
+            this.inwardArr = [];
+            this.tableTitle = "纯内转统计报表";
             this.inwardArr = res.data.data;
             this.totalArr = this.totalArr.concat(this.inwardArr);
+            this.exportAllReportToExcel();
+            setTimeout(() => {
+              loading.close();
+            }, 2000);
           });
+      } else if (this.activeName == "second") {
         this.axios
           .post(
-            "/api/v1/tms/getPurchaseInwardList?apiId=486&isPage=yes&orgCode=" +
-              getCookie("orgCode") +
-              "&startTime=" +
+            "/api/v1/tms/getPurchaseInwardList?apiId=486&isPage=yes&startTime=" +
               startTime +
               "&endTime=" +
               endTime +
               "&index=" +
-              this.input
+              this.input +
+              "&orgCode=" +
+              orgCode
           )
           .then(res => {
+            this.totalArr = [];
+            this.purInward = [];
+            this.tableTitle = "采购内转统计报表";
             this.purInward = res.data.data;
             this.totalArr = this.totalArr.concat(this.purInward);
+            this.exportAllReportToExcel();
+            setTimeout(() => {
+              loading.close();
+            }, 2000);
           });
+      } else if (this.activeName == "third") {
         this.axios
           .post(
-            "/api/v1/tms/getSaleOrderList?apiId=486&isPage=yes&orgCode=" +
-              getCookie("orgCode") +
-              "&startTime=" +
+            "/api/v1/tms/getSaleOrderList?apiId=486&isPage=yes&startTime=" +
               startTime +
               "&endTime=" +
               endTime +
               "&index=" +
-              this.input
+              this.input +
+              "&orgCode=" +
+              orgCode
           )
           .then(res => {
+            thia.totalArr = [];
+            this.saleReport = [];
+            this.tableTitle = "销售内转统计报表";
             this.saleReport = res.data.data;
             this.totalArr = this.totalArr.concat(this.saleReport);
+            this.exportAllReportToExcel();
+            setTimeout(() => {
+              loading.close();
+            }, 2000);
           });
+      } else {
         this.axios
           .post(
-            "/api/v1/tms/getPurchaseOrderList?apiId=486&isPage=yes&orgCode=" +
-              getCookie("orgCode") +
-              "&startTime=" +
+            "/api/v1/tms/getPurchaseOrderList?apiId=486&isPage=yes&startTime=" +
               startTime +
               "&endTime=" +
               endTime +
               "&index=" +
-              this.input
+              this.input +
+              "&orgCode=" +
+              orgCode
           )
           .then(res => {
+            this.totalArr = [];
+            this.purReport = [];
+            this.tableTitle = "采购燃料统计报表";
             this.purReport = res.data.data;
             this.totalArr = this.totalArr.concat(this.purReport);
             this.exportAllReportToExcel();
-            loading.close();
+            setTimeout(() => {
+              loading.close();
+            }, 2000);
           });
       }
     },
     openFullScreen() {
       let startTime = null;
       let endTime = null;
+      this.totalArr = [];
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime);
         endTime = sjTime(this.endTime);
@@ -285,6 +260,7 @@ export default {
               this.input
           )
           .then(res => {
+            this.inwardArr = [];
             this.inwardArr = res.data.data;
             this.totalArr = this.totalArr.concat(this.inwardArr);
             this.axios
@@ -299,6 +275,7 @@ export default {
                   new Date()
               )
               .then(res => {
+                this.purInward = [];
                 this.purInward = res.data.data;
                 this.totalArr = this.totalArr.concat(this.purInward);
                 this.axios
@@ -313,6 +290,7 @@ export default {
                       new Date()
                   )
                   .then(res => {
+                    this.saleReport = [];
                     this.saleReport = res.data.data;
                     this.totalArr = this.totalArr.concat(this.saleReport);
                     this.axios
@@ -327,10 +305,14 @@ export default {
                           new Date()
                       )
                       .then(res => {
+                        this.purReport = [];
                         this.purReport = res.data.data;
                         this.totalArr = this.totalArr.concat(this.purReport);
+                        this.tableTitle = "全部内转车辆报表";
                         this.exportAllReportToExcel();
-                        loading.close();
+                        setTimeout(() => {
+                          loading.close();
+                        }, 2000);
                       });
                   });
               });
@@ -348,6 +330,7 @@ export default {
               this.input
           )
           .then(res => {
+            this.inwardArr = [];
             this.inwardArr = res.data.data;
             this.totalArr = this.totalArr.concat(this.inwardArr);
           });
@@ -363,6 +346,7 @@ export default {
               this.input
           )
           .then(res => {
+            this.purInward = [];
             this.purInward = res.data.data;
             this.totalArr = this.totalArr.concat(this.purInward);
           });
@@ -378,6 +362,7 @@ export default {
               this.input
           )
           .then(res => {
+            this.saleReport = [];
             this.saleReport = res.data.data;
             this.totalArr = this.totalArr.concat(this.saleReport);
           });
@@ -393,10 +378,13 @@ export default {
               this.input
           )
           .then(res => {
+            this.purReport = [];
             this.purReport = res.data.data;
             this.totalArr = this.totalArr.concat(this.purReport);
             this.exportAllReportToExcel();
-            loading.close();
+            setTimeout(() => {
+              loading.close();
+            }, 2000);
           });
       }
     },