PageSourceSearch

https://bigcell.co.kr/_nuxt/index.0dfcc887.js

js bigcell.co.kr collected 2026-10-01 23:44:34 UTC 7,969 bytes, 1 lines download raw bytes

1import{_ as V,l as R,o as x,c as U,a as e,t as r,u as I,j as A,q as O,v as n,e as M,b as o,x as q,f as H,w as _,F as L,s as B,g as b,p as F,h as G}from"./entry.897a9779.js";import P from"./inputnumber.esm.85f5c1d7.js";import z from"./column.esm.7b3984bd.js";import X from"./datatable.esm.f057ffe1.js";import{T as J}from"./ToolsService.0a189607.js";import{O as Q}from"./AdminOverseasService.4196db8e.js";import{b as w}from"./formatter.d5653695.js";import{d as f}from"./dayjs.min.acc07511.js";import"./ko.02c66ea8.js";import"./index.esm.386b9bfe.js";import"./index.esm.be717ac4.js";import"./inputtext.esm.e6771cd9.js";import"./paginator.esm.1f7837e5.js";import"./index.esm.13301435.js";import"./dropdown.esm.2f20b015.js";import"./index.esm.5b883726.js";import"./virtualscroller.esm.d264c56d.js";import"./index.esm.04463274.js";import"./index.esm.6a83b08d.js";import"./index.esm.734f8c15.js";import"./index.esm.9991af56.js";import"./requestHelper.cbd753f9.js";import"./moment.e9e012b5.js";const Z={class:"flex-1 flex align-items-center justify-content-between border-1 border-300 border-round-lg p-3"},ee={class:"flex align-items-center gap-2"},te=["src"],se={class:"exchange-cont-text"},ae={class:"font-bold text-xl mb-0"},oe={class:"text-600 small-font"},ne={class:"relative flex-1 flex align-items-center justify-content-end"},le={class:"text-3xl font-bold"},re={__name:"AdminSettingExchangeCard",props:{country:{type:Object,required:!0},value:{type:Number,required:!1}},setup(i){return R(!1),(C,D)=>(x(),U("div",Z,[e("div",ee,[e("img",{src:i.country.flag,alt:"국기 이미지",class:"national-flag"},null,8,te),e("div",se,[e("p",ae,r(i.country.currency),1),e("p",oe,r(i.country.name),1)])]),e("div",ne,[e("span",le,r(i.country.symbol)+" "+r(i.value||1),1)])]))}},K=V(re,[["__scopeId","data-v-0c71efb3"]]);const h=i=>(F("data-v-bb70cf00"),i=i(),G(),i),ce=h(()=>e("div",{class:"page-header"},[e("div",{class:"page-header-title"},[e("h5",{class:"page-header-title"},"해외구매대행 설정관리")])],-1)),ie={class:"card realtime-exchange"},de=h(()=>e("div",{class:"card-header w-full"},[e("p",{class:"card-header-title"},"환율 관리"),e("span",null,"발주 환율을 적용합니다.")],-1)),ue={class:"grid"},me={class:"col-6"},pe={class:"mb-2 flex align-items-center justify-content-end"},_e={key:1,class:"edit-wrapper flex align-items-center gap-1"},ye={class:"flex align-items-center justify-content-between gap-4"},ge=h(()=>e("i",{class:"pi pi-arrow-right"},null,-1)),ve={class:"mt-4"},fe=h(()=>e("i",{class:"pi pi-arrow-right text-xs mx-3"},null,-1)),xe={class:"col-6"},he={class:"mb-2 flex align-items-center justify-content-end"},De={key:1,class:"edit-wrapper flex align-items-center gap-1"},Re={class:"flex align-items-center justify-content-between gap-4"},Se=h(()=>e("i",{class:"pi pi-arrow-right"},null,-1)),Ye={class:"mt-4"},be=h(()=>e("i",{class:"pi pi-arrow-right text-xs mx-3"},null,-1)),we={__name:"index",setup(i){f.locale("ko"),I({title:"해외구매대행 설정관리 | 빅셀"});const C={create:{success:{severity:"success",summary:"환율 적용 완료",detail
1:"환율이 적용되었습니다.",life:3e3},error:{severity:"error",summary:"환율 적용 실패",detail:"환율 적용에 실패했습니다.",life:3e3}}},D={CNY:{symbol:"¥",currency:"CNY",name:"Yuan Renminbi",flag:"/images/icon-new/chinese-flag.png"},USD:{symbol:"$",currency:"USD",name:"United States Dollar",flag:"/images/icon-new/american-flag.png"},KRW:{symbol:"₩",currency:"KRW",name:"South Korea Won",flag:"/images/icon-new/korean-flag.png"}},E=A(),j=new J,N=new Q,g=R(null),p=R({toKRW:null,toUSD:null}),y=R({toKRW:null,toUSD:null}),d=R({toKRW:[],toUSD:[]}),S=(l,t="YYYY-MM-DD")=>l?f(l).format(t):"-",$=async(l="CNY",t="KRW")=>{try{const s=await j.getExchangeRate({fromCountry:l,toCountry:t}),u=`to${t}`;p.value[u]=s==null?void 0:s.country[1].value}catch(s){console.error(s)}},T=async()=>{var l,t;try{const s=await N.getExchangeRateLogList();return d.value.toKRW=s.filter(u=>u.to_currency==="KRW")||[],d.value.toUSD=s.filter(u=>u.to_currency==="USD")||[],p.value.toKRW=((l=d.value.toKRW[0])==null?void 0:l.quoted_exchange_rate)||p.value.toKRW,p.value.toUSD=((t=d.value.toUSD[0])==null?void 0:t.quoted_exchange_rate)||p.value.toUSD,s}catch(s){console.error(s)}},k=l=>{g.value=l;const t=`to${l}`;y.value[t]=p.value[t]},W=()=>{g.value=null},Y=async(l,t)=>{try{const s=`to${t}`,u={from_currency:l,to_currency:t,quoted_exchange_rate:y.value[s]};await N.createExchangeRate(u);const m=parseFloat(y.value[s]),v=d.value[s].find(a=>a.yyyymmdd===f().format("YYYYMMDD"));v?(v.quoted_exchange_rate=m,v.created_at=f().format("YYYY-MM-DD HH:mm:ss")):d.value[s].push({yyyymmdd:f().format("YYYYMMDD"),quoted_exchange_rate:m,created_at:f().format("YYYY-MM-DD HH:mm:ss")}),p.value[s]=m,E.add(C.create.success),W()}catch(s){console.error(s),E.add(C.create.error)}};return O(async()=>{await T(),d.value.toKRW.length===0&&await $("CNY","KRW"),d.value.toUSD.length===0&&await $("CNY","USD")}),(l,t)=>{const s=B,u=P,m=z,v=X;return x(),U(L,null,[ce,e("div",ie,[de,e("div",ue,[e("div",me,[e("div",pe,[n(g)!=="KRW"?(x(),M(s,{key:0,outlined:"",label:"CNY -> KRW 고시환율추가",severity:"secondary",class:"px-3 py-2",onClick:t[0]||(t[0]=a=>k("KRW"))})):n(g)==="KRW"?(x(),U("div",_e,[o(u,{modelValue:n(y).toKRW,"onUpdate:modelValue":t[1]||(t[1]=a=>
1n(y).toKRW=a),mode:"currency",currency:"KRW",locale:"ko-KR",inputClass:"px-3 py-2",onKeyup:t[2]||(t[2]=q(a=>Y("CNY","KRW"),["enter"]))},null,8,["modelValue"]),o(s,{label:"저장",severity:"primary",class:"px-3 py-2",onClick:t[3]||(t[3]=a=>Y("CNY","KRW"))}),o(s,{label:"취소",severity:"ghost",class:"px-3 py-2",onClick:W})])):H("",!0)]),e("div",ye,[o(K,{country:D.CNY},null,8,["country"]),ge,o(K,{country:D.KRW,value:n(p).toKRW},null,8,["country","value"])]),e("div",ve,[o(v,{value:n(d).toKRW,size:"small",showGridlines:"",stripedRows:"",paginator:!0,rows:10,rowsPerPageOptions:[10,20,50]},{default:_(()=>[o(m,{field:"yyyymmdd",header:"적용일자",class:"text-center"},{body:_(({data:a,field:c})=>[b(r(S(a[c],"YYYY년 MM월 DD일 (ddd요일)")),1)]),_:1}),o(m,{field:"quoted_exchange_rate",header:"고시환율",class:"text-center"},{body:_(({data:a,field:c})=>[e("div",null,[e("span",null,r(n(w)(1,4,"zh-CN")),1),fe,e("span",null,r(n(w)(a[c],4,"ko-KR")),1)])]),_:1}),o(m,{field:"created_at",header:"생성시간",class:"text-center"},{body:_(({data:a,field:c})=>[b(r(S(a[c],"HH:mm:ss")),1)]),_:1})]),_:1},8,["value"])])]),e("div",xe,[e("div",he,[n(g)!=="USD"?(x(),M(s,{key:0,outlined:"",label:"CNY -> USD 고시환율추가",severity:"secondary",class:"px-3 py-2",onClick:t[4]||(t[4]=a=>k("USD"))})):n(g)==="USD"?(x(),U("div",De,[o(u,{modelValue:n(y).toUSD,"onUpdate:modelValue":t[5]||(t[5]=a=>n(y).toUSD=a),mode:"currency",currency:"USD",locale:"en-US",minFractionDigits:0,maxFractionDigits:4,inputClass:"px-3 py-2",onKeyup:t[6]||(t[6]=q(a=>Y("CNY","USD"),["enter"]))},null,8,["modelValue"]),o(s,{label:"저장",severity:"primary",class:"px-3 py-2",onClick:t[7]||(t[7]=a=>Y("CNY","USD"))}),o(s,{label:"취소",severity:"ghost",class:"px-3 py-2",onClick:W})])):H("",!0)]),e("div",Re,[o(K,{country:D.CNY},null,8,["country"]),Se,o(K,{country:D.USD,value:n(p).toUSD},null,8,["country","value"])]),e("div",Ye,[o(v,{value:n(d).toUSD,size:"small",showGridlines:"",stripedRows:"",paginator:!0,rows:10,rowsPerPageOptions:[10,20,50]},{default:_(()=>[o(m,{field:"yyyymmdd",header:"적용일자",class:"text-center"},{body:_(({data:a,field:c})=>[b(r(S(a[c],"YYYY년 MM월 DD일 (ddd요일)")),1)]),_:1}),o(m,{field:"quoted_exchange_rate",header:"고시환율",class:"text-center"},{body:_(({data:a,field:c})=>[e("div",null,[e("span",null,r(n(w)(1,4,"en-US")),1),be,e("span",null,r(n(w)(a[c],4,"en-US")),1)])]),_:1}),o(m,{field:"created_at",header:"생성시간",class:"text-center"},{body:_(({data:a,field:c})=>[b(r(S(a[c],"HH:mm:ss")),1)]),_:1})]),_:1},8,["value"])])])])])],64)}}},Xe=V(we,[["__scopeId","data-v-bb70cf00"]]);export{Xe 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.