1 |
- /* empty css *//* empty css */import{_ as e}from"./index-b284b64a.js";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-47fc054f.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{_ as l}from"./search.vue_vue_type_script_setup_true_lang-4466c507.js";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang-75705d53.js";import{h as o}from"./moment-19b77ecd.js";/* empty css *//* empty css *//* empty css */import{s as r}from"./shortcuts-45ce8eab.js";import{d as i,W as s,aG as p,q as n,aH as d,n as m,z as u,ao as _,o as c,c as h,a as b,w as f,f as y,F as v,p as w,l as V,A as x,e as j,Z as k,t as g,b as D,a9 as U,as as Y,a5 as I,a6 as M,B as P,D as C,ax as z,aa as A,aI as R,X as T,ab as q,a2 as F,S as L,U as O,_ as B}from"./index-3bbb91df.js";import{u as E}from"./useGetList-13e33809.js";import G from"./index-eb1b41a7.js";import{_ as N}from"./create.vue_vue_type_script_setup_true_lang-e27846e3.js";import{c as H,a as K,b as Q,d as S,e as W}from"./index-78d3f01f.js";/* empty css *//* empty css */import"./index-3ea3470b.js";import"./exportExcel-331c8441.js";/* empty css *//* empty css *//* empty css */import"./recharge.vue_vue_type_script_setup_true_lang-2da8162e.js";import"./consume.vue_vue_type_script_setup_true_lang-953135c8.js";import"./readLog.vue_vue_type_script_setup_true_lang-ab89a609.js";import"./http-01f5a64e.js";const X={"商户名称":"company_name","商户ID":"puser_id","优化师":"username","小程序":"play_name","用户ID":"uid","订单号":"trade_no","订单时间":"created_at","染色注册时间":"ranse_created_at","累计充值成功次数":"total_count","充值金额":"price","推广名称":"promotion_title","充值类型":"tip_text","支付方式":"pay_name","订单状态":"status_txt"},Z={"商户名称":"company_name","商户ID":"puser_id","优化师":"username","小程序":"play_name","用户ID":"uid","订单号":"trade_no","订单时间":"created_at","染色注册时间":"ranse_created_at","累计充值成功次数":"total_count","充值金额":"price","推广名称":"promotion_title","充值类型":"tip_text","支付方式":"pay_name","支付名称":"pay_merchant_name","收款主体":"payee_name","支付商户号":"pay_appid","订单状态":"status_txt"},J=e=>(L("data-v-f8e07fe9"),e=e(),O(),e),$={class:"table-default"},ee={class:"wrapper"},ae={class:"text-lg font-bold content"},le=J((()=>j("br",null,null,-1))),te=J((()=>j("br",null,null,-1))),oe=B(i({__name:"index",setup(i){o().startOf("month").format("YYYY-MM-DD"),o().endOf("month").format("YYYY-MM-DD");s(),p();const{data:L,query:O,search:B,reset:J,loading:oe}=E("channel/order_list"),re=n(!1),ie=n(!1),se=n({}),pe=n({}),ne=n({}),de=n([]),me=n([]),ue=n([]),_e=n([]),ce=n([]),he=d("rolesIdentify"),be=e=>{switch(e.status){case"PAID":return"success";case"REFUND":return"default";case"UNPAID":return"danger"}},fe=e=>{if(O.value.orderTime){const a=Y(e);O.value.created_at_start=a[0],O.value.created_at_end=a[1]}else delete O.value.created_at_start,delete O.value.created_at_end},ye=(e,a)=>{switch(a){case"channelPromotionsUsers":ve("channelPromotionsUsers",{name:e});break;case"channelMiniprogram":ve("channelMiniprogram",{name:e});break;case"channelPromotions":ve("channelPromotions",{name:e})}},ve=(e,a)=>{switch(e){case"channelPromotionsUsers":Q({limit:30,...a}).then((e=>{de.value=e.data}));break;case"channelMiniprogram":K({limit:30,...a}).then((e=>{me.value=e.data}));break;case"channelPromotions":H({limit:30,...a}).then((e=>{ue.value=e.data}))}},we=()=>{J()},Ve=(e,a)=>{switch(ne.value=a,e){case"userDetailVisible":re.value=!0,se.value=a;break;case"applyVisible":ie.value=!0,pe.value=a}},xe=e=>{switch(e){case"userDetailVisible":re.value=!1;break;case"applyVisible":ie.value=!1}B()},je=m((()=>{var e;return null==(e=L.value)?void 0:e.data}));return u((()=>{ve("channelPromotionsUsers"),ve("channelMiniprogram"),ve("channelPromotions"),S().then((e=>{_e.value=e.data})),W().then((e=>{ce.value=e.data})),B()})),(o,i)=>{const s=I,p=M,n=P,d=C,m=z,u=t,Y=l,L=A,E=R,H=T,K=q,Q=a,S=e,W=_("action"),J=F;return c(),h("div",null,[b(Y,{search:y(B),reset:we},{body:f((()=>[b(p,{label:"订单号",prop:"trade_no"},{default:f((()=>[b(s,{modelValue:y(O).trade_no,"onUpdate:modelValue":i[0]||(i[0]=e=>y(O).trade_no=e),placeholder:"请输入订单号",clearable:""},null,8,["modelValue"])])),_:1}),b(p,{label:"用户ID",prop:"uid"},{default:f((()=>[b(s,{modelValue:y(O).uid,"onUpdate:modelValue":i[1]||(i[1]=e=>y(O).uid=e),placeholder:"请输入用户ID",clearable:""},null,8,["modelValue"])])),_:1}),b(p,{label:"充值类型",prop:"order_type"},{default:f((()=>[b(d,{modelValue:y(O).order_type,"onUpdate:modelValue":i[2]||(i[2]=e=>y(O).order_type=e),filterable:"",clearable:"",placeholder:"选择充值类型"},{default:f((()=>[(c(!0),h(v,null,w(y(ce),(e=>(c(),V(n,{key:e.value,label:e.name,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),b(p,{label:"订单状态",prop:"status"},{default:f((()=>[b(d,{modelValue:y(O).status,"onUpdate:modelValue":i[3]||(i[3]=e=>y(O).status=e),filterable:"",clearable:"",placeholder:"选择订单状态"},{default:f((()=>[(c(!0),h(v,null,w(y(_e),(e=>(c(),V(n,{key:e.value,label:e.name,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),b(p,{label:"推广名称",prop:"promotion_id"},{default:f((()=>[b(d,{modelValue:y(O).promotion_id,"onUpdate:modelValue":i[4]||(i[4]=e=>y(O).promotion_id=e),filterable:"",remote:"",clearable:"","remote-method":e=>{ye(e,"channelPromotions")},placeholder:"全部推广名称"},{default:f((()=>[(c(!0),h(v,null,w(y(ue),(e=>(c(),V(n,{key:e.promotion_id,label:e.name,value:e.promotion_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])])),_:1}),y(O).promotion_id?x("",!0):(c(),V(p,{key:0,label:"小程序",prop:"miniprogram_id"},{default:f((()=>[b(d,{modelValue:y(O).miniprogram_id,"onUpdate:modelValue":i[5]||(i[5]=e=>y(O).miniprogram_id=e),filterable:"",remote:"","remote-method":e=>{ye(e,"channelMiniprogram")},clearable:"",placeholder:"选择小程序"},{default:f((()=>[(c(!0),h(v,null,w(y(me),(e=>(c(),V(n,{key:e.miniprogram_id,label:e.name,value:e.miniprogram_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])])),_:1})),y(O).promotion_id||y(he).includes("optimizer")?x("",!0):(c(),V(p,{key:1,label:"优化师",prop:"user_id"},{default:f((()=>[b(d,{modelValue:y(O).user_id,"onUpdate:modelValue":i[6]||(i[6]=e=>y(O).user_id=e),filterable:"",remote:"",clearable:"","remote-method":e=>{ye(e,"channelPromotionsUsers")},placeholder:"选择优化师"},{default:f((()=>[(c(!0),h(v,null,w(y(de),(e=>(c(),V(n,{key:e.user_id,label:e.name,value:e.user_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])])),_:1})),b(p,{label:"订单时间"},{default:f((()=>[b(m,{"unlink-panels":"",clearable:"",onChange:fe,format:"YYYY/MM/DD","value-format":"YYYY-MM-DD",modelValue:y(O).orderTime,"onUpdate:modelValue":i[7]||(i[7]=e=>y(O).orderTime=e),type:"daterange",shortcuts:y(r),"range-separator":"To","start-placeholder":"开始时间","end-placeholder":"结束时间"},null,8,["modelValue","shortcuts"])])),_:1}),y(he).includes("administrator")?(c(),V(p,{key:2,label:"支付名称",prop:"pay_merchant_name"},{default:f((()=>[b(s,{modelValue:y(O).pay_merchant_name,"onUpdate:modelValue":i[8]||(i[8]=e=>y(O).pay_merchant_name=e),placeholder:"请输入支付名称",clearable:""},null,8,["modelValue"])])),_:1})):x("",!0),y(he).includes("administrator")?(c(),V(p,{key:3,label:"收款主体",prop:"payee_name"},{default:f((()=>[b(s,{modelValue:y(O).payee_name,"onUpdate:modelValue":i[9]||(i[9]=e=>y(O).payee_name=e),placeholder:"请输入收款主体",clearable:""},null,8,["modelValue"])])),_:1})):x("",!0),y(he).includes("administrator")?(c(),V(p,{key:4,label:"支付商户号",prop:"pay_appid"},{default:f((()=>[b(s,{modelValue:y(O).pay_appid,"onUpdate:modelValue":i[10]||(i[10]=e=>y(O).pay_appid=e),placeholder:"请输入支付商户号",clearable:""},null,8,["modelValue"])])),_:1})):x("",!0)])),extra_button:f((()=>[y(he).includes("administrator")?(c(),V(u,{key:0,api:"channel/order_list",sheet_name:"订单列表",title_obj:y(Z),extro_params:{is_export:!0,...y(O)}},null,8,["title_obj","extro_params"])):(c(),V(u,{key:1,api:"channel/order_list",sheet_name:"订单列表",title_obj:y(X),extro_params:{is_export:!0,...y(O)}},null,8,["title_obj","extro_params"]))])),_:1},8,["search"]),j("div",$,[k((c(),V(K,{data:y(je),class:"mt-3"},{default:f((()=>[y(he).includes("optimizer")||y(he).includes("company")?x("",!0):(c(),V(L,{key:0,prop:"company_name",label:"商户名称","min-width":"200px"},{default:f((e=>[j("div",null,g(e.row.company_name),1),j("div",null,"ID:"+g(e.row.puser_id),1)])),_:1})),y(he).includes("optimizer")?x("",!0):(c(),V(L,{key:1,prop:"username",label:"优化师","show-overflow-tooltip":"","min-width":"200px"})),b(L,{prop:"play_name","show-overflow-tooltip":"",label:"小程序","min-width":"200px"}),b(L,{prop:"uid",label:"用户ID","show-overflow-tooltip":""}),b(L,{prop:"trade_no",label:"订单号","show-overflow-tooltip":"","min-width":"200px"}),b(L,{prop:"created_at",label:"订单时间","show-overflow-tooltip":"","min-width":"200px"}),b(L,{prop:"ranse_created_at",label:"染色注册时间","show-overflow-tooltip":"","min-width":"200px"}),b(L,{prop:"total_count",label:"累计充值成功次数","show-overflow-tooltip":"","min-width":"150px"}),b(L,{prop:"price",label:"充值金额","show-overflow-tooltip":""}),b(L,{prop:"promotion_title",label:"推广名称","show-overflow-tooltip":"","min-width":"200px"}),b(L,{prop:"tip_text",label:"充值类型","show-overflow-tooltip":"","min-width":"150px"}),b(L,{prop:"pay_name",label:"支付方式","show-overflow-tooltip":"","min-width":"150px"}),y(he).includes("administrator")?(c(),V(L,{key:2,prop:"pay_merchant_name",label:"支付名称","show-overflow-tooltip":"","min-width":"150px"})):x("",!0),y(he).includes("administrator")?(c(),V(L,{key:3,prop:"payee_name",label:"收款主体","show-overflow-tooltip":"","min-width":"150px"})):x("",!0),y(he).includes("administrator")?(c(),V(L,{key:4,prop:"pay_appid",label:"支付商户号","show-overflow-tooltip":"","min-width":"150px"})):x("",!0),b(L,{prop:"status_txt",label:"订单状态","show-overflow-tooltip":"","min-width":"150px"},{default:f((e=>[j("div",ee,[j("span",ae,[b(E,{class:"mx-1",type:be(e.row)},{default:f((()=>[D(g(e.row.status_txt),1)])),_:2},1032,["type"])])])])),_:1}),b(L,{label:"操作",fixed:"right"},{default:f((e=>[k((c(),V(H,{link:"",type:"primary",size:"small",onClick:a=>Ve("userDetailVisible",e.row)},{default:f((()=>[D("用户详情")])),_:2},1032,["onClick"])),[[W,"channel.orders.userDetails"]]),le,"PAID"==e.row.status?k((c(),V(H,{key:0,link:"",type:"primary",size:"small",onClick:a=>Ve("applyVisible",e.row)},{default:f((()=>[D("申请退款")])),_:2},1032,["onClick"])),[[W,"orderRefund.RefundOrder.applyRefund"]]):x("",!0),te])),_:1})])),_:1},8,["data"])),[[J,y(oe)]]),b(Q)]),b(S,{modelValue:y(re),"onUpdate:modelValue":i[12]||(i[12]=e=>U(re)?re.value=e:null),width:"50%",title:"用户详情","destroy-on-close":""},{default:f((()=>[b(G,{onClose:i[11]||(i[11]=e=>xe("applyVisible")),primary:y(se)},null,8,["primary"])])),_:1},8,["modelValue"]),b(S,{modelValue:y(ie),"onUpdate:modelValue":i[14]||(i[14]=e=>U(ie)?ie.value=e:null),width:"50%",title:"申请退款","destroy-on-close":""},{default:f((()=>[b(N,{onClose:i[13]||(i[13]=e=>xe("applyVisible")),primary:y(pe)},null,8,["primary"])])),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-f8e07fe9"]]);export{oe as default};
|