Pārlūkot izejas kodu

修改发货通知新增

liyg 2 gadi atpakaļ
vecāks
revīzija
4f46f30037

+ 59 - 6
src/views/appoint/components/ship/addDeliveryNotice.vue

@@ -40,7 +40,10 @@
       <span class="motext">批次</span>
       <el-input class="moinput" v-model="batchIds" disabled> </el-input>
       <el-button class="mobutton" type="primary" @click="ondrawer(5)"
-        >浏览</el-button
+        >选批次</el-button
+      >
+      <el-button class="mobutton" type="primary" @click="ondrawer(6)"
+        >录批次</el-button
       >
     </div>
     <div class="form">
@@ -82,7 +85,7 @@
       <el-input
         placeholder="请输入内容"
         v-model="input"
-        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        style="margin-top: 10px; margin-left: 20px; width: 200px"
         clearable
       >
       </el-input>
@@ -94,6 +97,21 @@
       >
         <i class="el-icon-search"></i>查询
       </el-button>
+      <el-input
+       v-show="a == 6"
+        placeholder="请输入外轮船名"
+        v-model="foreignShipName"
+        style="width: 200px"
+        clearable
+      ></el-input>
+      <el-button
+      v-show="a == 6"
+        type="primary"
+        class="btn"
+        @click="handleClose"
+        style="margin-bottom: 15px"
+      >确定
+      </el-button>
       <!-- <div v-show="a == 4">
         <dilTable v-bind.sync="options" @radio-change="currentRadioChange6"></dilTable>
       </div> -->
@@ -127,6 +145,12 @@
           @radio-change="currentRadioChange5"
         ></dilTable>
       </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="second6"
+          @radio-change="currentRadioChange6"
+        ></dilTable>
+      </div>
     </el-drawer>
     <el-form
       :inline="true"
@@ -225,7 +249,11 @@ export default {
         selectionType: "radio",
         mapList5: [],
       },
-
+      second6: {
+        requestUrl: "/api/v1/uc/queryMaterialByLike?apiId=244",
+        selectionType: "radio",
+      },
+      foreignShipName:null,
       value: undefined,
       value2: undefined,
       value4: undefined,
@@ -350,7 +378,17 @@ export default {
         (this.batchIds =
           selection.foreignShipName + "" + selection.materialName);
     },
-
+    currentRadioChange6(selection) {
+      this.second5.mapList5 = selection;
+      console.log("selection",selection);
+    },
+    checkForeignShipName(){
+      if(this.foreignShipName==null || this.foreignShipName==''){
+        this.$message.warning("请输入外轮船名!");
+        return false;
+      }
+      return true;
+    },
     onchange(val) {},
 
     onclick(a) {
@@ -367,10 +405,25 @@ export default {
       } else if (a == 5) {
         this.second5.requestUrl =
           "/api/v1/tms/getBatchIdByForeign?apiId=489&con=" + this.input;
+      }else if(a == 6){
+          this.second6.requestUrl = 
+          "/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
       }
     },
-
+    //关闭模态框窗口
     handleClose(done) {
+      if(this.a==6){
+        //校验外轮船名和批次
+        if(!this.checkForeignShipName()){
+          return;
+        }else if(this.second5.mapList5.length == 0){
+          this.$message.warning("请选择物资!");
+          return;
+        }
+        this.batchIds = this.foreignShipName + "" + this.second5.mapList5.materialName;
+        this.second5.mapList5.foreignShipName = this.foreignShipName;
+      }
+      this.drawer=false;
       done();
     },
 
@@ -439,7 +492,7 @@ export default {
         sulfurcontent: this.form1.sulfurcontent,
         userId: getCookie("userId"),
       };
-
+      
       //判断放货数量是否为数字
       if (
         map.noticeCommerceMethod == null ||