Просмотр исходного кода

修改运输预约以及采购厂内执行查询

zx 3 лет назад
Родитель
Сommit
2071968fa8

+ 95 - 31
src/views/TMS/components/importedFuel/transportReserveRan.vue

@@ -9,6 +9,22 @@
         clearable
       >
       </el-input>
+      <span class="text" v-if="activeName == 'second'">下发时间:</span>
+      <el-date-picker
+        v-if="activeName == 'second'"
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text" v-if="activeName == 'second'">至</span>
+      <el-date-picker
+        v-if="activeName == 'second'"
+        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>
@@ -144,26 +160,29 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
     return {
       input: "",
       Time: "",
+      startTime: null,
+      endTime: null,
       activeName: "first",
       checked: {
         type: Boolean,
-        default: false
+        default: false,
       },
       option1: {
         // 表格请求数据的地址
         requestUrl: "",
         selectionType: "select",
-        mapList: []
+        mapList: [],
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl: ""
+        requestUrl: "",
       },
       purOrderList: [],
       isMoreTrips: null,
@@ -171,7 +190,7 @@ export default {
       materialName: null,
       supplierName: null,
       inputPurOrder: null,
-      deleteNoReceiveOrder: null
+      deleteNoReceiveOrder: null,
     };
   },
   created() {
@@ -236,19 +255,64 @@ export default {
             this.input;
         }
       } else {
-        //判断是否是承运商
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.option1.requestUrl =
-            "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
-            getCookie("userId") +
-            "&con=" +
-            this.input;
-        } else {
-          this.option1.requestUrl =
-            "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
-            null +
-            "&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) {
+          if (startTime < endTime) {
+            //判断是否是承运商
+            if (getCookie("orgCode") == "chengyunshang") {
+              this.option2.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime +
+                "&i=" +
+                new Date();
+            } else {
+              this.option2.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
+                null +
+                "&con=" +
+                this.input +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime +
+                "&i=" +
+                new Date();
+            }
+          }
+        }
+        else{
+            console.log("我进来了");
+            //判断是否是承运商
+            if (getCookie("orgCode") == "chengyunshang") {
+              this.option2.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input +
+                "&i=" +
+                new Date();
+            } else {
+              this.option2.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
+                null +
+                "&con=" +
+                this.input +
+                "&i=" +
+                new Date();
+            }
         }
       }
     },
@@ -257,7 +321,7 @@ export default {
         this.$message.warning("请输入需要关闭一车多趟的采购订单号");
         return;
       }
-      this.purOrderList.forEach(e => {
+      this.purOrderList.forEach((e) => {
         if (e.purchaseOrderNo == this.inputPurOrder) {
           this.materialName = e.materialName;
           this.supplierName = e.supplierName;
@@ -281,7 +345,7 @@ export default {
             "&deleteNoReceiveOrder=" +
             this.deleteNoReceiveOrder
         )
-        .then(res => {
+        .then((res) => {
           // console.log(res);
           if (res.data.code == "200") {
             this.$message.success("关闭成功");
@@ -303,12 +367,12 @@ export default {
     },
     issue() {
       let mapvalue = {
-        mapList: this.mapList
+        mapList: this.mapList,
       };
       this.axios.post("/api/v1/oms/dispatchOrder", mapvalue).then(() => {
         this.$message({
           type: "success",
-          message: "下发成功!"
+          message: "下发成功!",
         });
         this.getRequestUrl();
       });
@@ -316,19 +380,19 @@ export default {
     // 下发
     sendClick(orderId) {
       let mapvalue = {
-        mapList: [{ orderId: orderId }]
+        mapList: [{ orderId: orderId }],
       };
       this.$confirm("是否下发", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true
+        center: true,
       })
         .then(() => {
           this.axios.post("/api/v1/oms/dispatchOrder", mapvalue).then(() => {
             this.$message({
               type: "success",
-              message: "下发成功!"
+              message: "下发成功!",
             });
             this.getRequestUrl();
           });
@@ -336,7 +400,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!"
+            message: "取消下发!",
           });
         });
     },
@@ -346,17 +410,17 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true
+        center: true,
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "删除成功!"
+            message: "删除成功!",
           });
           this.axios
             .post("/api/v1/oms/deleteOrder", {
               orderId: orderId,
-              capacityNumber: capacityNumber
+              capacityNumber: capacityNumber,
             })
             .then(() => {
               this.getRequestUrl();
@@ -365,7 +429,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!"
+            message: "取消删除!",
           });
         });
     },
@@ -376,8 +440,8 @@ export default {
     //修改
     updateClick(orderId) {
       this.$router.push("/transportReserveRanEdit/" + orderId);
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 238 - 73
src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue

@@ -9,16 +9,32 @@
         clearable
       >
       </el-input>
+      <span class="text">下发时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</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>
-      <el-button type="primary" class="btn" @click="clickClose" v-if="activeName == 'option'">
+      <el-button
+        type="primary"
+        class="btn"
+        @click="clickClose"
+        v-if="activeName == 'option'"
+      >
         <i class="el-icon-close"></i>关闭
       </el-button>
     </div>
     <el-tabs v-model="activeName">
       <el-tab-pane label="未接收" name="option">
-        <dilTable v-bind.sync="option" @selection-change="selectionChange"> </dilTable>
+        <dilTable v-bind.sync="option" @selection-change="selectionChange">
+        </dilTable>
       </el-tab-pane>
       <el-tab-pane label="已接收" name="first">
         <dilTable v-bind.sync="option1"> </dilTable>
@@ -32,115 +48,264 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
     return {
+      startTime: null,
+      endTime: null,
       input: "",
       Time: "",
       activeName: "option",
       option: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
         selectionType: "select",
       },
       option1: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
       },
-      list:[],
+      list: [],
     };
   },
-  watch:{
-    activeName(val){
+  watch: {
+    activeName(val) {
       if (getCookie("orgCode") == "chengyunshang") {
-        if(val == "option"){
-          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
-        }else if(val == "first"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
-        }else if(val == "second"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
+        if (val == "option") {
+          this.option.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
+        } else if (val == "first") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
+        } else if (val == "second") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
         }
-      }else{
-        if(val == "option"){
-          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i="+new Date()+"&carrierSSOId=" + null;
-        }else if(val == "first"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i="+new Date()+"&carrierSSOId=" + null;
-        }else if(val == "second"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i="+new Date()+"&carrierSSOId=" + null;
+      } else {
+        if (val == "option") {
+          this.option.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            null;
+        } else if (val == "first") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            null;
+        } else if (val == "second") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            null;
         }
       }
-      
-    }
+    },
   },
   created() {
     //判断是否是承运商
     if (getCookie("orgCode") == "chengyunshang") {
-      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" + getCookie("userId");
-      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" + getCookie("userId");
-      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" + getCookie("userId");
+      this.option.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" +
+        getCookie("userId");
+      this.option1.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" +
+        getCookie("userId");
+      this.option2.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" +
+        getCookie("userId");
     } else {
-      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" + null;
-      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" + null;
-      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" + null;
+      this.option.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" +
+        null;
+      this.option1.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" +
+        null;
+      this.option2.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" +
+        null;
     }
   },
   methods: {
-    getRequestUrl(){
+    getRequestUrl() {
       if (getCookie("orgCode") == "chengyunshang") {
-      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
-      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
-      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
-    } else {
-      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" + null +"&i="+new Date();
-      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" + null +"&i="+new Date();
-      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" + null +"&i="+new Date();
-    }
+        this.option.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.option1.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+      } else {
+        this.option.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+        this.option1.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+      }
     },
     onclick() {
-    if (getCookie("orgCode") == "chengyunshang") {
-       if(this.activeName == "option"){
-        this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
-      }else if (this.activeName == "first") {
-        this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
-      } else if (this.activeName == "second") {
-        this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
-      }
-    }else{
-      if(this.activeName == "option"){
-        this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
-      }else if (this.activeName == "first") {
-        this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
-      } else if (this.activeName == "second") {
-        this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
+      if (getCookie("orgCode") == "chengyunshang") {
+        if (this.activeName == "option") {
+          this.option.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" +
+            this.input +
+            "&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
+        } else if (this.activeName == "first") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" +
+            this.input +
+            "&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
+        } else if (this.activeName == "second") {
+          this.option2.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" +
+            this.input +
+            "&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
+        }
+      } else {
+        let startTime = null;
+        let endTime = null;
+        if (this.startTime) {
+          startTime = sjTime(this.startTime);
+        }
+        if (this.endTime) {
+          endTime = sjTime(this.endTime);
+        }
+        if (startTime && endTime) {
+          if (startTime < endTime) {
+            if (this.activeName == "option") {
+              this.option.requestUrl =
+                "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" +
+                this.input +
+                "&i=" +
+                new Date() +
+                "&carrierSSOId=" +
+                null +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+            } else if (this.activeName == "first") {
+              this.option1.requestUrl =
+                "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" +
+                this.input +
+                "&i=" +
+                new Date() +
+                "&carrierSSOId=" +
+                null +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+            } else if (this.activeName == "second") {
+              this.option2.requestUrl =
+                "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" +
+                this.input +
+                "&i=" +
+                new Date() +
+                "&carrierSSOId=" +
+                null +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+            }
+          }
+        } else {
+          console.log("aaaa");
+          if (this.activeName == "option") {
+            this.option.requestUrl =
+              "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" +
+              this.input +
+              "&i=" +
+              new Date() +
+              "&carrierSSOId=" +
+              null;
+          } else if (this.activeName == "first") {
+            this.option1.requestUrl =
+              "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" +
+              this.input +
+              "&i=" +
+              new Date() +
+              "&carrierSSOId=" +
+              null;
+          } else if (this.activeName == "second") {
+            this.option2.requestUrl =
+              "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" +
+              this.input +
+              "&i=" +
+              new Date() +
+              "&carrierSSOId=" +
+              null;
+          }
+        }
       }
-    }
-      
     },
-    clickClose(){
-      console.log(this.list)
-      if(this.list.length == 0){
-        this.$message.warning('请选择订单之后在关闭')
-      }else{
-        this.axios.post('/api/v1/oms/deleteOrders',{list:this.list}).then((res)=>{
-          if(res.data.code == "200"){
-            this.$message.success('关闭成功')
-            this.getRequestUrl()
-          }
-        })
+    clickClose() {
+      console.log(this.list);
+      if (this.list.length == 0) {
+        this.$message.warning("请选择订单之后在关闭");
+      } else {
+        this.axios
+          .post("/api/v1/oms/deleteOrders", { list: this.list })
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$message.success("关闭成功");
+              this.getRequestUrl();
+            }
+          });
       }
-
     },
-    selectionChange(selection){
-      this.list = [],
-      selection.forEach(e => {
-        this.list.push(e.orderId)
-      });
-    }
+    selectionChange(selection) {
+      (this.list = []),
+        selection.forEach((e) => {
+          this.list.push(e.orderId);
+        });
+    },
   },
 };
 </script>

+ 120 - 55
src/views/TMS/components/importedIngredients/transportReserveFu.vue

@@ -9,6 +9,23 @@
         clearable
       >
       </el-input>
+      <!-- 时间查询框 -->
+      <span class="text" v-if="activeName == 'second'">下发时间:</span>
+      <el-date-picker
+        v-if="activeName == 'second'"
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text" v-if="activeName == 'second'">至</span>
+      <el-date-picker
+        v-if="activeName == 'second'"
+        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>
@@ -40,29 +57,28 @@
         <i class="el-icon-plus"></i>下发
       </el-button>
     </div>
-    <el-dialog
-      title="提醒"
-      :visible.sync="dialogVisible"
-      width="30%"
-    >
-      <div v-if="this.isMoreTrips != 1" style="color:red">
+    <el-dialog title="提醒" :visible.sync="dialogVisible" width="30%">
+      <div v-if="this.isMoreTrips != 1" style="color: red">
         <span>该订单不是一车多趟的订单</span>
       </div>
       <div>
         <span>采购订单号:</span>
-        <span>{{inputPurOrder}}</span>
+        <span>{{ inputPurOrder }}</span>
       </div>
       <div>
         <span>发货单位:</span>
-        <span>{{supplierName}}</span>
+        <span>{{ supplierName }}</span>
       </div>
       <div>
         <span>物资名称:</span>
-        <span>{{materialName}}</span>
+        <span>{{ materialName }}</span>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="closePurOrder1" v-if="this.isMoreTrips == 1"
+        <el-button
+          type="primary"
+          @click="closePurOrder1"
+          v-if="this.isMoreTrips == 1"
           >确 定</el-button
         >
       </span>
@@ -119,30 +135,32 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
     return {
       input: "",
       Time: "",
+      startTime: null,
+      endTime: null,
       activeName: "first",
       dialogVisible: false,
       materialName: null,
       supplierName: null,
-      inputPurOrder:null,
+      inputPurOrder: null,
       option1: {
         // 表格请求数据的地址
         requestUrl: "",
         selectionType: "select",
         mapList: [],
-        
       },
-      isMoreTrips:null,
+      isMoreTrips: null,
       option2: {
         // 表格请求数据的地址
-        requestUrl: ""
+        requestUrl: "",
       },
-      purOrderList: []
+      purOrderList: [],
     };
   },
   created() {
@@ -210,19 +228,61 @@ export default {
             this.input;
         }
       } else {
-        //判断是否是承运商
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.option1.requestUrl =
-            "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&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) {
+          if (startTime < endTime) {
+            //判断是否是承运商
+            if (getCookie("orgCode") == "chengyunshang") {
+              this.option2.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime +
+                "&i=" +
+                new Date();
+            } else {
+              this.option2.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
+                null +
+                "&con=" +
+                this.input +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime +
+                "&i=" +
+                new Date();
+            }
+          }
         } else {
-          this.option1.requestUrl =
-            "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
-            null +
-            "&con=" +
-            this.input;
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.option2.requestUrl =
+              "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input +
+              "&i=" +
+              new Date();
+          } else {
+            this.option2.requestUrl =
+              "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
+              null +
+              "&con=" +
+              this.input +
+              "&i=" +
+              new Date();
+          }
         }
       }
     },
@@ -230,29 +290,34 @@ export default {
       this.mapList = selection;
     },
     closePurOrder() {
-      if(this.inputPurOrder == null){
-        this.$message.warning("请输入需要关闭一车多趟的采购订单号")
-        return
+      if (this.inputPurOrder == null) {
+        this.$message.warning("请输入需要关闭一车多趟的采购订单号");
+        return;
       }
-      this.purOrderList.forEach(e => {
+      this.purOrderList.forEach((e) => {
         if (e.purchaseOrderNo == this.inputPurOrder) {
           this.materialName = e.materialName;
           this.supplierName = e.supplierName;
-          this.isMoreTrips = e.isMoreTrips
+          this.isMoreTrips = e.isMoreTrips;
         }
       });
-      this.dialogVisible = true
+      this.dialogVisible = true;
     },
-    closePurOrder1(){
-      this.axios.post("/api/v1/bp/closePurOrderMoreTrips?purchaseOrderNo=" + this.inputPurOrder).then((res) =>{
-        console.log(res)
-        if(res.data.code == '200'){
-          this.$message.success("关闭成功")
-        }else{
-          this.$message.error(res.data.data)
-        }
-      })
-      this.dialogVisible = false
+    closePurOrder1() {
+      this.axios
+        .post(
+          "/api/v1/bp/closePurOrderMoreTrips?purchaseOrderNo=" +
+            this.inputPurOrder
+        )
+        .then((res) => {
+          console.log(res);
+          if (res.data.code == "200") {
+            this.$message.success("关闭成功");
+          } else {
+            this.$message.error(res.data.data);
+          }
+        });
+      this.dialogVisible = false;
     },
     func(res) {
       this.purOrderList = res.list;
@@ -260,12 +325,12 @@ export default {
     },
     issue() {
       let mapvalue = {
-        mapList: this.mapList
+        mapList: this.mapList,
       };
       this.axios.post("/api/v1/oms/dispatchOrder", mapvalue).then(() => {
         this.$message({
           type: "success",
-          message: "下发成功!"
+          message: "下发成功!",
         });
         this.option1.requestUrl =
           "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&i=" +
@@ -275,19 +340,19 @@ export default {
     // 下发
     sendClick(orderId) {
       let mapvalue = {
-        mapList: [{ orderId: orderId }]
+        mapList: [{ orderId: orderId }],
       };
       this.$confirm("是否下发", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true
+        center: true,
       })
         .then(() => {
           this.axios.post("/api/v1/oms/dispatchOrder", mapvalue).then(() => {
             this.$message({
               type: "success",
-              message: "下发成功!"
+              message: "下发成功!",
             });
             this.getRequestUrl();
           });
@@ -295,7 +360,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!"
+            message: "取消下发!",
           });
         });
     },
@@ -305,17 +370,17 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true
+        center: true,
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "删除成功!"
+            message: "删除成功!",
           });
           this.axios
             .post("/api/v1/oms/deleteOrder", {
               orderId: orderId,
-              capacityNumber: capacityNumber
+              capacityNumber: capacityNumber,
             })
             .then(() => {
               this.getRequestUrl();
@@ -324,7 +389,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!"
+            message: "取消删除!",
           });
         });
     },
@@ -335,8 +400,8 @@ export default {
     //修改
     updateClick(orderId) {
       this.$router.push("/transportReserveFuEdit/" + orderId);
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 238 - 74
src/views/TMS/components/importedIngredients/truckDriverReceiveFu.vue

@@ -9,16 +9,32 @@
         clearable
       >
       </el-input>
+      <span class="text">下发时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</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>
-      <el-button type="primary" class="btn" @click="clickClose" v-if="activeName == 'option'">
+      <el-button
+        type="primary"
+        class="btn"
+        @click="clickClose"
+        v-if="activeName == 'option'"
+      >
         <i class="el-icon-close"></i>关闭
       </el-button>
     </div>
     <el-tabs v-model="activeName">
       <el-tab-pane label="未接收" name="option">
-        <dilTable v-bind.sync="option" @selection-change="selectionChange"> </dilTable>
+        <dilTable v-bind.sync="option" @selection-change="selectionChange">
+        </dilTable>
       </el-tab-pane>
       <el-tab-pane label="已接收" name="first">
         <dilTable v-bind.sync="option1"> </dilTable>
@@ -32,116 +48,264 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
     return {
+      startTime: null,
+      endTime: null,
       input: "",
       Time: "",
       activeName: "option",
       option: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
         selectionType: "select",
       },
       option1: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
       },
-      list:[],
+      list: [],
     };
   },
-  watch:{
-    activeName(val){
+  watch: {
+    activeName(val) {
       if (getCookie("orgCode") == "chengyunshang") {
-        if(val == "option"){
-          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
-        }else if(val == "first"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
-        }else if(val == "second"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
+        if (val == "option") {
+          this.option.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
+        } else if (val == "first") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
+        } else if (val == "second") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
         }
-      }else{
-        if(val == "option"){
-          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&i="+new Date()+"&carrierSSOId=" + null;
-        }else if(val == "first"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&i="+new Date()+"&carrierSSOId=" + null;
-        }else if(val == "second"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&i="+new Date()+"&carrierSSOId=" + null;
+      } else {
+        if (val == "option") {
+          this.option.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            null;
+        } else if (val == "first") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            null;
+        } else if (val == "second") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            null;
         }
       }
-      
-    }
+    },
   },
   created() {
     //判断是否是承运商
     if (getCookie("orgCode") == "chengyunshang") {
-      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&carrierSSOId=" + getCookie("userId");
-      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&carrierSSOId=" + getCookie("userId");
-      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&carrierSSOId=" + getCookie("userId");
+      this.option.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&carrierSSOId=" +
+        getCookie("userId");
+      this.option1.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&carrierSSOId=" +
+        getCookie("userId");
+      this.option2.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&carrierSSOId=" +
+        getCookie("userId");
     } else {
-      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&carrierSSOId=" + null;
-      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&carrierSSOId=" + null;
-      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&carrierSSOId=" + null;
+      this.option.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&carrierSSOId=" +
+        null;
+      this.option1.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&carrierSSOId=" +
+        null;
+      this.option2.requestUrl =
+        "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&carrierSSOId=" +
+        null;
     }
   },
   methods: {
-    getRequestUrl(){
+    getRequestUrl() {
       //判断是否是承运商
-    if (getCookie("orgCode") == "chengyunshang") {
-      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
-      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
-      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
-    } else {
-      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&carrierSSOId=" + null +"&i="+new Date();
-      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&carrierSSOId=" + null +"&i="+new Date();
-      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&carrierSSOId=" + null +"&i="+new Date();
-    }
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.option.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.option1.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+      } else {
+        this.option.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+        this.option1.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+      }
     },
     onclick() {
-    if (getCookie("orgCode") == "chengyunshang") {
-       if(this.activeName == "option"){
-        this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
-      }else if (this.activeName == "first") {
-        this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=5&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
-      } else if (this.activeName == "second") {
-        this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
-      }
-    }else{
-      if(this.activeName == "option"){
-        this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
-      }else if (this.activeName == "first") {
-        this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=5&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
-      } else if (this.activeName == "second") {
-        this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
+      if (getCookie("orgCode") == "chengyunshang") {
+        if (this.activeName == "option") {
+          this.option.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&con=" +
+            this.input +
+            "&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
+        } else if (this.activeName == "first") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=5&con=" +
+            this.input +
+            "&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
+        } else if (this.activeName == "second") {
+          this.option2.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&con=" +
+            this.input +
+            "&i=" +
+            new Date() +
+            "&carrierSSOId=" +
+            getCookie("userId");
+        }
+      } else {
+        let startTime = null;
+        let endTime = null;
+        if (this.startTime) {
+          startTime = sjTime(this.startTime);
+        }
+        if (this.endTime) {
+          endTime = sjTime(this.endTime);
+        }
+        if (startTime && endTime) {
+          if (startTime < endTime) {
+            if (this.activeName == "option") {
+              this.option.requestUrl =
+                "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&con=" +
+                this.input +
+                "&i=" +
+                new Date() +
+                "&carrierSSOId=" +
+                null +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+            } else if (this.activeName == "first") {
+              this.option1.requestUrl =
+                "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=5&con=" +
+                this.input +
+                "&i=" +
+                new Date() +
+                "&carrierSSOId=" +
+                null +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+            } else if (this.activeName == "second") {
+              this.option2.requestUrl =
+                "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&con=" +
+                this.input +
+                "&i=" +
+                new Date() +
+                "&carrierSSOId=" +
+                null +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+            }
+          }
+        } else {
+          if (this.activeName == "option") {
+            this.option.requestUrl =
+              "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&con=" +
+              this.input +
+              "&i=" +
+              new Date() +
+              "&carrierSSOId=" +
+              null;
+          } else if (this.activeName == "first") {
+            this.option1.requestUrl =
+              "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=5&con=" +
+              this.input +
+              "&i=" +
+              new Date() +
+              "&carrierSSOId=" +
+              null;
+          } else if (this.activeName == "second") {
+            this.option2.requestUrl =
+              "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&con=" +
+              this.input +
+              "&i=" +
+              new Date() +
+              "&carrierSSOId=" +
+              null;
+          }
+        }
       }
-    }
-      
     },
-    clickClose(){
-      console.log(this.list)
-      if(this.list.length == 0){
-        this.$message.warning('请选择订单之后在关闭')
-      }else{
-        this.axios.post('/api/v1/oms/deleteOrders',{list:this.list}).then((res)=>{
-          if(res.data.code == "200"){
-            this.$message.success('关闭成功')
-            this.getRequestUrl()
-          }
-        })
+    clickClose() {
+      console.log(this.list);
+      if (this.list.length == 0) {
+        this.$message.warning("请选择订单之后在关闭");
+      } else {
+        this.axios
+          .post("/api/v1/oms/deleteOrders", { list: this.list })
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$message.success("关闭成功");
+              this.getRequestUrl();
+            }
+          });
       }
-
     },
-    selectionChange(selection){
-      this.list = [],
-      selection.forEach(e => {
-        this.list.push(e.orderId)
-      });
-    }
+    selectionChange(selection) {
+      (this.list = []),
+        selection.forEach((e) => {
+          this.list.push(e.orderId);
+        });
+    },
   },
 };
 </script>

+ 51 - 8
src/views/TMS/components/importedIngredients/truckJiMaoFuResult.vue

@@ -2,22 +2,39 @@
   <!-- 辅料计毛实绩页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <el-input
+        placeholder="请输入内容"
+        class="input"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+      <span class="text">计毛时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</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>
     </div>
-    <dilTable v-bind.sync="option">
-      
-    </dilTable>
+    <dilTable v-bind.sync="option"> </dilTable>
   </div>
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
+      startTime: null,
+      endTime: null,
       restaurants: [],
       input: "",
       option: {
@@ -29,16 +46,42 @@ export default {
 
   methods: {
     onclick() {
-     this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=102&orderType=5&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) {
+        if (startTime < endTime) {
+          this.option.requestUrl =
+            "/api/v1/tms/getAllJiMaoResult?apiId=102&orderType=5&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+        }
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getAllJiMaoResult?apiId=102&orderType=5&con=" +
+          this.input +
+          "&i=" +
+          new Date();
+      }
     },
-   }
+  },
 };
 </script>
 <style lang='scss'>
 .homeworkPath {
-   .top {
+  .top {
     padding: 40px;
-    .input{
+    .input {
       width: 250px;
       margin-right: 10px;
     }

+ 53 - 9
src/views/TMS/components/importedIngredients/truckJiPiFuResult.vue

@@ -2,22 +2,39 @@
   <!-- 辅料计皮实绩页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <el-input
+        placeholder="请输入内容"
+        class="input"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+      <span class="text">计皮时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</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>
     </div>
-    <dilTable v-bind.sync="option">
-      
-    </dilTable>
+    <dilTable v-bind.sync="option"> </dilTable>
   </div>
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
+      startTime:null,
+      endTime:null,
       restaurants: [],
       input: "",
       option: {
@@ -28,18 +45,45 @@ export default {
   },
 
   methods: {
-
     onclick() {
-     this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=146&orderType=5&con=" + this.input;
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+        // console.log("startTime", startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+        // console.log("endTime", endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          this.option.requestUrl =
+            "/api/v1/tms/getAllJiPiResult?apiId=146&orderType=5&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+        }
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getAllJiPiResult?apiId=146&orderType=5&con=" +
+          this.input +
+          "&i=" +
+          new Date();
+      }
     },
-   }
+  },
 };
 </script>
 <style lang='scss'>
 .homeworkPath {
-   .top {
+  .top {
     padding: 40px;
-    .input{
+    .input {
       width: 250px;
       margin-right: 10px;
     }

+ 63 - 10
src/views/TMS/components/importedIngredients/truckQualityFuResult.vue

@@ -2,17 +2,35 @@
   <!-- 辅料质检作业 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <el-input
+        placeholder="请输入内容"
+        class="input"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+      <span class="text">质检时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</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>
-
     </div>
-    
     <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" width="50">
         <template slot-scope="scope">
-          <el-button @click="updateClick(scope.row.resultId)" type="text" size="small">
+          <el-button
+            @click="updateClick(scope.row.resultId)"
+            type="text"
+            size="small"
+          >
             修改
           </el-button>
         </template>
@@ -22,36 +40,71 @@
 </template>
 
 
+
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "wagonPlease",
   data() {
     return {
+      startTime: null,
+      endTime: null,
       status: "",
       input: "",
-      option: {       
+      option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getQualityResult?apiId=150&orderType=5",
+        requestUrl: "/api/v1/tms/getQualityResult?apiId=150&orderType=5&i="+new Date(),
       },
     };
   },
 
   methods: {
     onclick() {
-         this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=150&orderType=5&con=" + this.input;
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+        // console.log("startTime", startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+        // console.log("endTime", endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          this.option.requestUrl =
+            "/api/v1/tms/getQualityResult?apiId=150&orderType=5&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+        }
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getQualityResult?apiId=150&orderType=5&con=" +
+          this.input +
+          "&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&i=" +
+          new Date();
+      }
     },
     updateClick(resultId) {
       this.$router.push("/truckQualityRanLaoResultEdit/" + resultId);
     },
-    
   },
 };
 </script>
 <style lang='scss'>
 .homeworkPath {
-   .top {
+  .top {
     padding: 40px;
-    .input{
+    .input {
       width: 250px;
       margin-right: 10px;
     }

+ 54 - 8
src/views/TMS/components/importedIngredients/truckReceiptFuResult.vue

@@ -2,24 +2,42 @@
   <!-- 辅料收货作业页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <el-input
+        placeholder="请输入内容"
+        class="input"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+
+      <span class="text">收货时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</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>
     </div>
-    <dilTable v-bind.sync="option">
-      
-    </dilTable>
+    <dilTable v-bind.sync="option"> </dilTable>
   </div>
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
       input: "",
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getReceiveResult?apiId=149&orderType=5",
@@ -28,16 +46,44 @@ export default {
   },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getReceiveResult?apiId=149&orderType=5&con=" + this.input;
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+        // console.log("startTime", startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+        // console.log("endTime", endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          this.option.requestUrl =
+            "/api/v1/tms/getReceiveResult?apiId=149&orderType=5&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+        }
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getReceiveResult?apiId=149&orderType=5&con=" +
+          this.input +
+          "&i=" +
+          new Date();
+      }
     },
-   }
+  },
 };
 </script>
 <style lang='scss'>
 .homeworkPath {
-   .top {
+  .top {
     padding: 40px;
-    .input{
+    .input {
       width: 250px;
       margin-right: 10px;
     }

+ 52 - 7
src/views/TMS/components/importedIngredients/truckUnloadFuResult.vue

@@ -1,8 +1,24 @@
 <template>
   <!-- 卸货实绩页面 -->
   <div class="homeworkPath">
-   <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+    <div class="top">
+      <el-input
+        placeholder="请输入内容"
+        class="input"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+      <span class="text">卸货时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</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>
@@ -12,10 +28,13 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
+      startTime: null,
+      endTime: null,
       restaurants: [],
       input: "",
       option: {
@@ -24,19 +43,45 @@ export default {
       },
     };
   },
- 
+
   methods: {
     onclick() {
-          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=145&orderType=5&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) {
+        if (startTime < endTime) {
+          this.option.requestUrl =
+            "/api/v1/tms/getUnloadResult?apiId=145&orderType=5&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+        }
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getUnloadResult?apiId=145&orderType=5&con=" +
+          this.input +
+          "&i=" +
+          new Date();
+      }
     },
-   }
+  },
 };
 </script>
 <style lang='scss'>
 .homeworkPath {
-   .top {
+  .top {
     padding: 40px;
-    .input{
+    .input {
       width: 250px;
       margin-right: 10px;
     }

+ 89 - 35
src/views/TMS/components/importedMineral/transportAppoint.vue

@@ -9,6 +9,23 @@
         clearable
       >
       </el-input>
+      <!-- 时间查询框 -->
+      <span class="text" v-if="activeName == 'second'">下发时间:</span>
+      <el-date-picker
+        v-if="activeName == 'second'"
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text" v-if="activeName == 'second'">至</span>
+      <el-date-picker
+        v-if="activeName == 'second'"
+        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>
@@ -76,6 +93,7 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
@@ -83,6 +101,8 @@ export default {
       input: "",
       Time: "",
       activeName: "first",
+      startTime: null,
+      endTime: null,
       option1: {
         // 表格请求数据的地址
         requestUrl: "",
@@ -114,26 +134,34 @@ export default {
     }
   },
   methods: {
-    handleClick(){
-      this.getRequestUrl()
+    handleClick() {
+      this.getRequestUrl();
     },
-    getRequestUrl(){
-        //判断是否是承运商
-    if (getCookie("orgCode") == "chengyunshang") {
-      this.option1.requestUrl =
-        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=8&carrierSSOId=" +
-        getCookie("userId") + "&i=" + new Date();
-      this.option2.requestUrl =
-        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=8&carrierSSOId=" +
-        getCookie("userId") + "&i=" + new Date();
-    } else {
-      this.option1.requestUrl =
-        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=8&carrierSSOId=" +
-        null + "&i=" + new Date();
-      this.option2.requestUrl =
-        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=8&carrierSSOId=" +
-        null + "&i=" + new Date();
-    }
+    getRequestUrl() {
+      //判断是否是承运商
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.option1.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=8&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=8&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+      } else {
+        this.option1.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=8&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=8&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+      }
     },
     onclick() {
       if (this.activeName == "first") {
@@ -152,19 +180,45 @@ export default {
             this.input;
         }
       } else {
-        //判断是否是承运商
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.option1.requestUrl =
-            "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=8&carrierSSOId=" +
-            getCookie("userId") +
-            "&con=" +
-            this.input;
-        } else {
-          this.option1.requestUrl =
-            "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=8&carrierSSOId=" +
-            null +
-            "&con=" +
-            this.input;
+        let startTime = null;
+        let endTime = null;
+        if (this.startTime) {
+          startTime = sjTime(this.startTime);
+          // console.log("startTime", startTime);
+        }
+        if (this.endTime) {
+          endTime = sjTime(this.endTime);
+          // console.log("endTime", endTime);
+        }
+        if (startTime && endTime) {
+          if (startTime < endTime) {
+            //判断是否是承运商
+            if (getCookie("orgCode") == "chengyunshang") {
+              this.option1.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=8&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime +
+                "&i=" +
+                new Date();
+            } else {
+              this.option1.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=8&carrierSSOId=" +
+                null +
+                "&con=" +
+                this.input +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime +
+                "&i=" +
+                new Date();
+            }
+          }
         }
       }
     },
@@ -180,7 +234,7 @@ export default {
           type: "success",
           message: "下发成功!",
         });
-        this.getRequestUrl()
+        this.getRequestUrl();
       });
     },
     // 下发
@@ -200,7 +254,7 @@ export default {
               type: "success",
               message: "下发成功!",
             });
-            this.getRequestUrl()
+            this.getRequestUrl();
           });
         })
         .catch(() => {
@@ -229,7 +283,7 @@ export default {
               capacityNumber: capacityNumber,
             })
             .then(() => {
-              this.getRequestUrl()
+              this.getRequestUrl();
             });
         })
         .catch(() => {

+ 61 - 10
src/views/TMS/components/purchaseChemicalMaterials/transportationDispatch.vue

@@ -9,8 +9,18 @@
         clearable
       >
       </el-input>
+      <span class="text">下发时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</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>查询1
+        <i class="el-icon-search"></i>查询
       </el-button>
     </div>
     <el-tabs v-model="activeName">
@@ -28,20 +38,23 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
     return {
       input: "",
       Time: "",
+      startTime: null,
+      endTime: null,
       activeName: "first",
       option1: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
       },
     };
   },
@@ -65,14 +78,52 @@ export default {
   },
   methods: {
     onclick() {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=2&orderStatus=111&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) {
+        if (startTime < endTime) {
+          if (this.activeName == "first") {
+            this.option1.requestUrl =
+              "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=2&orderStatus=111&con=" +
+              this.input +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          } else {
+            this.option2.requestUrl =
+              "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=2&orderStatus=6&con=" +
+              this.input +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          }
+        }
       } else {
-        this.option2.requestUrl =
-          "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=2&orderStatus=6&con=" +
-          this.input;
+        if (this.activeName == "first") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=2&orderStatus=111&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else {
+          this.option2.requestUrl =
+            "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=2&orderStatus=6&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        }
       }
     },
   },

+ 157 - 37
src/views/TMS/components/purchaseChemicalMaterials/transportationReservation.vue

@@ -9,6 +9,22 @@
         clearable
       >
       </el-input>
+      <span class="text" v-if="activeName == 'second'">下发时间:</span>
+      <el-date-picker
+        v-if="activeName == 'second'"
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text" v-if="activeName == 'second'">至</span>
+      <el-date-picker
+        v-if="activeName == 'second'"
+        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>
@@ -76,12 +92,15 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
     return {
       input: "",
       Time: "",
+      startTime: null,
+      endTime: null,
       activeName: "first",
       option1: {
         // 表格请求数据的地址
@@ -95,61 +114,162 @@ export default {
       },
     };
   },
-  watch:{
-    activeName(val){
-      if(val == 'first'){
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" + getCookie("userId")+"&i="+ new Date();
-        }else{
-          this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" + null + "&i="+ new Date();
-        }
-      }else{
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.option2.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" + getCookie("userId") + "&i="+ new Date();
-        }else{
-          this.option2.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" + null + "&i="+ new Date();
-        }
+
+  activeName(val) {
+    if (val == "first") {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.option1.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+      } else {
+        this.option1.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+      }
+    } else {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.option2.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+      } else {
+        this.option2.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
       }
     }
   },
+
   created() {
     //判断是否是承运商
     if (getCookie("orgCode") == "chengyunshang") {
-      this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" + getCookie("userId");
-      this.option2.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" + getCookie("userId");
+      this.option1.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" +
+        getCookie("userId");
+      this.option2.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" +
+        getCookie("userId");
     } else {
-      this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" + null;
-      this.option2.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" + null;
+      this.option1.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" +
+        null;
+      this.option2.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" +
+        null;
     }
   },
   methods: {
-    getRequestUrl(){
-       //判断是否是承运商
-    if (getCookie("orgCode") == "chengyunshang") {
-      this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" + getCookie("userId") + "&i=" + new Date();
-      this.option2.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" + getCookie("userId") + "&i=" + new Date();
-    } else {
-      this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" + null + "&i=" + new Date();
-      this.option2.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" + null + "&i=" + new Date();
-    }
+    getRequestUrl() {
+      //判断是否是承运商
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.option1.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+      } else {
+        this.option1.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" +
+          null +
+          "&i=" +
+          new Date();
+      }
     },
     onclick() {
       if (this.activeName == "first") {
         //判断是否是承运商
         if (getCookie("orgCode") == "chengyunshang") {
-          this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" + getCookie("userId") + "&con=" + this.input;
+          this.option1.requestUrl =
+            "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" +
+            getCookie("userId") +
+            "&con=" +
+            this.input;
         } else {
-          this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" + null + "&con=" + this.input;
+          this.option1.requestUrl =
+            "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" +
+            null +
+            "&con=" +
+            this.input;
         }
       } else {
-        //判断是否是承运商
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" + getCookie("userId") + "&con=" + this.input;
-        } else {
-          this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" + null + "&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) {
+          if (startTime < endTime) {
+            //判断是否是承运商
+            if (getCookie("orgCode") == "chengyunshang") {
+              this.option2.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime +
+                "&i=" +
+                new Date();
+            } else {
+              this.option2.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" +
+                null +
+                "&con=" +
+                this.input +
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime +
+                "&i=" +
+                new Date();
+            }
+          } 
+        }else{
+            console.log("我进来了");
+            //判断是否是承运商
+            if (getCookie("orgCode") == "chengyunshang") {
+              this.option2.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input +
+                "&i=" +
+                new Date();
+            } else {
+              this.option2.requestUrl =
+                "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" +
+                null +
+                "&con=" +
+                this.input +
+                "&i=" +
+                new Date();
+            }
         }
       }
     },
+
     selectionChange(selection) {
       this.mapList = selection;
     },
@@ -162,7 +282,7 @@ export default {
           type: "success",
           message: "下发成功!",
         });
-        this.getRequestUrl()
+        this.getRequestUrl();
       });
     },
     // 下发
@@ -182,7 +302,7 @@ export default {
               type: "success",
               message: "下发成功!",
             });
-            this.getRequestUrl()
+            this.getRequestUrl();
           });
         })
         .catch(() => {
@@ -211,7 +331,7 @@ export default {
               capacityNumber: capacityNumber,
             })
             .then(() => {
-              this.getRequestUrl()
+              this.getRequestUrl();
             });
         })
         .catch(() => {