liyg 2 rokov pred
rodič
commit
c49b0a744d

+ 18 - 9
src/views/TMS/components/bmsship/threeSectionFeeDetails.vue

@@ -9,10 +9,10 @@
         clearable
       >
       </el-input>
-<!-- 
+
        <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
       <span>至</span>
-      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
+      <el-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>查询
@@ -48,16 +48,25 @@ export default {
       startTime: null,
       endTime: null,
       input: "",
-       startTime: null,
-      endTime: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getLoadShipList?apiId=63",
+        requestUrl: "/api/v1/tms/getLoadShipList?apiId=512",
       },
     };
   },
-  mounted() {},
+  mounted() {
+    this.initDate();
+    this.onclick();
+  },
   methods: {
+    initDate(){
+      this.startTime=new Date();
+      this.endTime=new Date();
+      this.startTime.setDate(1);
+      this.startTime.setHours(0);
+      this.startTime.setMinutes(0);
+      this.startTime.setSeconds(0);
+    },
     onclick() {
       let startTime = null;
       let endTime = null;
@@ -68,13 +77,13 @@ export default {
         endTime = sjTime(this.endTime);
       }
       if(startTime && endTime && startTime < endTime){
-          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input+
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=512&con=" + this.input+
                 "&startTime=" +
                 startTime +
                 "&endTime=" +
                 endTime;
       }else{
-          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input;
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=512&con=" + this.input;
       }
     },
     click(resultId) {
@@ -99,7 +108,7 @@ export default {
               message: "删除成功!",
             });
             this.option.requestUrl =
-              "/api/v1/tms/getLoadShipList?apiId=63&i=" + new Date();
+              "/api/v1/tms/getLoadShipList?apiId=512&i=" + new Date();
           });
         })
         .catch(() => {

+ 12 - 2
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -481,7 +481,12 @@ export default {
       let that = this;
       that.listPath = [];
       if (that.carNumber == "") {
-        this.$message.error("车牌号不能为空!");
+        this.$message({
+          message:"车牌号不能为空!",
+          offset:40,
+          type:"warning",
+          showClose:true
+        });
         return;
       }
       if (that.time == null && that.time.length != 2) {
@@ -513,7 +518,12 @@ export default {
             that.listPath = res.data.data.startAndEndRoutes;
             that.initMap([105.602725, 37.076636]);
           } else {
-            this.$message.error("车辆没有开启GPS或尚未注册!");
+            this.$message({
+              message:"车辆没有开启GPS或尚未注册!",
+              offset:40,
+              type:"warning",
+              showClose:true
+            });
           }
         });
     },