index-b371f460.js 12 KB

1
  1. /* empty css *//* empty css */import{_ as e}from"./index-e9ebea94.js";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-750c06e4.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-f2096d9f.js";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang-aaf7dea9.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,V as s,av as p,m as n,ar as d,p as m,x as u,ao as _,o as c,c as h,a as b,w as y,f as v,F as f,y as w,l as V,z as x,e as j,Z as k,t as g,b as D,a9 as U,at as Y,a5 as M,a6 as P,A as I,B as C,aC as R,aa as z,cA as O,W as T,ab as A,a2 as E,R as L,S as N,_ as F}from"./index-a465c001.js";import{u as Q}from"./useGetList-3d225d52.js";import q from"./index-ac1eb583.js";import{_ as B}from"./create.vue_vue_type_script_setup_true_lang-2025b00d.js";import{c as G,a as J,b as K,d as S,e as W}from"./index-543a89d1.js";/* empty css *//* empty css */import"./index-06789939.js";import"./exportExcel-331c8441.js";/* empty css *//* empty css *//* empty css */import"./recharge.vue_vue_type_script_setup_true_lang-6da815cb.js";import"./consume.vue_vue_type_script_setup_true_lang-35da6515.js";import"./readLog.vue_vue_type_script_setup_true_lang-0fbd9225.js";import"./http-aca42192.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"},H=e=>(L("data-v-53679654"),e=e(),N(),e),$={class:"table-default"},ee={class:"wrapper"},ae={class:"text-lg font-bold content"},le=H((()=>j("br",null,null,-1))),te=H((()=>j("br",null,null,-1))),oe=F(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:N,search:F,reset:H,loading:oe}=Q("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(N.value.orderTime){const a=Y(e);N.value.created_at_start=a[0],N.value.created_at_end=a[1]}else delete N.value.created_at_start,delete N.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":K({limit:30,...a}).then((e=>{de.value=e.data}));break;case"channelMiniprogram":J({limit:30,...a}).then((e=>{me.value=e.data}));break;case"channelPromotions":G({limit:30,...a}).then((e=>{ue.value=e.data}))}},we=()=>{H()},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}F()},je=m((()=>{var e;return null==(e=L.value)?void 0:e.data}));return u((()=>{fe("channelPromotionsUsers"),fe("channelMiniprogram"),fe("channelPromotions"),S().then((e=>{_e.value=e.data})),W().then((e=>{ce.value=e.data})),F()})),(o,i)=>{const s=M,p=P,n=I,d=C,m=R,u=t,Y=l,L=z,Q=O,G=T,J=A,K=a,S=e,W=_("action"),H=E;return c(),h("div",null,[b(Y,{search:v(F),reset:we},{body:y((()=>[b(p,{label:"订单号",prop:"trade_no"},{default:y((()=>[b(s,{modelValue:v(N).trade_no,"onUpdate:modelValue":i[0]||(i[0]=e=>v(N).trade_no=e),placeholder:"请输入订单号",clearable:""},null,8,["modelValue"])])),_:1}),b(p,{label:"用户ID",prop:"uid"},{default:y((()=>[b(s,{modelValue:v(N).uid,"onUpdate:modelValue":i[1]||(i[1]=e=>v(N).uid=e),placeholder:"请输入用户ID",clearable:""},null,8,["modelValue"])])),_:1}),b(p,{label:"充值类型",prop:"order_type"},{default:y((()=>[b(d,{modelValue:v(N).order_type,"onUpdate:modelValue":i[2]||(i[2]=e=>v(N).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(N).status,"onUpdate:modelValue":i[3]||(i[3]=e=>v(N).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(N).promotion_id,"onUpdate:modelValue":i[4]||(i[4]=e=>v(N).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(N).promotion_id?x("",!0):(c(),V(p,{key:0,label:"小程序",prop:"miniprogram_id"},{default:y((()=>[b(d,{modelValue:v(N).miniprogram_id,"onUpdate:modelValue":i[5]||(i[5]=e=>v(N).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(N).promotion_id||v(he).includes("optimizer")?x("",!0):(c(),V(p,{key:1,label:"优化师",prop:"user_id"},{default:y((()=>[b(d,{modelValue:v(N).user_id,"onUpdate:modelValue":i[6]||(i[6]=e=>v(N).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(N).orderTime,"onUpdate:modelValue":i[7]||(i[7]=e=>v(N).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(N).pay_merchant_name,"onUpdate:modelValue":i[8]||(i[8]=e=>v(N).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(N).payee_name,"onUpdate:modelValue":i[9]||(i[9]=e=>v(N).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(N).pay_appid,"onUpdate:modelValue":i[10]||(i[10]=e=>v(N).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(Z),extro_params:{is_export:!0,...v(N)}},null,8,["title_obj","extro_params"])):(c(),V(u,{key:1,api:"channel/order_list",sheet_name:"订单列表",title_obj:v(X),extro_params:{is_export:!0,...v(N)}},null,8,["title_obj","extro_params"]))])),_:1},8,["search"]),j("div",$,[k((c(),V(J,{data:v(je),class:"mt-3"},{default:y((()=>[v(he).includes("optimizer")||v(he).includes("company")?x("",!0):(c(),V(L,{key:0,prop:"company_name",label:"商户名称","min-width":"200px"},{default:y((e=>[j("div",null,g(e.row.company_name),1),j("div",null,"ID:"+g(e.row.puser_id),1)])),_:1})),v(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"}),v(he).includes("administrator")?(c(),V(L,{key:2,prop:"pay_merchant_name",label:"支付名称","show-overflow-tooltip":"","min-width":"150px"})):x("",!0),v(he).includes("administrator")?(c(),V(L,{key:3,prop:"payee_name",label:"收款主体","show-overflow-tooltip":"","min-width":"150px"})):x("",!0),v(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:y((e=>[j("div",ee,[j("span",ae,[b(Q,{class:"mx-1",type:be(e.row)},{default:y((()=>[D(g(e.row.status_txt),1)])),_:2},1032,["type"])])])])),_:1}),b(L,{label:"操作",fixed:"right"},{default:y((e=>[k((c(),V(G,{link:"",type:"primary",size:"small",onClick:a=>Ve("userDetailVisible",e.row)},{default:y((()=>[D("用户详情")])),_:2},1032,["onClick"])),[[W,"channel.orders.userDetails"]]),le,e.row.can_apply?k((c(),V(G,{key:0,link:"",type:"primary",size:"small",onClick:a=>Ve("applyVisible",e.row)},{default:y((()=>[D("发起退款")])),_:2},1032,["onClick"])),[[W,"orderRefund.RefundOrder.applyRefund"]]):x("",!0),te])),_:1})])),_:1},8,["data"])),[[H,v(oe)]]),b(K)]),b(S,{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(q,{onClose:i[11]||(i[11]=e=>xe("applyVisible")),primary:v(se)},null,8,["primary"])])),_:1},8,["modelValue"]),b(S,{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(B,{onClose:i[13]||(i[13]=e=>xe("applyVisible")),primary:v(pe)},null,8,["primary"])])),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-53679654"]]);export{oe as default};