import{r as d,V as E,bk as F,d as G,aw as H,c as A,o as r,X as z,w as a,j as m,h as y,cS as I,N as S,l,gU as g,i as x,A as V}from"./index-9PRMimni.js";import{B as J}from"./BasicForm-dL_oCSPM.js";import{w as L}from"./template-rpthWlT9.js";import{u as W}from"./useForm-CKmgcynv.js";const v="data:image/png;base64,[encoded data, 5304 characters]",{t}=E(),T=d([]),U=F();function O(){const c=d(!1),u=d(null),i=[{title:t("hsqe.nc.masterComment"),cardProps:{headerClass:"pl-0 pt-0",contentStyle:"padding: 10px 0 0px 0",bordered:!1,hoverable:!1},columns:[{field:"masterCommentDate",component:"NDatePicker",label:t("hsqe.nc.Date"),componentProps:()=>({disabled:!0,valueFormat:"yyyy-MM-dd",type:"date"})},{field:"masterUrl",slot:"master",label:t("hsqe.nc.master")}]},{title:t("hsqe.nc.superintendentComment"),cardProps:{headerClass:"pl-0 pt-0",contentStyle:"padding: 10px 0 10px 0",contentClass:"pb-0",bordered:!1,hoverable:!1},columns:[{label:t("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.action.verifiedClosedON"),field:"verifyResult",component:"NSelect",componentProps:()=>({disabled:!0,options:[{label:"是",value:"yes",labelEn:"Yes"},{label:"否",value:"no",labelEn:"No"}],"label-field":U.getLocale==="en"?"labelEn":"label"})},{field:"verifyDate",component:"NDatePicker",label:t("hsqe.nc.RectifyData"),componentProps:()=>({disabled:!0,type:"date",valueFormat:"yyyy-MM-dd",filterable:!0})},{field:"verifiedBy",slot:"verifiedBy",label:t("hsqe.nc.verifiedBy")},{field:"verification",component:"NInput",label:t("hsqe.deficiency.verification"),componentProps:{type:"textarea",disabled:c,maxlength:300,showCount:!0},giProps:{span:4}}]},{title:t("hsqe.nc.dpaComment"),cardProps:{headerClass:"pl-0 pt-0",contentStyle:"padding: 10px 0 0px 0",bordered:!1,hoverable:!1},columns:[{field:"dpaPassTime",component:"NDatePicker",label:t("hsqe.nc.Date"),componentProps:()=>({disabled:!0,type:"date",valueFormat:"yyyy-MM-dd",filterable:!0})},{field:"ncDeficiencyBasicDto.dpaSingUrl",slot:"dpa",label:t("hsqe.nc.dpa")},{field:"comment",component:"NInput",label:t("hsqe.nc.Comment"),componentProps:{type:"textarea",disabled:c,maxlength:300,showCount:!0},giProps:{span:4}}]}];return{schemas:i,methods:{setReadOnly:o=>{c.value=o},setReportType:o=>{u.value=o},setDefectList:o=>{T.value=o.list},getSchemas:()=>i}}}const X={key:1,class:"w-[110px]",src:v},Z={key:1,class:"w-[110px]",src:v},K={key:1,class:"w-[110px]",src:v},_=G({__name:"index",emits:["saveCallBack"],setup(c,{expose:u,emit:i}){const C=i,{schemas:o}=O(),[b,{setFieldsValue:B,getFieldsValue:k}]=W({gridProps:{cols:4,xGap:15},collapsed:!1,collapsedRows:12,labelWidth:80,layout:"horizontal",submitButtonText:"sure",showActionButtonGroup:!1,showSubmitButton:!1,showResetButton:!1}),R=d({});async function P(e){e.masterCommentDate&&(e.masterCommentDate=e.masterCommentDate.split(/T| /)[0]),e.verifyDate&&(e.verifyDate=e.verifyDate.split(/T| /)[0]),e.dpaPassTime&&(e.dpaPassTime=e.dpaPassTime.split(/T| /)[0]),B(e)}function D(e){console.log(e,"review")}async function Q(){let e=k();const p={...R.value,...e};p.expirationTime&&(p.expirationTime+=" 00:00:00"),await L(p),C("saveCallBack")}return H(()=>{}),u({submit:Q,setData:D,initData:P}),(e,p)=>{const f=S,h=I,N=J,w=z;return r(),A(w,null,{default:a(()=>[m(N,{group:l(o),onRegister:l(b)},{master:a(({model:n,field:s})=>[n[s]&&n[s]!==""?(r(),A(h,{key:0,width:"100",src:n[s],"preview-disabled":""},{error:a(()=>[m(f,{size:80,color:"lightGrey",component:l(g)},null,8,["component"])]),_:2},1032,["src"])):(r(),y("img",X)),x("span",null,V(n.masterName),1)]),verifiedBy:a(({model:n,field:s})=>[n[s]?(r(),A(h,{key:0,width:"100",src:n[s],"preview-disabled":""},{error:a(()=>[m(f,{size:80,color:"lightGrey",component:l(g)},null,8,["component"])]),_:2},1032,["src"])):(r(),y("img",Z))]),dpa:a(({model:n,field:s})=>[n[s]?(r(),A(h,{key:0,width:"100",src:n[s],"preview-disabled":""},{error:a(()=>[m(f,{size:80,color:"lightGrey",component:l(g)},null,8,["component"])]),_:2},1032,["src"])):(r(),y("img",K))]),_:1},8,["group","onRegister"])]),_:1})}}});export{_};
