Forráskód Böngészése

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

luobang 2 éve
szülő
commit
b6f144e7e8

+ 4 - 5
src/views/TMS/components/domesticMine/wagonLoadAdd.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 国产矿导入3-->
-  <div class="addWagonLoad">
+  <div class="addWagonLoad" style="width:100%">
     <page-title>返回</page-title>
     <div class="cp">
       <el-upload
@@ -18,11 +18,12 @@
         当前导入数量:{{ tableData.length }}
       </div>
     </div>
-    <div class="importedTable" style="height:300px;overflow:scroll;">
+    <div class="importedTable" style="height:300px;overflow:scroll;width:100%">
       <el-table
         ref="importExcel"
         highlight-current-row
         :data="tableData"
+        fit
         :row-style="{height:'40px'}"
          @row-click="rowClick"
          style="width: 100%;font-size: 14px"
@@ -59,7 +60,7 @@
           align="center"
           prop="supplierName"
           label="发货单位"
-          width="150px"
+          width="300px"
         >
         </el-table-column>
         <el-table-column
@@ -106,7 +107,6 @@
         </el-table-column>
         <el-table-column
           align="center"
-          width="100px"
           prop="weight"
           label="标重"
         >
@@ -132,7 +132,6 @@
           <div class="preview-group">
             <el-form-item label="到站:">
               <el-autocomplete
-                class="inline-input"
                 v-model="toTheStation"
                 :fetch-suggestions="querySearchToTheStation"
                 placeholder="请输入到站名称"

+ 53 - 248
src/views/TMS/components/importedMine/addWagonPlease.vue

@@ -2,67 +2,25 @@
   <!-- 新增请作业页面 -->
   <div class="contractDetails">
     <page-title>返回</page-title>
-
-    <div class="form">
-      <div class="form_box">
-        <dil-form :formId="122" v-model="form1"></dil-form>
-      </div>
-    </div>
-    <div class="fromOther">
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
-        <el-form-item label="发货单位">
-          <el-autocomplete
-            class="inline-input"
-            v-model="stateSupplier"
-            :fetch-suggestions="querySearchSupplier"
-            placeholder="请输入发货单位名称"
-            :trigger-on-focus="false"
-            @select="handleSelectSupplier"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.supplierName }}</div>
-            </template>
-          </el-autocomplete>
+    <div>
+      <el-form   label-width="80px" style="margin-left:35%;">
+        <el-form-item label="批复车数">
+          <el-input v-model="form.resultApproveNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
-        <el-form-item label="发站">
-          <el-autocomplete
-            class="inline-input"
-            v-model="sendStation"
-            :fetch-suggestions="querySearchSendStation"
-            placeholder="请输入发站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectSendStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="落空车数">
+          <el-input v-model="form.resultVoidNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
-        <el-form-item label="到站">
-          <el-autocomplete
-            class="inline-input"
-            v-model="toTheStation"
-            :fetch-suggestions="querySearchToTheStation"
-            placeholder="请输入到站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectToTheStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="实装车数">
+          <el-input v-model="form.resultRealNumber" type="number" style="width:240px"></el-input>
+        </el-form-item>
+        <el-form-item label="日期">
+          <el-date-picker v-model="form.resultDate" type="datetime" placeholder="日期" @change="getRealNumber"></el-date-picker>
         </el-form-item>
       </el-form>
-    </div>
-    <div class="trainTransport">
       <!-- 确定和取消 -->
-      <div class="button_box">
-        <el-button @click="onClickCancel">返回</el-button>
-        <el-button type="primary" @click="onClickConfirm">确认</el-button>
+      <div style="margin-left:40%">
+        <el-button @click="cancel">返回</el-button>
+        <el-button type="primary" @click="makeSure">确认</el-button>
       </div>
     </div>
   </div>
@@ -76,211 +34,58 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      // 表单
-      form1: {},
-      supplierId: null,
-      supplierName: "",
-      stateSupplier: "",
-      sendStationId:2,
-      toTheStationId:1,
-      sendStation:"万州港",
-      toTheStation:"老区轨道衡"
+      form:{
+        resultRealNumber:0,
+        resultDate:new Date()
+      }
     };
   },
   created() {
     
+  },
+  mounted(){
+    this.getRealNumber();
   },
   methods: {
-    handleCheckedCitiesChange(value) {
-      console.log(value);
-    },
-    //发站弹出层
-    handleSelectSendStation(item) {
-      this.sendStationId = item.arrivalId;
-      this.sendStation = item.arrivalName;
-    },
-    //以下是发站边输边查搜索
-    querySearchSendStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.sendStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterSendStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
-        });
-    },
-    //发站
-    createFilterSendStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    //到站弹出层
-    handleSelectToTheStation(item) {
-      this.toTheStationId = item.arrivalId;
-      this.toTheStation = item.arrivalName;
-    },
-    //以下是到站边输边查搜索
-    querySearchToTheStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.toTheStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterToTheStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
-        });
-    },
-    //到站
-    createFilterToTheStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    //发货单位弹出层
-    handleSelectSupplier(item) {
-      this.supplierId = item.supplierId;
-      item.supplierName = this.supplierName;
-    },
-    //以下是发货单位边输边查搜索
-    querySearchSupplier(queryString, cb) {
-      this.axios
-        .post("/api/v1/uc/getSupplierMesByLike?index=" + this.stateSupplier)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterSupplier(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
-        });
-    },
-    createFilterSupplier(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.value
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    // 返回
-    onClickCancel() {
+    cancel() {
       this.$router.go(-1);
     },
-    // 确认
-    onClickConfirm() {
-      let tmstrainPleaseApproveResult = {
-        resultPlanDate: sjTime(this.form1.resultPlanDate),
-        resultCategory: this.form1.resultCategory,
-        supplierId: this.supplierId,
-        sendStationId: this.sendStationId,
-        toTheStationId: this.toTheStationId,
-        resultPleaseNumber: this.form1.resultPleaseNumber,
-        userId: getCookie("orgCode"),
-        resultType: 1,
-      };
-      function isNumber() {
-        var value = tmstrainPleaseApproveResult.resultPleaseNumber;
-        //验证是否为数字
-        var patrn = /^(-)?\d+(\.\d+)?$/;
-        if (patrn.exec(value) == null || value == "") {
-          return false;
-        } else {
-          return true;
-        }
+    makeSure() {
+      console.log("form",this.form.resultVoidNumber-this.form.resultApproveNumber);
+      if(!this.form.resultDate ||
+      !this.form.resultApproveNumber||
+      !this.form.resultVoidNumber||
+      !this.form.resultRealNumber){
+        this.$message.warning("存在空值!");
+        return;
+      }else if(this.form.resultVoidNumber-this.form.resultApproveNumber>0){
+        this.$message.warning("落空车数不能超过批复车数!");
+        return;
       }
-      var val = this.value;
-      if (
-        tmstrainPleaseApproveResult.resultPlanDate == null ||
-        tmstrainPleaseApproveResult.resultCategory == null ||
-        tmstrainPleaseApproveResult.supplierId == null ||
-        tmstrainPleaseApproveResult.sendStationId == null ||
-        tmstrainPleaseApproveResult.toTheStationId == null ||
-        tmstrainPleaseApproveResult.resultPleaseNumber == null
-      )
-        this.$message.error("存在空值!");
-      else if (!isNumber(val)) this.$message.error("请车数量必须是数字!");
-      else
-        this.axios
-          .post("/api/v1/tms/addWagonPlease", tmstrainPleaseApproveResult)
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            this.$router.go(-1);
+      this.form.resultDate= sjTime(this.form.resultDate);
+      this.form.resultSurplusNumber=this.form.resultApproveNumber-this.form.resultVoidNumber;
+      this.form.userId= getCookie("userId");
+      this.axios.post("/api/v1/tms/addPleaseResult", this.form).then(() => {
+          this.$message({
+            type: "success",
+            message: "新增成功!",
           });
+          this.$router.go(-1);
+        });
     },
+    //获取当天车皮数量
+    getRealNumber(){
+      if(this.form.resultDate){
+        this.form.resultDate=sjTime(this.form.resultDate);
+        this.axios.post("/api/v1/tms/getRealNumber",this.form).then((res)=>{
+          console.log("res",res);
+          this.form.resultRealNumber=res.data.data;
+          console.log("form",this.form);
+        });
+      }
+    }
   },
 };
 </script>
 <style lang="scss">
-.contractDetails {
-  .form {
-    display: flex;
-    .form_box {
-      width: 340px;
-      margin-left: 35%;
-      margin-top: 30px;
-      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-input {
-                width: 250px;
-              }
-            }
-            .button_box {
-              margin-left: 42%;
-              margin-top: 55px;
-            }
-          }
-        }
-      }
-    }
-  }
-  .trainTransport{
-    .button_box{
-      margin-left: 40%;
-      margin-bottom: 2px;
-
-    }
-  }
-}
 </style>

+ 51 - 251
src/views/TMS/components/importedMine/editWagonPlease.vue

@@ -1,67 +1,27 @@
 <template>
+  <!-- 新增请作业页面 -->
   <div class="contractDetails">
     <page-title>返回</page-title>
-
-    <div class="form">
-      <div class="form_box">
-        <dil-form :formId="117" v-model="form1"></dil-form>
-      </div>
-    </div>
-    <div class="fromOther">
-      <el-form :inline="true" class="demo-form-inline" label-width="80px">
-        <el-form-item label="发货单位">
-          <el-autocomplete
-            class="inline-input"
-            v-model="stateSupplier"
-            :fetch-suggestions="querySearchSupplier"
-            placeholder="请输入发货单位名称"
-            :trigger-on-focus="false"
-            @select="handleSelectSupplier"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.supplierName }}</div>
-            </template>
-          </el-autocomplete>
+    <div>
+      <el-form   label-width="80px" style="margin-left:35%;">
+        <el-form-item label="批复车数">
+          <el-input v-model="form.resultApproveNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-        <el-form :inline="true" class="demo-form-inline" label-width="80px" >
-        <el-form-item label="发站:">
-          <el-autocomplete
-            class="inline-input"
-            v-model="sendStation"
-            :fetch-suggestions="querySearchSendStation"
-            placeholder="请输入发站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectSendStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="落空车数">
+          <el-input v-model="form.resultVoidNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" >
-        <el-form-item label="到站:">
-          <el-autocomplete
-            class="inline-input"
-            v-model="toTheStation"
-            :fetch-suggestions="querySearchToTheStation"
-            placeholder="请输入到站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectToTheStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="实装车数">
+          <el-input v-model="form.resultRealNumber" type="number" style="width:240px"></el-input>
+        </el-form-item>
+        <el-form-item label="日期">
+          <el-date-picker v-model="form.resultDate" type="datetime" placeholder="日期" @change="getRealNumber"></el-date-picker>
         </el-form-item>
       </el-form>
-    </div>
-
-    <!-- 确定和取消 -->
-    <div class="button_box">
-      <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm">确认</el-button>
+      <!-- 确定和取消 -->
+      <div style="margin-left:40%">
+        <el-button @click="cancel">返回</el-button>
+        <el-button type="primary" @click="makeSure">确认</el-button>
+      </div>
     </div>
   </div>
 </template>
@@ -69,18 +29,12 @@
 <script>
 import PageTitle from "@/components/Page/Title";
 import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      form1: {},
-      supplierId: null,
-      supplierName: "",
-      stateSupplier: "",
-      sendStationId:null,
-      toTheStationId:null,
-      sendStation:"",
-      toTheStation:""
+      form:null,
     };
   },
   mounted() {
@@ -90,204 +44,50 @@ export default {
     information() {
       //编辑请车作业
       this.axios
-        .post("/api/v1/tms/getWagonPleaseById/" + this.$route.params.resultId)
+        .post("/api/v1/tms/getPleaseResult/" + this.$route.params.resultId)
         .then((res) => {
-          res.data.data.forEach((e) => {
-            this.form1 = e;
-            console.log(e)
-            this.toTheStationId = e.toTheStationId
-            this.sendStationId = e.sendStationId
-            this.sendStation = e.sendName
-            this.toTheStation = e.arrivalName
-          });
-          
-          this.stateSupplier = res.data.data[0].supplierName;
-          this.supplierId = res.data.data[0].supplierId;
+          this.form=res.data.data;
         });
     },
-    // 返回
-    onClickCancel() {
+    cancel() {
       this.$router.go(-1);
     },
-       //发货单位弹出层
-    handleSelectSupplier(item){
-      this.supplierId = item.supplierId
-      item.supplierName = this.supplierName
-    },
-    //以下是发货单位边输边查搜索
-    querySearchSupplier(queryString, cb) {
-        this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
-        if(res.data.code == "200"){    
-          var restaurantsSupplier = res.data.data
-          var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
-          // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-      })  
-      },
-    createFilterSupplier(queryString) {
-        return (restaurantsSupplier) => {
-          return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
-    //发站弹出层
-    handleSelectSendStation(item) {
-      this.sendStationId = item.arrivalId;
-      this.sendStation = item.arrivalName;
-    },
-    //以下是发站边输边查搜索
-    querySearchSendStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.sendStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterSendStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
+    makeSure() {
+      if(!this.form.resultDate ||
+      !this.form.resultApproveNumber||
+      !this.form.resultVoidNumber||
+      !this.form.resultRealNumber){
+        this.$message.warning("存在空值!");
+        return;
+      }else if(this.form.resultVoidNumber-this.form.resultApproveNumber>0){
+        this.$message.warning("落空车数不能超过批复车数!");
+        return;
+      }
+      this.form.resultDate= sjTime(this.form.resultDate);
+      this.form.resultSurplusNumber=this.form.resultApproveNumber-this.form.resultVoidNumber;
+      this.form.userId= getCookie("userId");
+      this.axios.post("/api/v1/tms/editPleaseResult", this.form).then(() => {
+          this.$message({
+            type: "success",
+            message: "修改成功!",
+          });
+          this.$router.go(-1);
         });
     },
-    //发站
-    createFilterSendStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    //到站弹出层
-    handleSelectToTheStation(item) {
-      this.toTheStationId = item.arrivalId;
-      this.toTheStation = item.arrivalName;
-    },
-    //以下是到站边输边查搜索
-    querySearchToTheStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.toTheStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterToTheStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
+    //获取当天车皮数量
+    getRealNumber(){
+      if(this.form.resultDate){
+        this.form.resultDate=sjTime(this.form.resultDate);
+        this.axios.post("/api/v1/tms/getRealNumber",this.form).then((res)=>{
+          console.log("res",res);
+          this.form.resultRealNumber=res.data.data;
+          console.log("form",this.form);
         });
-    },
-    //到站
-    createFilterToTheStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-
-    // 确认
-    onClickConfirm() {
-      let tmstrainPleaseApproveResult = {
-        resultId: this.$route.params.resultId,
-        resultPlanDate: sjTime(this.form1.resultPlanDate),
-        resultCategory: this.form1.resultCategory,
-        supplierId: this.supplierId,
-        sendStationId: this.sendStationId,
-        toTheStationId: this.toTheStationId,
-        resultPleaseNumber: this.form1.resultPleaseNumber,
-      };
-      console.log(tmstrainPleaseApproveResult)
-      function isNumber() {
-        var value = tmstrainPleaseApproveResult.resultPleaseNumber;
-        //验证是否为数字
-        var patrn = /^(-)?\d+(\.\d+)?$/;
-        if (patrn.exec(value) == null || value == "") {
-          return false;
-        } else {
-          return true;
-        }
       }
-      var val = this.value;
-      if (
-        tmstrainPleaseApproveResult.resultPlanDate == null ||
-        tmstrainPleaseApproveResult.resultCategory == null ||
-        tmstrainPleaseApproveResult.supplierId == null ||
-        tmstrainPleaseApproveResult.sendStationId == null ||
-        tmstrainPleaseApproveResult.toTheStationId == null ||
-        tmstrainPleaseApproveResult.resultPleaseNumber == null
-      )
-        this.$message.error("存在空值!");
-      else if (!isNumber(val)) this.$message.error("请车数必须是数字!");
-      else
-        this.axios
-          .post(
-            "/api/v1/tms/updateApproveWagonPlease",
-            tmstrainPleaseApproveResult
-          )
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "修改成功!",
-            });
-            this.$router.go(-1);
-          });
-    },
+    }
   },
 };
 </script>
 <style lang="scss">
-.contractDetails {
-  .form {
-    display: flex;
-    .form_box {
-      width: 340px;
-      margin-left: 35%;
-      margin-top: 30px;
-      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-input {
-                width: 250px;
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  .button_box {
-    margin-left: 42%;
-    margin-top: 55px;
-  }
-  .fromOther {
-  margin-left: 34.5%;
-  width: 50%;
-  .el-input__inner{
-    width: 250px;
-  
-  }
-}
-}
 
 </style>

+ 1 - 1
src/views/TMS/components/importedMine/outBoundWagon.vue

@@ -33,7 +33,7 @@
       </mergeRowTable>
       </el-tab-pane>
       <el-tab-pane label="待计量" name="second">
-        <mergeRowTable v-bind.sync="option1" ref="excelDom">
+        <mergeRowTable v-bind.sync="option1" ref="excelDom" @func="calculate">
         <el-table-column fixed="right" label="操作" width="50">
           <template slot-scope="scope">
             <el-button

+ 50 - 85
src/views/TMS/components/importedMine/wagonPlease.vue

@@ -1,19 +1,28 @@
 <template>
   <!-- 请车作业页面 -->
   <div class="trainTransport">
-    <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" @click="insertClick">
-        <i class="el-icon-plus"></i>新增
-      </el-button>
-    </div>
-    <el-tabs v-model="activeName">
-      <!-- 未下发 -->
-      <el-tab-pane label="未下发" name="first">
-        <dilTable v-bind.sync="option1" ref="table">
+     <div class="search" style="display:flex;margin: 10px;">
+        <!-- <el-input
+          placeholder="请输入"
+          v-model="input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input> -->
+       <el-date-picker style="margin: 10px;" v-model="startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="onclick"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button class="btn" style="margin: 10px;" type="primary" @click="insertClick">
+          <i class="el-icon-plus"></i>新增
+        </el-button>
+      </div>
+      <dilTable v-bind.sync="option" ref="table">
           <el-table-column fixed="right" label="操作" width="120">
             <template slot-scope="scope">
               <el-button
@@ -24,75 +33,59 @@
                 修改
               </el-button>
               <el-button
-                @click="deleteClick(scope.row.resultId)"
+                @click="deleteClick(scope.row)"
                 type="text"
                 size="small"
               >
                 删除
               </el-button>
-              <el-button
-                @click="sendClick(scope.row.resultId)"
-                type="text"
-                size="small"
-              >
-                下发
-              </el-button>
             </template>
           </el-table-column>
         </dilTable>
-      </el-tab-pane>
-      <!-- 已下发 -->
-      <el-tab-pane label="已下发" name="second">
-        <dilTable v-bind.sync="option2"></dilTable>
-      </el-tab-pane>
-    </el-tabs>
   </div>
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
     return {
       input: "",
-      activeName: "first",
-      option1: {
+      startTime:null,
+      endTime:null,
+      option: {
         // 表格请求数据的地址
         requestUrl: ""
       },
-      option2: {
-        // 表格请求数据的地址
-        requestUrl: ""
-      }
     };
   },
   created() {
-    this.getRequestUrl();
+    this.onclick();
   },
   methods: {
-    getRequestUrl() {
-      this.option1.requestUrl =
-        "/api/v1/tms/getAllWagonPlease?apiId=57&status=0&resultType=1" +
-        "&i=" +
-        new Date();
-      this.option2.requestUrl =
-        "/api/v1/tms/getAllWagonPlease?apiId=57&status=1&resultType=1" +
-        "&i=" +
-        new Date();
+    checkDate(){
+      if(this.startTime&&this.endTime&&this.startTime<this.endTime){
+        return true;
+      }else{
+        return false;
+      }
     },
     onclick() {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/tms/getAllWagonPlease?apiId=57&status=0&resultType=1&con=" +
-          this.input;
+      if (this.checkDate()) {
+        this.option.requestUrl =
+          "/api/v1/tms/getAllPleaseResult?apiId=509&con=" + this.input
+          +"&i="+new Date()
+          +"&startTime="+sjTime(this.startTime)
+          +"&endTime="+sjTime(this.endTime);
       } else {
-        this.option2.requestUrl =
-          "/api/v1/tms/getAllWagonPlease?apiId=57&status=1&resultType=1&con=" +
-          this.input;
+        this.option.requestUrl =
+          "/api/v1/tms/getAllPleaseResult?apiId=509&con=" +this.input
+          +"&i="+new Date();
       }
     },
     // 删除
-    deleteClick(resultId) {
+    deleteClick(row) {
       this.$confirm("是否删除", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -100,49 +93,21 @@ export default {
         center: true
       })
         .then(() => {
+          let map={
+            resultId:row.resultId,
+            deleted:1
+          }
           this.axios
-            .post("/api/v1/tms/deleteApproveWagonPlease/" + resultId)
+            .post("/api/v1/tms/editPleaseResult",map)
             .then(() => {
               this.$message({
                 type: "success",
                 message: "删除成功!"
               });
-              this.getRequestUrl();
+              this.onclick();
             });
         })  
     },
-    // 下发
-    sendClick(resultId) {
-      this.$confirm("是否下发", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true
-      })
-        .then(() => {
-          console.log("enter!1!");
-          this.axios
-            .post("/api/v1/tms/sendWagonPlease/" + resultId)
-            .then(res => {
-              if (res.data.code == "200") {
-                this.getRequestUrl();
-              }
-            });
-          this.$message({
-            type: "success",
-            message: "下发成功!"
-          });
-          // console.log(this.arr[0].text_prop);
-        })
-        .catch(() => {
-          console.log("out!S");
-          this.$message({
-            type: "info",
-            message: "取消下发!"
-          });
-        });
-    },
-
     //新增
     insertClick() {
       this.$router.push("/addWagonPlease/");

+ 17 - 0
src/views/appoint/components/ship/deliveryAttorney.vue

@@ -75,6 +75,23 @@
       <!-- 已下发 -->
       <el-tab-pane label="已下发" name="second">
         <dilTable v-bind.sync="option2" @selection-change="selectionChange">
+          <el-table-column
+            fixed="right"
+            align="center"
+            label="操作"
+            width="120"
+          >
+            <template slot-scope="scope">
+              <el-button
+                @click="modifyClick(scope.row.attorneyId)"
+                type="text"
+                size="small"
+                :disabled="scope.row.purchaseOrderMaterialNum"
+              >
+                修改
+              </el-button>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
     </el-tabs>

+ 1 - 1
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -66,7 +66,7 @@
         <el-button type="primary" class="btn" @click="onclick">
           <i class="el-icon-search"></i>
         </el-button>
-        <el-button type="primary" @click="exportAllExcel"
+        <el-button type="primary" @click="exportData()"
           ><i class="el-icon-download"></i>Excel</el-button
         >
       </el-form>

+ 5 - 3
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -509,6 +509,7 @@ export default {
           if (res.data.data == "-1") {
             this.$message.error("运输订单未关闭,自提车辆无权查看!");
           } else if (res.data.data.startAndEndRoutes) {
+            console.log("res.data.data:",res.data.data);
             that.listPath = res.data.data.startAndEndRoutes;
             that.initMap([105.602725, 37.076636]);
           } else {
@@ -534,7 +535,7 @@ export default {
         that.initThreeMarker();
         //初始化当前点标记
         //that.initCustomMarkes(that.carNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
-        //that.initEndline();
+        that.initEndline();
       });
     },
     //结束点
@@ -569,11 +570,11 @@ export default {
           element.endPoint != "" &&
           element.endPoint != null
         ) {
-          // that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
+          that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
           //终点名称
           that.getEndPointName([element.endPoint.lon, element.endPoint.lat]);
         } else {
-          // that.initMarkes(20,35,require('@/assets/img/end.png'),element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat,'终点');
+          that.initMarkes(20,35,require('@/assets/img/end.png'),element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat,'终点');
           //终点名称
           that.getEndPointName([
             element.runRoute[element.runRoute.length - 1].lon,
@@ -604,6 +605,7 @@ export default {
     //初始化预计轨迹
     initPolyline(path, color) {
       let that = this;
+      console.log("path:",path);
       //预计轨迹
       var endLine = new AMap.Polyline({
         map: that.map, //地图组件

+ 6 - 5
src/views/statisticalReport/components/dowmShipDynamicTable.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 万州港作业报表 -->
-  <div class="dowmShipDynamicTable">
+  <div class="dowmShipDynamicTable" style="width:100%">
     <div style="height:100%;width:100%">
       <div class="search" style="display:flex;margin: 10px;">
         <el-input
@@ -21,14 +21,15 @@
         </el-button>
       </div>
       <!-- 下游港口船舶动态表 -->
-      <div class="loadData" style="height:500px;margin-left:5px">
+      <div class="loadData" style="height:500px;margin-left:5px;width:100%">
         <!-- <div style="font-size:16px;color:red">港口装车数据:共{{count}}车</div> -->
-        <div class="loadTable" style="height:500px;overflow:scroll;">
+        <div class="loadTable" style="height:500px;overflow:scroll;width:100%">
         <el-table
           ref="loadTable"
           highlight-current-row
           empty-text="请查询数据"
           border
+          fit
           show-summary
           :summary-method="getSummaries"
           :span-method="objectSpanMethod"
@@ -45,7 +46,7 @@
           align="center"
             prop="productName"
             label="品种/数量/放货日期"
-            width="380px">
+            >
           </el-table-column>
           <el-table-column
           align="center"
@@ -57,7 +58,7 @@
           align="center"
             prop="capacityNumber"
             label="船名"
-            width="100px">
+            width="150px">
           </el-table-column>
            <el-table-column
           align="center"

+ 217 - 0
src/views/statisticalReport/components/wanzhouReport/loadWagonWorkReport.vue

@@ -0,0 +1,217 @@
+<template>
+  <!-- 万州港装船作业报表 -->
+  <div class="ShipWorkReport" style="width:100%;">
+    <div style="height:100%;width:100%">
+      <div class="search" style="display:flex;margin: 10px;">
+        <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input>
+       <el-date-picker style="margin: 10px;" v-model="map.startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="map.endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="searchLoadData"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="exportToExcel('装车作业统计.xlsx')"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-download"></i>导出excel
+        </el-button>
+      </div>
+
+      <!-- 装车出库详情 -->
+      <div ref="loadWagonData" style="width:100%;height:500px;float:left;margin-left:5px">
+        <div style="font-size:16px;color:red">港口装车数据:共{{count}}车</div>
+        <div class="loadTable" style="height:500px;width:100%;overflow:scroll;">
+             <el-table
+          ref="loadTable"
+          highlight-current-row
+          border
+          fit
+          show-summary
+          :summary-method="getSummaries"
+          :data="loadTable"
+          :span-method="objectSpanMethod"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          align="center"
+            prop="materialName"
+            label="物资名">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="resultForeignShipName"
+            label="船号">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="num"
+            label="装车量">
+          </el-table-column>
+        </el-table>
+        </div >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import {getCookie} from "@/utils/util.js";
+import FileSaver from "file-saver";
+import BigNumber from "bignumber.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+        count:0,
+        loadTable:[],
+        unLoadTable:[],
+        map:{
+            input:"",
+            startTime:null,
+            endTime:null
+        },
+        spanArr: [], // 用于存放需要合并的行的个数
+        spanIndex: 0, // 记录spanArr数组的下标
+      
+    };
+  },
+  mounted(){
+    this.searchLoadData();
+  },
+  methods: {
+    //查询装车数据
+    searchLoadData(){
+      //时间校验
+      if(this.map.startTime && this.map.endTime){
+        if(this.map.startTime>=this.map.endTime){
+            this.$message({
+                message:"结束日期必须大于起始日期!",
+                type:"warning",
+                duration:2000
+            });
+            return;
+        }
+        this.map.startTime=sjTime(this.map.startTime);
+        this.map.endTime=sjTime(this.map.endTime);
+      }else if((this.map.startTime && !this.map.endTime) || (!this.map.startTime && this.map.endTime)){
+        this.$message({
+            message:"起止日期错误!",
+            type:"warning",
+            duration:2000
+        });
+        return;
+      }
+      this.axios.post('/api/v1/tms/getLoadData',this.map).then((res)=>{
+        if(res.data.code == "200"){
+          this.getSpanArr(res.data.data);
+          this.loadTable=res.data.data;
+          this.count=0;
+          this.loadTable.forEach((item)=>{
+            this.count+=item.num;
+          });
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //处理数据,得到合并数组
+    getSpanArr(data) {
+        this.spanArr=[];
+        for (let i = 0; i < data.length; i++) {
+            if (i == 0) {
+                this.spanArr.push(1);
+                this.spanIndex = 0;
+            } else {
+                // 判断当前行与前一行内容是否相同
+                if (data[i].materialName == data[i - 1].materialName) {
+                    this.spanArr[this.spanIndex] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr.push(1); // 否则,依旧是一行
+                    this.spanIndex = i;
+                }
+            }
+        }
+    },
+     //合并
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+        if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }
+    },
+    exportToExcel(tableTitle) {
+        let tables = this.$refs.loadWagonData;
+        let table_book = XLSX.utils.table_to_book(tables);
+        var table_write = XLSX.write(table_book, {
+            bookType: "xlsx",
+            bookSST: true,
+            type: "array"
+        });
+        try {
+            FileSaver.saveAs(
+                new Blob([table_write], { type: "application/octet-stream" }),
+                tableTitle
+            );
+        } catch (e) {
+            if (typeof console !== "undefined") console.log(e, table_write);
+        }
+        return table_write;
+    },
+     getSummaries(param) {
+        console.log("param",param);
+        const { columns, data } = param;
+        const sums = [];
+        columns.forEach((column, index) => {
+          if (index === 0) {
+            sums[index] = '合计';
+            return;
+          }
+          if (index === 1 ) {
+            sums[index] = '';
+            return;
+          }
+          const values = data.map(item => Number(item[column.property]));
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return new BigNumber(prev).plus(curr).toNumber();
+              } else {
+                return prev;
+              }
+            }, 0);
+          } else {
+            sums[index] = '';
+          }
+        });
+        return sums;
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+</style>
+

+ 144 - 0
src/views/statisticalReport/components/wanzhouReport/unloadShipWorkReport.vue

@@ -0,0 +1,144 @@
+<template>
+  <!-- 万州港卸船作业报表 -->
+  <div class="ShipWorkReport" style="width:100%;">
+    <div style="height:100%;width:100%">
+      <div class="search" style="display:flex;margin: 10px;">
+        <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input>
+       <el-date-picker style="margin: 10px;" v-model="map.startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="map.endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="searchUnLoadData"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="exportToExcel('卸船作业统计.xlsx')"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-download"></i>导出excel
+        </el-button>
+      </div>
+      <!-- 装车出库详情 -->
+      <div ref="unloadData" style="height:500px;width:100%;float:left;margin-left:5px">
+        <div style="font-size:16px;color:red">港口卸船数据</div>
+        <div class="loadTable" style="height:500px;width:100%;overflow:scroll;">
+             <el-table
+          ref="loadTable"
+          highlight-current-row
+          border
+          fit
+          :data="unLoadTable"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          align="center"
+            prop="status"
+            label="状态">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="num"
+            label="数量">
+          </el-table-column>
+        </el-table>
+        </div >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import {getCookie} from "@/utils/util.js";
+import FileSaver from "file-saver";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+        count:0,
+        loadTable:[],
+        unLoadTable:[],
+        map:{
+            input:"",
+            startTime:null,
+            endTime:null
+        },
+        spanArr: [], // 用于存放需要合并的行的个数
+        spanIndex: 0, // 记录spanArr数组的下标
+      
+    };
+  },
+  mounted(){
+    this.searchUnLoadData();
+  },
+  methods: {
+    //查询卸船
+    searchUnLoadData(){
+        //时间校验
+      if(this.map.startTime && this.map.endTime){
+        if(this.map.startTime>=this.map.endTime){
+            this.$message({
+                message:"结束日期必须大于起始日期!",
+                type:"warning",
+                duration:2000
+            });
+            return;
+        }
+        this.map.startTime=sjTime(this.map.startTime);
+        this.map.endTime=sjTime(this.map.endTime);
+      }else if((this.map.startTime && !this.map.endTime) || (!this.map.startTime && this.map.endTime)){
+        this.$message({
+            message:"起止日期错误!",
+            type:"warning",
+            duration:2000
+        });
+        return;
+      }
+      this.axios.post('/api/v1/tms/getUnloadData',this.map).then((res)=>{
+        if(res.data.code == "200"){
+          this.unLoadTable=res.data.data;
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //   点击按钮  导出excel表格:
+    exportToExcel(tableTitle) {
+        let tables = this.$refs.unloadData;
+        let table_book = XLSX.utils.table_to_book(tables);
+        var table_write = XLSX.write(table_book, {
+            bookType: "xlsx",
+            bookSST: true,
+            type: "array"
+        });
+        try {
+            FileSaver.saveAs(
+                new Blob([table_write], { type: "application/octet-stream" }),
+                tableTitle
+            );
+        } catch (e) {
+            if (typeof console !== "undefined") console.log(e, table_write);
+        }
+        return table_write;
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+</style>
+

+ 178 - 0
src/views/statisticalReport/components/wanzhouReport/wagonWorkReport.vue

@@ -0,0 +1,178 @@
+<template>
+  <!-- 车皮作业报表 -->
+  <div class="ShipWorkReport" style="width:100%;">
+    <div style="height:100%;width:100%">
+      <div class="search" style="display:flex;margin: 10px;">
+        <!-- <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input> -->
+       <el-date-picker style="margin: 10px;" v-model="map.startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="map.endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="searchLoadData"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="exportToExcel('车皮作业统计.xlsx')"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-download"></i>导出excel
+        </el-button>
+      </div>
+
+      <!-- 装车出库详情 -->
+      <div ref="loadWagonData" style="height:500px;float:left;margin-left:5px;width:100%">
+        <div class="loadTable" style="height:500px;overflow:scroll;width:100%">
+             <el-table
+          ref="loadTable"
+          highlight-current-row
+          border
+          fit
+          :data="loadTable"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          align="center"
+            prop="dateType"
+            label="数据类型">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="num"
+            label="装车量">
+          </el-table-column>
+        </el-table>
+        </div >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import {getCookie} from "@/utils/util.js";
+import FileSaver from "file-saver";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+        count:0,
+        loadTable:[],
+        unLoadTable:[],
+        map:{
+            input:"",
+            startTime:null,
+            endTime:null
+        },
+        spanArr: [], // 用于存放需要合并的行的个数
+        spanIndex: 0, // 记录spanArr数组的下标
+      
+    };
+  },
+  mounted(){
+    this.searchLoadData();
+  },
+  methods: {
+    //查询装车数据
+    searchLoadData(){
+      //时间校验
+      if(this.map.startTime && this.map.endTime){
+        if(this.map.startTime>=this.map.endTime){
+            this.$message({
+                message:"结束日期必须大于起始日期!",
+                type:"warning",
+                duration:2000
+            });
+            return;
+        }
+        this.map.startTime=sjTime(this.map.startTime);
+        this.map.endTime=sjTime(this.map.endTime);
+      }else if((this.map.startTime && !this.map.endTime) || (!this.map.startTime && this.map.endTime)){
+        this.$message({
+            message:"起止日期错误!",
+            type:"warning",
+            duration:2000
+        });
+        return;
+      }
+      this.axios.post('/api/v1/tms/getWagonWork',this.map).then((res)=>{
+        if(res.data.code == "200"){
+          this.getSpanArr(res.data.data);
+          this.loadTable=res.data.data;
+          this.count=0;
+          this.loadTable.forEach((item)=>{
+            this.count+=item.num;
+          });
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //处理数据,得到合并数组
+    getSpanArr(data) {
+        this.spanArr=[];
+        for (let i = 0; i < data.length; i++) {
+            if (i == 0) {
+                this.spanArr.push(1);
+                this.spanIndex = 0;
+            } else {
+                // 判断当前行与前一行内容是否相同
+                if (data[i].materialName == data[i - 1].materialName) {
+                    this.spanArr[this.spanIndex] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr.push(1); // 否则,依旧是一行
+                    this.spanIndex = i;
+                }
+            }
+        }
+    },
+     //合并
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+        if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }
+    },
+    exportToExcel(tableTitle) {
+        let tables = this.$refs.loadWagonData;
+        let table_book = XLSX.utils.table_to_book(tables);
+        var table_write = XLSX.write(table_book, {
+            bookType: "xlsx",
+            bookSST: true,
+            type: "array"
+        });
+        try {
+            FileSaver.saveAs(
+                new Blob([table_write], { type: "application/octet-stream" }),
+                tableTitle
+            );
+        } catch (e) {
+            if (typeof console !== "undefined") console.log(e, table_write);
+        }
+        return table_write;
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+</style>
+

+ 27 - 0
src/views/statisticalReport/router/index.js

@@ -32,6 +32,9 @@ import inwardAssemble from "../components/inwardAssemble/inwardAssemble.vue";
 import loadCapacityDetail from "../components/loadCapacityDetail/loadCapacityDetail.vue";
 import allInwardReport from "../components/inwardReport/allInwardReport.vue";
 import saleSteelAllReport from "../components/salesLogisticsStatistics/saleSteelAllReport.vue";
+import loadWagonWorkReport from "../components/wanzhouReport/loadWagonWorkReport.vue";
+import unloadShipWorkReport from "../components/wanzhouReport/unloadShipWorkReport.vue";
+import wagonWorkReport from "../components/wanzhouReport/wagonWorkReport.vue";
 Vue.use(Router);
 
 const constantRouterMap = [
@@ -199,6 +202,30 @@ const constantRouterMap = [
           code: "xtpzgl-yhgl"
         },
         component: saleSteelAllReport
+      },
+      {
+        path: "loadWagonWorkReport",
+        name: "loadWagonWorkReport",
+        meta: {
+          code: "xtpzgl-yhgl"
+        },
+        component: loadWagonWorkReport
+      },
+      {
+        path: "unloadShipWorkReport",
+        name: "unloadShipWorkReport",
+        meta: {
+          code: "xtpzgl-yhgl"
+        },
+        component: unloadShipWorkReport
+      },
+      {
+        path: "wagonWorkReport",
+        name: "wagonWorkReport",
+        meta: {
+          code: "xtpzgl-yhgl"
+        },
+        component: wagonWorkReport
       }
     ]
   }