import{d as I,gF as q,gG as C,V as R,bk as w,r as D,Z as s,ch as V,k as _,c,o as p,w as u,i as r,j as m,H as $,p as d,D as B,A as i,l as o,ae as N,ca as F,X as L}from"./index-9PRMimni.js";import{B as M}from"./Table-0PViRYCf.js";import{c as O}from"./columns-CSOIGjyz.js";import"./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";import"./vuedraggable.umd-Co2xEC3p.js";import"./Render.vue_vue_type_script_lang-DKUYY0Zw.js";import"./componentMap-CElCaWis.js";import"./propTypes-CebMRUpe.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"./componentSetting-DVhNDBTO.js";import"./useTimeout-BxFilWvD.js";import"./usePageCache-DluHn7Yy.js";import"./tabsView-BXskTdVh.js";import"./Flex-CTSf12gq.js";import"./dateUtil-BtafrT1f.js";const U={class:"mb-5"},j={class:"mt-5"},le=I({__name:"ScoreForm",props:q({currentTab:{},tabReadonly:{type:Boolean}},{formData:{type:Object,default:()=>({})},formDataModifiers:{}}),emits:["update:formData"],setup(f){const y=f,a=C(f,"formData"),{t}=R(),b=w(),{renderScoreStatusFunc:h}=O(),g=D(),S=[{title:t("hsqe.planner.no"),key:"num",width:80,render:(e,n)=>n+1},{title:t("hsqe.auditInspection.qualitySafetyInspection.scoreItemContent"),key:b.getLocale==="en"?"inspectionContentEn":"inspectionContentZh",ellipsis:!1,align:"left"},{title:()=>s("span",{},[t("hsqe.auditInspection.qualitySafetyInspection.scoreItem"),s("span",{style:{color:"red"}},[" *"])]),key:"inspectionResult",width:300,render:e=>s(V,{value:e.inspectionResult,precision:0,min:1,max:5,style:{width:"200px"},disabled:y.tabReadonly,placeholder:t("hsqe.auditInspection.qualitySafetyInspection.fullScore5"),onUpdateValue:n=>{e.inspectionResult=n}})},{title:t("hsqe.auditInspection.qualitySafetyInspection.scoreRemarks"),key:"remark",width:450,render:e=>s(_,{value:e.remark,style:{width:"400px"},placeholder:t("common.inputText"),disabled:y.tabReadonly,onUpdateValue:n=>{e.remark=n}})}];return(e,n)=>{const T=N,k=$,v=L;return p(),c(v,null,{default:u(()=>[r("div",U,[m(k,{size:60,align:"center"},{default:u(()=>[r("span",null,[d(i(o(t)("hsqe.auditInspection.qualitySafetyInspection.score"))+"： ",1),a.value?.[`${e.currentTab}totalScore`]?(p(),c(T,{key:0,type:"info"},{default:u(()=>[d(i(a.value?.[`${e.currentTab}totalScore`]),1)]),_:1})):B("",!0)]),r("span",null,[d(i(o(t)("hsqe.auditInspection.qualitySafetyInspection.rating"))+"： ",1),(p(),c(F(o(h)(a.value?.[`${e.currentTab}ratingCode`],o(b).getLocale==="en"?a.value?.[`${e.currentTab}ratingEn`]:a.value?.[`${e.currentTab}rating`]))))])]),_:1})]),m(o(M),{ref_key:"basicTableRef",ref:g,columns:S,dataSource:a.value.checkTeb?.[e.currentTab],"row-key":l=>l.id,autoScrollX:!0,immediate:!1,pagination:!1,showTableSetting:!1,"virtual-scroll":""},null,8,["dataSource","row-key"]),r("div",j,[r("h1",null,i(o(t)("hsqe.auditInspection.qualitySafetyInspection.scoreOptions")),1),m(o(_),{type:"textarea",value:a.value[`${e.currentTab}_opinion`],"onUpdate:value":n[0]||(n[0]=l=>a.value[`${e.currentTab}_opinion`]=l),placeholder:o(t)("common.inputText"),disabled:e.tabReadonly},null,8,["value","placeholder","disabled"])])]),_:1})}}});export{le as default};
