index-10e6c153.js 12 KB

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