liyg 3 лет назад
Родитель
Сommit
4525c5d9bd

+ 1 - 1
config/index.js

@@ -48,7 +48,7 @@ let proxyTable = {
   },
   // 表格表单请求的域名地址
   "/api/v1/cd": {
-    target: "http://172.16.33.166:8083",
+    target: "http://172.16.33.161:8083",
     ws: true,
     pathRewrite: {
       "^/api/v1/cd": "/api/v1/cd"

+ 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,

+ 15 - 16
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>
@@ -120,11 +119,12 @@
       label-width="80px"
       style="margin-left: 450px; display: flex"
     >
-      <el-form-item label="上传货权转移图片">
+      <el-form-item label="上传货权转移附件">
         <el-upload
           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"
@@ -137,7 +137,7 @@
           <el-input
             class="shippingCertificate"
             style="width: 270px; display: flex"
-            placeholder="请选择货权图片(必填项)"
+            placeholder="请选择货权附件(必填项)"
             v-model="shippingCertificate"
             disabled
           >
@@ -154,7 +154,7 @@
             "
             @click="upCLick(1)"
           >
-            点击上传图片</el-button
+            点击上传附件</el-button
           >
         </el-upload>
       </el-form-item>
@@ -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 ||

+ 121 - 27
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">
@@ -102,7 +102,7 @@
       label-width="80px"
       style="margin-left: 450px; display: flex"
     >
-      <el-form-item label="上传货权转移图片">
+      <el-form-item label="上传货权转移附件">
         <el-upload
           class="upload-demo"
           style="width: 270px"
@@ -119,7 +119,7 @@
           <el-input
             class="shippingCertificate"
             style="width: 270px; display: flex"
-            placeholder="请选择货权转移图片(必填项,可支持重新上传)"
+            placeholder="请选择货权转移附件(必填项,可支持重新上传)"
             v-model="shippingCertificate"
             disabled
           >
@@ -136,7 +136,7 @@
             "
             @click="upCLick(1)"
           >
-            点击上传图片</el-button
+            点击上传附件</el-button
           >
         </el-upload>
       </el-form-item>
@@ -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({

+ 7 - 4
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -451,8 +451,6 @@ export default {
             //设置自定义窗体
             that.initCustomMarkes(
               that.carNumber,
-              that.formatDate(that.time[0],"yyyy-MM-dd")+"至"+that.formatDate(that.time[1],"yyyy-MM-dd")+
-              "<br/>" +
               "起点:" +
                 that.startPointName +
                 "<br/>" +
@@ -460,7 +458,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]
             ),
@@ -580,7 +583,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'>" +

+ 129 - 52
src/views/sale/components/offSiteTransportation/currentLocation.vue

@@ -11,7 +11,15 @@
     <div class="controller">
       <div class="in_transit_information">
         <span class="item_details">车牌号:</span>
-        <el-button type="primary" class="searchstyle" @click="initData">查询</el-button>
+        <el-input
+          style="width: 120px;"
+          class="inputStyle"
+          v-model.trim="carNumber"
+        >
+        </el-input>
+        <el-button type="primary" class="searchstyle" @click="initData();initTimer()"
+          >查询</el-button
+        >
       </div>
     </div>
     <div id="amap-container"></div>
@@ -54,15 +62,22 @@ export default {
     return {
       //查询车牌号
       carNumber: "",
+      //开始时间和结束时间
+      startTime:"",
+      endTime:"",
       //地图组件
- 	  path:[],
+      map: null,
+      path:[],
       pointmarker:null,
       //定时器
       timer: null,
-};
+      //是否关闭信息窗体
+      infoClose:false
+    };
   },
   created() {
-    that.initMap(105.602725,37.076636)
+    let that = this;
+    that.initMap(105.602725, 37.076636);
   },
   mounted() {},
   methods: {
@@ -78,20 +93,50 @@ export default {
         return;
       }
       that.axios
-        .get("/api/v1/otms/getCurrentLocation?capcityNumber="+that.carNumber)
-		.then(res => {
-                 this.$message.error('运输订单未关闭,自提车辆无权查看!');
-                  that.initMarkes( 45,60, require("@/assets/img/car1.png"),res.data.data.result.lon,res.data.data.result.lat,"现在所在位置");
-                  //给路径加点
-                  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();
-          });
-},
+        .get("/api/v1/otms/getCurrentLocation?capcityNumber=" + that.carNumber)
+        .then(res => {
+          console.log(res.data.data);
+          if (res.data.data == "-1") {
+            this.$message.error("自提车辆无权查看!");
+          } else if (res.data.data.status != "1006") {
+            console.log("res.data.data.status");
+            that.map.setCenter([
+              res.data.data.result.lon,
+              res.data.data.result.lat
+            ]);
+            //画车
+            that.initMarkes(
+              45,
+              60,
+              require("@/assets/img/car1.png"),
+              res.data.data.result.lon,
+              res.data.data.result.lat,
+              "现在所在位置"
+            );
+            //给路径加点
+            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();
+            //显示窗体
+            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 {
+            this.$message.error("车辆暂时无GPS");
+          }
+        });
+    },
 
     //初始化地图
     initMap(lon, lat) {
@@ -126,6 +171,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) {
@@ -136,7 +240,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 实例
@@ -148,46 +253,18 @@ export default {
       infoWindow.open(that.map, [lon, lat]);
       infoWindow.close();
     },
-	// 关闭信息窗口
+    // 关闭信息窗口
     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]);
-    }	,
-//初始化轨迹
-    initPolyline() {
-      let that = this;
-      // 创建一个 Polyline 实例:
-      var polyline = new AMap.Polyline({
-            path: that.path,  
-            borderWeight: 2, // 线条宽度,默认为 1
-            strokeColor: '#18BFA6', // 线条颜色
-            lineJoin: 'round' ,// 折线拐点连接处样式
-            arrowIconPath: require("@/assets/img/traffic_texture_darkred-pass.png")//箭头图片,似乎不支持
-      });
-      // 将创建的线路添加到已有的线路中去:
-      that.map.add(polyline);
-    },
-
-    //定时取得当前位置并加入轨迹中去,点击查询时触发,同时清除path和旧的定时器
-    initTimer(){
-      let that=this;
-      //清除旧的定时器
-      clearTimeout(this.timer);
-      //清除path
-      that.path=[];
-      //清除所有覆盖物
-      that.map.clearMap();
-      //设置定时器
-      that.timer=setInterval(()=>{
-        //清除之前车的图标
-        that.map.remove(that.pointmarker);
-        that.initData();
-      },4000);
-    }}
+    }
+  }
 };
 </script>
 <style>

+ 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'>" +