index-67b35871.js 6.8 KB

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