import{_ as e,u as t,r as a,ad as i,c as s,bQ as l,d as n,e as o,F as d,l as r,h as c,n as u,am as p,g as m,w as f,j as v,k as h,f as w,m as b,an as g,E as _,p as j,t as x,v as y}from"./index.286e9b79.js";import{v as V}from"./loading.c49775a6.js";import{E as C,a as E}from"./table-column.7b4f59a2.js";import"./checkbox.f06171a4.js";import{E as P}from"./switch.197584d0.js";/* empty css            */import{E as k}from"./image-viewer.b538fe01.js";import{g as U}from"./http.f588794f.js";import"./_baseIteratee.9ead53a1.js";import"./_initCloneObject.fb8fbaea.js";import"./isEqual.57d72c4a.js";import"./debounce.caafe00b.js";import"./event.776e7e11.js";import"./validator.18338d56.js";import"./index.ed3ed02e.js";import"./position.1bd00850.js";import"./scroll.a50153b5.js";const z=e=>(x("data-v-338800cd"),e=e(),y(),e),A={class:"table-box"},H={class:"table-title"},I={class:"tabs-content"},$=z((()=>c("span",{style:{"font-size":"14px","margin-left":"5px"}},"暂无数据",-1))),q={class:"image-slot"},F=z((()=>c("div",{class:"page"},[c("div",{class:"l"}),c("div",{class:"r"})],-1))),O=e({__name:"index",setup(e){t();const x=a([]);let y=a(!1);i((()=>{y.value=!0,U("finance.withdraw/index").then((e=>{y.value=!1,e.code?x.value=e.data:_.error(e.msg)})).catch((e=>{y.value=!1,_.error(e)}))}));let z=a({1:{title:"微信公众号",ctitle:"在微信公众号H5页面中汇款的场景"},2:{title:"微信小程序",ctitle:"在微信小程序中汇款的场景"},8:{title:"PC商城",ctitle:"电脑端微信汇款"},9:{title:"H5支付",ctitle:"在移动浏览器页面中汇款的场景"},10:{title:"APP支付",ctitle:"在APP中汇款的场景"}});const O=(e,t,a,i)=>{if("status"==t)U("finance.withdraw/status",{id:e.id,type:t,value:e[t]}).then((e=>{e.code&&_.success("修改状态成功")}));else{let s=x.value[a];for(let e in s)i!=e&&(s[e].is_default=0);0==s[i].is_default&&(s[i].is_default=1),U("finance.withdraw/status",{id:e.id,type:t,value:s[i].is_default}).then((e=>{e.code&&_.success("修改状态成功")}))}};return(e,t)=>{const a=s("Warning"),i=j,_=k,U=C,Q=P,W=E,B=l("auth"),D=V;return n(),o("div",null,[(n(!0),o(d,null,r(m(x),((e,t)=>(n(),o("div",{class:"table-wrap",key:t},[c("div",A,[c("div",H,[u(p(m(z)[t].title)+" ",1),c("span",null,p(m(z)[t].ctitle),1)]),c("div",I,[f((n(),v(W,{data:e,size:"large",style:{width:"100%"}},{empty:h((()=>[w(i,{size:"18",style:{position:"relative",top:"4px"}},{default:h((()=>[w(a)])),_:1}),$])),default:h((()=>[w(U,{width:"80","header-align":"center",align:"center"},{default:h((e=>[e.row.photo?(n(),v(_,{key:0,src:e.row.photo,fit:"contain",style:{width:"30px",height:"30px"}},{error:h((()=>[c("div",q,[(n(),v(b("icon-picture")))])])),_:2},1032,["src"])):g("",!0)])),_:1}),w(U,{prop:"name",label:"汇款名称","header-align":"center",align:"center"}),f((n(),v(U,{label:"默认汇款","header-align":"center",align:"center",width:"130"},{default:h((e=>[w(Q,{modelValue:e.row.is_default,"onUpdate:modelValue":t=>e.row.is_default=t,onChange:a=>O(e.row,"is_default",t,e.$index),"active-value":1,"inactive-value":0,"inline-prompt":"","active-text":"是","inactive-text":"否"},null,8,["modelValue","onUpdate:modelValue","onChange"])])),_:2},1024)),[[B,["finance.withdraw/status"]]]),f((n(),v(U,{prop:"sort",label:"使用状态","header-align":"center",align:"center",width:"130"},{default:h((e=>[w(Q,{modelValue:e.row.status,"onUpdate:modelValue":t=>e.row.status=t,onChange:a=>O(e.row,"status",t,e.$index),"active-value":1,"inactive-value":0,"inline-prompt":"","active-text":"是","inactive-text":"否"},null,8,["modelValue","onUpdate:modelValue","onChange"])])),_:2},1024)),[[B,["finance.withdraw/status"]]])])),_:2},1032,["data"])),[[D,m(y)]])]),F])])))),128))])}}},[["__scopeId","data-v-338800cd"]]);export{O as default};
