2 lines
6.6 KiB
JavaScript
2 lines
6.6 KiB
JavaScript
import{d as G,O as A,n as H,r as h,f as O,h as p,c as _,e,w as l,a as r,t as i,u as o,N as s,F as q,G as J,I as T,i as f,y as K,R as W,cJ as X,an as Q,ao as Z,$ as ee,W as te,X as ae,as as oe,aF as le,cK as se,E as ne,Y as re,ah as ie,aj as me,at as ce,a0 as pe}from"./index-4dcc0234.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 */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{_ as de}from"./default_headimg-a897263d.js";import{F as _e,f as ue,G as fe}from"./member-97cfd04b.js";import{_ as be}from"./member-point-info.vue_vue_type_script_setup_true_lang-96ad5304.js";/* empty css */const he={class:"main-container"},ge={class:"flex justify-between items-center mb-[5px]"},ve={class:"text-[20x]"},xe={class:"statistic-card"},ye={class:"statistic-footer"},we={class:"footer-item text-[14px] text-[#666]"},ke={class:"statistic-card"},Pe={class:"statistic-footer"},Ce={class:"footer-item text-[14px] text-[#666]"},Ee={class:"mt-[16px]"},De=["onClick"],Fe=["src"],Te={key:1,class:"w-[50px] h-[50px] mr-[10px]",src:de,alt:""},Ie={class:"flex flex flex-col"},Ve={class:""},Le={key:0},$e={key:1},Ne={class:"mt-[16px] flex justify-end"},rt=G({__name:"point",setup(Se){const w=A(),k=parseInt(w.query.id||0),I=w.meta.title,a=H({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{keywords:"",from_type:"",create_time:"",mobile:"",member_id:k}}),u=h([]);(()=>{_e({member_id:k}).then(m=>{u.value=m.data})})();const P=h([]);(async()=>{P.value=await(await ue("point")).data})();const C=h(),V=m=>{m&&(m.resetFields(),d())},d=(m=1)=>{a.loading=!0,a.page=m,fe({page:a.page,limit:a.limit,...a.searchParam}).then(n=>{a.loading=!1,a.data=n.data.data,a.total=n.data.total}).catch(()=>{a.loading=!1})};d();const g=h(null),L=m=>{g.value.setFormData(m),g.value.showDialog=!0},$=O(),N=m=>{$.push(`/member/detail?id=${m}`)};return(m,n)=>{const E=X,D=Q,S=Z,v=ee,z=te,b=ae,F=oe,R=le,U=se,x=ne,B=re,c=ie,Y=me,j=ce,M=pe;return p(),_("div",he,[e(v,{class:"box-card !border-none",shadow:"never"},{default:l(()=>[r("div",ge,[r("span",ve,i(o(I)),1)]),e(v,{class:"box-card !border-none base-bg !px-[35px]",shadow:"never"},{default:l(()=>[e(S,{class:"flex"},{default:l(()=>[e(D,{span:12,class:"min-w-[100px]"},{default:l(()=>[r("div",xe,[e(E,{value:u.value.point_get?Number.parseInt(u.value.point_get):"0"},null,8,["value"]),r("div",ye,[r("div",we,[r("span",null,i(o(s)("pointGet")),1)])])])]),_:1}),e(D,{span:12,class:"min-w-[100px]"},{default:l(()=>[r("div",ke,[e(E,{value:u.value.point_use?Number.parseInt(u.value.point_use):"0"},null,8,["value"]),r("div",Pe,[r("div",Ce,[r("span",null,i(o(s)("pointUse")),1)])])])]),_:1})]),_:1})]),_:1}),e(v,{class:"box-card !border-none mb-[10px] table-search-wrap",shadow:"never"},{default:l(()=>[e(B,{inline:!0,model:a.searchParam,ref_key:"searchFormRef",ref:C},{default:l(()=>[e(b,{label:o(s)("memberInfo"),prop:"keywords"},{default:l(()=>[e(z,{modelValue:a.searchParam.keywords,"onUpdate:modelValue":n[0]||(n[0]=t=>a.searchParam.keywords=t),class:"w-[240px]",placeholder:o(s)("memberInfoPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e(b,{label:o(s)("fromType"),prop:"from_type"},{default:l(()=>[e(R,{modelValue:a.searchParam.from_type,"onUpdate:modelValue":n[1]||(n[1]=t=>a.searchParam.from_type=t),clearable:"",placeholder:o(s)("fromTypePlaceholder"),class:"input-width"},{default:l(()=>[e(F,{label:o(s)("selectPlaceholder"),value:""},null,8,["label"]),(p(!0),_(q,null,J(P.value,(t,y)=>(p(),T(F,{label:t.name,value:y},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e(b,{label:o(s)("createTime"),prop:"create_time"},{default:l(()=>[e(U,{modelValue:a.searchParam.create_time,"onUpdate:modelValue":n[2]||(n[2]=t=>a.searchParam.create_time=t),type:"datetimerange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":o(s)("startDate"),"end-placeholder":o(s)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),e(b,null,{default:l(()=>[e(x,{type:"primary",onClick:n[3]||(n[3]=t=>d())},{default:l(()=>[f(i(o(s)("search")),1)]),_:1}),e(x,{onClick:n[4]||(n[4]=t=>V(C.value))},{default:l(()=>[f(i(o(s)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),r("div",Ee,[K((p(),T(Y,{data:a.data,size:"large"},{empty:l(()=>[r("span",null,i(a.loading?"":o(s)("emptyData")),1)]),default:l(()=>[e(c,{prop:"member_id",label:o(s)("memberId"),"min-width":"80","show-overflow-tooltip":!0},{default:l(({row:t})=>[f(i(t.member.member_no),1)]),_:1},8,["label"]),e(c,{label:o(s)("memberInfo"),"min-width":"150","show-overflow-tooltip":!0},{default:l(({row:t})=>[r("div",{class:"flex items-center cursor-pointer",onClick:y=>N(t.member_id)},[t.member.headimg?(p(),_("img",{key:0,class:"w-[50px] h-[50px] mr-[10px]",src:o(W)(t.member.headimg),alt:""},null,8,Fe)):(p(),_("img",Te)),r("div",Ie,[r("span",Ve,i(t.member.nickname||""),1)])],8,De)]),_:1},8,["label"]),e(c,{prop:"mobile",label:o(s)("mobile"),"min-width":"100"},{default:l(({row:t})=>[f(i(t.member.mobile||""),1)]),_:1},8,["label"]),e(c,{prop:"account_data",label:o(s)("accountData"),"min-width":"80",align:"right"},{default:l(({row:t})=>[t.account_data>=0?(p(),_("span",Le,"+"+i(t.account_data),1)):(p(),_("span",$e,i(t.account_data),1))]),_:1},8,["label"]),e(c,{prop:"account_sum",label:o(s)("accountSum"),"min-width":"120",align:"right"},null,8,["label"]),e(c,{prop:"from_type_name",label:o(s)("fromType"),"min-width":"180",align:"center"},null,8,["label"]),e(c,{prop:"create_time","show-overflow-tooltip":!0,label:o(s)("createTime"),"min-width":"150"},null,8,["label"]),e(c,{label:o(s)("operation"),align:"right",fixed:"right",width:"100"},{default:l(({row:t})=>[e(x,{type:"primary",link:"",onClick:y=>L(t)},{default:l(()=>[f(i(o(s)("info")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[M,a.loading]]),r("div",Ne,[e(j,{"current-page":a.page,"onUpdate:current-page":n[5]||(n[5]=t=>a.page=t),"page-size":a.limit,"onUpdate:page-size":n[6]||(n[6]=t=>a.limit=t),layout:"total, sizes, prev, pager, next, jumper",total:a.total,onSizeChange:n[7]||(n[7]=t=>d()),onCurrentChange:d},null,8,["current-page","page-size","total"])])])]),_:1}),e(be,{ref_key:"pointDialog",ref:g,onComplete:d},null,512)])}}});export{rt as default};
|