PageSourceSearch

https://mieco2.com/assets/index.7725b06a.js

js mieco2.com collected 2026-10-07 06:01:38 UTC 146,655 bytes, 3 lines download raw bytes

1var sa=Object.defineProperty,da=Object.defineProperties;var fa=Object.getOwnPropertyDescriptors;var xt=Object.getOwnPropertySymbols;var ua=Object.prototype.hasOwnProperty,pa=Object.prototype.propertyIsEnumerable;var zt=(D,G,C)=>G in D?sa(D,G,{enumerable:!0,configurable:!0,writable:!0,value:C}):D[G]=C,ve=(D,G)=>{for(var C in G||(G={}))ua.call(G,C)&&zt(D,C,G[C]);if(xt)for(var C of xt(G))pa.call(G,C)&&zt(D,C,G[C]);return D},we=(D,G)=>da(D,fa(G));import{_ as Le,d as ke,G as Ve,aS as ot,bp as lt,B as L,b3 as bt,L as j,bh as Xe,aR as De,aP as Oe,S as X,H as Me,aQ as Ct,bk as me,z as be,at as ie,fg as $e,ei as ma,fh as ga,aV as he,k as Qe,aU as Tt,o as B,m as _e,e as W,b as a,w as o,f as i,bl as Jt,y as We,x as Xt,i as et,F as Ue,s as pt,c as Q,Q as Aa,g as b,t as ee,aG as ya,p as vt,h as It,dK as Mt,dL as mt,fi as _a,O as it,Y as kt,a3 as rt,Z as xe,aI as nt,a4 as ht,bw as Lt,K as Rt,P as Ee,N as fe,X as wt,l as ze,aH as je,ef as Sa,I as Be,J as gt,eg as jt,fj as Ea,az as tt,aA as Ze,as as Ft,fk as ba,A as ae,ba as Pt,dv as Qt,ay as At,aO as Nt,a0 as Ca,el as Ta,db as va,bB as Wt,dT as Ia,M as Kt,fl as ha,j as Ot,bn as Ra,dB as Na,b2 as Oa,aZ as qe,dE as Ua,fm as Da,bj as Je,ax as yt,U as Gt,fn as Va,fo as wa,f1 as Ba,f2 as Ma,dx as La,a as ka,fp as Fa,bv as Pa,fq as Ka,fr as Ga,dm as Ya,aB as $a,C as _t,aC as xa,au as Ht,$ as za,aT as ja,aW as Wa,fs as ft}from"./index.944d26b9.js";import{i as Ha,p as Zt}from"./companyId.dc9987e0.js";import{f as Ye,c as at,g as St,i as Za}from"./UnitSetting.ed6b2d27.js";import{a as qa}from"./companyConfigApi.d3054372.js";import{c as Ke,s as ea,_ as ta,k as Ja}from"./chartmapping.b1dc66fa.js";import{c as He}from"./companyRelation.4a7ef47c.js";import{g as Et,a as qt}from"./RemoteLabels.501d72e7.js";import{T as aa,r as Yt}from"./TableActions.13f4dd33.js";import{P as Ut}from"./Pagination.35de6c07.js";import{r as oa,c as Xa}from"./render.4033ea2e.js";import{D as Qa}from"./Dropdown.3212f626.js";import{S as la}from"./Search16Regular.664a76c4.js";import{_ as ct}from"./DatePicker.09237d92.js";import{_ as eo}from"./index.ae8d21db.js";import{I as ut}from"./range.f258dd91.js";import{_ as to}from"./index.eb9d7517.js";import{S as ao,_ as oo}from"./detail.bd3872cb.js";import{_ as Dt}from"./FormItemGridItem.d54ecdcd.js";import{_ as ia}from"./Cascader.94644182.js";import{$ as lo}from"./jquery.d351e278.js";import{W as io}from"./Warning20Filled.bd313683.js";import{_ as ro}from"./text.80f8bebe.js";import{_ as no}from"./Upload.c41396e5.js";import{_ as co}from"./Alert.2a606c14.js";import{d as so}from"./loading.3c4575dd.js";import{A as fo}from"./Attach16Filled.9ed6cb39.js";import{A as uo,a as po,p as mo}from"./AddVariables.12b9c663.js";import{p as Bt,s as go}from"./index.b2cfe168.js";import{b as Ao,a as yo}from"./Tabs.80a58f1e.js";import"./decimal.b917e9b0.js";const _o=D=>(vt("data-v-5a92da2b"),D=D(),It(),D),So={class:"search"},Eo={class:"toolbar allocation-search-toolbar"},bo={class:"toolbar-left"},Co={class:"tb-field"},To={class:"tb-year-range"},vo=_o(()=>W("span",{class:"tb-year-tilde"},"~",-1)),Io={class:"tb-field filter-pill"},ho={class:"tb-field tb-search-field"},Ro=ke({name:"index",props:{data:{type:Object,default:()=>({})}},setup(D){const G=D,{t:C}=Ve(),_=ot(),c=lt(),{deleteRow:y}=aa(),k=L(null),{orderBy:N,sorterChange:Z}=bt(),f=L({base:[],scope:[],category:[]}),U=j({company:[],base:[],scope:[],category:[]}),K=j({company:{},base:{},scope:{},category:{}});Xe({dict:["scope","category"]}).then(d=>{Object.assign(U,...d[0],{});const{scope:O,category:g}=U;Object.assign(K,De({scope:O,category:g}))});const u=()=>({companyId:Oe().companyId.value,startYear:null,endYear:null}),t=j(u()),S=L(null),F=["resourceId","certificateCreditId","mukoukaId","deleteFlg"];X(()=>G.data,d=>{const O=d&&typeof d=="object"?d:{};F.forEach(g=>{Object.prototype.hasOwnProperty.call(O,g)&&(t[g]=O[g])})},{deep:!0,immediate:!0});function M(d){return Array.isArray(d)?d.map(O=>{var g;return ve({label:O.label,value:String(O.value)},(g=O.children)!=null&&g.length?{children:M(O.children)}:{})}):[]}const oe=Me(()=>{var d;return M((d=U.base)!=null?d:[])});function z(d){const O=d.split("/");let g=oe.value||[],H=d;for(const de of O){const Y=g==null?void 0:g.find(ge=>String(ge.value)===String(de));if(!Y)break;H=Y.label,g=Y.children||[]}return H}const e=Me(()=>{var O,g,H,de,Y,ge,Te,se,Fe,R,Ge;const d=[];for(const Ae of(O=f.value.scope)!=null?O:[]){const Se=String(Ae);d.push({key:`scope-${Se}`,cat:"scope",id:Se,text:(Y=(de=(g=K.scope)==null?void 0:g[Se])!=null?de:(H=K.scope)==null?void 0:H[Number(Se)])!=null?Y:Se})}for(const Ae of(ge=f.value.category)!=null?ge:[]){const Se=String(Ae);d.push({key:`category-${Se}`,cat:"category",id:Se,text:(R=(Fe=(Te=K.category)==null?void 0:Te[Se])!=null?Fe:(se
1=K.category)==null?void 0:se[Number(Se)])!=null?R:Se})}for(const Ae of(Ge=f.value.base)!=null?Ge:[])d.push({key:`base-${Ae}`,cat:"base",id:Ae,text:z(Ae)});return d});function A(d,O){var H;const g=((H=f.value[d])!=null?H:[]).filter(de=>String(de)!==String(O));f.value=we(ve({},f.value),{[d]:g}),ue(!0)}const m=[];m.push(Ct({mode:"01"}).then(d=>{Object.assign(U,{company:(d==null?void 0:d.body)||[]});const{company:O}=U;Object.assign(K,De({company:O}))}));const v=L([]),E=L([]),P=d=>d.id,w=L(!1),te=d=>{w.value=!0;const O=d.filter(g=>g.id!=null&&g.id>0).map(g=>g.id);E.value=O},le=d=>{Mt({companyId:d.companyId,language:be()}).then(O=>{U.base=O,Object.assign(K,De({base:mt(O).map(g=>(g.value=g.value.split(".").pop(),g))}))})},re=()=>{f.value=we(ve({},f.value),{base:[]}),ue(!0)};X(()=>t.companyId,()=>{le(t)},{immediate:!0});function ce(){ue(!0)}const I=[{title:C("data.certificateCredit.certificateCreditName"),key:"certificateCreditName",align:"center",width:200,minWidth:60,sorter:"default",resizable:!0,ellipsis:{tooltip:!0}},{title:C("data.inputNew.table.activityYear"),key:"activityYear",align:"left",sorter:"default",fixed:"left",width:80},{title:C("data.company"),key:"companyId",align:"left",sorter:"default",width:150,resizable:!0,render:d=>K.company[d.companyId]},{title:C("data.inputNew.table.baseName"),key:"baseId",align:"left",width:140,sorter:"default",ellipsis:{tooltip:!0},fixed:"left",resizable:!0,render:d=>K.base[d.baseId]},{title:C("data.certificateCredit.scope1Allocation"),key:"scope1Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope1Allocation<=0?"":me(d.scope1Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope2Allocation"),key:"scope2Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope2Allocation<=0?"":me(d.scope2Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate1Allocation"),key:"scope3Cate1Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate1Allocation<=0?"":me(d.scope3Cate1Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate2Allocation"),key:"scope3Cate2Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate2Allocation<=0?"":me(d.scope3Cate2Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate3Allocation"),key:"scope3Cate3Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate3Allocation<=0?"":me(d.scope3Cate3Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate4Allocation"),key:"scope3Cate4Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate4Allocation<=0?"":me(d.scope3Cate4Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate5Allocation"),key:"scope3Cate5Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate5Allocation<=0?"":me(d.scope3Cate5Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate6Allocation"),key:"scope3Cate6Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate6Allocation<=0?"":me(d.scope3Cate6Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate7Allocation"),key:"scope3Cate7Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate7Allocation<=0?"":me(d.scope3Cate7Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate8Allocation"),key:"scope3Cate8Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate8Allocation<=0?"":me(d.scope3Cate8Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate9Allocation"),key:"scope3Cate9Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate9Allocation<=0?"":me(d.scope3Cate9Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate10Allocation"),key:"scope3Cate10Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate10Allocation<=0?"":me(d.scope3Cate10Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate11Allocation"),key:"scope3Cate11Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate11Allocation<=0?"":me(d.scope3Cate11Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate12Allocation"),key:"scope3Cate12Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate12Allocation<=0?"":me(d.scope3Cate12Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate13Allocation"),key:"scope3Cate13Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate13Allocation<=0?"":me(d.scope3Cate13Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate14Allocation"),key:"scope3Cate14Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate14Allocation<=0?"":me(d.scope3Cate14Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.certificateCredit.scope3Cate15Allocation"),key:"scope3Cate15Allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.scope3Cate15Allocation<=0?"":me(d.scope3Cate15Allocation,{fixed:3})+" t-CO\u2082e"},{title:C("data.inputNew.table.project"),key:"activityItem",align:"left",sorter:"default",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0}},{title:C("data.certificateCredit.allocation"),key:"allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.allocation<=0?"":me(d.allocation,{fixed:3})+"t-CO\u2082e"},{title:C("data.certificateCredit.activityVolume"),key:"activityVolume",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:d=>d.activityVolume<=0?"":me(d.activityVolume,{fixed:3})+"kWh"},{title:C("data.active.table.createTime"),key:"createTime",align:"center",width:be()==="0"?110:130,ellipsis:{tooltip:!0},minWidth:60,sorter:"default",render:d=>ie(d.createTime).format("YYYY-MM-DD")},{title:C("data.active.table.updateTime"),key:"updateTime",align:"center",width:be()==="0"?110:130,ellipsis:{tooltip:!0},minWidth:60,sorter:"default",render:d=>ie(d.updateTime).format("YYYY-MM-DD")},{title:C("data.active.table.action"),key:"operators",align:"center",width:100,fixed:"right",render:d=>Yt(..._.validate($e)?[y(d,()=>c.delete(()=>ma(d.companyId).then(O=>ga(Object.assign({},d,{currentAvailableYear:O})))).then(()=>{h.page=1,he(C("event.delete",{screen:C("menus.data.certificateCredit")}),{method:"Delete",screen_name:C("menus.data.certificateCredit")}),ue()}))]:[])}],s=L(),x={enableYear:{validator(){const d=t.startYear!=null&&ie(t.startYear).isValid()?ie(t.startYear):null,O=t.endYear!=null&&ie(t.endYear).isValid()?ie(t.endYear):null;if(d&&O&&O.isBefore(d))return new Error(C("message.CMPF0043-W",[C("data.efAvailable.search.activeTime")]))},trigger:["blur","change"]}},T=L(!1),{pagination:h,pageParams:Re}=Ut(t),Ie=()=>{var O;const d=(O=f.value.base)!=null?O:[];if(!!d.length)return d.map(g=>
1String(g).trim().split(".").pop()).filter(Boolean).join(",")};function Ce(d){if(d==null||d==="")return null;if(typeof d=="string"){const g=d.trim();if(/^\d{4}$/.test(g))return g;const H=ie(g);return H.isValid()?H.format("YYYY"):null}if(typeof d=="number"&&Number.isFinite(d)){const g=Math.round(d);if(g>=1900&&g<=2999&&Math.abs(g-Number(d))<1e-6)return String(g);const H=ie(d);return H.isValid()?H.format("YYYY"):null}if(d instanceof Date&&!Number.isNaN(d.getTime()))return ie(d).format("YYYY");const O=ie(d);return O.isValid()?O.format("YYYY"):null}const Ne=(d=!0)=>{var g,H;T.value=!0,d&&(h.page=1),Et({mode:He.PARENT_RECURSIVE_CHILD_DIRECT}).then(de=>{K.company=Object.assign(de,{0:C("common.common")})});const O=Ie();_a(we(ve({},Re()),{companyId:t.companyId,scopeIds:((g=f.value.scope)==null?void 0:g.length)>0?f.value.scope.join(","):void 0,categoryIds:((H=f.value.category)==null?void 0:H.length)>0?f.value.category.join(","):void 0,baseIds:O,searchKeyword:S.value||void 0,sort:N!=null&&N.value?N.value:null,startYear:Ce(t.startYear),endYear:Ce(t.endYear)})).then(de=>{var Y,ge,Te;v.value=((Y=de==null?void 0:de.body)==null?void 0:Y.list)||[],h.page=((ge=de==null?void 0:de.body)==null?void 0:ge.pageNum)||1,h.itemCount=(Te=de==null?void 0:de.body)==null?void 0:Te.total,T.value=!1,te(v.value),le(t)})},ue=(d=!0)=>{var O;(O=s==null?void 0:s.value)==null||O.validate(g=>{g||Ne(d)})};function $(){ue(!0)}const q=()=>{ue(!1)},n=d=>{const O=new Map([["certificateCredit.certificateCredit","certificateCredit"],["certificateCredit.certificateCreditName","certificateCreditName"],["certificateCredit.certificateCreditType","certificateCreditType"],["certificateCredit.availableBalance","availableBalance"],["certificateCredit.updateTime","updateTime"],["certificateCredit.createTime","createTime"]]);Promise.all([Z(d,O)]).then(()=>{ue(!0)})},l=()=>{Object.assign(t,u()),S.value=null,f.value={base:[],scope:[],category:[]},k.value.sort(null),ht(()=>{ue()})},p=()=>{Promise.all(m).finally(()=>{l()})};Qe(()=>{p(),Tt(C("menus.data.allocationToList")),he(C("event.initScreen",{screen:C("menus.data.allocationToList")}))});const J=d=>{h.pageSize=d,ue(!0)};return(d,O)=>{const g=it,H=ct,de=kt,Y=rt,ge=xe,Te=nt;return B(),_e(Ue,null,[W("div",So,[a(ge,{ref_key:"searchFormRef",ref:s,model:t,rules:x,"label-placement":"left","label-width":0,"label-align":"left",class:"search-form-flat"},{default:o(()=>[W("div",Eo,[W("div",bo,[W("div",Co,[a(g,{value:t.companyId,"onUpdate:value":[O[0]||(O[0]=se=>t.companyId=se),re],class:"pill select-company",options:U.company,"render-tag":i(oa),placeholder:d.$t("data.modal.companyId")},null,8,["value","options","render-tag","placeholder"])]),a(de,{path:"enableYear","show-label":!1,class:"tb-field tb-year-form-item-wrap"},{default:o(()=>[W("div",To,[a(H,{value:t.startYear,"onUpdate:value":[O[1]||(O[1]=se=>t.startYear=se),$],class:"pill tb-year-picker",type:"year",actions:["clear","now"],"input-readonly":"",placeholder:d.$t("data.certificateCredit.startYear")},null,8,["value","placeholder"]),vo,a(H,{value:t.endYear,"onUpdate:value":[O[2]||(O[2]=se=>t.endYear=se),$],class:"pill tb-year-picker",type:"year",actions:["clear","now"],"input-readonly":"",placeholder:d.$t("data.certificateCredit.endYear")},null,8,["value","placeholder"])])]),_:1}),W("div",Io,[a(Qa,{selected:f.value,"onUpdate:selected":[O[3]||(O[3]=se=>f.value=se),ce],show:["base","scope","category"],"scope-items":U.scope,"category-items":U.category,"base-tree":i(oe),to:!1,"button-width":"110px","panel-width":500},null,8,["selected","scope-items","category-items","base-tree"])]),W("div",ho,[a(Y,{value:S.value,"onUpdate:value":O[4]||(O[4]=se=>S.value=se),clearable:"",maxlength:"255",class:"pill tb-search-input search-pill",placeholder:d.$t("common.search"),onBlur:$,onKeyup:Jt($,["enter"])},{suffix:o(()=>[a(i(We),{size:"16",class:"search-suffix",onClick:Xt($,["stop"])},{default:o(()=>[a(i(la))]),_:1},8,["onClick"])]),_:1},8,["value","placeholder","onKeyup"])])])]),a(i(et),{wrap:"",class:"tag-row"},{default:o(()=>[(B(!0),_e(Ue,null,pt(i(e),se=>(B(),Q(i(ya),{key:se.key,round:"",closable:"",bordered:!1,class:"chip-tag",color:{color:"#E8F1FB",textColor:"#004386"},onClose:Fe=>A(se.cat,se.id)},{default:o(()=>[a(i(Aa),{style:{"max-width":"160px"}},{default:o(()=>[b(ee(se.text),1)]),_:2},1024)]),_:2},1032,["onClose"]))),128))]),_:1})]),_:1},8,["model"])]),a(Te,{ref_key:"dataTableRef",ref:k,"row-key":P,remote:"",columns:i(Oe)().companyId.value>0&&i(_).validate(i($e))?I:I.slice(1),data:v.value,loading:T.value,pagination:i(h),bordered:!1,"flex-height":"",style:{height:"100vh"},"onUpdate:page":q,"onUpdate:pageSize":J,"onUpdate:sorter":n},null,8,["columns","data","loading","pagination"])],64)}}});var No=Le(Ro,[["__scopeId","data-v-5a92da2b"]]);const Oo=ke({name:"referenceModal",props:{visible:{type:Boolean,default:!1},params:{type:Object,default:()=>{}}},emits:["handleCloseReferenceModal","handlePassEmissionFactorItemValue"],setup(D,{emit:G}){const C=D,{t:_}=Ve(),c=Lt(),y=Rt(),k=Me({get:()=>C.visible,set:I=>{G("handleCloseReferenceModal",I)}}),N=()=>({companyId:null,resourceId:null,emissionName:null,deleteFlg:"0",gasType:null,gasId:1}),Z=j({emissionFactor:null}),f=j(N()),U=L(null),{orderBy:K,sorterChange:u}=bt(),t=j({company:[],gasType:[],deleteFlg:[{label:_("data.deleteFlg_0"),value:"0"},{label:_("data.deleteFlg_1"),value:"2"}],data_properties:[]}),S=j({resource:{},company:{},energyType:{}});Xe({dict:["data_properties"],gasType:null}).then(I=>{Object.assign(t,...I[0],{gasType:I[1]});const{gasType:s,data_properties:x}=t;Object.assign(S,De({gasType:mt(s).map(T=>(T.value=`${T.value}`.split(".").pop(),T)),data_properties:x})),t.gasType.length>0&&(f.gasId=A(t.gasType[0]))});const F=ao(f,S),M=j({list:[]}),oe=I=>I.emissionFactor.id,z={search(){P(!0)},close(){Object.assign(f,N()),U.value.sort(null),P(!0)},handleSelect(I,s){if(I.length>0){M.list=[I[I.length-1]];
1const x=s[s.length-1].gasEmissionFactor,T=s[s.length-1].emissionFactor.activityVolumeUnit;Object.keys(Z).forEach(h=>Z[h]=null),Object.assign(Z,{emissionFactor:x}),T&&Object.assign(Z,{activityVolumeUnit:T})}else M.list=[]},handleItemNameReference(){!M.list||M.list.length<=0?y.error({title:_("message.errorTitle"),content:_("message.select",[_("data.emissionFactor.msgParamEmissionFactor")]),positiveText:_("common.foot.confirm")}):(G("handlePassEmissionFactorItemValue",Z),G("handleCloseReferenceModal",!1))},cancel(){G("handleCloseReferenceModal",!1)}},e=async()=>{Object.assign(f,{activityVolumeUnit:C.params.activityVolumeUnit}),await Promise.all([Et({mode:He.PARENT_RECURSIVE_CHILD_DIRECT}).then(I=>{S.company=Object.assign(I,{0:_("common.common")})}),qt({mode:He.PARENT_RECURSIVE_CHILD_DIRECT}).then(I=>{const s=(I==null?void 0:I.body)||[];Object.assign(S,De({resource:jt(s)}))})]),t.gasType.length>0&&(f.gasId=A(t.gasType[0])),await P(!0)},A=I=>I.children&&I.children.length>0?A(I.children[0]):I.value,m=()=>{M.list=[],Object.assign(f,N()),le.data=[],v.itemCount=0},{pagination:v,pageParams:E}=Ut(f),P=I=>{le.loading=!0,I==!0&&(v.page=1),Et({mode:He.PARENT_RECURSIVE_CHILD_DIRECT}).then(s=>{S.company=Object.assign(s,{0:_("common.common")})}),qt({mode:He.PARENT_RECURSIVE_CHILD_DIRECT}).then(s=>{const x=(s==null?void 0:s.body)||[];Object.assign(S,De({resource:jt(x)}))}),Ea(ve(we(ve({},E()),{sort:K!=null&&K.value?K.value:null}),f)).then(s=>{var x,T,h;le.data=((x=s==null?void 0:s.body)==null?void 0:x.list)||[],v.page=((T=s==null?void 0:s.body)==null?void 0:T.pageNum)||1,v.itemCount=(h=s==null?void 0:s.body)==null?void 0:h.total,le.loading=!1})},w=()=>{c.close()},te=L(null),le=j({columns:[{type:"selection",width:40,fixed:"left"},{title:_("data.emissionfactor.company"),key:"companyId",align:"left",width:230,ellipsis:{tooltip:!0},minWidth:60,sorter:"default",resizable:!0,render:I=>{var s,x;return((x=S.company)==null?void 0:x[(s=I.emissionFactor)==null?void 0:s.companyId])||""}},{title:_("data.efResource.name"),key:"emissionFactor.resourceId",align:"left",ellipsis:{tooltip:!0},minWidth:60,sorter:"default",resizable:!0,width:160,render:I=>{var s,x;return((x=S.resource)==null?void 0:x[(s=I.emissionFactor)==null?void 0:s.resourceId])||""}},{title:_("data.emissionfactor.name"),key:"emissionFactor.emissionName",align:"left",width:300,ellipsis:{tooltip:!0},minWidth:60,sorter:"default",resizable:!0,render:I=>Ee(fe,{text:!0,tag:"a",type:"primary",onClick:async()=>{te.value=I,c.open()}},()=>I.emissionFactor.emissionName)},{title:_("data.modal.activityVolumeUnit"),key:"emissionFactor.activityVolumeUnit",align:"left",width:100,minWidth:60,resizable:!0},{title:_("data.modal.gasId"),key:"gasName",align:"left",width:250,ellipsis:{tooltip:!0},minWidth:60,resizable:!0,render:I=>{var s,x;return(x=(s=I==null?void 0:I.gasEmissionFactors)==null?void 0:s.map(T=>{var h;return(h=S.gasType)==null?void 0:h[T.gasId]}))==null?void 0:x.join("/")}},{title:_("data.emissionFactor.emissionFactor"),key:"gasEmissionFactor",align:"left",ellipsis:{tooltip:!0},width:180,minWidth:60,sorter:"default",resizable:!0}],data:[],loading:!1}),re=I=>{v.pageSize=I,P(!0)},ce=I=>{const s=new Map([["emissionFactor.resourceId","resourceId"],["emissionFactor.emissionName","emissionName"],["gasEmissionFactor","emissionFactor"]]);Promise.all([u(I,s)]).then(()=>{P(!0)})};return(I,s)=>{const x=to,T=Dt,h=rt,Re=ia,Ie=et,Ce=tt,Ne=Ze,ue=xe,$=nt;return B(),_e(Ue,null,[a(Be,{id:Be.uuid(),show:i(k),"onUpdate:show":s[7]||(s[7]=q=>gt(k)?k.value=q:null),class:"fixed-main-container",preset:"card",title:I.$t("data.modal.title_reference"),"auto-focus":!1,"mask-closable":!1,style:{width:"1200px",height:"750px","min-width":"800px"},"transform-origin":"center",onAfterEnter:e,onAfterLeave:m},{footer:o(()=>[a(Ie,{style:{"justify-content":"flex-end"}},{default:o(()=>[a(i(fe),{type:"primary",ghost:"",onClick:s[6]||(s[6]=q=>z.cancel(I.flag))},{default:o(()=>[b(ee(I.$t("common.close")),1)]),_:1}),a(i(fe),{type:"primary",onClick:z.handleItemNameReference},{default:o(()=>[b(ee(I.$t("common.itemNameReferenceBtn")),1)]),_:1},8,["onClick"])]),_:1})]),default:o(()=>[a(ue,{ref:"editRef",inline:"",model:f,"label-align":"left","label-placement":"left","label-width":"120px"},{default:o(()=>[a(Ne,{"x-gap":"30",cols:"12 1024:18"},{default:o(()=>[a(T,{span:6,label:I.$t("data.modal.companyId"),"label-placement":"left",path:"companyId"},{default:o(()=>[a(x,wt({value:f.companyId,"onUpdate:value":s[0]||(s[0]=q=>f.companyId=q)},i(F).company,{"page-flag":!1,filterable:""}),null,16,["value"])]),_:1},8,["label"]),a(T,{span:6,label:I.$t("data.efAvailable.modal.editModal.table.source")},{default:o(()=>[a(x,wt({value:f.resourceId,"onUpdate:value":s[1]||(s[1]=q=>f.resourceId=q)},i(F).resource,{"page-flag":!1,filterable:""}),null,16,["value"])]),_:1},8,["label"]),ze(a(T,{span:6,label:I.$t("data.modal.dataProperties")},{default:o(()=>
1[a(x,wt(i(F).energyType,{"page-flag":!1,filterable:"",clearable:""}),null,16)]),_:1},8,["label"]),[[je,!1]]),a(T,{span:6,label:I.$t("data.efAvailable.modal.editModal.table.unitName")},{default:o(()=>[a(h,{value:f.emissionName,"onUpdate:value":s[2]||(s[2]=q=>f.emissionName=q)},null,8,["value"])]),_:1},8,["label"]),a(T,{span:6,label:I.$t("data.modal.gasName")},{default:o(()=>[a(Re,{value:f.gasId,"onUpdate:value":s[3]||(s[3]=q=>f.gasId=q),"expand-trigger":"click",options:t.gasType,"check-strategy":"child","render-label":i(Sa),"show-path":"",disabled:"",clearable:""},null,8,["value","options","render-label"])]),_:1},8,["label"]),a(Ce,{span:12},{default:o(()=>[a(Ie,{justify:"end"},{default:o(()=>[a(i(fe),{type:"primary",onClick:s[4]||(s[4]=q=>z.search())},{default:o(()=>[b(ee(I.$t("data.efAvailable.modal.search")),1)]),_:1}),a(i(fe),{type:"primary",class:"border btn-color",ghost:"",onClick:s[5]||(s[5]=q=>z.close())},{default:o(()=>[b(ee(I.$t("data.efAvailable.modal.clear")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),a($,{ref_key:"dataTableRef",ref:U,remote:"","checked-row-keys":M.list,columns:le.columns,data:le.data,pagination:i(v),"scroll-x":"","flex-height":"",class:"hidden-all-selection",style:{height:"550px"},loading:le.loading,"row-key":oe,"onUpdate:checkedRowKeys":z.handleSelect,"onUpdate:page":P,"onUpdate:pageSize":re,"onUpdate:sorter":ce},null,8,["checked-row-keys","columns","data","pagination","loading","onUpdate:checkedRowKeys"])]),_:1},8,["id","show","title"]),a(oo,{ref:"detailFormRef",data:te.value,visible:i(c).visibleRef.value,onHandleCloseDetail:w},null,8,["data","visible"])],64)}}});var Uo=Le(Oo,[["__scopeId","data-v-507c5058"]]);const Do=b("kWh"),Vo=b("t-CO\u2082e/kWh"),wo={class:"step"},Bo={class:"header"},Mo=["innerHTML"],Lo=b("kWh"),ko=b("kl"),Fo=b("MWh"),Po=b("GJ"),Ko=b("t-CO\u2082e"),Go=b("kWh"),Yo=b("GJ"),$o=b("t-CO\u2082e"),xo=ke({name:"SaveForm",props:{data:{type:Object,required:!1,default:()=>null}},setup(D,{expose:G}){const C=D,{t:_}=Ve(),c=lt();Ft(null);const y=e=>{const A=e.replace(/,/g,"").trim();return/^\d+(\.(\d+)?)?$/.test(A)?Number(A):A===""?null:Number.NaN},k=e=>e===null?"":Number(e).toLocaleString("en-US"),N="max-width: 400px;background-color: #30669c;color: #fff;border-radius: 10px;padding: 15px 20px;font-size: 12px;line-height: 20px;",Z=()=>({certificateCredit:{id:null,companyId:Oe().companyId.value,deleteFlg:0,certificateCredit:0,certificateCreditType:0,mukoukaId:null,certificateCreditName:null,purchaseDate:ie(new Date,"YYYYMMDD").valueOf(),certificateNumber:null,expirationDate:ie(new Date,"YYYYMMDD").valueOf(),confirmedForUseKwh:null,offsetCalculation:null,availableBalance:0,creditAuthorizationNumber:null,creditIdentificationNumber:null,shoueneVolumeKl:null,saieneVolumeMwh:null,saieneVolumeGj:null,suryoTco2e:null,hikasekiVolumeKwh:null,hikasekiVolumeGj:null,updateTime:null,createTime:null,createUserId:null}}),f=j(Z()),U=Me(()=>{const{confirmedForUseKwh:e,suryoTco2e:A}=f.certificateCredit,m=Number(e)||0,v=Number(A)||0;return f.certificateCredit.certificateCredit===0?Math.max(0,m):Math.max(0,v)}),K={certificateCredit:{certificateCreditName:[{required:!0,trigger:["blur","input"],validator:(e,A,m)=>{A==null||A==""?f.certificateCredit.certificateCredit===0?m(new Error(_("message.input",[_("data.certificateCredit.certificateName")]))):f.certificateCredit.certificateCredit===1&&m(new Error(_("message.input",[_("data.certificateCredit.creditName")]))):m()}}],certificateCreditType:[{required:!0,message:_("message.select",[_("data.certificateCredit.certificateCreditType")])}],mukoukaId:[{required:!0,trigger:["change","input","blur"],type:"number",message:_("message.select",[_("data.certificateCredit.mukoukaId")])}],purchaseDate:[{type:"number",required:!0,trigger:["change","input","blur"],message:_("data.certificateCredit.purchaseDate")}],certificateNumber:[{required:!0,trigger:["blur","change"],message:_("message.rule",{msg:_("data.certificateCredit.certificateNumber")})}],expirationDate:[{type:"number",required:!0,trigger:["change","input","blur"],message:_("data.certificateCredit.expirationDate")},{type:"number",required:!0,trigger:["input","blur"],validator(e,A,m){ie(f.certificateCredit.expirationDate).isBefore(ie(f.certificateCredit.purchaseDate))?m(new Error(_("message.CMPF0043-W",[_("data.certificateCredit.expirationDate")]))):m()}}],confirmedForUseKwh:[{type:"number",required:!0,trigger:["blur","change"],validator:(e,A,m)=>{A==null||A==""?m(new Error(_("message.input",[_("data.certificateCredit.confirmedForUseKwh")]))):A<0?m(new Error(_("message.CMPF0192-E",[_("data.certificateCredit.confirmedForUseKwh")]))):m()}}],offsetCalculation:[{type:"number",required:!0,trigger:["blur","change"],validator:(e,A,m)=>{A==null||A==""?m(new Error(_("message.input",[_("data.certificateCredit.offsetFactor")]))):A<=0?m(new Error(_("message.CMPF0192-E",[_("data.certificateCredit.offsetFactor")]))):m()}}],creditAuthorizationNumber:[{required:!0,trigger:["blur","change"],message:_("message.rule",{msg:_("data.certificateCredit.creditAuthorizationNumber")})}],creditIdentificationNumber:[{required:!0,trigger:["blur","change"],message:_("message.rule",{msg:_("data.certificateCredit.creditIdentificationNumber")})}],shoueneVolumeKl:[{type:"number",required:!0,trigger:["blur","input"],validator:(e,A,m)=>{A==null||A==""?m(new Error(_("message.input",[_("data.certificateCredit.shoueneVolumeKl")]))):A<=0?m(new Error(_("message.CMPF0192-E",[_("data.certificateCredit.shoueneVolumeKl")]))):m()}}],saieneVolumeMwh:[{type:"number",required:!0,trigger:["blur","input"],validator:(e,A,m)=>{A==null||A==""?m(new Error(_("message.input",[_("data.certificateCredit.saieneVolumeMwh")]))):A<=0?m(new Error(_("message.CMPF0192-E",[_("data.certificateCredit.saieneVolumeMwh")]))):m()}}],saieneVolumeGj:[{type:"number",required:!0,trigger:["blur","input"],validator:(e,A,m)=>{A==null||A==""?m(new Error(_("message.input",[_("data.certificateCredit.saieneVolumeGj")]))):A<=0?m(new Error(_("message.CMPF0192-E",[_("data.certificateCredit.saieneVolumeGj")]))):m()}}],suryoTco2e:[{type:"number",required:!0,trigger:["blur","input"],validator:(e,A,m)=>{A==null||A==""?m(new Error(_("message.input",[_("data.certificateCredit.suryoTco2e")]))):A<=0?m(new Error(_("message.CMPF0192-E",[_("data.certificateCredit.suryoTco2e")]))):m()}}
1],hikasekiVolumeKwh:[{type:"number",required:!0,trigger:["blur","input"],validator:(e,A,m)=>{A==null||A==""?m(new Error(_("message.input",[_("data.certificateCredit.hikasekiVolumeKwh")]))):A<=0?m(new Error(_("message.CMPF0192-E",[_("data.certificateCredit.hikasekiVolumeKwh")]))):m()}}],hikasekiVolumeGj:[{type:"number",required:!0,trigger:["blur","input"],validator:(e,A,m)=>{A==null||A==""?m(new Error(_("message.input",[_("data.certificateCredit.hikasekiVolumeGj")]))):A<=0?m(new Error(_("message.CMPF0192-E",[_("data.certificateCredit.hikasekiVolumeGj")]))):m()}}]}},u=j({company:[],certificate_credit:[],certificate_type:[],credit_type:[],mukouka_type:[]});Xe({dict:["certificate_credit","certificate_type","credit_type","mukouka_type"]},e=>[e]).then(e=>{Object.assign(u,...e[0])});const t=e=>{const A=f.certificateCredit.id,m=f.certificateCredit.updateTime,v=f.certificateCredit.createTime,E=f.certificateCredit.createUserId;Object.assign(f,Z()),f.certificateCredit.certificateCredit=e,f.certificateCredit.id=A,f.certificateCredit.updateTime=m,f.certificateCredit.createUserId=E,f.certificateCredit.createTime=v,e===1?f.certificateCredit.expirationDate=null:f.certificateCredit.expirationDate=ie(new Date,"YYYYMMDD").valueOf()};X(()=>C.data,e=>{e&&Object.assign(f,JSON.parse(JSON.stringify(e)))},{immediate:!0});const S=L(null);G({save:e=>{S.value.validate(A=>{A||c.edit(()=>ba(f)).then(e)})}});const F=j({visible:!1}),M=e=>{F.visible=e},oe=e=>{f.certificateCredit.offsetCalculation=e.emissionFactor},z={emissionFactorReference(){F.visible=!0}};return(e,A)=>{const m=it,v=Dt,E=rt,P=ct,w=xe,te=Ze,le=Pt,re=Qt,ce=eo,I=fe,s=At,x=Nt;return B(),_e(Ue,null,[a(w,{ref_key:"formRef",ref:S,model:f,rules:K,class:"inherit-flex","label-placement":"left","label-align":"left","label-width":"140px"},{default:o(()=>[a(x,{style:{"overflow-y":"auto"}},{default:o(()=>[a(te,{"x-gap":30,style:{"overflow-y":"auto"}},{default:o(()=>[a(v,{span:12,label:e.$t("data.certificateCredit.certificateCredit"),path:"certificateCredit.certificateCredit"},{default:o(()=>[a(m,{value:f.certificateCredit.certificateCredit,"onUpdate:value":[A[0]||(A[0]=T=>f.certificateCredit.certificateCredit=T),t],options:u.certificate_credit},null,8,["value","options"])]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.certificateCreditType"),path:"certificateCredit.certificateCreditType"},{default:o(()=>[a(m,{value:f.certificateCredit.certificateCreditType,"onUpdate:value":A[1]||(A[1]=T=>f.certificateCredit.certificateCreditType=T),options:f.certificateCredit.certificateCredit===0?u.certificate_type:u.credit_type},null,8,["value","options"])]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.mukoukaId"),path:"certificateCredit.mukoukaId"},{default:o(()=>[a(m,{value:f.certificateCredit.mukoukaId,"onUpdate:value":A[2]||(A[2]=T=>f.certificateCredit.mukoukaId=T),filterable:"",options:u.mukouka_type},null,8,["value","options"])]),_:1},8,["label"]),f.certificateCredit.certificateCredit===0?(B(),Q(v,{key:0,span:12,required:!0,label:e.$t("data.certificateCredit.certificateName"),path:"certificateCredit.certificateCreditName"},{default:o(()=>[a(E,{value:f.certificateCredit.certificateCreditName,"onUpdate:value":A[3]||(A[3]=T=>f.certificateCredit.certificateCreditName=T),class:"content",maxlength:"255",clearable:""},null,8,["value"])]),_:1},8,["label"])):ae("",!0),f.certificateCredit.certificateCredit===1?(B(),Q(v,{key:1,span:12,required:!0,label:e.$t("data.certificateCredit.creditName"),path:"certificateCredit.certificateCreditName"},{default:o(()=>[a(E,{value:f.certificateCredit.certificateCreditName,"onUpdate:value":A[4]||(A[4]=T=>f.certificateCredit.certificateCreditName=T),class:"content",maxlength:"255",clearable:""},null,8,["value"])]),_:1},8,["label"])):ae("",!0),a(v,{span:13,required:!0,label:e.$t("data.certificateCredit.purchaseDate"),path:"certificateCredit.purchaseDate"},{default:o(()=>[a(w,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(P,{value:f.certificateCredit.purchaseDate,"onUpdate:value":A[5]||(A[5]=T=>f.certificateCredit.purchaseDate=T),"value-format":"yyyy-MM-dd",type:"date",actions:["now"],"input-readonly":"","update-value-on-close":!0,placeholder:e.$t("common.select")},null,8,["value","placeholder"])]),_:1})]),_:1},8,["label"])]),_:1}),a(le),f.certificateCredit.certificateCredit===0?(B(),Q(te,{key:0,"x-gap":30,"y-gap":20,style:{"overflow-y":"auto"}},{default:o(()=>[a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.certificateNumber"),path:"certificateCredit.certificateNumber"},{default:o(()=>[a(E,{value:f.certificateCredit.certificateNumber,"onUpdate:value":A[6]||(A[6]=T=>f.certificateCredit.certificateNumber=T),type:"text",maxlength:i(ut)},null,8,["value","maxlength"])]),_:1},8,["label"]),a(v,{span:13,required:!0,label:e.$t("data.certificateCredit.expirationDate"),path:"certificateCredit.expirationDate"},{default:o(()=>[a(w,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(P,{value:f.certificateCredit.expirationDate,"onUpdate:value":A[7]||(A[7]=T=>f.certificateCredit.expirationDate=T),"value-format":"yyyy-MM-dd",type:"date",actions:["now"],"input-readonly":"","update-value-on-close":!0,placeholder:e.$t("common.select")},null,8,["value","placeholder"])]),_:1})]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.confirmedForUseKwh"),path:"certificateCredit.confirmedForUseKwh"},{default:o(()=>[a(re,{value:f.certificateCredit.confirmedForUseKwh,"onUpdate:value":A[8]||(A[8]=T=>f.certificateCredit.confirmedForUseKwh=T),style:{width:"100%"},parse:y,format:k},{suffix:o(()=>[Do]),_:1},8,["value"])]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.offsetFactor"),path:"certificateCredit.offsetCalculation"},{default:o(()=>[a(ce,{value:f.certificateCredit.offsetCalculation,"onUpdate:value":A[9]||(A[9]=T=>f.certificateCredit.offsetCalculation=T),style:{width:"100%"},min:"0"},{suffix:o(()=>[Vo]),_:1},8,["value"]),a(s,{placement:"right","arrow-style":{backgroundColor:"#30669c"},style:N,trigger:"hover"},{trigger:o(()=>[a(I,{type:"primary",style:{"margin-left":"10px"},onClick:z.emissionFactorReference},{default:o(()=>[b(ee(e.$t("common.emissionFactorReferenceBtn")),1)]),_:1},8,["onClick"])]),default:o(()=>
1[W("div",wo,[W("article",null,[W("header",Bo,ee(e.$t("guide.main.steps[47].title")),1),W("div",{innerHTML:e.$t("guide.main.steps[47].description")},null,8,Mo)])])]),_:1})]),_:1},8,["label"]),a(v,{span:12,label:e.$t("data.certificateCredit.availableBalance")},{default:o(()=>[a(re,{value:i(U),"onUpdate:value":A[10]||(A[10]=T=>gt(U)?U.value=T:null),style:{width:"100%"},parse:y,format:k,disabled:""},{suffix:o(()=>[Lo]),_:1},8,["value"])]),_:1},8,["label"])]),_:1})):ae("",!0),f.certificateCredit.certificateCredit===1?(B(),Q(te,{key:1,"x-gap":30,style:{"overflow-y":"auto"}},{default:o(()=>[a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.creditAuthorizationNumber"),path:"certificateCredit.creditAuthorizationNumber"},{default:o(()=>[a(E,{value:f.certificateCredit.creditAuthorizationNumber,"onUpdate:value":A[11]||(A[11]=T=>f.certificateCredit.creditAuthorizationNumber=T),maxlength:i(ut)},null,8,["value","maxlength"])]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.creditIdentificationNumber"),path:"certificateCredit.creditIdentificationNumber"},{default:o(()=>[a(E,{value:f.certificateCredit.creditIdentificationNumber,"onUpdate:value":A[12]||(A[12]=T=>f.certificateCredit.creditIdentificationNumber=T),type:"text",maxlength:i(ut)},null,8,["value","maxlength"])]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.shoueneVolumeKl"),path:"certificateCredit.shoueneVolumeKl"},{default:o(()=>[a(ce,{value:f.certificateCredit.shoueneVolumeKl,"onUpdate:value":A[13]||(A[13]=T=>f.certificateCredit.shoueneVolumeKl=T),style:{width:"100%"}},{suffix:o(()=>[ko]),_:1},8,["value"])]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.saieneVolumeMwh"),path:"certificateCredit.saieneVolumeMwh"},{default:o(()=>[a(ce,{value:f.certificateCredit.saieneVolumeMwh,"onUpdate:value":A[14]||(A[14]=T=>f.certificateCredit.saieneVolumeMwh=T),style:{width:"100%"}},{suffix:o(()=>[Fo]),_:1},8,["value"])]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.saieneVolumeGj"),path:"certificateCredit.saieneVolumeGj"},{default:o(()=>[a(ce,{value:f.certificateCredit.saieneVolumeGj,"onUpdate:value":A[15]||(A[15]=T=>f.certificateCredit.saieneVolumeGj=T),style:{width:"100%"}},{suffix:o(()=>[Po]),_:1},8,["value"])]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.suryoTco2e"),path:"certificateCredit.suryoTco2e"},{default:o(()=>[a(re,{value:f.certificateCredit.suryoTco2e,"onUpdate:value":A[16]||(A[16]=T=>f.certificateCredit.suryoTco2e=T),style:{width:"100%"},parse:y,format:k},{suffix:o(()=>[Ko]),_:1},8,["value"])]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.hikasekiVolumeKwh"),path:"certificateCredit.hikasekiVolumeKwh"},{default:o(()=>[a(ce,{value:f.certificateCredit.hikasekiVolumeKwh,"onUpdate:value":A[17]||(A[17]=T=>f.certificateCredit.hikasekiVolumeKwh=T),style:{width:"100%"}},{suffix:o(()=>[Go]),_:1},8,["value"])]),_:1},8,["label"]),a(v,{span:12,required:!0,label:e.$t("data.certificateCredit.hikasekiVolumeGj"),path:"certificateCredit.hikasekiVolumeGj"},{default:o(()=>[a(ce,{value:f.certificateCredit.hikasekiVolumeGj,"onUpdate:value":A[18]||(A[18]=T=>f.certificateCredit.hikasekiVolumeGj=T),style:{width:"100%"}},{suffix:o(()=>[Yo]),_:1},8,["value"])]),_:1},8,["label"]),a(v,{span:12,label:e.$t("data.certificateCredit.availableBalance")},{default:o(()=>[a(re,{value:i(U),"onUpdate:value":A[19]||(A[19]=T=>gt(U)?U.value=T:null),style:{width:"100%"},parse:y,format:k,disabled:""},{suffix:o(()=>[$o]),_:1},8,["value"])]),_:1},8,["label"])]),_:1})):ae("",!0)]),_:1})]),_:1},8,["model"]),a(Uo,{params:f,visible:F.visible,onHandleCloseReferenceModal:M,onHandlePassEmissionFactorItemValue:oe},null,8,["params","visible"])],64)}}});var zo=Le(xo,[["__scopeId","data-v-04955a62"]]);const jo={key:0},Wo={style:{color:"#d03300"}},Ho={key:1},Zo={style:{color:"#d03300"}},qo=ke({name:"fileModal",props:{visible:{type:Boolean,default:!1},params:{type:Object,default:()=>{}}},emits:["handleCloseEditModal"],setup(D,{emit:G}){const C=D,_=L(!1),c=ot(),{t:y}=Ve(),k=Rt(),N=Ca();lt();const Z=Me({get:()=>C.visible,set:m=>{G("handleCloseEditModal",m)}}),f=j({loading:!1,alert:!1,errorList:[],count:null,hiddenColume:!1}),U=j({companyId:null,id:null,certificateCreditName:null}),K=L([]),u=j({countNum:0,totalUploadSize:0}),t={uploadFile(){K.value.length=0,f.alert=!1,f.errorList.length=0,_.value=!0,u.countNum=0,u.totalUploadSize=0},closeUpload(){_.value=!1,u.countNum=0,u.totalUploadSize=0}
1,changeFile(){f.alert=!1},onRemove(m){u.countNum=u.countNum-1,u.totalUploadSize=u.totalUploadSize-m.file.file.size},beforeUpload(m){let v=52428800,E=10;const P=e.data.reduce((w,te)=>w+te.fileSize,0);return u.countNum=u.countNum+1,u.totalUploadSize=u.totalUploadSize+m.file.file.size,m.file.file.size===0?(u.countNum=u.countNum-1,u.totalUploadSize=u.totalUploadSize-m.file.file.size,N.warning(y("data.inputNew.file.zeroSize"),{duration:2e3}),!1):P+u.totalUploadSize>v?(u.countNum=u.countNum-1,u.totalUploadSize=u.totalUploadSize-m.file.file.size,N.warning(y("message.CMPF0106-E"),{duration:2e3}),!1):e.data.length+u.countNum>E?(u.countNum=u.countNum-1,u.totalUploadSize=u.totalUploadSize-m.file.file.size,N.warning(y("message.CMPF0107-E"),{duration:2e3}),!1):e.data.some(w=>w.fileName===m.file.name)||K.value.some(w=>w.name===m.file.name)?(u.countNum=u.countNum-1,u.totalUploadSize=u.totalUploadSize-m.file.file.size,N.warning(y("message.CMPF0117-E",[m.file.name]),{duration:2e3}),!1):!0},submitUpload(){if(K.value.length){let m=new FormData;K.value.forEach(E=>{m.append("files",E.file)}),m.append("companyId",U.companyId),m.append("id",U.id);const v=k.create({title:y("message.confirmTitle"),content:y("message.uploadConfirm"),positiveText:"OK",negativeText:y("common.cancel"),negativeButtonProps:{type:"primary"},icon:()=>Ee(We,null,()=>Ee(Wt)),maskClosable:!1,closable:!1,onPositiveClick:async()=>(v.loading=!0,v.positiveButtonProps={disabled:!0},new Promise((E,P)=>Kt.post("/certificateCreditView/file/batchUpload",m).then(w=>{var te,le,re,ce,I;v.loading=!1,w&&((te=w==null?void 0:w.code)==null?void 0:te.value)===200?(_.value=!1,k.destroyAll(),N.success(y("common.uploadSuccess")),u.countNum=0,u.totalUploadSize=0,z(!0)):(k.error({title:y("message.errorTitle"),content:y("message.fileUploadFail"),negativeButtonProps:{type:"primary"},positiveText:"OK",closeOnEsc:!1,maskClosable:!1,onPositiveClick:async()=>{k.destroyAll()}}),K.value.length=0,f.alert=!0,f.errorList=(re=(le=w==null?void 0:w.body)==null?void 0:le.capturedExceptions)!=null?re:[],f.count=(ce=w==null?void 0:w.body)==null?void 0:ce.exceptionTotal,f.hiddenColume=(I=w==null?void 0:w.body)==null?void 0:I.hiddenColume)}).catch(w=>{v.loading=!1,P(w)}).finally(()=>{v.loading=!1,he(y("event.RemarksFileUpload",{screen:y("menus.data.certificateCreditList")+y("data.certificateCredit.certificateCreditList")}),{method:"RemarksFileUpload",screen_name:y("menus.data.certificateCreditList")+y("data.certificateCredit.certificateCreditList")})})))})}else N.warning(y("data.inputNew.file.mustUpload"))}};j({company:{}}),L(!1);const{handleSorterChange:S}=Ra(U),F=m=>{S(m)},M=()=>{C.params&&(U.companyId=C.params.companyId,U.id=C.params.id,U.certificateCreditName=C.params.certificateCreditName),z(!0)},oe=()=>{U.companyId=null,U.id=null,U.certificateCreditName=null,e.data=[]},z=m=>{e.loading=!0;let v={companyId:U.companyId,id:U.id,language:be()};ha(v).then(E=>{e.data=E.body||[]}).finally(()=>{e.loading=!1})},e=j({columns:[{title:y("data.efAvailable.modal.fileModal.fileName"),key:"fileName",align:"left",ellipsis:{tooltip:!0},minWidth:60,width:330,render:m=>Ee(At,{},{trigger:()=>Ee(fe,{text:!0,tag:"a",type:"primary",onClick:async()=>{A(m.fileId,m.fileName)}},()=>m==null?void 0:m.fileName),default:()=>m==null?void 0:m.fileName})},{title:y("data.efAvailable.modal.fileModal.createTime"),key:"createTime",align:"center",ellipsis:{tooltip:!0},minWidth:60,width:200,sorter:"default",render:m=>ie(m.createTime).format("YYYY-MM-DD HH:mm:ss")},{title:y("data.efAvailable.modal.fileModal.fileSize"),key:"fileSize",align:"right",ellipsis:{tooltip:!0},width:130,minWidth:60,render:({fileSize:m})=>{if(!m)return"";const v=m/1024;return v<1024?`${v.toFixed(1)} KB`:`${(v/1024).toFixed(1)} MB`}},{title:y("data.efAvailable.table.action"),align:"center",ellipsis:{tooltip:!0},width:80,minWidth:40,render:m=>Yt(...c.validate($e)?[Ee(At,{},{trigger:()=>Ee(fe,{circle:!0,size:"small",color:"#d03050",type:"error",onClick:async()=>{let v={fileId:m.fileId};Ta(v,"certificateCreditView/file/delete?fileId="+m.fileId,{dialog:k,message:N,t:y}).finally(()=>{z(!0),he(y("event.RemarksFileDelete",{screen:y("menus.data.certificateCreditList")+y("data.certificateCredit.certificateCreditList")}),{method:"RemarksFileDelete",screen_name:y("menus.data.certificateCreditList")+y("data.certificateCredit.certificateCreditList")})})}},{icon:()=>Ee(We,null,()=>Ee(va))}),default:()=>y("common.delete")})]:[])}],data:[],loading:!1});function A(m,v){const E={fileId:m},P=L(!1),w=k.create({title:y("message.confirmTitle"),content:y("message.downloadFileConfirm"),positiveText:"OK",negativeText:y("common.cancel"),negativeButtonProps:{type:"primary"},icon:()=>Ee(We,null,()=>Ee(Wt)),maskClosable:!1,onPositiveClick:async()=>(w.loading=!0,w.positiveButtonProps={disabled:!0}
1,lo.ajax({url:"/api/certificateCreditView/file/download",type:"GET",headers:{lang:be(),Authorization:`Bearer ${Ia.config.globalProperties.$keycloak.token}`},data:E,contentType:"application/json;charset=utf-8",dataType:"binary",xhrFields:{responseType:"blob"},success:function(te,le,re){if(re.getResponseHeader("content-type")==="application/json;charset=utf-8")k.error({title:y("message.errorTitle"),content:y("message.CMPF0146-E"),positiveText:"OK",closeOnEsc:!1,maskClosable:!1,onPositiveClick:async()=>{k.destroyAll()}});else{const ce=(window.URL||window.webkitURL).createObjectURL(te),I=document.createElement("a");I.href=ce,I.download=v,document.body.appendChild(I),I.click(),setTimeout(function(){URL.revokeObjectURL(ce),I.remove()},1e4),N.success(y("message.fileDownloadSuccess"))}P.value=!0},error:function(te,le,re){decodeURIComponent(te.getResponseHeader("errorInfo")),P.value=!0,k.error({title:y("message.errorTitle"),content:y("message.errorContent"),positiveText:"OK",closeOnEsc:!1,maskClosable:!1,onPositiveClick:async()=>{k.destroyAll()}})}}),he(y("event.RemarksFileDownload",{screen:y("menus.data.certificateCreditList")+y("data.certificateCredit.certificateCreditList")}),{method:"RemarksFileDownload",screen_name:y("menus.data.certificateCreditList")+y("data.certificateCredit.certificateCreditList")}),!1)});X(P,te=>{te&&k.destroyAll()})}return(m,v)=>{const E=ro,P=tt,w=et,te=Ze,le=xe,re=nt,ce=no,I=Nt,s=co,x=Ot;return B(),_e(Ue,null,[a(Be,{id:Be.uuid(),show:i(Z),"onUpdate:show":v[0]||(v[0]=T=>gt(Z)?Z.value=T:null),class:"fixed-main-container",preset:"card",title:m.$t("data.efAvailable.modal.fileModal.title"),"auto-focus":!1,"mask-closable":!1,style:{width:"800px",height:"600px","min-width":"800px"},"transform-origin":"center",onAfterEnter:M,onAfterLeave:oe},{default:o(()=>[a(le,{ref:"editRef",inline:"",model:U,"label-align":"left","label-placement":"left","label-width":"120px"},{default:o(()=>[a(te,{"x-gap":"12",cols:"10 1024:10 1368:10"},{default:o(()=>[a(P,{span:"5 1024:5 1368:5"},{default:o(()=>[a(E,{style:{"font-size":"15px"}},{default:o(()=>[b(ee(m.$t("data.certificateCredit.certificateCreditName"))+" : "+ee(U.certificateCreditName),1)]),_:1})]),_:1}),a(P,{span:"5 1024:5 1368:5"},{default:o(()=>[a(w,{justify:"end"},{default:o(()=>[i(c).validate(i($e))?(B(),Q(i(fe),{key:0,type:"primary",class:"border btn-color",style:{"margin-bottom":"10px"},ghost:"",onClick:t.uploadFile},{default:o(()=>[b(ee(m.$t("data.efAvailable.modal.fileModal.addFile")),1)]),_:1},8,["onClick"])):ae("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),a(re,{ref:"dataTableRef",columns:e.columns,data:e.data,"scroll-x":"","flex-height":"",style:{height:"550px"},loading:e.loading,"onUpdate:page":z,"onUpdate:sorter":F},null,8,["columns","data","loading"])]),_:1},8,["id","show","title"]),a(Be,{id:Be.uuid(),show:_.value,"onUpdate:show":v[2]||(v[2]=T=>_.value=T),"auto-focus":!1,"mask-closable":!1},{default:o(()=>[a(x,{title:m.$t("data.efAvailable.modal.fileModal.uploadTitle"),bordered:!1,size:"huge",role:"dialog","aria-modal":"true",style:{width:"700px"}},{footer:o(()=>[a(w,{justify:"end"},{default:o(()=>[a(i(fe),{size:"large",class:"btn-color",onClick:t.closeUpload},{default:o(()=>[b(ee(m.$t("data.inputNew.modal.foot.cancel")),1)]),_:1},8,["onClick"]),a(i(fe),{size:"large",type:"primary",onClick:t.submitUpload},{default:o(()=>[b(ee(m.$t("common.upload")),1)]),_:1},8,["onClick"])]),_:1})]),default:o(()=>[W("span",null,ee(m.$t("data.efAvailable.modal.fileModal.desc")),1),a(ce,{ref:"upload","file-list":K.value,"onUpdate:file-list":v[1]||(v[1]=T=>K.value=T),"default-upload":!1,multiple:"",max:10,accept:"*.*",onBeforeUpload:t.beforeUpload,onRemove:t.onRemove,onChange:t.changeFile},{default:o(()=>[a(i(fe),{style:{"margin-top":"10px"}},{default:o(()=>[b(ee(m.$t("data.inputNew.file.upload")),1)]),_:1})]),_:1},8,["file-list","onBeforeUpload","onRemove","onChange"]),f.alert?(B(),Q(s,{key:0,title:m.$t("message.fileUploadFail"),type:"waring"},{icon:o(()=>[a(i(We),null,{default:o(()=>[a(i(io),{style:{color:"#f9a51b"}})]),_:1})]),default:o(()=>[f.errorList.length&&!f.hiddenColume?(B(),_e("div",jo,[W("span",null,ee(m.$t("data.inputNew.modal.uploadError",[f.count,f.count>10?10:f.count])),1),a(I,{style:{"max-height":"250px"}},{default:o(()=>[W("ul",Wo,[(B(!0),_e(Ue,null,pt(f.errorList,(T,h)=>(B(),_e("li",{key:h},ee(m.$t("data.inputNew.modal.lineInfo",[T.lineNum,T.message])),1))),128))])]),_:1})])):ae("",!0),f.hiddenColume?(B(),_e("div",Ho,[a(I,{style:{"max-height":"250px"}},{default:o(()=>[W("ul",Zo,[(B(!0),_e(Ue,null,pt(f.errorList,(T,h)=>(B(),_e("li",{key:h},ee(T.message),1))),128))])]),_:1})])):ae("",!0)]),_:1},8,["title"])):ae("",!0)]),_:1},8,["title"])]),_:1},8,["id","show"])],64)}}});var Jo=Le(qo,[["__scopeId","data-v-b78d2372"]]);function Xo(D,G,C,_,c,y,k){const{t:N}=Ve(),Z=ot(),{offsetOnDialog:f}=Na(),U=Ft(null),K=Rt(),u=()=>({certificateCredit:0,certificateCreditId:null,offsetCalculation:0,availableBalance:null,scope:null,baseId:null,tempBaseId:null,category:null,activityItem:null,activityItemId:null,activeTime:ie(U.year).valueOf(),activityYear:null,offsetAllocatedGranularityId:null,tempOffsetAllocatedGranularityId:null,offsetAllocationCompany:null,offsetAllocationBase:null,certificateAvailableBalance:null,certificateAvailableBalancenew:null,creditAvailableBalance:null,creditAvailableBalancenew:null,checkRadioValue:0,offsetAllocatedKwhRadio:null,offsetAllocatedTCO2Radio:null,offsetAllocatedRatioRadio:null,activityItemObject:null,emissionVolumeObject:null,offsettedAllocationVolumeKwh:null,offsettedAllocationVolumeTco2e:null,quantitativeInputTco2e:null,emissionVolumeInput:null,offsetAllocationScope1:null,offsetAllocatedScope1:null,offsetAllocationVolumeScope1:null,offsetAllocationScope2:null,offsetAllocatedScope2:null,offsetAllocationVolumeScope2:null,offsetAllocationScope3category1:null,offsetAllocatedScope3category1:null,offsetAllocationVolumeScope3category1:null,offsetAllocationScope3category2:null,offsetAllocatedScope3category2:null,offsetAllocationVolumeScope3category2:null,offsetAllocationScope3category3:null,offsetAllocatedScope3category3:null,offsetAllocationVolumeScope3category3:null,offsetAllocationScope3category4:null,offsetAllocatedScope3category4:null,offsetAllocationVolumeScope3category4:null,offsetAllocationScope3category5:null,offsetAllocatedScope3category5:null,offsetAllocationVolumeScope3category5:null,offsetAllocationScope3category6:null,offsetAllocatedScope3category6:null,offsetAllocationVolumeScope3category6:null,offsetAllocationScope3category7:null,offsetAllocatedScope3category7:null,offsetAllocationVolumeScope3category7:null,offsetAllocationScope3category8:null,offsetAllocatedScope3category8:null,offsetAllocationVolumeScope3category8:null,offsetAllocationScope3category9:null,offsetAllocatedScope3category9:null,offsetAllocationVolumeScope3category9:null,offsetAllocationScope3category10:null,offsetAllocatedScope3category10:null,offsetAllocationVolumeScope3category10:null,offsetAllocationScope3category11:null,offsetAllocatedScope3category11:null,offsetAllocationVolumeScope3category11:null,offsetAllocationScope3category12:null,offsetAllocatedScope3category12:null,offsetAllocationVolumeScope3category12:null,offsetAllocationScope3category13:null,offsetAllocatedScope3category13:null,offsetAllocationVolumeScope3category13:null,offsetAllocationScope3category14:null,offsetAllocatedScope3category14:null,offsetAllocationVolumeScope3category14:null,offsetAllocationScope3category15:null,offsetAllocatedScope3category15:null,offsetAllocationVolumeScope3category15:null,totalOffsetAllocation:Me(()=>Number(t.offsetAllocationScope1)+Number(t.offsetAllocationScope2)+Number(t.offsetAllocationScope3category1)+Number(t.offsetAllocationScope3category2)+Number(t.offsetAllocationScope3category3)+Number(t.offsetAllocationScope3category4)+Number(t.offsetAllocationScope3category5)+Number(t.offsetAllocationScope3category6)+Number(t.offsetAllocationScope3category7)+Number(t.offsetAllocationScope3category8)+Number(t.offsetAllocationScope3category9)+Number(t.offsetAllocationScope3category10)+Number(t.offsetAllocationScope3category11)+Number(t.offsetAllocationScope3category12)+Number(t.offsetAllocationScope3category13)+Number(t.offsetAllocationScope3category14)+Number(t.offsetAllocationScope3category15))}),t=j(u()),S=s=>{Mt({companyId:s.companyId,language:be()}).then(x=>{G.base=x,Object.assign(C,De({base:mt(x).map(T=>(T.value=T.value.split(".").pop(),T))}))})};X(()=>t.companyId,()=>{S(t)},{immediate:!0});const F=Oa(),M=()=>{t.offsetAllocatedGranularityId!==1&&(t.baseId===null||t.baseId===void 0)?(F.info({content:N("message.CMPF0191-E")},async()=>{oe()}),t.tempOffsetAllocatedGranularityId=t.offsetAllocatedGranularityId,t.offsetAllocatedGranularityId=null):t.offsetAllocatedGranularityId!==1?(oe(),t.tempOffsetAllocatedGranularityId=t.offsetAllocatedGranularityId,t.offsetAllocatedGranularityId=null):t.offsetAllocatedGranularityId===1&&(t.tempOffsetAllocatedGranularityId=t.offsetAllocatedGranularityId)};X(()=>t.offsetAllocatedGranularityId,async()=>{t.currentStepRef===1&&(t.certificateCredit===0||t.offsetAllocatedGranularityId===1)?k.value=!0:k.value=!1},{immediate:!0});const oe=()=>{var s;y.value=2,t.offsetAllocationCompany=C.company[t.companyId]||"",t.offsetAllocationBase=_.base[(s=t.baseId)==null?void 0:s.split(".").pop()]||"",ce()},z=()=>{t.offsetAllocationScope1=null,t.offsetAllocatedScope1=null,t.offsetAllocationVolumeScope1=null,t.offsetAllocationScope2=null,t.offsetAllocatedScope2=null,t.offsetAllocationVolumeScope2=null,t.offsetAllocationScope3category1=null,t.offsetAllocatedScope3category1=null,t.offsetAllocationVolumeScope3category1=null,t.offsetAllocationScope3category2=null,t.offsetAllocatedScope3category2=null,t.offsetAllocationVolumeScope3category2=null,t.offsetAllocationScope3category3=null,t.offsetAllocatedScope3category3=null,t.offsetAllocationVolumeScope3category3=null,t.offsetAllocationScope3category4=null,t.offsetAllocatedScope3category4=null,t.offsetAllocationVolumeScope3category4=null,t.offsetAllocationScope3category5=null,t.offsetAllocatedScope3category5=null,t.offsetAllocationVolumeScope3category5=null,t.offsetAllocationScope3category6=null,t.offsetAllocatedScope3category6=null,t.offsetAllocationVolumeScope3category6=null,t.offsetAllocationScope3category7=null,t.offsetAllocatedScope3category7=null,t.offsetAllocationVolumeScope3category7=null,t.offsetAllocationScope3category8=null,t.offsetAllocatedScope3category8=null,t.offsetAllocationVolumeScope3category8=null,t.offsetAllocationScope3category9=null,t.offsetAllocatedScope3category9=null,t.offsetAllocationVolumeScope3category9=null,t.offsetAllocationScope3category10=null,t.offsetAllocatedScope3category10=null,t.offsetAllocationVolumeScope3category10=null,t.offsetAllocationScope3category11=null,t.offsetAllocatedScope3category11=null,t.offsetAllocationVolumeScope3category11=null,t.offsetAllocationScope3category12=null,t.offsetAllocatedScope3category12=null,t.offsetAllocationVolumeScope3category12=null,t.offsetAllocationScope3category13=null,t.offsetAllocatedScope3category13=null,t.offsetAllocationVolumeScope3category13=null,t.offsetAllocationScope3category14=null,t.offsetAllocatedScope3category14=null,t.offsetAllocationVolumeScope3category14=null,t.offsetAllocationScope3category15=null,t.offsetAllocatedScope3category15=null,t.offsetAllocationVolumeScope3category15=null};X(()=>t.checkRadioValue,()=>{t.offsetAllocatedKwhRadio=null,t.offsetAllocatedTCO2Radio=null,t.offsetAllocatedRatioRadio=null}),X(()=>t.offsetAllocationScope1,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope2,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category1,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category2,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category3,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category4,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category5,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category6,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category7,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category8,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category9,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category10,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category11,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category12,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category13,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category14,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation}),X(()=>t.offsetAllocationScope3category15,s=>{t.creditAvailableBalancenew=t.creditAvailableBalance-t.totalOffsetAllocation});const{pagination:e,pageParams:A}=Ut(t),{orderBy:m,sorterChange:v}=bt(),E=L(!1),P=L([]),w=[{title:N("data.inputNew.table.activityYear"),key:"enableYear",align:"left",sorter:"default",fixed:"left",width:80},{title:N("data.inputNew.table.scope"),key:"scope",align:"left",fixed:"left",sorter:"default",width:90,render:s=>C.scope[s.scope]},{title:N("data.inputNew.table.categoryName"),key:"categoryId",align:"left",sorter:"default",fixed:"left",ellipsis:{tooltip:!0},width:140,render:s=>C.category[s.categoryId]},{title:N("data.inputNew.table.baseName"),key:"baseId",align:"left",width:140,sorter:"default",ellipsis:{tooltip:!0},fixed:"left",render:s=>_.base[s.baseId]},{title:N("data.inputNew.table.project"),key:"activityItem",align:"left",fixed:"left",sorter:"default",resizable:!0,minWidth:60,ellipsis:{tooltip:!0},width:300},{title:N("data.company"),key:"companyId",align:"left",sorter:"default",resizable:!0,width:150,render:s=>C.company[s.companyId]},{title:N("data.inputNew.table.totalVolume"),key:"activityVolume",align:"right",width:be()==="0"?160:200,render:s=>qe(s.activityVolume)+" "+s.activityVolumeUnit},{title:N("data.inputNew.table.discharge"),key:"emissionVolume",align:"right",width:180,render:s=>qe(s.emissionVolume)+"t-CO\u2082e"},{title:N("data.certificateCredit.allocationVolume"),key:"allocation",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:s=>{if(t.certificateCredit===0)return s.oaiActivityVolume?qe(s.oaiActivityVolume)+" "+s.activityVolumeUnit:"";if(t.certificateCredit===1)return s.allocation?qe(s.allocation)+"t-CO\u2082e":""}},{title:N("data.certificateCredit.allocationRatio"),key:"present",align:"center",width:150,minWidth:60,resizable:!0,ellipsis:{tooltip:!0},render:s=>{if(t.certificateCredit===0)return s.oaiActivityVolume?qe(s.oaiActivityVolume/s.activityVolume*100)+"%":"";if(t.certificateCredit===1)return s.allocation?qe(s.allocation/s.emissionVolume*100)+"%":""}},{title:N("data.active.table.createTime"),key:"createTime",align:"center",sorter:"default",width:be()==="0"?110:130,ellipsis:{tooltip:!0},minWidth:60,render:s=>ie(s.createTime).format("YYYY-MM-DD")},{title:N("data.active.table.updateTime"),key:"updateTime",align:"center",sorter:"default",width:be()==="0"?110:130,ellipsis:{tooltip:!0},minWidth:60,render:s=>ie(s.updateTime).format("YYYY-MM-DD")},{title:N("data.inputNew.table.action"),key:"opration",align:"center",width:150,fixed:"right",render:s=>
1Z.validate($e)?Ua(f(s,()=>te(s))):""}],te=async s=>{if(s.doscope>0)return K.error({title:N("message.errorTitle"),content:N("message.CMPF0204-E"),positiveText:N("common.foot.confirm"),closeOnEsc:!1,maskClosable:!1});t.activityItemObject=s.activityItem,t.activityItemId=s.activityItemId,t.activityVolumeObject=s.activityVolume>0?s.activityVolume:0,t.emissionVolumeObject=s.emissionVolume>0?s.emissionVolume:0,t.offsettedAllocationVolumeKwh=s.oaiActivityVolume>0?s.oaiActivityVolume:0,t.offsettedAllocationVolumeTco2e=s.allocation>0?s.allocation:0,t.activityYear=s.enableYear,t.tempBaseId=s.baseId,t.offsetAllocatedKwhRadio=null,t.offsetAllocatedTCO2Radio=null,t.offsetAllocatedRatioRadio=null,t.quantitativeInputTco2e=null,t.emissionVolumeInput=null,t.creditAvailableBalancenew=t.creditAvailableBalance,t.certificateAvailableBalancenew=t.certificateAvailableBalance,y.value=2},le=Me(()=>Xa([...w.slice(0,w.length-4),...w.slice(w.length-4)])),re=s=>{var x;(x=D==null?void 0:D.value)==null||x.validate(async T=>{var h,Re,Ie,Ce,Ne,ue;if(!T){if(s==!0&&(e.page=1),E.value=!0,await Mt({companyId:t.companyId,language:be()}).then(q=>{G.base=q,Object.assign(_,De({base:mt(q).map(n=>(n.value=n.value.split(".").pop(),n))}))}),t.certificateCredit===1&&t.offsetAllocatedGranularityId!==1){E.value=!1;return}t.certificateCredit===0||t.offsetAllocatedGranularityId===1?k.value=!0:k.value=!1;const $=await Da(we(ve({},A()),{sort:m!=null&&m.value?m.value:null,certificateCredit:t.certificateCredit,certificateCreditId:t.certificateCreditId,offsetAllocatedGranularityId:t.offsetAllocatedGranularityId,activeTime:t.activeTime?Je(new Date(t.activeTime),"yyyy"):null,activityItem:t.activityItem,categoryId:t.category,baseId:(h=t.baseId)==null?void 0:h.split(".").pop(),scope:t.scope,companyId:t.companyId?t.companyId:Oe().companyId.value,language:be(),companyStartMonth:yt()}));e.page=(Re=$==null?void 0:$.body)==null?void 0:Re.pageNum,e.itemCount=((Ie=$==null?void 0:$.body)==null?void 0:Ie.total)||0,(Ne=(Ce=$==null?void 0:$.body)==null?void 0:Ce.list)==null||Ne.forEach(q=>{var l,p;(l=q.activityVolumeDtos)==null||l.forEach(J=>{var d;q[(d=J==null?void 0:J.activityMonth)==null?void 0:d.slice(4)]=J}),(p=q.activityVolumeDtos)==null||p.forEach(J=>{q[J==null?void 0:J.activityYear]=J}),q.totalVolume=Gt.exports.sumBy(q.activityVolumeDtos,({activityVolume:J})=>Number(J));const n=q.activityVolumeDtos.filter(J=>J.activityYear);q.activityVolumeInputUnit=n&&n.length>0?1:0}),P.value=(ue=$==null?void 0:$.body)==null?void 0:ue.list,E.value=!1,he(N("event.search",{screen:N("menus.data.input")}),{method:"Query",screen_name:N("menus.data.input")})}})},ce=()=>{var s;(s=D==null?void 0:D.value)==null||s.validate(async x=>{var T;if(!x){E.value=!0;const h=await Va({sort:m!=null&&m.value?m.value:null,certificateCreditId:t.certificateCreditId,offsetAllocatedGranularityId:t.tempOffsetAllocatedGranularityId,activeTime:t.activeTime?Je(new Date(t.activeTime),"yyyy"):null,activityItem:t.activityItem,categoryId:t.category,baseId:(T=t.baseId)==null?void 0:T.split(".").pop(),scope:t.scope,companyId:t.companyId?t.companyId:Oe().companyId.value,language:be(),companyStartMonth:yt()});h!=null&&h.body&&(t.offsetAllocatedScope1=h.body.offsetAllocatedScope1||0,t.offsetAllocatedScope2=h.body.offsetAllocatedScope2||0,t.offsetAllocatedScope3category1=h.body.offsetAllocatedScope3category1||0,t.offsetAllocatedScope3category2=h.body.offsetAllocatedScope3category2||0,t.offsetAllocatedScope3category3=h.body.offsetAllocatedScope3category3||0,t.offsetAllocatedScope3category4=h.body.offsetAllocatedScope3category4||0,t.offsetAllocatedScope3category5=h.body.offsetAllocatedScope3category5||0,t.offsetAllocatedScope3category6=h.body.offsetAllocatedScope3category6||0,t.offsetAllocatedScope3category7=h.body.offsetAllocatedScope3category7||0,t.offsetAllocatedScope3category8=h.body.offsetAllocatedScope3category8||0,t.offsetAllocatedScope3category9=h.body.offsetAllocatedScope3category9||0,t.offsetAllocatedScope3category10=h.body.offsetAllocatedScope3category10||0,t.offsetAllocatedScope3category11=h.body.offsetAllocatedScope3category11||0,t.offsetAllocatedScope3category12=h.body.offsetAllocatedScope3category12||0,t.offsetAllocatedScope3category13=h.body.offsetAllocatedScope3category13||0,t.offsetAllocatedScope3category14=h.body.offsetAllocatedScope3category14||0,t.offsetAllocatedScope3category15=h.body.offsetAllocatedScope3category15||0,t.offsetAllocationVolumeScope1=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope1||0,t.offsetAllocationVolumeScope2=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope2||0,t.offsetAllocationVolumeScope3category1=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category1||0,t.offsetAllocationVolumeScope3category2=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category2||0,t.offsetAllocationVolumeScope3category3=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category3||0,t.offsetAllocationVolumeScope3category4=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category4||0,t.offsetAllocationVolumeScope3category5=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category5||0,t.offsetAllocationVolumeScope3category6=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category6||0,t.offsetAllocationVolumeScope3category7=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category7||0,t.offsetAllocationVolumeScope3category8=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category8||0,t.offsetAllocationVolumeScope3category9=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category9||0,t.offsetAllocationVolumeScope3category10=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category10||0,t.offsetAllocationVolumeScope3category11=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category11||0,t.offsetAllocationVolumeScope3category12=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category12||0,t.offsetAllocationVolumeScope3category13=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category13||0,t.offsetAllocationVolumeScope3category14=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category14||0,t.offsetAllocationVolumeScope3category15=h.body.offsetAllocationVolumeDto.offsetAllocationVolumeScope3category15||0),E.value=!1,he(N("event.search",{screen:N("menus.data.input")}),{method:"Query",screen_name:N("menus.data.input")})}})};return{searchForm:t,columnsRef:le,loadingRef:E,dataRef:P,pagination:e,query:re,handlePageSize:s=>{e.pageSize=s,re(!0)},clear:()=>{const s=t.certificateCredit,x=t.certificateCreditId,T=t.activityItemObject,h=t.offsetCalculation,Re=t.certificateAvailableBalance,Ie=t.certificateAvailableBalancenew,Ce=t.creditAvailableBalance,Ne=t.creditAvailableBalancenew,ue=t.activityYear;Object.assign(t,u()),t.certificateCredit=s,t.certificateCreditId=x,t.activityItemObject=T,t.offsetCalculation=h,t.certificateAvailableBalance=Re,t.certificateAvailableBalancenew=Ie,t.creditAvailableBalance=Ce,t.creditAvailableBalancenew=Ne,t.activityYear=ue,c.value.sort(null),ht(()=>{re(!0)})},handleSorterChange:s=>{Promise.all([v(s)]).then(()=>{re(!0)})}
1,currentStepRef:y,clearSearchFormInput:z,handleUpdateValue:M}}const Qo=D=>(vt("data-v-02d9d3b6"),D=D(),It(),D),el={class:"search"},tl=b("kWh"),al=b("t-CO\u2082e"),ol=b("kWh"),ll=b("t-CO\u2082e"),il=b("t-CO\u2082e"),rl=b("kWh"),nl=b("t-CO\u2082e"),cl=b("%"),sl=Qo(()=>W("p",null,null,-1)),dl={style:{"font-size":"14px"}},fl=b("t-CO\u2082e"),ul=b("%"),pl=b("kWh"),ml=b("t-CO\u2082e"),gl=b("t-CO\u2082e"),Al={style:{"font-size":"14px"}},yl=b("t-CO\u2082e"),_l=b("t-CO\u2082e"),Sl=b("t-CO\u2082e"),El=b("t-CO\u2082e"),bl=b("t-CO\u2082e"),Cl=b("t-CO\u2082e"),Tl=b("t-CO\u2082e"),vl=b("t-CO\u2082e"),Il=b("t-CO\u2082e"),hl=b("t-CO\u2082e"),Rl=b("t-CO\u2082e"),Nl=b("t-CO\u2082e"),Ol=b("t-CO\u2082e"),Ul=b("t-CO\u2082e"),Dl=b("t-CO\u2082e"),Vl=b("t-CO\u2082e"),wl=b("t-CO\u2082e"),Bl=b("t-CO\u2082e"),Ml=b("t-CO\u2082e"),Ll=b("t-CO\u2082e"),kl=b("t-CO\u2082e"),Fl=b("t-CO\u2082e"),Pl=b("t-CO\u2082e"),Kl=b("t-CO\u2082e"),Gl=b("t-CO\u2082e"),Yl=b("t-CO\u2082e"),$l=b("t-CO\u2082e"),xl=b("t-CO\u2082e"),zl=b("t-CO\u2082e"),jl=b("t-CO\u2082e"),Wl=b("t-CO\u2082e"),Hl=b("t-CO\u2082e"),Zl=b("t-CO\u2082e"),ql=b("t-CO\u2082e"),Jl=b("t-CO\u2082e"),Xl=b("t-CO\u2082e"),Ql=b("t-CO\u2082e"),ei=b("t-CO\u2082e"),ti=b("t-CO\u2082e"),ai=b("t-CO\u2082e"),oi=b("t-CO\u2082e"),li=b("t-CO\u2082e"),ii=b("t-CO\u2082e"),ri=b("t-CO\u2082e"),ni=b("t-CO\u2082e"),ci=b("t-CO\u2082e"),si=b("t-CO\u2082e"),di=b("t-CO\u2082e"),fi=b("t-CO\u2082e"),ui=b("t-CO\u2082e"),pi=b("t-CO\u2082e"),mi=ke({name:"index",props:{data:{type:Object,required:!1,default:()=>null}},emits:["updateTitleStatus"],setup(D,{expose:G,emit:C}){const _=D,{t:c}=Ve(),y=Rt(),k=lt(),N=L(null),Z=L(!1),f=2,U=L(1),K=L("process");c("data.certificateCredit.offsetAllocated_kwh_radio"),c("data.certificateCredit.offsetAllocated_tCO2_radio"),c("data.certificateCredit.offsetAllocated_ratio_radio");const u=n=>{const l=n.replace(/,/g,"").trim();return/^\d+(\.(\d+)?)?$/.test(l)?Number(l):l===""?null:Number.NaN},t=n=>n===null?"":Number(n).toLocaleString("en-US"),S=j({company:[],category:[],scope:[],activityItem:[],base:[],offsetAllocation_granularity:[]}),F=j({company:{},scope:{},category:{},base:{},offsetAllocation_granularity:{}}),M=j({base:{}});Xe({dict:["scope","category","offsetAllocation_granularity"]}).then(n=>{Object.assign(S,...n[0]);const{scope:l,category:p,offsetAllocation_granularity:J}=S;Object.assign(F,De({scope:l,category:p,offsetAllocation_granularity:J}))});const oe=[];oe.push(Ct({mode:"01"}).then(n=>{Object.assign(S,{company:(n==null?void 0:n.body)||[]});const{company:l}=S;Object.assign(F,De({company:l}))}));const z=L(null),{searchForm:e,columnsRef:A,loadingRef:m,dataRef:v,pagination:E,clear:P,handlePageSize:w,query:te,handleSorterChange:le,clearSearchFormInput:re,handleUpdateValue:ce}=Xo(z,S,F,M,N,U,Z),I=n=>{var l;(l=z.value)==null||l.restoreValidation(),e.checkRadioValue=Number(n.target.value)},s=L(!0);X(()=>e.offsetAllocatedTCO2Radio,n=>{var l;n&&(s.value=!1,(l=z.value)==null||l.validate())}),G({offset:n=>{var l;(l=z.value)==null||l.restoreValidation(),s.value=!1,z.value.validate(p=>{var J;if(!p){const d={data:ve({},e)};if(d.data.certificateCredit===1&&d.data.tempOffsetAllocatedGranularityId!==1&&d.data.totalOffsetAllocation===0)return y.error({title:c("message.errorTitle"),content:c("data.inputNew.modal.allocationCheck"),positiveText:c("common.foot.confirm")});e.tempOffsetAllocatedGranularityId!==null&&e.tempOffsetAllocatedGranularityId!==1?(d.data.offsetAllocatedGranularityId=e.tempOffsetAllocatedGranularityId,d.data.baseId=(J=d.data.baseId)==null?void 0:J.split(".").pop()):d.data.baseId=e.tempBaseId,d.data.companyStartMonth=yt(),k.edit(()=>wa(d.data)).then(n).finally(()=>{s.value=!0})}})},currentStepRef:U});const x=()=>{Promise.all(oe).finally(()=>{P()})};Qe(()=>{x(),Tt(c("menus.data.input")),he(c("event.initScreen",{screen:c("menus.data.input")}),{method:"Init",screen_name:c("menus.data.input")})});const T=Me(()=>e.certificateCredit===1&&e.offsetAllocatedGranularityId!==1),h=n=>{e.activityYear=Je(new Date(n),"yyyy")};X(U,(n,l)=>{n===1&&re(),C("updateTitleStatus",n)},{immediate:!0}),X(()=>_.data,n=>
1{if(n){let l=n.certificateCredit.purchaseDate?Je(new Date(n.certificateCredit.purchaseDate),"yyyy"):null;Object.assign(e,{certificateCredit:n.certificateCredit.certificateCredit,certificateCreditId:n.certificateCredit.id,activityItemObject:n.certificateCredit.certificateCreditName,offsetCalculation:n.certificateCredit.offsetCalculation,certificateAvailableBalance:n.certificateCredit.availableBalance,certificateAvailableBalancenew:n.certificateCredit.availableBalance,creditAvailableBalance:n.certificateCredit.availableBalance,creditAvailableBalancenew:n.certificateCredit.availableBalance,activityYear:l,companyId:n.certificateCredit.companyId})}},{immediate:!0}),X(()=>e.scope,n=>{(n===1||n===2)&&(e.category=null)});const Re=n=>{s.value=!0,e.offsetAllocatedKwhRadio=Number(n),e.offsetAllocatedTCO2Radio=Number(n)*Number(e.offsetCalculation),e.offsetAllocatedRatioRadio=Number(e.offsetAllocatedKwhRadio)/(Number(e.activityVolumeObject)-Number(e.offsettedAllocationVolumeKwh))*100},Ie=n=>{s.value=!0,e.offsetAllocatedRatioRadio=Number(n),e.offsetAllocatedKwhRadio=(Number(e.activityVolumeObject)-Number(e.offsettedAllocationVolumeKwh))*Number(e.offsetAllocatedRatioRadio)/100,e.offsetAllocatedTCO2Radio=Number(e.offsetAllocatedKwhRadio)*Number(e.offsetCalculation)},Ce=n=>{const l=Number(e.emissionVolumeObject)-Number(e.offsettedAllocationVolumeTco2e);e.creditAvailableBalancenew<0?(e.emissionVolumeInput=null,n(new Error(c("message.CMPF0193-E")))):l<0||l-e.quantitativeInputTco2e<0?(e.emissionVolumeInput=null,n(new Error(c("message.CMPF0199-E")))):Number.isNaN(e.quantitativeInputTco2e)||e.quantitativeInputTco2e<=0?(e.emissionVolumeInput=null,new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocated_tCO2_radio")]))):n()},Ne=n=>{var l;(l=z.value)==null||l.restoreValidation(),n!==null&&n!==""&&n>0?(e.quantitativeInputTco2e=Number(n),e.emissionVolumeInput=Number(n)/(Number(e.emissionVolumeObject)-Number(e.offsettedAllocationVolumeTco2e))*100,e.creditAvailableBalancenew=Number(e.creditAvailableBalance)-Number(e.quantitativeInputTco2e)):(e.emissionVolumeInput=null,e.creditAvailableBalancenew=Number(e.creditAvailableBalance))},ue=n=>{var l;(l=z.value)==null||l.restoreValidation(),n!==null&&n!==""&&n>0?(e.emissionVolumeInput=Number(n),e.quantitativeInputTco2e=(Number(e.emissionVolumeObject)-Number(e.offsettedAllocationVolumeTco2e))*Number(e.emissionVolumeInput)/100,e.creditAvailableBalancenew=Number(e.creditAvailableBalance)-Number(e.quantitativeInputTco2e)):(e.quantitativeInputTco2e=null,e.creditAvailableBalancenew=Number(e.creditAvailableBalance))},$=(n,l,p)=>Number((n-l-p).toFixed(3))<0,q={offsetAllocatedKwhRadio:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{var J;s.value&&((J=z.value)==null||J.restoreValidation()),!l||Number.isNaN(l)||l<=0?(e.offsetAllocatedTCO2Radio=null,e.offsetAllocatedRatioRadio=null,e.offsetAllocatedKwhRadio=null,e.certificateAvailableBalancenew=e.certificateAvailableBalance,p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.activityVolume")])))):(e.certificateAvailableBalancenew=Number(e.certificateAvailableBalance)-Number(l),e.certificateAvailableBalancenew<0&&p(new Error(c("message.CMPF0193-E"))),$(e.activityVolumeObject,e.offsetAllocatedKwhRadio,e.offsettedAllocationVolumeKwh)&&p(new Error(c("message.CMPF0198-E"))))}}],offsetAllocatedTCO2Radio:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{var J;s.value&&((J=z.value)==null||J.restoreValidation()),!l||Number.isNaN(l)||l<=0?(e.offsetAllocatedKwhRadio=null,e.offsetAllocatedRatioRadio=null,e.certificateAvailableBalancenew=e.certificateAvailableBalance,p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocated_tCO2_radio")])))):$(e.emissionVolumeObject,e.offsetAllocatedTCO2Radio,e.offsettedAllocationVolumeTco2e)&&p(new Error(c("message.CMPF0199-E")))}}],offsetAllocatedRatioRadio:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{var J;s.value&&((J=z.value)==null||J.restoreValidation()),l===null?!e.offsetAllocatedKwhRadio&&!e.offsetAllocatedTCO2Radio&&p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.allocationRatio")]))):l<=0?(e.offsetAllocatedRatioRadio=null,e.offsetAllocatedKwhRadio=null,e.offsetAllocatedTCO2Radio=null,e.certificateAvailableBalancenew=e.certificateAvailableBalance,p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.allocationRatio")])))):l>100&&(e.checkRadioValue===2&&(e.offsetAllocatedKwhRadio=null,e.offsetAllocatedTCO2Radio=null),e.certificateAvailableBalancenew=e.certificateAvailableBalance,p(new Error(c("message.CMPF0198-E",[]))))}}],quantitativeInputTco2e:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{!l||Number.isNaN(l)||l<=0?(e.emissionVolumeInput=null,p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocated_tCO2_radio")])))):Ce(p)}}],emissionVolumeInput:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{!l||Number.isNaN(l)||l<=0?(e.quantitativeInputTco2e=null,p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.allocationRatio")])))):l>100?(e.quantitativeInputTco2e=null,p(new Error(c("message.CMPF0199-E",[])))):Ce(p)}}],offsetAllocationScope1:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope1")]))):l>e.offsetAllocationVolumeScope1?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope1,e.offsetAllocatedScope1,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope2:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope2")]))):l>e.offsetAllocationVolumeScope2?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope2,e.offsetAllocatedScope2,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category1:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category1")]))):l>e.offsetAllocationVolumeScope3category1?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category1,e.offsetAllocatedScope3category1,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category2:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category2")]))):l>e.offsetAllocationVolumeScope3category2?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category2,e.offsetAllocatedScope3category2,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category3:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category3")]))):l>e.offsetAllocationVolumeScope3category3?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category3,e.offsetAllocatedScope3category3,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category4:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category4")]))):l>e.offsetAllocationVolumeScope3category4?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category4,e.offsetAllocatedScope3category4,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category5:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category5")]))):l>e.offsetAllocationVolumeScope3category5?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category5,e.offsetAllocatedScope3category5,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category6:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category6")]))):l>e.offsetAllocationVolumeScope3category6?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category6,e.offsetAllocatedScope3category6,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category7:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category7")]))):l>e.offsetAllocationVolumeScope3category7?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category7,e.offsetAllocatedScope3category7,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category8:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category8")]))):l>e.offsetAllocationVolumeScope3category8?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category8,e.offsetAllocatedScope3category8,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category9:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category9")]))):l>e.offsetAllocationVolumeScope3category9?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category9,e.offsetAllocatedScope3category9,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category10:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category10")]))):l>e.offsetAllocationVolumeScope3category10?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category10,e.offsetAllocatedScope3category10,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category11:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category11")]))):l>e.offsetAllocationVolumeScope3category11?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category11,e.offsetAllocatedScope3category11,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category12:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category12")]))):l>e.offsetAllocationVolumeScope3category12?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category12,e.offsetAllocatedScope3category12,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category13:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category13")]))):l>e.offsetAllocationVolumeScope3category13?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category13,e.offsetAllocatedScope3category13,l)?p(new Error(c("message.CMPF0199-E"))):p()}}],offsetAllocationScope3category14:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category14")]))):l>e.offsetAllocationVolumeScope3category14?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category14,e.offsetAllocatedScope3category14,l)?p(new Error(c("message.CMPF0199-E"))):p()}}
1],offsetAllocationScope3category15:[{type:"number",trigger:["blur","input","change"],validator:(n,l,p)=>{l>e.creditAvailableBalance||e.totalOffsetAllocation>e.creditAvailableBalance?p(new Error(c("message.CMPF0193-E",[]))):l<0?p(new Error(c("message.CMPF0192-E",[c("data.certificateCredit.offsetAllocationScope3category15")]))):l>e.offsetAllocationVolumeScope3category15?p(new Error(c("message.CMPF0199-E"))):$(e.offsetAllocationVolumeScope3category15,e.offsetAllocatedScope3category15,l)?p(new Error(c("message.CMPF0199-E"))):p()}}]};return(n,l)=>{const p=Ba,J=Ma,d=et,O=it,g=Dt,H=ct,de=ia,Y=Ze,ge=rt,Te=tt,se=xe,Fe=Pt,R=Qt,Ge=La,Ae=Ot,Se=Nt,Vt=nt;return B(),_e(Ue,null,[a(d,{vertical:"",justify:"end",style:{width:"100%"}},{default:o(()=>[a(J,{style:{margin:"10px 0"},current:U.value,status:K.value},{default:o(()=>[(B(),_e(Ue,null,pt(f,r=>a(p,{key:r,title:n.$t(`data.certificateCredit.steps[${r}]`)},null,8,["title"])),64))]),_:1},8,["current","status"])]),_:1}),W("div",el,[U.value===1?(B(),Q(se,{key:0,ref_key:"searchFormRef",ref:z,"label-width":130,model:i(e),"label-placement":"left","label-align":"left"},{default:o(()=>[a(Y,{"x-gap":"30",cols:"12 1024:18 1368:24"},{default:o(()=>[a(g,{span:6,label:n.$t("data.company"),path:"companyId"},{default:o(()=>[a(O,{value:i(e).companyId,"onUpdate:value":l[0]||(l[0]=r=>i(e).companyId=r),"render-tag":i(oa),options:S.company,disabled:""},null,8,["value","render-tag","options"])]),_:1},8,["label"]),i(e).certificateCredit===0?(B(),Q(g,{key:0,span:6,label:n.$t("data.inputNew.search.activeTime"),"label-placement":"left","label-align":"left",path:"activeTime"},{default:o(()=>[a(H,{value:i(e).activeTime,"onUpdate:value":[l[1]||(l[1]=r=>i(e).activeTime=r),h],"input-readonly":"",type:"year",placeholder:n.$t("common.select")},null,8,["value","placeholder"])]),_:1},8,["label"])):ae("",!0),i(e).certificateCredit===1?(B(),Q(g,{key:1,span:6,label:n.$t("data.inputNew.search.activeTime"),"label-placement":"left","label-align":"left",rule:{required:!0},path:"activeTime"},{default:o(()=>[a(H,{value:i(e).activeTime,"onUpdate:value":[l[2]||(l[2]=r=>i(e).activeTime=r),h],"input-readonly":"",type:"year",placeholder:n.$t("common.select")},null,8,["value","placeholder"])]),_:1},8,["label"])):ae("",!0),a(g,{span:6,label:n.$t("data.inputNew.search.address")},{default:o(()=>[a(de,{value:i(e).baseId,"onUpdate:value":l[3]||(l[3]=r=>i(e).baseId=r),"expand-trigger":"click",options:S.base,"check-strategy":"child","show-path":!1,clearable:""},null,8,["value","options"])]),_:1},8,["label"]),i(e).certificateCredit===1?(B(),Q(g,{key:2,span:6,rule:{required:!0},label:n.$t("data.certificateCredit.offsetAllocation_granularity")},{default:o(()=>[a(O,{value:i(e).offsetAllocatedGranularityId,"onUpdate:value":[l[4]||(l[4]=r=>i(e).offsetAllocatedGranularityId=r),i(ce)],clearable:"",options:S.offsetAllocation_granularity},null,8,["value","options","onUpdate:value"])]),_:1},8,["label"])):ae("",!0)]),_:1}),a(Y,{"x-gap":"30",cols:"12 1024:18 1368:24"},{default:o(()=>[a(g,{span:6,label:n.$t("data.inputNew.search.scope")},{default:o(()=>[a(O,{value:i(e).scope,"onUpdate:value":l[5]||(l[5]=r=>i(e).scope=r),clearable:"",options:S.scope},null,8,["value","options"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.inputNew.search.type")},{default:o(()=>[a(O,{value:i(e).category,"onUpdate:value":l[6]||(l[6]=r=>i(e).category=r),clearable:"",disabled:i(e).scope===1||i(e).scope===2,options:S.category},null,8,["value","disabled","options"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.project.search.activityItem")},{default:o(()=>[a(ge,{value:i(e).activityItem,"onUpdate:value":l[7]||(l[7]=r=>i(e).activityItem=r),maxlength:i(ut),clearable:""},null,8,["value","maxlength"])]),_:1},8,["label"]),a(Te,{span:"6"},{default:o(()=>[a(d,{justify:"end"},{default:o(()=>[a(i(fe),{class:"sub-btn",type:"primary",onClick:l[8]||(l[8]=r=>i(te)(!0)),disabled:i(T)},{default:o(()=>[b(ee(n.$t("data.inputNew.search.search")),1)]),_:1},8,["disabled"]),a(i(fe),{class:"sub-btn",type:"primary",ghost:"",onClick:i(P)},{default:o(()=>[b(ee(n.$t("data.inputNew.search.clear")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])):ae("",!0)]),U.value===2?(B(),Q(se,{key:0,ref_key:"searchFormRef",ref:z,rules:q,model:i(e),"label-placement":"left","label-width":100,"label-align":"left"},{default:o(()=>[i(e).certificateCredit===1&&i(e).tempOffsetAllocatedGranularityId!==1?(B(),Q(Y,{key:0,"x-gap":"30",cols:"12 1024:18 1368:24"},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocation_company")},{default:o(()=>[a(ge,{value:i(e).offsetAllocationCompany,"onUpdate:value":l[9]||(l[9]=r=>i(e).offsetAllocationCompany=r),class:"content",maxlength:"255",disabled:""},null,8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocation_base")},{default:o(()=>[a(ge,{value:i(e).offsetAllocationBase,"onUpdate:value":l[10]||(l[10]=r=>i(e).offsetAllocationBase=r),class:"content",maxlength:"255",disabled:""},null,8,["value"])]),_:1},8,["label"])]),_:1})):ae("",!0),i(e).certificateCredit===1&&i(e).tempOffsetAllocatedGranularityId!==1?(B(),Q(Fe,{key:1})):ae("",!0),a(Y,{"x-gap":"30",cols:"12 1024:18 1368:24"},{default:o(()=>[i(e).certificateCredit===0?(B(),Q(g,{key:0,span:6,label:n.$t("data.certificateCredit.certificateName"),"label-placement":"top"},{default:o(()=>[a(ge,{value:_.data.certificateCredit.certificateCreditName,"onUpdate:value":l[11]||(l[11]=r=>_.data.certificateCredit.certificateCreditName=r),class:"content",disabled:""},null,8,["value"])]),_:1},8,["label"])):ae("",!0),i(e).certificateCredit===1?(B(),Q(g,{key:1,span:6,label:n.$t("data.certificateCredit.creditName"),"label-placement":"top"},{default:o(()=>[a(ge,{value:_.data.certificateCredit.certificateCreditName,"onUpdate:value":l[12]||(l[12]=r=>_.data.certificateCredit.certificateCreditName=r),class:"content",disabled:""},null,8,["value"])]),_:1},8,["label"])):ae("",!0),i(e).certificateCredit===0?(B(),Q(g,{key:2,span:6,label:n.$t("data.certificateCredit.certificate_availableBalance"),"label-placement":"top",path:"certificateAvailableBalancenew"},{default:o(()=>[a(R,{value:i(e).certificateAvailableBalancenew,"onUpdate:value":l[13]||(l[13]=r=>i(e).certificateAvailableBalancenew=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[tl]),_:1},8,["value"])]),_:1}
1,8,["label"])):ae("",!0),i(e).certificateCredit!==0?(B(),Q(g,{key:3,span:6,label:n.$t("data.certificateCredit.credit_availableBalance"),"label-placement":"top",path:"certificateAvailableBalancenew"},{default:o(()=>[a(R,{value:i(e).certificateAvailableBalancenew,"onUpdate:value":l[14]||(l[14]=r=>i(e).certificateAvailableBalancenew=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[al]),_:1},8,["value"])]),_:1},8,["label"])):ae("",!0)]),_:1}),i(e).certificateCredit===0?(B(),Q(Y,{key:2,"x-gap":"30",cols:"12 1024:18 1368:24"},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.activityItem_object"),"label-placement":"top"},{default:o(()=>[a(ge,{value:i(e).activityItemObject,"onUpdate:value":l[15]||(l[15]=r=>i(e).activityItemObject=r),class:"content",disabled:""},null,8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.activityVolume_object"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).activityVolumeObject,"onUpdate:value":l[16]||(l[16]=r=>i(e).activityVolumeObject=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[ol]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.emissionVolume_object"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).emissionVolumeObject,"onUpdate:value":l[17]||(l[17]=r=>i(e).emissionVolumeObject=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[ll]),_:1},8,["value"])]),_:1},8,["label"])]),_:1})):ae("",!0),i(e).certificateCredit===1&&i(e).tempOffsetAllocatedGranularityId===1?(B(),Q(Y,{key:3,"x-gap":"30",cols:"12 1024:18 1368:24"},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.activityItem_object"),"label-placement":"top"},{default:o(()=>[a(ge,{value:i(e).activityItemObject,"onUpdate:value":l[18]||(l[18]=r=>i(e).activityItemObject=r),class:"content",disabled:""},null,8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.emissionVolume_object"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).emissionVolumeObject,"onUpdate:value":l[19]||(l[19]=r=>i(e).emissionVolumeObject=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[il]),_:1},8,["value"])]),_:1},8,["label"])]),_:1})):ae("",!0),i(e).certificateCredit===0?(B(),Q(Ae,{key:4,title:n.$t("data.certificateCredit.offsetAllocated_input"),size:"small"},{"header-extra":o(()=>[]),default:o(()=>[a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6},{default:o(()=>[a(Ge,{key:"0",checked:i(e).checkRadioValue===0,value:"0",onChange:I},{default:o(()=>[b(ee(i(c)("data.certificateCredit.offsetAllocated_kwh_radio")),1)]),_:1},8,["checked"])]),_:1}),a(g,{span:6},{default:o(()=>[ze(a(Ge,{key:"1",value:"1"},{default:o(()=>[b(ee(i(c)("data.certificateCredit.offsetAllocated_tCO2_radio")),1)]),_:1},512),[[je,!1]])]),_:1}),a(g,{span:6},{default:o(()=>[a(Ge,{key:"2",checked:i(e).checkRadioValue===2,value:"2",onChange:I},{default:o(()=>[b(ee(i(c)("data.certificateCredit.offsetAllocated_ratio_radio")),1)]),_:1},8,["checked"])]),_:1})]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,path:"offsetAllocatedKwhRadio"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedKwhRadio,"onUpdate:value":[l[20]||(l[20]=r=>i(e).offsetAllocatedKwhRadio=r),Re],class:"form-item",style:{width:"100%"},disabled:i(e).checkRadioValue!==0,parse:u,format:t,clearable:""},{suffix:o(()=>[rl]),_:1},8,["value","disabled"])]),_:1}),a(g,{span:6,path:"offsetAllocatedTCO2Radio"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedTCO2Radio,"onUpdate:value":l[21]||(l[21]=r=>i(e).offsetAllocatedTCO2Radio=r),class:"form-item",style:{width:"100%"},disabled:i(e).checkRadioValue!==1,parse:u,format:t,clearable:""},{suffix:o(()=>[nl]),_:1},8,["value","disabled"])]),_:1}),a(g,{span:6,path:"offsetAllocatedRatioRadio"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedRatioRadio,"onUpdate:value":[l[22]||(l[22]=r=>i(e).offsetAllocatedRatioRadio=r),Ie],class:"form-item",style:{width:"100%"},disabled:i(e).checkRadioValue!==2,parse:u,format:t,clearable:""},{suffix:o(()=>[cl]),_:1},8,["value","disabled"])]),_:1})]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6},{default:o(()=>[sl]),_:1}),a(g,{span:18},{default:o(()=>[W("p",dl,ee(n.$t("data.certificateCredit.tips")),1)]),_:1})]),_:1})]),_:1},8,["title"])):ae("",!0),i(e).certificateCredit===1&&i(e).tempOffsetAllocatedGranularityId===1?(B(),Q(Ae,{key:5,title:n.$t("data.certificateCredit.offsetAllocated_input"),size:"small"},{"header-extra":o(()=>[]),default:o(()=>[a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.quantitative_input"),"label-placement":"top",path:"quantitativeInputTco2e"},{default:o(()=>[a(R,{value:i(e).quantitativeInputTco2e,"onUpdate:value":[l[23]||(l[23]=r=>i(e).quantitativeInputTco2e=r),Ne],class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[fl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.emissionVolume_input"),"label-placement":"top",path:"emissionVolumeInput"},{default:o(()=>[a(R,{value:i(e).emissionVolumeInput,"onUpdate:value":[l[24]||(l[24]=r=>i(e).emissionVolumeInput=r),ue],class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[ul]),_:1},8,["value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"])):ae("",!0),i(e).certificateCredit===0?(B(),Q(Ae,{key:6,title:n.$t("data.certificateCredit.offsettedAllocationVolume"),size:"small"},{"header-extra":o(()=>[]),default:o(()=>[a(se,{"label-placement":"left","label-align":"left",style:{height:"35px"}},{default:o(()=>[a(Y,{"x-gap":20,cols:"18 1024:33 "},{default:o(()=>[a(g,{span:6},{default:o(()=>[a(R,{value:i(e).offsettedAllocationVolumeKwh,"onUpdate:value":l[25]||(l[25]=r=>i(e).offsettedAllocationVolumeKwh=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[pl]),_:1},8,["value"])]),_:1}),a(g,{span:6},{default:o(()=>[a(R,{value:i(e).offsettedAllocationVolumeTco2e,"onUpdate:value":l[26]||(l[26]=r=>i(e).offsettedAllocationVolumeTco2e=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[ml]),_:1},8,["value"])]),_:1})]),_:1})]),_:1})]),_:1},8,["title"])):ae("",!0),i(e).certificateCredit===1&&i(e).tempOffsetAllocatedGranularityId===1?(B(),Q(Ae,{key:7,title:n.$t("data.certificateCredit.offsettedAllocationVolume"),size:"small"},{"header-extra":o(()=>[]),default:o(()=>[a(se,{"label-placement":"left","label-align":"left",style:{height:"35px"}},{default:o(()=>[a(Y,{"x-gap":20,cols:"18 1024:33 "},{default:o(()=>[a(g,{span:6},{default:o(()=>[a(R,{value:i(e).offsettedAllocationVolumeTco2e,"onUpdate:value":l[27]||(l[27]=r=>i(e).offsettedAllocationVolumeTco2e=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[gl]),_:1},8,["value"])]),_:1})]),_:1})]),_:1})]),_:1},8,["title"])):ae("",!0),ze(a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:24},{default:o(()=>[W("p",Al,ee(n.$t("data.certificateCredit.scopeTips")),1)]),_:1})]),_:1},512),[[je,i(e).certificateCredit===1&&i(e).tempOffsetAllocatedGranularityId!==1]]),a(Se,{style:{"max-height":"300px"}},{default:o(()=>[ze(a(Ae,{title:n.$t("data.certificateCredit.scope1"),size:"small"},{default:o(()=>[a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope1"),"label-placement":"top",path:"offsetAllocationScope1"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope1,"onUpdate:value":l[28]||(l[28]=r=>i(e).offsetAllocationScope1=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[yl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope1"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope1,"onUpdate:value":l[29]||(l[29]=r=>i(e).offsetAllocatedScope1=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[_l]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope1"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope1,"onUpdate:value":l[30]||(l[30]=r=>i(e).offsetAllocationVolumeScope1=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Sl]),_:1},8,["value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"]),[[je,i(e).certificateCredit===1&&i(e).tempOffsetAllocatedGranularityId!==1]]),ze(a(Ae,{title:n.$t("data.certificateCredit.scope2"),size:"small"},{"header-extra":o(()=>[]),default:o(()=>[a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope2"),"label-placement":"top",path:"offsetAllocationScope2"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope2,"onUpdate:value":l[31]||(l[31]=r=>i(e).offsetAllocationScope2=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[El]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope2"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope2,"onUpdate:value":l[32]||(l[32]=r=>i(e).offsetAllocatedScope2=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[bl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope2"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope2,"onUpdate:value":l[33]||(l[33]=r=>i(e).offsetAllocationVolumeScope2=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Cl]),_:1},8,["value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"]),[[je,i(e).certificateCredit===1&&i(e).tempOffsetAllocatedGranularityId!==1]]),ze(a(Ae,{title:n.$t("data.certificateCredit.scope3"),size:"small"},{"header-extra":o(()=>[]),default:o(()=>[a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category1"),"label-placement":"top",path:"offsetAllocationScope3category1"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category1,"onUpdate:value":l[34]||(l[34]=r=>i(e).offsetAllocationScope3category1=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[Tl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category1"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category1,"onUpdate:value":l[35]||(l[35]=r=>i(e).offsetAllocatedScope3category1=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[vl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category1"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category1,"onUpdate:value":l[36]||(l[36]=r=>i(e).offsetAllocationVolumeScope3category1=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Il]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category2"),"label-placement":"top",path:"offsetAllocationScope3category2"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category2,"onUpdate:value":l[37]||(l[37]=r=>i(e).offsetAllocationScope3category2=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[hl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category2"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category2,"onUpdate:value":l[38]||(l[38]=r=>i(e).offsetAllocatedScope3category2=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Rl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category2"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category2,"onUpdate:value":l[39]||(l[39]=r=>i(e).offsetAllocationVolumeScope3category2=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Nl]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category3"),"label-placement":"top",path:"offsetAllocationScope3category3"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category3,"onUpdate:value":l[40]||(l[40]=r=>i(e).offsetAllocationScope3category3=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[Ol]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category3"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category3,"onUpdate:value":l[41]||(l[41]=r=>i(e).offsetAllocatedScope3category3=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Ul]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category3"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category3,"onUpdate:value":l[42]||(l[42]=r=>i(e).offsetAllocationVolumeScope3category3=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Dl]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category4"),"label-placement":"top",path:"offsetAllocationScope3category4"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category4,"onUpdate:value":l[43]||(l[43]=r=>i(e).offsetAllocationScope3category4=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[Vl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category4"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category4,"onUpdate:value":l[44]||(l[44]=r=>i(e).offsetAllocatedScope3category4=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[wl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category4"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category4,"onUpdate:value":l[45]||(l[45]=r=>i(e).offsetAllocationVolumeScope3category4=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Bl]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category5"),"label-placement":"top",path:"offsetAllocationScope3category5"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category5,"onUpdate:value":l[46]||(l[46]=r=>i(e).offsetAllocationScope3category5=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[Ml]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category5"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category5,"onUpdate:value":l[47]||(l[47]=r=>i(e).offsetAllocatedScope3category5=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Ll]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category5"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category5,"onUpdate:value":l[48]||(l[48]=r=>i(e).offsetAllocationVolumeScope3category5=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[kl]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category6"),"label-placement":"top",path:"offsetAllocationScope3category6"},{default:o(()=>[a(R,{
1value:i(e).offsetAllocationScope3category6,"onUpdate:value":l[49]||(l[49]=r=>i(e).offsetAllocationScope3category6=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[Fl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category6"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category6,"onUpdate:value":l[50]||(l[50]=r=>i(e).offsetAllocatedScope3category6=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Pl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category6"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category6,"onUpdate:value":l[51]||(l[51]=r=>i(e).offsetAllocationVolumeScope3category6=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Kl]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category7"),"label-placement":"top",path:"offsetAllocationScope3category7"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category7,"onUpdate:value":l[52]||(l[52]=r=>i(e).offsetAllocationScope3category7=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[Gl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category7"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category7,"onUpdate:value":l[53]||(l[53]=r=>i(e).offsetAllocatedScope3category7=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Yl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category7"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category7,"onUpdate:value":l[54]||(l[54]=r=>i(e).offsetAllocationVolumeScope3category7=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[$l]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category8"),"label-placement":"top",path:"offsetAllocationScope3category8"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category8,"onUpdate:value":l[55]||(l[55]=r=>i(e).offsetAllocationScope3category8=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[xl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category8"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category8,"onUpdate:value":l[56]||(l[56]=r=>i(e).offsetAllocatedScope3category8=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[zl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category8"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category8,"onUpdate:value":l[57]||(l[57]=r=>i(e).offsetAllocationVolumeScope3category8=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[jl]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category9"),"label-placement":"top",path:"offsetAllocationScope3category9"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category9,"onUpdate:value":l[58]||(l[58]=r=>i(e).offsetAllocationScope3category9=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[Wl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category9"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category9,"onUpdate:value":l[59]||(l[59]=r=>
1i(e).offsetAllocatedScope3category9=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Hl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category9"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category9,"onUpdate:value":l[60]||(l[60]=r=>i(e).offsetAllocationVolumeScope3category9=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Zl]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category10"),"label-placement":"top",path:"offsetAllocationScope3category10"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category10,"onUpdate:value":l[61]||(l[61]=r=>i(e).offsetAllocationScope3category10=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[ql]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category10"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category10,"onUpdate:value":l[62]||(l[62]=r=>i(e).offsetAllocatedScope3category10=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Jl]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category10"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category10,"onUpdate:value":l[63]||(l[63]=r=>i(e).offsetAllocationVolumeScope3category10=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[Xl]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category11"),"label-placement":"top",path:"offsetAllocationScope3category11"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category11,"onUpdate:value":l[64]||(l[64]=r=>i(e).offsetAllocationScope3category11=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[Ql]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category11"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category11,"onUpdate:value":l[65]||(l[65]=r=>i(e).offsetAllocatedScope3category11=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[ei]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category11"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category11,"onUpdate:value":l[66]||(l[66]=r=>i(e).offsetAllocationVolumeScope3category11=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[ti]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category12"),"label-placement":"top",path:"offsetAllocationScope3category12"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category12,"onUpdate:value":l[67]||(l[67]=r=>i(e).offsetAllocationScope3category12=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[ai]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category12"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category12,"onUpdate:value":l[68]||(l[68]=r=>i(e).offsetAllocatedScope3category12=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[oi]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category12"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category12,"onUpdate:value":l[69]||(l[69]=r=>i(e).offsetAllocationVolumeScope3category12=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[li]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category13"),"label-placement":"top",path:"offsetAllocationScope3category13"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category13,"onUpdate:value":l[70]||(l[70]=r=>i(e).offsetAllocationScope3category13=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[ii]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category13"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category13,"onUpdate:value":l[71]||(l[71]=r=>i(e).offsetAllocatedScope3category13=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[ri]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category13"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category13,"onUpdate:value":l[72]||(l[72]=r=>i(e).offsetAllocationVolumeScope3category13=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[ni]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category14"),"label-placement":"top",path:"offsetAllocationScope3category14"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category14,"onUpdate:value":l[73]||(l[73]=r=>i(e).offsetAllocationScope3category14=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[ci]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category14"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category14,"onUpdate:value":l[74]||(l[74]=r=>i(e).offsetAllocatedScope3category14=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[si]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category14"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category14,"onUpdate:value":l[75]||(l[75]=r=>i(e).offsetAllocationVolumeScope3category14=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[di]),_:1},8,["value"])]),_:1},8,["label"])]),_:1}),a(Y,{"x-gap":8,"y-gap":8,cols:24},{default:o(()=>[a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationScope3category15"),"label-placement":"top",path:"offsetAllocationScope3category15"},{default:o(()=>[a(R,{value:i(e).offsetAllocationScope3category15,"onUpdate:value":l[76]||(l[76]=r=>i(e).offsetAllocationScope3category15=r),class:"form-item",style:{width:"100%"},parse:u,format:t,clearable:""},{suffix:o(()=>[fi]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocatedScope3category15"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocatedScope3category15,"onUpdate:value":l[77]||(l[77]=r=>i(e).offsetAllocatedScope3category15=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[ui]),_:1},8,["value"])]),_:1},8,["label"]),a(g,{span:6,label:n.$t("data.certificateCredit.offsetAllocationVolumeScope3category15"),"label-placement":"top"},{default:o(()=>[a(R,{value:i(e).offsetAllocationVolumeScope3category15,"onUpdate:value":l[78]||(l[78]=r=>i(e).offsetAllocationVolumeScope3category15=r),class:"form-item",style:{width:"100%"},parse:u,format:t,disabled:""},{suffix:o(()=>[pi]),_:1},8,["value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"]),[[je,i(e).certificateCredit===1&&i(e).tempOffsetAllocatedGranularityId!==1]])]),_:1})]),_:1},8,["model"])):ae("",!0),ze(a(Vt,{ref_key:"dataTableRef",ref:N,remote:"",columns:i(A),data:i(v),loading:i(m),pagination:i(E),bordered:!1,"flex-height":"",style:{height:"100vh"},"onUpdate:page":i(te),"onUpdate:pageSize":i(w),"onUpdate:sorter":i(le)},null,8,["columns","data","loading","pagination","onUpdate:page","onUpdate:pageSize","onUpdate:sorter"]),[[je,U.value===1&&Z.value]])],64)}}});var gi=Le(mi,[["__scopeId","data-v-02d9d3b6"]]);const Ai=D=>(vt("data-v-337f7f7a"),D=D(),It(),D),yi={class:"search"},_i={class:"toolbar certificate-search-toolbar"},Si={class:"toolbar-left"},Ei={class:"tb-field tb-field-cc"},bi={class:"tb-field"},Ci={class:"tb-year-inner"},Ti={class:"tb-year-range"},vi=Ai(()=>W("span",{class:"tb-year-tilde"},"~",-1)),Ii={class:"tb-field tb-search-field"},hi={class:"toolbar-right tb-field-mukouka"},Ri=ke({name:"index",props:{data:{type:Object,default:()=>({})}},setup(D,{expose:G}){const C=D,{isLoading:_,reset:c}=so({name:"offset",loading:2});ka();const{t:y}=Ve(),k=Fa(),{flagRef:N,modalTitleRef:Z}=Pa(y(k)),f=ot(),U=Lt({open:()=>N.value=!0}),K=Lt({open:()=>(c(),N.value=!0)}),u=lt(),{editRow:t,offsetRow:S,deleteRow:F}=aa(),M=L(null),{orderBy:oe,sorterChange:z}=bt(),e=j({company:[],certificate_credit:[],certificate_type:[],credit_type:[],mukouka_type:[]}),A=j({company:{},certificate_credit:{},certificate_type:{},credit_type:{},mukouka_type:{}}),m=()=>{U.visibleRef.value=!0,U.open(()=>s.value=null)};Xe({dict:["certificate_credit","certificate_type","credit_type","mukouka_type"]}).then(r=>{Object.assign(e,...r[0],{});const{certificate_credit:V,certificate_type:ne,credit_type:pe,mukouka_type:Pe}=e;Object.assign(A,De({certificate_credit:V,certificate_type:ne,credit_type:pe,mukouka_type:Pe}))});const E=j((()=>({companyId:Oe().companyId.value,searchKeyword:null,startYear:null,endYear:null,certificateCreditId:null,certificateCreditTypeId:null,mukoukaId:1}))());X([()=>C.data],r=>{Object.assign(E,r[0])},{deep:!0,immediate:!0}),X(()=>E.certificateCreditId,()=>{E.certificateCreditTypeId=null});const P=L(!1),w=Gt.exports.debounce(()=>{H(!0)},400);X(()=>[E.certificateCreditId,E.certificateCreditTypeId,E.startYear,E.endYear,E.mukoukaId],()=>{!P.value||w()});const te=r=>{if(r==null||typeof r!="string")return null;const V=r.trim();return V.length>0?V:null},le=()=>{E.searchKeyword=te(E.searchKeyword),H(!0)},re=()=>{E.searchKeyword=null,H(!0)},ce=()=>{const r=te(E.searchKeyword);E.searchKeyword=r,H(!0)},I=()=>{E.searchKeyword=te(E.searchKeyword),H(!0)},s=L(null),x=L(null),T=r=>{var V;return{disabled:!$.value.includes((V=r.certificateCredit)==null?void 0:V.companyId)&&Oe().companyId.value!==0}},h=L([]),Re=L([]),Ie=r=>r.certificateCredit.id,Ce=L(!1),Ne=r=>{Ce.value=!0;const V=r.filter(ne=>ne.certificateCredit.id!=null&&ne.certificateCredit.id>0).map(ne=>ne.certificateCredit.id);Re.value=V},ue=[{title:y("data.certificateCredit.certificateCreditName"),key:"certificateCredit.certificateCreditName",align:"center",width:200,minWidth:60,sorter:"default",resizable:!0,ellipsis:{tooltip:!0}},{title:y("data.company"),key:"certificateCredit.companyId",align:"left",sorter:"default",width:150,resizable:!0,render:r=>{var V,ne;return((ne=A.company)==null?void 0:ne[(V=r.certificateCredit)==null?void 0:V.companyId])||""}},{title:y("data.certificateCredit.certificateCredit"),key:"certificateCredit.certificateCredit",align:"center",width:150,minWidth:60,sorter:"default",ellipsis:{tooltip:!0},resizable:!0,render:r=>{var V,ne;return((ne=A.certificate_credit)==null?void 0:ne[(V=r.certificateCredit)==null?void 0:V.certificateCredit])||""}},{title:y("data.certificateCredit.certificateCreditType"),key:"certificateCredit.certificateCreditType",align:"center",width:150,minWidth:60,sorter:"default",ellipsis:{tooltip:!0},resizable:!0,render:r=>{var V,ne,pe,Pe;return r.certificateCredit.certificateCredit==0?((ne=A.certificate_type)==null?void 0:ne[(V=r.certificateCredit)==null?void 0:V.certificateCreditType])||"":((Pe=A.credit_type)==null?void 0:Pe[(pe=r.certificateCredit)==null?void 0:pe.certificateCreditType])||""}},{title:y("data.certificateCredit.availableBalance"),key:"certificateCredit.availableBalance",align:"center",width:150,minWidth:60,sorter:"default",ellipsis:{tooltip:!0},render:r=>r.certificateCredit.availableBalance<0?"":r.certificateCredit.certificateCredit==0?me(r.certificateCredit.availableBalance,{fixed:2})+"kWh":me(r.certificateCredit.availableBalance,{fixed:2})+"t-CO\u2082e"},{title:y("data.certificateCredit.mukoukaId"),key:"certificateCredit.mukoukaId",align:"center",width:110,minWidth:60,sorter:"default",ellipsis:{tooltip:!0},resizable:!0,render:r=>{var V,ne;return((ne=A.mukouka_type)==null?void 0:ne[(V=r.certificateCredit)==null?void 0:V.mukoukaId])||""}},{title:y("data.active.table.createTime"),key:"certificateCredit.createTime",align:"center",width:be()==="0"?110:130,ellipsis:{tooltip:!0},minWidth:60,resizable:!0,sorter:"default",render:r=>ie(r.certificateCredit.createTime).format("YYYY-MM-DD")},{title:y("data.active.table.updateTime"),key:"certificateCredit.updateTime",align:"center",width:be()==="0"?110:130,ellipsis:{tooltip:!0},minWidth:60,sorter:"default",resizable:!0,render:r=>ie(r.certificateCredit.updateTime).format("YYYY-MM-DD")},{title:y("data.active.table.action"),key:"operators",align:"center",width:150,fixed:"right",render:r=>Yt(...f.validate($e)?[t(r,()=>{r.certificateCredit.purchaseDate=Number(r.certificateCredit.purchaseDate),r.certificateCredit.expirationDate=Number(r.certificateCredit.expirationDate),r.certificateCredit.confirmedForUseKwh=r.certificateCredit.confirmedForUseKwh,r.certificateCredit.availableBalance=r.certificateCredit.availableBalance,r.certificateCredit.suryoTco2e=r.certificateCredit.availableBalance,console.log(JSON.stringify(r)),r.certificateCredit.certificateCredit===1&&(r.certificateCredit.expirationDate=null),r.certificateCredit.certificateCredit===1&&(r.certificateCredit.confirmedForUseKwh=null),s.value=r,U.open(()=>N.value=!1)},T),S(r,()=>{r.certificateCredit.purchaseDate=Number(r.certificateCredit.purchaseDate),r.certificateCredit.expirationDate=Number(r.certificateCredit.expirationDate),x.value=r,K.open(()=>N.value=!1)},T),Ee(At,{},{trigger:()=>Ee(fe,{circle:!0,size:"small",color:"#14AD00",type:"warning",onClick:async()=>
1{l(r)}},{icon:()=>Ee(We,null,()=>Ee(fo))}),default:()=>y("common.attach")}),F(r,()=>u.delete(()=>Ka(r)).then(()=>{O.page=1,he(y("event.delete",{screen:y("menus.data.certificateCredit")}),{method:"Delete",screen_name:y("menus.data.certificateCredit")}),H()}),T)]:[])}],$=L([]);Ct({mode:He.CHILD_DIRECT}).then(r=>{var V;$.value=[Oe().companyId.value,...(V=r==null?void 0:r.body)==null?void 0:V.map(ne=>ne.value)]});const q=j({visible:!1,params:{companyId:null,id:null,certificateCreditName:null}}),n=r=>{q.visible=r,H(!1)},l=r=>{const{companyId:V,id:ne,certificateCreditName:pe}=r.certificateCredit;Object.assign(q.params,{companyId:V,id:ne,certificateCreditName:pe}),q.visible=!0},p=L(),J={purchaseYear:{validator(){const r=ie(E.startYear,"YYYY").isValid()?ie(E.startYear,"YYYY"):null,V=ie(E.endYear,"YYYY").isValid()?ie(E.endYear,"YYYY"):null;if(r&&V&&V.isBefore(r))return new Error(y("message.CMPF0043-W",[y("data.certificateCredit.purchaseYear")]))},trigger:["blur","change"]}},d=L(!1),{pagination:O,pageParams:g}=Ut(E),H=(r=!0)=>{var V;(V=p==null?void 0:p.value)==null||V.validate(async ne=>{ne||(d.value=!0,r&&(O.page=1),Et({mode:He.PARENT_RECURSIVE_CHILD_DIRECT}).then(pe=>{A.company=Object.assign(pe,{0:y("common.common")})}),Ga(we(ve(ve({},g()),E),{sort:oe!=null&&oe.value?oe.value:null,startYear:E.startYear?Je(new Date(E.startYear),"yyyy"):null,endYear:E.endYear?Je(new Date(E.endYear),"yyyy"):null,companyId:E.companyId?E.companyId:Oe().companyId.value,searchKeyword:E.searchKeyword||null})).then(pe=>{var Pe,st,dt;h.value=((Pe=pe==null?void 0:pe.body)==null?void 0:Pe.list)||[],O.page=((st=pe==null?void 0:pe.body)==null?void 0:st.pageNum)||1,O.itemCount=(dt=pe==null?void 0:pe.body)==null?void 0:dt.total,d.value=!1,Ne(h.value)}))})},de=()=>{H(!1)},Y=r=>{const V=new Map([["certificateCredit.companyId","companyId"],["certificateCredit.certificateCredit","certificateCredit"],["certificateCredit.certificateCreditName","certificateCreditName"],["certificateCredit.certificateCreditType","certificateCreditType"],["certificateCredit.availableBalance","availableBalance"],["certificateCredit.mukoukaId","mukoukaId"],["certificateCredit.updateTime","updateTime"],["certificateCredit.createTime","createTime"]]);Promise.all([z(r,V)]).then(()=>{H(!0)})};Qe(()=>{H(),ht(()=>{P.value=!0}),Tt(y("menus.data.certificateCreditList")),he(y("event.initScreen",{screen:y("menus.data.certificateCreditList")}))});const ge=L(null),Te=L(null),se=L(""),Fe=L(!0),R=()=>{ge.value.save(()=>{U.close(),he(N.value?y("event.update",{screen:y("menus.data.certificateCreditList")}):y("event.add",{screen:y("menus.data.certificateCreditList")}),{method:N.value?"Update":"Create",screen_name:y("menus.data.certificateCreditList")}),H()})},Ge=()=>{Te.value.currentStepRef==2?(Te.value.currentStepRef=1,Fe.value=!0):K.close()},Ae=()=>{Te.value.offset(()=>{K.close(),he(N.value?y("event.update",{screen:y("menus.data.certificateCreditList")}):y("event.add",{screen:y("menus.data.certificateCreditList")}),{method:N.value?"Update":"Create",screen_name:y("menus.data.certificateCreditList")}),H()})},Se=r=>{se.value=y(`data.certificateCredit.steps[${r}]`),r===2&&(Fe.value=!1)},Vt=r=>{O.pageSize=r,H(!0)};return G({handleAddCertificateCreditList:m}),(r,V)=>{const ne=it,pe=ct,Pe=kt,st=rt,dt=Ya,na=xe,ca=nt,$t=et;return B(),_e(Ue,null,[W("div",yi,[a(na,{ref_key:"searchFormRef",ref:p,model:E,rules:J,"label-placement":"left","label-width":0,"label-align":"left",class:"search-form-flat"},{default:o(()=>[W("div",_i,[W("div",Si,[W("div",Ei,[a(ne,{value:E.certificateCreditId,"onUpdate:value":V[0]||(V[0]=ye=>E.certificateCreditId=ye),clearable:"",class:"pill select-cert-credit",placeholder:r.$t("data.certificateCredit.certificateCredit"),options:e.certificate_credit},null,8,["value","placeholder","options"])]),W("div",bi,[a(ne,{value:E.certificateCreditTypeId,"onUpdate:value":V[1]||(V[1]=ye=>E.certificateCreditTypeId=ye),clearable:"",class:"pill select-type",disabled:E.certificateCreditId!==0&&E.certificateCreditId!==1,placeholder:r.$t("data.certificateCredit.certificateCreditType"),options:E.certificateCreditId===0?e.certificate_type:e.credit_type},null,8,["value","disabled","placeholder","options"])]),a(Pe,{path:"purchaseYear","show-label":!1,class:"tb-field tb-year-form-item"},{default:o(()=>[W("div",Ci,[W("div",Ti,[a(pe,{value:E.startYear,"onUpdate:value":V[2]||(V[2]=ye=>E.startYear=ye),class:"pill","value-format":"yyyy",type:"year",actions:["clear","now"],"input-readonly":"",placeholder:r.$t("data.certificateCredit.startYear")},null,8,["value","placeholder"]),vi,a(pe,{value:E.endYear,"onUpdate:value":V[3]||(V[3]=ye=>E.endYear=ye),class:"pill","value-format":"yyyy",type:"year",actions:["clear","now"],"input-readonly":"",placeholder:r.$t("data.certificateCredit.endYear")},null,8,["value","placeholder"])])])]),_:1}),W("div",Ii,[a(st,{value:E.searchKeyword,"onUpdate:value":V[4]||(V[4]=ye=>E.searchKeyword=ye),clearable:"",maxlength:"255",class:"pill tb-search-input search-pill",placeholder:r.$t("common.search"),onBlur:le,onClear:re,onKeyup:Jt(ce,["enter"])},{suffix:o(()=>[a(i(We),{size:"16",class:"search-suffix",onClick:Xt(I,["stop"])},{default:o(()=>[a(i(la))]),_:1},8,["onClick"])]),_:1},8,["value","placeholder","onKeyup"])])]),W("div",hi,[a(dt,{class:"pill-group"},{default:o(()=>[a(i(fe),{type:E.mukoukaId===1?"primary":"default",class:"pill left",onClick:V[5]||(V[5]=ye=>E.mukoukaId=1)},{default:o(()=>[b(ee(r.$t("data.certificateCredit.segmentInvalidated")),1)]),_:1},8,["type"]),a(i(fe),{type:E.mukoukaId===0?"primary":"default",class:"pill right",onClick:V[6]||(V[6]=ye=>E.mukoukaId=0)},{default:o(()=>[b(ee(r.$t("data.certificateCredit.segmentNotInvalidated")),1)]),_:1},8,["type"])]),_:1})])])]),_:1},8,["model"])]),a(ca,{ref_key:"dataTableRef",ref:M,"row-key":Ie,remote:"",columns:i(Oe)().companyId.value>0&&i(f).validate(i($e))?ue:ue.slice(1),data:h.value,loading:d.value,pagination:i(O),bordered:!1,"flex-height":"",style:{height:"100vh"},"onUpdate:page":de,"onUpdate:pageSize":Vt,"onUpdate:sorter":Y},null,8,["columns","data","loading","pagination"]),a(Be,{id:Be.uuid(),show:i(U).visibleRef.value,"onUpdate:show":V[8]||(V[8]=ye=>
1i(U).visibleRef.value=ye),preset:"card",title:i(Z),style:{width:"1200px"},class:"fixed-dialog-container",bordered:!1,size:"huge","mask-closable":!1},{footer:o(()=>[a($t,{justify:"end"},{default:o(()=>[a(i(fe),{type:"primary",ghost:"",onClick:V[7]||(V[7]=ye=>i(U).close())},{default:o(()=>[b(ee(r.$t("common.cancel")),1)]),_:1}),a(i(fe),{type:"primary",onClick:R},{default:o(()=>[b(ee(r.$t("common.ok")),1)]),_:1})]),_:1})]),default:o(()=>[a(zo,{ref_key:"saveFormRef",ref:ge,data:s.value},null,8,["data"])]),_:1},8,["id","show","title"]),a(Be,{id:Be.uuid(),show:i(K).visibleRef.value,"onUpdate:show":V[9]||(V[9]=ye=>i(K).visibleRef.value=ye),preset:"card",title:se.value,style:{width:"1500px"},class:"fixed-dialog-container",bordered:!1,size:"huge","mask-closable":!1},{footer:o(()=>[a($t,{justify:"end"},{default:o(()=>[a(i(fe),{type:"primary",ghost:"",onClick:Ge},{default:o(()=>[b(ee(r.$t("common.cancel")),1)]),_:1}),a(i(fe),{type:"primary",disabled:Fe.value,onClick:Ae},{default:o(()=>[b(ee(r.$t("common.ok")),1)]),_:1},8,["disabled"])]),_:1})]),default:o(()=>[a(gi,{ref_key:"offsetModalRef",ref:Te,data:x.value,onUpdateTitleStatus:Se},null,8,["data"])]),_:1},8,["id","show","title"]),a(Jo,{visible:q.visible,params:q.params,onHandleCloseEditModal:n},null,8,["visible","params"])],64)}}});var Ni=Le(Ri,[["__scopeId","data-v-337f7f7a"]]);const ra={getEmissionOffsetRate:"/allocation/getEmissionOffsetRate",getOffsetEmissionForBar:"/allocation/getOffsetEmissionForBar"},Oi=D=>Kt({url:ra.getEmissionOffsetRate,method:"GET",params:D}),Ui=D=>Kt({url:ra.getOffsetEmissionForBar,method:"GET",params:D});const Di={class:"title"},Vi={name:"CertificateCreditBarChart"},wi=ke(we(ve({},Vi),{props:{visible:{type:Boolean,default:!1},unit:{type:Object,default:()=>({id:0,key:"",label:""})},options:{type:Array,default:()=>[]}},emits:["change-unit"],setup(D,{emit:G}){const C=D,_=L(null),{t:c}=Ve(),y=j({title:Object.assign({},Bt.title,{subtext:"",text:c("analysis.totalTitle")}),tooltip:Object.assign({},Bt.tooltip,{formatter:go}),legend:{type:"scroll",itemWidth:16,itemHeight:16,bottom:"bottom",left:"center",icon:"circle",textStyle:{fontSize:14}},series:[{type:"pie",center:["50%","48%"],radius:["40%","70%"],selectedMode:"single",selectedOffset:10,clockwise:!1,data:[],label:{formatter:({name:t,value:S,percent:F})=>{const{formattedName:M,styleName:oe}=$a(t,8);return`{${oe}|${M}}
2${Ye(S)}
3${F}%`},rich:Bt.label.rich,minMargin:5,edgeDistance:10,lineHeight:15,color:"auto",fontSize:14},labelLine:{length:28},tooltip:{valueFormatter:t=>Ye(t),textStyle:{fontSize:14}},itemStyle:{borderColor:"white",borderWidth:2}}],animationEasing:"elasticOut"}),k=j([]),N=t=>{y.series[0].data.splice(0,1/0,...k.map(({certificateCreditName:S,emissionVolume:F})=>({value:at(F,t.value),name:S,label:{show:S!=="left"},labelLine:{show:S!=="left"},tooltip:{show:S!=="left"},itemStyle:{color:po[S]}}))),y.title.subtext=xa(k.map(({emissionVolume:S})=>at(S,t.value)).reduce((S,F)=>S+F,0),2),y.legend.data=k.filter(({certificateCreditName:S})=>S!=="left").map(({certificateCreditName:S})=>S),G("change-unit",t)};X(()=>C.unit,()=>{N(C.unit)},{immediate:!0});const Z=()=>{const{companyId:t,startMonth:S,endMonth:F}=f;Oi({companyId:t,startMonth:S,endMonth:F,language:be()}).then(({body:M})=>{k.splice(0,1/0,...M||[]),N(C.unit)})},{formReact:f,yearRef:U}=uo(Z),K=Ke.CERTIFICATE_CREDIT_BAR_CHART.key,u=(t,S)=>{const F=j({id:C.unit.id,value:St(t),label:S,key:t,div:K});N(F),ea({id:C.unit.id,unitKbn:t,unitTarget:K})};return(t,S)=>{const F=ta,M=_t("v-chart"),oe=_t("XyzTransition"),z=tt,e=Ze;return B(),Q(e,null,{default:o(()=>[a(z,{span:24},{default:o(()=>[W("span",null,[W("span",Di,ee(i(c)("menus.data.title",[i(U)])),1),a(F,{options:C.options,unit:C.unit,onChange:u},null,8,["options","unit"])]),a(oe,{xyz:"fade small narrow thick"},{default:o(()=>[C.visible?(B(),Q(M,{key:0,ref_key:"chartRef",ref:_,style:{height:"var(--height)"},theme:"camTheme",autoresize:"",option:y},null,8,["option"])):ae("",!0)]),_:1})]),_:1})]),_:1})}}}));var Bi=Le(wi,[["__scopeId","data-v-cef50688"]]);const Mi={class:"title"},Li={name:"CertificateCreditPredictChart"},ki=ke(we(ve({},Li),{props:{visible:{type:Boolean,default:!1},unit:{type:Object,default:()=>({id:0,key:"",label:""})},options:{type:Array,default:()=>[]}},emits:["change-unit"],setup(D,{emit:G}){const C=D,_=L(null),{t:c}=Ve(),y=Me(()=>Ht.state.useGradient),k=Me(()=>Ht.state.chartGradientTheme),N=L(!1),Z=j({}),f=j({grid:{left:"5%",right:"5%",containLabel:!0},tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:"#999"}},textStyle:{fontSize:14}},legend:{data:[{name:c("menus.data.predictGraph.subject1"),itemStyle:{color:"#004386"}},{name:c("menus.data.predictGraph.subject2"),itemStyle:{color:"#0198d8"}},{name:c("menus.data.predictGraph.subject3"),itemStyle:{color:"#FFED98"}}
3],top:10,width:"50%",right:"10%",type:"scroll",textStyle:{color:"#8E8EA1",fontSize:14}},xAxis:[{type:"category",data:[],axisPointer:{type:"shadow"},splitLine:{show:!1},axisLabel:{fontSize:14}}],yAxis:[{type:"value",axisLabel:{fontSize:14}}],series:[{name:c("menus.data.predictGraph.subject1"),type:"line",label:{show:!1,formatter({value:S}){return Ye(S)},fontSize:14,color:"auto",position:"top",padding:[0,0,15,0]},data:[],itemStyle:{borderRadius:8,color:y.value?k.value[1]:void 0},emphasis:{focus:"series"},barGap:"-30%",animationDelay:function(S){return S*20+100},tooltip:{valueFormatter:S=>Ye(S)}},{name:c("menus.data.predictGraph.subject2"),type:"bar",stack:"Total",label:{show:!1,formatter({value:S}){return Ye(S)},fontSize:14,position:"top",color:"auto"},data:[],itemStyle:{borderRadius:8},emphasis:{focus:"series"},animationDelay:function(S){return S*10+100},tooltip:{valueFormatter:S=>Ye(S)}},{name:c("menus.data.predictGraph.subject3"),type:"bar",stack:"Total",label:{show:!1,formatter({value:S}){return Ye(S)},fontSize:14,position:"top",color:"auto"},data:[],itemStyle:{borderRadius:8},emphasis:{focus:"series"},animationDelay:function(S){return S*10+100},tooltip:{valueFormatter:S=>Ye(S)}}],animationDuration:2e3,animationEasing:"elasticOut",animationDelayUpdate:function(S){return S*5}}),U=Ke.CERTIFICATE_CREDIT_PREDICT_CHART.key,K=(S,F)=>{const M=j({id:C.unit.id,value:St(S),label:F,key:S,div:U});t(Z,M),ea({id:C.unit.id,unitKbn:S,unitTarget:U})},u=L(null),t=(S,F)=>{f.series[1].data.splice(0,1/0,...S.allYearAndMonth.map(M=>({value:at(M,F.value),name:M,itemStyle:{color:"#0198d8"}}))),f.series[0].data.splice(0,1/0,...S.offsetYearEmissionInfos.map(M=>({value:at(M,F.value),name:M,itemStyle:{color:"#004386"}}))),f.series[2].data.splice(0,1/0,...S.negative.map(M=>({value:at(M,F.value),name:M,itemStyle:{color:"#FFED98"}}))),G("change-unit",F)};return Qe(()=>{Ha(S=>{if(S!=null&&S!=null&&(u.value=S),C.unit.key!=null&&C.unit.key!=""){const F={companyId:S==null?u.value:S,companyStartMonth:yt()};Ui(F).then(M=>{Object.assign(Z,M.body),f.xAxis[0].data.splice(0,1/0,...Z.year),t(Z,C.unit),N.value=!0})}})}),(S,F)=>{const M=ta,oe=_t("v-chart"),z=_t("XyzTransition"),e=tt,A=Ze;return B(),Q(A,null,{default:o(()=>[a(e,{span:24},{default:o(()=>[W("span",null,[W("span",Mi,ee(i(c)("menus.data.barTitle")),1),a(M,{options:C.options,unit:C.unit,onChange:K},null,8,["options","unit"])]),a(z,{xyz:"fade down"},{default:o(()=>[C.visible&&N.value?(B(),Q(oe,{key:0,ref_key:"chartRef",ref:_,theme:"camTheme",autoresize:"",option:f,"update-options":["transition"],style:{height:"400px"}},null,8,["option"])):ae("",!0)]),_:1})]),_:1})]),_:1})}}}));var Fi=Le(ki,[["__scopeId","data-v-89aaefd8"]]);const Pi={class:"dash-box"},Ki={class:"line-item"},Gi={class:"line-item"},Yi={name:"AnalysisScope"},$i=ke(we(ve({},Yi),{props:{unit:{type:Map,default:()=>{}},options:{type:Array,default:()=>[]},baseOptions:{type:Array,default:()=>[]}},setup(D){const G=D,{t:C}=Ve(),_=Ft(null),c=za(),y=new ja("yearMap"),k=j({year:y.exists("credit")?ie(y.get("credit")).valueOf():ie(_.lastYear,"YYYY").valueOf()});mo(k),X(()=>k.year,(u,t)=>{y.put("credit",ie(u).format("YYYY").valueOf())});const N=L(!1),Z=L(0),f=Gt.exports.throttle(()=>{var M;const u=c.state.globalConfig.globalStyle,t=parseInt(u.layoutHeaderHeight),S=document.documentElement.clientHeight,F=((M=document.querySelector(".top-extra"))==null?void 0:M.clientHeight)||0;Z.value=S-t-F-76,ht(()=>{N.value=!0})},1e3,{trailing:!0});Qe(async()=>{f(),window.addEventListener("resize",()=>f(),!1),Tt(C("analysis.tab.summary")),he(C("event.initScreen",{screen:C("analysis.tab.summary")}),{method:"Init",screen_name:C("analysis.tab.summary")})}),Wa(()=>{window.removeEventListener("resize",()=>f(),!1)});const U=u=>{G.unit.set(u.div,u)},K=u=>{G.unit.set(u.div,u)};return(u,t)=>{const S=ct,F=Dt,M=Ze,oe=xe,z=Ot,e=tt,A=Nt;return B(),_e(Ue,null,[a(oe,null,{default:o(()=>[a(M,{"x-gap":30,"y-gap":5,cols:24},{default:o(()=>[a(F,{span:12,"label-width":100,label:u.$t("analysis.searchBar.title"),"label-placement":"left","label-align":"left",rule:{required:!0},path:"year"},{default:o(()=>[a(S,{value:k.year,"onUpdate:value":t[0]||(t[0]=m=>k.year=m),"input-readonly":"",type:"year",placeholder:u.$t("common.select")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),a(A,{style:{"max-height":"65vh"}},{default:o(()=>[W("div",Pi,[a(M,{"x-gap":30,"y-gap":30,cols:"12 1024:24"},{default:o(()=>[a(e,{class:"gi-left",span:10},{default:o(()=>[a(z,{"content-style":"--height: 400px;"},{default:o(()=>[W("div",Ki,[a(Bi,{visible:N.value,"scope-flg":1,options:G.options,unit:G.unit.get(i(Ke).CERTIFICATE_CREDIT_BAR_CHART.key),onChangeUnit:U},null,8,["visible","options","unit"])])]),_:1})]),_:1}),a(e,{class:"gi-right",span:14},{default:o(()=>[a(z,{"content-style":"height: 400px;"},{default:o(()=>[W("div",Gi,[a(Fi,{visible:N.value,options:G.options,unit:G.unit.get(i(Ke).CERTIFICATE_CREDIT_PREDICT_CHART.key),onChangeUnit:K},null,8,["visible","options","unit"])])]),_:1})]),_:1})]),_:1})])]),_:1})],64)}}}));var xi=Le($i,[["__scopeId","data-v-5077ca3e"]]);const zi=D=>(vt("data-v-8827ef8c"),D=D(),It(),D),ji=zi(()=>W("span",{class:"a-box-title-left"},null,-1)),Wi=ke({name:"index",setup(D){const G=L(null),C=L(null),_=L("certificateCreditList"),c=j({companyId:null});Zt(c);const y=L(2),k=j({}),N=j({}),Z=L(!1),f=j([]),U=j(new Map),{t:K}=Ve(),u=ot();_.value=u.validate(ft)?"certificateCreditList":"allocationList";const t=()=>({resourceId:null,certificateCreditId:null,mukoukaId:"1",deleteFlg:"0"}),S=j(t()),F=e=>{Object.assign(S,t()),_.value=e,e==="graph"?Z.value=!0:Z.value=!1},M=()=>!!(_.value==="certificateCreditList"&&u.validate($e)),oe=()=>{switch(_.value){case"allocationList":C.value.handleAddAllocationList();return;default:G.value.handleAddCertificateCreditList();return}},z=e=>{_.value=e.tabName,Object.assign(S,e)};return Qe(async()=>{await Ct({mode:"01"}).then(m=>{const v=(m==null?void 0:m.body)||[];let E=null;const P=v.map(w=>(w.value==Oe().companyId.value&&v.length>1&&(E=w.label,w.label=E+K("analysis.nonConsolidated")),w));P.length>1?(P.unshift({value:-1,label:E+K("analysis.consolidated")}),c.companyId=-1):c.companyId=Oe().companyId.value,Object.assign(k,{company:P}),Object.assign(N,{company:P}),Zt(c)});const e=new Map,A=new Map;await qa({configCode:"3"}).then(m=>{m.body&&m.body.forEach(v=>{if(v.configCode===3){y.value=Za(v.configValue);return}})}),await Xe({dict:["emission_unit"]}).then(m=>{const v=[];m[0][0].emission_unit.forEach(E=>{const P={key:"",label:""};P.key=E.value,P.label=E.label,v.push(P),e.set(E.value,E.label)}),Object.assign(f,v),Object.keys(Ke).forEach(E=>{const P=j({key:y.value,label:e.get(y.value),value:St(y.value),id:""});Ke[E].key===Ke.ORG_BASE_UNIT.key&&(P.key=900,P.label=A.get(900)),U.set(Ke[
3E].key,P)})}),await Ja().then(m=>{m.body&&m.body.forEach(v=>{const E=j({key:v.unitKbn||y.value,label:e.get(v.unitKbn)||e.get(y.value),value:St(v.unitKbn),id:v.id});v.unitTarget===Ke.ORG_BASE_UNIT.key&&(E.key=v.unitKbn,E.label=A.get(v.unitKbn)),U.set(v.unitTarget,E)})})}),(e,A)=>{const m=fe,v=et,E=it,P=kt,w=xe,te=Pt,le=Ao,re=yo,ce=Ot;return B(),_e(Ue,null,[a(ce,{class:"fixed-main-container",title:e.$t(e.$route.meta.i18n)},{"header-extra":o(()=>[a(v,null,{default:o(()=>[M()?(B(),Q(m,{key:0,ghost:"",color:"#004386",onClick:oe},{default:o(()=>[b(ee(e.$t("common.createBtn")),1)]),_:1})):ae("",!0)]),_:1}),Z.value?(B(),Q(w,{key:0},{default:o(()=>[a(P,{label:e.$t("data.modal.companyId"),rule:{required:!0},"label-placement":"left",path:"companyId",style:{"margin-bottom":"-28px",width:"400px"}},{default:o(()=>[a(E,{value:c.companyId,"onUpdate:value":A[0]||(A[0]=I=>c.companyId=I),options:k.company,filterable:""},null,8,["value","options"])]),_:1},8,["label"])]),_:1})):ae("",!0)]),default:o(()=>[a(te),a(re,{value:_.value,"onUpdate:value":[A[1]||(A[1]=I=>_.value=I),F],type:"line","default-value":"certificateCreditList"},{default:o(()=>[i(u).validate(i(ft))?(B(),Q(le,{key:0,name:"certificateCreditList",tab:e.$t("menus.data.certificateCreditList")},{default:o(()=>[a(Ni,{ref_key:"certificateCreditListRef",ref:G,onGetData:z},null,512)]),_:1},8,["tab"])):ae("",!0),i(u).validate(i(ft))?(B(),Q(le,{key:1,name:"allocationList",tab:e.$t("menus.data.allocationList")},{default:o(()=>[a(No,{ref_key:"allocationListRef",ref:C,data:S},null,8,["data"])]),_:1},8,["tab"])):ae("",!0),i(u).validate(i(ft))?(B(),Q(le,{key:2,name:"graph",tab:e.$t("menus.data.graph")},{default:o(()=>[a(xi,{options:f,unit:U},null,8,["options","unit"])]),_:1},8,["tab"])):ae("",!0)]),_:1},8,["value"])]),_:1},8,["title"]),ji],64)}}});var Ir=Le(Wi,[["__scopeId","data-v-8827ef8c"]]);export{Ir as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.