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