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-f65577b8.js";import{_ as lt,__tla as nt}from"./ContentWrap.vue_vue_type_script_setup_true_lang-9fbbd655.js";import{_ as st,__tla as it}from"./index.vue_vue_type_script_setup_true_lang-53598c8e.js";import{E as ct,__tla as mt}from"./el-image-6b44629c.js";import{__tla as pt}from"./el-image-viewer-7e496319.js";import{d as _t,f as dt,__tla as ut}from"./formatTime-411ed1a1.js";import{d as ht}from"./download-20922b56.js";import ft,{__tla as yt}from"./ShopSettlementForm-fa1573fa.js";import{g as gt,__tla as wt}from"./index-c8579bc8.js";import{u as vt,__tla as bt}from"./useMessage-4dbf0ae4.js";import{_ as Ct}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as kt}from"./el-card-ab53e6aa.js";import{__tla as xt}from"./index-1896261a.js";import{__tla as It}from"./Dialog-bd3317a7.js";import{__tla as At}from"./index-be51ff92.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 E=vt();X();const h=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),f=async()=>{h.value=!0;try{const _=await k(r);A.value=_.list,S.value=_.total}finally{h.value=!1}},N=n();return G(()=>r.shopId,()=>{f()}),K(()=>{r.ptSettlementId=T.id,r.merchantId=T.merchantId,f(),(async()=>{h.value=!0;const _=await gt();D.value=_})()}),(_,c)=>{const l=tt,L=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:c[0]||(c[0]=t=>{return m=t,void N.value.open(m);var m}),"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(L,{key:0,src:t.row.attachment,onClick:m=>async function(b,i){b.stopPropagation();try{const d=await fetch(i),C=await d.blob(),H=window.URL.createObjectURL(C),u=document.createElement("a");u.href=H,u.download=i.split("/").pop(),document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(H)}catch(d){console.error("Error downloading the image:",d)}}(m,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:m=>(async(b,i)=>{b.stopPropagation(),console.log(i);try{await E.exportConfirm(),v.value=!0;const d=await x({shopSettlementId:i.id}),C=i.shopName+dt(i.createTime,"YYYY-MM-DD")+"-\u7ED3\u7B97\u5355.xls";ht.excel(d,C)}catch{}finally{v.value=!1}})(m,t.row),loading:a(v)},{default:s(()=>[g(" \u5BFC\u51FA ")]),_:2},1032,["onClick","loading"])),[[F,["trade:order:export"]]])]),_:1})]),_:1},8,["data"])),[[W,a(h)]]),e(M,{total:a(S),page:a(r).pageNo,"onUpdate:page":c[1]||(c[1]=t=>a(r).pageNo=t),limit:a(r).pageSize,"onUpdate:limit":c[2]||(c[2]=t=>a(r).pageSize=t),onPagination:f},null,8,["total","page","limit"])]),_:1}),e(ft,{ref_key:"formRef",ref:N,onSuccess:f},null,512)],64)}}}),[["__scopeId","data-v-508bb440"]])});export{St as __tla,Y as default};
|