Browse Source

海运出口新加同步模块

Qukatie 6 months ago
parent
commit
27c7d297f9

+ 7 - 0
src/api/iosBasicData/bills.js

@@ -426,3 +426,10 @@ export const synchronizeData = (data) => {
     params: data
   })
 }
+export const synchronizeDataMM = (data) => {
+  return request({
+    url: '/api/blade-los/bills/synchronizeDataMM',
+    method: 'get',
+    params: data
+  })
+}

+ 23 - 4
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -74,7 +74,10 @@
                     @click.stop="allClick('撤销转单')">撤销转单
                 </el-button>
                 <el-button size="small" type="warning" :disabled="!form.id || showLock" v-if="form.billType == 'MM'"
-                    @click.stop="allClick('同步分单信息')">同步分单信息
+                    @click.stop="allClick('同步主单到分单')">同步主单到分单
+                </el-button>
+                <el-button size="small" type="warning" :disabled="!form.id || showLock" v-if="form.billType == 'MM'"
+                    @click.stop="allClick('同步分单信息')">同步分单到主单
                 </el-button>
                 <el-button v-if="form.id && form.billType == 'MH'" size="small" type="success"
                     @click.stop="allClick('提单确认')">提单确认
@@ -414,7 +417,8 @@ import {
     transferOrder,
     revokeTransferOrder,
     synchronizeData,
-    revokeLockOrder
+    revokeLockOrder,
+    synchronizeDataMM
 } from '@/api/iosBasicData/bills'
 import { dateFormat } from "@/util/date";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -1161,8 +1165,23 @@ export default {
                     })
                 })
             }
+            if (name == '同步主单到分单') {
+                this.$confirm('是否同步主单到分单?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    synchronizeDataMM({ billId: this.form.id }).then(res => {
+                        this.$message({
+                            type: "success",
+                            message: "操作成功!"
+                        })
+                        this.billsDetailfun(this.form.id)
+                    })
+                })
+            }
             if (name == '同步分单信息') {
-                this.$confirm('是否同步分单信息?', '提示', {
+                this.$confirm('是否同步分单到主单?', '提示', {
                     confirmButtonText: '确定',
                     cancelButtonText: '取消',
                     type: 'warning'
@@ -2176,7 +2195,7 @@ export default {
                     // if (!this.form.teamName) {
                     //     msgs.push('所属团队')
                     // }
-                   for (let item of this.form.preContainersList) {
+                    for (let item of this.form.preContainersList) {
                         if (!item.cntrTypeCode) {
                             this.$message.warning("请选择尺码箱型");
                             return;