test_lgq/niucloud/public/admin/assets/offlinepay-df563169.js
2024-01-24 17:36:08 +08:00

2 lines
5.8 KiB
JavaScript

import{d as O,O as H,f as K,r as k,n as W,h as u,c as _,y as T,I as w,w as s,a as f,t as i,u as t,e as a,N as e,i as d,B as g,F as X,a8 as V,R as q,W as G,X as J,cK as Q,as as Z,aF as ee,E as te,Y as ae,$ as le,ah as oe,aj as ne,at as se,aO as re,a0 as ie}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{A as ue,B as pe,C as de}from"./sys-8ead7f22.js";const ce={class:"flex justify-between items-center"},me={class:"text-[20px]"},_e={class:"mt-[10px]"},fe={key:0},ge={key:1,class:"text-success"},he={key:2,class:"text-error"},ve={key:0},be={class:"mt-[16px] flex justify-end"},Ue=O({__name:"offlinepay",setup(ye){const B=H(),$=K(),F=B.meta.title,x=k([]),b=k(!1),o=W({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{out_trade_no:"",create_time:"",status:""}}),C=k(),N=r=>{r&&(r.resetFields(),p())},p=(r=1)=>{o.loading=!0,o.page=r,ue({page:o.page,limit:o.limit,...o.searchParam}).then(n=>{o.loading=!1,o.data=n.data.data,o.total=n.data.total}).catch(()=>{o.loading=!1})};p();const D=r=>{V.confirm(e("passTips"),e("warning"),{confirmButtonText:e("confirm"),cancelButtonText:e("cancel"),type:"warning"}).then(({value:n})=>{pe(r.out_trade_no).then(()=>{p()}).catch()}).catch(()=>{})},R=r=>{V.prompt(e("refuseReason"),e("warning"),{confirmButtonText:e("confirm"),cancelButtonText:e("cancel"),inputErrorMessage:e("refuseReason"),inputPattern:/\S/,inputType:"textarea"}).then(({value:n})=>{de({out_trade_no:r.out_trade_no,reason:n}).then(()=>{p()}).catch()}).catch(()=>{})},z=r=>{x.value[0]=q(r.voucher),b.value=!0},A=r=>{$.push(`/finance/pay/detail?id=${r.id}`)};return(r,n)=>{const L=G,h=J,S=Q,v=Z,I=ee,c=te,U=ae,E=le,m=oe,Y=ne,j=se,M=re,P=ie;return u(),_(X,null,[T((u(),w(E,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[f("div",ce,[f("span",me,i(t(F)),1)]),f("div",_e,[a(E,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:s(()=>[a(U,{inline:!0,model:o.searchParam,ref_key:"searchFormRef",ref:C},{default:s(()=>[a(h,{label:t(e)("outTradeNo"),prop:"trade_no"},{default:s(()=>[a(L,{modelValue:o.searchParam.out_trade_no,"onUpdate:modelValue":n[0]||(n[0]=l=>o.searchParam.out_trade_no=l),placeholder:t(e)("outTradeNoPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(h,{label:t(e)("createTime"),prop:"create_time"},{default:s(()=>[a(S,{modelValue:o.searchParam.create_time,"onUpdate:modelValue":n[1]||(n[1]=l=>o.searchParam.create_time=l),type:"datetimerange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":t(e)("startDate"),"end-placeholder":t(e)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),a(h,{label:t(e)("status"),prop:"status"},{default:s(()=>[a(I,{modelValue:o.searchParam.status,"onUpdate:modelValue":n[2]||(n[2]=l=>o.searchParam.status=l),placeholder:"Select"},{default:s(()=>[a(v,{label:t(e)("all"),value:""},null,8,["label"]),a(v,{label:t(e)("waitAudit"),value:"3"},null,8,["label"]),a(v,{label:t(e)("passed"),value:"2"},null,8,["label"]),a(v,{label:t(e)("notPass"),value:"-1"},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),a(h,null,{default:s(()=>[a(c,{type:"primary",onClick:n[3]||(n[3]=l=>p())},{default:s(()=>[d(i(t(e)("search")),1)]),_:1}),a(c,{onClick:n[4]||(n[4]=l=>N(C.value))},{default:s(()=>[d(i(t(e)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),T((u(),w(Y,{data:o.data,size:"large"},{empty:s(()=>[f("span",null,i(o.loading?"":t(e)("emptyData")),1)]),default:s(()=>[a(m,{prop:"out_trade_no",label:t(e)("outTradeNo"),"min-width":"230","show-overflow-tooltip":!0},null,8,["label"]),a(m,{prop:"body",label:t(e)("body"),"min-width":"150","show-overflow-tooltip":!0},null,8,["label"]),a(m,{prop:"money",label:t(e)("money"),"min-width":"120",align:"right"},null,8,["label"]),a(m,{label:t(e)("createTime"),"min-width":"150",align:"center","show-overflow-tooltip":!0},{default:s(({row:l})=>[d(i(l.create_time||""),1)]),_:1},8,["label"]),a(m,{label:t(e)("status"),"min-width":"150",align:"center"},{default:s(({row:l})=>[l.status==3?(u(),_("span",fe,i(t(e)("waitAudit")),1)):g("",!0),l.status==2?(u(),_("span",ge,i(t(e)("passed")),1)):g("",!0),l.status==-1?(u(),_("span",he,i(t(e)("notPass")),1)):g("",!0)]),_:1},8,["label"]),a(m,{label:t(e)("operation"),fixed:"right",width:"240",align:"right"},{default:s(({row:l})=>[a(c,{type:"primary",link:"",onClick:y=>A(l)},{default:s(()=>[d(i(t(e)("detail")),1)]),_:2},1032,["onClick"]),l.status==3?(u(),_("span",ve,[a(c,{type:"success",link:"",onClick:y=>D(l)},{default:s(()=>[d(i(t(e)("pass")),1)]),_:2},1032,["onClick"]),a(c,{type:"primary",link:"",onClick:y=>R(l)},{default:s(()=>[d(i(t(e)("refuse")),1)]),_:2},1032,["onClick"])])):g("",!0),a(c,{type:"primary",link:"",onClick:y=>z(l)},{default:s(()=>[d(i(t(e)("voucher")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[P,o.loading]]),f("div",be,[a(j,{"current-page":o.page,"onUpdate:current-page":n[5]||(n[5]=l=>o.page=l),"page-size":o.limit,"onUpdate:page-size":n[6]||(n[6]=l=>o.limit=l),layout:"total, sizes, prev, pager, next, jumper",total:o.total,onSizeChange:n[7]||(n[7]=l=>p()),onCurrentChange:p},null,8,["current-page","page-size","total"])])])]),_:1})),[[P,r.payLoading]]),b.value?(u(),w(M,{key:0,"url-list":x.value,onClose:n[8]||(n[8]=l=>b.value=!1),"initial-index":0,"zoom-rate":1},null,8,["url-list"])):g("",!0)],64)}}});export{Ue as default};