zx преди 2 години
родител
ревизия
edb17837b2

+ 1 - 1
build/utils.js

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

+ 1 - 1
config/index.js

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

+ 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;
     }
   }
 }

+ 104 - 47
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,62 +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="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
     </div>
-      <dilTable v-bind.sync="option" @selection-change="selectionChange">
-      </dilTable>
-    </div>
+
+    <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) {
@@ -72,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;
     }
   }
 }

+ 86 - 33
src/views/TMS/components/importedMine/entrust.vue

@@ -9,78 +9,131 @@
         clearable
       >
       </el-input>
-      <span class="item_details">时间段:</span>
-        <el-date-picker
-          style="width:200px"
-          class="date_picker_style"
-          v-model="time[0]"
-          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]"
-          type="time"
-          format="yyyy-MM-dd HH:mm:ss"
-          placeholder="结束日期"
-        >
-        </el-date-picker>
+
+      <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="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
     </div>
-    
 
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="待计量" name="first">
-        <dilTable v-bind.sync="option" @selection-change="selectionChange">
+        <dilTable
+          ref="excelDom"
+          v-bind.sync="option"
+          @selection-change="selectionChange"
+        >
         </dilTable>
       </el-tab-pane>
       <el-tab-pane label="已计量" name="second">
-        <dilTable v-bind.sync="option2" @selection-change="selectionChange2">
+        <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:null,
-      time:[],
+      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=58&resultType=1",
+        requestUrl: "/api/v1/tms/getWeightResult?apiId=491&resultType=1",
         // 控制显示多选列
         selectionType: "select",
       },
       selectionListMap: [],
-      selectionListMap2:[],
+      selectionListMap2: [],
       resultIdList: [],
+      startTime: null,
+      endTime: null,
+      tableTitle: "万州港-达州计量表",
     };
   },
   methods: {
-    handleClick(tag,event){
-      console.log(tag,event);
+    handleClick(tag, event) {
+      console.log(tag, event);
     },
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getLoadResultToSendMC?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) {
+          //判断是否是承运商
+          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 {
+        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) {
       this.selectionListMap = [];