index-1a413f8e.js 6.4 KB

1
  1. import{az as u,d as na,r as n,P as ca,x as pa,w as ua,b as ya,a3 as _a,o as c,c as J,B as D,C as _,A as t,F as Q,Q as ma,a as l,a2 as W,f as e,aC as fa,k as x,v as ga,D as s,E as m,dx as C,O as k,R as va,S as ha,J as wa,_ as ba,U as Ia,H as xa,K as Ba,V as Da,W as Ca,X as ka,Y as Pa,__tla as Na}from"./index-a9d538d5.js";import{_ as Sa,__tla as Ta}from"./ContentWrap.vue_vue_type_script_setup_true_lang-6b7b4656.js";import{_ as za,__tla as Ra}from"./index.vue_vue_type_script_setup_true_lang-ca67dc77.js";import{f as Ya,__tla as Ma}from"./formatTime-8985a9d0.js";import{d as A}from"./download-20922b56.js";import{_ as Ua,__tla as Va}from"./DailyBillForm.vue_vue_type_style_index_0_lang-6d03014e.js";import{g as Fa,__tla as Oa}from"./index-95f2e02a.js";import{u as ja,__tla as qa}from"./useMessage-d5cbbfad.js";import{_ as Ja}from"./_plugin-vue_export-helper-1b428a4d.js";let h,P,E,Qa=Promise.all([(()=>{try{return Na}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return qa}catch{}})()]).then(async()=>{let N,S,T;h={getDailyBillPage:async r=>await u.get({url:"/distri/daily-bill/page",params:r}),getDailyBill:async r=>await u.get({url:"/distri/daily-bill/get?id="+r}),createDailyBill:async r=>await u.post({url:"/distri/daily-bill/create",data:r}),updateDailyBill:async r=>await u.put({url:"/distri/daily-bill/update",data:r}),deleteDailyBill:async r=>await u.delete({url:"/distri/daily-bill/delete?id="+r}),exportDailyBill:async r=>await u.download({url:"/distri/daily-bill/export-excel",params:r}),exportDailyBillByRow:async r=>await u.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)"}},P=Ja(na({name:"DailyBill",__name:"index",props:{merchantId:{type:Number,default:void 0},ptDailyBillId:{type:Number,default:void 0}},setup(r){const z=r,w=n(!1),H=()=>{w.value=!w.value},B=()=>{w.value=!1};let R=n([]);const Y=ja();ca();const b=n(!0),M=n([]),U=n(0),i=pa({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=n(),f=n(!1),g=async()=>{b.value=!0;try{const p=await h.getDailyBillPage(i);M.value=p.list,U.value=p.total}finally{b.value=!1}},F=()=>{i.pageNo=1,g(),B()},K=()=>{V.value.resetFields(),i.shopId=void 0,F(),B()},O=n(),L=async()=>{try{await Y.exportConfirm(),f.value=!0;const p=await h.exportDailyBill(i);A.excel(p,"\u6BCF\u65E5\u8D26\u5355.xls")}catch{}finally{f.value=!1}};return ua(()=>i.shopId,()=>{g()}),ya(async()=>{i.merchantId=z.merchantId,i.ptDailyBillId=z.ptDailyBillId,g(),await(async()=>{b.value=!0;const p=await Fa();R.value=p})()}),(p,d)=>{const X=va,G=ha,y=wa,j=ba,Z=Ia,$=xa,aa=Ba,ea=Da,o=Ca,la=ka,ta=za,ra=Sa,q=_a("hasPermi"),ia=Pa;return c(),J(Q,null,[D("div",N,[D("div",S,[r.merchantId?W("",!0):(c(),_(G,{key:0,modelValue:l(i).shopId,"onUpdate:modelValue":d[0]||(d[0]=a=>l(i).shopId=a),placeholder:"\u5E97\u94FA\u540D\u79F0",filterable:"",clearable:""},{default:t(()=>[(c(!0),J(Q,null,ma(l(R),a=>(c(),_(X,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])),e(y,{icon:l(fa),onClick:H,style:{"margin-left":"0"}},null,8,["icon"])])]),x(D("div",T,[e(ea,{model:l(i),ref_key:"queryFormRef",ref:V,inline:!0,"label-width":"120px"},{default:t(()=>[e(aa,null,{default:t(()=>[e($,null,{default:t(()=>[e(Z,null,{default:t(()=>[x((c(),_(y,{type:"success",plain:"",onClick:L,loading:l(f)},{default:t(()=>[s(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[q,["distri:daily-bill:export"]]]),e(y,{onClick:B},{default:t(()=>[s(" \u6536\u8D77 ")]),_:1}),e(y,{onClick:K},{default:t(()=>[e(j,{class:"mr-5px",icon:"ep:refresh"}),s(" \u91CD\u7F6E ")]),_:1}),e(y,{onClick:F,plain:"",type:"primary"},{default:t(()=>[e(j,{class:"mr-5px",icon:"ep:search"}),s(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[ga,l(w)]]),e(ra,{class:"mt-15px"},{default:t(()=>[x((c(),_(la,{data:l(M),stripe:!0,"show-overflow-tooltip":!0,onRowClick:d[1]||(d[1]=a=>{return I=a,void O.value.open(I);var I}),"row-class-name":"row"},{default:t(()=>[e(o,{label:"\u8D26\u5355\u7F16\u53F7",align:"center",prop:"id"}),e(o,{label:"\u91D1\u989D",align:"center",prop:"price"},{default:t(a=>[s(" \uFFE5"+m(l(C)(a.row.price)),1)]),_:1}),e(o,{label:"\u786E\u6536\u91D1\u989D",align:"center",prop:"receivedPrice"},{default:t(a=>[s(" \uFFE5"+m(l(C)(a.row.receivedPrice)),1)]),_:1}),e(o,{label:"\u9000\u6B3E\u91D1\u989D",align:"center",prop:"refundPrice"},{default:t(a=>[s(" \uFFE5"+m(l(C)(a.row.refundPrice)),1)]),_:1}),e(o,{label:"\u4F63\u91D1",align:"center",prop:"integral"},{default:t(a=>[s(m(l(k)(a.row.integral)),1)]),_:1}),e(o,{label:"\u786E\u6536\u4F63\u91D1",align:"center",prop:"receivedIntegral"},{default:t(a=>[s(m(l(k)(a.row.receivedIntegral)),1)]),_:1}),e(o,{label:"\u9000\u6B3E\u4F63\u91D1",align:"center",prop:"refundIntegral"},{default:t(a=>[s(m(l(k)(a.row.refundIntegral)),1)]),_:1}),e(o,{label:"\u8BA2\u5355\u6570",align:"center",prop:"orderCount"}),r.merchantId?W("",!0):(c(),_(o,{key:0,label:"\u5546\u6237\u540D",align:"center",prop:"merchantName"})),e(o,{label:"\u5E97\u94FA\u540D",align:"center",prop:"shopName"}),e(o,{label:"\u8D26\u5355\u65E5\u671F",align:"center",prop:"orderCalcTime"}),e(o,{label:"\u64CD\u4F5C",align:"center"},{default:t(a=>[x((c(),_(y,{type:"success",plain:"",size:"small",onClick:I=>(async(oa,v)=>{oa.stopPropagation();try{await Y.exportConfirm(),f.value=!0;const sa=await h.exportDailyBillByRow({shopId:v.shopId,orderCalcTime:v.orderCalcTime,merchantId:v.merchantId,payStatus:1}),da=v.shopName+Ya(v.createTime,"YYYY-MM-DD")+"\u8D26\u5355.xls";A.excel(sa,da)}catch{}finally{f.value=!1}})(I,a.row)},{default:t(()=>[s(" \u5BFC\u51FA ")]),_:2},1032,["onClick"])),[[q,["distri:daily-bill:export"]]])]),_:1})]),_:1},8,["data"])),[[ia,l(b)]]),e(ta,{total:l(U),page:l(i).pageNo,"onUpdate:page":d[2]||(d[2]=a=>l(i).pageNo=a),limit:l(i).pageSize,"onUpdate:limit":d[3]||(d[3]=a=>l(i).pageSize=a),onPagination:g},null,8,["total","page","limit"])]),_:1}),e(Ua,{ref_key:"formRef",ref:O,onSuccess:g},null,512)],64)}}}),[["__scopeId","data-v-9da777dd"]]),E=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"}))});export{h as D,Qa as __tla,P as d,E as i};