index-c9bc46ed.js 5.0 KB

1
  1. import{aA as z,d as X,r as s,P as Z,x as q,w as B,b as G,a4 as K,o as p,c as H,f as e,A as r,k as U,C as w,a,D as h,E as f,dz as R,dJ as Y,a3 as V,F as $,X as tt,J as at,Y as et,Z as ot,_ as rt,__tla as lt}from"./index-54aa57d8.js";import{_ as nt,__tla as st}from"./ContentWrap-260746ab.js";import{_ as it,__tla as ct}from"./index-e6a7fd1e.js";import{E as mt,__tla as pt}from"./el-image-94dad5a7.js";import{__tla as _t}from"./el-image-viewer-ec0edec4.js";import{d as dt,f as ut,__tla as ht}from"./formatTime-e6197688.js";import{d as ft}from"./download-20922b56.js";import yt,{__tla as gt}from"./ShopSettlementForm-a89fe009.js";import{g as wt,__tla as vt}from"./index-692b7677.js";import{u as bt,__tla as xt}from"./useMessage-f56cafbb.js";import{__tla as At}from"./el-card-e7d6628c.js";import{__tla as Ct}from"./index-254a9b5e.js";import{__tla as kt}from"./Dialog-7bb778a5.js";import{__tla as It}from"./index-e7a32376.js";let D,St=Promise.all([(()=>{try{return lt}catch{}})(),(()=>{try{return st}catch{}})(),(()=>{try{return ct}catch{}})(),(()=>{try{return pt}catch{}})(),(()=>{try{return _t}catch{}})(),(()=>{try{return ht}catch{}})(),(()=>{try{return gt}catch{}})(),(()=>{try{return vt}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return It}catch{}})()]).then(async()=>{let A,C,k;A=async l=>await z.get({url:"/distri/shop-settlement/page",params:l}),C=async l=>await z.download({url:"/trade/order/export-excel/shopSettlement",params:l}),k={key:1},D=rt(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 E=s([]);s(!1);const L=bt();Z();const y=s(!0),I=s([]),S=s(0),n=q({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),g=async()=>{y.value=!0;try{const _=await A(n);I.value=_.list,S.value=_.total}finally{y.value=!1}},N=s();return B(()=>n.shopId,()=>{g()}),G(()=>{n.ptSettlementId=T.id,n.merchantId=T.merchantId,g(),(async()=>{y.value=!0;const _=await wt();E.value=_})()}),(_,c)=>{const o=tt,j=mt,F=at,J=et,M=it,O=nt,Q=K("hasPermi"),W=ot;return p(),H($,null,[e(O,{class:"mt-15px"},{default:r(()=>[U((p(),w(J,{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(R)(t.row.platformCollectionAmount)),1)]),_:1}),e(o,{label:"\u62B5\u6263\u4F63\u91D1",align:"center",prop:"shopHighAmount"},{default:r(t=>[h(f(a(Y)(t.row.shopAmount)),1)]),_:1}),e(o,{label:"\u62B5\u6263\u6D88\u8D39\u5206",align:"center",prop:"shopHighAmount"},{default:r(t=>[h(f(a(Y)(t.row.consumptionPoints||0)),1)]),_:1}),e(o,{label:"\u5E94\u7ED3(\u6210\u672C)",align:"center",prop:"shopTotalHighAmount"},{default:r(t=>[h(" \uFFE5"+f(a(R)(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),x=await d.blob(),P=window.URL.createObjectURL(x),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(),H("span",k,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(dt),width:"180px"},null,8,["formatter"])):V("",!0),e(o,{label:"\u64CD\u4F5C",align:"center"},{default:r(t=>[U((p(),w(F,{type:"success",plain:"",size:"small",onClick:m=>(async(b,i)=>{b.stopPropagation(),console.log(i);try{await L.exportConfirm(),v.value=!0;const d=await C({shopSettlementId:i.id}),x=i.shopName+ut(i.createTime,"YYYY-MM-DD")+"-\u7ED3\u7B97\u5355.xls";ft.excel(d,x)}catch{}finally{v.value=!1}})(m,t.row),loading:a(v)},{default:r(()=>[h(" \u5BFC\u51FA ")]),_:2},1032,["onClick","loading"])),[[Q,["trade:order:export"]]])]),_:1})]),_:1},8,["data"])),[[W,a(y)]]),e(M,{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:g},null,8,["total","page","limit"])]),_:1}),e(yt,{ref_key:"formRef",ref:N,onSuccess:g},null,512)],64)}}}),[["__scopeId","data-v-b3661f66"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/shopsettlement/index.vue"]])});export{St as __tla,D as default};