index-44caddfd.js 15 KB

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