liyg 2 年之前
父节点
当前提交
3d4520b810

+ 8 - 88
src/views/TMS/components/importedMine/addWagonLoad.vue

@@ -2,19 +2,6 @@
   <!-- 万州港-达州新增装车1 -->
   <div class="addWagonLoad">
     <page-title>返回</page-title>
-    <!-- <div class="cp">
-      <span >车皮号:</span>
-      <el-upload style="margin: 8px;"
-          class="upload-excel"
-          action=""
-          :on-change="importExcel"
-          :show-file-list="false"
-          accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
-          :auto-upload="false">
-          <el-button  type="primary">导入</el-button>
-      </el-upload>
-      <span >当前导入数量:{{tableData.length}}</span>
-    </div> -->
     <div class="tempTable">
       <div class="search" style="display:flex;margin: 10px;">
         <el-input
@@ -101,66 +88,6 @@
         </el-table>
       </div>
     </div>
-    <!-- <div class="importedTable" style="height:300px;overflow:scroll;">
-      <el-table
-        highlight-current-row
-        :data="tableData"
-        :row-style="{height:'40px'}"
-        style="width: 100%,font-size: 20px"
-        id="domesticTable">
-        <el-table-column
-        type="index"
-        width="50"
-        prop="number"
-        label="序号"
-        align="center"
-        fixed="left"
-        :resizable="false">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="productName"
-          label="品  名"
-          width="240px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="mineral"
-          label="矿种"
-          width="100px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="wagonNo"
-          label="车号"
-          width="180px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="unloadPoint"
-          label="卸货地点"
-          width="180px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="sendStation"
-          label="发站"
-          width="180px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-        width="180px"
-          prop="arrivalStation"
-          label="到站">
-        </el-table-column>
-         <el-table-column
-         align="center"
-        width="180px"
-          prop="weight"
-          label="标重">
-        </el-table-column>
-      </el-table>
-    </div> -->
     <div class="right" 
     style="margin-top:10px
            float:right;">
@@ -187,18 +114,6 @@
                     <el-select filterable  v-model="arrivalStationId">
                         <el-option v-for="item in arrivalStations" :value="item.arrivalId" :key="item.arrivalId" :label="item.arrivalName"></el-option>
                     </el-select>
-                    <!-- <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>
                </div>
           </el-form>
@@ -207,7 +122,7 @@
         </div>
         <div class="button-box">
           <el-button @click="cancel">取消</el-button>
-          <el-button type="primary" :loading="isLoading" @click="makeSure">确定</el-button>
+          <el-button type="primary" :loading="isLoading" :disabled="!isSend" @click="makeSure">确定</el-button>
         </div>
     </div>
   </div>
@@ -221,6 +136,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isSend:false,
       isLoading:false,
       list: [],
       form1: {
@@ -269,6 +185,7 @@ export default {
   methods: {
     findWagon(){
       this.tableDataReal=[];
+      this.isSend=true;
       this.tableData.forEach((item)=>{
         if(item.foreignShipName.includes(this.input) || item.wagonNo.includes(this.input)){
           this.tableDataReal.push(item);
@@ -604,16 +521,19 @@ export default {
         });
         that.tableDataReal=tableData;
         if(tableData.length<=0){
-          that.$confirm('查询不到相关车皮!')
+          that.$confirm('查询不到相关车皮!请联系万州港相关人员!')
           .then(_ => {
+            that.isSend=false;
             done();
           });
         }else if(tableData.length<importData.length){
-           that.$confirm("共"+(importData.length-tableData.length)+"条车皮查询失败!")
+           that.$confirm("共"+(importData.length-tableData.length)+"条车皮查询失败!请联系万州港相关人员!")
           .then(_ => {
+            that.isSend=false;
             done();
           });
         }else{
+          that.isSend=true;
           that.$message({
             message: "查询成功!",
             type: "success",

+ 15 - 5
src/views/TMS/components/importedMine/addWagonloadCopy.vue

@@ -86,7 +86,7 @@
           align="center"
           prop="makeDate"
           label="制票日期"
-          width="120px"
+          width="170px"
         >
         </el-table-column>
         <el-table-column
@@ -121,7 +121,7 @@
            float:right;"
     >
       <div class="form">
-        <div class="form_box" style="">
+        <div class="form_box_addWagonLoad" style="">
           <el-form>
             <div class="preview-group">
               <el-form-item label="发站:">
@@ -627,7 +627,7 @@ export default {
             //表格数据
             let temp = {
               number: row["序号"],
-              makeDate: row["制票日期"],
+              makeDate:that.formatDate(row["制票日期"]) ,
               materialName: row["品名"],
               wagonNo: row["车皮号"]+"",
               mineral: row["矿种"],
@@ -662,6 +662,17 @@ export default {
           tempTable.toggleRowSelection(row);
        }
     },
+    formatDate(numb, format) {
+      const time = new Date((numb - 1) * 24 * 3600000 + 1)
+      time.setYear(time.getFullYear() - 70)
+      const year = time.getFullYear() + ''
+      const month = time.getMonth() + 1 + ''
+      const date = time.getDate() + ''
+      if (format && format.length === 1) {
+        return year + format + month + format + date
+      }
+      return year + '年' + (month < 10 ? '0' + month : month)+ '月' + (date < 10 ? '0' + date : date) + '日'
+    }
   }
 };
 </script>
@@ -785,9 +796,8 @@ export default {
   }
   .form {
     display: flex;
-    .form_box {
+    .form_box_addWagonLoad {
       width: 340px;
-      margin-left:10px;
       .el-form {
         .preview-group {
           .el-form-item {

+ 81 - 16
src/views/TMS/components/importedMine/outBoundWagon.vue

@@ -2,15 +2,38 @@
   <!-- 出库 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-
+      <el-input placeholder="请输入内容" v-model="input" clearable style="width:200px"> </el-input>
+      <el-date-picker style="margin: 10px;width:250px" v-model="startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;width:250px" 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="btn" @click="insert"> 出库 </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">
-      <mergeRowTable v-bind.sync="option1" ref="table">
+      <el-tab-pane label="全部" name="first">
+        <mergeRowTable v-bind.sync="option1" ref="excelDom" @func="calculate">
+        <el-table-column fixed="right" label="操作" width="50">
+          <template slot-scope="scope">
+            <el-button
+              @click="click(scope.row.resultId)"
+              type="text"
+              size="small"
+              :disabled="scope.row.isEdit!=1"
+              >修改</el-button
+            >
+            <!-- <el-button
+            type="text"
+            size="small"
+            @click="deleteclick(scope.row.resultId)"
+            >删除</el-button > -->
+          </template>
+        </el-table-column>
+      </mergeRowTable>
+      </el-tab-pane>
+      <el-tab-pane label="待计量" name="second">
+        <mergeRowTable v-bind.sync="option1" ref="excelDom">
         <el-table-column fixed="right" label="操作" width="50">
           <template slot-scope="scope">
             <el-button
@@ -28,12 +51,18 @@
           </template>
         </el-table-column>
       </mergeRowTable>
+      </el-tab-pane>
     </el-tabs>
+    <div class="count"  style="margin-right:50px;font-size:18px;">
+      <div style="display:flex;flex-direction:row-reverse">总车数:{{dataTabel.length}}</div>
+      <div style="display:flex;flex-direction:row-reverse">标重总吨位:{{sum}}</div>
+    </div>
   </div>
 </template>
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
@@ -47,34 +76,70 @@ export default {
         comparison: "resultNumber",
         columnIndexs: [0, 1, 2, 3, 4, 5],
       },
+      startTime: null,
+      endTime: null,
+      tableTitle: "港口出库表",
+      dataTabel:[],
+      sum:0,
     };
   },
   filters: {},
+  mounted(){
+    this.onclick();
+  },
   methods: {
     onclick() {
       if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input;
+        if(this.checkSEDate()==true){
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+          +"&activeName="+this.activeName
+          +"&startTime="+sjTime(this.startTime)
+          +"&endTime="+sjTime(this.endTime);
+        }else{
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+           +"&activeName="+this.activeName;
+        }
+      }else if(this.activeName == "second"){
+        if(this.checkSEDate()==true){
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+           +"&activeName="+this.activeName
+           +"&startTime="+sjTime(this.startTime)
+          +"&endTime="+sjTime(this.endTime);
+        }else{
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+          +"&activeName="+this.activeName;
+        }
       }
     },
     insert() {
       this.$router.push("/addWagonLoadCopy");
     },
     handleClick(tab, event) {
-      console.log(tab, event);
+      this.onclick();
     },
     click(resultId) {
-      console.log("res",getCookie("orgCode"));
-      if (
-        getCookie("orgCode") == "yuanliaogongsi" ||
-        getCookie("orgCode") == "dagangadmin"
-      ) {
-       this.$router.push("/editOutBoundWagon/" + resultId);
-      
-      } else {
-          this.$message.warning("权限不足,请联系部门管理员!");
-        }
+      this.$router.push("/editOutBoundWagon/" + resultId);
     },
+    //起止时间校验
+    checkSEDate(){
+      if(this.startTime && this.endTime && this.startTime<=this.endTime){
+          return true;
+      }else{
+         return false;
+      }
+    },
+    calculate(res){
+      console.log("res",res);
+      this.dataTabel=res.list;
+      this.sum=0
+      this.dataTabel.forEach(item => {
+        this.sum+=item.weight;
+      });
+    }
   },
 };
 </script>

+ 2 - 2
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -508,11 +508,11 @@ export default {
         .then(res => {
           if (res.data.data == "-1") {
             this.$message.error("运输订单未关闭,自提车辆无权查看!");
-          } else if (res.data.data.startAndEndRoutes != "") {
+          } else if (res.data.data.startAndEndRoutes) {
             that.listPath = res.data.data.startAndEndRoutes;
             that.initMap([105.602725, 37.076636]);
           } else {
-            this.$message.error("车辆没有开启GPS");
+            this.$message.error("车辆没有开启GPS或尚未注册!");
           }
         });
     },

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

@@ -105,11 +105,6 @@ export default {
   data() {
     return {
         tableData:[],
-        mergeTable:[{
-            rowIndex:1,
-            columnIndex:1,
-            rowspan:1,
-        }],
         spanArr: [], // 用于存放需要合并的行的个数
         spanIndex: 0, // 记录spanArr数组的下标
         map:{