import { d as P, u as V, V as q, e as O, f as W, dc as L, r as y, a as N, Z as X, gW as a, gX as s, ay as $, aw as j, d9 as z, c as d, o as _, w as n, j as i, W as U, l as e, H as Z, aI as G, p as J, A as K, aE as Q, B as Y, ca as oo, X as eo, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B as to } from "./BasicForm-dL_oCSPM.js";
import { u as no } from "./useForm-CKmgcynv.js";
import { s as ro, __tla as __tla_1 } from "./schemas-BqGurRC_.js";
import { c as io, __tla as __tla_2 } from "./columns-DY6kUOTk.js";
import { B as ao } from "./Table-0PViRYCf.js";
import { _ as so } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { b as lo, d as mo } from "./monthlyReport-SEBHAx0s.js";
import { d as po } from "./download-CIBdrxiA.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import { __tla as __tla_3 } from "./index.vue_vue_type_style_index_0_scoped_b974e5ec_lang-_0QwzFKM.js";
import { H as co, __tla as __tla_4 } from "./index-8tHZJCCW.js";
import "./schemas-BmKi-UM9.js";
import "./props-CLtNejQT.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 "./usePageCache-DluHn7Yy.js";
import { __tla as __tla_5 } from "./schemas-DzvLPsci.js";
import "./template-rpthWlT9.js";
import "./isEmpty-BUg1OsQj.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 "./useModal-CO65vga3.js";
import "./useTimeout-BxFilWvD.js";
import "./Flex-CTSf12gq.js";
import "./base64Conver-4Xd-Hzyx.js";
import "./jobOrder-CGbsc7bp.js";
import "./has-CjqcrIOV.js";
import "./TimelineItem-Bkds7ZW8.js";
let pe;
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  {}
    })(),
    (()=>{
        try {
            return __tla_5;
        } catch  {}
    })()
]).then(async ()=>{
    pe = P({
        __name: "index",
        setup (uo) {
            const f = V(), { t } = q(), p = O(), x = W(), { hasPermission: l } = L(), h = y(), b = y(), { columns: g } = io(), { schemas: v } = ro(), T = N({
                width: 200,
                title: t("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (o) {
                    return X(so, {
                        style: "text",
                        actions: [
                            {
                                label: t("common.optionsViewText"),
                                labelShow: !1,
                                ifShow: l([
                                    "crew:monthlyReport:view"
                                ]),
                                icon: a(s.view, "text-[#3F7AE9] text-[20px]"),
                                onClick: D.bind(null, o)
                            },
                            {
                                label: t("common.optionsEditText"),
                                labelShow: !1,
                                ifShow: ()=>o?.editFlag && l([
                                        "crew:monthlyReport:edit"
                                    ]),
                                icon: a(s.edit, "text-[18px]"),
                                onClick: w.bind(null, o)
                            },
                            {
                                label: t("common.examineAndApprove"),
                                labelShow: !1,
                                ifShow: o?.approveFlag && l([
                                    "crew:monthlyReport:approve"
                                ]),
                                icon: a(s.approve, "text-[#xe628] text-[14px]"),
                                onClick: w.bind(null, o)
                            },
                            {
                                label: t("common.reviewHistory"),
                                labelShow: !1,
                                icon: a(s.history, "text-[#b0b9c0] text-[22px]"),
                                onClick: ()=>{
                                    b.value.handleOpenModal({
                                        busId: o?.id,
                                        moduleCode: o?.moduleCode,
                                        shipId: o?.vesselId,
                                        subModuleCode: "",
                                        signShow: !0
                                    });
                                }
                            },
                            {
                                label: t("common.optionsExportListText"),
                                labelShow: !1,
                                ifShow: l([
                                    "crew:monthlyReport:export"
                                ]),
                                icon: a(s.export, "text-[#7A957D]"),
                                onClick: B.bind(null, o)
                            }
                        ]
                    });
                }
            }), [C, { getFieldsValue: R }] = no({
                gridProps: {
                    cols: "2 s:3 m:4 l:5 xl:6"
                },
                schemas: v,
                labelWidth: "auto",
                labelPlacement: "top",
                showAdvancedButton: !0
            });
            async function k(o, r) {
                return await mo({
                    ...o,
                    ...r
                });
            }
            function S() {
                p.push({
                    name: "crudeOilTanker",
                    query: {
                        type: "add"
                    }
                });
            }
            function m() {
                h.value.restReload();
            }
            async function B(o) {
                try {
                    const r = await lo(Number(o?.id)) || "";
                    po({
                        url: r
                    }), f.success(t("common.exportSuccess"));
                } catch (r) {
                    console.error("导出失败", r), f.error(t("common.exportFail"));
                }
            }
            function D(o) {
                p.push({
                    name: "crudeOilTanker",
                    query: {
                        id: o.id,
                        type: "view"
                    }
                });
            }
            function w(o) {
                p.push({
                    name: "crudeOilTanker",
                    query: {
                        id: o.id,
                        type: "edit"
                    }
                });
            }
            $(()=>x.path, (o, r)=>{
                o.includes("/crew/monthlyReport") && m();
            });
            function F() {
                m();
            }
            return j(()=>{
                F();
            }), (o, r)=>{
                const c = U, M = Y, A = G, E = Z, I = eo, H = z("permission");
                return _(), d(I, null, {
                    default: n(()=>[
                            i(c, {
                                bordered: !1,
                                class: "proCard"
                            }, {
                                default: n(()=>[
                                        i(e(to), {
                                            onRegister: e(C),
                                            onSubmit: m,
                                            onReset: m
                                        }, null, 8, [
                                            "onRegister"
                                        ])
                                    ]),
                                _: 1
                            }),
                            i(c, {
                                bordered: !1,
                                class: "proCard mt-2"
                            }, {
                                default: n(()=>[
                                        i(e(ao), {
                                            ref_key: "basicTableRef",
                                            ref: h,
                                            columns: e(g),
                                            request: (u)=>k(u, e(R)()),
                                            "row-key": (u)=>u.id,
                                            autoScrollX: !0,
                                            actionColumn: e(T),
                                            immediate: !1,
                                            "virtual-scroll": ""
                                        }, {
                                            tableTitle: n(()=>[
                                                    i(E, null, {
                                                        default: n(()=>[
                                                                i(A, {
                                                                    trigger: "hover"
                                                                }, {
                                                                    trigger: n(()=>[
                                                                            Q((_(), d(M, {
                                                                                type: "primary",
                                                                                strong: "",
                                                                                bordered: "",
                                                                                secondary: "",
                                                                                class: "size-7",
                                                                                onClick: S
                                                                            }, {
                                                                                icon: n(()=>[
                                                                                        (_(), d(oo(e(a)(e(s).add))))
                                                                                    ]),
                                                                                _: 1
                                                                            })), [
                                                                                [
                                                                                    H,
                                                                                    {
                                                                                        action: [
                                                                                            "crew:monthlyReport:add"
                                                                                        ]
                                                                                    }
                                                                                ]
                                                                            ])
                                                                        ]),
                                                                    default: n(()=>[
                                                                            J(" " + K(e(t)("common.addText")), 1)
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "columns",
                                            "request",
                                            "row-key",
                                            "actionColumn"
                                        ])
                                    ]),
                                _: 1
                            }),
                            i(e(co), {
                                ref_key: "approvalHistoryModal",
                                ref: b
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { pe as default, __tla };
