You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
8.2 KiB
1 lines
8.2 KiB
import{d as j,O as R,n as O,r as f,h as i,c as m,e as t,w as n,u as e,N as l,F as v,G as g,I as T,i as y,t as d,a as w,y as q,B as U,a5 as G,W,X,aq as A,aC as J,cI as K,E as Q,Y as Z,_ as ee,af as ae,ah as te,a3 as le,$ as oe,p as re,g as ne}from"./index-6010b07e.js";/* 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{_ as se}from"./index.vue_vue_type_script_setup_true_lang-edbadcfb.js";import"./el-form-item-4ed993c7.js";import{u as F}from"./dict-3e5bfbe1.js";import{_ as ie,g as pe,d as ue}from"./transaction-history-edit.vue_vue_type_style_index_0_lang-7bd6520d.js";import{_ as de}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css *//* empty css *//* empty css */const me=h=>(re("data-v-1691f016"),h=h(),ne(),h),ce={class:"main-container"},_e=me(()=>w("div",{class:"flex justify-between items-center"},null,-1)),ye={class:"mt-[10px]"},fe={key:0},he={key:0},be={class:"mt-[16px] flex justify-end"},ve=j({__name:"transaction_history",setup(h){R().meta.title;let o=O({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{user_id:"",order_num:"",pay_num:"",pay_type:"",price:[],cash_fee:[],pay_status:"",pay_time:[],create_time:[]}});const C=f();f([]);const V=f([]);(async()=>{V.value=await(await F("pay_type")).data.dictionary})();const P=f([]);(async()=>{P.value=await(await F("is_show_radio")).data.dictionary})();const c=(_=1)=>{o.loading=!0,o.page=_,pe({page:o.page,limit:o.limit,...o.searchParam}).then(r=>{o.loading=!1,o.data=r.data.data,o.total=r.data.total}).catch(()=>{o.loading=!1})};c();const L=f(null),B=_=>{G.confirm(l("transactionHistoryDeleteTips"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{ue(_).then(()=>{c()}).catch(()=>{})})},S=_=>{_&&(_.resetFields(),c())};return(_,r)=>{const x=W,p=X,b=A,k=J,E=se,I=K,D=Q,Y=Z,N=ee,s=ae,H=te,$=le,z=oe;return i(),m("div",ce,[t(N,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[_e,t(N,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:n(()=>[t(Y,{inline:!0,model:e(o).searchParam,ref_key:"searchFormRef",ref:C},{default:n(()=>[t(p,{label:e(l)("userId"),prop:"user_id"},{default:n(()=>[t(x,{modelValue:e(o).searchParam.user_id,"onUpdate:modelValue":r[0]||(r[0]=a=>e(o).searchParam.user_id=a),placeholder:e(l)("userIdPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(p,{label:e(l)("orderNum"),prop:"order_num"},{default:n(()=>[t(x,{modelValue:e(o).searchParam.order_num,"onUpdate:modelValue":r[1]||(r[1]=a=>e(o).searchParam.order_num=a),placeholder:e(l)("orderNumPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(p,{label:e(l)("payNum"),prop:"pay_num"},{default:n(()=>[t(x,{modelValue:e(o).searchParam.pay_num,"onUpdate:modelValue":r[2]||(r[2]=a=>e(o).searchParam.pay_num=a),placeholder:e(l)("payNumPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(p,{label:e(l)("payType"),prop:"pay_type"},{default:n(()=>[t(k,{class:"w-[280px]",modelValue:e(o).searchParam.pay_type,"onUpdate:modelValue":r[3]||(r[3]=a=>e(o).searchParam.pay_type=a),clearable:"",placeholder:e(l)("payTypePlaceholder")},{default:n(()=>[t(b,{label:"全部",value:""}),(i(!0),m(v,null,g(V.value,(a,u)=>(i(),T(b,{key:u,label:a.name,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),t(p,{label:e(l)("price"),prop:"price"},{default:n(()=>[t(E,{modelValue:e(o).searchParam.price,"onUpdate:modelValue":r[4]||(r[4]=a=>e(o).searchParam.price=a)},null,8,["modelValue"])]),_:1},8,["label"]),t(p,{label:e(l)("cashFee"),prop:"cash_fee"},{default:n(()=>[t(E,{modelValue:e(o).searchParam.cash_fee,"onUpdate:modelValue":r[5]||(r[5]=a=>e(o).searchParam.cash_fee=a)},null,8,["modelValue"])]),_:1},8,["label"]),t(p,{label:e(l)("payStatus"),prop:"pay_status"},{default:n(()=>[t(k,{class:"w-[280px]",modelValue:e(o).searchParam.pay_status,"onUpdate:modelValue":r[6]||(r[6]=a=>e(o).searchParam.pay_status=a),clearable:"",placeholder:e(l)("payStatusPlaceholder")},{default:n(()=>[t(b,{label:"全部",value:""}),(i(!0),m(v,null,g(P.value,(a,u)=>(i(),T(b,{key:u,label:a.name,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),t(p,{label:e(l)("payTime"),prop:"pay_time"},{default:n(()=>[t(I,{modelValue:e(o).searchParam.pay_time,"onUpdate:modelValue":r[7]||(r[7]=a=>e(o).searchParam.pay_time=a),type:"daterange","value-format":"YYYY-MM-DD","start-placeholder":e(l)("startDate"),"end-placeholder":e(l)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),t(p,{label:e(l)("createTime"),prop:"create_time"},{default:n(()=>[t(I,{modelValue:e(o).searchParam.create_time,"onUpdate:modelValue":r[8]||(r[8]=a=>e(o).searchParam.create_time=a),type:"daterange","value-format":"YYYY-MM-DD","start-placeholder":e(l)("startDate"),"end-placeholder":e(l)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),t(p,null,{default:n(()=>[t(D,{type:"primary",onClick:r[9]||(r[9]=a=>c())},{default:n(()=>[y(d(e(l)("search")),1)]),_:1}),t(D,{onClick:r[10]||(r[10]=a=>S(C.value))},{default:n(()=>[y(d(e(l)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),w("div",ye,[q((i(),T(H,{data:e(o).data,size:"large"},{empty:n(()=>[w("span",null,d(e(o).loading?"":e(l)("emptyData")),1)]),default:n(()=>[t(s,{prop:"id",label:e(l)("id"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(s,{prop:"user_id",label:e(l)("userId"),"min-width":"120","show-overflow-tooltip":!0},{default:n(({row:a})=>[y(d(a.user&&a.user.name?a.user.name+"#"+a.user.id:"顶级"),1)]),_:1},8,["label"]),t(s,{prop:"order_num",label:e(l)("orderNum"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(s,{prop:"pay_num",label:e(l)("payNum"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(s,{label:e(l)("payType"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:n(({row:a})=>[(i(!0),m(v,null,g(V.value,(u,M)=>(i(),m("div",null,[u.value==a.pay_type?(i(),m("div",fe,d(u.name),1)):U("",!0)]))),256))]),_:1},8,["label"]),t(s,{prop:"price",label:e(l)("price"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(s,{label:e(l)("couponsInfo"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:n(({row:a})=>[y(d(a.userCoupons&&a.userCoupons.coupons?a.userCoupons.coupons.name:""),1)]),_:1},8,["label"]),t(s,{prop:"cash_fee",label:e(l)("cashFee"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(s,{label:e(l)("payStatus"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:n(({row:a})=>[(i(!0),m(v,null,g(P.value,(u,M)=>(i(),m("div",null,[u.value==a.pay_status?(i(),m("div",he,d(u.name),1)):U("",!0)]))),256))]),_:1},8,["label"]),t(s,{label:e(l)("payTime"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:n(({row:a})=>[y(d(a.pay_time||""),1)]),_:1},8,["label"]),t(s,{label:e(l)("createTime"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:n(({row:a})=>[y(d(a.create_time||""),1)]),_:1},8,["label"]),t(s,{label:e(l)("operation"),fixed:"right","min-width":"120"},{default:n(({row:a})=>[t(D,{type:"primary",link:"",onClick:u=>B(a.id)},{default:n(()=>[y(d(e(l)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[z,e(o).loading]]),w("div",be,[t($,{"current-page":e(o).page,"onUpdate:current-page":r[11]||(r[11]=a=>e(o).page=a),"page-size":e(o).limit,"onUpdate:page-size":r[12]||(r[12]=a=>e(o).limit=a),layout:"total, sizes, prev, pager, next, jumper",total:e(o).total,onSizeChange:r[13]||(r[13]=a=>c()),onCurrentChange:c},null,8,["current-page","page-size","total"])])]),t(ie,{ref_key:"editTransactionHistoryDialog",ref:L,onComplete:c},null,512)]),_:1})])}}});const We=de(ve,[["__scopeId","data-v-1691f016"]]);export{We as default};
|
|
|