index-1942bb73.js 6.5 KB

1
  1. import{ax as m,d as re,r as p,H as oe,x as ne,w as se,b as de,a1 as pe,o as c,c as A,C as B,A as y,B as i,F,P as ce,a as l,E as O,f as a,aA as ue,l as x,v as me,G as s,D as d,dD as P,O as g,Q as fe,R as ye,L as ge,_ as ve,S as _e,J as we,M as be,U as he,V as Ie,W as xe,X as Ce}from"./index-b9299550.js";import{_ as De}from"./ContentWrap.vue_vue_type_script_setup_true_lang-dd7e3058.js";import{_ as Be}from"./index.vue_vue_type_script_setup_true_lang-ba921998.js";import{f as Pe}from"./formatTime-988372b6.js";import{d as j}from"./download-20922b56.js";import{_ as ke}from"./DailyBillForm.vue_vue_type_style_index_0_lang-276acfdd.js";import{g as Ne}from"./index-273e293a.js";import{u as Se}from"./useMessage-903d430d.js";import{_ as Te}from"./_plugin-vue_export-helper-1b428a4d.js";const C={getDailyBillPage:async r=>await m.get({url:"/distri/daily-bill/page",params:r}),getDailyBill:async r=>await m.get({url:"/distri/daily-bill/get?id="+r}),createDailyBill:async r=>await m.post({url:"/distri/daily-bill/create",data:r}),updateDailyBill:async r=>await m.put({url:"/distri/daily-bill/update",data:r}),deleteDailyBill:async r=>await m.delete({url:"/distri/daily-bill/delete?id="+r}),exportDailyBill:async r=>await m.download({url:"/distri/daily-bill/export-excel",params:r}),exportDailyBillByRow:async r=>await m.download({url:"/trade/order/export-excel/dailyBill",params:r})},Re={class:"search-one"},ze={style:{"text-align":"right"},class:"search-input"},Me={class:"searchMore",style:{width:"calc(100% - 60px)"}},J=Te(re({name:"DailyBill",__name:"index",props:{merchantId:{type:Number,default:void 0},ptDailyBillId:{type:Number,default:void 0}},setup(r){const k=r,b=p(!1),Q=()=>{b.value=!b.value},D=()=>{b.value=!1};let N=p([]);const S=Se();oe();const h=p(!0),T=p([]),R=p(0),n=ne({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:[],ptDailyBillId:void 0}),z=p(),v=p(!1),_=async()=>{h.value=!0;try{const u=await C.getDailyBillPage(n);T.value=u.list,R.value=u.total}finally{h.value=!1}},M=()=>{n.pageNo=1,_(),D()},W=()=>{z.value.resetFields(),n.shopId=void 0,M(),D()},U=p(),q=async()=>{try{await S.exportConfirm(),v.value=!0;const u=await C.exportDailyBill(n);j.excel(u,"\u6BCF\u65E5\u8D26\u5355.xls")}catch{}finally{v.value=!1}};return se(()=>n.shopId,()=>{_()}),de(async()=>{n.merchantId=k.merchantId,n.ptDailyBillId=k.ptDailyBillId,_(),await(async()=>{h.value=!0;const u=await Ne();N.value=u})()}),(u,t)=>{const E=fe,G=ye,f=ge,V=ve,H=_e,K=we,L=be,X=he,o=Ie,Z=xe,$=Be,ee=De,Y=pe("hasPermi"),ae=Ce;return c(),A(F,null,[B("div",Re,[B("div",ze,[r.merchantId?O("",!0):(c(),y(G,{key:0,modelValue:l(n).shopId,"onUpdate:modelValue":t[0]||(t[0]=e=>l(n).shopId=e),placeholder:"\u5E97\u94FA\u540D\u79F0",filterable:"",clearable:""},{default:i(()=>[(c(!0),A(F,null,ce(l(N),e=>(c(),y(E,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])),a(f,{icon:l(ue),onClick:Q,style:{"margin-left":"0"}},null,8,["icon"])])]),x(B("div",Me,[a(X,{model:l(n),ref_key:"queryFormRef",ref:z,inline:!0,"label-width":"120px"},{default:i(()=>[a(L,null,{default:i(()=>[a(K,null,{default:i(()=>[a(H,null,{default:i(()=>[x((c(),y(f,{type:"success",plain:"",onClick:q,loading:l(v)},{default:i(()=>t[4]||(t[4]=[s(" \u5BFC\u51FA ")])),_:1},8,["loading"])),[[Y,["distri:daily-bill:export"]]]),a(f,{onClick:D},{default:i(()=>t[5]||(t[5]=[s(" \u6536\u8D77 ")])),_:1}),a(f,{onClick:W},{default:i(()=>[a(V,{class:"mr-5px",icon:"ep:refresh"}),t[6]||(t[6]=s(" \u91CD\u7F6E "))]),_:1}),a(f,{onClick:M,plain:"",type:"primary"},{default:i(()=>[a(V,{class:"mr-5px",icon:"ep:search"}),t[7]||(t[7]=s(" \u641C\u7D22 "))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[me,l(b)]]),a(ee,{class:"mt-15px"},{default:i(()=>[x((c(),y(Z,{data:l(T),stripe:!0,"show-overflow-tooltip":!0,onRowClick:t[1]||(t[1]=e=>{return I=e,void U.value.open(I);var I}),"row-class-name":"row"},{default:i(()=>[a(o,{label:"\u8D26\u5355\u7F16\u53F7",align:"center",prop:"id"}),a(o,{label:"\u91D1\u989D",align:"center",prop:"price"},{default:i(e=>[s(" \uFFE5"+d(l(P)(e.row.price)),1)]),_:1}),a(o,{label:"\u786E\u6536\u91D1\u989D",align:"center",prop:"receivedPrice"},{default:i(e=>[s(" \uFFE5"+d(l(P)(e.row.receivedPrice)),1)]),_:1}),a(o,{label:"\u9000\u6B3E\u91D1\u989D",align:"center",prop:"refundPrice"},{default:i(e=>[s(" \uFFE5"+d(l(P)(e.row.refundPrice)),1)]),_:1}),a(o,{label:"\u4F63\u91D1",align:"center",prop:"integral"},{default:i(e=>[s(d(l(g)(e.row.integral)),1)]),_:1}),a(o,{label:"\u786E\u6536\u4F63\u91D1",align:"center",prop:"receivedIntegral"},{default:i(e=>[s(d(l(g)(e.row.receivedIntegral)),1)]),_:1}),a(o,{label:"\u9000\u6B3E\u4F63\u91D1",align:"center",prop:"refundIntegral"},{default:i(e=>[s(d(l(g)(e.row.refundIntegral)),1)]),_:1}),a(o,{label:"\u6D88\u8D39\u5206",align:"center",prop:"consumptionPoints"},{default:i(e=>[s(d(l(g)(e.row.consumptionPoints)),1)]),_:1}),a(o,{label:"\u786E\u6536\u6D88\u8D39\u5206",align:"center",prop:"receivedConsumptionPoints"},{default:i(e=>[s(d(l(g)(e.row.receivedConsumptionPoints)),1)]),_:1}),a(o,{label:"\u9000\u6B3E\u6D88\u8D39\u5206",align:"center",prop:"refundConsumptionPoints"},{default:i(e=>[s(d(l(g)(e.row.refundConsumptionPoints)),1)]),_:1}),a(o,{label:"\u8BA2\u5355\u6570",align:"center",prop:"orderCount"}),r.merchantId?O("",!0):(c(),y(o,{key:0,label:"\u5546\u6237\u540D",align:"center",prop:"merchantName"})),a(o,{label:"\u5E97\u94FA\u540D",align:"center",prop:"shopName"}),a(o,{label:"\u8D26\u5355\u65E5\u671F",align:"center",prop:"orderCalcTime"}),a(o,{label:"\u64CD\u4F5C",align:"center"},{default:i(e=>[x((c(),y(f,{type:"success",plain:"",size:"small",onClick:I=>(async(le,w)=>{le.stopPropagation();try{await S.exportConfirm(),v.value=!0;const ie=await C.exportDailyBillByRow({shopId:w.shopId,orderCalcTime:w.orderCalcTime,merchantId:w.merchantId,payStatus:1}),te=w.shopName+Pe(w.createTime,"YYYY-MM-DD")+"\u8D26\u5355.xls";j.excel(ie,te)}catch{}finally{v.value=!1}})(I,e.row)},{default:i(()=>t[8]||(t[8]=[s(" \u5BFC\u51FA ")])),_:2},1032,["onClick"])),[[Y,["distri:daily-bill:export"]]])]),_:1})]),_:1},8,["data"])),[[ae,l(h)]]),a($,{total:l(R),page:l(n).pageNo,"onUpdate:page":t[2]||(t[2]=e=>l(n).pageNo=e),limit:l(n).pageSize,"onUpdate:limit":t[3]||(t[3]=e=>l(n).pageSize=e),onPagination:_},null,8,["total","page","limit"])]),_:1}),a(ke,{ref_key:"formRef",ref:U,onSuccess:_},null,512)],64)}}}),[["__scopeId","data-v-ca976563"]]),Ue=Object.freeze(Object.defineProperty({__proto__:null,default:J},Symbol.toStringTag,{value:"Module"}));export{C as D,J as d,Ue as i};