Files
appco_dist/.output/public/_nuxt/XvbPR14r.js
T

2 lines
21 KiB
JavaScript
Raw Normal View History

2026-01-27 16:02:45 +03:30
import{B as M}from"./BiDL-COj.js";import{_ as V}from"./BxF7pQIy.js";import{d as N,G as E,r as y,H as Y,$ as F,ae as B,o as L,F as m,z as _,D as r,A as i,B as c,J as e,C as a,S as z,dB as T,E as j,dT as Z,R as h,P as G,I as X,a2 as U,a7 as D,u as ee,y as R,a8 as $}from"./Cbt2tPBc.js";import{B as O}from"./BBSG9FnH.js";import{B as H}from"./CgpbEzJY.js";import{S as W}from"./C9QN_Mfk.js";import{F as J}from"./BYFjdAgw.js";import{_ as K}from"./BJt1EIeo.js";import{_ as Q}from"./3kWPFkR0.js";import{_ as q}from"./DlAUqK2U.js";import{B as te}from"./_OSaw0MT.js";import{M as f}from"./Y4Uc45PN.js";import{C as se}from"./CDCPZiX_.js";import"./B7QhzxXq.js";import{_ as ae,R as le}from"./XRR38INJ.js";import"./sFfhux-l.js";/* empty css */import"./CscEAC8U.js";import"./DyxeBzWG.js";import"./CK63FxZH.js";import"./DPLkQIR9.js";import"./b4XmZQIy.js";import"./CmMfcJ2x.js";import"./DlznrpTI.js";import"./BzAZyL4T.js";import"./YUm_jrvp.js";import"./D6qJbdzf.js";import"./CZUeDkO0.js";import"./ClgUV-y-.js";import"./Dm-BacZx.js";import"./Bh8FlG27.js";import"./Rshl30Eo.js";import"./Cj99RmFE.js";import"./bz4Gi-i8.js";import"./DwalR_vN.js";import"./BI5evUJ6.js";import"./Dq7m1_nY.js";import"./ONZBPW5n.js";import"./PPhiVNr-.js";import"./unXo4E2b.js";const ne={class:"h-30vh px-5 mt3"},ie={class:"font-semibold text-xl"},oe={class:"mt5 rounded-xl border-gray-200 border-1px py-2"},re={class:"flex justify-between"},ue=N({__name:"TaxAndSilverProfit",props:{open:{type:Boolean}},emits:["update:open"],setup(P,{emit:o}){const n=E(),d=y(null);y("default");const p=Y(),C=P,x=o,t=y({has_silver_tax:!1,tax_silver_profit:0});F(C,v=>{v.open?b():k()});async function b(){await B(),await d.value?.setOpen()}async function k(){await B(),await d.value?.setClose(),x("update:open",!1)}function l(){console.log(p.user),t.value.has_silver_tax=!!p.user?.has_silver_tax,t.value.tax_silver_profit=p.user?.tax_silver_profit??0}async function w(){try{t.value.tax_silver_profit&&parseInt(t.value.tax_silver_profit),z.value=!0,await Z({id:p.user.id,...t.value}),await k()}catch(v){console.log(v)}finally{z.value=!1}}return L(()=>{l()}),(v,s)=>{const S=Q,g=K,A=J,I=W;return _(),m(M,{title:"",ref_key:"sheetRef",ref:d,headerCls:"",closeOnClickOutside:"",onOnClickOutside:s[2]||(s[2]=u=>x("update:open",!1))},{header:r(()=>[s[3]||(s[3]=i("div",{flex:"","justify-center":"","items-center":"","flex-col":"","p-2":""},[i("div",{"bg-gray-500":"","h-2px":"","w-2.5rem":""})],-1)),i("div",null,[a(V,{class:"w-1rem mt-5 ms-5",onClick:k})])]),default:r(()=>[i("div",ne,[i("div",ie,c(e(n).useString("specifySilverTaxAndProfit")),1),i("div",oe,[a(I,{spinning:e(z)},{default:r(()=>[a(A,{ref:"formRef",model:t.value,autocomplete:"off",layout:"vertical"},{default:r(()=>[a(g,{name:"has_silver_tax"},{default:r(()=>[i("div",re,[i("span",null,c(e(n).useString("hasTax")),1),a(S,{class:"h-6",checked:t.value.has_silver_tax,"onUpdate:checked":s[0]||(s[0]=u=>t.value.has_silver_tax=u),"checked-children":e(n).useString("enable"),"un-checked-children":e(n).useString("disable")},null,8,["checked","checked-children","un-checked-children"])])]),_:1}),a(g,{label:e(n).useString("profit"),name:"profit"},{default:r(()=>[a(O,{value:t.value.tax_silver_profit,"onUpdate:value":s[1]||(s[1]=u=>t.value.tax_silver_profit=u),type:"number","addon-before":"%",onClick:e(T)},null,8,["value","onClick"])]),_:1},8,["label"]),a(H,{size:"50px",block:"",type:"primary",onClick:w},{default:r(()=>[j(c(e(n).useString("submit")),1)]),_:1})]),_:1},8,["model"])]),_:1},8,["spinning"])])])]),_:1},512)}}}),de=Object.assign(q(ue,[["__scopeId","data-v-c071ba2a"]]),{__name:"TaxAndSilverProfit"}),pe={class:"flex items-center pb-2 relative"},ce={class:"font-semibold text-xl absolute w-full text-center"},_e={class:"h-40vh px-5 mt3 overflow-y-auto pb-20"},ve={class:"mt5 rounded-xl border-gray-200 border-1px py-2"},ge={class:"flex justify-between"},fe={class:"flex justify-between"},he={class:"flex justify-between"},me={class:"flex justify-between"},ye={class:"flex justify-between"},xe={class:"flex justify-between"},ke={class:"flex justify-between"},be={class:"fixed bottom