luobang 3 lat temu
rodzic
commit
5041d5b7fb
23 zmienionych plików z 1877 dodań i 476 usunięć
  1. 4 4
      build/utils.js
  2. 52 53
      config/index.js
  3. BIN
      src/assets/img/traffic_texture_darkred-pass.png
  4. 95 31
      src/views/TMS/components/importedFuel/transportReserveRan.vue
  5. 238 73
      src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue
  6. 120 55
      src/views/TMS/components/importedIngredients/transportReserveFu.vue
  7. 238 74
      src/views/TMS/components/importedIngredients/truckDriverReceiveFu.vue
  8. 51 8
      src/views/TMS/components/importedIngredients/truckJiMaoFuResult.vue
  9. 53 9
      src/views/TMS/components/importedIngredients/truckJiPiFuResult.vue
  10. 63 10
      src/views/TMS/components/importedIngredients/truckQualityFuResult.vue
  11. 54 8
      src/views/TMS/components/importedIngredients/truckReceiptFuResult.vue
  12. 52 7
      src/views/TMS/components/importedIngredients/truckUnloadFuResult.vue
  13. 89 35
      src/views/TMS/components/importedMineral/transportAppoint.vue
  14. 61 10
      src/views/TMS/components/purchaseChemicalMaterials/transportationDispatch.vue
  15. 157 37
      src/views/TMS/components/purchaseChemicalMaterials/transportationReservation.vue
  16. 6 1
      src/views/appoint/components/ship/addDeliveryAttorney.vue
  17. 33 13
      src/views/appoint/components/ship/addDeliveryNotice.vue
  18. 118 24
      src/views/appoint/components/ship/modifyDeliveryNotice.vue
  19. 9 3
      src/views/sale/components/offSiteTransportation/checkGPS.vue
  20. 81 18
      src/views/sale/components/offSiteTransportation/currentLocation.vue
  21. 11 3
      src/views/sale/components/offSiteTransportation/mapTest.vue
  22. 292 0
      src/views/sale/components/offSiteTransportation/paintVertexTest.vue
  23. BIN
      static/img/traffic_texture_darkred-pass.png

+ 4 - 4
build/utils.js

@@ -14,12 +14,12 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 //    登录     合同                       首页       内转     排队   资源   销售                       零星物资
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
-//  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
+//  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 // let devModules = ['index','inward']
+// let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS','WMS']
+let devModules = ["all"];
 // let devModules = ['index','TMS']
-// let devModules = ["index", "appoint", "sale", "statisticalReport"];
-let devModules = ["index", "SporadicManage", "statisticalReport"];
-// let devModules = ["index", "statisticalReport", "inward", "TMS", "appoint"];
+// let devModules = ['index','statisticalReport','inward']
 if (pathSrc.indexOf("node_modules") > -1) {
   devModules = require("../../../cors.js").devModules;
 }

+ 52 - 53
config/index.js

@@ -1,55 +1,54 @@
-"use strict";
+'use strict'
 // Template version: 1.3.1
 // see http://vuejs-templates.github.io/webpack for documentation.
 
-const path = require("path");
+const path = require('path')
 
-const pathSrc = path.resolve(__dirname, "../src");
+const pathSrc = path.resolve(__dirname, '../src');
 
 let proxyTable = {
-  "/icore.icp.web/pass/v1/sysusers/user/token": {
-    //https://portal.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token
+  '/icore.icp.web/pass/v1/sysusers/user/token': {  //https://portal.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token
     //target: 'https://portal-dev.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token',
-    target: "http://172.16.33.166:9001/v1/sysusers/user/token",
+    target:'http://172.16.33.166:9001/v1/sysusers/user/token',
     changeOrigin: true,
     pathRewrite: {
-      "^/icore.icp.web/pass/v1/sysusers/user/token": "/"
+      '^/icore.icp.web/pass/v1/sysusers/user/token': '/'
     }
   },
-  "/icore.icp.web/pass/v1": {
+  '/icore.icp.web/pass/v1': {
     //target: 'http://172.16.33.161:80/v1', //加http
-    target: "http://172.16.33.166:9001/v1",
+    target: 'http://172.16.33.166:9001/v1',
     changeOrigin: true,
     pathRewrite: {
-      "^/icore.icp.web/pass/v1": "/" //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
+      '^/icore.icp.web/pass/v1': '/' //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
       // 比如我要调用'http://0.0:300/user/add',直接写‘/api/user/add’即可 代理后地址栏显示/
     }
   },
-  "/icore.icp.web/pass/auth/login": {
-    //target: 'http://sso-dev.steerinfo.com/icore.icp.web/pass/auth/login',
-    target: "http://172.16.33.166:9001/auth/login",
+   '/icore.icp.web/pass/auth/login': {
+     //target: 'http://sso-dev.steerinfo.com/icore.icp.web/pass/auth/login',
+     target: 'http://172.16.33.166:9001/auth/login',
+     changeOrigin: true,
+     pathRewrite: {
+       '^/icore.icp.web/pass/auth/login': ''
+     }
+   },
+   '/icore-api': {
+    target: 'http://172.16.33.166:9001',
     changeOrigin: true,
     pathRewrite: {
-      "^/icore.icp.web/pass/auth/login": ""
+      '^/icore-api': '/'
     }
   },
-  "/icore-api": {
-    target: "http://172.16.33.166:9001",
+  '/icore.icp.web/pass/act': {
+    target: 'http://172.16.33.166:8095',
     changeOrigin: true,
     pathRewrite: {
-      "^/icore-api": "/"
-    }
-  },
-  "/icore.icp.web/pass/act": {
-    target: "http://172.16.33.166:8095",
-    changeOrigin: true,
-    pathRewrite: {
-      "^/icore.icp.web/pass/act": "/"
+      '^/icore.icp.web/pass/act': '/'
     }
   },
   // 表格表单请求的域名地址
   "/api/v1/cd": {
-    target: "http://172.16.33.166:80",
+    target: "http://172.16.33.161:8083",
     ws: true,
     pathRewrite: {
       "^/api/v1/cd": "/api/v1/cd"
@@ -65,46 +64,45 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:80",
-    // target: "http://192.168.1.107:8080",
-    // target: "http://localhost:8080",
+    target: "http://localhost:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"
     }
   },
   "/views/api/v1": {
-    target: "http://172.16.33.166:80",
+    target: "http://localhost:8080",
+    // target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {
       "^/views/api/v1": "/api/v1"
     }
   },
-  "/icore.icp.web/pass/logout": {
-    target: "http://172.16.33.166:9001/logout",
+  '/icore.icp.web/pass/logout': {
+    target: 'http://172.16.33.166:9001/logout',
     changeOrigin: true,
     pathRewrite: {
-      "^/icore.icp.web/pass/logout": "/"
+      '^/icore.icp.web/pass/logout': '/'
+    }
+  },
+}
+let dist = '../dist';
+if (pathSrc.indexOf('node_modules') > -1) {
+    dist = '../../../dist';
+    let proxyTableGet = require('../../../cors.js').proxyTable;
+    for (let i in proxyTableGet) {
+        proxyTable[i] = proxyTableGet[i]
     }
-  }
-};
-let dist = "../dist";
-if (pathSrc.indexOf("node_modules") > -1) {
-  dist = "../../../dist";
-  let proxyTableGet = require("../../../cors.js").proxyTable;
-  for (let i in proxyTableGet) {
-    proxyTable[i] = proxyTableGet[i];
-  }
 }
 
 module.exports = {
-  dev: {
-    // Paths
-    assetsSubDirectory: "static",
-    assetsPublicPath: "/",
-    proxyTable: proxyTable,
+    dev: {
+      // Paths
+      assetsSubDirectory: 'static',
+      assetsPublicPath: '/',
+      proxyTable: proxyTable,
     // Various Dev Server settings
-    host: "localhost", // can be overwritten by process.env.HOST
+    host: 'localhost', // can be overwritten by process.env.HOST
     port: 8802, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,
@@ -141,14 +139,15 @@ module.exports = {
     }
   },
 
+  
   build: {
     // Template for index.html
-    index: path.resolve(__dirname, dist + "/index.html"),
+    index: path.resolve(__dirname, dist + '/index.html'),
 
     // Paths
     assetsRoot: path.resolve(__dirname, dist),
-    assetsSubDirectory: "static", // 打包后 static放的位置
-    assetsPublicPath: "../", // html中webpack打包的JS -> ../static/xxx.js
+    assetsSubDirectory: 'static', // 打包后 static放的位置
+    assetsPublicPath: '../', // html中webpack打包的JS -> ../static/xxx.js
 
     /**
      * Source Maps
@@ -156,14 +155,14 @@ module.exports = {
 
     productionSourceMap: false,
     // https:       //webpack.js.org/configuration/devtool/#production
-    devtool: "#source-map",
+    devtool: '#source-map',
 
     // Gzip off by default as many popular static hosts such as
     // Surge or Netlify already gzip all static assets for you.
     // Before setting to `true`, make sure to:
     // npm install --save-dev compression-webpack-plugin
     productionGzip: false,
-    productionGzipExtensions: ["js", "css"],
+    productionGzipExtensions: ['js', 'css'],
 
     // Run the build command with an extra argument to
     // View the bundle analyzer report after build finishes:
@@ -171,4 +170,4 @@ module.exports = {
     // Set to `true` or `false` to always turn it on or off
     bundleAnalyzerReport: process.env.npm_config_report
   }
-};
+}

BIN
src/assets/img/traffic_texture_darkred-pass.png


+ 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(() => {

+ 6 - 1
src/views/appoint/components/ship/addDeliveryAttorney.vue

@@ -82,7 +82,10 @@ export default {
       attorneyTime: new Date()
     };
   },
-  mounted() {},
+  mounted() {
+     this.$set(this.form1, "requesterGroupId", 1); //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
+     this.$set(this.form1, "carrierId", 11);
+  },
   methods: {
     getPersonInfo() {
       console.log(this.form1);
@@ -132,6 +135,8 @@ export default {
         return;
       }
       let AmsshipDeliveryAttorney = {
+        carrierId: this.form1.carrierId, //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
+        requesterGroupId: this.form1.requesterGroupId,
         downSwimPortId: this.form1.downSwimPortId,
         attorenyPickupIdcard: this.form1.attorenyPickupIdcard,
         attorneyContactTelephone: this.form1.attorneyContactTelephone,

+ 33 - 13
src/views/appoint/components/ship/addDeliveryNotice.vue

@@ -9,15 +9,14 @@
         >浏览</el-button
       >
     </div> -->
-    <!-- 货权转移送达单位 -->
+    <!-- 货权转移送达单位 
     <div class="mofrom">
       <span class="motext">货权转移送达单位</span>
       <el-input class="moinput" v-model="cargo" disabled> </el-input>
       <el-button class="mobutton" type="primary" @click="ondrawer(2)"
         >浏览</el-button
       >
-    </div>
-
+    </div>-->
     <!--大品类 -->
     <div class="mofrom">
       <span class="motext">大品类</span>
@@ -125,6 +124,7 @@
           class="upload-demo"
           style="width: 270px"
           ref="upload1"
+          accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
           action="/api/v1/rms/uploadCarrier1"
           :before-upload="beforeUpload"
           :multiple="false"
@@ -180,7 +180,6 @@ export default {
       shippingCertificate: "",
      
       materialType: "",
-      cargo: "",
       receiver: "",
       input: "",
       drawer: false,
@@ -219,8 +218,8 @@ export default {
     };
   },
   mounted() {
-    this.$set(this.form1, "requesterGroupId", 1);
-    this.$set(this.form1, "carrierId", 11);
+    // this.$set(this.form1, "requesterGroupId", 1); //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
+    // this.$set(this.form1, "carrierId", 11);
   },
   methods: {
     upCLick(val) {
@@ -314,10 +313,10 @@ export default {
       //   this.$message.warning("请选择物资");
       //   return;
       // }
-      if (this.second1.mapList2.length == 0) {
-        this.$message.warning("请选择送达单位");
-        return;
-      }
+      // if (this.second1.mapList2.length == 0) {
+      //   this.$message.warning("请选择送达单位");
+      //   return;
+      // }
       if (this.second2.mapList3.length == 0) {
         this.$message.warning("请选择收货人");
         return;
@@ -346,8 +345,8 @@ export default {
       //电话号码赋值
       var val2 = this.value2;
       let map = {
-        carrierId: this.form1.carrierId,
-        requesterGroupId: this.form1.requesterGroupId,
+        // carrierId: this.form1.carrierId, //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
+        // requesterGroupId: this.form1.requesterGroupId,
         noticeCommerceMethod: this.form1.noticeCommerceMethod,
         noticeHandoverMethod: this.form1.noticeHandoverMethod,
         portId: this.form1.portId,
@@ -397,7 +396,7 @@ export default {
         map.resultContactPerson == null ||
         map.resultTelephoneFax == null ||
         map.resultNumberOfLoans == null ||
-        map.carrierId == null ||
+       //map.carrierId == null ||
         map.groupId == null ||
         map.inFactoryShipName == null ||
         map.isNeedPortDisCharge == null ||
@@ -412,6 +411,27 @@ export default {
         this.$message.warning("电话号码或传真格式不正确");
         return;
       }
+      if (
+        typeof map.noticePortConstructionFee != "undefined" &&
+        !isNumber(map.noticePortConstructionFee)
+      ) {
+        this.$message.error("港建费金额得为数字");
+        return;
+      }
+      if (
+        typeof map.purchaseContractMoisture != "undefined" &&
+        !isNumber(map.purchaseContractMoisture)
+      ) {
+        this.$message.error("合同水分得为数字");
+        return;
+      }
+      if (
+        typeof map.noticePortConstructionFee != "undefined" &&
+        !isNumber(map.noticePortConstructionFee)
+      ) {
+        this.$message.error("港建费金额得为数字");
+        return;
+      }
       if (
         typeof map.noticePileFreeDays != "undefined" &&
         !isNumber(map.noticePileFreeDays)

+ 118 - 24
src/views/appoint/components/ship/modifyDeliveryNotice.vue

@@ -3,14 +3,14 @@
   <div class="shipTransport">
     <page-title>返回</page-title>
 
-    <!-- 货权转移送达单位 -->
+    <!-- 货权转移送达单位 
     <div class="mofrom">
       <span class="motext">货权转移送达单位</span>
       <el-input class="moinput" v-model="cargo" disabled> </el-input>
       <el-button class="mobutton" type="primary" @click="ondrawer(2)"
         >浏览</el-button
       >
-    </div>
+    </div>-->
 
     <!--大品类 -->
     <div class="mofrom">
@@ -151,7 +151,7 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime } from "@/utils/sharedJsFile";
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
@@ -320,8 +320,8 @@ export default {
     onClickConfirm() {
       let map = {
         noticeId: this.$route.params.noticeId,
-        carrierId: this.form1.carrierId,
-        requesterGroupId: this.form1.requesterGroupId,
+        // carrierId: this.form1.carrierId,
+        // requesterGroupId: this.form1.requesterGroupId,
         noticeCommerceMethod: this.form1.noticeCommerceMethod,
         noticeHandoverMethod: this.form1.noticeHandoverMethod,
         portId: this.form1.portId,
@@ -354,26 +354,120 @@ export default {
         cargoPictureUrl: this.cargoPictureUrl,
         userId: getCookie("userId"),
       };
+      //判断是否为电话号码
+      function isTelePhone() {
+        var value2 = map.resultTelephoneFax;
+        //验证是否为数字
+        var patrn = /^1[3-9]\d{9}$/;
+        // var patrn2 = /^(\d{3,4}-)?\d{7,8}$/;
+        if (patrn.exec(value2) == null || value2 == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      var val = this.value;
+       if (
+        map.noticeCommerceMethod == null ||
+        map.noticeHandoverMethod == null ||
+        map.noticePortConstructionFee == null ||
+        map.noticeDeliveryTime == null ||
+        map.noticePileFreeDays == null ||
+        map.purchaseContractUnitPrice == null ||
+        map.purchaseContractMoisture == null ||
+        map.tfeContent == null ||
+        map.silicaContent == null ||
+        map.aluminaContent == null ||
+        map.phosphorusContent == null ||
+        map.manganeseContent == null ||
+        map.resultContactPerson == null ||
+        map.resultTelephoneFax == null ||
+        map.resultNumberOfLoans == null ||
+        //map.carrierId == null ||
+        //map.groupId == null ||
+        map.inFactoryShipName == null ||
+        map.isNeedPortDisCharge == null ||
+        map.isNeedPortFee == null
+        // map.foreignShipName==null||
+        // map.materialId==null
+      ) {
+        this.$message.error("存在空值!");
+        return;
+      }
+      if (!isTelePhone(val)) {
+        this.$message.warning("电话号码或传真格式不正确");
+        return;
+      }
+      if (
+        typeof map.noticePortConstructionFee != "undefined" &&
+        !isNumber(map.noticePortConstructionFee)
+      ) {
+        this.$message.error("港建费金额得为数字");
+        return;
+      }
+      if (
+        typeof map.purchaseContractMoisture != "undefined" &&
+        !isNumber(map.purchaseContractMoisture)
+      ) {
+        this.$message.error("合同水分得为数字");
+        return;
+      }
+      if (
+        typeof map.noticePortConstructionFee != "undefined" &&
+        !isNumber(map.noticePortConstructionFee)
+      ) {
+        this.$message.error("港建费金额得为数字");
+        return;
+      }
+      if (
+        typeof map.noticePileFreeDays != "undefined" &&
+        !isNumber(map.noticePileFreeDays)
+      ) {
+        this.$message.error("免堆天数得为数字");
+        return;
+      }
 
-      // function isNumber() {
-      //   var value = AmsshipCargoTransferResult.resultTelephoneFax;
-      //   //验证是否为数字
-      //   var patrn = /^(-)?\d+(\.\d+)?$/;
-      //   if (patrn.exec(value) == null || value == "") {
-      //     return false;
-      //   } else {
-      //     return true;
-      //   }
-      // }
-      // var val = this.value;
-      // if (
-      //   AmsshipCargoTransferResult.resultTelephoneFax==null||
-      //   AmsshipCargoTransferResult.resultContactPerson==null
-      // ) this.$message.error("存在空值!");
-      // else
-      // if (!isNumber(val)) this.$message.error("联系电话必须是数字!");
-      // else
-
+      if (
+        typeof map.purchaseContractUnitPrice != "undefined" &&
+        !isNumber(map.purchaseContractUnitPrice)
+      ) {
+        this.$message.error("单价得为数字");
+        return;
+      }
+      if (typeof map.tfeContent != "undefined" && !isNumber(map.tfeContent)) {
+        this.$message.error("tfe含量得为数字");
+        return;
+      }
+      if (
+        typeof map.silicaContent != "undefined" &&
+        !isNumber(map.silicaContent)
+      ) {
+        this.$message.error("二氧化硅含量得为数字");
+        return;
+      }
+      if (
+        typeof map.aluminaContent != "undefined" &&
+        !isNumber(map.aluminaContent)
+      ) {
+        this.$message.error("氧化铝含量得为数字");
+        return;
+      }
+      if (
+        typeof map.phosphorusContent != "undefined" &&
+        !isNumber(map.phosphorusContent)
+      ) {
+        this.$message.error("含磷量得为数字");
+        return;
+      }
+      if (
+        typeof map.resultNumberOfLoans != "undefined" &&
+        !isNumber(map.resultNumberOfLoans)
+      ) {
+        this.$message.error("放货数量得为数字");
+        return;
+      } else{
+        
+      }
       this.axios.post("/api/v1/tms/editDeliveryNotice", map).then((res) => {
         if (res.data.code == "200") {
           this.$message({

+ 9 - 3
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -448,6 +448,7 @@ export default {
         if (status === "complete" && result.info === "OK") {
           that.endPointName = result.regeocode.formattedAddress;
           setInterval(
+            //设置自定义窗体
             that.initCustomMarkes(
               that.carNumber,
               that.formatDate(that.time[0], "yyyy-MM-dd") +
@@ -460,7 +461,12 @@ export default {
                 that.endPointName +
                 "<br/>" +
                 "距离:" +
-                that.listPath[0].miled,
+                that.listPath[0].miled+
+                "<br/>" +
+                "时间范围:" +
+                that.formatDate(that.time[0],"yyyy-MM-dd hh:mm")+"至"+that.formatDate(that.time[1],"yyyy-MM-dd hh:mm") +
+                "<br/>"
+                ,
               lnglatXY[0],
               lnglatXY[1]
             ),
@@ -500,7 +506,7 @@ export default {
         })
         .then(res => {
           if (res.data.data == "-1") {
-            this.$message.error("自提车辆无权查看!");
+            this.$message.error("运输订单未关闭,自提车辆无权查看!");
           } else if (res.data.data.startAndEndRoutes != "") {
             that.listPath = res.data.data.startAndEndRoutes;
             that.initMap([105.602725, 37.076636]);
@@ -580,7 +586,7 @@ export default {
       let that = this;
       //自定义窗体内容
       var content = [
-        "<div  style='top:1px;width: 180px; background-color:  rgba(22, 160, 133, 1);' ><font color='white'>" +
+        "<div  style='top:1px;width: 200px; background-color:  rgba(22, 160, 133, 1);' ><font color='white'>" +
           title +
           "</font>",
         "<div style='background-color:rgba(22, 160, 133, 1);'><font color='white'>" +

+ 81 - 18
src/views/sale/components/offSiteTransportation/currentLocation.vue

@@ -62,12 +62,17 @@ export default {
     return {
       //查询车牌号
       carNumber: "",
+      //开始时间和结束时间
+      startTime:"",
+      endTime:"",
       //地图组件
       map: null,
-      path: [],
-      pointmarker: null,
+      path:[],
+      pointmarker:null,
       //定时器
-      timer: null
+      timer: null,
+      //是否关闭信息窗体
+      infoClose:false
     };
   },
   created() {
@@ -108,26 +113,22 @@ export default {
               "现在所在位置"
             );
             //给路径加点
-            let point = new AMap.LngLat(
-              res.data.data.result.lon,
-              res.data.data.result.lat
-            );
-            if (
-              that.path.length <= 0 ||
-              !that.path[that.path.length - 1].equals(point)
-            ) {
+            let point=new AMap.LngLat(res.data.data.result.lon, res.data.data.result.lat);
+            if(that.path.length<=0 || !that.path[that.path.length-1].equals(point)){
               that.path.push(point);
             }
             console.log(that.path);
             //初始化轨迹
             that.initPolyline();
             //显示窗体
-            that.initCustomMarkes(
-              that.carNumber,
-              res.data.data.result.adr,
-              res.data.data.result.lon,
-              res.data.data.result.lat
-            );
+            if( this.infoClose==false){
+              that.initCustomMarkes(
+                that.carNumber,
+                res.data.data.result.adr,
+                res.data.data.result.lon,
+                res.data.data.result.lat
+              );
+            }
             this.lon = res.data.data.result.lon;
             this.lat = res.data.data.result.lat;
           } else {
@@ -169,6 +170,65 @@ export default {
       that.pointmarker = pointmarker;
       that.map.add(pointmarker);
     },
+    //初始化轨迹
+    initPolyline() {
+      let that = this;
+      // 创建一个 Polyline 实例:
+      var polyline = new AMap.BezierCurve({
+            path: that.path,  
+            borderWeight: 2, // 线条宽度,默认为 1
+            strokeColor: '#18BFA6', // 线条颜色
+            lineJoin: 'round' ,// 折线拐点连接处样式
+      });
+      // 将创建的线路添加到已有的线路中去:
+      that.map.add(polyline);
+    },
+    //时间格式转换
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
+      }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": date.getHours(),
+        "m+": date.getMinutes(),
+        "s+": date.getSeconds()
+      };
+      for (let k in o) {
+        if (new RegExp(`(${k})`).test(fmt)) {
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : ("00" + str).substr(str.length)
+          );
+        }
+      }
+      return fmt;
+    },
+    //定时取得当前位置并加入轨迹中去,点击查询时触发,同时清除path和旧的定时器
+    initTimer(){
+      let that=this;
+      //清除旧的定时器
+      clearTimeout(this.timer);
+      that.startTime=that.formatDate(new Date(),"yyyy年MM月dd日 hh:mm:ss");
+      that.endTime=that.formatDate(new Date(),"yyyy年MM月dd日 hh:mm:ss");
+      //清除path
+      that.path=[];
+      //清除所有覆盖物
+      that.map.clearMap();
+      //设置定时器
+      that.timer=setInterval(()=>{
+          //清除之前车的图标
+          that.map.remove(that.pointmarker);
+          that.initData();
+          that.endTime=that.formatDate(new Date(),"yyyy年MM月dd日 hh:mm:ss");
+      },5000);
+    },
+    
 
     //初始化窗体
     initCustomMarkes(title, details, lon, lat) {
@@ -179,7 +239,8 @@ export default {
           title +
           "</font>",
         "<div style='background-color:rgba(22, 160, 133, 1);'><font color='white'>" +
-          details +
+          details + "<br>"+
+        "时间范围:"+that.startTime+"至"+that.endTime+"<br>"+
           "</font></div></div>"
       ];
       // 创建 infoWindow 实例
@@ -192,11 +253,13 @@ export default {
     },
     // 关闭信息窗口
     closeinfo() {
+      this.infoClose=true;
       infoWindow.close();
     },
     openInfo() {
       console.log(this.lon);
       console.log(this.lat);
+      this.infoClose=false;
       infoWindow.open(this.map, [this.lon, this.lat]);
     },
     //初始化轨迹

+ 11 - 3
src/views/sale/components/offSiteTransportation/mapTest.vue

@@ -145,6 +145,8 @@ export default {
       times: 1,
       totalTime: "11",
       speed: 10000,
+      startTime:"",
+      endTime:"",
       //选择停车时长
       parkingTime: null,
       //停车时长选择区间
@@ -472,9 +474,11 @@ export default {
         .then(res => {
           console.log(res.data);
           if (res.data.data == "-1") {
-            this.$message.error("自提车辆无权查看!");
+            this.$message.error("运输订单未关闭的自提车辆无权查看!");
           } else if (res.data.data.startAndEndRoutes != null) {
             that.listPath = res.data.data.startAndEndRoutes;
+            that.startTime=res.data.data.startAndEndRoutes[0].runRoute[0].gtm;
+            that.endTime=res.data.data.startAndEndRoutes[0].runRoute[res.data.data.startAndEndRoutes[0].runRoute.length-1].gtm;
             that.initMap();
           } else {
             that.listPath = [];
@@ -531,7 +535,11 @@ export default {
               that.currentPointName +
               "<br/>" +
               "距离:" +
-              that.listPath[0].miled,
+              that.listPath[0].miled+
+              "<br/>" +
+              "时间范围:" +
+              that.startTime+' 至 '+that.endTime,
+
             lnglatXY[0],
             lnglatXY[1]
           );
@@ -565,7 +573,7 @@ export default {
       let that = this;
       //自定义窗体内容
       var content = [
-        "<div  style='top:1px;width: 180px; background-color: rgba(22, 160, 133, 1);' ><font color='white'>" +
+        "<div  style='top:1px;width: 200px; background-color: rgba(22, 160, 133, 1);' ><font color='white'>" +
           title +
           "</font>",
         "<div style='background-color:(22, 160, 133, 1); ;'><font color='white'>" +

+ 292 - 0
src/views/sale/components/offSiteTransportation/paintVertexTest.vue

@@ -0,0 +1,292 @@
+<template>
+  <div class="container">
+    <div id="amap-container"></div>
+    <div class="controller">
+      <div class="in_transit_information">
+        <span class="item_details">起始点:</span>
+        <el-select v-model="startPoint" style="width: 150px;" class="inputStyle" filterable placeholder="请选择起点">
+          <el-option
+            v-for="item in vertexs"
+            :key="item.vertexId"
+            :label="item.addressName"
+            :value="item.vertexId">
+          </el-option>
+        </el-select>
+        <!--<el-input style="width: 120px;" class="inputStyle" v-model.trim="startPoint"> </el-input>-->
+        <span class="item_details">终点:</span>
+        <el-select v-model="endPoint" style="width: 150px;" class="inputStyle" filterable placeholder="请选择终点">
+         <el-option
+            v-for="item in vertexs"
+            :key="item.vertexId"
+            :label="item.addressName"
+            :value="item.vertexId">
+          </el-option>
+        </el-select>
+        <!--<el-input style="width: 120px;" class="inputStyle" v-model.trim="endPoint"> </el-input>-->
+        <el-button type="primary" class="searchstyle" @click="initData2">查询</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { shallowRef } from "@vue/reactivity";
+import { lazyAMapApiLoaderInstance } from "vue-amap";
+import { sjTime, stringToDate } from "@/utils/sharedJsFile";
+import Slider from "./slider.vue";
+Vue.use(Slider);
+import Vue from "vue";
+export default {
+  name: "PathView",
+  setup() {
+    const map = shallowRef(null);
+    return {
+      map
+    };
+  },
+ 
+  data() {
+    return {
+      lineList:[],
+      startPoint:"",
+      endPoint:"",
+      //地图组件
+      map:null,
+      //顶点
+      vertexs:"",
+    };
+  },
+  created() {
+    let that =this;
+    that.initMap(105.602725,37.076636);
+  },
+  mounted() {},
+  methods: {
+    //初始化数据
+    initData() {
+      let that = this;
+      that.axios
+        .get("/api/v1/otms/mapvertexs/findAllAvailableVertex")
+        .then(res => {
+          console.log(res);
+          that.vertexs=res.data.data;
+          console.log(that.vertexs);
+          that.map.setCenter([res.data.data[0].longitude,res.data.data[0].latitude]);
+          //画车
+          res.data.data.forEach(element => {
+             that.initMarkes( 20,25, require("@/assets/img/end.png"),element.longitude,element.latitude,element.addressName);
+          });
+        });
+          
+    },
+   //查询路线
+   initData2(){
+      let that = this;
+      if(that.lineList!=null){
+        that.map.remove(that.lineList);
+      }
+      that.axios
+        .get("/api/v1/otms/mapvertexs/getObtainTheOptimalPath?startPoint="+that.startPoint+"&endPoint="+that.endPoint)
+        .then(res => {
+          console.log(res);
+          let path=[];
+          res.data.data.forEach((item,index)=>{
+            console.log(item)
+            console.log(item.latitude)
+            console.log(item.longitude)
+            let point=[item.longitude,item.latitude];
+            path.push(point);
+          })
+          console.log()
+         that.initPolyline(path, "#FF0000");
+        });
+   },
+   
+    //初始化预计轨迹
+    initPolyline(path, color) {
+      let that = this;
+      //预计轨迹
+      var endLine = new AMap.Polyline({
+        map: that.map, //地图组件
+        path: path, //预计轨迹
+        isOutline: true,
+        outlineColor: color, //轨迹颜色
+        borderWeight: 0,
+        strokeColor: "#FF0000",
+        strokeOpacity: 1,
+        strokeWeight: 5,
+        // 折线样式还支持 'dashed'
+        strokeStyle: "solid",
+        // strokeStyle是dashed时有效
+        strokeDasharray: [10, 5],
+        lineJoin: "round",
+        lineCap: "round",
+        zIndex: 50
+      });
+      that.lineList.push(endLine);
+      that.map.setFitView([[endLine]]);
+    },
+    //初始化地图
+    initMap(lon,lat) {
+      lazyAMapApiLoaderInstance.load().then(() => {
+        let that = this;
+        that.map = new AMap.Map("amap-container", {
+          //设置地图容器id
+          viewMode: "2D", //是否为2D地图模式
+          zoom: 20, //初始化地图级别
+          center: [lon,lat] //初始化地图中心点位置105.602725,37.076636
+        });
+        that.initData()
+      });
+    },
+
+     //创建简单的标记
+    initMarkes(weight, height, image, lon, lat, title) {
+      let that = this;
+      //图标标记点
+      let pointicon = new AMap.Icon({
+        size: new AMap.Size(weight, height), // 图标尺寸
+        image: image, // Icon的图像
+        imageOffset: new AMap.Pixel(2, 10), // 图像相对展示区域的偏移量,适于雪碧图等
+        imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
+      });
+      // 创建一个 Marker 实例:
+      var pointmarker = new AMap.Marker({
+        position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        icon: pointicon,
+        title: title
+      });
+      // 将创建的点标记添加到已有的地图实例:
+      that.map.add(pointmarker);
+      console.log("成功绘制一个标记");
+    },
+   
+    //初始化窗体
+    initCustomMarkes(title, details, lon, lat) {
+      let that = this;
+      //自定义窗体内容
+      var content = [
+        "<div  style='top:1px;width: 180px; background-color: rgba(0, 0, 0, 1);' ><font color='white'>" +
+          title +
+          "</font>",
+        "<div style='background-color:rgba(255, 255, 255, 0.5);'><font color='white'>" +
+          details +
+          "</font></div></div>"
+      ];
+      // 创建 infoWindow 实例
+      var infoWindow = new AMap.InfoWindow({
+        content: content.join("<br>"),//传入 dom 对象,或者 html 字符串
+        offset:new AMap.Pixel(0,-20)//修改信息差窗体偏移
+      });
+      // 打开信息窗体
+      infoWindow.open(that.map, [lon, lat]);
+    },
+  
+  }
+};
+</script>
+<style>
+.inputStyle {
+  position: absolute;
+  width: 200px;
+  left: 50px;
+}
+
+.controller {
+  width: 100%;
+  height: 70px;
+  background: white;
+  position: absolute;
+  z-index: 99;
+  top: 0;
+  left: 0;
+}
+.in_transit_information {
+  width: 600px;
+  float: left;
+  height: 40px;
+}
+
+.container {
+  width: 100%;
+  height: 100%;
+}
+span.item_details2 {
+  position: relative;
+  left: 20px;
+  top: 20px;
+}
+.date_picker_style {
+  position: relative;
+  left: 50px;
+}
+.item_details {
+  position: relative;
+  top: 5px;
+  height: 0px;
+  left: 50px;
+}
+#amap-container {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  margin: 0;
+  font-family: "微软雅黑";
+}
+
+/* 进度条 */
+.mySlider {
+  width: 150px;
+  height: 20px;
+  display: inline-block;
+  position: relative;
+  left: 32px;
+}
+/* 进度条 */
+.mySlider2 {
+  width: 400px;
+  height: 20px;
+  display: inline-block;
+  position: relative;
+  left: 32px;
+}
+.play {
+  position: relative;
+  left: 28px;
+}
+.quickly {
+  float: right;
+  position: relative;
+  left: -20px;
+  top: 10px;
+}
+.pause {
+  position: relative;
+  left: 28px;
+}
+.passed-time {
+  position: relative;
+  left: 5px;
+}
+.end-time {
+  position: relative;
+  left: 5px;
+}
+.map-times {
+  position: relative;
+  width: 40px;
+}
+.searchstyle {
+  position: relative;
+  left: 45px;
+}
+.map-control {
+  float: left;
+  width: 270px;
+}
+.driving_information {
+  height: 40px;
+  width: 240px;
+  float: left;
+}
+</style>

BIN
static/img/traffic_texture_darkred-pass.png