1 |
- import{az as H,d as X,r as s,P as q,x as G,w as K,b as Q,a3 as V,o as p,c as R,f as e,A as r,k as U,C as w,a,D as h,E as f,dx as z,dH as E,a2 as Z,F as $,W as tt,J as at,X as et,Y as ot,__tla as rt}from"./index-1f518666.js";import{_ as lt,__tla as nt}from"./ContentWrap.vue_vue_type_script_setup_true_lang-a4de6de9.js";import{_ as st,__tla as it}from"./index.vue_vue_type_script_setup_true_lang-cf2a6735.js";import{E as ct,__tla as mt}from"./el-image-1ae80d1a.js";import{__tla as pt}from"./el-image-viewer-91778fd6.js";import{d as _t,f as dt,__tla as ut}from"./formatTime-a4909bb5.js";import{d as ht}from"./download-20922b56.js";import ft,{__tla as gt}from"./ShopSettlementForm-c6944e2c.js";import{g as yt,__tla as wt}from"./index-eb0421d0.js";import{u as vt,__tla as bt}from"./useMessage-633c11d2.js";import{_ as Ct}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as kt}from"./el-card-955661ed.js";import{__tla as xt}from"./index-a37b14c7.js";import{__tla as At}from"./Dialog-4c960d8c.js";import{__tla as It}from"./index-0df6bae7.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 gt}catch{}})(),(()=>{try{return wt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return It}catch{}})()]).then(async()=>{let k,x,A;k=async l=>await H.get({url:"/distri/shop-settlement/page",params:l}),x=async l=>await H.download({url:"/trade/order/export-excel/shopSettlement",params:l}),A={key:1},Y=Ct(X({name:"ShopSettlement",__name:"index",props:{id:{type:Number,default:void 0},status:{type:Number,default:void 0},merchantId:{type:Number,default:void 0}},setup(l){let L=s([]);s(!1);const D=vt();q();const g=s(!0),I=s([]),S=s(0),n=G({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=l;s();const v=s(!1),y=async()=>{g.value=!0;try{const _=await k(n);I.value=_.list,S.value=_.total}finally{g.value=!1}},N=s();return K(()=>n.shopId,()=>{y()}),Q(()=>{n.ptSettlementId=T.id,n.merchantId=T.merchantId,y(),(async()=>{g.value=!0;const _=await yt();L.value=_})()}),(_,c)=>{const o=tt,j=ct,J=at,M=et,O=st,F=lt,W=V("hasPermi"),B=ot;return p(),R($,null,[e(F,{class:"mt-15px"},{default:r(()=>[U((p(),w(M,{data:a(I),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:r(()=>[e(o,{label:"\u5E8F\u53F7",align:"center",prop:"id"}),e(o,{label:"\u5E97\u94FA\u540D\u79F0",align:"center",prop:"shopName"}),e(o,{label:"\u9500\u552E\u989D",align:"center",prop:"platformCollectionAmount"},{default:r(t=>[h(" \uFFE5"+f(a(z)(t.row.platformCollectionAmount)),1)]),_:1}),e(o,{label:"\u62B5\u6263\u4F63\u91D1",align:"center",prop:"shopHighAmount"},{default:r(t=>[h(f(a(E)(t.row.shopAmount)),1)]),_:1}),e(o,{label:"\u62B5\u6263\u6D88\u8D39\u5206",align:"center",prop:"shopHighAmount"},{default:r(t=>[h(f(a(E)(t.row.consumptionPoints||0)),1)]),_:1}),e(o,{label:"\u5E94\u7ED3(\u6210\u672C)",align:"center",prop:"shopTotalHighAmount"},{default:r(t=>[h(" \uFFE5"+f(a(z)(t.row.shopTotalHighAmount)),1)]),_:1}),e(o,{label:"\u8F6C\u8D26\u51ED\u8BC1\u9644\u4EF6",align:"center",prop:"attachment"},{default:r(t=>[t.row.attachment?(p(),w(j,{key:0,src:t.row.attachment,onClick:m=>async function(b,i){b.stopPropagation();try{const d=await fetch(i),C=await d.blob(),P=window.URL.createObjectURL(C),u=document.createElement("a");u.href=P,u.download=i.split("/").pop(),document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(P)}catch(d){console.error("Error downloading the image:",d)}}(m,t.row.attachment)},null,8,["src","onClick"])):(p(),R("span",A,f(l.status===0?"\u672A\u5BFC\u5165":l.merchantId?"\u672A\u7ED3\u8D26":"\u5BFC\u5165\u5931\u8D25"),1))]),_:1}),l.merchantId?(p(),w(o,{key:0,label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:a(_t),width:"180px"},null,8,["formatter"])):Z("",!0),e(o,{label:"\u64CD\u4F5C",align:"center"},{default:r(t=>[U((p(),w(J,{type:"success",plain:"",size:"small",onClick:m=>(async(b,i)=>{b.stopPropagation(),console.log(i);try{await D.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:r(()=>[h(" \u5BFC\u51FA ")]),_:2},1032,["onClick","loading"])),[[W,["trade:order:export"]]])]),_:1})]),_:1},8,["data"])),[[B,a(g)]]),e(O,{total:a(S),page:a(n).pageNo,"onUpdate:page":c[1]||(c[1]=t=>a(n).pageNo=t),limit:a(n).pageSize,"onUpdate:limit":c[2]||(c[2]=t=>a(n).pageSize=t),onPagination:y},null,8,["total","page","limit"])]),_:1}),e(ft,{ref_key:"formRef",ref:N,onSuccess:y},null,512)],64)}}}),[["__scopeId","data-v-3a708ff1"]])});export{St as __tla,Y as default};
|