Browse Source

实时库存和时间筛选

liyg 2 years ago
parent
commit
b98f7f50d9

+ 26 - 1
src/views/TMS/components/importedShip/loadShip.vue

@@ -9,6 +9,11 @@
         clearable
       >
       </el-input>
+<!-- 
+       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
+
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -38,12 +43,16 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
       input: "",
+       startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getLoadShipList?apiId=63"
@@ -53,7 +62,23 @@ export default {
   mounted() {},
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input;
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input;
+      }
     },
     click(resultId) {
       console.log("aaa" + resultId);

+ 33 - 6
src/views/TMS/components/importedShip/shipLocation.vue

@@ -3,6 +3,9 @@
   <div class="homeworkPath">
     <div class="top">
       <el-input  class="el-input" placeholder="请输入物资名称和外轮船名" v-model="input" clearable> </el-input>
+       <!-- <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -87,6 +90,7 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -173,7 +177,10 @@ export default {
         },
       ],
       selectionList: [],
+       startTime: null,
+      endTime: null,
       input:"",
+      
     };
   },
   created() {
@@ -201,12 +208,32 @@ export default {
       });
     },
     onclick() {
-    
-      this.axios.post("/api/v1/tms/getShipLocationList?con=" + this.input).then((res) => {
-        if (res.data.code == "200") {
-          this.selectionList = res.data.data;
-        }
-      });
+     let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+         this.axios.post("/api/v1/tms/getShipLocationList?con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime).then((res) => {
+            if (res.data.code == "200") {
+              this.selectionList = res.data.data;
+            }
+          });
+      }else{
+         this.axios.post("/api/v1/tms/getShipLocationList?con=" + this.input).then((res) => {
+            if (res.data.code == "200") {
+              this.selectionList = res.data.data;
+            }
+          });
+      }
+     
     },
     click(row) {
       this.axios.post("/api/v1/tms/updateShipLocation", row).then((res) => {

+ 27 - 1
src/views/TMS/components/importedShip/shipResult.vue

@@ -4,6 +4,11 @@
     <div class="top">
 
       <el-input class="el-input" placeholder="请输入内容" v-model="input" clearable> </el-input>
+<!--       
+       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
+
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -17,12 +22,16 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
       input: "",
+        startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/listAllOrders?apiId=56",
@@ -33,7 +42,24 @@ export default {
   },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/listAllOrders?apiId=56&con=" + this.input;
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+        this.option.requestUrl = "/api/v1/tms/listAllOrders?apiId=56&con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+      }else{
+        this.option.requestUrl = "/api/v1/tms/listAllOrders?apiId=56&con=" + this.input;
+      }
+      
     },
     btnclick(pathId) {
       this.$router.push("/path/addHomeworkPath/" + pathId);

+ 51 - 12
src/views/TMS/components/importedShip/shipmentInstructions.vue

@@ -9,6 +9,9 @@
         clearable
       >
       </el-input>
+      <!-- <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -78,6 +81,8 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -85,6 +90,8 @@ export default {
       restaurants: [],
       input: "",
       activeName: "first",
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl:
@@ -126,18 +133,50 @@ export default {
       console.log(tab, event);
     },
     onclick() {
-         if (this.activeName == "first") {
-          this.option1.requestUrl =
-            "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=未下发&carrierSSOId=" +
-            getCookie("userId") +
-            "&con=" +
-            this.input;  
-      } else{
-          this.option2.requestUrl =
-            "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=已下发&carrierSSOId=" +
-            getCookie("userId") +
-            "&con=" +
-            this.input;  
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+        if (this.activeName == "first") {
+          this.option.requestUrl =
+                "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=未下发&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;  
+        } else{
+            this.option2.requestUrl =
+              "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=已下发&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;  
+        }
+      }else{
+        if (this.activeName == "first") {
+          this.option.requestUrl =
+                "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=未下发&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input;  
+        } else{
+            this.option2.requestUrl =
+              "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=已下发&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input;  
+        }
       }
     },
     btnclick() {

+ 27 - 1
src/views/TMS/components/importedShip/unloadShip.vue

@@ -9,6 +9,10 @@
         clearable
       >
       </el-input>
+        <!-- <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker>
+       -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -38,12 +42,16 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
       input: "",
+        startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getUnLoadShipList?apiId=68"
@@ -53,8 +61,26 @@ export default {
   mounted() {},
   methods: {
     onclick() {
-      this.option.requestUrl =
+       let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+         this.option.requestUrl =
+        "/api/v1/tms/getUnLoadShipList?apiId=68&con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+      }else{
+         this.option.requestUrl =
         "/api/v1/tms/getUnLoadShipList?apiId=68&con=" + this.input;
+      }
+     
     },
     click(resultId) {
       this.$router.push("/updateUnloadShip/" + resultId);

+ 4 - 33
src/views/WMS/components/port_deposit/loadPortStock.vue

@@ -45,8 +45,7 @@
       "
       >万州港实时库存详情</span
     >
-    <!-- <div style="overflow:scroll;height:600px"> -->
-    <dilTable
+    <mergeRowTable
       ref="excelDom"
       v-bind.sync="option"
       :isHeigth="isHeigth"
@@ -54,37 +53,7 @@
       @func="func"
       :pageSize="pageSize"
     >
-    </dilTable>
-    <!-- </div> -->
-    <div>
-      <span
-        class="el-input"
-        style="
-          color: red;
-          margin-left: 45%;
-          font-family: FANGSONG;
-          font-size: 20px;
-          font-weight: bold;
-        "
-        >万州港当前物资总计库存</span
-      >
-      <el-input
-        v-model="text"
-        placeholder="请输入物资名称"
-        style="width: 260px; margin-bottom: 35px; margin-left: 20px"
-        clearable
-      ></el-input>
-      <el-button type="primary" class="btn" @click="onclick1">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <dilTable
-        v-bind.sync="option2"
-        :isHeigth="isHeigth"
-        :shiyHeigth="shiyHeigth"
-        :pageSize="pageSize"
-      >
-      </dilTable>
-    </div>
+    </mergeRowTable>
   </div>
 </template>
 
@@ -105,6 +74,8 @@ export default {
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/wmsh/getLoadPortStockList?apiId=158",
+        comparison:"materialName",
+        columnIndexs:[1,2,3]
       },
       option2: {
         requestUrl: "/api/v1/wmsh/getLoadPortStockByMaterialName?apiId=493",

+ 1 - 1
src/views/WMS/components/port_deposit/unloadPortStock.vue

@@ -28,7 +28,7 @@ export default {
       state: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/wmsh/getUnloadPortStockList?apiId=158",
+        requestUrl: "/api/v1/wmsh/getUnloadPortStockList?apiId=497",
       },
     };
   },

+ 56 - 10
src/views/appoint/components/ship/deliveryAttorney.vue

@@ -9,7 +9,15 @@
         clearable
       >
       </el-input>
-
+      <!-- <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker> -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -74,6 +82,8 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -92,7 +102,9 @@ export default {
           "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=1",
         selectionType: "select"
       },
-      amsShipDeliveryList: []
+      amsShipDeliveryList: [],
+      startTime: null,
+      endTime: null,
     };
   },
 
@@ -101,19 +113,53 @@ export default {
       this.amsShipDeliveryList = selection;
     },
     onclick() {
-      if (this.activeName == "first") {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+        if (this.activeName == "first") {
           this.option1.requestUrl =
             "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=0&carrierSSOId=" +
             getCookie("userId") +
             "&con=" +
-            this.input;  
-      } else{
-          this.option2.requestUrl =
-            "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=1&carrierSSOId=" +
-            getCookie("userId") +
-            "&con=" +
-            this.input;  
+            this.input+
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime;  
+        } else{
+            this.option2.requestUrl =
+              "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=1&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input+
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime;  
+        }
+      }else{
+        if (this.activeName == "first") {
+            this.option1.requestUrl =
+              "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=0&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input;  
+        } else{
+            this.option2.requestUrl =
+              "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=1&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input;  
+        }
       }
+
+      
     },
     click(pathId) {
       this.$router.push("/path/addDeliveryNotice/" + pathId);

+ 53 - 8
src/views/appoint/components/ship/deliveryNotice.vue

@@ -3,6 +3,15 @@
   <div class="shipTransport">
     <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <!-- <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker> -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -52,6 +61,7 @@
   </div>
 </template>
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
@@ -60,6 +70,8 @@ export default {
       srcList:[],
       isShow:false,
       src:"",
+      startTime: null,
+      endTime: null,
       // restaurants: [],
       input: "",
       activeName: "first",
@@ -75,19 +87,52 @@ export default {
   },
   methods: {
     onclick() {
-        if (this.activeName == "first") {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+          if (this.activeName == "first") {
           this.option1.requestUrl =
             "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&carrierSSOId=" +
             getCookie("userId") +
             "&con=" +
-            this.input;  
-      } else{
-          this.option2.requestUrl =
-            "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1&carrierSSOId=" +
-            getCookie("userId") +
-            "&con=" +
-            this.input;  
+            this.input +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime;  
+          } else{
+              this.option2.requestUrl =
+                "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;  
+          }
+      }else{
+        if (this.activeName == "first") {
+            this.option1.requestUrl =
+              "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input;  
+        } else{
+            this.option2.requestUrl =
+              "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input;
+        }
       }
+      
      },
     addClick() {
       this.$router.push("/addDeliveryNotice/");