import { d as L, V as O, f as W, e as z, a4 as A, r, aw as F, c as m, o as _, w as t, j as e, D as x, W as H, U, M as X, i as w, aI as Z, p as d, A as f, l as o, B as E, S as G, H as J, N as K, i4 as Q, X as Y, cZ as tt, hc as et, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as ot, __tla as __tla_1 } from "./index.vue_vue_type_script_setup_true_lang-CQIuTmQL.js";
import at, { __tla as __tla_2 } from "./index-CQX5jp0x.js";
import { b as st, c as nt, e as it } from "./VoyagePlanOffice-CE0uFEw0.js";
import "./BasicForm-dL_oCSPM.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./SingleImageUpload-CNx4b9eC.js";
import "./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";
import "./componentSetting-DVhNDBTO.js";
import "./ImageUpload-DUsnro3W.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import "./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";
import "./tabsView-BXskTdVh.js";
import "./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js";
import "./propTypes-CebMRUpe.js";
import "./BasicSelect-C_uwzMkE.js";
import "./BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js";
import "./dictionary-BRse4lkf.js";
import "./index-DkvzUEqh.js";
import "./index-kKnqLkWM.js";
import "./AutoComplete-Dv1Bqed4.js";
import "./TreeSelect-BZh2DeCh.js";
import { __tla as __tla_3 } from "./helper-CNwA55dE.js";
import "./equipmentMainLibrary-bJTzj5mC.js";
import "./requisitionOrder-D0IG9N7e.js";
import "./useRole-C-Zpngq4.js";
import "./columns-Cv1qVJFZ.js";
import "./TableSelect.vue_vue_type_script_setup_true_lang-BAU5mgvB.js";
import "./props-CLtNejQT.js";
import "./useForm-CKmgcynv.js";
import "./usePageCache-DluHn7Yy.js";
import "./Table-0PViRYCf.js";
import "./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";
import "./componentMap-CElCaWis.js";
import "./format-DgF6KtHk.js";
import "./omit-B2_8Y6O_.js";
import "./_flatRest-DBrd2CHT.js";
import "./flatten-DeoUZLdb.js";
import "./print-CT_2hrjP.js";
import "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import "./useModal-CO65vga3.js";
import "./useTimeout-BxFilWvD.js";
import "./Flex-CTSf12gq.js";
import "./goodsReceiptNoteDetail-DWFnSNrx.js";
import { __tla as __tla_4 } from "./portCallDetailModal.vue_vue_type_script_setup_true_lang-Guz2zyen.js";
import "./VirtualList-CyTw9HCK.js";
let oe;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_3;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_4;
        } catch  {}
    })()
]).then(async ()=>{
    let rt;
    rt = {
        class: "flex items-center"
    };
    oe = L({
        __name: "index",
        setup (lt) {
            const { t: i } = O(), k = tt(), g = W(), P = z(), C = g.query, h = A(()=>C.status === "view"), u = r(), S = r(), l = r(), s = r(), V = r(""), v = r(!1);
            async function I() {
                if (s.value = g.query.id, V.value = g.query.status, s.value) {
                    const c = await st(s.value);
                    l.value = c;
                }
            }
            async function R() {
                P.back();
            }
            async function B() {
                await u.value?.validate() === !0 && (await D(!0), await nt(s.value), k.success(i("common.disablePop.success")), await S.value.fetchPortList());
            }
            async function D(c) {
                if (await u.value?.validate() === !0) {
                    const n = await et(), p = n && n.length > 0 ? n[0].id : "", y = u.value?.getFieldsValue();
                    l.value = {
                        vesselId: p,
                        ...s.value ? {
                            id: s.value
                        } : {},
                        ...l.value,
                        ...y
                    }, s.value = await it(l.value), v.value = !0, c || k.success(i("common.saveSuccessText"));
                }
            }
            return F(()=>{
                I();
            }), (c, a)=>{
                const n = E, p = Z, y = G, N = K, q = J, $ = X, M = U, b = H, T = Y;
                return _(), m(T, null, {
                    default: t(()=>[
                            e(b, {
                                bordered: !1,
                                class: "proCard mb-3"
                            }, {
                                default: t(()=>[
                                        e(M, {
                                            "x-gap": "0",
                                            cols: 2,
                                            "item-responsive": ""
                                        }, {
                                            default: t(()=>[
                                                    e($, {
                                                        span: "2",
                                                        class: "flex justify-between items-center"
                                                    }, {
                                                        default: t(()=>[
                                                                w("div", rt, [
                                                                    e(p, {
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: t(()=>[
                                                                                e(n, {
                                                                                    quaternary: "",
                                                                                    class: "mr-2",
                                                                                    onClick: R
                                                                                }, {
                                                                                    default: t(()=>a[2] || (a[2] = [
                                                                                            w("i", {
                                                                                                class: "iconfont icon-a-shangyibu2 text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: t(()=>[
                                                                                d(f(o(i)("common.back")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    }),
                                                                    e(y, {
                                                                        class: "text-[26px] font-bold"
                                                                    }, {
                                                                        default: t(()=>[
                                                                                d(f(o(i)("pms.VoyagePlanOfficeDetail.voyagePlan")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })
                                                                ]),
                                                                e(q, null, {
                                                                    default: t(()=>[
                                                                            o(C).status === "edit" || o(v) ? (_(), m(p, {
                                                                                key: 0,
                                                                                trigger: "hover"
                                                                            }, {
                                                                                trigger: t(()=>[
                                                                                        e(n, {
                                                                                            strong: "",
                                                                                            secondary: "",
                                                                                            type: "primary",
                                                                                            class: "pl-3 pr-3",
                                                                                            onClick: a[0] || (a[0] = (j)=>B())
                                                                                        }, {
                                                                                            default: t(()=>[
                                                                                                    e(N, {
                                                                                                        size: "24"
                                                                                                    }, {
                                                                                                        default: t(()=>[
                                                                                                                e(o(Q))
                                                                                                            ]),
                                                                                                        _: 1
                                                                                                    })
                                                                                                ]),
                                                                                            _: 1
                                                                                        })
                                                                                    ]),
                                                                                default: t(()=>[
                                                                                        d(f(o(i)("monitor.manualSync")), 1)
                                                                                    ]),
                                                                                _: 1
                                                                            })) : x("", !0),
                                                                            o(h) ? x("", !0) : (_(), m(p, {
                                                                                key: 1,
                                                                                trigger: "hover"
                                                                            }, {
                                                                                trigger: t(()=>[
                                                                                        e(n, {
                                                                                            strong: "",
                                                                                            secondary: "",
                                                                                            type: "primary",
                                                                                            class: "pl-3 pr-3",
                                                                                            onClick: a[1] || (a[1] = (j)=>D())
                                                                                        }, {
                                                                                            default: t(()=>a[3] || (a[3] = [
                                                                                                    w("i", {
                                                                                                        class: "iconfont icon-Save"
                                                                                                    }, null, -1)
                                                                                                ])),
                                                                                            _: 1
                                                                                        })
                                                                                    ]),
                                                                                default: t(()=>[
                                                                                        d(f(o(i)("common.saveText")), 1)
                                                                                    ]),
                                                                                _: 1
                                                                            }))
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 1
                                        })
                                    ]),
                                _: 1
                            }),
                            e(b, {
                                bordered: !1,
                                class: "proCard mb-3"
                            }, {
                                default: t(()=>[
                                        e(ot, {
                                            ref_key: "basicDetailRef",
                                            ref: u,
                                            "source-data": o(l)
                                        }, null, 8, [
                                            "source-data"
                                        ])
                                    ]),
                                _: 1
                            }),
                            o(V) !== "add" || o(v) ? (_(), m(b, {
                                key: 0,
                                bordered: !1,
                                class: "proCard mb-3 flex-grow-0"
                            }, {
                                default: t(()=>[
                                        e(at, {
                                            ref_key: "portCallsRef",
                                            ref: S,
                                            basicId: o(s)
                                        }, null, 8, [
                                            "basicId"
                                        ])
                                    ]),
                                _: 1
                            })) : x("", !0)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { oe as default, __tla };
