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