index-52828786.js 6.0 KB

1
  1. import{ar as j,d as na,r as c,A as sa,g as ia,N as ca,y as pa,S as ma,o as f,c as q,j as T,i as a,a as t,dx as _a,C as A,a6 as da,w as l,l as s,k as H,t as y,aY as O,dy as J,F as ua,q as fa,p as ha,H as ga,_ as ya,E as wa,n as va,I as ba,J as xa,K as Ca,L as ka,__tla as Ta}from"./index-ecc2785b.js";import{_ as Aa,__tla as Ha}from"./ContentWrap.vue_vue_type_script_setup_true_lang-13de8544.js";import{_ as Sa,__tla as Ya}from"./index.vue_vue_type_script_setup_true_lang-3eecd42d.js";import{E as Na,__tla as Ra}from"./el-image-2ba3072e.js";import{__tla as Ua}from"./el-image-viewer-24503c90.js";import{b as Da,f as Ia,__tla as Pa}from"./formatTime-158d9eb6.js";import{d as Ea}from"./download-20922b56.js";import La,{__tla as Ma}from"./ShopSettlementForm-9b8db099.js";import{u as za,__tla as Fa}from"./useMessage-23ea1f6c.js";import{_ as Va}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ja}from"./el-card-99460cde.js";import{__tla as qa}from"./index-bfba6893.js";import{__tla as Oa}from"./Dialog-e3083a37.js";import{__tla as Ja}from"./index-499bccaa.js";let K,Ka=Promise.all([(()=>{try{return Ta}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ja}catch{}})()]).then(async()=>{let S,Y,N,R,U,D;S=async h=>await j.get({url:"/distri/shop-settlement/page",params:h}),Y=async h=>await j.download({url:"/trade/order/export-excel/shopSettlement",params:h}),N={class:"search-one"},R={style:{"text-align":"right"},class:"search-input"},U={class:"searchMore",style:{width:"calc(100% - 60px)"}},D={key:1},K=Va(na({name:"ShopSettlement",__name:"index",setup(h){const g=c(!1),$=()=>{g.value=!g.value},w=()=>{g.value=!1},B=za();sa();const v=c(!0),I=c([]),P=c(0),o=ia({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,merchantId:void 0}),E=c(),b=c(!1),m=async()=>{v.value=!0;try{const x=await S(o);I.value=x.list,P.value=x.total}finally{v.value=!1}},L=()=>{o.pageNo=1,m(),w()},G=()=>{E.value.resetFields(),L(),w()},M=c();return ca(()=>o.shopId,()=>{m()}),pa(()=>{m()}),(x,n)=>{const _=fa,Q=ha,z=ga,F=ya,W=wa,X=va,Z=ba,r=xa,aa=Na,ea=Ca,ta=Sa,la=Aa,oa=ma("hasPermi"),ra=ka;return f(),q(ua,null,[T("div",N,[T("div",R,[a(_,{icon:t(_a),onClick:$,style:{"margin-left":"0"}},null,8,["icon"])])]),A(T("div",U,[a(Z,{class:"-mb-15px",model:t(o),ref_key:"queryFormRef",ref:E,inline:!0,"label-width":"120px"},{default:l(()=>[a(z,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:l(()=>[a(Q,{modelValue:t(o).createTime,"onUpdate:modelValue":n[0]||(n[0]=e=>t(o).createTime=e),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),a(X,null,{default:l(()=>[a(W,null,{default:l(()=>[a(z,null,{default:l(()=>[a(_,{onClick:w},{default:l(()=>[s(" \u6536\u8D77 ")]),_:1}),a(_,{onClick:G},{default:l(()=>[a(F,{class:"mr-5px",icon:"ep:refresh"}),s(" \u91CD\u7F6E ")]),_:1}),a(_,{onClick:L,plain:"",type:"primary"},{default:l(()=>[a(F,{class:"mr-5px",icon:"ep:search"}),s(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[da,t(g)]]),a(la,{class:"mt-15px"},{default:l(()=>[A((f(),H(ea,{data:t(I),stripe:!0,"show-overflow-tooltip":!0,onRowClick:n[1]||(n[1]=e=>{return p=e,void M.value.open(p);var p}),"row-class-name":"row"},{default:l(()=>[a(r,{label:"\u5E8F\u53F7",align:"center",prop:"id"}),a(r,{label:"\u5E97\u94FA\u540D\u79F0",align:"center",prop:"shopName"}),a(r,{label:"\u9500\u552E\u989D",align:"center",prop:"platformCollectionAmount"},{default:l(e=>[s(" \uFFE5"+y(t(O)(e.row.platformCollectionAmount)),1)]),_:1}),a(r,{label:"\u62B5\u6263\u4F63\u91D1",align:"center",prop:"shopHighAmount"},{default:l(e=>[s(y(t(J)(e.row.shopAmount)),1)]),_:1}),a(r,{label:"\u62B5\u6263\u6D88\u8D39\u5206",align:"center",prop:"shopHighAmount"},{default:l(e=>[s(y(t(J)(e.row.consumptionPoints||0)),1)]),_:1}),a(r,{label:"\u5E94\u7ED3(\u6210\u672C)",align:"center",prop:"shopTotalHighAmount"},{default:l(e=>[s(" \uFFE5"+y(t(O)(e.row.shopTotalHighAmount)),1)]),_:1}),a(r,{label:"\u8F6C\u8D26\u51ED\u8BC1\u9644\u4EF6",align:"center",prop:"attachment"},{default:l(e=>[e.row.attachment?(f(),H(aa,{key:0,src:e.row.attachment,onClick:p=>async function(C,i){C.stopPropagation();try{const d=await fetch(i),k=await d.blob(),V=window.URL.createObjectURL(k),u=document.createElement("a");u.href=V,u.download=i.split("/").pop(),document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(V)}catch(d){console.error("Error downloading the image:",d)}}(p,e.row.attachment)},null,8,["src","onClick"])):(f(),q("span",D,"\u672A\u7ED3\u8D26"))]),_:1}),a(r,{label:"\u65E5\u671F",align:"center",prop:"createTime",formatter:t(Da),width:"180px"},null,8,["formatter"]),a(r,{label:"\u64CD\u4F5C",align:"center"},{default:l(e=>[A((f(),H(_,{type:"success",plain:"",size:"small",onClick:p=>(async(C,i)=>{C.stopPropagation(),console.log(i);try{await B.exportConfirm(),b.value=!0;const d=await Y({shopSettlementId:i.id}),k=i.shopName+Ia(i.createTime,"YYYY-MM-DD")+"-\u7ED3\u7B97\u5355.xls";Ea.excel(d,k)}catch{}finally{b.value=!1}})(p,e.row),loading:t(b)},{default:l(()=>[s(" \u5BFC\u51FA ")]),_:2},1032,["onClick","loading"])),[[oa,["trade:order:export"]]])]),_:1})]),_:1},8,["data"])),[[ra,t(v)]]),a(ta,{total:t(P),page:t(o).pageNo,"onUpdate:page":n[2]||(n[2]=e=>t(o).pageNo=e),limit:t(o).pageSize,"onUpdate:limit":n[3]||(n[3]=e=>t(o).pageSize=e),onPagination:m},null,8,["total","page","limit"])]),_:1}),a(La,{ref_key:"formRef",ref:M,onSuccess:m},null,512)],64)}}}),[["__scopeId","data-v-b3d640c5"]])});export{Ka as __tla,K as default};