2 lines
7.9 KiB
JavaScript
2 lines
7.9 KiB
JavaScript
import{_ as e}from"./index.DM3hGWgi.js";import{bs as a,ag as t,b4 as l,aZ as o,c as s,e as r,N as i,O as p,w as n,m as d,al as c,an as u,E as _,t as g,g as h,bB as m,l as f,aO as w}from"./index.BBhKnXye.js";import{E as y}from"./el-text.CS_eQOkZ.js";import{b}from"./payee-order.Cq56N0bT.js";import{s as D}from"./staticData.8wZxkmL4.js";import{g as k,a as v}from"./payee-channel.Bkl6nzyu.js";import x from"./viewdetail.m5fEY_47.js";import C from"./callbacklog.DO1wwRRw.js";import O from"./orderset.Ta1e8dAW.js";import R from"./testOrder.B_XXEnye.js";/* empty css */import"./el-col.DJ-rZOnK.js";const j={class:"statistics-box"},T={key:0},z={key:1},F={__name:"all-order",setup(F,{expose:S}){const{copy:L}=a({legacy:!0});let U=[],E=[];const P=t({columns:[{prop:"id",label:"ID",align:"left",width:"80px"},{prop:"order_no",label:"系统订单号",align:"left",width:"210px"},{prop:"shop_order_no",label:"下游订单号",align:"left",width:"160px"},{prop:"shop_id",label:"商户编码",align:"left",width:"100px"},{prop:"shop_name",label:"商户名称",align:"left"},{prop:"pay_name",label:"支付通道",align:"left"},{prop:"fee",label:"手续费",align:"left",width:"120px"},{prop:"money",label:"交易金额",align:"left",width:"120px"},{prop:"expire_time",label:"状态",align:"left",width:"160px",slot:"status_slot",tooltip:!1},{prop:"create_time",label:"提交时间",align:"left"},{prop:"succ_time",label:"成功时间",align:"left"},{prop:"supplier_name",label:"供应商",align:"left"},{prop:"api_name",label:"入金渠道",align:"left",width:"120px"},{prop:"pay_money",label:"实际金额",align:"left",width:"120px"},{prop:"three_fee",label:"成本",align:"left",width:"120px"},{prop:"remark",label:"备注",align:"left"},{prop:"operate",label:"状态",align:"left",slot:"operate_slot",fixed:"right",width:"240px",tooltip:!1}],tableData:[],searchFields:[{label:"商户编码/商户名称",prop:"shop_id",type:"input",labelWidth:"120px",value:""},{label:"系统订单号",prop:"order_no",type:"input",value:""},{label:"下游订单号订单号",prop:"shop_order_no",type:"input",value:""},{prop:"create_time",label:"提交时间",type:"date",dateType:"datetimerange",startPlaceholder:"提交起始时间",endPlaceholder:"提交结束时间",value:[]},{prop:"succ_time",label:"成功时间",type:"date",dateType:"datetimerange",startPlaceholder:"成功起始时间",endPlaceholder:"成功结束时间",value:[]},{label:"支付通道",type:"select",prop:"pay_id",value:"",options:U},{label:"入金渠道",type:"select",prop:"api_id",value:"",options:E},{label:"状态",type:"select",prop:"status",value:"",options:D.orderStatus},{label:"最大金额",prop:"max_amount",type:"input",value:""},{label:"最小金额",prop:"min_amount",type:"input",value:""}],total:0,page:1,per_page:10,loading:!1,showDetailDialog:!1,currentRow:{},showCallbackLogDialog:!1,showOrderSetDialog:!1,showOrderTestDialog:!1}),W=e=>{L(e).then(()=>{w.success("复制成功")})},Z=()=>{P.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),B()};l(async()=>{let e=await k({saiType:"all"}),a=await v({saiType:"all"});U=e.map(e=>({label:e.name,value:e.id})),E=a.map(e=>({label:e.name,value:e.id})),P.searchFields.forEach(e=>{"api_id"==e.prop&&(e.options=U),"pay_id"==e.prop&&(e.options=E)}),B()});const B=()=>{P.loading=!0;let e={limit:P.per_page,page:P.page},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(P.searchFields);5!=a.status&&4!=a.status||(a.is_test=5==a.status?1:"",a.is_repay=4==a.status?1:"",delete a.status),a.money_range=[a.min_amount,a.max_amount],b(Object.assign(e,a)).then(e=>{P.tableData=e.data,P.total=e.total,P.loading=!1}).catch(()=>{P.loading=!1})},G=()=>{},I=e=>{switch(e){case 0:case 2:return"warning";case 1:return"danger";case 3:return"success";default:return"info"}};return S({getWarningOrderList:()=>{P.page=1,P.searchFields.forEach(e=>{"status"==e.prop&&(e.value=2)})}}),(a,t)=>{const l=u,w=m,b=y,k=o("DocumentCopy"),v=_,F=e;return r(),s("div",null,[i(F,{type:"export",columns:h(P).columns,searchFields:h(P).searchFields,"onUpdate:searchFields":t[0]||(t[0]=e=>h(P).searchFields=e),data:h(P).tableData,per_page:h(P).per_page,"onUpdate:per_page":t[1]||(t[1]=e=>h(P).per_page=e),page:h(P).page,"onUpdate:page":t[2]||(t[2]=e=>h(P).page=e),total:h(P).total,onGetTableData:B,onResetForm:Z,loading:h(P).loading,showSelection:!1,showRightRefreshSlot:!1},{"search-btns":n(({row:e})=>[i(l,{type:"danger",onClick:G},{default:n(()=>t[7]||(t[7]=[p("一键补发通知")])),_:1,__:[7]})]),count:n(()=>[f("div",j,[t[14]||(t[14]=p(" 成功交易总金额: ")),i(w,{size:"small",type:"success",effect:"dark"},{default:n(()=>t[8]||(t[8]=[p("0元")])),_:1,__:[8]}),t[15]||(t[15]=p(" 商户手续费:")),i(w,{type:"success",size:"small",effect:"dark"},{default:n(()=>t[9]||(t[9]=[p("0元")])),_:1,__:[9]}),t[16]||(t[16]=p(" 平台利润:")),i(w,{type:"success",size:"small",effect:"dark"},{default:n(()=>t[10]||(t[10]=[p("0元")])),_:1,__:[10]}),t[17]||(t[17]=p(" 商户收入总金额:")),i(w,{type:"success",size:"small",effect:"dark"},{default:n(()=>t[11]||(t[11]=[p("0元")])),_:1,__:[11]}),t[18]||(t[18]=p(" 成功订单数:")),i(w,{type:"success",size:"small",effect:"dark"},{default:n(()=>t[12]||(t[12]=[p("0")])),_:1,__:[12]}),t[19]||(t[19]=p(" 成功率:")),i(w,{type:"success",size:"small",effect:"dark"},{default:n(()=>t[13]||(t[13]=[p("0")])),_:1,__:[13]})])]),status_slot:n(({row:e})=>[2==e.status||3==e.status?(r(),d(l,{key:0,link:"",type:"danger",onClick:a=>(e=>{P.showCallbackLogDialog=!0,P.currentRow=e})(e)},{default:n(()=>t[20]||(t[20]=[p("日志")])),_:2,__:[20]},1032,["onClick"])):c("",!0),i(b,{type:I(e.status)},{default:n(()=>[p(g(h(D).orderStatus.find(a=>a.value===e.status).label),1)]),_:2},1032,["type"]),e.is_repay?(r(),d(w,{key:1,type:"danger"},{default:n(()=>t[21]||(t[21]=[p("补")])),_:1,__:[21]})):c("",!0),e.is_test?(r(),d(w,{key:2,type:"warning"},{default:n(()=>t[22]||(t[22]=[p("测")])),_:1,__:[22]})):c("",!0)]),order_no_slot:n(({row:e})=>[e.order_no?(r(),s("div",T,[i(v,{onClick:a=>W(e.order_no),size:16,color:"#5f80c7"},{default:n(()=>[i(k)]),_:2},1032,["onClick"]),p(" "+g(null==e?void 0:e.order_no),1)])):c("",!0),e.merchant_order_no?(r(),s("div",z,[i(v,{onClick:a=>W(e.merchant_order_no),size:16,color:"#5f80c7"},{default:n(()=>[i(k)]),_:2},1032,["onClick"]),p(" "+g(null==e?void 0:e.merchant_order_no),1)])):c("",!0)]),operate_slot:n(({row:e})=>[i(l,{size:"small",onClick:a=>(e=>{P.showDetailDialog=!0,P.currentRow=e})(e)},{default:n(()=>t[23]||(t[23]=[p("查看")])),_:2,__:[23]},1032,["onClick"]),1==e.status&&"10001"!=e.shop_id?(r(),d(l,{key:0,type:"primary",size:"small",onClick:a=>(e=>{P.showOrderSetDialog=!0,P.currentRow=e})(e)},{default:n(()=>t[24]||(t[24]=[p("设置为已支付")])),_:2,__:[24]},1032,["onClick"])):c("",!0),0==e.status||(2==e.status||3==e.status)&&e.is_repay||"10001"==e.shop_id&&(2==e.status||3==e.status)&&!e.is_test?(r(),d(l,{key:1,type:"primary",size:"small",onClick:a=>(e=>{P.showOrderTestDialog=!0,P.currentRow=e})(e)},{default:n(()=>t[25]||(t[25]=[p("测试订单")])),_:2,__:[25]},1032,["onClick"])):c("",!0)]),_:1},8,["columns","searchFields","data","per_page","page","total","loading"]),i(x,{showDetailDialog:h(P).showDetailDialog,"onUpdate:showDetailDialog":t[3]||(t[3]=e=>h(P).showDetailDialog=e),currentRow:h(P).currentRow},null,8,["showDetailDialog","currentRow"]),i(C,{showCallbackLogDialog:h(P).showCallbackLogDialog,"onUpdate:showCallbackLogDialog":t[4]||(t[4]=e=>h(P).showCallbackLogDialog=e)},null,8,["showCallbackLogDialog"]),i(O,{showOrderSetDialog:h(P).showOrderSetDialog,"onUpdate:showOrderSetDialog":t[5]||(t[5]=e=>h(P).showOrderSetDialog=e),currentRow:h(P).currentRow},null,8,["showOrderSetDialog","currentRow"]),i(R,{showOrderTestDialog:h(P).showOrderTestDialog,"onUpdate:showOrderTestDialog":t[6]||(t[6]=e=>h(P).showOrderTestDialog=e),currentRow:h(P).currentRow},null,8,["showOrderTestDialog","currentRow"]),t[26]||(t[26]=p('" '))])}}};export{F as default};
|