2 lines
8.2 KiB
JavaScript
2 lines
8.2 KiB
JavaScript
import{d as H,f as O,O as G,r as x,n as N,h as p,c as y,e,w as t,a as r,t as d,u as a,N as o,F as J,G as K,I as D,i as f,y as W,R as X,cJ as q,an as Q,ao as Z,$ as ee,W as ae,X as te,as as le,aF as oe,cK as ne,E as se,Y as re,ah as de,aj as ie,at as ue,aa as me,a0 as ce}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 */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{_ as _e}from"./default_headimg-a897263d.js";import{d as pe,e as fe,f as he}from"./order-26c7465e.js";const be={class:"main-container"},ve={class:"flex justify-between items-center mb-[5px]"},ge={class:"text-[20px]"},xe={class:"statistic-card"},ye={class:"statistic-footer"},we={class:"footer-item text-[14px] text-[#666]"},ke={class:"statistic-card"},Re={class:"statistic-footer"},Ve={class:"footer-item text-[14px] text-[#666]"},Pe=["onClick"],Ee=["src"],Ce={key:1,class:"w-[50px] h-[50px] mr-[10px]",src:_e,alt:""},Se={class:"flex flex flex-col"},Ne={class:""},De={class:""},Fe={class:"mt-[16px] flex justify-end"},Ie={class:"input-width"},Ue={class:"input-width"},$e={class:"input-width"},Te={class:"input-width"},ze={class:"input-width"},Le={class:"input-width"},Be={class:"input-width"},Me={class:"dialog-footer"},_a=H({__name:"refund",setup(Ye){const F=O(),I=G().meta.title,R=x(),n=N({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{refund_no:"",create_time:[],status:"",keywords:"",order_no:""}}),U=i=>{i&&(i.resetFields(),h())},h=(i=1)=>{n.loading=!0,n.page=i,pe({page:n.page,limit:n.limit,...n.searchParam}).then(s=>{n.loading=!1,n.data=s.data.data,n.total=s.data.total}).catch(()=>{n.loading=!1})};h();const V=x([]);(()=>{fe().then(i=>{V.value=i.data})})();const _=N({refund_all_money:0,refund_have_money:0,refund_Success_money:0,refund_fail_moey:0});(()=>{he().then(i=>{_.refund_all_money=i.data.all.money,_.refund_have_money=i.data.have.money,_.refund_Success_money=i.data[3].money,_.refund_fail_moey=i.data[-1].money})})();const b=x(!1),m=x({}),$=i=>{m.value=i,b.value=!0},T=i=>{F.push(`/member/detail?id=${i}`)};return(i,s)=>{const P=q,E=Q,z=Z,w=ee,k=ae,u=te,C=le,L=oe,B=ne,v=se,S=re,c=de,M=ie,Y=ue,j=me,A=ce;return p(),y("div",be,[e(w,{class:"box-card !border-none",shadow:"never"},{default:t(()=>[r("div",ve,[r("span",ge,d(a(I)),1)]),e(w,{class:"box-card !border-none table-search-wra base-bg !px-[35px]",shadow:"never"},{default:t(()=>[e(z,{class:"flex"},{default:t(()=>[e(E,{span:12},{default:t(()=>[r("div",xe,[e(P,{value:_.refund_all_money},null,8,["value"]),r("div",ye,[r("div",we,[r("span",null,d(a(o)("accumulateRefundMoney")),1)])])])]),_:1}),e(E,{span:12},{default:t(()=>[r("div",ke,[e(P,{value:_.refund_have_money},null,8,["value"]),r("div",Re,[r("div",Ve,[r("span",null,d(a(o)("haveRefundMoney")),1)])])])]),_:1})]),_:1})]),_:1}),e(w,{class:"box-card !border-none mb-[10px] table-search-wrap",shadow:"never"},{default:t(()=>[e(S,{inline:!0,model:n.searchParam,ref_key:"searchFormRef",ref:R},{default:t(()=>[e(u,{label:a(o)("memberInfo"),prop:"keywords"},{default:t(()=>[e(k,{modelValue:n.searchParam.keywords,"onUpdate:modelValue":s[0]||(s[0]=l=>n.searchParam.keywords=l),class:"w-[240px]",placeholder:a(o)("memberInfoPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e(u,{label:a(o)("refundNumber"),prop:"refund_no"},{default:t(()=>[e(k,{modelValue:n.searchParam.refund_no,"onUpdate:modelValue":s[1]||(s[1]=l=>n.searchParam.refund_no=l),class:"w-[240px]",placeholder:a(o)("refundNumberPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e(u,{label:a(o)("orderNumber"),prop:"order_no"},{default:t(()=>[e(k,{modelValue:n.searchParam.order_no,"onUpdate:modelValue":s[2]||(s[2]=l=>n.searchParam.order_no=l),class:"w-[240px]",placeholder:a(o)("orderNumberPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e(u,{label:a(o)("refundStatus"),prop:"status"},{default:t(()=>[e(L,{modelValue:n.searchParam.status,"onUpdate:modelValue":s[3]||(s[3]=l=>n.searchParam.status=l),clearable:"",class:"input-width"},{default:t(()=>[e(C,{label:a(o)("selectPlaceholder"),value:""},null,8,["label"]),(p(!0),y(J,null,K(V.value,(l,g)=>(p(),D(C,{label:l.name,value:g,key:g},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e(u,{label:a(o)("refundTime"),prop:"create_time"},{default:t(()=>[e(B,{modelValue:n.searchParam.create_time,"onUpdate:modelValue":s[4]||(s[4]=l=>n.searchParam.create_time=l),type:"datetimerange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":a(o)("startDate"),"end-placeholder":a(o)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),e(u,null,{default:t(()=>[e(v,{type:"primary",onClick:s[5]||(s[5]=l=>h())},{default:t(()=>[f(d(a(o)("search")),1)]),_:1}),e(v,{onClick:s[6]||(s[6]=l=>U(R.value))},{default:t(()=>[f(d(a(o)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),r("div",null,[W((p(),D(M,{data:n.data,size:"large"},{empty:t(()=>[r("span",null,d(n.loading?"":a(o)("emptyData")),1)]),default:t(()=>[e(c,{"show-overflow-tooltip":!0,label:a(o)("memberInfo"),align:"left","min-width":"140"},{default:t(({row:l})=>[r("div",{class:"flex items-center cursor-pointer",onClick:g=>T(l.member.member_id)},[l.member.headimg?(p(),y("img",{key:0,class:"w-[50px] h-[50px] mr-[10px]",src:a(X)(l.member.headimg),alt:""},null,8,Ee)):(p(),y("img",Ce)),r("div",Se,[r("span",Ne,d(l.member.nickname||""),1),r("span",De,d(l.member.mobile||""),1)])],8,Pe)]),_:1},8,["label"]),e(c,{prop:"refund_no",label:a(o)("refundNumber"),align:"center","min-width":"200"},null,8,["label"]),e(c,{prop:"item.item_name",label:a(o)("refundSource"),align:"center","min-width":"140"},null,8,["label"]),e(c,{prop:"money",label:a(o)("refundAmount"),align:"center","min-width":"140"},null,8,["label"]),e(c,{label:a(o)("refundTime"),"min-width":"180",align:"center"},{default:t(({row:l})=>[f(d(l.create_time||""),1)]),_:1},8,["label"]),e(c,{label:a(o)("statusName"),"min-width":"180",align:"center"},{default:t(({row:l})=>[f(d(l.status_name||""),1)]),_:1},8,["label"]),e(c,{label:a(o)("operation"),align:"right",fixed:"right",width:"130"},{default:t(({row:l})=>[e(v,{type:"primary",link:"",onClick:g=>$(l)},{default:t(()=>[f(d(a(o)("info")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[A,n.loading]]),r("div",Fe,[e(Y,{"current-page":n.page,"onUpdate:current-page":s[7]||(s[7]=l=>n.page=l),"page-size":n.limit,"onUpdate:page-size":s[8]||(s[8]=l=>n.limit=l),layout:"total, sizes, prev, pager, next, jumper",total:n.total,onSizeChange:s[9]||(s[9]=l=>h()),onCurrentChange:h},null,8,["current-page","page-size","total"])])])]),_:1}),e(j,{modelValue:b.value,"onUpdate:modelValue":s[11]||(s[11]=l=>b.value=l),title:a(o)("refundDetail"),width:"500px","destroy-on-close":!0},{footer:t(()=>[r("span",Me,[e(v,{type:"primary",onClick:s[10]||(s[10]=l=>b.value=!1)},{default:t(()=>[f(d(a(o)("confirm")),1)]),_:1})])]),default:t(()=>[e(S,{model:m.value,"label-width":"120px",ref:"formRef",rules:i.formRules,class:"page-form"},{default:t(()=>[e(u,{label:a(o)("nickname")},{default:t(()=>[r("div",Ie,d(m.value.member.nickname),1)]),_:1},8,["label"]),e(u,{label:a(o)("refundSource")},{default:t(()=>[r("div",Ue,d(m.value.item.item_name),1)]),_:1},8,["label"]),e(u,{label:a(o)("refundAmount")},{default:t(()=>[r("div",$e,d(m.value.money),1)]),_:1},8,["label"]),e(u,{label:a(o)("orderNumber")},{default:t(()=>[r("div",Te,d(m.value.item.order_no),1)]),_:1},8,["label"]),e(u,{label:a(o)("refundNumber")},{default:t(()=>[r("div",ze,d(m.value.refund_no),1)]),_:1},8,["label"]),e(u,{label:a(o)("refundTime")},{default:t(()=>[r("div",Le,d(m.value.create_time),1)]),_:1},8,["label"]),e(u,{label:a(o)("statusName")},{default:t(()=>[r("div",Be,d(m.value.status_name),1)]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title"])])}}});export{_a as default};
|