sf_web_dist/js/platform-settle.CcJw0qvU.js
2025-08-13 16:32:00 +08:00

2 lines
10 KiB
JavaScript

import{b2 as e,bs as l,ag as a,bS as i,bm as t,aZ as n,c as d,e as s,m as o,N as r,w as u,l as v,O as c,E as m,al as p,t as _,g as f,R as b,n as I,bN as h,bQ as g,c5 as y,aO as k,c6 as w,c7 as $}from"./index.v591Wcjz.js";import{E as F}from"./el-drawer.Da5QGyDe.js";import{_ as L}from"./index.fvxAZyUX.js";/* empty css */import"./el-col.DxrGPb_X.js";const C={key:0},j={key:0},O={class:"operate"},P=["onClick"],T={class:"tab-content","element-loading-background":"rgba(122, 122, 122, 0.8)"},x={class:"item"},D={class:"item"},N={class:"item"},U={class:"item"},z={class:"item"},E={class:"btn"},V={key:0,class:"red"},R={class:"item"},G={key:0},Q={key:0,class:"item"},S={class:"blue"},X={key:1,class:"item"},Z={class:"blue"},q={class:"item"},A={key:0,class:"blue"},B={class:"item"},H={class:"item"},J={class:"btn"},K={class:"green"},M={class:"item"},W={class:"btn"},Y={class:"item"},ee={class:"btn"},le={class:"item"},ae={class:"btn"},ie={class:"item"},te={class:"item"},ne={class:"item"},de={class:"item"},se={class:"item"},oe={class:"item"},re={class:"item"},ue={class:"item"},ve=e({__name:"platform-settle",setup(e){const{copy:ve}=l({legacy:!0}),ce=e=>{ve(e).then(()=>{k.success("复制成功")})};function me(e){return g(1e3*e)}const pe=e=>`${Number(e).toFixed(2)}`,_e=a({columns:[{prop:"id",label:"编号",width:60},{prop:"order_sn",label:"系统订单号",slot:"order_sn"},{prop:"mer_order_sn",label:"商户订单号",slot:"mer_order_sn"},{prop:"ms_name",label:"代理账号",width:120},{prop:"mer_name",label:"商户账号",width:120},{prop:"pay_channel_id",label:"通道",width:160,slot:"pay_channel_id"},{prop:"order_amount",label:"订单金额",width:100,formatter:pe},{prop:"service_fee",label:"手续费",width:100,formatter:pe},{prop:"settlement_time",label:"结算时间",formatter:me},{prop:"operate",label:"操作",width:120,slot:"operate",align:"center",fixed:"right"}],tableData:[],searchFields:[{prop:"order_sn",label:"订单号",type:"input",value:""},{prop:"mer_order_sn",label:"商户订单号",type:"input",value:""},{label:"商户号",type:"input",prop:"mer_id",value:""},{prop:"mer_name",label:"商户名称",type:"input",value:""},{label:"代理ID",type:"input",prop:"ms_id",value:""},{prop:"ms_name",label:"代理名称",type:"input",value:""},{prop:"pay_channel_id",label:"通道",type:"select",value:"",options:[]},{prop:"return_status",label:"通知状态",type:"select",value:"",options:[{label:"未回调",value:1},{label:"回调成功",value:2},{label:"回调失败",value:2}]},{prop:"create_time",label:"创建时间",type:"date",dateType:"datetimerange",value:i()}],total:0,page:1,limit:10,amount:0,loading:!1,reasonList:[],reasonObj:{},drawer:!1,detailInfo:{},detailLoading:!1}),fe=()=>{_e.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=i():e.value=""}),be()};t(()=>{be(),$({}).then(e=>{let l=e.map(e=>({id:e.id,label:e.channel_name,value:e.id}));_e.searchFields[6].options=l})});const be=()=>{var e,l,a,i,t;_e.loading=!0;let n={limit:_e.limit,page:_e.page},d=function(e){const l={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(l[e.prop]=e.value)}),l}(_e.searchFields);(null==(e=d.create_time)?void 0:e.length)>0&&(d.start_time=(null==(l=d.create_time[0])?void 0:l.getTime())?(null==(a=d.create_time[0])?void 0:a.getTime())/1e3:"",d.end_time=(null==(i=d.create_time[1])?void 0:i.getTime())?(null==(t=d.create_time[1])?void 0:t.getTime())/1e3:""),w(Object.assign(n,d)).then(e=>{_e.tableData=e.list,_e.total=e.total,_e.amount=e.total_usable_amount,_e.loading=!1,0==_e.reasonList.length&&(_e.reasonObj=e.reasonList,_e.reasonList=Object.keys(e.reasonList).map(l=>({label:e.reasonList[l],value:l})),_e.searchFields[0].options=_e.reasonList)}).catch(()=>{_e.loading=!1})};return(e,l)=>{const a=n("DocumentCopy"),i=m,t=n("InfoFilled"),g=F,k=h;return s(),d("div",null,[(s(),o(L,{type:"merchant-bill",columns:f(_e).columns,searchFields:f(_e).searchFields,"onUpdate:searchFields":l[0]||(l[0]=e=>f(_e).searchFields=e),data:f(_e).tableData,limit:f(_e).limit,"onUpdate:limit":l[1]||(l[1]=e=>f(_e).limit=e),page:f(_e).page,"onUpdate:page":l[2]||(l[2]=e=>f(_e).page=e),total:f(_e).total,onGetTableData:be,onResetForm:fe,loading:f(_e).loading,name:"merchant-bill",key:"merchant-bill"},{pay_channel_id:u(({row:e})=>[v("div",null,_(`[${e.pay_channel_id}]${e.channel_name}`),1)]),order_sn:u(({row:e})=>[e.order_sn?(s(),d("div",C,[r(i,{onClick:l=>ce(e.order_sn),size:16,color:"#5f80c7"},{default:u(()=>[r(a)]),_:2},1032,["onClick"]),c(" "+_(`${e.order_sn}`),1)])):p("",!0)]),mer_order_sn:u(({row:e})=>[e.mer_order_sn?(s(),d("div",j,[r(i,{onClick:l=>ce(e.mer_order_sn),size:16,color:"#5f80c7"},{default:u(()=>[r(a)]),_:2},1032,["onClick"]),c(" "+_(`${e.mer_order_sn}`),1)])):p("",!0)]),operate:u(({row:e})=>[v("div",O,[v("div",{class:"blue",onClick:l=>{return a=e,_e.drawer=!0,_e.detailInfo={},_e.detailLoading=!0,void y({order_id:a.order_id}).then(e=>{_e.detailInfo=e,_e.detailLoading=!1}).catch(()=>{_e.detailLoading=!1});var a}},[r(i,null,{default:u(()=>[r(t)]),_:1}),l[4]||(l[4]=c("详情 "))],8,P)])]),_:1},8,["columns","searchFields","data","limit","page","total","loading"])),r(g,{modelValue:f(_e).drawer,"onUpdate:modelValue":l[3]||(l[3]=e=>f(_e).drawer=e),title:"订单详情",direction:"rtl"},{default:u(()=>{var e,a,i,t,n,o,r,u,c,m,h,g,y,w,$,F,L,C,j,O,P,ve,ce,fe,be,Ie,he,ge,ye,ke,we,$e,Fe,Le,Ce,je,Oe,Pe,Te,xe,De,Ne,Ue,ze,Ee,Ve;return[b((s(),d("div",T,[v("div",x,[l[5]||(l[5]=v("div",{class:"title"},"系统订单号",-1)),v("div",null,_(null==(e=f(_e).detailInfo)?void 0:e.order_sn),1)]),v("div",D,[l[6]||(l[6]=v("div",{class:"title"},"商户订单号",-1)),v("div",null,_(null==(a=f(_e).detailInfo)?void 0:a.mer_order_sn),1)]),v("div",N,[l[7]||(l[7]=v("div",{class:"title"},"商户账号",-1)),v("div",null,_(`[${null==(i=f(_e).detailInfo)?void 0:i.mer_id}]${null==(t=f(_e).detailInfo)?void 0:t.mer_name}`),1)]),v("div",U,[l[8]||(l[8]=v("div",{class:"title"},"代理账号",-1)),v("div",null,_(`[${null==(n=f(_e).detailInfo)?void 0:n.ms_id}]${null==(o=f(_e).detailInfo)?void 0:o.ms_name}`),1)]),v("div",z,[l[9]||(l[9]=v("div",{class:"title"},"通道名称",-1)),v("div",E,[(null==(r=f(_e).detailInfo)?void 0:r.payChannel)?(s(),d("div",V,_(`[${null==(c=null==(u=f(_e).detailInfo)?void 0:u.payChannel)?void 0:c.id}]${null==(h=null==(m=f(_e).detailInfo)?void 0:m.payChannel)?void 0:h.channel_name}`),1)):p("",!0)])]),v("div",R,[l[10]||(l[10]=v("div",{class:"title"},"产品类型",-1)),v("div",null,[(null==(g=f(_e).detailInfo)?void 0:g.payProduct)?(s(),d("div",G,_(`[${null==(w=null==(y=f(_e).detailInfo)?void 0:y.payProduct)?void 0:w.id}]${null==(F=null==($=f(_e).detailInfo)?void 0:$.payProduct)?void 0:F.pro_name}`),1)):p("",!0)])]),f(_e).detailInfo.hasOwnProperty("kzk_account_number")?(s(),d("div",Q,[l[11]||(l[11]=v("div",{class:"title"},"卡卡账号",-1)),v("div",S,_(null==(L=f(_e).detailInfo)?void 0:L.kzk_account_number),1)])):p("",!0),f(_e).detailInfo.hasOwnProperty("cnyNumber_account_number")?(s(),d("div",X,[l[12]||(l[12]=v("div",{class:"title"},"收款钱包账号",-1)),v("div",Z,_(null==(C=f(_e).detailInfo)?void 0:C.cnyNumber_account_number),1)])):p("",!0),v("div",q,[l[13]||(l[13]=v("div",{class:"title"},"收款手机号",-1)),v("div",null,[(null==(O=null==(j=f(_e).detailInfo)?void 0:j.msPayeeInfo)?void 0:O.phone)?(s(),d("span",A,_(null==(P=f(_e).detailInfo)?void 0:P.msPayeeInfo.phone),1)):p("",!0)])]),v("div",B,[l[14]||(l[14]=v("div",{class:"title"},"订单金额",-1)),v("div",null,_(pe(null==(ve=f(_e).detailInfo)?void 0:ve.amount)),1)]),v("div",H,[l[15]||(l[15]=v("div",{class:"title"},"实付金额",-1)),v("div",J,[v("div",K,_(pe(null==(ce=f(_e).detailInfo)?void 0:ce.real_pay_amount)),1)])]),v("div",M,[l[16]||(l[16]=v("div",{class:"title"},"支付状态",-1)),v("div",W,[v("div",{class:I(1==(null==(fe=f(_e).detailInfo)?void 0:fe.status)?"blue":2==(null==(be=f(_e).detailInfo)?void 0:be.status)||999==(null==(Ie=f(_e).detailInfo)?void 0:Ie.status)?"green":"red")},_(null==(he=f(_e).detailInfo)?void 0:he.status_name),3)])]),v("div",Y,[l[17]||(l[17]=v("div",{class:"title"},"回调状态",-1)),v("div",ee,[v("div",{class:I(1==(null==(ge=f(_e).detailInfo)?void 0:ge.return_status)?"blue":2==(null==(ye=f(_e).detailInfo)?void 0:ye.return_status)?"green":"red")},_(null==(ke=f(_e).detailInfo)?void 0:ke.return_status_name),3)])]),v("div",le,[l[18]||(l[18]=v("div",{class:"title"},"结算状态",-1)),v("div",ae,[v("div",{class:I(1==(null==(we=f(_e).detailInfo)?void 0:we.is_settlement)?"green":"red")},_(1==(null==($e=f(_e).detailInfo)?void 0:$e.is_settlement)?"已结算":"未结算"),3)])]),v("div",ie,[l[19]||(l[19]=v("div",{class:"title"},"平台费用",-1)),v("div",null,_((null==(Fe=f(_e).detailInfo)?void 0:Fe.plat_fee)?`${pe(null==(Le=f(_e).detailInfo)?void 0:Le.plat_fee)}/${pe(null==(Ce=f(_e).detailInfo)?void 0:Ce.plat_fee_rate)}%`:""),1)]),v("div",te,[l[20]||(l[20]=v("div",{class:"title"},"商户费用",-1)),v("div",null,_((null==(je=f(_e).detailInfo)?void 0:je.mer_service_fee)?`${pe(null==(Oe=f(_e).detailInfo)?void 0:Oe.mer_service_fee)}/${pe(null==(Pe=f(_e).detailInfo)?void 0:Pe.mer_service_rate)}%`:""),1)]),v("div",ne,[l[21]||(l[21]=v("div",{class:"title"},"代理佣金",-1)),v("div",null,_((null==(Te=f(_e).detailInfo)?void 0:Te.ms_profit)?`${pe(null==(xe=f(_e).detailInfo)?void 0:xe.ms_profit)}/${null==(De=f(_e).detailInfo)?void 0:De.rate}`:""),1)]),v("div",de,[l[22]||(l[22]=v("div",{class:"title"},"下单时间",-1)),v("div",null,_(me(null==(Ne=f(_e).detailInfo)?void 0:Ne.create_time)),1)]),v("div",se,[l[23]||(l[23]=v("div",{class:"title"},"接单时间",-1)),v("div",null,_(me(null==(Ue=f(_e).detailInfo)?void 0:Ue.receive_time)),1)]),v("div",oe,[l[24]||(l[24]=v("div",{class:"title"},"支付时间",-1)),v("div",null,_(me(null==(ze=f(_e).detailInfo)?void 0:ze.success_time)),1)]),v("div",re,[l[25]||(l[25]=v("div",{class:"title"},"回调时间",-1)),v("div",null,_(me(null==(Ee=f(_e).detailInfo)?void 0:Ee.return_time)),1)]),v("div",ue,[l[26]||(l[26]=v("div",{class:"title"},"IP",-1)),v("div",null,_(null==(Ve=f(_e).detailInfo)?void 0:Ve.create_order_ip),1)])])),[[k,f(_e).detailLoading]])]}),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-0bfe3ee7"]]);export{ve as default};