import { V as g, bk as y, cO as p, cq as l, fm as r, r as q, __tla as __tla_0 } from "./index-9PRMimni.js";
import { y as v, i as P, e as _, j as S } from "./template-rpthWlT9.js";
import { a as R } from "./planner-BebmniHR.js";
let L, x;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    const o = y(), { t: e } = g(), h = await v(), N = await R(), V = await _({
        roleType: 2,
        roleCategory: 1
    }), C = await S(), T = await P(), s = q(!1);
    L = function(n = {}) {
        const c = [
            {
                value: "afloat",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.afloat")
            },
            {
                value: "dryDock",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.dryDock")
            },
            {
                value: "berth",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.berth")
            },
            {
                value: "anchorage",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.anchorage")
            },
            {
                value: "loading",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.loading")
            },
            {
                value: "discharging",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.discharging")
            }
        ], u = [
            {
                field: "validateTimeList",
                component: "NDatePicker",
                label: e("hsqe.auditInspection.qualitySafetyInspection.visitDate"),
                componentProps: ({ model: t })=>({
                        type: "daterange",
                        valueFormat: "yyyy-MM-dd",
                        startPlaceholder: e("hsqe.auditInspection.qualitySafetyInspection.from"),
                        endPlaceholder: e("hsqe.auditInspection.qualitySafetyInspection.to"),
                        onUpdateValue: (a, i)=>{
                            t.validateTimeFrom = i?.[0], t.validTimeTo = i?.[1];
                        }
                    })
            }
        ], m = [
            {
                field: "shipId",
                label: e("hsqe.auditInspection.qualitySafetyInspection.shipName"),
                component: "NSelect",
                componentProps: ({ model: t })=>({
                        disabled: n.readonly?.value,
                        options: N,
                        valueField: "id",
                        labelField: o.getLocale === "en" ? "shipNameEn" : "shipName",
                        onUpdateValue: (a, i)=>{
                            t.shipName = i.shipName;
                        }
                    }),
                rules: [
                    {
                        required: !0,
                        type: "number",
                        message: e("hsqe.auditInspection.qualitySafetyInspection.shipName"),
                        trigger: [
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "reportNum",
                label: e("hsqe.auditInspection.qualitySafetyInspection.reportNo"),
                component: "NInput",
                componentProps: {
                    disabled: !0,
                    placeholder: e("common.autoPlaceholderText")
                }
            },
            {
                field: "visitDate",
                label: e("hsqe.auditInspection.qualitySafetyInspection.visitDate"),
                component: "NDatePicker",
                componentProps: ()=>({
                        type: "date",
                        valueFormat: "yyyy-MM-dd",
                        disabled: n.readonly?.value
                    }),
                rules: [
                    {
                        required: !0,
                        message: e("hsqe.auditInspection.qualitySafetyInspection.visitDate"),
                        trigger: [
                            "blur",
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "reportDate",
                label: e("hsqe.auditInspection.qualitySafetyInspection.reportDate"),
                component: "NDatePicker",
                componentProps: ()=>({
                        type: "date",
                        valueFormat: "yyyy-MM-dd",
                        disabled: !0,
                        placeholder: e("common.autoPlaceholderText")
                    }),
                rules: [
                    {
                        required: !0,
                        message: e("hsqe.auditInspection.qualitySafetyInspection.reportDate"),
                        trigger: [
                            "blur",
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "reportBy",
                label: e("hsqe.auditInspection.qualitySafetyInspection.reportBy"),
                component: "NInput",
                componentProps: {
                    disabled: !0,
                    placeholder: e("common.autoPlaceholderText")
                }
            },
            {
                field: "allTotalScore",
                label: e("hsqe.auditInspection.qualitySafetyInspection.totalScore") + ` (${e("hsqe.auditInspection.qualitySafetyInspection.fullScore")})`,
                component: "NInput",
                componentProps: {
                    disabled: !0,
                    placeholder: e("common.autoPlaceholderText")
                }
            },
            {
                field: o.getLocale === "en" ? "allEnRating" : "allRating",
                label: e("hsqe.auditInspection.qualitySafetyInspection.overallRating"),
                component: "NInput",
                componentProps: {
                    disabled: !0,
                    placeholder: e("common.autoPlaceholderText")
                }
            },
            {
                field: "purpose",
                label: e("hsqe.auditInspection.qualitySafetyInspection.purpose"),
                component: "NSelect",
                componentProps: ()=>({
                        disabled: n.readonly?.value,
                        options: [
                            {
                                value: 1,
                                label: e("hsqe.auditInspection.qualitySafetyInspection.purposeConvention")
                            },
                            {
                                value: 2,
                                label: e("hsqe.auditInspection.qualitySafetyInspection.purposeTemporary")
                            },
                            {
                                value: 3,
                                label: e("hsqe.auditInspection.qualitySafetyInspection.purposeOther")
                            }
                        ]
                    }),
                rules: [
                    {
                        required: !0,
                        type: "number",
                        message: e("hsqe.auditInspection.qualitySafetyInspection.purpose"),
                        trigger: [
                            "blur",
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "otherPurpose",
                label: e("hsqe.auditInspection.qualitySafetyInspection.otherPurpose"),
                component: "NInput",
                componentProps: ()=>({
                        disabled: n.readonly?.value
                    })
            },
            {
                field: "visitPlace",
                label: e("hsqe.auditInspection.qualitySafetyInspection.visitPlace"),
                slot: "visitPlace",
                rules: [
                    {
                        required: !0,
                        message: e("hsqe.auditInspection.qualitySafetyInspection.visitPlace"),
                        trigger: [
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "examineList",
                label: e("hsqe.auditInspection.qualitySafetyInspection.visitPerson"),
                component: "NSelect",
                componentProps: ()=>({
                        disabled: n.readonly?.value,
                        options: h,
                        maxTagCount: "responsive",
                        multiple: !0,
                        filterable: !0
                    }),
                rules: [
                    {
                        type: "array",
                        required: !0,
                        message: e("hsqe.auditInspection.qualitySafetyInspection.visitPerson"),
                        trigger: [
                            "blur",
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "addendList",
                label: e("hsqe.auditInspection.qualitySafetyInspection.addendList"),
                component: "NSelect",
                componentProps: ()=>({
                        disabled: n.readonly?.value,
                        options: (h || []).map((t)=>({
                                ...t,
                                value: +t.value
                            })),
                        maxTagCount: "responsive",
                        multiple: !0,
                        filterable: !0
                    })
            },
            {
                field: "prevailingConditions",
                label: e("hsqe.auditInspection.qualitySafetyInspection.shipStatus"),
                component: "NCheckbox",
                giProps: {
                    span: 18
                },
                componentProps: ()=>({
                        disabled: n.readonly?.value,
                        options: c
                    }),
                rules: [
                    {
                        required: !0,
                        type: "array",
                        message: e("hsqe.auditInspection.qualitySafetyInspection.shipStatus"),
                        trigger: [
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "shipPhoto_Photo",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipPhoto"),
                component: "SingleImageUpload",
                componentProps: ({ model: t })=>({
                        disabled: n.readonly?.value,
                        action: `${l().urlPrefix}/files`,
                        headers: {
                            timestamp: new Date().getTime(),
                            authorization: `${p.get(r)}`
                        },
                        onUploadChange: (a, i)=>{
                            t.shipPhoto = i;
                        }
                    }),
                giProps: {
                    span: 24
                },
                rules: [
                    {
                        required: !0,
                        message: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipPhotoHint"),
                        trigger: [
                            "blur",
                            "change"
                        ]
                    }
                ]
            }
        ], I = [
            {
                field: o.getLocale === "en" ? "shipNameEn" : "shipName",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.shipName"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "flag",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.flag"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "imo",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.imo"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "callSign",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.callSign"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "shipClass",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.classNo"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "deadweightTonnage",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.deadWeight"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "grossTonnage",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.grossTonnage"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "netTonnage",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.netTonnage"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "lbd",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.lbd"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "summerDraft",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.summerDraft"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "shipyard",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.builder"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "builderNo",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.hullNo"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "keelLayingDate",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.keelLaying"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "deliverDate",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.deliver"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "mainMachineInfo",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.MEModel"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "viceMachineInfo",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.AEModel"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "deckCraneModel",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.deckCraneModel"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "speedFOC",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.speedFOC"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "vesselOwner",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.shipOwner"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "shipBuildDate",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.constructYear"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "runningCompany",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.operator"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: o.getLocale === "en" ? "master_name_en" : "master_name_cn",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.captain"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: o.getLocale === "en" ? "chief_engineer_name_en" : "chief_engineer_name_cn",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.chiefEngineer"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: o.getLocale === "en" ? "operationalManagementCompanyNameEn" : "operationalManagementCompanyName",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.technicalManager"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "crewManager",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.crewManager"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "crewCount",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.crewNo"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "voyageInfo",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.voyageInfo"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "procurementManagerName",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.operationSupervisor"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "technicalSuperintendentName",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.mechanicalSupervisor"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "marineSuperintendentName",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.marineAffairsSupervisor"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "crewSuperintendentName",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.shipParticulars.crewSupervisor"),
                component: "NInput",
                componentProps: {
                    disabled: !0
                }
            }
        ], f = [
            {
                field: "reportNo",
                component: "NInput",
                label: e("hsqe.auditInspection.qualitySafetyInspection.reportNo"),
                componentProps: {
                    disabled: !0
                }
            },
            {
                field: "severity",
                component: "NSelect",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.severity"),
                componentProps: ()=>({
                        options: T,
                        disabled: s?.value,
                        "label-field": o.getLocale === "en" ? "labelEn" : "label"
                    }),
                rules: [
                    {
                        required: !0,
                        message: `${e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.severity")} ${e("common.required")}`,
                        trigger: [
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "deficiencyCode",
                component: "BasicSelect",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.deficiencyCode"),
                componentProps: ()=>({
                        disabled: s?.value,
                        block: !0,
                        cacheKey: "qualitySafe_checkList"
                    }),
                rules: [
                    {
                        required: !0,
                        message: `${e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.deficiencyCode")} ${e("common.required")}`,
                        trigger: [
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "expirationTime",
                component: "NDatePicker",
                label: e("hsqe.auditInspection.qualitySafetyInspection.rectificationSuggestDate"),
                componentProps: ()=>({
                        disabled: s?.value,
                        type: "date",
                        valueFormat: "yyyy-MM-dd"
                    }),
                rules: [
                    {
                        required: !0,
                        message: `${e("hsqe.auditInspection.qualitySafetyInspection.rectificationSuggestDate")} ${e("common.required")}`,
                        trigger: [
                            "blur",
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "vesselPositionCode",
                component: "NSelect",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.vesselResponsible"),
                componentProps: ()=>({
                        disabled: s?.value,
                        options: V,
                        "label-field": o.getLocale === "en" ? "nameEn" : "name",
                        "value-field": "code"
                    }),
                rules: [
                    {
                        required: !0,
                        message: `${e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.vesselResponsible")} ${e("common.required")}`,
                        trigger: [
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "officePositionCode",
                component: "NSelect",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.officeResponsible"),
                componentProps: ()=>({
                        disabled: s?.value,
                        options: C,
                        "label-field": o.getLocale === "en" ? "nameEn" : "name",
                        "value-field": "code"
                    }),
                rules: [
                    {
                        required: !0,
                        message: `${e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.officeResponsible")} ${e("common.required")}`,
                        trigger: [
                            "change"
                        ]
                    }
                ]
            },
            {
                field: "basicDescription",
                component: "NInput",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.basicInfo.description"),
                giProps: {
                    span: 24
                },
                componentProps: ()=>({
                        disabled: s?.value,
                        type: "textarea",
                        maxlength: 300,
                        showCount: !0
                    })
            },
            {
                field: "deficiencyPhotoUrlPhoto",
                label: e("hsqe.auditInspection.vesselInspection.shipVisitReport.attachment"),
                component: "SingleImageUpload",
                componentProps: ({ model: t })=>({
                        disabled: s?.value,
                        action: `${l().urlPrefix}/files`,
                        headers: {
                            timestamp: new Date().getTime(),
                            authorization: `${p.get(r)}`
                        },
                        onUploadChange: (a, i)=>{
                            t.deficiencyPhotoUrl = i;
                        }
                    })
            },
            {
                field: "deficiencyPhotoUrlTwoPhoto",
                label: `${e("hsqe.auditInspection.vesselInspection.shipVisitReport.attachment")}2`,
                component: "SingleImageUpload",
                componentProps: ({ model: t })=>({
                        disabled: s?.value,
                        action: `${l().urlPrefix}/files`,
                        headers: {
                            timestamp: new Date().getTime(),
                            authorization: `${p.get(r)}`
                        },
                        onUploadChange: (a, i)=>{
                            t.deficiencyPhotoUrlTwo = i;
                        }
                    })
            },
            {
                field: "deficiencyPhotoUrlThreePhoto",
                label: `${e("hsqe.auditInspection.vesselInspection.shipVisitReport.attachment")}3`,
                component: "SingleImageUpload",
                componentProps: ({ model: t })=>({
                        disabled: s?.value,
                        action: `${l().urlPrefix}/files`,
                        headers: {
                            timestamp: new Date().getTime(),
                            authorization: `${p.get(r)}`
                        },
                        onUploadChange: (a, i)=>{
                            t.deficiencyPhotoUrlThree = i;
                        }
                    })
            }
        ], d = [
            "ship_whole",
            "ship_front",
            "ship_tail",
            "ship_load_line_marking",
            "ship_draft_sign",
            "ship_gangway",
            "ship_main_deck",
            "ship_stern_deck",
            "ship_fore_deck",
            "ship_cargo_hold_cover",
            "ship_anchor_cable_machine",
            "ship_keling_diao",
            "ship_cargo_hold",
            "ship_shangjian",
            "ship_ballast_tank",
            "ship_tank_ventilation_cap",
            "ship_fouling_equipment",
            "ship_oxygen_acetylene",
            "ship_fire_extinguishing",
            "ship_emergency_generato",
            "ship_life_boat",
            "ship_rescue_boat",
            "ship_life_raft",
            "ship_chimney",
            "ship_fire_control",
            "ship_office",
            "ship_restaurant",
            "ship_kitchen",
            "ship_food_depot",
            "ship_bathroom",
            "ship_crew_room",
            "ship_driver_cab",
            "ship_mainframe",
            "ship_boiler_room",
            "ship_generator",
            "ship_separator",
            "ship_steering_gear",
            "ship_emergency_fire_pump",
            "ship_mainframe_platform",
            "ship_central_control_room",
            "ship_workshop",
            "ship_spare_parts_warehouse",
            "ship_water_separator",
            "ship_domestic_sewage_treatment",
            "ship_Incinerator",
            "ship_other"
        ], b = d.map((t)=>({
                field: `${t}_Photo`,
                label: e(`hsqe.auditInspection.qualitySafetyInspection.photos.${t}`),
                component: "ImageCodeUpload",
                giProps: {
                    span: t === "ship_other" ? 24 : void 0
                },
                componentProps: ()=>({
                        disabled: n?.photoReadonly?.value,
                        action: `${l().urlPrefix}/system/files`,
                        headers: {
                            timestamp: new Date().getTime(),
                            authorization: `${p.get(r)}`
                        },
                        maxNumber: t === "ship_other" ? 20 : 2,
                        onUploadChange: (a)=>{
                            n?.handleChangeValue(a, t);
                        }
                    })
            }));
        return {
            searchSchemas: u,
            reportFormSchemas: m,
            shipInfoSchemas: I,
            prevailingConditionsOptions: c,
            rectificationSchemas: f,
            photoSchemas: b,
            photoField: d,
            methods: {
                setRectificationOnly: (t)=>{
                    s.value = t;
                }
            }
        };
    };
    x = function() {
        return {
            getTabListFunc: (u = [])=>[
                    {
                        label: e("hsqe.auditInspection.qualitySafetyInspection.tabShipOverview"),
                        value: "ShipOverview"
                    },
                    ...u || [],
                    {
                        label: e("hsqe.auditInspection.qualitySafetyInspection.tabShipTotalScoreAndRating"),
                        value: "ShipTotalScoreAndRating"
                    },
                    {
                        label: e("hsqe.auditInspection.qualitySafetyInspection.tabRectificationProject"),
                        value: "RectificationProject"
                    },
                    {
                        label: e("hsqe.auditInspection.qualitySafetyInspection.tabGoodPracticesDiscovered"),
                        value: "GoodPracticesDiscovered"
                    },
                    {
                        label: e("hsqe.auditInspection.qualitySafetyInspection.tabShipReferencePhotos"),
                        value: "ShipReferencePhotos"
                    }
                ],
            templateCode: "safetyQuality"
        };
    };
});
export { L as c, x as g, __tla };
