index-1878500f.js 12 KB

1
  1. /* empty css *//* empty css */import{_ as e}from"./index-09d53675.js";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-69646451.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-c1f07328.js";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang-5e1e2645.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 k,t as g,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 T,X as O,ab as R,a2 as E,S as F,U as L,_ as N}from"./index-9d63ae19.js";import{u as q}from"./useGetList-6e0ee96a.js";import B from"./index-3e5b140a.js";import{_ as G}from"./create.vue_vue_type_script_setup_true_lang-3e2a8fd0.js";import{c as H,a as W,b as X,d as J,e as K}from"./index-4b88156d.js";/* empty css *//* empty css */import"./index-537afe47.js";import"./exportExcel-331c8441.js";/* empty css *//* empty css *//* empty css */import"./recharge.vue_vue_type_script_setup_true_lang-0379a6c7.js";import"./consume.vue_vue_type_script_setup_true_lang-0bcf22ad.js";import"./readLog.vue_vue_type_script_setup_true_lang-c824f0d9.js";import"./http-41948287.js";const Q={"商户名称":"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"},S={"商户名称":"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"},Z=e=>(F("data-v-ccd00106"),e=e(),L(),e),$={class:"table-default"},ee={class:"wrapper"},ae={class:"text-lg font-bold content"},le=Z((()=>j("br",null,null,-1))),te=Z((()=>j("br",null,null,-1))),oe=N(i({__name:"index",setup(i){o().startOf("month").format("YYYY-MM-DD"),o().endOf("month").format("YYYY-MM-DD");s(),p();const{data:F,query:L,search:N,reset:Z,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(L.value.orderTime){const a=Y(e);L.value.created_at_start=a[0],L.value.created_at_end=a[1]}else delete L.value.created_at_start,delete L.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":H({limit:30,...a}).then((e=>{ue.value=e.data}))}},we=()=>{Z()},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}N()},je=m((()=>{var e;return null==(e=F.value)?void 0:e.data}));return u((()=>{fe("channelPromotionsUsers"),fe("channelMiniprogram"),fe("channelPromotions"),J().then((e=>{_e.value=e.data})),K().then((e=>{ce.value=e.data})),N()})),(o,i)=>{const s=I,p=M,n=P,d=C,m=z,u=t,Y=l,F=A,q=T,H=O,W=R,X=a,J=e,K=_("action"),Z=E;return c(),h("div",null,[b(Y,{search:v(N),reset:we},{body:y((()=>[b(p,{label:"订单号",prop:"trade_no"},{default:y((()=>[b(s,{modelValue:v(L).trade_no,"onUpdate:modelValue":i[0]||(i[0]=e=>v(L).trade_no=e),placeholder:"请输入订单号",clearable:""},null,8,["modelValue"])])),_:1}),b(p,{label:"用户ID",prop:"uid"},{default:y((()=>[b(s,{modelValue:v(L).uid,"onUpdate:modelValue":i[1]||(i[1]=e=>v(L).uid=e),placeholder:"请输入用户ID",clearable:""},null,8,["modelValue"])])),_:1}),b(p,{label:"充值类型",prop:"order_type"},{default:y((()=>[b(d,{modelValue:v(L).order_type,"onUpdate:modelValue":i[2]||(i[2]=e=>v(L).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(L).status,"onUpdate:modelValue":i[3]||(i[3]=e=>v(L).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(L).promotion_id,"onUpdate:modelValue":i[4]||(i[4]=e=>v(L).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(L).promotion_id?x("",!0):(c(),V(p,{key:0,label:"小程序",prop:"miniprogram_id"},{default:y((()=>[b(d,{modelValue:v(L).miniprogram_id,"onUpdate:modelValue":i[5]||(i[5]=e=>v(L).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(L).promotion_id||v(he).includes("optimizer")?x("",!0):(c(),V(p,{key:1,label:"优化师",prop:"user_id"},{default:y((()=>[b(d,{modelValue:v(L).user_id,"onUpdate:modelValue":i[6]||(i[6]=e=>v(L).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(L).orderTime,"onUpdate:modelValue":i[7]||(i[7]=e=>v(L).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(L).pay_merchant_name,"onUpdate:modelValue":i[8]||(i[8]=e=>v(L).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(L).payee_name,"onUpdate:modelValue":i[9]||(i[9]=e=>v(L).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(L).pay_appid,"onUpdate:modelValue":i[10]||(i[10]=e=>v(L).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(S),extro_params:{is_export:!0,...v(L)}},null,8,["title_obj","extro_params"])):(c(),V(u,{key:1,api:"channel/order_list",sheet_name:"订单列表",title_obj:v(Q),extro_params:{is_export:!0,...v(L)}},null,8,["title_obj","extro_params"]))])),_:1},8,["search"]),j("div",$,[k((c(),V(W,{data:v(je),class:"mt-3"},{default:y((()=>[v(he).includes("optimizer")||v(he).includes("company")?x("",!0):(c(),V(F,{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(F,{key:1,prop:"username",label:"优化师","show-overflow-tooltip":"","min-width":"200px"})),b(F,{prop:"play_name","show-overflow-tooltip":"",label:"小程序","min-width":"200px"}),b(F,{prop:"uid",label:"用户ID","show-overflow-tooltip":""}),b(F,{prop:"trade_no",label:"订单号","show-overflow-tooltip":"","min-width":"200px"}),b(F,{prop:"created_at",label:"订单时间","show-overflow-tooltip":"","min-width":"200px"}),b(F,{prop:"ranse_created_at",label:"染色注册时间","show-overflow-tooltip":"","min-width":"200px"}),b(F,{prop:"total_count",label:"累计充值成功次数","show-overflow-tooltip":"","min-width":"150px"}),b(F,{prop:"price",label:"充值金额","show-overflow-tooltip":""}),b(F,{prop:"promotion_title",label:"推广名称","show-overflow-tooltip":"","min-width":"200px"}),b(F,{prop:"tip_text",label:"充值类型","show-overflow-tooltip":"","min-width":"150px"}),b(F,{prop:"pay_name",label:"支付方式","show-overflow-tooltip":"","min-width":"150px"}),v(he).includes("administrator")?(c(),V(F,{key:2,prop:"pay_merchant_name",label:"支付名称","show-overflow-tooltip":"","min-width":"150px"})):x("",!0),v(he).includes("administrator")?(c(),V(F,{key:3,prop:"payee_name",label:"收款主体","show-overflow-tooltip":"","min-width":"150px"})):x("",!0),v(he).includes("administrator")?(c(),V(F,{key:4,prop:"pay_appid",label:"支付商户号","show-overflow-tooltip":"","min-width":"150px"})):x("",!0),b(F,{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(F,{label:"操作",fixed:"right"},{default:y((e=>[k((c(),V(H,{link:"",type:"primary",size:"small",onClick:a=>Ve("userDetailVisible",e.row)},{default:y((()=>[D("用户详情")])),_:2},1032,["onClick"])),[[K,"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:y((()=>[D("申请退款")])),_:2},1032,["onClick"])),[[K,"orderRefund.RefundOrder.applyRefund"]]):x("",!0),te])),_:1})])),_:1},8,["data"])),[[Z,v(oe)]]),b(X)]),b(J,{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(B,{onClose:i[11]||(i[11]=e=>xe("applyVisible")),primary:v(se)},null,8,["primary"])])),_:1},8,["modelValue"]),b(J,{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(G,{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};