luobang 3 年之前
父节点
当前提交
55953576df
共有 35 个文件被更改,包括 2542 次插入1291 次删除
  1. 2 2
      build/utils.js
  2. 1 1
      config/index.js
  3. 1 0
      package.json
  4. 3 10
      src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.js
  5. 1 1
      src/views/TMS/components/importedShip/addBargeShip.vue
  6. 87 85
      src/views/TMS/components/importedShip/addLoadShip.vue
  7. 49 50
      src/views/TMS/components/importedShip/addShipLocation.vue
  8. 115 75
      src/views/TMS/components/importedShip/addShipmentInstructions.vue
  9. 152 119
      src/views/TMS/components/importedShip/addWaterQuality.vue
  10. 39 36
      src/views/TMS/components/importedShip/bargeShip.vue
  11. 90 62
      src/views/TMS/components/importedShip/instructionsCapacity.vue
  12. 37 34
      src/views/TMS/components/importedShip/loadShip.vue
  13. 87 62
      src/views/TMS/components/importedShip/shipmentInstructions.vue
  14. 10 1
      src/views/TMS/components/importedShip/updateBargeShip.vue
  15. 1 4
      src/views/TMS/components/importedShip/updateInstructionsCapacity.vue
  16. 14 4
      src/views/TMS/components/importedShip/updateLoadShip.vue
  17. 62 41
      src/views/TMS/components/importedShip/updateShipmentInstructions.vue
  18. 2 0
      src/views/TMS/router/index.js
  19. 3 21
      src/views/appoint/components/saleContract/saleOrder.vue
  20. 32 1
      src/views/appoint/components/ship/addCargoResult.vue
  21. 91 53
      src/views/appoint/components/ship/addDeliveryAttorney.vue
  22. 166 98
      src/views/appoint/components/ship/addDeliveryNotice.vue
  23. 199 138
      src/views/appoint/components/ship/attorneytext.vue
  24. 25 21
      src/views/appoint/components/ship/cargoResult.vue
  25. 41 64
      src/views/appoint/components/ship/deliveryAttorney.vue
  26. 34 59
      src/views/appoint/components/ship/deliveryNotice.vue
  27. 42 15
      src/views/appoint/components/ship/modifyCargoResult.vue
  28. 79 36
      src/views/appoint/components/ship/modifyDeliveryAttroney.vue
  29. 381 27
      src/views/queue/components/qmsEnFacotory/queueFJumpLine.vue
  30. 82 22
      src/views/sale/components/offSiteTransportation/checkGPS.vue
  31. 3 3
      src/views/sale/components/offSiteTransportation/inTransit.vue
  32. 228 4
      src/views/sale/components/offSiteTransportation/mapTest.vue
  33. 79 40
      src/views/statisticalReport/components/Ship_dynamic_table.vue
  34. 153 51
      src/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeForm.vue
  35. 151 51
      src/views/statisticalReport/components/salesLogisticsStatistics/saleCoproductForm.vue

+ 2 - 2
build/utils.js

@@ -16,7 +16,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 //  let devModules = ['index','sale']
-let devModules = ['index','appoint','sale']
+let devModules = ['index','queue','appoint','sale']
 // let devModules = ['index','appoint','sale','RMS','statisticalReport'];
 // let devModules = ['index','appoint','WMS'];
 // let devModules = ['index','inward']
@@ -24,7 +24,7 @@ let devModules = ['index','appoint','sale']
 // let devModules = ['index','sale']
 // let devModules = ['index','SporadicManage','RMS','statisticalReport']
 // let devModules = ['index','inward','statisticalReport']
-//  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']
+//  let devModules = ['index','WMS','appoint','TMS','inward','SporadicManage']
 // let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
 // let devModules = ['index','RMS'];
 if (pathSrc.indexOf('node_modules') > -1) {

+ 1 - 1
config/index.js

@@ -65,7 +65,7 @@ let proxyTable = {
   // 所有数据的请求域名地址
   "/api/v1": {
     target: "http://172.16.33.166:8080",
-    // target: "http://192.168.1.109:8080",
+    // target: "http://192.168.1.101:8019",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 1 - 0
package.json

@@ -38,6 +38,7 @@
     "json2xml": "^0.1.3",
     "jspdf": "^2.5.1",
     "jssha": "^3.2.0",
+    "lay-excel": "^1.7.6",
     "object-assign": "^4.1.1",
     "qs": "^6.9.3",
     "sass-loader": "^6.0.7",

+ 3 - 10
src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.js

@@ -55,7 +55,7 @@ export default {
           this.pos = 0;
         } else {
           // 判断当前元素与上一个元素是否相同
-          console.log(this.comparison)
+        
           if (data[i][this.comparison] === data[i - 1][this.comparison]) {
             this.spanArr[this.pos] += 1;
             this.spanArr.push(0);
@@ -67,9 +67,6 @@ export default {
       }
     },
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
-      console.log("this.columnIndexs")
-      console.log(this.columnIndexs)
-      console.log("this.columnIndexs")
     
       if (
         this.columnIndexs.indexOf(columnIndex)!=-1
@@ -84,7 +81,6 @@ export default {
     },
     getHeight(){
       this.height = window.innerHeight - this.shiyHeigth;
-      console.log(this.height);
     },
     //计算合计列
     getSummaries(columns,data) {
@@ -100,7 +96,7 @@ export default {
                return prev;
              }
             }, 0);
-            console.log(sums )
+      
             sums[index];
            }
       });
@@ -133,7 +129,6 @@ export default {
         let data = undefined;
         for (const key in this.dataRequestQuery) {
           const val = this.dataRequestQuery[key];
-          console.log(val)
           if (val||val==0) {
             if (!data) data = {};
             data[key] = val;
@@ -188,8 +183,7 @@ export default {
     // 刷新表头显示数据
     refreshColumnData(columnData) {
       // 表头只赋值一次(在查出全部数据的情况下才只赋值一次)
-      console.log("biaof")
-      console.log(this.dataColumnData.length)
+
       if (this.dataColumnData.length > 0){
           return;
       } 
@@ -237,7 +231,6 @@ export default {
     },
     // 更新请求参数
     setDataRequestQuery(value) {
-      console.log(value);
       let q = this.dataRequestQuery;
       for (const key in value) {
         q[key] = value[key];

+ 1 - 1
src/views/TMS/components/importedShip/addBargeShip.vue

@@ -65,7 +65,7 @@ export default {
         ),
         bargeBackLocation: this.form.bargeBackLocation,
       };
-      console.log(mapVal);
+    
        if (
       mapVal.smallCapacityId==null||
       mapVal.bargeSmallshipLoadWeight==null||

+ 87 - 85
src/views/TMS/components/importedShip/addLoadShip.vue

@@ -3,22 +3,22 @@
   <div class="shipTransport">
     <page-title>返回</page-title>
     <!-- 第一部分 -->
-      <div class="top">
-        <el-input placeholder="请输入内容" v-model="input" clearable> </el-input> 
-        <el-button type="primary" class="btn" @click="onclick()">
-          <i class="el-icon-search"></i>查询
-        </el-button>   
-      </div>
-      <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
-      </dilTable>
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick()">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
+    </dilTable>
     <div class="form">
       <!-- 第二部分 -->
       <div class="form_box">
-          <dil-form :formId="120" v-model="form"></dil-form>
+        <dil-form :formId="120" v-model="form"></dil-form>
       </div>
     </div>
     <div class="button_box">
-        <el-button type="primary" @click="makeSure">新增装船作业</el-button>
+      <el-button type="primary" @click="makeSure">新增装船作业</el-button>
     </div>
   </div>
 </template>
@@ -31,7 +31,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      input:'',
+      input: "",
       restaurants: [],
       state: "",
       form: {},
@@ -39,112 +39,114 @@ export default {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
         // 控制显示当选列
-        selectionType: "radio",
-        rowMap:{},
+        selectionType: "radio"
       },
+      rowMap: {}
     };
   },
-  mounted() {
-  },
+  mounted() {},
   methods: {
     currentRadioChange(row) {
-      this.rowMap=row
-      
-      console.log("addd",this.rowMap);
+      this.rowMap = row;
+      console.log("addd", this.rowMap);
     },
     // 新增
     makeSure() {
+      if (JSON.stringify(this.rowMap).length == 2) {
+        this.$message.error("未选择江船");
+        return;
+      }
       let mapVal = {
         resultActualInstallations: this.form.resultActualInstallations,
-      //  portId: this.form.portId,
-        resultLoadShipDate: sjTime(
-          this.form.resultLoadShipDate
-        ),
+        //  portId: this.form.portId,
+        resultLoadShipDate: sjTime(this.form.resultLoadShipDate),
         resultIsClear: this.form.resultIsClear,
-        resultPortDeclarationTime: sjTime(
-          this.form.resultPortDeclarationTime
-        ),
+        resultPortDeclarationTime: sjTime(this.form.resultPortDeclarationTime),
         resultPortDeclarationName: this.form.resultPortDeclarationName,
-        resultArrivalTime: sjTime(
-          this.form.resultArrivalTime
-        ),
+        resultArrivalTime: sjTime(this.form.resultArrivalTime),
         resultOutWharyName: this.form.resultOutWharyName,
-        resultOutWharyTime: sjTime(
-          this.form.resultOutWharyTime
-        ),
+        resultOutWharyTime: sjTime(this.form.resultOutWharyTime),
         resultMemo: this.form.resultMemo,
-        userId:getCookie("userId")
+        userId: getCookie("userId")
       };
-      console.log(mapVal);
-      console.log(this.rowMap)
+      //判断放货数量是否为数字
+      function isNumber() {
+        var value = mapVal.resultActualInstallations;
+        //验证是否为数字
+        var patrn = /^(-)?\d+(\.\d+)?$/;
+        if (patrn.exec(value) == null || value == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      var val = this.value;
+
       if (
-      mapVal.resultActualInstallations==null||
-     // mapVal.portId==null||
-      mapVal.resultLoadShipDate==null||
-      mapVal.resultIsClear==null||
-      mapVal.resultPortDeclarationTime==null||
-      mapVal.resultPortDeclarationName==null||
-      mapVal.resultArrivalTime==null||
-      mapVal.resultOutWharyName==null||
-      mapVal.resultOutWharyTime==null
-      ) this.$message.error("存在空值!");
+        mapVal.resultActualInstallations == null ||
+        // mapVal.portId==null||
+        mapVal.resultLoadShipDate == null ||
+        mapVal.resultIsClear == null ||
+        mapVal.resultPortDeclarationTime == null ||
+        mapVal.resultPortDeclarationName == null ||
+        mapVal.resultArrivalTime == null ||
+        mapVal.resultOutWharyName == null ||
+        mapVal.resultOutWharyTime == null
+      )
+        this.$message.error("存在空值!");
+      else if (!isNumber(val)) this.$message.warning("实装数量必须为数字!");
       else
-      this.axios
-        .post(
-          "/api/v1/tms/addLoadShip",
-          {
-           mapVal:mapVal,
-           rowMap:this.rowMap
-          }
-        )
-        .then((res) => {
-          console.log("返回成功了")
-          console.log(res)
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
-          }else if(res.data.code == 201){
-            this.$message.warning(res.data.data);
-          } else {
-            this.$message.error("新增失败!");
-          }
-          this.$refs['table'].resetField();
-        });
+        this.axios
+          .post("/api/v1/tms/addLoadShip", {
+            mapVal: mapVal,
+            rowMap: this.rowMap
+          })
+          .then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "新增成功!"
+              });
+              this.$router.go(-1);
+            } else if (res.data.code == 201) {
+              this.$message.warning(res.data.data);
+            } else {
+              this.$message.error("新增失败!");
+            }
+            this.$refs["table"].resetField();
+          });
     },
     handleSelect(item) {
       console.log(item);
     },
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input
-    },
-  },
+      this.option.requestUrl =
+        "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input;
+    }
+  }
 };
 </script>
-<style lang='scss'>
-.shipTransport{
-  .form{
+<style lang="scss">
+.shipTransport {
+  .form {
     display: flex;
-    .form_box{
+    .form_box {
       width: 320px;
       margin-left: 35%;
       margin-top: 30px;
       margin-right: 20px;
-      .el-form{
-        .preview-group{
-          .el-form-item{
-            .el-form-item__label{
+      .el-form {
+        .preview-group {
+          .el-form-item {
+            .el-form-item__label {
               display: inline-block;
               width: 70px !important;
             }
-            .el-form-item__content{
-              .el-select{
+            .el-form-item__content {
+              .el-select {
                 width: 250px;
               }
-              .el-input{
+              .el-input {
                 width: 250px;
               }
             }
@@ -160,8 +162,8 @@ export default {
       margin-right: 1.25rem;
     }
   }
-  .button_box{
+  .button_box {
     margin-left: 45%;
   }
 }
-</style>
+</style>

+ 49 - 50
src/views/TMS/components/importedShip/addShipLocation.vue

@@ -8,20 +8,22 @@
     </div>
     <div>
       <div class="form-box" style="margin-left: 5rem">
-        <el-form ><dil-form :formId="127" v-model="form"></dil-form>
-        <el-button type="primary" @click="makeSure">新增位置作业</el-button>
+        <el-form
+          ><dil-form :formId="127" v-model="form"></dil-form>
+          <el-button type="primary" @click="makeSure">新增位置作业</el-button>
         </el-form>
       </div>
     </div>
-     <div class="main">
+    <div class="main">
       <span class="text">位置作业新增</span>
       <span class="a"></span>
     </div>
-     <div class="top">
+    <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick()">
-        <i class="el-icon-search"></i>查询
-      </el-button>   
+           
+      <el-button type="primary" class="btn" @click="onclick()">
+                <i class="el-icon-search"></i>查询      
+      </el-button>
     </div>
     <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
     </dilTable>
@@ -35,7 +37,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      input:'',
+      input: "",
       restaurants: [],
       state: "",
       form: {},
@@ -44,78 +46,75 @@ export default {
         requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
         // 控制显示当选列
         selectionType: "radio",
-        shipLocationMap:{},
+        shipLocationMap: {},
       },
     };
   },
-  mounted() {
-  },
+  mounted() {},
   methods: {
     currentRadioChange(row) {
-      this.shipLocationMap=row
+      this.shipLocationMap = row;
       console.log(row);
     },
     // 新增
     makeSure() {
       let mapVal = {
         locationValue: this.form.locationValue,
-        locationRouteTime: sjTime(
-          this.form.locationRouteTime
-        ),
+        locationRouteTime: sjTime(this.form.locationRouteTime),
         locationStatus: this.form.locationStatus,
         locationMemo: this.form.locationMemo,
       };
-      console.log(mapVal);
-      if (mapVal.locationValue==null||
-      mapVal.locationRouteTime==null||
-      mapVal.locationStatus==null||
-      mapVal.locationMemo==null
-      ) this.$message.error("存在空值!");
+
+
+      if (
+        mapVal.locationValue == null ||
+        mapVal.locationRouteTime == null ||
+        mapVal.locationStatus == null ||
+        mapVal.locationMemo == null
+      )
+        this.$message.error("存在空值!");
+    
       else
-      this.axios
-        .post(
-          "/api/v1/tms/addShipLocation",
-          {
+        this.axios
+          .post("/api/v1/tms/addShipLocation", {
             mapVal: mapVal,
-            shipLocationMap: this.shipLocationMap
-          }
-        )
-        .then((res) => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
-          } else {
-            this.$message.error("新增失败!");
-          }
-          this.$refs['table'].resetField();
-        });
+            shipLocationMap: this.shipLocationMap,
+          })
+          .then((res) => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "新增成功!",
+              });
+              // this.$refs.table.refreshData();
+              this.$router.go(-1);
+            } else {
+              this.$message.error("新增失败!");
+            }
+            this.$refs["table"].resetField();
+          });
     },
     loadAll() {
-      return [
-
-      ];
+      return [];
     },
     handleSelect(item) {
       console.log(item);
     },
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input
+      this.option.requestUrl =
+        "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input;
     },
   },
 };
 </script>
 <style lang='scss' scoped>
-.homeworkPath{
-  .main{
+.homeworkPath {
+  .main {
     margin-bottom: 0.125rem;
   }
-  .button-ins{
-    margin: 0 50rem; 
-    text-align: center
+  .button-ins {
+    margin: 0 50rem;
+    text-align: center;
   }
   .top {
     margin: 0 auto;

+ 115 - 75
src/views/TMS/components/importedShip/addShipmentInstructions.vue

@@ -4,11 +4,11 @@
     <page-title>返回</page-title>
     <div class="form">
       <div class="form_box">
-          <dil-form :formId="114" v-model="form1" ref="from1"></dil-form>
+        <dil-form :formId="114" v-model="form1" ref="from1"></dil-form>
       </div>
       <div class="liulan">
-          <el-button type="primary" class="btn" @click="onDrawer">浏览</el-button>
-      </div>     
+        <el-button type="primary" class="btn" @click="onDrawer">浏览</el-button>
+      </div>
     </div>
     <!-- 确定和取消 -->
     <div class="button_box">
@@ -22,109 +22,149 @@
       :before-close="handleClose"
       size="35%"
     >
-      <el-input placeholder="请输入内容" v-model="input"  style="margin-top:10px;margin-left:20px;width:250px" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick()"  style="margin-bottom:15px">
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick()"
+        style="margin-bottom: 15px"
+      >
         <i class="el-icon-search"></i>查询
       </el-button>
-    <dilTable v-bind.sync="options" @radio-change="currentRadioChange1" ></dilTable>
+      <dilTable
+        v-bind.sync="options"
+        @radio-change="currentRadioChange1"
+      ></dilTable>
     </el-drawer>
   </div>
 </template>
 
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
     return {
-      drawer:false,
-      direction:"rtl",
-      input:'',
-      options:{
-        requestUrl:"/api/v1/tms/getBatchListForAttorney?apiId=383",
-        selectionType:"radio",
-        maplist:[]
+      drawer: false,
+      direction: "rtl",
+      input: "",
+      options: {
+        requestUrl: "/api/v1/tms/getBatchListForAttorney?apiId=383",
+        selectionType: "radio",
+        maplist: []
       },
       form1: {},
       value: undefined,
+      batchId: ""
     };
   },
   mounted() {},
   methods: {
-    onDrawer(){
-        this.drawer = true
+    onDrawer() {
+      this.drawer = true;
     },
-    onclick(){
-        this.options.requestUrl = "/api/v1/tms/getBatchList?apiId=383&con=" + this.input
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/tms/getBatchList?apiId=383&con=" + this.input;
     },
-    currentRadioChange1(selection){
-        this.maplist = selection
-        this.form1 = {
-          batchId:selection.resultForeignShipName + selection.materialName
-                 }
+    currentRadioChange1(selection) {
+      this.maplist = selection;
+      if (JSON.stringify(this.maplist).length > 2) {
+        this.$set(
+          this.form1,
+          "batchId",
+          selection.resultForeignShipName + selection.materialName
+        );
+        this.batchId = selection.batchId;
+      }
     },
-    handleClose(done){
-        done();
+    handleClose(done) {
+      done();
     },
     // 确定
     makeSure() {
+      if (this.batchId == "" || this.batchId == undefined) {
+        this.$message.warning("请选择批次号");
+        return;
+      }
       let omsshipShipmentInstructions = {
         batchId: this.maplist.batchId,
         instructionsTotalTonnage: this.form1.instructionsTotalTonnage,
-        instructionTime: sjTime(
-          this.form1.instructionTime
-        ),
+        instructionTime: sjTime(this.form1.instructionTime)
       };
-      console.log(
-        omsshipShipmentInstructions
-      );
+
+      //判断合计吨位是否为数字
+      function isNumber() {
+        var value = omsshipShipmentInstructions.instructionsTotalTonnage;
+        //验证是否为数字
+        var patrn = /^(-)?\d+(\.\d+)?$/;
+        if (patrn.exec(value) == null || value == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      var val = this.value;
+
       if (
-      omsshipShipmentInstructions.batchId==null||
-      omsshipShipmentInstructions.instructionsTotalTonnage==null||
-      omsshipShipmentInstructions.instructionTime==null
-      ) this.$message.error("存在空值!");
+        omsshipShipmentInstructions.batchId == null ||
+        omsshipShipmentInstructions.instructionsTotalTonnage == null ||
+        omsshipShipmentInstructions.instructionTime == null
+      )
+        this.$message.error("存在空值!");
+      else if (!isNumber(val)) this.$message.warning("合计吨位请填写数字");
       else
-      this.axios
-        .post(
-          "/api/v1/tms/addShipmentInstructions",
-          omsshipShipmentInstructions
-        )
-        .then((res) => {
-          // console.log(res);
-          // console.log(this.form4);
-          this.$router.go(-1);
-        });
+        this.axios
+          .post(
+            "/api/v1/tms/addShipmentInstructions",
+            omsshipShipmentInstructions
+          )
+          .then(res => {
+            if (res.data.code == "200") {
+              this.$message({
+                type: "success",
+                message: "新增成功"
+              });
+            }
+            this.$router.go(-1);
+          });
     },
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
 
 <style lang="scss">
-.shipTransport{
-  .form{
+.shipTransport {
+  .form {
     display: flex;
-    .form_box{
+    .form_box {
       width: 320px;
       margin-left: 35%;
       margin-top: 30px;
       margin-right: 20px;
-      .el-form{
-        .preview-group{
-          .el-form-item{
-            .el-form-item__label{
+      .el-form {
+        .preview-group {
+          .el-form-item {
+            .el-form-item__label {
               display: inline-block;
               width: 70px !important;
             }
-            .el-form-item__content{
-              .el-select{
+            .el-form-item__content {
+              .el-select {
                 width: 250px;
               }
-              .el-input{
+              .el-input {
                 width: 250px;
               }
             }
@@ -133,25 +173,25 @@ export default {
       }
     }
   }
-  .liulan{
-      width: 120px;
-      margin-top: 30px;
-      .el-button{
-        width: 100px !important;
-        margin: auto;
-      }
-      .btn{
-        margin-top: 0px;
-      }
-      .btn1{
-        margin-top: 13px;
-      }
-      .btn2{
-        margin-top: 67px;
-      }
+  .liulan {
+    width: 120px;
+    margin-top: 30px;
+    .el-button {
+      width: 100px !important;
+      margin: auto;
+    }
+    .btn {
+      margin-top: 0px;
+    }
+    .btn1 {
+      margin-top: 13px;
+    }
+    .btn2 {
+      margin-top: 67px;
+    }
   }
-  .button_box{
-    margin-left: 45%;
+  .button_box {
+    margin-left: 42.5%;
   }
 }
 </style>

+ 152 - 119
src/views/TMS/components/importedShip/addWaterQuality.vue

@@ -3,54 +3,71 @@
   <div class="shipTransport">
     <page-title>返回</page-title>
     <!-- 第一部分 -->
-      <div class="top">
-        <el-input placeholder="请输入内容" v-model="input" clearable> </el-input> 
-        <el-button type="primary" class="btn" @click="onclick()">
-          <i class="el-icon-search"></i>查询
-        </el-button>   
-      </div>
-      <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
-      </dilTable>
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick()">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
+    </dilTable>
     <div class="form">
       <!-- 第二部分 -->
       <div class="form_box">
-          <dil-form :formId="128" v-model="form"></dil-form>
+        <dil-form :formId="128" v-model="form"></dil-form>
       </div>
     </div>
     <!-- 下方内容 -->
     <div class="other">
       <el-form :inline="true">
         <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">含水率</label>
+          <label class="el-form-item__label" style="width: auto">含水率</label>
         </el-form-item>
         <el-form-item>
-          <el-input  placeholder="" v-model="resultMoistureContent"></el-input>
+          <el-input placeholder="" v-model="resultMoistureContent"></el-input>
         </el-form-item>
-         
-         <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">合同水分值</label>
+
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto"
+            >合同水分值</label
+          >
         </el-form-item>
         <el-form-item>
-          <el-input placeholder="" v-model="contractMoistureValue" :disabled="true"></el-input>
+          <el-input
+            placeholder=""
+            v-model="contractMoistureValue"
+            :disabled="true"
+          ></el-input>
         </el-form-item>
 
         <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">实装吨位</label>
+          <label class="el-form-item__label" style="width: auto"
+            >实装吨位</label
+          >
         </el-form-item>
         <el-form-item>
-          <el-input placeholder="" v-model="realWeight" :disabled="true"></el-input>
+          <el-input
+            placeholder=""
+            v-model="realWeight"
+            :disabled="true"
+          ></el-input>
         </el-form-item>
 
         <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">水分吨位</label>
+          <label class="el-form-item__label" style="width: auto"
+            >水分吨位</label
+          >
         </el-form-item>
         <el-form-item>
-          <el-input placeholder="" v-model="moistureTonnage" :disabled="true"></el-input>
+          <el-input
+            placeholder=""
+            v-model="moistureTonnage"
+            :disabled="true"
+          ></el-input>
         </el-form-item>
       </el-form>
-        <el-button type="primary" @click="makeSure">新增水分质检信息</el-button>
+      <el-button type="primary" @click="makeSure">新增水分质检信息</el-button>
     </div>
-    
   </div>
 </template>
 
@@ -61,11 +78,12 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      resultMoistureContent:'',
-      contractMoistureValue:'',
-      realWeight:'',
-      moistureTonnage:'',
-      input:'',
+      resultMoistureContent: null,
+      contractMoistureValue: "",
+      realWeight: "",
+      batchId: null,
+      moistureTonnage: "",
+      input: "",
       restaurants: [],
       state: "",
       form: {},
@@ -74,124 +92,139 @@ export default {
         requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
         // 控制显示当选列
         selectionType: "radio",
-        waterQualityMap:[],
-      },
+        waterQualityMap: []
+      }
     };
   },
-  mounted() {
+  watch: {
+    resultMoistureContent() {
+      this.pipeiContarct();
+    },
+    batchId() {
+      this.pipeiContarct();
+    }
   },
+  mounted() {},
   methods: {
     currentRadioChange(row) {
-      this.waterQualityMap=row
-      //console.log("waterQualityMap",this.waterQualityMap)
-      if(this.resultMoistureContent!=null&&this.resultMoistureContent!=''){
-        
-        let map={
-          batchId:this.waterQualityMap.batchId,
-          resultMoistureContent:this.resultMoistureContent
+      this.waterQualityMap = row;
+      this.batchId = this.waterQualityMap.batchId;
+      this.pipeiContarct();
+    },
+    pipeiContarct() {
+      if (
+        this.resultMoistureContent != null &&
+        this.resultMoistureContent != ""
+      ) {
+        let map = {
+          batchId: this.waterQualityMap.batchId,
+          resultMoistureContent: this.resultMoistureContent
         };
-        console.log(map)
         this.axios
-          .post(
-            "/api/v1/tms/getMoistureAndInstallations",map
-          )
-          .then((res) => {
+          .post("/api/v1/tms/getMoistureAndInstallations", map)
+          .then(res => {
             if (res.data.code == 200) {
-              console.log("res",res.data.data)
-              this.contractMoistureValue=res.data.data.purchaseContractMoisture;
-              this.realWeight=res.data.data.resultActualInstallations;
-              this.moistureTonnage=res.data.data.resultWaterTonnage;
+              this.contractMoistureValue =
+                res.data.data.purchaseContractMoisture;
+              this.realWeight = res.data.data.resultActualInstallations;
+              this.moistureTonnage = res.data.data.resultWaterTonnage;
               // this.$refs.table.refreshData();
             } else {
               this.$message.error("失败!");
             }
           });
       }
-      
     },
     // 新增
     makeSure() {
       let mapVal = {
-        resultPlannedDate: sjTime(
-          this.form.planDate
-        ),
-        expectNoticeDate:sjTime(
-          this.form.expectNoticeDate
-        ),
+        resultPlannedDate: sjTime(this.form.planDate),
+        expectNoticeDate: sjTime(this.form.expectNoticeDate),
         resultEmptyHeavyWaterMeter: this.form.resultEmptyHeavyWaterMeter,
-        resultMoistureContent:this.resultMoistureContent,
+        resultMoistureContent: this.resultMoistureContent,
         resultInspectionFees: this.form.resultInspectionFees,
-        contractMoistureValue:this.contractMoistureValue,
-        realWeight:this.realWeight,
-        moistureTonnage:this.moistureTonnage
+        contractMoistureValue: this.contractMoistureValue,
+        realWeight: this.realWeight,
+        moistureTonnage: this.moistureTonnage
       };
-      console.log(mapVal);
-       if (mapVal.resultPlannedDate==null||
-      mapVal.resultEmptyHeavyWaterMeter==null||
-      mapVal.resultMoistureContent==null||
-      mapVal.resultInspectionFees==null||
-      mapVal.contractMoistureValue==null||
-      mapVal.realWeight==null||
-      mapVal.moistureTonnage==null
-      ) this.$message.error("存在空值!");
+      //判断放货数量是否为数字
+      function isNumber() {
+        var value = mapVal.resultMoistureContent;
+        //验证是否为数字
+        var patrn = /^(-)?\d+(\.\d+)?$/;
+        if (patrn.exec(value) == null || value == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      var val = this.value;
+
+      if (
+        mapVal.resultPlannedDate == null ||
+        mapVal.resultEmptyHeavyWaterMeter == null ||
+        mapVal.resultMoistureContent == null ||
+        mapVal.resultInspectionFees == null ||
+        mapVal.contractMoistureValue == null ||
+        mapVal.realWeight == null ||
+        mapVal.moistureTonnage == null
+      )
+        this.$message.error("存在空值!");
+      else if (!isNumber(val)) this.$message.warning("含水率必须为数字");
       else
-      this.axios
-        .post(
-          "/api/v1/tms/addWaterQualityResult",
-          {
+        this.axios
+          .post("/api/v1/tms/addWaterQualityResult", {
             mapVal: mapVal,
             waterQualityMap: this.waterQualityMap
-          }
-        )
-        .then((res) => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
-          } else {
-            this.$message.error("新增失败!");
-          }
-          this.$refs['table'].resetField();
-        });
+          })
+          .then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "新增成功!"
+              });
+              // this.$refs.table.refreshData();
+              this.$router.go(-1);
+            } else {
+              this.$message.error("新增失败!");
+            }
+            this.$refs["table"].resetField();
+          });
     },
     loadAll() {
-      return [
-
-      ];
+      return [];
     },
     handleSelect(item) {
       console.log(item);
     },
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input
-    },
-  },
+      this.option.requestUrl =
+        "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input;
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
-.shipTransport{
-  .form{
+<style lang="scss" scoped>
+.shipTransport {
+  .form {
     display: flex;
-    .form_box{
+    .form_box {
       width: 320px;
       margin-left: 35%;
       margin-top: 30px;
       margin-right: 20px;
-      .el-form{
-        .preview-group{
-          .el-form-item{
-            .el-form-item__label{
+      .el-form {
+        .preview-group {
+          .el-form-item {
+            .el-form-item__label {
               display: inline-block;
               width: 70px !important;
             }
-            .el-form-item__content{
-              .el-select{
+            .el-form-item__content {
+              .el-select {
                 width: 250px;
               }
-              .el-input{
+              .el-input {
                 width: 250px;
               }
             }
@@ -207,31 +240,31 @@ export default {
       margin-right: 1.25rem;
     }
   }
-  .button_box{
+  .button_box {
     margin-left: 45%;
   }
-  .other{
+  .other {
     width: 320px;
-      margin-left: 35%;
-      margin-right: 20px;
-      .el-form{
-        .preview-group{
-          .el-form-item{
-            .el-form-item__label{
-              display: inline-block;
-              width: 70px !important;
+    margin-left: 35%;
+    margin-right: 20px;
+    .el-form {
+      .preview-group {
+        .el-form-item {
+          .el-form-item__label {
+            display: inline-block;
+            width: 70px !important;
+          }
+          .el-form-item__content {
+            .el-select {
+              width: 250px;
             }
-            .el-form-item__content{
-              .el-select{
-                width: 250px;
-              }
-              .el-input{
-                width: 250px;
-              }
+            .el-input {
+              width: 250px;
             }
           }
         }
       }
+    }
   }
 }
-</style>
+</style>

+ 39 - 36
src/views/TMS/components/importedShip/bargeShip.vue

@@ -2,21 +2,23 @@
   <!-- 驳船作业页面 -->
   <div class="shipTransport">
     <div class="top">
-
-      <el-input class="el-input" placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+      <el-input
+        class="el-input"
+        placeholder="请输入内容"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
       <el-button type="primary" class="btn" @click="addclick">
-         <i class="el-icon-circle-plus-outline"></i>新增
+        <i class="el-icon-circle-plus-outline"></i>新增
       </el-button>
     </div>
     <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" align="center" width="100">
         <template slot-scope="scope">
-          <el-button @click="click(scope.row.bargeOperationId)" type="text" size="small"
-            >编辑</el-button
-          >
           <el-button
             type="text"
             size="small"
@@ -38,15 +40,15 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getBargeOperationList?apiId=61",
-      },
+        requestUrl: "/api/v1/tms/getBargeOperationList?apiId=61"
+      }
     };
   },
-  mounted() {
-  },
+  mounted() {},
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getBargeOperationList?apiId=61&con=" + this.input;
+      this.option.requestUrl =
+        "/api/v1/tms/getBargeOperationList?apiId=61&con=" + this.input;
     },
     click(bargeOperationId) {
       this.$router.push("/updateBargeShip/" + bargeOperationId);
@@ -72,44 +74,45 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
-        .then(() => {       
+        .then(() => {
           this.axios
             .post(
-              "/api/v1/shipTms/tmsshipbargeoperations/deleteBargeOperation/" + bargeOperationId
+              "/api/v1/shipTms/tmsshipbargeoperations/deleteBargeOperation/" +
+                bargeOperationId
             )
             .then(() => {
               this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-              this.$router.go(0);
+                type: "success",
+                message: "删除成功!"
+              });
+              this.option.requestUrl =
+                "/api/v1/tms/getBargeOperationList?apiId=61&i=" + new Date();
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .shipTransport {
   .top {
-     padding: 1.25rem 0.375rem;
-     .el-input{
-       width: 20%;
-       margin-right: 40rpx;
-     }
-     .btn{
-       width: 5.5%;
-       margin-left: 0.25rem;
-     }
-
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 40rpx;
+    }
+    .btn {
+      width: 5.5%;
+      margin-left: 0.25rem;
+    }
   }
 }
-</style>
+</style>

+ 90 - 62
src/views/TMS/components/importedShip/instructionsCapacity.vue

@@ -22,12 +22,6 @@
     <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" align="center" width="150">
         <template slot-scope="scope">
-          <el-button
-            @click="click(scope.row.orderId, scope.row.instructionsId)"
-            type="text"
-            size="mini"
-            >编辑</el-button
-          >
           <el-button
             type="text"
             size="mini"
@@ -50,32 +44,31 @@ export default {
       restaurants: [],
       state: "",
       form: {},
-      capacityIds:"",
+      capacityIds: "",
       option: {
         // 表格请求数据的地址
         requestUrl:
           "/api/v1/tms/getCapacities?apiId=76&instructionsId=" +
-          this.$route.params.instructionsId,
-      },
+          this.$route.params.instructionsId
+      }
     };
   },
   methods: {
     onInput() {
-      this.axios.post(
-        "/api/v1/tms/getShipNameList?state="+this.state,
-      )
-      .then((res) => {
-        var values=[];
-        if(res.data.code == "0"){
-          res.data.data.forEach(element => {
-            values.push({
-              value:element.capacityName,
-              capacityId:element.capacityId
-            })
-          });
-        }
-        this.restaurants=values;
-      });
+      this.axios
+        .post("/api/v1/tms/getShipNameList?state=" + this.state)
+        .then(res => {
+          var values = [];
+          if (res.data.code == "0") {
+            res.data.data.forEach(element => {
+              values.push({
+                value: element.capacityName,
+                capacityId: element.capacityId
+              });
+            });
+          }
+          this.restaurants = values;
+        });
     },
     querySearch(queryString, cb) {
       var results = queryString
@@ -85,56 +78,87 @@ export default {
       cb(results);
     },
     createFilter(queryString) {
-      return (restaurant) => {
+      return restaurant => {
         return (
           restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
           0
         );
       };
     },
-    handleSelect(item){
-      this.capacityIds=item.capacityId
-      console.log("capacityIds",this.capacityIds)
+    handleSelect(item) {
+      this.capacityIds = item.capacityId;
+      console.log("capacityIds", this.capacityIds);
     },
-    
+
     // 新增
-    
     makeSure() {
       let omsshipInstructionsCapacity = {
-        instructionsId: this.$route.params.instructionsId,
-        state:this.state,
-        capacityName:this.state,
-        capacityIds: this.capacityIds,
-        instructionPlannedLoading: this.form.instructionPlannedLoading,
-        instructionsShipPosition: this.form.instructionsShipPosition,
-        instructionContactInf: this.form.instructionContactInf,
-        instructionsCapacityStatus: this.form.instructionsCapacityStatus,
-        instructionEsarrivalTime: sjTime(this.form.instructionEsarrivalTime),
-      };
-      console.log(omsshipInstructionsCapacity);
-      if (
-        omsshipInstructionsCapacity.state == null ||
-        omsshipInstructionsCapacity.instructionPlannedLoading == null ||
-        omsshipInstructionsCapacity.instructionsShipPosition == null ||
-        omsshipInstructionsCapacity.instructionContactInf == null ||
-        omsshipInstructionsCapacity.instructionsCapacityStatus == null ||
-        omsshipInstructionsCapacity.instructionEsarrivalTime == null
-      )
+        instructionsId: this.$route.params.instructionsId,
+        state: this.state,
+        capacityName: this.state,
+        capacityIds: this.capacityIds,
+        instructionPlannedLoading: this.form.instructionPlannedLoading,
+        instructionsShipPosition: this.form.instructionsShipPosition,
+        instructionContactInf: this.form.instructionContactInf,
+        instructionsCapacityStatus: this.form.instructionsCapacityStatus,
+        instructionEsarrivalTime: sjTime(this.form.instructionEsarrivalTime)
+      };
+      //判断是否为电话号码
+      function isTelePhone() {
+        var value2 = omsshipInstructionsCapacity.instructionContactInf;
+        //验证是否为数字
+        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;
+        }
+      }
+
+      //判断放货数量是否为数字
+      function isNumber() {
+        var value = omsshipInstructionsCapacity.instructionPlannedLoading;
+        //验证是否为数字
+        var patrn = /^(-)?\d+(\.\d+)?$/;
+        if (patrn.exec(value) == null || value == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      var val = this.value;
+      var val2 = this.value2;
+      if (
+        omsshipInstructionsCapacity.state == null ||
+        omsshipInstructionsCapacity.instructionPlannedLoading == null ||
+        omsshipInstructionsCapacity.instructionsShipPosition == null ||
+        omsshipInstructionsCapacity.instructionContactInf == null ||
+        omsshipInstructionsCapacity.instructionsCapacityStatus == null ||
+        omsshipInstructionsCapacity.instructionEsarrivalTime == null ||
+        omsshipInstructionsCapacity.capacityName == null
+      )
         this.$message.error("存在空值!");
+      else if (!isNumber(val)) this.$message.warning("计划装载吨位必须为数字");
+      else if (!isTelePhone(val2)) this.$message.warning("联系方式格式错误");
       else
         this.axios
           .post(
             "/api/v1/tms/addInstructionsCapacity",
             omsshipInstructionsCapacity
           )
-          .then((res) => {
+          .then(res => {
             if (res.data.code == 200) {
               this.$message({
                 type: "success",
-                message: "新增成功!",
+                message: "新增成功!"
               });
               // this.$refs.table.refreshData();
-              this.option.requestUrl = "/api/v1/tms/getCapacities?apiId=76&instructionsId=" + this.$route.params.instructionsId + "&i=" + new Date();
+              this.option.requestUrl =
+                "/api/v1/tms/getCapacities?apiId=76&instructionsId=" +
+                this.$route.params.instructionsId +
+                "&i=" +
+                new Date();
               // this.$router.go(this.option);
             } else {
               this.$message.error("新增失败!");
@@ -156,7 +180,7 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
@@ -164,29 +188,33 @@ export default {
             .then(() => {
               this.$message({
                 type: "success",
-                message: "删除成功!",
+                message: "删除成功!"
               });
-              this.$router.go(0);
+              this.option.requestUrl =
+                "/api/v1/tms/getCapacities?apiId=76&instructionsId=" +
+                this.$route.params.instructionsId +
+                "&i=" +
+                new Date();
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss'>
+<style lang="scss">
 .homeworkPath {
-  .shipName{
+  .shipName {
     display: flex;
     justify-content: center;
     align-items: center;
     margin-top: 1.25rem;
-    .text{
+    .text {
       width: 6.25rem;
       text-align: right;
       padding-right: 0.9375rem;
@@ -202,4 +230,4 @@ export default {
     align-items: center;
   }
 }
-</style>
+</style>

+ 37 - 34
src/views/TMS/components/importedShip/loadShip.vue

@@ -2,12 +2,18 @@
   <!-- 装船作业页面 -->
   <div class="shipTransport">
     <div class="top">
-     <el-input class="el-input" placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+      <el-input
+        class="el-input"
+        placeholder="请输入内容"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
       <el-button type="primary" class="btn" @click="addclick">
-            <i class="el-icon-circle-plus-outline"></i>新增
+        <i class="el-icon-circle-plus-outline"></i>新增
       </el-button>
     </div>
     <dilTable v-bind.sync="option">
@@ -37,17 +43,17 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getLoadShipList?apiId=63",
-      },
+        requestUrl: "/api/v1/tms/getLoadShipList?apiId=63"
+      }
     };
   },
-  mounted() {
-  },
+  mounted() {},
   methods: {
     onclick() {
       // this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input;
     },
     click(resultId) {
+      console.log("aaa" + resultId);
       this.$router.push("/updateLoadShip/" + resultId);
     },
     addclick() {
@@ -59,43 +65,40 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
-          this.axios
-            .post(
-              "/api/v1/tms/deleteLoadShip/" + resultId
-            )
-            .then(() => {
-                        this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-              this.$router.go(0);
+          this.axios.post("/api/v1/tms/deleteLoadShip/" + resultId).then(() => {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
             });
+            this.option.requestUrl =
+              "/api/v1/tms/getLoadShipList?apiId=63&i=" + new Date();
+          });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .shipTransport {
   .top {
-     padding: 1.25rem 0.375rem;
-     .el-input{
-       width: 20%;
-       margin-right: 40rpx;
-     }
-     .btn{
-       width: 5.5%;
-       margin-left: 0.25rem;
-     }
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 40rpx;
+    }
+    .btn {
+      width: 5.5%;
+      margin-left: 0.25rem;
+    }
   }
 }
-</style>
+</style>

+ 87 - 62
src/views/TMS/components/importedShip/shipmentInstructions.vue

@@ -2,42 +2,57 @@
   <!-- 装船指令页面 -->
   <div class="shipTransport">
     <div class="top">
-      <el-input class="el-input" placeholder="请输入内容" v-model="input" clearable> </el-input> 
+      <el-input
+        class="el-input"
+        placeholder="请输入内容"
+        v-model="input"
+        clearable
+      >
+      </el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button class="btn" type="primary" @click="btnclick(0)">
-         <i class="el-icon-circle-plus-outline"></i>新增 </el-button>
+        <i class="el-icon-circle-plus-outline"></i>新增
+      </el-button>
     </div>
-    <el-tabs v-model="activeName"  @tab-click="handleClick">
+    <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 未下发 -->
       <el-tab-pane label="未下发" name="first">
         <dilTable v-bind.sync="option" ref="table">
-          <el-table-column fixed="right" label="操作" align="center" width="180">
-        <template slot-scope="scope">
-          <el-button @click="selectclick(scope.row)" type="text" size="small"
-            >加船</el-button
-          >
-          <el-button
-            @click="issueclick(scope.row.instructionsId)"
-            type="text"
-            size="small"
-            >下发</el-button
-          >
-          <el-button
-            @click="click(scope.row.instructionsId)"
-            type="text"
-            size="small"
-            >编辑</el-button
-          >
-          <el-button
-            type="text"
-            size="small"
-            @click="deleteclick(scope.row.instructionsId)"
-            >删除</el-button
+          <el-table-column
+            fixed="right"
+            label="操作"
+            align="center"
+            width="180"
           >
-        </template>
-      </el-table-column>
+            <template slot-scope="scope">
+              <el-button
+                @click="selectclick(scope.row)"
+                type="text"
+                size="small"
+                >加船</el-button
+              >
+              <el-button
+                @click="issueclick(scope.row.instructionsId)"
+                type="text"
+                size="small"
+                >下发</el-button
+              >
+              <el-button
+                @click="click(scope.row.instructionsId)"
+                type="text"
+                size="small"
+                >编辑</el-button
+              >
+              <el-button
+                type="text"
+                size="small"
+                @click="deleteclick(scope.row.instructionsId)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
       <!-- 已下发 -->
@@ -55,26 +70,25 @@ export default {
     return {
       restaurants: [],
       input: "",
-      activeName:"first",
+      activeName: "first",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=未下发",
+        requestUrl:
+          "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=未下发"
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=已下发",
-      },
+        requestUrl:
+          "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=已下发"
+      }
     };
   },
   mounted() {},
   methods: {
-      handleClick(tab, event) {
+    handleClick(tab, event) {
       console.log(tab, event);
     },
-    onclick() {
-      // this.option.requestUrl =
-      //   "/api/v1/tms/getShipMentInstructionsList?apiId=74&con=" + this.input;
-    },
+    onclick() {},
     btnclick() {
       this.$router.push("/addShipmentInstructions/");
     },
@@ -90,7 +104,7 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
@@ -98,15 +112,20 @@ export default {
             .then(() => {
               this.$message({
                 type: "success",
-                message: "删除成功!",
+                message: "删除成功!"
               });
-              this.$router.go(0);
+              this.option.requestUrl =
+                "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=未下发&i=" +
+                new Date();
+              this.option2.requestUrl =
+                "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=已下发&i=" +
+                new Date();
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
     },
@@ -116,42 +135,48 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
-          this.$message({
-            type: "success",
-            message: "下发成功!",
-          });
           this.axios
-            .post("/api/v1/tms/sendShipmentInstructionsStatus/" + instructionsId)
+            .post(
+              "/api/v1/tms/sendShipmentInstructionsStatus/" + instructionsId
+            )
             .then(() => {
-              this.$router.go(0);
+              this.$message({
+                type: "success",
+                message: "下发成功!"
+              });
+              this.option.requestUrl =
+                "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=未下发&i=" +
+                new Date();
+              this.option2.requestUrl =
+                "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=已下发&i=" +
+                new Date();
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!",
+            message: "取消下发!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .shipTransport {
   .top {
-
-     padding: 1.25rem 0.375rem;
-     .el-input{
-       width: 20%;
-       margin-right: 40rpx;
-     }
-     .btn{
-       width: 5.5%;
-       margin-left: 0.25rem;
-     }
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 40rpx;
+    }
+    .btn {
+      width: 5.5%;
+      margin-left: 0.25rem;
+    }
   }
 }
-</style>
+</style>

+ 10 - 1
src/views/TMS/components/importedShip/updateBargeShip.vue

@@ -67,7 +67,16 @@ export default {
         ),
         bargeBackLocation: this.form1.bargeBackLocation,
       };
-      console.log(bagerShipMap);
+          if (
+        bagerShipMap.bargeOperationId == null ||
+        bagerShipMap.bargeSmallshipLoadWeight == null ||
+        bagerShipMap.bargeRefuteDate == null||
+        bagerShipMap.bargeRefuteLocation==null||
+        bagerShipMap.bargeBackDate==null||
+        bagerShipMap.bargeBackLocation==null
+      )
+        this.$message.error("存在空值!");
+      else if (!isNumber(val)) this.$message.warning("合计吨位请填写数字");
       this.axios
         .post(
           "/api/v1/tms/updateBargeOperation",

+ 1 - 4
src/views/TMS/components/importedShip/updateInstructionsCapacity.vue

@@ -36,9 +36,6 @@ export default {
         .then((res) => {
           res.data.data.forEach((e) => {
             this.form1 = e;
-            // console.log(e);
-            // console.log(this.form1);
-            // console.log(this.$route.params.loadingId);
           });
         });
     },
@@ -66,7 +63,7 @@ export default {
           this.form1.instructionEsarrivalTime
         ),
       };
-      console.log(omsshipInstructionsCapacity);
+     
       this.axios
         .post(
           "/api/v1/tms/updateInstructionsCapacity",

+ 14 - 4
src/views/TMS/components/importedShip/updateLoadShip.vue

@@ -36,9 +36,6 @@ export default {
         .then((res) => {
           res.data.data.forEach((e) => {
             this.form1 = e;
-            // console.log(e);
-            // console.log(this.form1);
-            // console.log(this.$route.params.loadingId);
           });
         });
     },
@@ -69,7 +66,20 @@ export default {
         ),
         resultIsClear: this.form1.resultIsClear,
       };
-      console.log(mapVal);
+              //判断放货数量是否为数字
+       function isNumber() {
+        var value = mapVal.resultActualInstallations;
+        //验证是否为数字
+        var patrn = /^(-)?\d+(\.\d+)?$/;
+        if (patrn.exec(value) == null || value == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      var val=this.value;
+    
+    
       this.axios
         .post(
           "/api/v1/tms/updateLoadShip",

+ 62 - 41
src/views/TMS/components/importedShip/updateShipmentInstructions.vue

@@ -4,8 +4,8 @@
     <page-title>返回</page-title>
     <div class="form">
       <div class="form_box">
-          <dil-form :formId="114" v-model="form1" ref="from1"></dil-form>
-      </div> 
+        <dil-form :formId="114" v-model="form1" ref="from1"></dil-form>
+      </div>
     </div>
     <!-- 确定和取消 -->
     <div class="button_box">
@@ -20,11 +20,11 @@ import PageTitle from "@/components/Page/Title";
 import { sjTime } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
- data(){
-     return {
+  data() {
+    return {
       form1: {},
-  }
- },
+    };
+  },
   mounted() {
     this.information();
   },
@@ -32,13 +32,13 @@ export default {
     information() {
       //编辑装船指令
       this.axios
-        .post("/api/v1/tms/getShipmentInstructions/" + this.$route.params.instructionsId)
+        .post(
+          "/api/v1/tms/getShipmentInstructions/" +
+            this.$route.params.instructionsId
+        )
         .then((res) => {
           res.data.data.forEach((e) => {
             this.form1 = e;
-            // console.log(e);
-            // console.log(this.form1);
-            // console.log(this.$route.params.loadingId);
           });
         });
     },
@@ -55,54 +55,75 @@ export default {
     // 确认
     onClickConfirm() {
       let omsshipShipmentInstructions = {
-        shipmentInstructionsId:this.$route.params.instructionsId,
+        shipmentInstructionsId: this.$route.params.instructionsId,
         // batchId: this.form1.batchId,
         instructionsTotalTonnage: this.form1.instructionsTotalTonnage,
-        instructionTime: sjTime(
-          this.form1.instructionTime
-        ),
+        instructionTime: sjTime(this.form1.instructionTime),
       };
-      this.axios
-        .post("/api/v1/tms/updateShipmentInstructions",
-          omsshipShipmentInstructions)
-        .then((res) => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "修改成功!",
-            });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
-          } else {
-            this.$message.error("修改失败!");
-          }
-          this.$refs['table'].resetField();
-        });
+
+      //判断合计吨位是否为数字
+      function isNumber() {
+        var value = omsshipShipmentInstructions.instructionsTotalTonnage;
+        //验证是否为数字
+        var patrn = /^(-)?\d+(\.\d+)?$/;
+        if (patrn.exec(value) == null || value == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      var val = this.value;
+    
+      if (
+        omsshipShipmentInstructions.instructionsTotalTonnage == null ||
+        omsshipShipmentInstructions.instructionTime==null
+      )
+        this.$message.error("存在空值!");
+      else if (!isNumber(val)) this.$message.warning("合计吨位请填写数字");
+      else
+        this.axios
+          .post(
+            "/api/v1/tms/updateShipmentInstructions",
+            omsshipShipmentInstructions
+          )
+          .then((res) => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "修改成功!",
+              });
+              // this.$refs.table.refreshData();
+              this.$router.go(-1);
+            } else {
+              this.$message.error("修改失败!");
+            }
+            this.$refs["table"].resetField();
+          });
     },
   },
 };
 </script>
 <style lang="scss">
-.shipTransport{
-  .form{
+.shipTransport {
+  .form {
     display: flex;
-    .form_box{
+    .form_box {
       width: 320px;
       margin-left: 35%;
       margin-top: 30px;
       margin-right: 20px;
-      .el-form{
-        .preview-group{
-          .el-form-item{
-            .el-form-item__label{
+      .el-form {
+        .preview-group {
+          .el-form-item {
+            .el-form-item__label {
               display: inline-block;
               width: 70px !important;
             }
-            .el-form-item__content{
-              .el-select{
+            .el-form-item__content {
+              .el-select {
                 width: 250px;
               }
-              .el-input{
+              .el-input {
                 width: 250px;
               }
             }
@@ -111,7 +132,7 @@ export default {
       }
     }
   }
-  .button_box{
+  .button_box {
     margin-left: 45%;
   }
 }

+ 2 - 0
src/views/TMS/router/index.js

@@ -137,6 +137,7 @@ import updateShipLocation from '../components/importedShip/updateShipLocation'
 import updateShipmentInstructions from '../components/importedShip/updateShipmentInstructions'
 import updateUnloadShip from '../components/importedShip/updateUnloadShip.vue'
 import updateWaterQuality from '../components/importedShip/updateWaterQuality.vue'
+import updateLoadShip from '../components/importedShip/updateLoadShip.vue'
 import waterQuality from '../components/importedShip/waterQuality.vue'
 
 import assignmentPlan from '../components/importedTruck/assignmentPlan.vue'
@@ -345,6 +346,7 @@ const constantRouterMap = [
       {path: 'updateUnloadShip/:resultId', name: 'updateUnloadShip', meta: {code: 'xtpzgl-yhgl'}, component: updateUnloadShip},
       {path: 'updateWaterQuality/:resultId', name: 'updateWaterQuality', meta: {code: 'xtpzgl-yhgl'}, component: updateWaterQuality},
       {path: 'waterQuality', name: 'waterQuality', meta: {code: 'xtpzgl-yhgl'}, component: waterQuality},
+      {path: 'updateLoadShip/:resultId', name: 'updateLoadShip', meta: {code: 'xtpzgl-yhgl'}, component: updateLoadShip},
 
       {path: 'assignmentPlan', name: 'assignmentPlan', meta: {code: 'xtpzgl-yhgl'}, component: assignmentPlan},
       {path: 'breakdownPlan', name: 'breakdownPlan', meta: {code: 'xtpzgl-yhgl'}, component: breakdownPlan},

+ 3 - 21
src/views/appoint/components/saleContract/saleOrder.vue

@@ -79,22 +79,10 @@ export default {
       endDate: new Date(),
       activeName: "four",
       input: "",
-      option: {
-        // 表格请求数据的地址
-        requestUrl: "/api/v1/ams/getSaleOrderInfoes?apiId=408"
-      },
-      option2: {
-        // 表格请求数据的地址
-        requestUrl: "/api/v1/ams/getSaleOrderReportedes?apiId=408"
-      },
-      option3: {
-        // 表格请求数据的地址
-        requestUrl: "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409"
-      },
       option4: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=2"
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=475&shipperId=2"
         // &startDate="+sjTime(new Date().getTime() - 3600 * 1000 * 24 * 85)+"&endDate="+sjTime(new Date()),
       },
 
@@ -154,15 +142,9 @@ export default {
       console.log(tab, event);
     },
     onclick() {
-      if (this.activeName == "first") {
-        this.option.requestUrl =
-          "/api/v1/ams/getSaleOrderInfoes?apiId=408&con=" + this.input;
-      } else if (this.activeName == "second") {
-        this.option2.requestUrl =
-          "/api/v1/ams/getSaleOrderReportedes?apiId=408&con=" + this.input;
-      } else if (this.activeName == "four") {
+      if (this.activeName == "four") {
         this.option4.requestUrl =
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=2&con=" +
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=475&shipperId=2&con=" +
           this.input;
       }
     },

+ 32 - 1
src/views/appoint/components/ship/addCargoResult.vue

@@ -105,6 +105,7 @@ export default {
       },
     };
   },
+  
   mounted() {},
   methods: {
     currentRadioChange() {
@@ -126,6 +127,9 @@ export default {
     currentRadioChange3(selection) {
       (this.second2.mapList3 = selection), (this.receiver = selection.pierName);
     },
+    
+
+
 
     // 确定git
     makeSure() {
@@ -153,7 +157,32 @@ export default {
         materialId: this.second.mapList1.materialId,
         userId:getCookie("userId")
       };
-      console.log(AmsshipCargoTransferResult)
+       //判断放货数量是否为数字
+       function isNumber() {
+        var value = AmsshipCargoTransferResult.resultNumberOfLoans;
+        //验证是否为数字
+        var patrn = /^(-)?\d+(\.\d+)?$/;
+        if (patrn.exec(value) == null || value == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      //判断是否为电话号码
+       function isTelePhone() {
+        var value2 = AmsshipCargoTransferResult.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 val2=this.value2;
+      var val = this.value;
       if (
         AmsshipCargoTransferResult.foreignShipName == null ||
         AmsshipCargoTransferResult.resultNumberOfLoans == null ||
@@ -161,6 +190,8 @@ export default {
         AmsshipCargoTransferResult.resultTelephoneFax == null
       )
         this.$message.error("存在空值!");
+          else if (!isNumber(val)) this.$message.warning("放货数量必须为数字");
+            else if (!isTelePhone(val2)) this.$message.warning("电话号码或传真格式不正确");  
       else
         this.axios
           .post(

+ 91 - 53
src/views/appoint/components/ship/addDeliveryAttorney.vue

@@ -4,11 +4,11 @@
     <page-title>返回</page-title>
     <div class="form">
       <div class="form_box">
-          <dil-form :formId="113" v-model="form1" ref="from1"></dil-form>
+        <dil-form :formId="113" v-model="form1" ref="from1"></dil-form>
       </div>
       <div class="liulan">
-          <el-button type="primary" class="btn" @click="onDrawer">浏览</el-button>
-      </div>     
+        <el-button type="primary" class="btn" @click="onDrawer">浏览</el-button>
+      </div>
     </div>
     <!-- 确定和取消 -->
     <div class="button_box">
@@ -25,7 +25,7 @@
       <el-input
         placeholder="请输入内容"
         v-model="input"
-        style="margin-top: 10px; margin-left: 20px; width:250px"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
         clearable
       >
       </el-input>
@@ -46,7 +46,7 @@
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
@@ -58,11 +58,17 @@ export default {
       options: {
         requestUrl: "/api/v1/tms/getBatchListForAttorney?apiId=375",
         selectionType: "radio",
-        maplist: [],
+        maplist: []
       },
-      batchIds:"",
+      batchIds: "",
       form1: {},
       value: undefined,
+      value2: undefined
+    };
+  },
+  created() {
+    this.form1 = {
+      downSwimPortId: 11
     };
   },
   mounted() {},
@@ -77,19 +83,23 @@ export default {
     handleClose(done) {
       done();
     },
-    currentRadioChange1(radio) {
-      this.form1 = {
-        batchId: radio.resultForeignShipName + radio.materialName,
-      };
-      this.batchIds = radio.batchId
+    currentRadioChange1(selection) {
+      this.maplist = selection;
+      if (JSON.stringify(this.maplist).length > 2) {
+        this.$set(
+          this.form1,
+          "batchId",
+          selection.resultForeignShipName + selection.materialName
+        );
+        this.batchIds = selection.batchId;
+      }
     },
     // 确定
     makeSure() {
-      console.log("批次号"+this.batchIds)
       // 判断用户是否输入了批次号
-      if(this.batchIds==""||this.batchIds==undefined){
-        this.$message.warning("请选择批次号")
-        return
+      if (this.batchIds == "" || this.batchIds == undefined) {
+        this.$message.warning("请选择批次号");
+        return;
       }
       let AmsshipDeliveryAttorney = {
         downSwimPortId: this.form1.downSwimPortId,
@@ -101,56 +111,86 @@ export default {
         noticeId: this.form1.noticeId,
         portId: this.form1.portId,
         attorneyPickupContactPerson: this.form1.attorneyPickupContactPerson,
-        userId:getCookie("userId"),
+        userId: getCookie("userId")
         // resultMemo: this.form1.resultMemo,
       };
-      console.log(AmsshipDeliveryAttorney)
+      //身份证校验
+      function checkCardNo() {
+        var value3 = AmsshipDeliveryAttorney.attorenyPickupIdcard;
+        //验证是否为数字
+        var patrn = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;
+        // var patrn2 = /^(\d{3,4}-)?\d{7,8}$/;
+        if (patrn.exec(value3) == null || value3 == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+
+      //判断是否为电话号码
+      function isTelePhone() {
+        var value2 = AmsshipDeliveryAttorney.attorneyContactTelephone;
+        //验证是否为数字
+        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 val2 = this.value2;
+      var val3 = this.value3;
+
       if (
         // AmsshipDeliveryAttorney.attorneyId==null||
         // AmsshipDeliveryAttorney.downSwimPortId == null ||
-        // AmsshipDeliveryAttorney.attorenyPickupIdcard == null ||
-        // AmsshipDeliveryAttorney.attorneyContactTelephone == null ||
+        AmsshipDeliveryAttorney.attorenyPickupIdcard == null ||
+        AmsshipDeliveryAttorney.attorneyContactTelephone == null ||
         AmsshipDeliveryAttorney.attorneyPickupContactPerson == null
       )
         this.$message.error("存在空值,请核实以后再提交");
+      else if (!isTelePhone(val2)) this.$message.warning("联系电话格式不正确");
+      else if (!checkCardNo(val3))
+        this.$message.warning("请输入正确的身份证格式");
       else
         this.axios
           .post(
             "/api/v1/tms/insertshipDeliveryAttorney",
             AmsshipDeliveryAttorney
           )
-          .then((res) => {
+          .then(res => {
             this.$router.go(-1);
           });
     },
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss'>
-.shipTransport{
-  .form{
+<style lang="scss">
+.shipTransport {
+  .form {
     display: flex;
-    .form_box{
+    .form_box {
       width: 320px;
       margin-left: 35%;
       margin-top: 30px;
       margin-right: 20px;
-      .el-form{
-        .preview-group{
-          .el-form-item{
-            .el-form-item__label{
+      .el-form {
+        .preview-group {
+          .el-form-item {
+            .el-form-item__label {
               display: inline-block;
               width: 70px !important;
             }
-            .el-form-item__content{
-              .el-select{
+            .el-form-item__content {
+              .el-select {
                 width: 250px;
               }
-              .el-input{
+              .el-input {
                 width: 250px;
               }
             }
@@ -159,27 +199,25 @@ export default {
       }
     }
   }
-  .liulan{
-      width: 120px;
-      margin-top: 30px;
-      .el-button{
-        width: 100px !important;
-        margin: auto;
-      }
-      .btn{
-        margin-top: 0px;
-      }
-      .btn1{
-        margin-top: 13px;
-      }
-      .btn2{
-        margin-top: 67px;
-      }
+  .liulan {
+    width: 120px;
+    margin-top: 30px;
+    .el-button {
+      width: 100px !important;
+      margin: auto;
+    }
+    .btn {
+      margin-top: 0px;
+    }
+    .btn1 {
+      margin-top: 13px;
+    }
+    .btn2 {
+      margin-top: 67px;
+    }
   }
-  .button_box{
+  .button_box {
     margin-left: 45%;
   }
 }
-
 </style>
-

+ 166 - 98
src/views/appoint/components/ship/addDeliveryNotice.vue

@@ -4,11 +4,16 @@
     <page-title>返回</page-title>
     <div class="form">
       <div class="form_box">
-          <dil-form :formId="112" v-model="form1" ref="from1" @change="onchange"></dil-form>
+        <dil-form
+          :formId="112"
+          v-model="form1"
+          ref="from1"
+          @change="onchange"
+        ></dil-form>
       </div>
       <div class="liulan">
-          <el-button type="primary" class="btn" @click="onDrawer">浏览</el-button>
-      </div>     
+        <el-button type="primary" class="btn" @click="onDrawer">浏览</el-button>
+      </div>
     </div>
     <!-- 确定和取消 -->
     <div class="button_box">
@@ -22,131 +27,194 @@
       :before-close="handleClose"
       size="50%"
     >
-      <el-input placeholder="请输入内容" v-model="input"  style="margin-top:10px;margin-left:20px;width:250px" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick()"  style="margin-bottom:15px">
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick()"
+        style="margin-bottom: 15px"
+      >
         <i class="el-icon-search"></i>查询
       </el-button>
-    <dilTable v-bind.sync="options" @radio-change="currentRadioChange1" ></dilTable>
+      <dilTable
+        v-bind.sync="options"
+        @radio-change="currentRadioChange1"
+      ></dilTable>
     </el-drawer>
   </div>
 </template>
 
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      input:'',
-      drawer:false,
-      direction:"rtl",
-      batchId:"",
+      input: "",
+      drawer: false,
+      direction: "rtl",
+      batchId: null,
       form1: {},
-      options:{
-        requestUrl:"/api/v1/tms/getBatchListForAttorney?apiId=375",
-        selectionType:"radio",
-        maplist:[]
+      options: {
+        requestUrl: "/api/v1/tms/getBatchListForAttorney?apiId=375",
+        selectionType: "radio",
+        maplist: []
       },
       value: undefined,
+      value2: undefined,
+      value4: undefined,
+      value5: undefined,
+      value6: undefined,
+      value7: undefined,
+      value8: undefined
     };
   },
-  mounted() {},
+  mounted() {
+    this.$set(this.form1, "requesterGroupId", 1);
+    this.$set(this.form1, "carrierId", 11);
+  },
   methods: {
-    onDrawer(){
-        this.drawer = true
-    },
-    onchange(val){
-     
+    onDrawer() {
+      this.drawer = true;
     },
-    onclick(){
-        this.options.requestUrl = "/api/v1/tms/getBatchList?apiId=375&con=" + this.input
+    onchange(val) {},
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/tms/getBatchList?apiId=375&con=" + this.input;
     },
-    currentRadioChange1(selection){
-        this.maplist = selection
-        this.form1 = { batchId:selection.resultForeignShipName + selection.materialName}
+    currentRadioChange1(selection) {
+      this.maplist = selection;
+      if (JSON.stringify(this.maplist).length > 2) {
+        this.$set(
+          this.form1,
+          "batchId",
+          selection.resultForeignShipName + selection.materialName
+        );
         this.batchId = selection.batchId;
+      }
     },
-    handleClose(done){
-        done();
+    handleClose(done) {
+      done();
     },
-     makeSure() {
+    makeSure() {
       // 判断批次号选择是否为空
-      if(this.batchId==""||this.batchId==undefined){
-        this.$message.warning("请选择批次号")
-        return
+      if (this.batchId == "" || this.batchId == undefined) {
+        this.$message.warning("请选择批次号");
+        return;
       }
       let map = {
-       carrierId:this.form1.carrierId,
-       requesterGroupId:this.form1.requesterGroupId,
-       noticeCommerceMethod:this.form1.noticeCommerceMethod,
-       noticeHandoverMethod:this.form1.noticeHandoverMethod,
-       portId:this.form1.portId,
-       noticePortConstructionFee:this.form1.noticePortConstructionFee,
-       noticeDeliveryTime:sjTime(this.form1.noticeDeliveryTime),
-       noticePileFreeDays:this.form1.noticePileFreeDays,
-       batchId:this.batchId,
-       purchaseContractUnitPrice:this.form1.purchaseContractUnitPrice,
-       purchaseContractMoisture:this.form1.purchaseContractMoisture,
-       purchaseContractQualityindex:this.form1.purchaseContractQualityindex,
-       //微元素含量
-       tfeContent:this.form1.tfeContent,
-       silicaContent:this.form1.silicaContent,
-       aluminaContent:this.form1.aluminaContent,
-       phosphorusContent:this.form1.phosphorusContent,
-       manganeseContent:this.form1.manganeseContent,
-       userId:getCookie("userId")
-       
+        carrierId: this.form1.carrierId,
+        requesterGroupId: this.form1.requesterGroupId,
+        noticeCommerceMethod: this.form1.noticeCommerceMethod,
+        noticeHandoverMethod: this.form1.noticeHandoverMethod,
+        portId: this.form1.portId,
+        noticePortConstructionFee: this.form1.noticePortConstructionFee,
+        noticeDeliveryTime: sjTime(this.form1.noticeDeliveryTime),
+        noticePileFreeDays: this.form1.noticePileFreeDays,
+        batchId: this.batchId,
+        purchaseContractUnitPrice: this.form1.purchaseContractUnitPrice,
+        purchaseContractMoisture: this.form1.purchaseContractMoisture,
+        //微元素含量
+        tfeContent: this.form1.tfeContent,
+        silicaContent: this.form1.silicaContent,
+        aluminaContent: this.form1.aluminaContent,
+        phosphorusContent: this.form1.phosphorusContent,
+        manganeseContent: this.form1.manganeseContent,
+        userId: getCookie("userId")
       };
-      console.log(map)
+      console.log(map.noticePileFreeDays);
+      //判断放货数量是否为数字
+      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
+      ) {
+        this.$message.error("存在空值!");
+        return;
+      }
       if (
-        // AmsshipDeliveryAttorney.attorneyId==null||
-        // AmsshipDeliveryAttorney.downSwimPortId==null||
-        // AmsshipDeliveryAttorney.attorenyPickupIdcard==null||
-        // AmsshipDeliveryAttorney.attorneyContactTelephone==null||
-        // AmsshipDeliveryAttorney.attorneyTime==null||
-        // AmsshipDeliveryAttorney.attorneyPdffile==null
-        map.noticeHandoverMethod==null
-      ) this.$message.error("存在空值!");
-      else
-      this.axios
-        .post(
-          "/api/v1/tms/insertDeliveryNotice",
-           map
-        )
-        .then((res) => {
+        typeof map.noticePileFreeDays != "undefined" &&
+        !isNumber(map.noticePileFreeDays)
+      ) {
+        this.$message.error("免堆天数得为数字");
+        return;
+      }
+      {
+        var value2 = map.purchaseContractUnitPrice;
+        var value4 = map.tfeContent;
+        var value5 = map.silicaContent;
+        var value6 = map.aluminaContent;
+        var value7 = map.phosphorusContent;
+        var value8 = map.manganeseContent;
+        //验证是否为数字
+      }
+      if (
+        typeof map.noticePileFreeDays != "undefined" &&
+        !isNumber(map.noticePileFreeDays)
+      ) {
+        this.$message.error("免堆天数得为数字");
+        return;
+      } else
+        this.axios.post("/api/v1/tms/insertDeliveryNotice", map).then(res => {
+          if (res.data.code == 200) {
+            // this.$router.push("/ship/cargoResult");
+            this.$message({
+              type: "success",
+              message: "新增成功"
+            });
+          } else {
+            this.$message({
+              message: res.data.data
+            });
+          }
           this.$router.go(-1);
         });
     },
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss'>
-.shipTransport{
-  .form{
+<style lang="scss">
+.shipTransport {
+  .form {
     display: flex;
-    .form_box{
+    .form_box {
       width: 320px;
       margin-left: 35%;
       margin-top: 30px;
       margin-right: 20px;
-      .el-form{
-        .preview-group{
-          .el-form-item{
-            .el-form-item__label{
+      .el-form {
+        .preview-group {
+          .el-form-item {
+            .el-form-item__label {
               display: inline-block;
               width: 70px !important;
             }
-            .el-form-item__content{
-              .el-select{
+            .el-form-item__content {
+              .el-select {
                 width: 250px;
               }
-              .el-input{
+              .el-input {
                 width: 250px;
               }
             }
@@ -155,24 +223,24 @@ export default {
       }
     }
   }
-  .liulan{
-      width: 120px;
-      margin-top: 30px;
-      .el-button{
-        width: 100px !important;
-        margin: auto;
-      }
-      .btn{
-        margin-top: 0px;
-      }
-      .btn1{
-        margin-top: 13px;
-      }
-      .btn2{
-        margin-top: 67px;
-      }
+  .liulan {
+    width: 120px;
+    margin-top: 30px;
+    .el-button {
+      width: 100px !important;
+      margin: auto;
+    }
+    .btn {
+      margin-top: 0px;
+    }
+    .btn1 {
+      margin-top: 13px;
+    }
+    .btn2 {
+      margin-top: 67px;
+    }
   }
-  .button_box{
+  .button_box {
     margin-left: 45%;
   }
 }

+ 199 - 138
src/views/appoint/components/ship/attorneytext.vue

@@ -1,103 +1,173 @@
 <template>
   <div class="tableAllDate">
-      <page-title>返回</page-title>
-      <div id="pdfDom">
-      <div class="blank">
-      </div>
+    <page-title>返回</page-title>
+    <div id="pdfDom">
+      <div class="blank"></div>
       <!-- 循环遍历传过来的数组中的所有的对象,生成多张提货委托书 -->
-      <div >
-          <div class="title">
+      <div
+        v-for="(item, index) in amsShipDeliveryNameLists"
+        :key="index"
+        style="margin-top:40px"
+      >
+        <div class="title">
           <i class="titleText" align="center">委托书</i>
         </div>
         <div>
-        <!-- tablePart0 -->
-          <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;font-size:20px;" width="1000px" class="tablePart0">
-          <tr>
-            <td style="width :100%">江苏{{attorneyMap.carrierName}}港口集团股份有限公司:</td>
-          </tr>
+          <!-- tablePart0 -->
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin: auto;font-size:20px;"
+            width="1000px"
+            class="tablePart0"
+          >
+            <tr>
+              <td style="width :100%">
+                江苏{{ item.carrierName }}港口集团股份有限公司:
+              </td>
+            </tr>
           </table>
         </div>
         <div class="tableBody">
           <!-- tablePart1 -->
-          <table border="0" cellpadding="10" cellspacing="0" style="margin-top: 5px;" width="1000px" class="tablePart1">
-          <tr>
-            <td style="width :100%" padding-right="20px">兹委任重庆市万州区万港船务有限公司
-                前来贵港办理我公司的货权提货和水路运输事宜,品种:{{attorneyMap.materialName}};外轮船名:{{attorneyMap.resultForeignShipName}};
-                数量:{{attorneyMap.purchaseOrderMaterialNum}}
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin-top: 5px;"
+            width="1000px"
+            class="tablePart1"
+          >
+            <tr>
+              <td style="width :100%" padding-right="20px">
+                兹委任重庆市万州区万港船务有限公司
+                前来贵港办理我公司的货权提货和水路运输事宜,品种:{{
+                  item.materialName
+                }};外轮船名:{{ item.resultForeignShipName }}; 数量:{{
+                  item.purchaseOrderMaterialNum
+                }}
                 湿吨(如遇最后一批提货,须清场);物流流向:万州港。望贵公司予以支持为盼。
-            </td>
-          </tr>
+              </td>
+            </tr>
           </table>
+
           <!-- tablePart2 -->
-          <table border="0" cellpadding="10" cellspacing="0" style="
-          border-top: 0px" width="1000px" class="tablePart2">
-          <tr>
-            <th style="width :16.5%">提货联系人:</th>
-            <td style="width :10.5%">{{attorneyMap.attorneyPickupContactPerson}}</td>
-            <th style="width :14%">身份证号:</th>
-            <td style="width :59%">{{attorneyMap.attorneyPickupIdcard}}</td>
-          </tr>
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="
+          border-top: 0px"
+            width="1000px"
+            class="tablePart2"
+          >
+            <tr>
+              <th style="width :16.5%">提货联系人:</th>
+              <td style="width :10.5%">
+                {{ item.attorneyPickupContactPerson }}
+              </td>
+              <th style="width :14%">身份证号:</th>
+              <td style="width :59%">{{ item.attorneyPickupIdcard }}</td>
+            </tr>
           </table>
+
           <!-- tablePart3 -->
-          <table border="0" cellpadding="10" cellspacing="0" style="
-          border-top: 0px" width="1000px" class="tablePart3">
-          <tr>
-            <th style="width :16.5%">联系电话:</th>
-            <td style="width :83.5%">{{attorneyMap.attorneyContactTelephone}}</td>
-          </tr>
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="
+          border-top: 0px"
+            width="1000px"
+            class="tablePart3"
+          >
+            <tr>
+              <th style="width :16.5%">联系电话:</th>
+              <td style="width :83.5%">
+                {{ item.attorneyContactTelephone }}
+              </td>
+            </tr>
           </table>
+
           <!-- tablePart4 -->
-          <table border="1" cellpadding="10" cellspacing="0" style="
-          border-top: 0px" width="1000px" class="tablePart4">
-          <tr>
-            <th style="width :10.5%">顺颂商祺!</th>
-          </tr>
+          <table
+            border="1"
+            cellpadding="10"
+            cellspacing="0"
+            style="
+          border-top: 0px"
+            width="1000px"
+            class="tablePart4"
+          >
+            <tr>
+              <th style="width :10.5%">顺颂商祺!</th>
+            </tr>
           </table>
-          <!-- tablePart5 -->
-          <table border="1" cellpadding="10" cellspacing="0" style="
-          border-top: 0px" width="1000px" class="tablePart5">
-          <tr>
-            <th style="width :10.5%">(传真件/扫描件有效)</th>
-          </tr>
+
+          <table
+            border="1"
+            cellpadding="10"
+            cellspacing="0"
+            style="
+          border-top: 0px"
+            width="1000px"
+            class="tablePart5"
+          >
+            <tr>
+              <th style="width :10.5%">(传真件/扫描件有效)</th>
+            </tr>
           </table>
         </div>
         <div>
           <!-- tablePart6 -->
-          <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;margin-top: 5px;font-size:20px;" width="1000px" class="tablePart6">
-          <tr>
-            <td style="width :48.5%">{{attorneyMap.shipperName}}</td>
-          </tr>
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin: auto;margin-top: 5px;font-size:20px;"
+            width="1000px"
+            class="tablePart6"
+          >
+            <tr>
+              <td style="width :48.5%">{{ item.shipperName }}</td>
+            </tr>
           </table>
         </div>
         <div>
-        <!-- tablePart7 -->
-        <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;margin-top: 5px;font-size:20px;" width="1000px" class="tablePart7">
-        <tr>
-          <td style="width :63%"></td>
-          <td style="width :5%">{{year}}</td>
-          <th style="width :8%">年</th>
-          <td style="width :3%">{{month}}</td>
-          <th style="width :8%">月</th>
-          <td style="width :3%">{{date}}</td>
-          <th style="width :5%">日</th>
-        </tr>
-        </table>
-      </div>
-      </div>
-      </div>
-      <div class="buttns">
-        <el-button class="buttn"  type="primary" @click="getPdf()">
-            <i class="el-icon-download">{{"\xa0\xa0"}}</i>导出(pdf)
-        </el-button>
-        <el-button class="buttn"  type="primary" v-print="'#pdfDom'" @click="backScan()">
-            <i class="el-icon-printer">{{"\xa0\xa0"}}</i>打印
-        </el-button>
+          <!-- tablePart7 -->
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin: auto;margin-top: 5px;font-size:20px;"
+            width="1000px"
+            class="tablePart7"
+          >
+            <tr>
+              <td style="width :63%"></td>
+              <td style="width :5%">{{ item.year }}</td>
+              <th style="width :8%">年</th>
+              <td style="width :3%">{{ item.month }}</td>
+              <th style="width :8%">月</th>
+              <td style="width :3%">{{ item.date }}</td>
+              <th style="width :5%">日</th>
+            </tr>
+          </table>
+        </div>
       </div>
+    </div>
+    <div class="buttns">
+      <el-button class="buttn" type="primary" @click="getPdf()">
+        <i class="el-icon-download">{{ "\xa0\xa0" }}</i
+        >导出(pdf)
+      </el-button>
+    </div>
   </div>
 </template>
 
 <script>
-import table from '@/components/DilCommonUI/packages/table/src/table.vue';
+import table from "@/components/DilCommonUI/packages/table/src/table.vue";
 import PageTitle from "@/components/Page/Title";
 export default {
   components: { table },
@@ -105,92 +175,83 @@ export default {
   name: "Login",
   data() {
     return {
-      amsShipDeliveryNameLists:[],
-      attorneyMap:{
-        carrierName:"",
-        materialName: "",
-        resultForeignShipName: "",
-        purchaseOrderMaterialNumber:"",
-        attorneyPickupContactPerson:"",
-        attorneyPickupIdcard:"",
-        attorneyContactTelephone:"",
-        shipperName:"",
-        attorneyTime:"",
-        year:"",
-        month:"",
-        date:"",
-      },
-      htmlTitle: '委托书'
+      amsShipDeliveryNameLists: [],
+      htmlTitle: "委托书"
     };
   },
-  created(){
-      this.getwts();
+  created() {
+    this.getwts();
   },
   methods: {
-      backScan(){
-        this.$router.go(-2);
-      },
-      getwts(){
-        // console.log(this.$route.params.test)
-        this.amsShipDeliveryNameLists=JSON.parse(this.$route.params.test).amsShipDeliveryNameList
-        // this.amsShipDeliveryNameLists = this.$route.params.test;
-        console.log(this.amsShipDeliveryNameLists)
-        for(let i =0;i<this.amsShipDeliveryNameLists.length;i++){
-            this.attorneyMap = this.amsShipDeliveryNameLists[i];
-            this.year=this.attorneyMap.attorneyTime.split('-')[0]
-            this.month=this.attorneyMap.attorneyTime.split('-')[1]
-            this.date=this.attorneyMap.attorneyTime.split('-')[2].split(" ")[0]
-        }
-      }
-      
-  },
-  
+    backScan() {
+      this.$router.go(-2);
+    },
+    getwts() {
+      // console.log(this.$route.params.test)
+      this.amsShipDeliveryNameLists = JSON.parse(
+        this.$route.params.test
+      ).amsShipDeliveryNameList;
+      console.log(this.amsShipDeliveryNameLists);
+      // this.amsShipDeliveryNameLists = this.$route.params.test;
+      console.log(this.amsShipDeliveryNameLists);
+      this.amsShipDeliveryNameLists.forEach(e => {
+        e.year = e.attorneyTime.split("-")[0];
+        e.month = e.attorneyTime.split("-")[1];
+        e.date = e.attorneyTime.split("-")[2].split(" ")[0];
+      });
+    }
+  }
 };
 </script>
 
 <style lang="scss" scoped>
-.title{
-    text-align: center;
-    margin-bottom: 30px;
-    .titleText{
+.title {
+  text-align: center;
+  margin-bottom: 30px;
+  .titleText {
     font-size: 30px;
-    }   
+  }
 }
-.buttns{
-    display: flex;
-    flex-wrap: nowrap;
-    margin-top: 20px;
-    margin-left: 900px;
-    .buttn{
-        margin-left: 10px;
-        width: 130px;
-    }
+.buttns {
+  display: flex;
+  flex-wrap: nowrap;
+  margin-top: 20px;
+  margin-left: 900px;
+  .buttn {
+    margin-left: 10px;
+    width: 130px;
+  }
 }
-.tableBody{
-  table, th, td
-  {
-      border: 0px solid black;
-      font-size:20px;
-      margin: auto;
+.tableBody {
+  table,
+  th,
+  td {
+    border: 0px solid black;
+    font-size: 20px;
+    margin: auto;
   }
-  .tablePart1 th{
-      border-top: 1px solid black;
+  .tablePart1 th {
+    border-top: 1px solid black;
   }
-  .tablePart2 td,th{
-    border-top: 0px
+  .tablePart2 td,
+  th {
+    border-top: 0px;
   }
-  .tablePart3 td,th{
-    border-top: 0px
+  .tablePart3 td,
+  th {
+    border-top: 0px;
   }
-  .tablePart4 td,th{
-    border-top: 0px
+  .tablePart4 td,
+  th {
+    border-top: 0px;
   }
-  .tablePart5 td,th{
-    border-top: 0px
+  .tablePart5 td,
+  th {
+    border-top: 0px;
   }
 }
-.blank{
+.blank {
   width: 100%;
   height: 50px;
 }
-</style>
+</style>

+ 25 - 21
src/views/appoint/components/ship/cargoResult.vue

@@ -2,10 +2,10 @@
   <!-- 货权转移页面 -->
   <div class="shipTransport">
     <div class="top">
-     <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
- <el-button type="primary" class="btn" @click="onclick">
- <i class="el-icon-search"></i>查询
- </el-button>
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
       <el-button type="primary" class="btn" @click="addClick">
         <i class="el-icon-circle-plus-outline"></i>新增
       </el-button>
@@ -13,7 +13,10 @@
     <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" width="100">
         <template slot-scope="scope">
-          <el-button @click="modifyclick(scope.row.cargoTransferResultId)" type="text" size="small"
+          <el-button
+            @click="modifyclick(scope.row.cargoTransferResultId)"
+            type="text"
+            size="small"
             >修改</el-button
           >
           <el-button
@@ -37,21 +40,22 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAmsshipCargoTranferResultList?apiId=66",
-      },
+        requestUrl: "/api/v1/tms/getAmsshipCargoTranferResultList?apiId=66"
+      }
     };
   },
 
   methods: {
     onclick() {
-      console.log(this.input)
-      this.option.requestUrl = "/api/v1/tms/getAmsshipCargoTranferResultList?apiId=66&con=" + this.input;
+      this.option.requestUrl =
+        "/api/v1/tms/getAmsshipCargoTranferResultList?apiId=66&con=" +
+        this.input;
     },
     addClick() {
       this.$router.push("/addCargoResult/");
     },
-    modifyclick(cargoTransferResultId){
-       this.$router.push("/modifyCargoResult/" + cargoTransferResultId);
+    modifyclick(cargoTransferResultId) {
+      this.$router.push("/modifyCargoResult/" + cargoTransferResultId);
     },
     deleteclick(scope) {
       let cargoTransferResultId = scope;
@@ -59,32 +63,32 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "删除成功!",
+            message: "删除成功!"
           });
           this.axios
-            .post(
-              "/api/v1/tms/deleteByCargoId/" + cargoTransferResultId
-            )
+            .post("/api/v1/tms/deleteByCargoId/" + cargoTransferResultId)
             .then(() => {
-              this.$router.go(0);
+              this.option.requestUrl =
+                "/api/v1/tms/getAmsshipCargoTranferResultList?apiId=66&i=" +
+                new Date();
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .shipTransport {
   .top {
     padding: 1.25rem 0.375rem;

+ 41 - 64
src/views/appoint/components/ship/deliveryAttorney.vue

@@ -20,13 +20,12 @@
         type="primary"
         class="btn"
         @click="addPick"
-        v-show="activeName === 'second'"
-        v-model="makeSure"
+        v-if="activeName === 'second'"
       >
         <i class="el-icon-circle-plus-outline"></i>生成提货委托书
       </el-button>
     </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
+    <el-tabs v-model="activeName">
       <!-- 未下发 -->
       <el-tab-pane label="未下发" name="first">
         <dilTable v-bind.sync="option1" ref="table">
@@ -64,10 +63,7 @@
       </el-tab-pane>
       <!-- 已下发 -->
       <el-tab-pane label="已下发" name="second">
-        <dilTable
-          v-bind.sync="option2"
-          @selection-change="currentSelectionChange"
-        >
+        <dilTable v-bind.sync="option2" @selection-change="selectionChange">
         </dilTable>
       </el-tab-pane>
     </el-tabs>
@@ -79,57 +75,31 @@ export default {
   name: "homeworkPath",
   data() {
     return {
-      // restaurants: [],
       input: "",
       activeName: "first",
-      amsShipDeliveryList: {},
+      attorneyId: null,
       option1: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=0",
+          "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=0"
       },
       option2: {
         // 表格请求数据的地址
         requestUrl:
           "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=1",
-        selectionType: "select",
-        amsShipList: [],
+        selectionType: "select"
       },
+      amsShipDeliveryList: []
     };
   },
 
   methods: {
-    // querySearch(queryString, cb) {
-    //   var restaurants = this.restaurants;
-    //   var results = queryString
-    //     ? restaurants.filter(this.createFilter(queryString))
-    //     : restaurants;
-    //   cb(results);
-    // },
-    // createFilter(queryString) {
-    //   return (restaurant) => {
-    //     return (
-    //       restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-    //       0
-    //     );
-    //   };
-    // },
-    // 将所有数据送到新增提货委托书
-    makeSure() {
-      // let amsShipDeliveryList={
-      //   amsShipDeliveryList=this.amsShipDeliveryList
-      // }
-    },
-    // 通过事件显示生成提货委托书按钮
-    currentSelectionChange(selection) {
+    selectionChange(selection) {
+      console.log(selection);
       this.amsShipDeliveryList = selection;
     },
-    handleClick(tab, event) {
-      console.log(tab, event);
-    },
     onclick() {
-      // this.option.requestUrl =
-      //   "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&con=" + this.input;
+      this.$message.info("功能尚未开通,请联系管理员!");
     },
     click(pathId) {
       this.$router.push("/path/addDeliveryNotice/" + pathId);
@@ -138,18 +108,18 @@ export default {
       this.$router.push("/addDeliveryAttorney/");
     },
     // 生成提货委托书
-    addPick(){
-      // console.log("enter")
-      // console.log(this.amsShipDeliveryList);
-      let amsShipDeliveryNameList={
-        amsShipDeliveryNameList:this.amsShipDeliveryList
-        
+    addPick() {
+      if (this.amsShipDeliveryList.length == 0) {
+        this.$message.warning("请勾选已下发的提货委托,方可生成提货委托书");
+        return;
       }
-      // console.log(amsShipDeliveryNameList)
-      let test = encodeURIComponent(JSON.stringify(amsShipDeliveryNameList))
-      console.log("test   "+test)
-      this.$router.push("/attorneytext/"+test);
+      let amsShipDeliveryNameList = {
+        amsShipDeliveryNameList: this.amsShipDeliveryList
+      };
+      let test = encodeURIComponent(JSON.stringify(amsShipDeliveryNameList));
+      this.$router.push("/attorneytext/" + test);
     },
+    //修改
     modifyClick(attorneyId) {
       this.$router.push("/modifyDeliveryAttroney/" + attorneyId);
     },
@@ -160,23 +130,25 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
           this.axios
             .post("/api/v1/tms/deleteByAttorneyId/" + attorneyId)
             .then(() => {
-              this.$router.go(0);
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.option1.requestUrl =
+                "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=0&i=" +
+                new Date();
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
     },
@@ -186,30 +158,35 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "下发成功",
+            message: "下发成功"
           });
           this.axios
             .post("/api/v1/tms/sendDeliveryAttorneyStatus/" + attorneyId)
             .then(() => {
-              this.$router.go(0);
+              this.option1.requestUrl =
+                "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=0&i=" +
+                new Date();
+              this.option2.requestUrl =
+                "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=1&i=" +
+                new Date();
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "下发失败!",
+            message: "下发失败!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .shipTransport {
   .top {
     padding: 1.25rem 0.375rem;

+ 34 - 59
src/views/appoint/components/ship/deliveryNotice.vue

@@ -3,9 +3,8 @@
   <div class="shipTransport">
     <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      
       <el-button type="primary" class="btn" @click="onclick">
-         <i class="el-icon-search"></i>查询 
+        <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="addClick">
         <i class="el-icon-circle-plus-outline"></i>新增
@@ -65,75 +64,47 @@ export default {
       activeName: "first",
       option1: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0",
+        requestUrl: "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0"
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1",
-      },
+        requestUrl: "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1"
+      }
     };
   },
   methods: {
-    // querySearch(queryString, cb) {
-    //   var restaurants = this.restaurants;
-    //   var results = queryString
-    //     ? restaurants.filter(this.createFilter(queryString))
-    //     : restaurants;
-    //   cb(results);
-    // },
-    // createFilter(queryString) {
-    //   return (restaurant) => {
-    //     return (
-    //       restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-    //       0
-    //     );
-    //   };
-    // },
-    onclick() {
-      // this.option.requestUrl =
-      //   "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&con=" + this.input;
-    },
+    onclick() {},
     addClick() {
       this.$router.push("/addDeliveryNotice/");
     },
     modifyclick(noticeId) {
       this.$router.push("/modifyDeliveryNotice/" + noticeId);
     },
-    // deleteclick(scope) {
-    //   let pathId = scope;
-    //   this.axios
-    //     .post("/api/v1/tms/operationPath/operationPathDelete?pathId=" + pathId)
-    //     .then((res) => {
-    //       this.$message({
-    //         message: "删除成功",
-    //         type: "success",
-    //       });
-    //       this.$router.go(0);
-    //     });
-    // },
     deleteclick(scope) {
       let noticeId = scope;
       this.$confirm("是否删除", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
           this.axios
             .post("/api/v1/tms/deleteByNoticeId/" + noticeId)
             .then(() => {
-              this.$router.go(0);
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.option1.requestUrl =
+                "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&i=" +
+                new Date();
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
     },
@@ -146,38 +117,42 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
-          this.$message({
-            type: "success",
-            message: "下发成功!",
-          });
           this.axios
             .post("/api/v1/tms/sendDeliveryNotice/" + noticeId)
             .then(() => {
-              this.$router.go(0);
+              this.$message({
+                type: "success",
+                message: "下发成功!"
+              });
+              this.option1.requestUrl =
+                "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&i=" +
+                new Date();
+              this.option2.requestUrl =
+                "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1&i=" +
+                new Date();
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!",
+            message: "取消下发!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .shipTransport {
   .top {
-     padding: 1.25rem 0.375rem;
-     .el-input{
-       width: 20%;
-       margin-right: 40rpx;
-     }
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 40rpx;
+    }
   }
- 
 }
 </style>

+ 42 - 15
src/views/appoint/components/ship/modifyCargoResult.vue

@@ -3,11 +3,11 @@
   <div class="shipTransport">
     <page-title>返回</page-title>
     <!-- 物资 -->
-      <div class="mofrom">
+      <!-- <div class="mofrom">
         <span class="motext">物资</span>
         <el-input class="moinput" v-model="materialName" disabled> </el-input>
         <el-button class="mobutton" type="primary" @click="ondrawer(1)">浏览</el-button>
-      </div>
+      </div> -->
       <div class="mofrom">
         <span class="motext">收货人</span>
         <el-input class="moinput" v-model="receiver" disabled> </el-input>
@@ -130,7 +130,7 @@ export default {
       (this.second2.mapList3 = selection), (this.receiver = selection.pierName);
     },
     information() {
-      //编辑请车作业
+      //编辑货权转移
       this.axios
         .post("/api/v1/tms/selectByCargoTranferResultId/" + this.$route.params.cargoTransferResultId)
         .then((res) => {
@@ -138,15 +138,6 @@ export default {
           this.form1 = res.data.data
           this.materialName = res.data.data.materialName;
           this.receiver = res.data.data.receiver;
-          // res.data.data.forEach((e) => {
-          //   console.log(e)
-          //   this.form1 = e;
-            // this.materialName = e.materialName;
-            // this.receiver = e.receiver;
-          //   console.log(e);
-          //   console.log(this.form1);
-          //   console.log(this.$route.params.pathId);
-          // });
         });
     },
     // 确认
@@ -154,16 +145,52 @@ export default {
       let AmsshipCargoTransferResult = {
         cargoTransferResultId: this.$route.params.cargoTransferResultId,
         carrierId: this.form1.carrierId,
-        groupId: this.form1.groupId,
-     
+        groupId: this.form1.groupId,     
         resultTelephoneFax: this.form1.resultTelephoneFax,
         resultContactPerson:this.form1.resultContactPerson,
         batchId:this.form1.batchId,
         resultNumberOfLoans: this.form1.resultNumberOfLoans,
         resultFreignForwardingInfo: this.form1.resultFreignForwardingInfo,
         resultMemo: this.form1.resultMemo,
+        foreignShipName: this.form1.foreignShipName,
+        materialId: this.second.mapList1.materialId,
       };
-      this.axios
+         //判断放货数量是否为数字
+       function isNumber() {
+        var value = AmsshipCargoTransferResult.resultNumberOfLoans;
+        //验证是否为数字
+        var patrn = /^(-)?\d+(\.\d+)?$/;
+        if (patrn.exec(value) == null || value == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      //判断是否为电话号码
+       function isTelePhone() {
+        var value2 = AmsshipCargoTransferResult.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 val2=this.value2;
+      var val = this.value;
+       if (
+        AmsshipCargoTransferResult.foreignShipName == null ||
+        AmsshipCargoTransferResult.resultNumberOfLoans == null ||
+        AmsshipCargoTransferResult.resultContactPerson == null ||
+        AmsshipCargoTransferResult.resultTelephoneFax == null
+      )
+        this.$message.error("存在空值!");
+          else if (!isNumber(val)) this.$message.warning("放货数量必须为数字");
+            else if (!isTelePhone(val2)) this.$message.warning("电话号码或传真格式不正确");  
+      else this.axios
         .post("/api/v1/tms/editCargoTransferResult" ,
          AmsshipCargoTransferResult
         )

+ 79 - 36
src/views/appoint/components/ship/modifyDeliveryAttroney.vue

@@ -4,8 +4,8 @@
     <page-title>返回</page-title>
     <div class="form">
       <div class="form_box">
-          <dil-form :formId="113" v-model="form1"></dil-form>
-      </div>        
+        <dil-form :formId="113" v-model="form1"></dil-form>
+      </div>
     </div>
     <!-- 确定和取消 -->
     <div class="button_box">
@@ -17,14 +17,16 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime } from '../../../ADMINISTRATORS/app';
+import { sjTime } from "../../../ADMINISTRATORS/app";
 export default {
   components: { PageTitle },
-    data(){
-          return {
-          form1: {},
-        }
-    },
+  data() {
+    return {
+      form1: {},
+      value2: undefined,
+      value3: undefined,
+    };
+  },
   mounted() {
     this.information();
   },
@@ -32,63 +34,104 @@ export default {
     information() {
       //编辑请车作业
       this.axios
-        .post("/api/v1/tms/getDeliveryAttorneyId/" + this.$route.params.attorneyId)
+        .post(
+          "/api/v1/tms/getDeliveryAttorneyId/" + this.$route.params.attorneyId
+        )
         .then((res) => {
           res.data.data.forEach((e) => {
             this.form1 = e;
           });
         });
     },
-     // 返回
+    // 返回
     onClickCancel() {
       this.$router.go(-1);
     },
-     // 确认
+    // 确认
     onClickConfirm() {
       let AmsshipDeliveryAttorney = {
         resultId: this.$route.params.attorneyId,
         portId: this.form1.portId,
-        attorneyContactTelephone:this.form1.attorneyContactTelephone,
-        attorenyPickupIdcard:this.form1.attorenyPickupIdcard,
-        attorneyPickupContactPerson:this.form1.attorneyPickupContactPerson,
-        downSwimPortId:this.form1.downSwimPortId,
-        attorneyTime:sjTime(this.form1.attorneyTime),
+        attorneyContactTelephone: this.form1.attorneyContactTelephone,
+        attorenyPickupIdcard: this.form1.attorenyPickupIdcard,
+        attorneyPickupContactPerson: this.form1.attorneyPickupContactPerson,
+        downSwimPortId: this.form1.downSwimPortId,
+        attorneyTime: sjTime(this.form1.attorneyTime),
       };
-      this.axios
-        .post("/api/v1/tms/editDeliveryAttroney",AmsshipDeliveryAttorney
-        )
-        .then(() => {
-          this.$message({
-            type: "success",  
-            message: "修改成功!",
+
+      //身份证校验
+      function checkCardNo() {
+        var value3 = AmsshipDeliveryAttorney.attorenyPickupIdcard;
+        //验证是否为数字
+        var patrn =
+          /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;
+        if (patrn.exec(value3) == null || value3 == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+
+      //判断是否为电话号码
+      function isTelePhone() {
+        var value2 = AmsshipDeliveryAttorney.attorneyContactTelephone;
+        //验证是否为数字
+        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 val2 = this.value2;
+      var val3 = this.value3;
+      if (
+        AmsshipDeliveryAttorney.attorneyTime == null ||
+        AmsshipDeliveryAttorney.attorenyPickupIdcard == null ||
+        AmsshipDeliveryAttorney.attorneyContactTelephone == null ||
+        AmsshipDeliveryAttorney.attorneyPickupContactPerson == null
+      )
+        this.$message.error("存在空值,请核实以后再提交");
+      else if (!isTelePhone(val2)) this.$message.warning("联系电话格式不正确");
+      else if (!checkCardNo(val3)) this.$message.warning("请输入正确的身份证格式");
+      else
+        this.axios
+          .post("/api/v1/tms/editDeliveryAttroney", AmsshipDeliveryAttorney)
+          .then((res) => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "修改成功!",
+              });
+            }
+            this.$router.go(-1);
           });
-          this.$router.go(-1);
-        });
     },
   },
 };
 </script>
 <style lang="scss">
-.shipTransport{
-  .form{
+.shipTransport {
+  .form {
     display: flex;
-    .form_box{
+    .form_box {
       width: 320px;
       margin-left: 35%;
       margin-top: 30px;
       margin-right: 20px;
-      .el-form{
-        .preview-group{
-          .el-form-item{
-            .el-form-item__label{
+      .el-form {
+        .preview-group {
+          .el-form-item {
+            .el-form-item__label {
               display: inline-block;
               width: 70px !important;
             }
-            .el-form-item__content{
-              .el-select{
+            .el-form-item__content {
+              .el-select {
                 width: 250px;
               }
-              .el-input{
+              .el-input {
                 width: 250px;
               }
             }
@@ -97,7 +140,7 @@ export default {
       }
     }
   }
-  .button_box{
+  .button_box {
     margin-left: 45%;
   }
 }

+ 381 - 27
src/views/queue/components/qmsEnFacotory/queueFJumpLine.vue

@@ -2,18 +2,169 @@
 <template>
   <div class="sale">
     <div class="top">
-      <span>车牌号:</span>
-      <el-input placeholder="请输入内容" class="input" v-model="inputText" clearable>
-      </el-input>
-      <el-button type="primary" class="btn" @click="onclick(0)">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="bt" @click="onclick(1)">
-        <i class="el-icon-plus"></i>新增排队插队
-      </el-button>
+      <el-form :inline="true" style="margin-top: 1rem;">
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;">车牌号</label>
+        </el-form-item>
+        <el-form-item>
+          <el-input v-model="capacityNo"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="onclick"
+            style="margin-left: 4px;"
+            clearable
+            ><i class="el-icon-search"></i>查询</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="onclickMaterial"
+            style="margin-left: 4px;"
+            clearable
+            ><i class="el-icon-search"></i>查询物资</el-button
+          >
+        </el-form-item>
+        <el-form-item
+          ><el-button type="primary" class="btn" @click="allow">
+            <i class="el-icon-d-arrow-right"></i>插队
+          </el-button></el-form-item
+        >
+      </el-form>
     </div>
-    <div class="tab">
-      <dilTable v-bind.sync="option"></dilTable>
+    <!-- 物资选择模态框 -->
+    <el-drawer
+      title="选择物资信息"
+      :visible.sync="table1"
+      direction="rtl"
+      size="90%"
+      :show-close="true"
+    >
+      <el-form :inline="true" style="margin-top: 0.5rem;">
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >物资名称</label
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-input
+            placeholder="请输入内容"
+            v-model="materialNameText"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;">规格</label>
+        </el-form-item>
+        <el-form-item>
+          <el-input
+            placeholder="请输入内容"
+            v-model="materialSpecificationText"
+            clearable
+            ><template slot="prepend">Φ</template></el-input
+          >
+        </el-form-item>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="onclickMaterial1"
+          style="margin-left: 4px;"
+          ><i class="el-icon-search"></i>查询</el-button
+        >
+        <el-button type="primary" @click="makeSureMaterial"
+          ><i class="el-icon-check"></i>确定</el-button
+        >
+      </el-form>
+      <div class="tablecls">
+        <!-- 查询所有的物资 -->
+        <dilTable
+          v-bind.sync="optionMa"
+          @selection-change="selectionChange2"
+          @rowDbClick="rowDbClick"
+        >
+        </dilTable>
+      </div>
+    </el-drawer>
+    <div class="tabs">
+      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+        <el-tab-pane label="单拼车辆排队链表" name="first">
+          <el-table
+            :data="tableData1"
+            border
+            style="width: 100%; margin-top: 20px"
+            @selection-change="handleSelectionChange"
+            max-height="500px"
+          >
+            <el-table-column type="selection" width="55"></el-table-column>
+            <el-table-column type="index" width="50"> </el-table-column>
+            <el-table-column prop="capacityNumber" label="车牌号" fit>
+            </el-table-column>
+            <el-table-column prop="resultStartTime" label="排队开始时间">
+            </el-table-column>
+            <el-table-column
+              prop="listNodeOrder"
+              label="序号"
+            ></el-table-column>
+            <el-table-column prop="materialName" label="物资名称">
+            </el-table-column>
+            <el-table-column prop="materialSpecification" label="物资规格">
+            </el-table-column>
+            <el-table-column prop="materialModel" label="物资型号">
+            </el-table-column>
+            <el-table-column prop="materialNumber" label="物资件数">
+            </el-table-column>
+            <el-table-column prop="driverTel" label="司机电话号码">
+            </el-table-column>
+            <el-table-column prop="sureTime" label="可进厂确认时间">
+            </el-table-column>
+            <el-table-column prop="resultInsertTime" label="插队时间">
+            </el-table-column>
+            <el-table-column prop="gatepostName" label="进厂门岗">
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="多拼车辆排队链表" name="second">
+          <el-table
+            :data="tableData"
+            :span-method="objectSpanMethod"
+            border
+            style="width: 100%; margin-top: 20px"
+            @selection-change="handleSelectionChange"
+            max-height="500px"
+          >
+            <el-table-column type="selection" width="55"></el-table-column>
+            <el-table-column prop="capacityNumber" label="车牌号" fit>
+            </el-table-column>
+            <el-table-column prop="grid" label="拼数" fit> </el-table-column>
+            <el-table-column prop="resultStartTime" label="排队开始时间">
+            </el-table-column>
+            <el-table-column
+              prop="listNodeOrder"
+              label="序号"
+            ></el-table-column>
+            <el-table-column prop="materialName" label="物资名称">
+            </el-table-column>
+            <el-table-column prop="materialSpecification" label="物资规格">
+            </el-table-column>
+            <el-table-column prop="materialModel" label="物资型号">
+            </el-table-column>
+            <el-table-column prop="materialNumber" label="物资件数">
+            </el-table-column>
+            <el-table-column prop="driverTel" label="司机电话号码">
+            </el-table-column>
+            <el-table-column prop="gatepostName" label="进厂门岗">
+            </el-table-column>
+            <el-table-column prop="resultInsertTime" label="插队时间">
+            </el-table-column>
+            <el-table-column prop="sureTime" label="可进厂确认时间">
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+      </el-tabs>
     </div>
   </div>
 </template>
@@ -21,25 +172,215 @@
 export default {
   data() {
     return {
+      capacityNo: "",
       inputText: "",
-      option: {
+      optionMa: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/qms/getQueueInsert?apiId=132",
+        requestUrl: "",
+        // 控制显示多选列
+        selectionType: "select"
       },
+      activeName: "first",
+      tableData: [],
+      tableData1: [],
+      //存放每一行记录的合并数
+      spanArr: [],
+      maplist: [],
+      id: null,
+      option: [],
+      filterArr1: [],
+      table1: false,
+      //物资选中表格
+      materialList: [],
+      //物资选中暂存
+      materialList1: [],
+      //物资信息查询内容
+      materialNameText: null,
+      materialSpecificationText: null,
+      materialModelText: null
     };
   },
+  watch: {
+    activeName() {}
+  },
+  mounted() {
+    this.getSpellingArray();
+    this.getNoSpellingArray();
+  },
   methods: {
-    onclick(num) {
-      if (num == 0) {
-        this.option.requestUrl =
-          "/api/v1/qms/getQueueInsert?apiId=132&con=" + this.inputText+"&i="+new Date();
-      } else if (num == 1) {
-        this.$router.push({
-          path: "/addqueueFJumpLine",
+    rowDbClick(row) {
+      this.materialList = [];
+      this.materialList.push(row);
+      this.makeSureMaterial();
+    },
+    //物资模态框查询
+    onclickMaterial1() {
+      this.optionMa.requestUrl =
+        "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
+        this.materialNameText +
+        "&materialSpecificationText=" +
+        this.materialSpecificationText;
+    },
+    onclickMaterial() {
+      this.table1 = true;
+      this.optionMa.requestUrl =
+        "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
+      console.log("dasd");
+    },
+    //返回选中的物资信息
+    selectionChange2(selection) {
+      this.materialList1 = [];
+      this.materialList1 = selection;
+      this.materialList = this.materialList.concat(this.materialList1);
+    },
+    makeSureMaterial() {
+      console.log(this.materialList);
+      var materialIdList = [];
+      this.materialList.forEach(e => {
+        if (materialIdList.indexOf(e.materialId) == -1) {
+          materialIdList.push(e.materialId);
+        }
+      });
+      let map = {
+        materialList: materialIdList
+      };
+      this.materialList = [];
+      this.materialList1 = [];
+      if (this.activeName == "first") {
+        this.axios
+          .post("/api/v1/qms/getQueueListByQueueUp?isSpelling=0", map)
+          .then(res => {
+            this.tableData1 = res.data.data;
+          });
+      } else {
+        this.axios
+          .post("/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1", map)
+          .then(res => {
+            this.tableData = res.data.data;
+            this.getSpanArr(this.tableData);
+          });
+      }
+      this.table1 = false;
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].resultTotalId === data[i - 1].resultTotalId) {
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (
+        columnIndex === 0 ||
+        columnIndex === 1 ||
+        columnIndex === 2 ||
+        columnIndex === 3 ||
+        columnIndex === 4 ||
+        columnIndex === 9 ||
+        columnIndex === 10 ||
+        columnIndex === 12
+      ) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    handleClick() {
+      if (this.activeName == "first") {
+        this.getNoSpellingArray();
+      } else {
+        this.getSpellingArray();
+      }
+    },
+    getNoSpellingArray() {
+      this.axios
+        .post("/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=" + new Date())
+        .then(res => {
+          this.tableData1 = res.data.data;
         });
+    },
+    getSpellingArray() {
+      this.axios
+        .post(
+          "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=" +
+            new Date()
+        )
+        .then(res => {
+          this.tableData = res.data.data;
+          console.log(this.tableData);
+          this.getSpanArr(this.tableData);
+        });
+    },
+    onclick() {
+      if (this.activeName == "first") {
+        this.option1.requestUrl =
+          "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=0?capacityNumber=" +
+          this.capacityNo +
+          "&i=" +
+          new Date();
+      } else {
+        this.axios
+          .post(
+            "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=" +
+              new Date() +
+              "&capacityNumber=" +
+              this.capacityNo
+          )
+          .then(res => {
+            this.tableData = res.data.data;
+            this.getSpanArr(this.tableData);
+          });
       }
     },
-  },
+    handleSelectionChange(selection) {
+      this.maplist = [];
+      this.maplist = selection;
+    },
+    updateBill(scope) {
+      console.log(scope.row.capacityId);
+      this.$router.push(
+        `/editBill/${scope.row.capacityId}/${scope.row.capacityNumber}`
+      );
+    },
+    filterArr(resultId) {
+      console.log("fdhjsaj");
+      this.filterArr1 = this.filterArr1.concat(
+        this.tableData.filter(ele => ele.resultId == resultId)
+      );
+    },
+    allow() {
+      if (this.maplist.length == 0) {
+        this.$message.error("请选择需要插队的车辆");
+        return;
+      }
+      let map = {
+        mapList: this.maplist
+      };
+      this.axios.post("/api/v1/qms/queueCutInLine", map).then(res => {
+        if (res.data.code == "200") {
+          this.$message.success("插队成功,等待放行");
+          this.getNoSpellingArray();
+          this.getSpellingArray();
+        }
+      });
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
@@ -50,13 +391,26 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 40px;
-    .input{
-      width: 250px;
-      margin-right: 20px;
+    .el-form {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-form-item__label {
+        align-items: center;
+        line-height: 80px;
+      }
     }
-    .bt{
-      margin-left: 20px;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+  .tabs {
+    margin-left: 20px;
+    margin-top: 10px;
+    .tabs /deep/ .el-tabs__nav {
+      font-size: 40px;
     }
   }
 }
-</style>
+</style>

+ 82 - 22
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -5,9 +5,9 @@
       <div class="in_transit_information">
         <span class="item_details">车牌号:</span>
         <el-input
-          style="width: 100px;"
+          style="width: 120px;"
           class="inputStyle"
-          v-model="carNumber"
+          v-model.trim="carNumber"
           clearable
         >
         </el-input>
@@ -15,6 +15,26 @@
       <div class="in_transit_information2">
         <span class="item_details">时间段:</span>
         <el-date-picker
+         style="width:200px"
+          class="date_picker_style"
+          v-model="time[0]"
+          @change="changeTime"
+          type="time"
+          format="yyyy-MM-dd HH:mm:ss"
+          placeholder="开始日期"
+        >
+        </el-date-picker>
+        <el-date-picker
+          style="width:200px"
+          class="date_picker_style"
+          v-model="time[1]"
+          @change="changeTime"
+          type="time"
+          format="yyyy-MM-dd HH:mm:ss"
+           placeholder="结束日期"
+        >
+        </el-date-picker>
+        <!-- <el-date-picker
           class="date_picker_style"
           v-model="time"
           @change="changeTime"
@@ -24,7 +44,7 @@
           start-placeholder="开始日期"
           end-placeholder="结束日期"
         >
-        </el-date-picker>
+        </el-date-picker> -->
         <el-button type="primary" class="searchstyle" @click="initData"
           >查询</el-button
         >
@@ -110,6 +130,14 @@
         </el-select>
       </div>
     </div>
+    <el-row>
+      <el-button type="primary" @click="slow">慢速</el-button>
+      <el-button type="success" @click="middle">中速</el-button>
+      <el-button type="danger" @click="fast">快速</el-button>
+      <el-button type="success" @click="addProgress" plain>快进</el-button> 
+      <el-button type="danger" @click="stop" plain>暂停</el-button>
+      <el-button type="success" @click="play" plain>开始</el-button>
+    </el-row>
   </div>
 </template>
 <script>
@@ -172,6 +200,10 @@ export default {
         {
           value: 3600000,
           label: "60分钟"
+        },
+        {
+        value: 36000000,
+        label: "关闭"
         }
       ],
       //选择离线时长
@@ -201,6 +233,10 @@ export default {
         {
           value: 3600000,
           label: "60分钟"
+        },
+        {
+        value: 36000000,
+        label: "关闭"
         }
       ],
       //二、 展示相关
@@ -346,11 +382,30 @@ export default {
     //校验查询时间
     changeTime() {
       let that = this;
-      console.log(that.time[1] - that.time[0] - 86400000 * 3);
-      if (that.time[1] - that.time[0] > 86400000 * 3) {
-        this.$message.error("时间查询范围不能超过3天");
-        that.time = [];
-      }
+      if(that.time!=null&&that.time.length==2){
+        if (that.time[1] - that.time[0] > 86400000 * 3) {
+          this.$message.error("时间查询范围不能超过3天");
+          that.time = [];
+        }
+      } 
+    },
+    //速度慢
+    slow(){
+          console.log("slow")
+          let that=this;
+          that.pathNavigator.setSpeed(1000);
+    },
+    //速度中
+    middle(){
+          console.log("middle")
+        let that=this;
+        that.pathNavigator.setSpeed(10000);
+    },
+    //速度快
+    fast(){
+        console.log("fast")
+        let that=this;
+        that.pathNavigator.setSpeed(100000);
     },
     //启动
     play() {
@@ -391,16 +446,19 @@ export default {
       that.geocoder.getAddress(lnglatXY, function(status, result) {
         if (status === "complete" && result.info === "OK") {
           that.endPointName = result.regeocode.formattedAddress;
-          that.initCustomMarkes(
-            that.carNumber + "(" + that.listPath[0].miled + ")",
-            "起点:" +
-              that.startPointName +
-              "<br/>" +
-              "终点:" +
-              that.endPointName,
-            lnglatXY[0],
-            lnglatXY[1]
-          );
+          setInterval(
+            that.initCustomMarkes(
+              that.carNumber + "(" + that.listPath[0].miled + ")",
+              "起点:" +
+                that.startPointName +
+                "<br/>" +
+                "终点:" +
+                that.endPointName,
+              lnglatXY[0],
+              lnglatXY[1]
+            )
+            , 500);
+          
         }
       });
     },
@@ -412,8 +470,10 @@ export default {
         this.$message.error("车牌号不能为空!");
         return;
       }
-      if (that.time == []) {
+    
+      if (that.time==null&&that.time.length!=2) {
         this.$message.error("请选择时间");
+        return;
       }
       that.axios
         .post("/api/v1/otms/fullPathVisualizationByCarNumber", {
@@ -462,8 +522,8 @@ export default {
       that.listPath.forEach((element, index) => {
         //起点名称
         that.getStartPointName([
-          element.startPoint.lon,
-          element.startPoint.lat
+          element.runRoute[0].lon,
+          element.runRoute[0].lat
         ]);
 
         //开始标记点
@@ -739,7 +799,7 @@ export default {
   left: 0;
 }
 .in_transit_information {
-  width: 200px;
+  width: 220px;
   float: left;
   height: 40px;
 }

+ 3 - 3
src/views/sale/components/offSiteTransportation/inTransit.vue

@@ -185,13 +185,13 @@ export default {
         // 表格请求数据的地址
         requestUrl: "/api/v1/otms/getInTransitTransportation?apiId=468",
         comparison:"orderNumber",
-        columnIndexs:[2,1,5,6,7,8,12],  
+        columnIndexs:[2,1,5,6,7,8,12,13],  
       },
        option2: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/otms/getFinishTruckOrderInfo?apiId=468",
         comparison:"orderNumber",
-        columnIndexs:[2,1,5,6,7,8,12],
+        columnIndexs:[2,1,5,6,7,8,12,13],
       },
       optionAlarm:{
         requestUrl: "",
@@ -212,7 +212,7 @@ export default {
         // 表格请求数据的地址
         requestUrl: "/api/v1/otms/getHaveAbnormalTruckOrderInfo?apiId=468",
         comparison:"orderNumber",
-        columnIndexs:[2,1,5,6,7,8,12],
+        columnIndexs:[2,1,5,6,7,8,12,13],
       }
       
     };

+ 228 - 4
src/views/sale/components/offSiteTransportation/mapTest.vue

@@ -26,7 +26,23 @@
                 </div>
              </div>
          </div>
-    
+        <el-row>
+                <el-button type="primary" @click="slow">慢速</el-button>
+                <el-button type="success" @click="middle">中速</el-button>
+                <el-button type="danger" @click="fast">快速</el-button>
+                <el-button type="success" @click="addIndex" plain>快进</el-button> 
+                <el-button type="danger" @click="stop" plain>暂停</el-button>
+                <el-button type="success" @click="play" plain>开始</el-button>
+                <el-select style="width:100px" @change="changeParkingTime"  v-model="parkingTime"  placeholder="停车" >
+                    <el-option  v-for="item in parkingOptions" :key="item.value" :label="item.label" :value="item.value" >
+                    </el-option>
+                </el-select>
+                <el-select  style="width:100px" @change="changeLeaveTime"  v-model="leaveTime" placeholder="离线" >
+                    <el-option v-for="item in parkingOptions" :key="item.value" :label="item.label" :value="item.value" >
+                    </el-option>
+                </el-select>
+     </el-row>
+
     </div>
 </template>
 
@@ -75,7 +91,77 @@ export default {
             sliderVal:0,
             times:1,
             totalTime:"11",
-            speedList:["1倍数","2倍数","3倍数"],
+            speed:10000,
+             //选择停车时长
+            parkingTime: null,
+            //停车时长选择区间
+            parkingOptions: [
+                {
+                value: 600000,
+                label: "10分钟"
+                },
+                {
+                value: 1200000,
+                label: "20分钟"
+                },
+                {
+                value: 1800000,
+                label: "30分钟"
+                },
+                {
+                value: 2400000,
+                label: "40分钟"
+                },
+                {
+                value: 3000000,
+                label: "50分钟"
+                },
+                {
+                value: 3600000,
+                label: "60分钟"
+                },
+                {
+                value: 36000000,
+                label: "关闭"
+                }
+            ],
+            //离线图标
+            leaveMark: [],
+            //停车图标
+            parkMark: [],
+            //选择离线时长
+            leaveTime: null,
+            //离线时长选择区间
+            leaveOptions: [
+                {
+                value: 600000,
+                label: "10分钟"
+                },
+                {
+                value: 1200000,
+                label: "20分钟"
+                },
+                {
+                value: 1800000,
+                label: "30分钟"
+                },
+                {
+                value: 2400000,
+                label: "40分钟"
+                },
+                {
+                value: 3000000,
+                label: "50分钟"
+                },
+                {
+                value: 3600000,
+                label: "60分钟"
+                },
+                {
+                value: 36000000,
+                label: "关闭"
+                }
+            ],
             //已行驶轨迹
             runRoute:
             {
@@ -186,7 +272,102 @@ export default {
         
     },
     methods: {
+        //停车时间改变
+        changeParkingTime() {
+            let that = this;
+            //清除之前的停车点
+            that.hideParkingMark();
+            //计算时间的点
+            let calculationPoint = null;
+            that.listPath[0].runRoute.forEach(function(item, indexOf) {
+                if (indexOf + 1 < that.listPath[0].runRoute.length) {
+                //判断calculationPoint是否为空,如果是空的说明当前没有在计算停车时间
+                if (calculationPoint == null && item.spd == "0.0") {
+                    calculationPoint = item;
+                } else if (calculationPoint != null && item.spd != "0.0") {
+                    let beforeTime = that.stringToDate(calculationPoint.gtm);
+                    let item2 = that.listPath[0].runRoute[indexOf];
+                    let afterTime = that.stringToDate(item2.gtm);
+                    let second = afterTime - beforeTime;
+                    if (second > that.parkingTime) {
+                        let message = "停车:" + second / 60000;
+                        that.initParkingMarkes(
+                            20,
+                            35,
+                            require("@/assets/img/start.png"),
+                            calculationPoint.lon,
+                            calculationPoint.lat,
+                            message.split(".")[0] + "分钟"
+                        );
+                    }
+                    calculationPoint = null;
+                }
+            }
+        });
+        },
+         //字符串转为Date
+        stringToDate(dateString) {
+            console.log(dateString)
+            let dateStr = dateString.replace("年", "-").replace("月", "-").replace("日", "");
+            return Date.parse(dateStr);
+    
+            
+        },
+        //停车所有离线图标
+        hideParkingMark() {
+        let that = this;
         
+        that.parkMark.forEach(function(item, indexOf) {
+            item.hide();
+        });
+        },
+        //离线时间改变时获得超过时间的点信息
+        changeLeaveTime() {
+            let that = this;
+            //关闭所有图标
+            that.hideLeaveMark();
+           that.listPath[0].runRoute.forEach(function(item, indexOf) {
+                if (indexOf + 1 < that.listPath[0].runRoute.length) {
+                    let beforeTime = that.stringToDate(item.gtm);
+                    let item2 = that.listPath[0].runRoute[indexOf + 1];
+                    let afterTime = that.stringToDate(item2.gtm);
+                    let second = afterTime - beforeTime;
+                    if (second > that.leaveTime) {
+                        let message = "离线:" + second / 60000;
+                        that.initLeaveMarkes(
+                        20,
+                        35,
+                        require("@/assets/img/start.png"),
+                        item2.lon,
+                        item2.lat,
+                        message.split(".")[0] + "分钟"
+                        );
+                    }
+                }
+            });
+        },
+        //关闭所有离线图标
+        hideLeaveMark() {
+        let that = this;
+        that.leaveMark.forEach(function(item, indexOf) {
+            item.hide();
+        });
+        },
+        slow(){
+             console.log("slow")
+            let that=this;
+            that.pathNavigator.setSpeed(1000);
+        },
+        middle(){
+             console.log("middle")
+            let that=this;
+           that.pathNavigator.setSpeed(10000);
+        },
+        fast(){
+            console.log("fast")
+            let that=this;
+            that.pathNavigator.setSpeed(100000);
+        },
         play(){
             let that =this;
             that.pathNavigator.resume();
@@ -196,7 +377,6 @@ export default {
             that.pathNavigator.pause();
         },
         addIndex(){
-            console.log("1123")
 
             let that =this;
             let increment=(that.listPath[0].runPath.length*0.1)
@@ -210,6 +390,45 @@ export default {
             let that=this;
             that.sliderVal=value;
         },
+        initParkingMarkes(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(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
+                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.parkMark.push(pointmarker);
+            // 将创建的点标记添加到已有的地图实例:
+            that.map.add(pointmarker);
+        },
+        //创建离线和停车的标记
+        initLeaveMarkes(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(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
+            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.leaveMark.push(pointmarker);
+        // 将创建的点标记添加到已有的地图实例:
+        that.map.add(pointmarker);
+        },
         initData(orderNumber){
             let that=this;
              that.axios.post("/api/v1/otms/fullPath?orderNumber="+orderNumber).then((res) => {
@@ -373,7 +592,7 @@ export default {
                 // 创建巡航器
                 that.pathNavigator = that.pathSimplifierIns.createPathNavigator(0, {
                     loop: true, // 是否循环
-                    speed: 10000 ,// 速度(km/h)
+                    speed: that.speed ,// 速度(km/h)
                     pathNavigatorStyle: {
                         width: 20,
                         height: 40,
@@ -464,6 +683,11 @@ export default {
     position: relative;
     top: 50px;
 }
+.driving_information3 {
+    position: absolute;z-index:99;top:0;left:0;
+    position: relative;
+    top: 50px;
+}
 
 /* 进度条 */
 .mySlider {

+ 79 - 40
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -1,135 +1,174 @@
 <template>
   <div>
-    <table-item :tableData="tableData" :col="col"> </table-item>
+    <div class="shipReport">
+      <div class="title">船舶动态表</div>
+      <div>
+        <el-button type="primary" @click="gotoexcel()"
+          ><i class="el-icon-download"></i>导出(Excel)</el-button
+        >
+      </div>
+      <table-item :tableData="tableData" :col="col"> </table-item>
+    </div>
   </div>
 </template>
 <script>
+import LAY_EXCEL from "lay-excel";
 import tableItem from "./tableItem";
 export default {
   name: "TableView",
   components: {
-    tableItem,
+    tableItem
   },
   data() {
     return {
+      tableTitle: "船舶动态表",
       // 树型结构表头数据
       col: [
         {
           prop: "pm",
-          label: "品名",
+          label: "品名"
         },
         {
           prop: "portName",
-          label: "港口名称",
+          label: "港口名称"
         },
         {
           prop: "tonnage",
-          label: "下游港口吨位",
+          label: "下游港口吨位"
         },
         {
           label: "未到闸船舶",
           children: [
             {
               prop: "capacity1",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber1",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue1",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime1",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "等闸船舶",
           children: [
             {
               prop: "capacity2",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber2",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue2",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime2",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "已过闸船舶",
           children: [
             {
               prop: "capacity3",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber3",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue3",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime3",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "到港待卸船舶",
           children: [
-             {
+            {
               prop: "capacity4",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber4",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue4",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime4",
-              label: "离港时间",
+              label: "离港时间"
             },
             {
               prop: "dgsj",
-              label: "到港时间",
-            },
-          ],
-        },
+              label: "到港时间"
+            }
+          ]
+        }
       ],
       // 表格数据
-      tableData: [],
+      tableData: []
     };
   },
-  created(){
+  created() {},
+  mounted() {
     this.initialization();
+    console.log(this.$refs.excelDom);
   },
   methods: {
-    initialization() {
-      this.axios.post("/api/v1/tms/selectAllShipDynamaics")
-      .then((res) => {
-        console.log(res)
-        this.tableData = res.data.data;
+    gotoexcel() {
+      let _this = this;
+      let result = JSON.parse(JSON.stringify(_this.tableData));
+      console.log(result);
+      result.unshift({
+        pm: "品名",
+        portName: "港口名称",
+        tonnage: "下游港口吨位",
+        capacity1: "船名",
+        capacityNumber1: "吨位",
+        locationValue1: "位置"
       });
     },
-  },
+    initialization() {
+      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then(res => {
+        if (res.data.code == "200") {
+          this.tableData = res.data.data;
+          console.log(this.tableData);
+        }
+      });
+    }
+  }
 };
 </script>
+
+<style lang="scss" scoped>
+.shipReport {
+  margin-top: 20px;
+  margin-left: 20px;
+  .title {
+    display: flex;
+    justify-content: center;
+    font-size: 20px;
+    font-weight: 700;
+  }
+}
+</style>

+ 153 - 51
src/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeForm.vue

@@ -6,80 +6,150 @@
       <el-date-picker
         v-model="startTime"
         type="datetime"
-        placeholder="选择日期时间">
+        placeholder="选择日期时间"
+      >
       </el-date-picker>
       <span>至</span>
       <el-date-picker
         v-model="endTime"
         type="datetime"
-        placeholder="选择日期时间">
+        placeholder="选择日期时间"
+      >
       </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-input
+        v-model="inputReceiveName"
+        style="width:200px"
+        placeholder="输入收货单位"
+        clearable="true"
+      ></el-input>
+      <el-button type="primary" @click="getReceiveName">查询</el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
       <el-button type="primary" @click="refresh">
         <i class="el-icon-refresh"></i>刷新
       </el-button>
       <span style="margin-left: 1rem;width:68px">合计净重:</span>
-      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
+      <el-input
+        v-model="totalNumber"
+        :disabled="true"
+        style="width: 150px;"
+      ></el-input>
       <span style="margin-left: 1rem;width:68px">合计车数:</span>
-      <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
+      <el-input
+        v-model="totalCapacity"
+        :disabled="true"
+        style="width: 150px;"
+      ></el-input>
     </div>
     <div class="table">
-      <dilTable ref="excelDom" v-bind.sync="option" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang" @func="func" @requestQuery="requestQuery" :pageSize = "pageSize"></dilTable>
+      <dilTable
+        ref="excelDom"
+        v-bind.sync="option"
+        :isHeigth="isHeigth"
+        :shiyHeigth="shiyHeigth"
+        :isKuang="isKuang"
+        @func="func"
+        @requestQuery="requestQuery"
+        :pageSize="pageSize"
+      ></dilTable>
     </div>
   </div>
 </template>
 
 <script>
-import { sjTime } from '@/utils/sharedJsFile'
+import { sjTime } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      shiyHeigth:140,
-      isHeigth:true,
-      pageSize:100,
-      isKuang:false,
+      shiyHeigth: 140,
+      isHeigth: true,
+      pageSize: 100,
+      isKuang: false,
       option: {
-        requestUrl: "",
+        requestUrl: ""
       },
-      startTime:null,
-      endTime:null,
+      startTime: null,
+      endTime: null,
       //合计净重
       totalNumber: 0,
       //合计车数
       totalCapacity: 0,
-      tableTitle:'销售统计报表'
+      tableTitle: "销售统计报表",
+      inputReceiveName: null
     };
   },
-  created(){
+  created() {
     //初始化表头
     if (getCookie("orgCode") == "chengyunshang") {
       this.option.requestUrl =
-        "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" + getCookie("userId") +"&i=" +new Date();
+        "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+        getCookie("userId") +
+        "&i=" +
+        new Date();
     } else {
       this.option.requestUrl =
-        "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" + null +"&i=" +new Date();
+        "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+        null +
+        "&i=" +
+        new Date();
     }
     //时间段初始化
     const start = new Date(new Date(new Date().toLocaleDateString()).getTime());
     var startTime = this.dataFormat(sjTime(start));
     var endTime = this.dataFormat(sjTime(new Date()));
-    this.tableTitle = startTime + ' 至 ' + endTime;
+    this.tableTitle = startTime + " 至 " + endTime;
   },
   methods: {
-    refresh(){
+    getReceiveName() {
+      if (this.inputReceiveName != null) {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.option.requestUrl =
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName;
+        } else {
+          this.option.requestUrl =
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName;
+        }
+      } else {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.option.requestUrl =
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else {
+          this.option.requestUrl =
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
+        }
+      }
+    },
+    refresh() {
       this.$router.go(0);
     },
-    func(res){
-      console.log(res)
-      var resultNetWeightTotal = 0
+    func(res) {
+      console.log(res);
+      var resultNetWeightTotal = 0;
       res.list.forEach(e => {
-        resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
+        resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight;
       });
-      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t"
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t";
       this.totalCapacity = res.total;
       //获取总记录条数作为合计车数
       // this.totalCapacity = res.total;
@@ -88,53 +158,85 @@ export default {
     onclick() {
       let startTime = null;
       let endTime = null;
-      if(this.startTime && this.endTime){
+      if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime);
         endTime = sjTime(this.endTime);
         //修改报表名称
-        this.tableTitle = this.dataFormat(startTime) + ' 至 ' + this.dataFormat(endTime);
+        this.tableTitle =
+          this.dataFormat(startTime) + " 至 " + this.dataFormat(endTime);
         //加上时间重置表头
         if (getCookie("orgCode") == "chengyunshang") {
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&orderType=2&shipperId=2"+ "&carrierSsoId=" + getCookie("userId") +"&i=" +new Date();
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&orderType=2&shipperId=2" +
+            "&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
         } else {
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&orderType=2&shipperId=2"+ "&carrierSsoId=" + null +"&i=" +new Date();
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&orderType=2&shipperId=2" +
+            "&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
         }
-      }else{
-        if(this.startTime){
+      } else {
+        if (this.startTime) {
           startTime = sjTime(this.startTime);
-        }else if(this.endTime){
+        } else if (this.endTime) {
           endTime = sjTime(this.endTime);
         }
         //加上时间重置表头
         if (getCookie("orgCode") == "chengyunshang") {
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime +"&orderType=2&shipperId=2"+ "&carrierSsoId=" + getCookie("userId") +"&i=" +new Date();
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&orderType=2&shipperId=2" +
+            "&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
         } else {
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime +"&orderType=2&shipperId=2"+ "&carrierSsoId=" + null +"&i=" +new Date();
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&orderType=2&shipperId=2" +
+            "&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
         }
       }
     },
     //格式化日期
-    dataFormat(value){
+    dataFormat(value) {
       let date = new Date(value);
-        let y = date.getFullYear();
-        let MM = date.getMonth() + 1;
-        MM = MM < 10 ? ('0' + MM) : MM;
-        let d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        let h = date.getHours();
-        h = h < 10 ? ('0' + h) : h;
-        let m = date.getMinutes();
-        m = m < 10 ? ('0' + m) : m;
-        let s = date.getSeconds();
-        s = s < 10 ? ('0' + s) : s;
-        return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let d = date.getDate();
+      d = d < 10 ? "0" + d : d;
+      let h = date.getHours();
+      h = h < 10 ? "0" + h : h;
+      let m = date.getMinutes();
+      m = m < 10 ? "0" + m : m;
+      let s = date.getSeconds();
+      s = s < 10 ? "0" + s : s;
+      return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
     }
-
-  },
+  }
 };
 </script>
 
@@ -146,9 +248,9 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .el-date-editor{
+    .el-date-editor {
       margin: 20px;
     }
   }
 }
-</style>
+</style>

+ 151 - 51
src/views/statisticalReport/components/salesLogisticsStatistics/saleCoproductForm.vue

@@ -6,80 +6,148 @@
       <el-date-picker
         v-model="startTime"
         type="datetime"
-        placeholder="选择日期时间">
+        placeholder="选择日期时间"
+      >
       </el-date-picker>
       <span>至</span>
       <el-date-picker
         v-model="endTime"
         type="datetime"
-        placeholder="选择日期时间">
+        placeholder="选择日期时间"
+      >
       </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-input
+        v-model="inputReceiveName"
+        style="width:200px"
+        placeholder="输入收货单位"
+      ></el-input>
+      <el-button type="primary" @click="getReceiveName">查询</el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
       <el-button type="primary" @click="refresh">
         <i class="el-icon-refresh"></i>刷新
       </el-button>
       <span style="margin-left: 1rem;width:68px">合计净重:</span>
-      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
+      <el-input
+        v-model="totalNumber"
+        :disabled="true"
+        style="width: 150px;"
+      ></el-input>
       <span style="margin-left: 1rem;width:68px">合计车数:</span>
-      <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
+      <el-input
+        v-model="totalCapacity"
+        :disabled="true"
+        style="width: 150px;"
+      ></el-input>
     </div>
     <div class="table">
-      <dilTable ref="excelDom" v-bind.sync="option" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang" @func="func" @requestQuery="requestQuery" :pageSize = "pageSize"></dilTable>
+      <dilTable
+        ref="excelDom"
+        v-bind.sync="option"
+        :isHeigth="isHeigth"
+        :shiyHeigth="shiyHeigth"
+        :isKuang="isKuang"
+        @func="func"
+        @requestQuery="requestQuery"
+        :pageSize="pageSize"
+      ></dilTable>
     </div>
   </div>
 </template>
 
 <script>
-import { sjTime } from '@/utils/sharedJsFile'
+import { sjTime } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      shiyHeigth:140,
-      isHeigth:true,
-      pageSize:100,
-      isKuang:false,
+      shiyHeigth: 140,
+      isHeigth: true,
+      pageSize: 100,
+      isKuang: false,
       option: {
-        requestUrl: "",
+        requestUrl: ""
       },
-      startTime:null,
-      endTime:null,
+      startTime: null,
+      endTime: null,
       //合计净重
       totalNumber: 0,
       //合计车数
       totalCapacity: 0,
-      tableTitle:'销售统计报表'
+      tableTitle: "销售统计报表"
     };
   },
-  created(){
+  created() {
     //初始化表头
     if (getCookie("orgCode") == "chengyunshang") {
       this.option.requestUrl =
-        "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=1&carrierSsoId=" + getCookie("userId") +"&i=" +new Date();
+        "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=1&carrierSsoId=" +
+        getCookie("userId") +
+        "&i=" +
+        new Date();
     } else {
       this.option.requestUrl =
-        "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=1&carrierSsoId=" + null +"&i=" +new Date();
+        "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=1&carrierSsoId=" +
+        null +
+        "&i=" +
+        new Date();
     }
     //时间段初始化
     const start = new Date(new Date(new Date().toLocaleDateString()).getTime());
     var startTime = this.dataFormat(sjTime(start));
     var endTime = this.dataFormat(sjTime(new Date()));
-    this.tableTitle = startTime + ' 至 ' + endTime;
+    this.tableTitle = startTime + " 至 " + endTime;
   },
   methods: {
-    refresh(){
+    getReceiveName() {
+      if (this.inputReceiveName != null) {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.option.requestUrl =
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName;
+        } else {
+          this.option.requestUrl =
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName;
+        }
+      } else {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.option.requestUrl =
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else {
+          this.option.requestUrl =
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
+        }
+      }
+    },
+    refresh() {
       this.$router.go(0);
     },
-    func(res){
-      console.log(res)
-      var resultNetWeightTotal = 0
+    func(res) {
+      console.log(res);
+      var resultNetWeightTotal = 0;
       res.list.forEach(e => {
-        resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
+        resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight;
       });
-      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t"
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t";
       this.totalCapacity = res.total;
       //获取总记录条数作为合计车数
       // this.totalCapacity = res.total;
@@ -88,53 +156,85 @@ export default {
     onclick() {
       let startTime = null;
       let endTime = null;
-      if(this.startTime && this.endTime){
+      if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime);
         endTime = sjTime(this.endTime);
         //修改报表名称
-        this.tableTitle = this.dataFormat(startTime) + ' 至 ' + this.dataFormat(endTime);
+        this.tableTitle =
+          this.dataFormat(startTime) + " 至 " + this.dataFormat(endTime);
         //加上时间重置表头
         if (getCookie("orgCode") == "chengyunshang") {
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&orderType=2&shipperId=1"+ "&carrierSsoId=" + getCookie("userId") +"&i=" +new Date();
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&orderType=2&shipperId=1" +
+            "&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
         } else {
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&orderType=2&shipperId=1"+ "&carrierSsoId=" + null +"&i=" +new Date();
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&orderType=2&shipperId=1" +
+            "&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
         }
-      }else{
-        if(this.startTime){
+      } else {
+        if (this.startTime) {
           startTime = sjTime(this.startTime);
-        }else if(this.endTime){
+        } else if (this.endTime) {
           endTime = sjTime(this.endTime);
         }
         //加上时间重置表头
         if (getCookie("orgCode") == "chengyunshang") {
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime +"&orderType=2&shipperId=1"+ "&carrierSsoId=" + getCookie("userId") +"&i=" +new Date();
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&orderType=2&shipperId=1" +
+            "&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
         } else {
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime +"&orderType=2&shipperId=1"+ "&carrierSsoId=" + null +"&i=" +new Date();
+            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&orderType=2&shipperId=1" +
+            "&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
         }
       }
     },
     //格式化日期
-    dataFormat(value){
+    dataFormat(value) {
       let date = new Date(value);
-        let y = date.getFullYear();
-        let MM = date.getMonth() + 1;
-        MM = MM < 10 ? ('0' + MM) : MM;
-        let d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        let h = date.getHours();
-        h = h < 10 ? ('0' + h) : h;
-        let m = date.getMinutes();
-        m = m < 10 ? ('0' + m) : m;
-        let s = date.getSeconds();
-        s = s < 10 ? ('0' + s) : s;
-        return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let d = date.getDate();
+      d = d < 10 ? "0" + d : d;
+      let h = date.getHours();
+      h = h < 10 ? "0" + h : h;
+      let m = date.getMinutes();
+      m = m < 10 ? "0" + m : m;
+      let s = date.getSeconds();
+      s = s < 10 ? "0" + s : s;
+      return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
     }
-
-  },
+  }
 };
 </script>
 
@@ -146,9 +246,9 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .el-date-editor{
+    .el-date-editor {
       margin: 20px;
     }
   }
 }
-</style>
+</style>