import{ap as P,d as X,r as s,f as Z,M as $,x as ee,Q as ae,o as x,c as le,k,i as e,a as l,dF as ie,B as C,a4 as re,w as i,m as o,j as T,t as p,aY as Y,dH as m,F as oe,p as te,q as ne,_ as pe,G as se,E as de,s as ce,H as me,I as ue,J as fe,K as ge}from"./index-abad4030.js";import{_ as ve}from"./ContentWrap.vue_vue_type_script_setup_true_lang-7f96d0ff.js";import{_ as we}from"./index.vue_vue_type_script_setup_true_lang-bec51e2c.js";import{f as _e}from"./formatTime-775c05ee.js";import{d as R}from"./download-20922b56.js";import{_ as ye}from"./DailyBillForm.vue_vue_type_script_setup_true_lang-20b15555.js";import{u as xe}from"./useMessage-7954cb2f.js";import{_ as Ce}from"./_plugin-vue_export-helper-1b428a4d.js";import"./el-card-ae8ad827.js";import"./index-84234f22.js";import"./Dialog-59824a83.js";import"./OrderIndex-82012bb4.js";import"./SPuUploadImg-c3944a6d.js";import"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-5d33076d.js";import"./index-b9506fe9.js";import"./el-image-viewer-589d6dbb.js";import"./OrderBaseInfo-c233a95c.js";import"./index-48aa43a3.js";import"./dict-a9a468ec.js";import"./OrderProduct-226f31f7.js";import"./el-descriptions-item-d2e860f6.js";import"./DictTag.vue_vue_type_script_lang-dadba9ff.js";import"./color-6e929987.js";import"./OrderComment-703035c3.js";import"./el-image-56b655c9.js";import"./OrderService-f2cb6bf9.js";import"./AfterSale-13078787.js";import"./index-904c3b07.js";import"./OrderLogistics-ea09fe62.js";import"./el-timeline-item-6199607c.js";import"./index-1e5e2a71.js";import"./orderPay-7b3329f2.js";import"./OrderLogs-58132b2d.js";import"./constants-e43f22dd.js";import"./OrderDeliveryForm-0259dd74.js";import"./OrderSelfPickup.vue_vue_type_script_setup_true_lang-6d760028.js";import"./index-54636ce2.js";import"./OrderUpdateRemarkForm-97dc9fc5.js";import"./OrderUpdateAddressForm.vue_vue_type_script_setup_true_lang-07a45c4a.js";import"./el-tree-select-25ec6c82.js";import"./index-9cd5ff7c.js";import"./tree-0af4953a.js";const he=async d=>await P.get({url:"/distri/daily-bill/page",params:d}),be=async d=>await P.download({url:"/distri/daily-bill/export-excel",params:d}),Ie=async d=>await P.download({url:"/trade/order/export-excel/dailyBill",params:d}),Pe={class:"search-one"},ke={style:{"text-align":"right"},class:"search-input"},Te={class:"searchMore",style:{width:"calc(100% - 60px)"}},Ye=Ce(X({name:"DailyBill",__name:"index",setup(d){const v=s(!1),B=()=>{v.value=!v.value},w=()=>{v.value=!1},D=xe(),h=s(!0),M=s([]),N=s(0),n=Z({pageNo:1,pageSize:10,price:void 0,receivedPrice:void 0,orderCount:void 0,shopId:void 0,merchantId:void 0,orderIds:void 0,createTime:[],refundPrice:void 0,integral:void 0,receivedIntegral:void 0,refundIntegral:void 0,orderCalcTime:[]}),z=s(),u=s(!1),f=async()=>{h.value=!0;try{const _=await he(n);M.value=_.list,N.value=_.total}finally{h.value=!1}},H=()=>{n.pageNo=1,f(),w()},U=()=>{z.value.resetFields(),H(),w()},S=s(),V=async _=>{try{await D.exportConfirm(),u.value=!0;const r=await be(n);R.excel(r,"\u6BCF\u65E5\u8D26\u5355.xls")}catch{}finally{w(),u.value=!1}};return $(()=>n.orderCalcTime,()=>{f()}),ee(()=>{f()}),(_,r)=>{const q=te,c=ne,b=pe,E=se,j=de,G=ce,J=me,t=ue,K=fe,Q=we,A=ve,F=ae("hasPermi"),L=ge;return x(),le(oe,null,[k("div",Pe,[k("div",ke,[e(q,{modelValue:l(n).orderCalcTime,"onUpdate:modelValue":r[0]||(r[0]=a=>l(n).orderCalcTime=a),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u8D26\u5355\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u8D26\u5355\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"]),e(c,{icon:l(ie),onClick:B,style:{"margin-left":"0"}},null,8,["icon"])])]),C(k("div",Te,[e(J,{class:"mb-15px",model:l(n),ref_key:"queryFormRef",ref:z,inline:!0,"label-width":"120px"},{default:i(()=>[e(G,null,{default:i(()=>[e(j,null,{default:i(()=>[e(E,null,{default:i(()=>[e(c,{onClick:w},{default:i(()=>r[4]||(r[4]=[o(" \u6536\u8D77 ")])),_:1}),e(c,{onClick:U},{default:i(()=>[e(b,{class:"mr-5px",icon:"ep:refresh"}),r[5]||(r[5]=o(" \u91CD\u7F6E "))]),_:1}),e(c,{onClick:H,plain:"",type:"primary"},{default:i(()=>[e(b,{class:"mr-5px",icon:"ep:search"}),r[6]||(r[6]=o(" \u641C\u7D22 "))]),_:1}),C((x(),T(c,{type:"success",plain:"",onClick:V,loading:l(u)},{default:i(()=>[e(b,{icon:"ep:download",class:"mr-5px"}),r[7]||(r[7]=o(" \u5BFC\u51FA "))]),_:1},8,["loading"])),[[F,["distri:daily-bill:export"]]])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[re,l(v)]]),e(A,{class:"mt-15px"},{default:i(()=>[C((x(),T(K,{data:l(M),stripe:!0,"show-overflow-tooltip":!0,onRowClick:r[1]||(r[1]=a=>{return y=a,void S.value.open(y,I);var y,I}),"row-class-name":"row"},{default:i(()=>[e(t,{label:"\u8D26\u5355\u7F16\u53F7",align:"center",prop:"id"}),e(t,{label:"\u91D1\u989D",align:"center",prop:"price"},{default:i(a=>[o(" \uFFE5"+p(l(Y)(a.row.price)),1)]),_:1}),e(t,{label:"\u786E\u6536\u91D1\u989D",align:"center",prop:"receivedPrice"},{default:i(a=>[o(" \uFFE5"+p(l(Y)(a.row.receivedPrice)),1)]),_:1}),e(t,{label:"\u9000\u6B3E\u91D1\u989D",align:"center",prop:"refundPrice"},{default:i(a=>[o(" \uFFE5"+p(l(Y)(a.row.refundPrice)),1)]),_:1}),e(t,{label:"\u4F63\u91D1",align:"center",prop:"integral"},{default:i(a=>[o(p(l(m)(a.row.integral)),1)]),_:1}),e(t,{label:"\u786E\u6536\u4F63\u91D1",align:"center",prop:"receivedIntegral"},{default:i(a=>[o(p(l(m)(a.row.receivedIntegral)),1)]),_:1}),e(t,{label:"\u9000\u6B3E\u4F63\u91D1",align:"center",prop:"refundIntegral"},{default:i(a=>[o(p(l(m)(a.row.refundIntegral)),1)]),_:1}),e(t,{label:"\u6D88\u8D39\u5206",align:"center",prop:"consumptionPoints"},{default:i(a=>[o(p(l(m)(a.row.consumptionPoints)),1)]),_:1}),e(t,{label:"\u786E\u6536\u6D88\u8D39\u5206",align:"center",prop:"receivedConsumptionPoints"},{default:i(a=>[o(p(l(m)(a.row.receivedConsumptionPoints)),1)]),_:1}),e(t,{label:"\u9000\u6B3E\u6D88\u8D39\u5206",align:"center",prop:"refundConsumptionPoints"},{default:i(a=>[o(p(l(m)(a.row.refundConsumptionPoints)),1)]),_:1}),e(t,{label:"\u8BA2\u5355\u6570",align:"center",prop:"orderCount"}),e(t,{label:"\u8D26\u5355\u65E5\u671F",align:"center",prop:"orderCalcTime"}),e(t,{label:"\u64CD\u4F5C",align:"center"},{default:i(a=>[C((x(),T(c,{type:"success",plain:"",size:"small",onClick:y=>(async(I,g)=>{I.stopPropagation();try{await D.exportConfirm(),u.value=!0;const O=await Ie({shopId:g.shopId,orderCalcTime:g.orderCalcTime,merchantId:g.merchantId,payStatus:1}),W=g.shopName+_e(g.createTime,"YYYY-MM-DD")+"\u8D26\u5355.xls";R.excel(O,W)}catch{}finally{u.value=!1}})(y,a.row)},{default:i(()=>r[8]||(r[8]=[o(" \u5BFC\u51FA ")])),_:2},1032,["onClick"])),[[F,["distri:daily-bill:export"]]])]),_:1})]),_:1},8,["data"])),[[L,l(h)]]),e(Q,{total:l(N),page:l(n).pageNo,"onUpdate:page":r[2]||(r[2]=a=>l(n).pageNo=a),limit:l(n).pageSize,"onUpdate:limit":r[3]||(r[3]=a=>l(n).pageSize=a),onPagination:f},null,8,["total","page","limit"])]),_:1}),e(ye,{ref_key:"formRef",ref:S,onSuccess:f},null,512)],64)}}}),[["__scopeId","data-v-3689d70d"]]);export{Ye as default};