Browse Source

导入MH 导入接口

Qukatie 2 weeks ago
parent
commit
773b153c16

+ 21 - 32
src/views/iosBasicData/SeafreightExportF/bills/assembly/importModule.vue

@@ -89,7 +89,6 @@ export default {
             data: [],
             data2: [],
             data3: [],
-            selectionList: [],
             optionForm: {
                 menuBtn: false,
                 span: 24,
@@ -98,31 +97,31 @@ export default {
                     {
                         label: 'BOOK NO',
                         prop: "bookingNo",
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'VESSEL',
                         prop: "vesselEnName",
                         span: 12,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'VOY NO',
                         prop: "voyageNo",
                         span: 12,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'POL',
                         prop: "polEnName",
                         span: 12,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'POD',
                         prop: "podEnName",
                         span: 12,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'ETD',
@@ -137,7 +136,7 @@ export default {
                         label: 'ETA',
                         prop: "eta",
                         span: 12,
-                        disabled: false,
+                        disabled: true,
                         type: "date",
                         format: "yyyy-MM-dd",
                         valueFormat: "yyyy-MM-dd HH:mm:ss"
@@ -146,49 +145,49 @@ export default {
                         label: 'PayMode',
                         prop: "hpaymode",
                         span: 12,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'PayAtLocation',
                         prop: "hpayplace",
                         span: 12,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'TermsCode',
                         prop: "serviceTerms",
                         span: 12,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'ServiceContract',
                         prop: "corpArgreementNo",
                         span: 12,
                         labelWidth: 100,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'ServiceCode',
                         prop: "serviceCode",
                         span: 12,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'IsAMS',
                         prop: "isAMS",
                         span: 12,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'FinalDest',
                         prop: "finalDestinationName",
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'TransportModeCode',
                         prop: "fnltransMode",
                         labelWidth: 124,
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: 'Comment',
@@ -196,14 +195,14 @@ export default {
                         type: 'textarea',
                         minRows: 3,
                         maxRows: 3,
-                        disabled: false,
+                        disabled: true,
                     }
                 ]
             },
             optionForm2: {
                 menuBtn: false,
                 span: 8,
-                disabled: false,
+                disabled: true,
                 column: [
                     {
                         label: '发货人',
@@ -366,12 +365,12 @@ export default {
             this.data.forEach(item => {
                 item.etd = this.form.etd
             })
+            this.$message.success('操作成功');
         },
         handleRowClick(row, event, column) {
             this.form = row
         },
         handleRowClick2(row, event, column) {
-            console.log(row)
             this.data2 = row.containersCommodityList
         },
         //文件上传时的钩子
@@ -404,27 +403,17 @@ export default {
         // },
         openDialog(type) {
             this.data = []
-            this.selectionList = []
             this.excelBox = true
         },
-        download() {
-            if (this.type == 1) {
-                window.open(`/api/blade-los/boxPool/emptyContainerEntry/template?${this.website.tokenHeader}=${getToken()}`);
-            }
-        },
-        selectionChange(list) {
-            this.selectionList = list
-        },
         importData() {
             if (this.data.length == 0) {
-                return this.$message.error("请上传数据");
-            }
-            if (this.selectionList.length == 0) {
-                return this.$message.error("请选择数据");
+                return this.$message.error("请上传文件");
             }
             this.loading = true
-            getDicinit('POST', this.url, this.selectionList).then(res => {
+            getDicinit('POST', '/blade-los/magicHandImport/submit', this.data).then(res => {
                 this.excelBox = false
+                this.$message.success('操作成功');
+                //刷新列表页
                 this.$emit('refreshData')
             }).finally(() => {
                 this.loading = false;

+ 5 - 0
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -282,6 +282,7 @@
                 :upload-before="beforeUploadMagicHandZipFile" :upload-after="onSuccessUploadMagicHandZipFile">
             </avue-form>
         </el-dialog> -->
+        <!-- 导入 MH -->
         <import-module ref="importModule" @refreshData="refreshData" />
     </div>
 </template>
@@ -1451,6 +1452,10 @@ export default {
         }
     },
     methods: {
+        //刷新列表页
+        refreshData() {
+            this.refreshChange()
+        },
         batchClick(name) {
             if (name == '批量更改') {
                 this.updateField()