1 |
- import{_ as e}from"./index.vue_vue_type_script_setup_true_lang-f96039b4.js";import{_ as a}from"./search.vue_vue_type_script_setup_true_lang-4086bcaf.js";import{_ as l}from"./index.vue_vue_type_script_setup_true_lang-a3775aa8.js";import{s as t}from"./shortcuts-5a1d5bb1.js";import{d as o,k as r,G as n,a5 as s,X as d,m as i,p,r as u,K as _,o as m,c,e as f,a as h,w as v,F as y,q as b,f as w,j as x,b as k,t as V,s as g,J as D,Q as j,O as U,$ as Y,Y as I,B as C,D as M,_ as P}from"./index-b55b4b29.js";import{u as R}from"./useGetList-d236fcc5.js";import{f as O,c as T,a as z,b as B,d as G,e as q,g as X,h as E}from"./index-170c4e15.js";import{h as F}from"./moment-0b360bb8.js";/* empty css *//* empty css */import"./http-48af19d0.js";import"./index-29465650.js";import"./exportExcel-331c8441.js";const H={0:{"商户名称":"company_name","商户ID":"puser_id","优化师":"username","小程序":"xcx_name","用户ID":"uid","订单号":"trade_no","订单时间":"order_created_at","染色注册时间":"ranse_created_at","申退金额":"refund_price","充值金额":"order_price","推广名称":"promotion_name","档位类型":"tip_text","支付方式":"pay_name","平台审核":"pt_verify_status_text","平台审核备注":"pt_verify_remark","商户审核":"sh_verify_status_text","商户审核备注":"sh_verify_remark"},1:{"商户名称":"company_name","商户ID":"puser_id","优化师":"username","小程序":"xcx_name","用户ID":"uid","订单号":"trade_no","订单时间":"order_created_at","染色注册时间":"ranse_created_at","申退金额":"refund_price","充值金额":"order_price","推广名称":"promotion_name","档位类型":"tip_text","支付方式":"pay_name","退款时间":"pay_at","退款单号":"refund_no","订单状态":"status_text"}},J={0:{"商户名称":"company_name","商户ID":"puser_id","优化师":"username","小程序":"xcx_name","用户ID":"uid","订单号":"trade_no","订单时间":"order_created_at","染色注册时间":"ranse_created_at","申退金额":"refund_price","充值金额":"order_price","推广名称":"promotion_name","档位类型":"tip_text","支付方式":"pay_name","支付名称":"pay_merchant_name","收款主体":"payee_name","支付商户号":"pay_appid","平台审核":"pt_verify_status_text","平台审核备注":"pt_verify_remark","商户审核":"sh_verify_status_text","商户审核备注":"sh_verify_remark"},1:{"商户名称":"company_name","商户ID":"puser_id","优化师":"username","小程序":"xcx_name","用户ID":"uid","订单号":"trade_no","订单时间":"order_created_at","染色注册时间":"ranse_created_at","申退金额":"refund_price","充值金额":"order_price","推广名称":"promotion_name","档位类型":"tip_text","支付方式":"pay_name","支付名称":"pay_merchant_name","收款主体":"payee_name","支付商户号":"pay_appid","退款时间":"pay_at","退款单号":"refund_no","订单状态":"status_text"}},K=e=>(C("data-v-7d00a039"),e=e(),M(),e),L={class:"pl-5"},Q={class:"flex justify-between"},S={class:"table-default"},$={class:"wrapper"},A={class:"text-lg font-bold content"},N={class:"wrapper"},W={class:"text-lg font-bold content"},Z={class:"wrapper"},ee={class:"text-lg font-bold content"},ae=K((()=>f("br",null,null,-1))),le=K((()=>f("br",null,null,-1))),te=K((()=>f("br",null,null,-1))),oe={class:"dialog-footer"},re=P(o({__name:"index",setup(o){const C=r({status:1});F().startOf("month").format("YYYY-MM-DD"),F().endOf("month").format("YYYY-MM-DD");const M=r([{name:"审核通过",value:1},{name:"审核不通过",value:2}]),P=r([{name:"待审核",value:0},{name:"已退款",value:1}]);n(),s(),r(!1);const K=r(!1),{data:re,query:ne,search:se,reset:de,loading:ie}=R("orderRefund/order_list"),pe=r(""),ue=r({}),_e=r([]),me=r([]),ce=r([]),fe=r([]),he=r([]),ve=d("rolesIdentify"),ye=e=>{switch(e.pt_verify_status||e.sh_verify_status){case 0:return"warning";case 1:return"success";case 2:return"danger"}},be=()=>{C.value={status:1},K.value=!1},we=()=>{let e;"平台审核"==pe.value?e=X:"商户审核"==pe.value&&(e=E),e({refund_id:ue.value.id,...C.value}).then((e=>{U.success(e.message),K.value=!1,se()}))},xe=(e,a,l)=>{switch(ue.value=a||{},e){case"approvedVisible":Y.confirm("确认打款吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{O({refund_id:ue.value.id}).then((e=>{U.success(e.message),se()}))})).catch((()=>{}));break;case"noapprovedVisible":pe.value=l||"",K.value=!0}},ke=e=>{if(ne.value.orderTime){const a=I(e);ne.value.created_at_start=a[0],ne.value.created_at_end=a[1]}else delete ne.value.created_at_start,delete ne.value.created_at_end},Ve=(e,a)=>{switch(a){case"channelPromotionsUsers":ge("channelPromotionsUsers",{name:e});break;case"channelMiniprogram":ge("channelMiniprogram",{name:e});break;case"channelPromotions":ge("channelPromotions",{name:e})}},ge=(e,a)=>{switch(e){case"channelPromotionsUsers":B({limit:30,...a}).then((e=>{_e.value=e.data}));break;case"channelMiniprogram":z({limit:30,...a}).then((e=>{me.value=e.data}));break;case"channelPromotions":T({limit:30,...a}).then((e=>{ce.value=e.data}))}},De=()=>{ne.value=Object.assign({page:ne.value.page,limit:ne.value.limit,refund_status:0}),se()},je=i((()=>{var e;return null==(e=re.value)?void 0:e.data}));return p((()=>{ge("channelPromotionsUsers"),ge("channelMiniprogram"),ge("channelPromotions"),G().then((e=>{fe.value=e.data})),q().then((e=>{he.value=e.data})),ne.value.refund_status=0,se()})),(o,r)=>{const n=u("el-radio"),s=u("el-radio-group"),d=u("el-input"),i=u("el-form-item"),p=u("el-option"),U=u("el-select"),Y=u("el-date-picker"),I=l,R=a,O=u("el-table-column"),T=u("el-text"),z=u("el-button"),B=u("el-table"),G=e,q=u("el-form"),X=u("el-dialog"),E=_("action"),F=_("loading");return m(),c("div",null,[f("div",L,[h(s,{modelValue:w(ne).refund_status,"onUpdate:modelValue":r[0]||(r[0]=e=>w(ne).refund_status=e),onChange:w(se)},{default:v((()=>[(m(!0),c(y,null,b(w(P),(e=>(m(),x(n,{label:e.value,key:e.value},{default:v((()=>[k(V(e.name),1)])),_:2},1032,["label"])))),128))])),_:1},8,["modelValue","onChange"])]),f("div",Q,[h(R,{search:w(se),reset:De},{body:v((()=>[h(i,{label:"订单号",prop:"trade_no"},{default:v((()=>[h(d,{modelValue:w(ne).trade_no,"onUpdate:modelValue":r[1]||(r[1]=e=>w(ne).trade_no=e),placeholder:"请输入订单号",clearable:""},null,8,["modelValue"])])),_:1}),h(i,{label:"用户ID",prop:"uid"},{default:v((()=>[h(d,{modelValue:w(ne).uid,"onUpdate:modelValue":r[2]||(r[2]=e=>w(ne).uid=e),placeholder:"请输入用户ID",clearable:""},null,8,["modelValue"])])),_:1}),h(i,{label:"充值类型",prop:"order_type"},{default:v((()=>[h(U,{modelValue:w(ne).order_type,"onUpdate:modelValue":r[3]||(r[3]=e=>w(ne).order_type=e),filterable:"",clearable:"",placeholder:"选择充值类型"},{default:v((()=>[(m(!0),c(y,null,b(w(he),(e=>(m(),x(p,{key:e.value,label:e.name,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),h(i,{label:"推广名称",prop:"promotion_id"},{default:v((()=>[h(U,{modelValue:w(ne).promotion_id,"onUpdate:modelValue":r[4]||(r[4]=e=>w(ne).promotion_id=e),filterable:"",remote:"",clearable:"","remote-method":e=>{Ve(e,"channelPromotions")},placeholder:"全部推广名称"},{default:v((()=>[(m(!0),c(y,null,b(w(ce),(e=>(m(),x(p,{key:e.promotion_id,label:e.name,value:e.promotion_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])])),_:1}),w(ne).promotion_id?g("",!0):(m(),x(i,{key:0,label:"小程序",prop:"miniprogram_id"},{default:v((()=>[h(U,{modelValue:w(ne).miniprogram_id,"onUpdate:modelValue":r[5]||(r[5]=e=>w(ne).miniprogram_id=e),filterable:"",remote:"","remote-method":e=>{Ve(e,"channelMiniprogram")},clearable:"",placeholder:"选择小程序"},{default:v((()=>[(m(!0),c(y,null,b(w(me),(e=>(m(),x(p,{key:e.miniprogram_id,label:e.name,value:e.miniprogram_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])])),_:1})),w(ne).promotion_id||w(ve).includes("optimizer")?g("",!0):(m(),x(i,{key:1,label:"优化师",prop:"user_id"},{default:v((()=>[h(U,{modelValue:w(ne).user_id,"onUpdate:modelValue":r[6]||(r[6]=e=>w(ne).user_id=e),filterable:"",remote:"",clearable:"","remote-method":e=>{Ve(e,"channelPromotionsUsers")},placeholder:"选择优化师"},{default:v((()=>[(m(!0),c(y,null,b(w(_e),(e=>(m(),x(p,{key:e.user_id,label:e.name,value:e.user_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])])),_:1})),h(i,{label:"订单时间"},{default:v((()=>[h(Y,{"unlink-panels":"",clearable:"",onChange:ke,format:"YYYY/MM/DD","value-format":"YYYY-MM-DD",modelValue:w(ne).orderTime,"onUpdate:modelValue":r[7]||(r[7]=e=>w(ne).orderTime=e),type:"daterange",shortcuts:w(t),"range-separator":"To","start-placeholder":"开始时间","end-placeholder":"结束时间"},null,8,["modelValue","shortcuts"])])),_:1}),w(ve).includes("administrator")?(m(),x(i,{key:2,label:"支付名称",prop:"pay_merchant_name"},{default:v((()=>[h(d,{modelValue:w(ne).pay_merchant_name,"onUpdate:modelValue":r[8]||(r[8]=e=>w(ne).pay_merchant_name=e),placeholder:"请输入支付名称",clearable:""},null,8,["modelValue"])])),_:1})):g("",!0),w(ve).includes("administrator")?(m(),x(i,{key:3,label:"收款主体",prop:"payee_name"},{default:v((()=>[h(d,{modelValue:w(ne).payee_name,"onUpdate:modelValue":r[9]||(r[9]=e=>w(ne).payee_name=e),placeholder:"请输入收款主体",clearable:""},null,8,["modelValue"])])),_:1})):g("",!0),w(ve).includes("administrator")?(m(),x(i,{key:4,label:"支付商户号",prop:"pay_appid"},{default:v((()=>[h(d,{modelValue:w(ne).pay_appid,"onUpdate:modelValue":r[10]||(r[10]=e=>w(ne).pay_appid=e),placeholder:"请输入支付商户号",clearable:""},null,8,["modelValue"])])),_:1})):g("",!0)])),extra_button:v((()=>[w(ve).includes("administrator")?(m(),x(I,{key:0,api:"orderRefund/order_list",sheet_name:"订单列表",title_obj:w(J)[w(ne).refund_status],extro_params:{is_all:!0,...w(ne)}},null,8,["title_obj","extro_params"])):(m(),x(I,{key:1,api:"orderRefund/order_list",sheet_name:"订单列表",title_obj:w(H)[w(ne).refund_status],extro_params:{is_all:!0,...w(ne)}},null,8,["title_obj","extro_params"]))])),_:1},8,["search"])]),f("div",S,[D((m(),x(B,{data:w(je),class:"mt-3"},{default:v((()=>[w(ve).includes("administrator")?(m(),x(O,{key:0,prop:"company_name",label:"商户名称","min-width":"200px"},{default:v((e=>[f("div",null,V(e.row.company_name),1),f("div",null,"ID:"+V(e.row.puser_id),1)])),_:1})):g("",!0),w(ve).includes("optimizer")?g("",!0):(m(),x(O,{key:1,prop:"username",label:"优化师","show-overflow-tooltip":"","min-width":"200px"})),h(O,{prop:"xcx_name","show-overflow-tooltip":"",label:"小程序","min-width":"200px"}),h(O,{prop:"uid",label:"用户ID","show-overflow-tooltip":""}),h(O,{prop:"trade_no",label:"订单号","show-overflow-tooltip":"","min-width":"200px"}),h(O,{prop:"order_created_at",label:"订单时间","show-overflow-tooltip":"","min-width":"200px"}),h(O,{prop:"ranse_created_at",label:"染色注册时间","show-overflow-tooltip":"","min-width":"200px"}),h(O,{prop:"refund_price",label:"申退金额","show-overflow-tooltip":"","min-width":"200px"}),h(O,{prop:"order_price",label:"充值金额","show-overflow-tooltip":""}),h(O,{prop:"promotion_name",label:"推广名称","show-overflow-tooltip":"","min-width":"200px"}),h(O,{prop:"tip_text",label:"档位类型","show-overflow-tooltip":"","min-width":"150px"}),h(O,{prop:"pay_name",label:"支付方式","show-overflow-tooltip":"","min-width":"150px"}),w(ve).includes("administrator")?(m(),x(O,{key:2,prop:"pay_merchant_name",label:"支付名称","show-overflow-tooltip":"","min-width":"150px"})):g("",!0),w(ve).includes("administrator")?(m(),x(O,{key:3,prop:"payee_name",label:"收款主体","show-overflow-tooltip":"","min-width":"150px"})):g("",!0),w(ve).includes("administrator")?(m(),x(O,{key:4,prop:"pay_appid",label:"支付商户号","show-overflow-tooltip":"","min-width":"150px"})):g("",!0),1==w(ne).refund_status?(m(),x(O,{key:5,prop:"pay_at",label:"退款时间","show-overflow-tooltip":"","min-width":"180px"})):g("",!0),1==w(ne).refund_status?(m(),x(O,{key:6,prop:"refund_no",label:"退款单号","show-overflow-tooltip":"","min-width":"150px"})):g("",!0),1==w(ne).refund_status?(m(),x(O,{key:7,prop:"status_text",label:"订单状态","show-overflow-tooltip":"","min-width":"150px"},{default:v((e=>[f("div",$,[f("span",A,[h(T,{class:"mx-1",type:"info"},{default:v((()=>[k(V(e.row.status_text),1)])),_:2},1024)])])])),_:1})):g("",!0),0==w(ne).refund_status?(m(),x(O,{key:8,prop:"pt_verify_status_text",label:"平台审核","show-overflow-tooltip":"","min-width":"150px"},{default:v((e=>[f("div",N,[f("span",W,[h(T,{class:"mx-1",type:ye(e.row)},{default:v((()=>[k(V(e.row.pt_verify_status_text),1)])),_:2},1032,["type"])])])])),_:1})):g("",!0),0==w(ne).refund_status?(m(),x(O,{key:9,prop:"pt_verify_remark",label:"平台审核备注","show-overflow-tooltip":"","min-width":"150px"})):g("",!0),0==w(ne).refund_status?(m(),x(O,{key:10,prop:"sh_verify_status_text",label:"商户审核","show-overflow-tooltip":"","min-width":"150px"},{default:v((e=>[f("div",Z,[f("span",ee,[h(T,{class:"mx-1",type:ye(e.row)},{default:v((()=>[k(V(e.row.sh_verify_status_text),1)])),_:2},1032,["type"])])])])),_:1})):g("",!0),0==w(ne).refund_status?(m(),x(O,{key:11,prop:"sh_verify_remark",label:"商户审核备注","show-overflow-tooltip":"","min-width":"150px"})):g("",!0),0==w(ne).refund_status?(m(),x(O,{key:12,label:"操作",fixed:"right"},{default:v((e=>[D((m(),x(z,{link:"",type:"primary",size:"small",onClick:a=>xe("noapprovedVisible",e.row,"平台审核")},{default:v((()=>[k("平台审核")])),_:2},1032,["onClick"])),[[E,"orderRefund.RefundOrder.platformVerify"]]),ae,D((m(),x(z,{link:"",type:"primary",size:"small",onClick:a=>xe("noapprovedVisible",e.row,"商户审核")},{default:v((()=>[k("商户审核")])),_:2},1032,["onClick"])),[[E,"orderRefund.RefundOrder.companyVerify"]]),le,D((m(),x(z,{disabled:!e.row.can_pay,link:"",type:"primary",size:"small",onClick:a=>xe("approvedVisible",e.row)},{default:v((()=>[k("确认打款")])),_:2},1032,["disabled","onClick"])),[[E,"orderRefund.RefundOrder.payToUser"]]),te])),_:1})):g("",!0)])),_:1},8,["data"])),[[F,w(ie)]]),h(G)]),h(X,{width:"500px",modelValue:w(K),"onUpdate:modelValue":r[13]||(r[13]=e=>j(K)?K.value=e:null),title:w(pe),"destroy-on-close":"",onClose:be},{footer:v((()=>[f("span",oe,[h(z,{onClick:be},{default:v((()=>[k("取消")])),_:1}),h(z,{type:"primary",onClick:we},{default:v((()=>[k(" 确认 ")])),_:1})])])),default:v((()=>[h(q,{model:w(C),"label-width":"120px"},{default:v((()=>[h(i,{label:"审核结果"},{default:v((()=>[h(s,{modelValue:w(C).status,"onUpdate:modelValue":r[11]||(r[11]=e=>w(C).status=e),onChange:w(se)},{default:v((()=>[(m(!0),c(y,null,b(w(M),(e=>(m(),x(n,{label:e.value,key:e.value},{default:v((()=>[k(V(e.name),1)])),_:2},1032,["label"])))),128))])),_:1},8,["modelValue","onChange"])])),_:1}),h(i,{label:"备注"},{default:v((()=>[h(d,{modelValue:w(C).remark,"onUpdate:modelValue":r[12]||(r[12]=e=>w(C).remark=e),rows:3,type:"textarea",placeholder:"请输入内容",autocomplete:"off"},null,8,["modelValue"])])),_:1})])),_:1},8,["model"])])),_:1},8,["modelValue","title"])])}}}),[["__scopeId","data-v-7d00a039"]]);export{re as default};
|