Kaynağa Gözat

海运出口 新加拆单功能

qukaidi 1 ay önce
ebeveyn
işleme
9096d5e7c0

+ 0 - 1
src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox.vue

@@ -79,7 +79,6 @@ export default {
         },
         // 选择项
         selectionChange(list) {
-            console.log(list)
             this.selectionList = list
             if (list.length > 0) {
                 this.$refs.PackingBusiness.containersBillsList = this.selectionList[0].containersBillsList

+ 16 - 3
src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/containers.vue

@@ -99,14 +99,14 @@
                 >{{ $t("btn118n.deleteCtnrList") }}
               </el-button>
 
-              <!-- <el-button
+              <el-button
                 type="danger"
                 size="small"
                 plain
                 :disabled="detailData.seeDisabled || selectionList.length == 0 || disabled"
-                @click.stop="$refs.splitOrder.openDialog(assemblyForm, ids)"
+                @click.stop="allClick('拆单')"
                 >拆单</el-button
-              > -->
+              >
               <!-- <el-button type="success" size="small" plain @click.stop="$refs.splitOrder.openDialog(assemblyForm)">合票</el-button> -->
               <el-button type="success" size="small" plain @click.stop="$refs.print.openDialog()">
                 {{ $t("btn118n.preview") }}
@@ -700,6 +700,19 @@ export default {
       console.log(val, 111);
       this.$emit("selectionChange", [val]);
     },
+    allClick(name){
+      if(name=='拆单'){
+        for(let item of this.selectionList){
+          if(!item.cntrNo){
+             return this.$message.error("箱号不能为空");
+          }
+          if(!item.containerNumber){
+             return this.$message.error("放箱号不能为空");
+          }
+        }
+        this.$refs.splitOrder.openDialog(this.assemblyForm,this.ids)
+      }
+    },
     outExport() {
       this.$confirm("是否导出当前所有数据?", "提示", {
         confirmButtonText: "确定",

+ 23 - 6
src/views/iosBasicData/SeafreightExportF/bills/assembly/components/splitOrder.vue

@@ -2,7 +2,9 @@
   <div>
     <el-dialog title="拆单" :visible.sync="dialogVisible" append-to-body width="50%" :before-close="handleClose">
       <avue-form :option="optionForm" v-model="query" ref="form"></avue-form>
-      <el-button type="success" size="small" plain @click="getList">查询</el-button>
+      <div style="display: flex;justify-content: flex-end;">
+        <el-button type="success" size="small" plain @click="getList">查询</el-button>
+      </div>
       <avue-crud
         v-if="dialogVisible"
         :option="option"
@@ -122,8 +124,10 @@ export default {
       this.ids = null;
       this.query = {};
       this.pickObj = {};
+      this.data=[]
       this.query = {
-        ...val
+        ...val,
+        hblno:null
       };
       this.ids = ids;
     },
@@ -134,14 +138,27 @@ export default {
         polId: this.query.polId,
         podId: this.query.podId,
         boxBelongsTo: this.query.boxBelongsTo,
-        hblno: this.query.hblno
+        hblno: this.query.hblno,
+        id: this.query.id
       };
-      selectComplyWithData(obj).then(res => {
-        this.data = res.data.data;
+      const loading = this.$loading({
+        lock: true,
+        text: "加载中",
+        spinner: "el-icon-loading",
+        background: "rgba(255,255,255,0.7)"
       });
+      selectComplyWithData(obj)
+        .then(res => {
+          this.data = res.data.data;
+        })
+        .finally(() => {
+          loading.close();
+        });
     },
     submit() {
-      this.pickObj;
+      if (!this.pickObj.id) {
+        return this.$message.error("请选择数据");
+      }
       let obj = {
         billId: this.query.id,
         billIdNew: this.pickObj.id,

+ 1 - 0
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -385,6 +385,7 @@
                 </el-tab-pane>
                 <el-tab-pane :label="$t('sea118n.ctnrList')" name="second">
                   <DistributionBox
+                    :key="form.id"
                     :assemblyForm="form"
                     :detailData="detailData"
                     :showLock="showLock"