index-73ce56a6.js 4.8 KB

1
  1. import{az as R,d as q,r as n,P as X,x as B,w as G,b as K,a3 as Q,o as p,c as U,f as e,A as s,k as z,C as y,a,D as g,E as w,dx as P,dH as V,a2 as Z,F as $,W as tt,J as at,X as et,Y as ot,__tla as rt}from"./index-a9d538d5.js";import{_ as lt,__tla as nt}from"./ContentWrap.vue_vue_type_script_setup_true_lang-6b7b4656.js";import{_ as st,__tla as it}from"./index.vue_vue_type_script_setup_true_lang-ca67dc77.js";import{E as ct,__tla as mt}from"./el-image-2dadd73e.js";import{__tla as pt}from"./el-image-viewer-2e77a3e7.js";import{d as _t,f as dt,__tla as ut}from"./formatTime-8985a9d0.js";import{d as ht}from"./download-20922b56.js";import ft,{__tla as yt}from"./ShopSettlementForm-92a605b5.js";import{g as gt,__tla as wt}from"./index-95f2e02a.js";import{u as vt,__tla as bt}from"./useMessage-d5cbbfad.js";import{_ as Ct}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as kt}from"./el-card-0ea446a3.js";import{__tla as xt}from"./index-95ad39b3.js";import{__tla as It}from"./Dialog-f354f369.js";import{__tla as At}from"./index-6451d5a2.js";let Y,St=Promise.all([(()=>{try{return rt}catch{}})(),(()=>{try{return nt}catch{}})(),(()=>{try{return it}catch{}})(),(()=>{try{return mt}catch{}})(),(()=>{try{return pt}catch{}})(),(()=>{try{return ut}catch{}})(),(()=>{try{return yt}catch{}})(),(()=>{try{return wt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return At}catch{}})()]).then(async()=>{let k,x,I;k=async o=>await R.get({url:"/distri/shop-settlement/page",params:o}),x=async o=>await R.download({url:"/trade/order/export-excel/shopSettlement",params:o}),I={key:1},Y=Ct(q({name:"ShopSettlement",__name:"index",props:{id:{type:Number,default:void 0},status:{type:Number,default:void 0},merchantId:{type:Number,default:void 0}},setup(o){let D=n([]);n(!1);const L=vt();X();const u=n(!0),A=n([]),S=n(0),r=B({pageNo:1,pageSize:10,platformCollectionAmount:void 0,shopAmount:void 0,platformTransferConfirmTime:[],shopTransferConfirmTime:[],attachment:void 0,createTime:[],shopId:void 0,shopHighAmount:void 0,shopTotalHighAmount:void 0,ptSettlementId:0,merchantId:void 0}),T=o;n();const v=n(!1),h=async()=>{u.value=!0;try{const _=await k(r);A.value=_.list,S.value=_.total}finally{u.value=!1}},N=n();return G(()=>r.shopId,()=>{h()}),K(()=>{r.ptSettlementId=T.id,r.merchantId=T.merchantId,h(),(async()=>{u.value=!0;const _=await gt();D.value=_})()}),(_,i)=>{const l=tt,E=ct,j=at,J=et,M=st,O=lt,F=Q("hasPermi"),W=ot;return p(),U($,null,[e(O,{class:"mt-15px"},{default:s(()=>[z((p(),y(J,{data:a(A),stripe:!0,"show-overflow-tooltip":!0,onRowClick:i[0]||(i[0]=t=>{return c=t,void N.value.open(c);var c}),"row-class-name":"row"},{default:s(()=>[e(l,{label:"\u5E8F\u53F7",align:"center",prop:"id"}),e(l,{label:"\u5E97\u94FA\u540D\u79F0",align:"center",prop:"shopName"}),e(l,{label:"\u9500\u552E\u989D",align:"center",prop:"platformCollectionAmount"},{default:s(t=>[g(" \uFFE5"+w(a(P)(t.row.platformCollectionAmount)),1)]),_:1}),e(l,{label:"\u62B5\u6263\u4F63\u91D1",align:"center",prop:"shopHighAmount"},{default:s(t=>[g(w(a(V)(t.row.shopAmount)),1)]),_:1}),e(l,{label:"\u5E94\u7ED3(\u6210\u672C)",align:"center",prop:"shopTotalHighAmount"},{default:s(t=>[g(" \uFFE5"+w(a(P)(t.row.shopTotalHighAmount)),1)]),_:1}),e(l,{label:"\u8F6C\u8D26\u51ED\u8BC1\u9644\u4EF6",align:"center",prop:"attachment"},{default:s(t=>[t.row.attachment?(p(),y(E,{key:0,src:t.row.attachment,onClick:c=>async function(b,m){b.stopPropagation();try{const f=await fetch(m),C=await f.blob(),H=window.URL.createObjectURL(C),d=document.createElement("a");d.href=H,d.download=m.split("/").pop(),document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(H)}catch{}}(c,t.row.attachment)},null,8,["src","onClick"])):(p(),U("span",I,w(o.status===0?"\u672A\u5BFC\u5165":o.merchantId?"\u672A\u7ED3\u8D26":"\u5BFC\u5165\u5931\u8D25"),1))]),_:1}),o.merchantId?(p(),y(l,{key:0,label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:a(_t),width:"180px"},null,8,["formatter"])):Z("",!0),e(l,{label:"\u64CD\u4F5C",align:"center"},{default:s(t=>[z((p(),y(j,{type:"success",plain:"",size:"small",onClick:c=>(async(b,m)=>{b.stopPropagation();try{await L.exportConfirm(),v.value=!0;const f=await x({shopSettlementId:m.id}),C=m.shopName+dt(m.createTime,"YYYY-MM-DD")+"-\u7ED3\u7B97\u5355.xls";ht.excel(f,C)}catch{}finally{v.value=!1}})(c,t.row),loading:a(v)},{default:s(()=>[g(" \u5BFC\u51FA ")]),_:2},1032,["onClick","loading"])),[[F,["trade:order:export"]]])]),_:1})]),_:1},8,["data"])),[[W,a(u)]]),e(M,{total:a(S),page:a(r).pageNo,"onUpdate:page":i[1]||(i[1]=t=>a(r).pageNo=t),limit:a(r).pageSize,"onUpdate:limit":i[2]||(i[2]=t=>a(r).pageSize=t),onPagination:h},null,8,["total","page","limit"])]),_:1}),e(ft,{ref_key:"formRef",ref:N,onSuccess:h},null,512)],64)}}}),[["__scopeId","data-v-508bb440"]])});export{St as __tla,Y as default};