luobang 2 năm trước cách đây
mục cha
commit
74ed49ad1c

+ 1 - 2
build/utils.js

@@ -16,9 +16,8 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 
-// let devModules = ["index", "queue"];
-// let devModules = ["index", "appoint", "statisticalReport"];
 let devModules = ["all"];
+
 // let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS','WMS']
 // let devModules = ["index", "ADMINISTRATORS", "RMS"];
 // let devModules = ["index", "inward", "statisticalReport"];

+ 1 - 1
config/index.js

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

+ 1 - 0
src/components/exportPdf/exportPdf.js

@@ -12,6 +12,7 @@ export default {
 
         var ctx = canvas.getContext("2d");
 
+        // var a4w = 210;
         var a4w = 210;
         var a4h = 297; // A4大小,210mm x 297mm,四边不保留边距,显示区域210x297 (四边各保留20mm的边距,显示区域170x257)(pass)
 

+ 4 - 0
src/views/TMS/app.js

@@ -28,6 +28,10 @@ Vue.use(VueApollo)
 import htmlToPdf from "@/components/exportPdf/exportPdf";
 Vue.use(htmlToPdf);
 
+// 导出Excel全局组件
+import tableToExcel from "@/components/exportExcel/exportExcel";
+Vue.use(tableToExcel);
+
 const apolloProvider = new VueApollo({
     defaultClient: apollo
 })

+ 101 - 50
src/views/TMS/components/domesticMine/entrustMine.vue

@@ -1,6 +1,6 @@
 <template>
-  <!-- 计量委托 -->
-  <div class="homeworkPath">
+  <!-- 万州港-达州计量委托界面 -->
+  <div class="trainTransport">
     <div class="top">
       <el-input
         class="el-input"
@@ -9,93 +9,144 @@
         clearable
       >
       </el-input>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <!-- <el-button type="primary" class="btn1" @click="btnclick(0)">
-        <i class="el-icon-success"></i>发送
-      </el-button> -->
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
     </div>
-    <dilTable v-bind.sync="option" @selection-change="selectionChange">
-    </dilTable>
+
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="待计量" name="first">
+        <dilTable ref="excelDom" v-bind.sync="option" @selection-change="selectionChange">
+        </dilTable>
+      </el-tab-pane>
+      <el-tab-pane label="已计量" name="second">
+        <dilTable ref="excelDom" v-bind.sync="option2" @selection-change="selectionChange2">
+        </dilTable>
+      </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
 
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   data() {
     return {
+      activeName: "first",
+      time: [],
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=3",
+        requestUrl: "/api/v1/tms/getLoadResultToSendMC?apiId=491&resultType=3",
+        // 控制显示多选列
+        selectionType: "select",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/tms/getWeightResult?apiId=491&resultType=3",
         // 控制显示多选列
         selectionType: "select",
       },
       selectionListMap: [],
+      selectionListMap2: [],
+      resultIdList: [],
+      startTime: null,
+      endTime: null,
+      tableTitle: "国产矿计量表",
     };
   },
   methods: {
-    onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getLoadResultToSendMC?apiId=209&resultType=3&con=" +
-        this.input;
+    handleClick(tag, event) {
+      console.log(tag, event);
     },
 
-    btnclick() {
-      let map = {
-        resultIdList: this.selectionListMap,
-      };
-      // console.log("map" + map);
-      if (this.selectionListMap.length == 0) {
-        this.$message({
-          message: "请勾选要发送计量委托的实绩!",
-          type: "warning",
-        });
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          //判断是否是承运商
+          if (this.activeName == "first") {
+            this.option.requestUrl =
+              "/api/v1/tms/getLoadResultToSendMC?apiId=491&resultType=3" +
+              "&con=" +
+              this.input +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          } else {
+            this.option2.requestUrl =
+              "/api/v1/tms/getWeightResult?apiId=491&resultType=3" +
+              "&con=" +
+              this.input +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          }
+        }
       } else {
-        this.axios
-          .post("/api/v1/tms/batchSendMeasureCommission", map)
-          .then((res) => {
-            if (res.data.data == "发送成功") {
-              this.$message({
-                type: "success",
-                message: res.data.data,
-              });
-              this.option.requestUrl =
-                "/api/v1/tms/getLoadResultToSendMC?apiId=209&resultType=3&i"+new Date();
-            }else {
-                this.$message({
-                type: "warning",
-                message: res.data.data,
-              });
-            }
-          });
+        if (this.activeName == "first") {
+          this.option.requestUrl =
+            "/api/v1/tms/getLoadResultToSendMC?apiId=491&resultType=3" +
+            "&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else {
+          this.option2.requestUrl =
+            "/api/v1/tms/getWeightResult?apiId=491&resultType=3" +
+            "&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        }
       }
     },
     selectionChange(selection) {
       this.selectionListMap = [];
-      // console.log(selection);
+      console.log(selection);
       this.selectionListMap = selection;
     },
+    selectionChange2(selection) {
+      this.selectionListMap2 = [];
+      console.log(selection);
+      this.selectionListMap2 = selection;
+    },
   },
 };
 </script>
 <style lang='scss'>
-.homeworkPath {
+.trainTransport {
   .top {
     padding: 1.25rem 0.375rem;
     .el-input {
       width: 20%;
-      margin-right: 40rpx;
-    }
-    .btn {
-      width: 5.5%;
-      margin-left: 0.25rem;
-    }
-    .btn1 {
-      width: 7%;
-      margin-left: 00.375rem;
+      margin-right: 1.25rem;
     }
   }
 }

+ 26 - 18
src/views/TMS/components/domesticMine/wagonLoadEdit.vue

@@ -159,38 +159,46 @@ export default {
     },
     // 确认
     onClickConfirm() {
+      console.log(this.form1);
       let tmstrainLoadingResult = {
         resultId: this.$route.params.resultId,
         resultWagonNo: this.form1.resultWagonNo,
-        resultClass: this.form1.resultClass,
+        purchaseOrderNo:this.form1.purchaseOrderNo,
         sendStationId: this.sendStationId,
         arrivalStationId: this.toTheStationId,
         resultLoadingDate: sjTime(this.form1.resultLoadingDate),
-        batchId: this.form1.batchId,
-        capacityId: this.form1.capacityId,
-        resultMaterialNumber: this.form1.resultMaterialNumber,
-        resultMaterialTheoryweight: this.form1.resultMaterialTheoryweight,
-        resultRemarks: this.form1.resultRemarks
+        resultRemarks: this.form1.resultRemarks,
+        resultType:3
       };
       console.log(tmstrainLoadingResult)
       if (
       tmstrainLoadingResult.resultWagonNo==null||
       tmstrainLoadingResult.sendStationId==null||
       tmstrainLoadingResult.arrivalStationId==null||
-      tmstrainLoadingResult.resultLoadingDate==null||
-      tmstrainLoadingResult.batchId==null
+      tmstrainLoadingResult.resultLoadingDate==null
+     // || tmstrainLoadingResult.purchaseOrderNo==null
       ) this.$message.error("必填项存在空值!");
-      else
-      this.axios
-        .post("/api/v1/tms/upadteTmstrainLoadingResultByResultId",
-          tmstrainLoadingResult)
-         .then(() => {
-          this.$message({
-            type: "success",  
-            message: "修改成功!",
+      else{
+          this.axios
+          .post("/api/v1/tms/upadteTmstrainLoadingResultByResultId",
+            tmstrainLoadingResult)
+          .then((res) => {
+            console.log(res.data.message);
+            if(res.data.code=='200'){
+              this.$message({
+                type: "success",  
+                message: "修改成功!",
+              });
+              this.$router.go(-1);
+            }else{
+              this.$message({
+                type: "error",  
+                message: res.data.data,
+              });
+            }
+           
           });
-          this.$router.go(-1);
-        });
+      }
     },
   },
 };

+ 48 - 17
src/views/TMS/components/domesticMine/wagonLoadMine.vue

@@ -3,7 +3,17 @@
   <div class="homeworkPath">
     <div class="top">
       <el-input class="el-input" placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
+     
+        <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" @click="btnclick(0)">
@@ -17,7 +27,10 @@
     <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" width="100">
         <template slot-scope="scope">
-          <el-button @click="click(scope.row.resultId)" type="text" size="small"
+         
+          <el-button @click="click(scope.row.resultId)"  
+           :disabled="!scope.row.isEdit"
+          type="text" size="small"
             >修改</el-button
           >
           <el-button
@@ -32,10 +45,13 @@
   </div>
 </template>
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "wagonload",
   data() {
     return {
+      startTime:null,
+      endTime:null,
       input: "",
       option: {
         // 表格请求数据的地址
@@ -45,9 +61,30 @@ export default {
   },
   methods: {
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=3&con=" +
-        this.input;
+        let startTime = null;
+        let endTime = null;
+        if (this.startTime) {
+          startTime = sjTime(this.startTime);
+        }
+        if (this.endTime) {
+          endTime = sjTime(this.endTime);
+        }
+        if (startTime && endTime) {
+          if (startTime < endTime) {
+             this.option.requestUrl =
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=3&con=" +
+            this.input + "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          }
+        } else {
+          this.option.requestUrl =
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=3&con=" +
+            this.input;
+        }
     },
     btnclick(index) {
       if(index == 0){
@@ -57,8 +94,6 @@ export default {
       }
     },
     click(resultId) {
-      console.log("点击了")
-      console.log(resultId)
       this.$router.push("/wagonLoadEdit/" + resultId);
     },
     deleteclick(scope) {
@@ -95,16 +130,12 @@ export default {
 </script>
 <style lang='scss' scoped>
 .homeworkPath {
-  .top {
-     padding: 1.25rem 0.375rem;
-     .el-input{
-       width: 20%;
-       margin-right: 40rpx;
-     }
-     .btn{
-       width: 5.5%;
-       margin-left: 0.25rem;
-     }
+   .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
   }
 }
 </style>

+ 2 - 1
src/views/TMS/components/importedEmergency/editWagonLoadEmergency.vue

@@ -182,6 +182,7 @@ export default {
         resultMaterialNumber: this.form1.resultMaterialNumber,
         resultMaterialTheoryweight: this.form1.resultMaterialTheoryweight,
         resultRemarks: this.form1.resultRemarks,
+        resultType:2
       };
       console.log(tmstrainLoadingResult)
       if (
@@ -191,7 +192,7 @@ export default {
         tmstrainLoadingResult.resultLoadingDate == null ||
         tmstrainLoadingResult.batchId == null
       )
-        this.$message.error("必填项存在空值!");
+        this.$message.error("必填项存在空值!2");
       else
         this.axios
           .post(

+ 103 - 49
src/views/TMS/components/importedEmergency/entrustEmergency.vue

@@ -1,6 +1,6 @@
 <template>
-  <!-- 计量委托 -->
-  <div class="homeworkPath">
+  <!-- 万州港-达州计量委托界面 -->
+  <div class="trainTransport">
     <div class="top">
       <el-input
         class="el-input"
@@ -9,65 +9,122 @@
         clearable
       >
       </el-input>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <!-- <el-button type="primary" @click="btnclick(0)">
-        <i class="el-icon-s-promotion"></i>发送
-      </el-button> -->
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
     </div>
-    <dilTable v-bind.sync="option" @selection-change="selectionChange">
-    </dilTable>
+
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="待计量" name="first">
+        <dilTable  ref="excelDom" v-bind.sync="option" @selection-change="selectionChange">
+        </dilTable>
+      </el-tab-pane>
+      <el-tab-pane label="已计量" name="second">
+        <dilTable ref="excelDom" v-bind.sync="option2" @selection-change="selectionChange2">
+        </dilTable>
+      </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
+
+
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+
 export default {
   data() {
     return {
+      activeName: "first",
+      time: [],
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=2",
+        requestUrl: "/api/v1/tms/getLoadResultToSendMC?apiId=491&resultType=2",
+        // 控制显示多选列
+        selectionType: "select",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/tms/getWeightResult?apiId=491&resultType=2",
         // 控制显示多选列
         selectionType: "select",
       },
       selectionListMap: [],
+      selectionListMap2: [],
+      resultIdList: [],
+      startTime: null,
+      endTime: null,
+      tableTitle: "海港-老区轨道衡计量表",
     };
   },
   methods: {
-    onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getTmstrainWagonLoad?apiId=58&resultType=2&con=" +
-        this.input;
+    handleClick(tag, event) {
+      console.log(tag, event);
     },
-    btnclick() {
-      let map = {
-        resultIdList: this.selectionListMap,
-      };
-      if (this.selectionListMap.length == 0) {
-        this.$message({
-          message: "请勾选要发送计量委托的实绩!",
-          type: "warning",
-        });
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          //判断是否是承运商
+          if (this.activeName == "first") {
+            this.option.requestUrl =
+              "/api/v1/tms/getLoadResultToSendMC?apiId=491&resultType=2" +
+              "&con=" +
+              this.input +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          } else {
+            this.option2.requestUrl =
+              "/api/v1/tms/getWeightResult?apiId=491&resultType=2" +
+              "&con=" +
+              this.input +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          }
+        }
       } else {
-        this.axios
-          .post("/api/v1/tms/batchSendMeasureCommission", map)
-          .then((res) => {
-            if (res.data.data == "发送成功") {
-              this.$message({
-                type: "success",
-                message: res.data.data,
-              });
-              this.option.requestUrl =
-                "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=2&i=" +
-                new Date();
-            }else{
-               this.$message({
-                type: "warning",
-                message: res.data.data,
-              });
-            }
-          });
+        if (this.activeName == "first") {
+          this.option.requestUrl =
+            "/api/v1/tms/getLoadResultToSendMC?apiId=491&resultType=2" +
+            "&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else {
+          this.option2.requestUrl =
+            "/api/v1/tms/getWeightResult?apiId=491&resultType=2" +
+            "&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        }
       }
     },
     selectionChange(selection) {
@@ -75,24 +132,21 @@ export default {
       console.log(selection);
       this.selectionListMap = selection;
     },
+    selectionChange2(selection) {
+      this.selectionListMap2 = [];
+      console.log(selection);
+      this.selectionListMap2 = selection;
+    },
   },
 };
 </script>
 <style lang='scss'>
-.homeworkPath {
+.trainTransport {
   .top {
     padding: 1.25rem 0.375rem;
     .el-input {
       width: 20%;
-      margin-right: 40rpx;
-    }
-    .btn {
-      width: 5.5%;
-      margin-left: 0.25rem;
-    }
-    .btn1 {
-      width: 7%;
-      margin-left: 00.375rem;
+      margin-right: 1.25rem;
     }
   }
 }

+ 59 - 15
src/views/TMS/components/importedEmergency/wagonLoadEmergency.vue

@@ -2,7 +2,22 @@
   <!-- 装车作业页面 -->
   <div class="homeworkPath">
     <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-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick(0)">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -13,7 +28,10 @@
     <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" width="100">
         <template slot-scope="scope">
-          <el-button @click="onclick(2,scope.row.resultId)" type="text" size="small"
+          <el-button
+            @click="onclick(2, scope.row.resultId)"
+            type="text"
+            size="small"
             >修改</el-button
           >
           <el-button
@@ -28,10 +46,13 @@
   </div>
 </template>
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "wagonload",
   data() {
     return {
+      startTime:null,
+      endTime:null,
       input: "",
       option: {
         // 表格请求数据的地址
@@ -40,14 +61,37 @@ export default {
     };
   },
   methods: {
-    onclick(num,resultId) {
+    onclick(num, resultId) {
       if (num == 0) {
-        this.option.requestUrl = "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2&con="+this.input
+        let startTime = null;
+        let endTime = null;
+        if (this.startTime) {
+          startTime = sjTime(this.startTime);
+        }
+        if (this.endTime) {
+          endTime = sjTime(this.endTime);
+        }
+        if (startTime && endTime) {
+          if (startTime < endTime) {
+             this.option.requestUrl =
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2&con=" +
+            this.input + "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          }
+        } else {
+          this.option.requestUrl =
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2&con=" +
+            this.input;
+        }
       } else if (num == 1) {
-        this.$router.push("/addWagonLoadEmergency")
+        this.$router.push("/addWagonLoadEmergency");
       } else if (num == 2) {
         // console.log("resultId",resultId);
-         this.$router.push("/editWagonLoadEmergency/" + resultId)
+        this.$router.push("/editWagonLoadEmergency/" + resultId);
       }
     },
     deleteclick(resultId) {
@@ -84,15 +128,15 @@ export default {
 <style lang='scss' scoped>
 .homeworkPath {
   .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>

+ 12 - 2
src/views/TMS/components/importedMine/editWagonLoad.vue

@@ -167,24 +167,29 @@ export default {
     onClickConfirm() {
       let tmstrainLoadingResult = {
         resultId: this.$route.params.resultId,
-        resultIsclear: this.form1.resultIsclear,
+        resultWagonNo: this.form1.resultWagonNo,
+        resultBillableTonnage: this.form1.resultBillableTonnage,
         resultClass: this.form1.resultClass,
+        resultIsclear: this.form1.resultIsclear,
         sendStationId: this.sendStationId,
         arrivalStationId: this.toTheStationId,
         resultLoadingDate: sjTime(this.form1.resultLoadingDate),
+        batchId: this.form1.batchId,
         capacityId: this.form1.capacityId,
         resultMaterialNumber: this.form1.resultMaterialNumber,
         resultMaterialTheoryweight: this.form1.resultMaterialTheoryweight,
         resultRemarks: this.form1.resultRemarks,
+        resultType:1
       };
       if (
+        tmstrainLoadingResult.resultId ==null ||
         tmstrainLoadingResult.resultIsclear == null ||
         tmstrainLoadingResult.resultClass == null ||
         tmstrainLoadingResult.sendStationId == null ||
         tmstrainLoadingResult.arrivalStationId == null ||
         tmstrainLoadingResult.resultLoadingDate == null
       )
-        this.$message.error("必填项存在空值!");
+        this.$message.error("必填项存在空值!1");
       else
         this.axios
           .post(
@@ -197,6 +202,11 @@ export default {
                 type: "success",
                 message: "修改成功!",
               });
+            }else{
+               this.$message({
+                type: "error",
+                message: res.data.data,
+              });
             }
 
             this.$router.go(-1);

+ 105 - 39
src/views/TMS/components/importedMine/entrust.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 发送计量委托界面 -->
+  <!-- 万州港-达州计量委托界面 -->
   <div class="trainTransport">
     <div class="top">
       <el-input
@@ -9,69 +9,130 @@
         clearable
       >
       </el-input>
+
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <!-- <el-button type="primary" @click="btnclick(0)">
-        <i class="el-icon-s-promotion"></i>发送
-      </el-button> -->
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
     </div>
-    <dilTable v-bind.sync="option" @selection-change="selectionChange">
-    </dilTable>
+
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="待计量" name="first">
+        <dilTable
+          ref="excelDom"
+          v-bind.sync="option"
+          @selection-change="selectionChange"
+        >
+        </dilTable>
+      </el-tab-pane>
+      <el-tab-pane label="已计量" name="second">
+        <dilTable
+          ref="excelDom"
+          v-bind.sync="option2"
+          @selection-change="selectionChange2"
+        >
+        </dilTable>
+      </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
 
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   data() {
     return {
+      activeName: "first",
+      time: [],
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=1",
+        requestUrl: "/api/v1/tms/getLoadResultToSendMC?apiId=491&resultType=1",
+        // 控制显示多选列
+        selectionType: "select",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/tms/getWeightResult?apiId=491&resultType=1",
         // 控制显示多选列
         selectionType: "select",
       },
       selectionListMap: [],
+      selectionListMap2: [],
       resultIdList: [],
+      startTime: null,
+      endTime: null,
+      tableTitle: "万州港-达州计量表",
     };
   },
   methods: {
-    onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=1&con=" +
-        this.input;
+    handleClick(tag, event) {
+      console.log(tag, event);
     },
-    btnclick() {
-      let map = {
-        resultIdList: this.selectionListMap,
-      };
-      if (this.selectionListMap.length == 0) {
-        this.$message({
-          message: "请勾选要发送计量委托的实绩!",
-          type: "warning",
-        });
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          //判断是否是承运商
+          if (this.activeName == "first") {
+            this.option.requestUrl =
+              "/api/v1/tms/getLoadResultToSendMC?apiId=491&resultType=1" +
+              "&con=" +
+              this.input +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          } else if (this.activeName == "second") {
+            this.option2.requestUrl =
+              "/api/v1/tms/getWeightResult?apiId=491&resultType=1" +
+              "&con=" +
+              this.input +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          }
+        }
       } else {
-        this.axios
-          .post("/api/v1/tms/batchSendMeasureCommission", map)
-          .then((res) => {
-            if (res.data.data == "发送成功") {
-              this.$message({
-                type: "success",
-                message: res.data.data,
-              });
-              this.option.requestUrl =
-                "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=1" +
-                "&i=" +
-                new Date();
-            }else{
-                this.$message({
-                type: "warning",
-                message: res.data.data,
-              });
-            }
-          });
+        if (this.activeName == "first") {
+          this.option.requestUrl =
+            "/api/v1/tms/getLoadResultToSendMC?apiId=491&resultType=1" +
+            "&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else {
+          this.option2.requestUrl =
+            "/api/v1/tms/getWeightResult?apiId=491&resultType=1" +
+            "&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        }
       }
     },
     selectionChange(selection) {
@@ -79,6 +140,11 @@ export default {
       console.log(selection);
       this.selectionListMap = selection;
     },
+    selectionChange2(selection) {
+      this.selectionListMap2 = [];
+      console.log(selection);
+      this.selectionListMap2 = selection;
+    },
   },
 };
 </script>

+ 36 - 3
src/views/TMS/components/importedMine/wagonLoad.vue

@@ -9,6 +9,15 @@
         clearable
       >
       </el-input>
+        <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -37,10 +46,13 @@
 
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "wagonload",
   data() {
     return {
+      startTime:null,
+      endTime:null,
       input: "",
       option: {
         // 表格请求数据的地址
@@ -57,9 +69,30 @@ export default {
       this.option.requestUrl = "/api/v1/tms/getTmstrainWagonLoad?apiId=58&resultType=1&i=" + new Date()  
     },
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getTmstrainWagonLoad?apiId=58&resultType=1&con=" +
-        this.input;
+       let startTime = null;
+        let endTime = null;
+        if (this.startTime) {
+          startTime = sjTime(this.startTime);
+        }
+        if (this.endTime) {
+          endTime = sjTime(this.endTime);
+        }
+        if (startTime && endTime) {
+          if (startTime < endTime) {
+             this.option.requestUrl =
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=58&resultType=1&con=" +
+            this.input + "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          }
+        } else {
+          this.option.requestUrl =
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=58&resultType=1&con=" +
+            this.input;
+        }
     },
     btnclick() {
       this.$router.push("/addWagonLoad");

+ 7 - 7
src/views/TMS/components/importedShip/shipmentInstructionText.vue

@@ -18,7 +18,7 @@
             border="0"
             cellpadding="10"
             cellspacing="0"
-            style="margin: auto; font-size: 20px;font-family: FangSong;line-height: 50px"
+            style="margin: auto; font-size: 25px;font-family: FangSong;line-height: 50px"
             width="1000px"
             class="tablePart0"
           >
@@ -151,13 +151,13 @@
             border="0"
             cellpadding="10"
             cellspacing="0"
-            style="margin: auto; margin-top: 5px; font-size: 20px;font-family: FangSong;line-height: 40px"
+            style="margin: auto; margin-top: 5px; font-size: 25px;font-family: FangSong;line-height: 40px"
             width="1000px"
             class="tablePart6"
           >
             <tr>
               <th style="width: 50px"></th>
-              <td style="width: 33%">{{ item.shipperName }}</td>
+              <td style="width: 35%">{{ item.shipperName }}</td>
             </tr>
           </table>
         </div>
@@ -167,7 +167,7 @@
             border="0"
             cellpadding="10"
             cellspacing="0"
-            style="margin: auto; margin-top: 5px; font-size: 20px;font-family: FangSong;line-height: 40px"
+            style="margin: auto; margin-top: 5px; font-size: 25px;font-family: FangSong;line-height: 40px"
             width="1000px"
             class="tablePart7"
           >
@@ -237,7 +237,7 @@ export default {
   text-align: center;
   margin-bottom: 30px;
   .titleText {
-    font-size: 30px;
+    font-size: 45px;
     font-family: SimSun;
     font-weight: 900;
     line-height: 40px;
@@ -246,7 +246,7 @@ export default {
 .buttns {
   display: flex;
   flex-wrap: nowrap;
-  margin-top: 20px;
+  margin-top: 25px;
   margin-left: 465px;
   .buttn {
     margin-left: 10px;
@@ -258,7 +258,7 @@ export default {
   th,
   td {
     border: 0px solid black;
-    font-size: 20px;
+    font-size: 25px;
     margin: auto;
   }
   .tablePart1 th {

+ 14 - 10
src/views/appoint/components/ship/attorneytext.vue

@@ -18,7 +18,7 @@
             border="0"
             cellpadding="10"
             cellspacing="0"
-            style="margin: auto; font-size: 20px"
+            style="margin: auto; font-size: 25px"
             width="1000px"
             class="tablePart0"
           >
@@ -71,7 +71,7 @@
             <tr>
               <th style="width: 3%"></th>
               <th
-                style="width: 12.5%; padding-left: 2 px; font-family: FangSong"
+                style="width: 16.5%; padding-left: 2 px; font-family: FangSong"
               >
                 提货联系人:
               </th>
@@ -79,7 +79,7 @@
                 {{ item.attorneyPickupContactPerson }}
               </td>
               <th style="width: 3%"></th>
-              <th style="width: 10%; font-family: FangSong">身份证号:</th>
+              <th style="width: 13%; font-family: FangSong">身份证号:</th>
               <td style="width: 59%; font-family: FangSong">
                 {{ item.attorneyPickupIdcard }}
               </td>
@@ -97,7 +97,7 @@
           >
             <tr>
               <th style="width: 3%"></th>
-              <th style="width: 10.5%; font-family: FangSong">联系电话:</th>
+              <th style="width: 13.5%; font-family: FangSong">联系电话:</th>
               <td style="width: 98%; font-family: FangSong">
                 {{ item.attorneyContactTelephone }}
               </td>
@@ -144,7 +144,7 @@
             style="
               margin: auto;
               margin-top: 5px;
-              font-size: 20px;
+              font-size: 25px;
               line-height: 40px;
             "
             width="1000px"
@@ -152,7 +152,11 @@
           >
             <tr>
               <th style="width: 50px"></th>
-              <td style="width: 33%; font-family: FangSong">
+              <th style="width: 50px"></th>
+              <td style="width: 50px"></td>
+              <td style="width: 50px"></td>
+              <td style="width: 50px"></td>
+              <td style="width: 38%; font-family: FangSong">
                 {{ item.shipperName }}
               </td>
             </tr>
@@ -167,7 +171,7 @@
             style="
               margin: auto;
               margin-top: 5px;
-              font-size: 20px;
+              font-size: 25px;
               font-family: FangSong;
               line-height: 40px;
             "
@@ -182,7 +186,7 @@
               <th style="width: 3%">月</th>
               <td style="width: 0.7%">{{ item.date }}</td>
               <th style="width: 3%">日</th>
-              <th style="width:5%"></th>
+              <th style="width: 5%"></th>
             </tr>
           </table>
         </div>
@@ -240,7 +244,7 @@ export default {
   text-align: center;
   margin-bottom: 30px;
   .titleText {
-    font-size: 40px;
+    font-size: 45px;
     font-family: SimSun;
     font-weight: 900;
     line-height: 40px;
@@ -261,7 +265,7 @@ export default {
   th,
   td {
     border: 0px solid black;
-    font-size: 20px;
+    font-size: 25px;
     margin: auto;
   }
   .tablePart1 th {

+ 17 - 7
src/views/sale/components/saleSelfMachine/printScan.vue

@@ -4,8 +4,16 @@
             <img :src="backgroundImgURL" width="100%" height="100%"/>
         </div>
         <div class="orderNumberData">
-            <el-input placeholder="请将二维码放置在扫描区" v-model="orderNumber" :focus="true" ref="inputs">
+            <el-input placeholder="请将二维码放置在扫描区" v-model="orderNumber" :focus="true" ref="inputs" :disabled="!isEdit">
             </el-input>
+            <div style="display:block;width:120px">
+                手动输入开关:
+            </div>
+            <el-switch
+            v-model="isEdit"
+            active-color="#66ccff"
+            inactive-color="#ffffff">
+            </el-switch>
         </div>
     </div>    
 </template>
@@ -14,6 +22,7 @@ export default {
     data(){
         return{
             orderNumber:null,
+            isEdit:false,
             backgroundImgURL:require('@/assets/saleSelfMachine/scanCode.jpg'),
         }
     },
@@ -50,13 +59,14 @@ export default {
         //}
          if(this.orderNumber!=null&&this.orderNumber.length==21){
             if(this.orderNumber.startsWith('WYSDD')==true||this.orderNumber.startsWith('wysdd')==true){
-          
-            this.$router.push({
-                path:"/saleSelfMachine?orderNumber="+this.orderNumber,
-            })
+                this.$router.push({
+                        path:"/saleSelfMachine?orderNumber="+this.orderNumber,
+                })
             }
-            }   
-        
+        }else if(this.orderNumber.length>21){
+            //清空输入框,免得一次多个重复订单还无法删除
+            this.orderNumber=null;
+        } 
     },3000)
     this.$once('hook:beforeDestroy', ()=>{
         clearInterval(timer)