cashier-mer/build/assets/index-BlwEWSVE.js

2 lines
7.9 KiB
JavaScript
Raw Normal View History

2024-08-04 11:06:35 +08:00
import{K as V,_ as B,u as j,r as y,b as p,c as s,k as f,e as t,t as m,g as d,F as E,l as F,z as q,f as l,w as r,E as $,m as D,q as J,s as K,o as W,a as G,h as N,d as k,p as w,j as U}from"./index-kM_D7Jim.js";import{h as T}from"./moment-Cl4UOzQZ.js";import{p as H}from"./padding-JvsciqDn.js";function P(){return V.get("/merchant/Merchant/amount_account")}function Q(u){return V.get("/merchant/Merchant/taking_lists",{params:u})}function X(){return V.get("/merchant/Merchant/taking_info")}function Z(u){return V.post("/merchant/Merchant/withdraw",u)}function ee(u){return V.get("/financial/FinancialRecord/api_lists",{params:u})}const z=u=>(J("data-v-e01d9d71"),u=u(),K(),u),ae={class:"my-order"},te={class:"header-nav"},le=z(()=>t("div",{class:"nav-item"},m("提现"),-1)),ne={class:"nav-body"},oe={class:"my-money"},se=z(()=>t("div",null,"我的余额:",-1)),ie={style:{"text-align":"center",color:"#2ec479"}},re={class:"my-count"},de={class:"count"},ue={class:"money"},ce={style:{color:"#ff4a00"}},_e={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ve=["onClick"],me={style:{color:"#1890ff"}},pe={class:"own"},fe=z(()=>t("div",{style:{height:"8.2rem"}},null,-1)),he={class:"order-footer"},ge={class:"input-btn"},be={class:"order-btn"},ke={__name:"order",setup(u){j();const e=y({balance:0,count:0,total:0}),g=y([]),c=()=>{P().then(o=>{o.data.bank_list.forEach(i=>{i.is_check&&(a.value.merchant_bank_id=i.id)}),a.value.merchant_bank_id||(a.value.merchant_bank_id=o.data.bank_list[0].id),g.value=o.data.bank_list,e.value.balance=o.data.balance}),X().then(o=>{e.value=Object.assign(e.value,o.data)})};c();const a=y({merchant_bank_id:"",amount:""}),h=o=>{a.value.merchant_bank_id=o.id},x=()=>{if(a.value.amount=Math.floor(a.value.amount*100)/100,+a.value.amount<=0)return a.value.amount="",$.error("提现金额必须大于0");if(+a.value.amount>+e.value.balance)return a.value.amount=e.value.balance,$.error("提现金额不能大于余额");Z(a.value).then(o=>{a.value.amount="",$.success("提现成功,等待管理员审核"),D.emit("get-taking-lists"),c()})};return(o,i)=>{const b=p("el-input"),M=p("el-button");return s(),f("div",ae,[t("div",te,[le,t("div",ne,[t("div",oe,[se,t("div",ie,[t("span",null,m(e.value.balance),1),d("元 ")])]),t("div",re,[t("div",de,[d("提现次数: "),t("span",null,m(e.value.count),1),d("次")]),t("div",ue,[d("累计提现到账: "),t("span",ce,m(e.value.total),1),d("元")])])])]),t("div",_e,[(s(!0),f(E,null,F(g.value,(_,C)=>(s(),f("div",{class:q(["item",{"item-active":a.value.merchant_bank_id==_.id}]),key:C,onClick:v=>h(_)},[t("div",null,[d(" 提现至 "),t("span",me,m(_.bank_name)+"("+m(_.bank_code.slice(-4))+")",1),t("span",pe,m(_.is_own==1?"对公":"个人"),1)])],10,ve))),128))]),fe,t("div",he,[t("div",ge,[l(b,{modelValue:a.value.amount,"onUpdate:modelValue":i[0]||(i[0]=_=>a.value.amount=_),placeholder:"请输入提现金额",type:"number"},null,8,["modelValue"]),l(M,{class:"btn",type:"primary",onClick:i[1]||(i[1]=_=>a.value.amount=e.value.balance)},{default:r(()=>[d("全部")]),_:1})]),t("div",be,[l(M,{class:"btn",type:"primary",onClick:x,disabled:e.value.balance<=0||g.value.length==0},{default:r(()=>[d("立即提现")]),_:1},8,["disabled"])])])])}}},ye=B(ke,[["__scopeId","data-v-e01d9d71"]]),we={class:"my-order"},Ve={class:"date"},Me={class:"detail"},Ye={key:0,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},$e={key:0},xe={key:1},Ce={key:1,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},De={__name:"detail",setup(u){const e=y({page_no:1,page_size:15,loadend:!1,loading:!1,create_time:"",start_time:""}),g=()=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],h()},c=y(1),a=y([]),h=()=>{if(console.log("触底",!e.value.loadend,!e.value.loading),!e.value.loadend&&!e.value.loading&&(console.log("加载"),e.value.loading=!0,c.value==1&&Q({page_no:e.value.page_no,page_size:e.value.page_size,crea