Browse Source

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

zyf 2 years ago
parent
commit
e0b04d9dc8

+ 1 - 1
config/index.js

@@ -75,7 +75,7 @@ let proxyTable = {
   },
   "/views/api/v1": {
     //target: "http://172.16.33.166:80",
-    target: "http://192.168.1.109:8080",
+    target: "http://172.16.33.166:80",
     ws: true,
     pathRewrite: {
       "^/views/api/v1": "/api/v1"

+ 188 - 0
src/views/TMS/components/importedShip/recordBatch.vue

@@ -0,0 +1,188 @@
+//补录批次id
+<template>
+  <div class="recordBathch">
+     <div class="purchaseOrder_table">
+      <div class="search" style="display:flex">
+      <el-input
+        placeholder="物资名"
+        v-model="materialName"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+       </el-input>
+       <el-input
+        placeholder="外轮船名"
+        v-model="resultForeignShipName"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+       </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="searchNotice()"
+        style="margin: 10px;">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      </div>
+      <!-- 未绑定金蝶的发货通知及其批次 -->
+      <dilTable
+        v-bind.sync="noticeOption"
+      >
+      <el-table-column
+      fixed="right"
+      label="操作"
+      width="70">
+      <template slot-scope="scope">
+          <el-button
+            @click.native.prevent="ondrawer(scope.row)"
+            type="text"
+            size="small">
+            关联订单
+          </el-button>
+        </template>
+      </el-table-column>
+      </dilTable>
+      </div>
+    
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="物资名或外轮船名"
+        v-model="inputText"
+        style="margin-top: 10px; margin-left: 20px; width: 200px"
+        clearable
+      >
+       </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onClick"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="makeSure"
+        style="margin-bottom: 15px">
+        确认绑定
+      </el-button>
+      <div v-show="drawer">
+        <dilTable
+        ref="ordertable"
+          v-bind.sync="purchaseOption"
+          @radio-change="orderChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import {getCookie} from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      purchaseOption:{
+        requestUrl: "/api/v1/tms/getBatchIdByForeign?apiId=489",
+        selectionType: "radio"
+      },
+      noticeOption: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/tms/findBatchForBind?apiId=489"
+      },
+      //物资名称
+      materialName:'',
+      //外轮船名
+      resultForeignShipName:'',
+      //是否需要打开模态窗口
+      drawer: false,
+      a: 1,
+      direction: "rtl",
+      inputText: null,
+      row:null,
+      order:null,
+    };
+  },
+  mounted(){
+  },
+  methods: {
+    //确定
+    makeSure() {
+      if(this.row!=null && this.order!=null){
+        let map = {
+          batchInfactoryId:this.row.batchInfactoryId,
+          batchIdOld:this.row.batchId,
+          batchId:this.order.batchId,
+          gmId:this.row.gmId,
+          portId:this.row.portId,
+          userId:getCookie("userId")
+        }
+        console.log(map);
+        this.axios.post('/api/v1/tms/bindBatch',map).then((res)=>{
+          console.log(res.data)
+          if(res.data.code == "200"){
+            this.$message({
+              message: "绑定成功!",
+              type: "success",
+            });
+            //刷新表格
+            this.searchNotice();
+            //关闭抽屉
+            this.drawer=false;
+          }
+        })
+      }else{
+        this.$message.warning("请选择采购订单!");
+      }
+      
+    },
+    //采购订单表格选中
+    orderChange(selection){
+        console.log("order:",selection);
+        this.order=selection;
+    },
+
+    currentRadioChange1(selection) {
+      this.input = null;
+      this.materialName = selection.materialName;
+      this.materialId = selection.materialId;
+    },
+    ondrawer(row) {
+      this.drawer = true;
+      this.row=row;
+      this.inputText=row.foreignShipName;
+      console.log("row:",row);
+      this.purchaseOption.requestUrl =
+          "/api/v1/tms/getBatchIdByForeign?apiId=489&con=" + this.inputText;
+    },
+    searchNotice(){
+      //查询发货通知
+        this.noticeOption.requestUrl=
+        "/api/v1/tms/findBatchForBind?apiId=489"+"&materialName="+this.materialName
+        +"&foreignShipName="+this.resultForeignShipName
+        +"&i="+new Date();
+    },
+    onClick() {
+        this.purchaseOption.requestUrl =
+          "/api/v1/tms/getBatchIdByForeign?apiId=489&con=" + this.inputText;
+    },
+    handleClose(done) {
+        this.row=null;
+        done();
+    }
+  },
+};
+</script>
+
+<style lang="scss">
+
+</style>

+ 7 - 0
src/views/TMS/router/index.js

@@ -139,6 +139,7 @@ import updateUnloadShip from "../components/importedShip/updateUnloadShip.vue";
 import updateWaterQuality from "../components/importedShip/updateWaterQuality.vue";
 import updateLoadShip from "../components/importedShip/updateLoadShip.vue";
 import waterQuality from "../components/importedShip/waterQuality.vue";
+import recordBatch from "../components/importedShip/recordBatch.vue";
 
 import assignmentPlan from "../components/importedTruck/assignmentPlan.vue";
 import breakdownPlan from "../components/importedTruck/breakdownPlan.vue";
@@ -963,6 +964,12 @@ const constantRouterMap = [
         meta: { code: "xtpzgl-yhgl" },
         component: waterQuality
       },
+      {
+        path: "recordBatch",
+        name: "recordBatch",
+        meta: { code: "xtpzgl-yhgl" },
+        component: recordBatch
+      },
       {
         path: "updateLoadShip/:resultId",
         name: "updateLoadShip",

+ 4 - 2
src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue

@@ -35,7 +35,7 @@
         clearable
       >
       </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
+      <el-button type="primary" class="btn" @click="onclickSearch">
         <i class="el-icon-search"></i>查询
       </el-button>
     </div>
@@ -134,7 +134,8 @@ export default {
     getRequestUrl() {
       this.option.requestUrl =
         "/api/v1/tms/getCapacityByDefend?apiId=474&startTime=null&endTime=null&i=" +
-        new Date();
+        new Date() +
+        "&con=" + this.input;
     },
     // 添加开始结束时间筛选
     onclickSearch() {
@@ -156,6 +157,7 @@ export default {
             startTime +
             "&endTime=" +
             endTime +
+            "&con=" + this.input +
             "&i=" +
             new Date();
         } else {