/
proc
/
thread-self
/
root
/
home
/
pay
/
admin
/
assets
/
File Upload :
llllll
Current File: //proc/thread-self/root/home/pay/admin/assets/index-9a802f4d.js
import{_ as w}from"./BasicMainCard-10dcf223.js";import{u as A}from"./staticApisStore-e80efd88.js";import{t as B,u as N,_ as T,a as $}from"./useDataTime-7040acb7.js";import{I as E}from"./Icon-3b17d5b8.js";import{_ as x}from"./CustomTag.vue_vue_type_script_setup_true_lang-a61edcda.js";import{b as a,m as g,d as k,r as s,o as b,e as v,w as n,f as S,u as h,a as y,c as D,t as R,g as j,h as F,i as V,l as W}from"./index-e0761cb1.js";import{_ as M}from"./index-ec7edd79.js";/* empty css */import{c as P}from"./confirmModal-725b6c90.js";import{d as H}from"./customer-f57033d7.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-d59e4028.js";import"./index-3dd084bb.js";import"./omit-bbec3647.js";import"./KeyCode-9689c2ac.js";import"./useState-723d924c.js";import"./Col-ae38d530.js";import"./BasicModal.vue_vue_type_style_index_0_lang-1657f2e3.js";import"./button.vue_vue_type_style_index_0_lang-3b9e2df7.js";import"./classCallCheck-c3f74fd1.js";import"./index-80c1d8cc.js";import"./PortalWrapper-c0f75b67.js";const J=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,sortable:!1,customRender:e=>e.index+1},{title:"کد حساب",dataIndex:"id",key:"id",type:"Number"},{title:"کد کاربر",dataIndex:"customer_id",key:"customer_id",type:"Number"},{title:"نام و نام خانوادگی",dataIndex:"customer.name",key:"customer.name",type:"Text"},{title:"نام بانک",dataIndex:"bank_name",key:"bank_name",type:"Text"},{title:"شماره حساب",dataIndex:"account_number",key:"account_number",type:"Number"},{title:"شماره کارت",dataIndex:"cart_number",key:"cart_number",type:"Number"},{title:"شماره شبا",dataIndex:"shaba_number",key:"shaba_number",type:"Number"},{title:"وضعیت",dataIndex:"sts",key:"sts",filterable:!1,customRender:({record:e})=>{switch(e.sts){case 1:return a("div",{class:"flex justify-center font-bold"},[a(x,{textColor:"#ca8a04",bgColor:"#fef3c7",class:"px-2"},{default:()=>[e.sts_str]})]);case 2:return a("div",{class:"flex justify-center font-bold px-2"},[a(x,{textColor:"#25855A",bgColor:"#E3F4E9",class:"px-2"},{default:()=>[e.sts_str]})]);default:return a("div",{class:"flex justify-center font-bold px-2"},[a(x,{textColor:"#C53030",bgColor:"#FECACA",class:"px-2"},{default:()=>[e.sts_str]})])}}},{title:"تاریخ ثبت",dataIndex:"created_at",key:"created_at",type:"DateTime",customRender:e=>B(e.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",fixed:"right",filterable:!1}],L=async e=>await g.post("/admin/account/sts",e),q=async e=>await g.post("/admin/account/table",e),z={class:"gap-2 flex justify-center"},G=k({__name:"table",emits:["delete","edit","add","withdraw"],setup(e,{expose:i,emit:o}){const[u,c]=N();async function m(t){try{r.value=!0,await L({id:t.id,sts:t.sts!==2?2:3}),j.success(t.sts!==2?"با موفقیت تایید شد":"با موفقیت رد شد"),c()}catch(f){console.log(f)}finally{r.value=!1}}s(null);const d=s({columns:J,api:t=>q(t)}),r=s(!1);return i({fetch:()=>{c()}}),(t,f)=>{const p=M,C=T,I=$;return b(),v("div",null,[a(I,{title:"لیست حساب ها"},{default:n(()=>[a(C,S(h(d),{onRegister:h(u),ref:"tbl"}),{extraHeader:n(()=>[]),action:n(({column:O,record:l})=>[y("div",z,[(b(),D(p,{key:l.sts,placement:"bottom",class:"cursor-pointer",onClick:Q=>m(l)},{title:n(()=>[y("span",null,R(l.sts!==2?"فعال سازی":"غیر فعال سازی"),1)]),default:n(()=>[a(E,{icon:l.sts!==2?"vuesax-linear:card-remove":"vuesax-linear:card-tick",color:l.sts!==2?"red":"green"},null,8,["icon","color"])]),_:2},1032,["onClick"]))])]),_:1},16,["onRegister"])]),_:1})])}}});const K={class:"flex w-full h-full"},yt=k({__name:"index",setup(e){const i=s(!1);A();const o=s(null),u=()=>{var t;return(t=o==null?void 0:o.value)==null?void 0:t.fetch()};s(0);const c=s({});s(),F({});async function m(t){_.value=!0,t.id,c.value=W.cloneDeep(t)}function d(t){_.value=!0}const r=t=>P("کاربر",t,H,u);V(async()=>{i.value=!0,i.value=!1});const _=s(!1);return(t,f)=>{const p=w;return b(),v("div",null,[a(p,null,{default:n(()=>[y("div",K,[a(G,{ref_key:"table",ref:o,class:"w-full h-full",onEdit:m,onDelete:r,onWithdraw:d},null,512)])]),_:1})])}}});export{yt as default};
Copyright ©2k19 -
Hexid
|
Tex7ure