Bläddra i källkod

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

luobang 2 år sedan
förälder
incheckning
b149321fe1

+ 3 - 3
src/views/TMS/components/importedEmergency/wagonLoadEmergency.vue

@@ -55,7 +55,7 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2",
+        requestUrl: "/api/v1/tms/getTmstrainWagonLoad?apiId=508&resultType=2",
       },
     };
   },
@@ -73,7 +73,7 @@ export default {
         if (startTime && endTime) {
           if (startTime < endTime) {
              this.option.requestUrl =
-            "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2&con=" +
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=508&resultType=2&con=" +
             this.input + "&startTime=" +
               startTime +
               "&endTime=" +
@@ -83,7 +83,7 @@ export default {
           }
         } else {
           this.option.requestUrl =
-            "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2&con=" +
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=508&resultType=2&con=" +
             this.input;
         }
       } else if (num == 1) {

+ 32 - 7
src/views/TMS/components/importedMine/addWagonLoad.vue

@@ -18,20 +18,19 @@
     <div class="tempTable">
       <div class="search" style="display:flex;margin: 10px;">
         <el-input
-          placeholder="请输入"
-         value="请先导入查询,再勾选,如果查询失败,可能是港口没有出库或者已经装车"
+          placeholder="请输入车皮号或外轮船名"
+          v-model="input"
           style="margin: 10px; width:38%"
           clearable
-          disabled
         ></el-input>
-        <!-- <el-button
+        <el-button
           type="primary"
           class="btn"
-          @click="searchLoadTemp()"
+          @click="findWagon()"
           style="margin: 10px;"
         >
           <i class="el-icon-search"></i>查询
-        </el-button> -->
+        </el-button>
          <el-upload style="margin: 10px;"
           class="upload-excel"
           action=""
@@ -224,7 +223,9 @@ export default {
     return {
       isLoading:false,
       list: [],
-      form1: {},
+      form1: {
+        resultLoadingDate:new Date()
+      },
       tableData:[],
       tableDataReal:[],
       selectionRow:[],
@@ -266,6 +267,18 @@ export default {
     this.searchLoadTemp();
   },
   methods: {
+    findWagon(){
+      this.tableDataReal=[];
+      this.tableData.forEach((item)=>{
+        if(item.foreignShipName.includes(this.input) || item.wagonNo.includes(this.input)){
+          this.tableDataReal.push(item);
+        }
+      });
+      if(this.tableDataReal.length<=0){
+        this.$message.warning("查询不到记录!");
+      }
+      console.log("serachResult:",this.tableDataReal);
+    },
     //发站弹出层
     handleSelectSendStation(item) {
       this.sendStationId = item.arrivalId;
@@ -355,6 +368,18 @@ export default {
           return;
         }
       }
+      let date=this.form1.resultLoadingDate;
+      let month=(date.getMonth()+1);
+      if(month>=1 && month <=9){
+        month="0"+month;
+      }
+      let dateStr=date.getFullYear()+"年"+month+"月"+date.getDate()+"日";
+      this.selectionRow.forEach((item)=>{
+        if(!item.sendDate || !item.arrivalDate){
+          item.sendDate=dateStr;
+          item.arrivalDate=dateStr;
+        }
+      });
       let map = {
         wagonList:this.selectionRow,
         sendStationId: this.sendStationId,

+ 70 - 3
src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue

@@ -81,6 +81,30 @@
             <i class="el-icon-search"></i>
           </el-button>
         </el-form-item>
+        <el-form-item>
+            <el-autocomplete
+              class="inline-input"
+              v-model="receiveName"
+              :fetch-suggestions="querySearchConsignee"
+              placeholder="请输入收货单位名称"
+              @select="handleSelectionChange()">
+            </el-autocomplete>
+        </el-form-item>
+         <el-form-item>
+           <el-select
+              size="mini"
+              v-model="sendStationId"
+              @change="handleMulSendChange()"
+            >
+              <el-option
+                v-for="item in sendStationList"
+                :key="item.sendStationId"
+                :label="item.sendStation"
+                :value="item.sendStationId"
+              >
+              </el-option>
+            </el-select>
+        </el-form-item>
       </el-form>
     </div>
     <div class="main">
@@ -95,7 +119,12 @@
         :cell-style="{ fontWeight: '700' }"
         class="table"
         :span-method="objectSpanMethod"
+        @selection-change="handleSelectionChange();handleMulSendChange()"
       >
+        <el-table-column
+          type="selection"
+          width="55">
+        </el-table-column>
         <el-table-column
           prop="index"
           width="50"
@@ -140,7 +169,6 @@
               v-model="scope.row.receiveName"
               :fetch-suggestions="querySearchConsignee"
               placeholder="请输入收货单位名称"
-              :trigger-on-focus="false"
               @select="handleSelectConsignee(scope.row, scope.$index)"
             >
               <template slot-scope="{ item }">
@@ -308,7 +336,9 @@ export default {
       pos: null,
       sendStationList: [],
       //收货客户列表
-      consigneeList: []
+      consigneeList: [],
+      receiveName: null,
+      sendStationId: null,
     };
   },
   created() {
@@ -318,6 +348,32 @@ export default {
     this.information();
   },
   methods: {
+    handleSelectionChange(){
+      //批量绑定收货客户
+      let selection=this.$refs.tableRef.selection;
+      console.log("selection:",selection);
+      if(!selection)
+        return;
+      this.consigneeList.forEach(e => {
+        if (e.consigneeCompanyName == this.receiveName) {
+           selection.forEach((row)=>{
+              row.receiveName = e.consigneeCompanyName;
+              row.consigneeId = e.consigneeId;
+          });
+        }
+      });
+    },
+    handleMulSendChange(){
+      //批量绑定发站
+      let selection=this.$refs.tableRef.selection;
+      console.log("selection:",selection);
+      if(!selection || !this.sendStationId)
+        return;
+      selection.forEach((row)=>{
+          row.sendStationId = this.sendStationId;
+          this.changesendStation(row);
+      });
+    },
     handleSelectConsignee(row, index, item) {
       console.log(row);
       this.consigneeList.forEach(e => {
@@ -328,7 +384,7 @@ export default {
     },
     //以下是收货单位边输边查搜索
     querySearchConsignee(queryString, cb) {
-      if (queryString.length > 3) {
+      if (queryString && queryString.length > 3) {
         this.axios
           .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
           .then(res => {
@@ -345,6 +401,17 @@ export default {
               cb(results);
             }
           });
+      }else{
+          //历史收货客户
+          this.axios
+            .post("/api/v1/uc/getConsigneeHistory")
+            .then(res => {
+              if (res.data.code == "200") {
+                console.log(res);
+                this.consigneeList = res.data.data;
+                cb(this.consigneeList);
+              }
+        });
       }
     },
     createFilterConsignee(queryString) {