1 |
- import{ap as P,d as $,r as p,z as ee,f as ae,M as oe,x as te,Q as le,o as h,c as z,k as T,i as e,a as o,dF as re,B as A,a4 as ne,w as t,m as s,j as H,t as v,aY as E,dG as F,F as se,q as ie,p as pe,G as me,_ as ce,E as de,s as ue,H as fe,I as he,J as ge,K as we}from"./index-34852970.js";import{_ as ve}from"./ContentWrap.vue_vue_type_script_setup_true_lang-eb026e5c.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_lang-1515f911.js";import{E as ye}from"./el-image-32cffe65.js";import"./el-image-viewer-619778cc.js";import{b as be,f as xe}from"./formatTime-2355f062.js";import{d as Ce}from"./download-20922b56.js";import ke from"./ShopSettlementForm-16bed7fb.js";import{u as Te}from"./useMessage-f6294882.js";import{_ as Ae}from"./_plugin-vue_export-helper-1b428a4d.js";import"./el-card-73839c3c.js";import"./index-d6d07698.js";import"./Dialog-e0707d40.js";import"./index-da2349de.js";const He=async g=>await P.get({url:"/distri/shop-settlement/page",params:g}),Ye=async g=>await P.download({url:"/trade/order/export-excel/shopSettlement",params:g}),Se={class:"search-one"},Re={style:{"text-align":"right"},class:"search-input"},Ue={class:"searchMore",style:{width:"calc(100% - 60px)"}},De={key:1},Ie=Ae($({name:"ShopSettlement",__name:"index",setup(g){const w=p(!1),L=()=>{w.value=!w.value},_=()=>{w.value=!1},j=Te();ee();const y=p(!0),Y=p([]),S=p(0),r=ae({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}),R=p(),b=p(!1),c=async()=>{y.value=!0;try{const x=await He(r);Y.value=x.list,S.value=x.total}finally{y.value=!1}},U=()=>{r.pageNo=1,c(),_()},q=()=>{R.value.resetFields(),U(),_()},D=p();return oe(()=>r.shopId,()=>{c()}),te(()=>{c()}),(x,l)=>{const d=ie,V=pe,I=me,M=ce,G=de,J=ue,O=fe,n=he,B=ye,K=ge,Q=_e,W=ve,X=le("hasPermi"),Z=we;return h(),z(se,null,[T("div",Se,[T("div",Re,[e(d,{icon:o(re),onClick:L,style:{"margin-left":"0"}},null,8,["icon"])])]),A(T("div",Ue,[e(O,{class:"-mb-15px",model:o(r),ref_key:"queryFormRef",ref:R,inline:!0,"label-width":"120px"},{default:t(()=>[e(I,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(V,{modelValue:o(r).createTime,"onUpdate:modelValue":l[0]||(l[0]=a=>o(r).createTime=a),"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}),e(J,null,{default:t(()=>[e(G,null,{default:t(()=>[e(I,null,{default:t(()=>[e(d,{onClick:_},{default:t(()=>l[4]||(l[4]=[s(" \u6536\u8D77 ")])),_:1}),e(d,{onClick:q},{default:t(()=>[e(M,{class:"mr-5px",icon:"ep:refresh"}),l[5]||(l[5]=s(" \u91CD\u7F6E "))]),_:1}),e(d,{onClick:U,plain:"",type:"primary"},{default:t(()=>[e(M,{class:"mr-5px",icon:"ep:search"}),l[6]||(l[6]=s(" \u641C\u7D22 "))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[ne,o(w)]]),e(W,{class:"mt-15px"},{default:t(()=>[A((h(),H(K,{data:o(Y),stripe:!0,"show-overflow-tooltip":!0,onRowClick:l[1]||(l[1]=a=>{return m=a,void D.value.open(m);var m}),"row-class-name":"row"},{default:t(()=>[e(n,{label:"\u5E8F\u53F7",align:"center",prop:"id"}),e(n,{label:"\u5E97\u94FA\u540D\u79F0",align:"center",prop:"shopName"}),e(n,{label:"\u9500\u552E\u989D",align:"center",prop:"platformCollectionAmount"},{default:t(a=>[s(" \uFFE5"+v(o(E)(a.row.platformCollectionAmount)),1)]),_:1}),e(n,{label:"\u62B5\u6263\u4F63\u91D1",align:"center",prop:"shopHighAmount"},{default:t(a=>[s(v(o(F)(a.row.shopAmount)),1)]),_:1}),e(n,{label:"\u62B5\u6263\u6D88\u8D39\u5206",align:"center",prop:"shopHighAmount"},{default:t(a=>[s(v(o(F)(a.row.consumptionPoints||0)),1)]),_:1}),e(n,{label:"\u5E94\u7ED3(\u6210\u672C)",align:"center",prop:"shopTotalHighAmount"},{default:t(a=>[s(" \uFFE5"+v(o(E)(a.row.shopTotalHighAmount)),1)]),_:1}),e(n,{label:"\u8F6C\u8D26\u51ED\u8BC1\u9644\u4EF6",align:"center",prop:"attachment"},{default:t(a=>[a.row.attachment?(h(),H(B,{key:0,src:a.row.attachment,onClick:m=>async function(C,i){C.stopPropagation();try{const u=await fetch(i),k=await u.blob(),N=window.URL.createObjectURL(k),f=document.createElement("a");f.href=N,f.download=i.split("/").pop(),document.body.appendChild(f),f.click(),document.body.removeChild(f),window.URL.revokeObjectURL(N)}catch(u){console.error("Error downloading the image:",u)}}(m,a.row.attachment)},null,8,["src","onClick"])):(h(),z("span",De,"\u672A\u7ED3\u8D26"))]),_:1}),e(n,{label:"\u65E5\u671F",align:"center",prop:"createTime",formatter:o(be),width:"180px"},null,8,["formatter"]),e(n,{label:"\u64CD\u4F5C",align:"center"},{default:t(a=>[A((h(),H(d,{type:"success",plain:"",size:"small",onClick:m=>(async(C,i)=>{C.stopPropagation(),console.log(i);try{await j.exportConfirm(),b.value=!0;const u=await Ye({shopSettlementId:i.id}),k=i.shopName+xe(i.createTime,"YYYY-MM-DD")+"-\u7ED3\u7B97\u5355.xls";Ce.excel(u,k)}catch{}finally{b.value=!1}})(m,a.row),loading:o(b)},{default:t(()=>l[7]||(l[7]=[s(" \u5BFC\u51FA ")])),_:2},1032,["onClick","loading"])),[[X,["trade:order:export"]]])]),_:1})]),_:1},8,["data"])),[[Z,o(y)]]),e(Q,{total:o(S),page:o(r).pageNo,"onUpdate:page":l[2]||(l[2]=a=>o(r).pageNo=a),limit:o(r).pageSize,"onUpdate:limit":l[3]||(l[3]=a=>o(r).pageSize=a),onPagination:c},null,8,["total","page","limit"])]),_:1}),e(ke,{ref_key:"formRef",ref:D,onSuccess:c},null,512)],64)}}}),[["__scopeId","data-v-b3d640c5"]]);export{Ie as default};
|