diff --git a/.env.development b/.env.development index 23c6711..8a2f4db 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ VITE_NOW_TYPE = 'dist' -# VITE_PUSH_URL = 'ws://192.168.1.22:8787' -# VITE_BASE_URL = 'http://192.168.1.22:8546' +VITE_PUSH_URL = 'ws://192.168.1.22:8787' +VITE_BASE_URL = 'http://192.168.1.22:8546' -VITE_PUSH_URL ='wss://erp.lihaink.cn/pull' -VITE_BASE_URL = 'https://erp.lihaink.cn' \ No newline at end of file +# VITE_PUSH_URL ='wss://erp.lihaink.cn/pull' +# VITE_BASE_URL = 'https://erp.lihaink.cn' \ No newline at end of file diff --git a/build/assets/index-iWHpo5iP.js b/build/assets/index-B8kkKC-V.js similarity index 98% rename from build/assets/index-iWHpo5iP.js rename to build/assets/index-B8kkKC-V.js index 11f2f17..bbcedad 100644 --- a/build/assets/index-iWHpo5iP.js +++ b/build/assets/index-B8kkKC-V.js @@ -1 +1 @@ -import{_ as O,u as W,r as t,o as Y,m as D,a as q,b as g,s as L,c as u,h as m,e,f as o,w as f,g as C,v as T,z as I,F as Q,i as j,y as G,t as d,A as S,V as H,B as R,C as N,d as J,Q as X,P as Z,W as ee,U as te}from"./index-BhwfcSvx.js";import"./moment-Cl4UOzQZ.js";import{p as oe}from"./padding-dm0HkGpn.js";const M=p=>(R("data-v-fa3e0699"),p=p(),N(),p),se={class:"my-order"},le={class:"header-nav"},ae=M(()=>e("div",{class:"nav-item"},d("采购订单"),-1)),ie={class:"nav-item-btn"},ne={class:"header-input"},de={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},_e=["onClick"],ce={class:"top"},re={class:"sn"},ue={class:"create-time"},ve={class:"shop"},me={class:"left"},fe={class:"right"},pe={class:"money"},he=M(()=>e("div",{class:"bottom"},null,-1)),ge={key:0,class:"load-end"},be={key:1,class:"load-end"},ye={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:0}},emits:["addAddress"],setup(p,{expose:A,emit:r}){W(),t([]);const l=t(1);t(null);const s=t(""),c=()=>{i.value.start_time=s.value[0]+" 00:00:00",i.value.end_time=s.value[1]+" 23:59:59",$(!0)},k=z=>z.getTime()>Date.now(),i=t({page_no:1,page_size:20,number:"",start_time:"",end_time:""}),a=t(!1),n=t(0),b=t(0),h=t(!1),v=t([]),$=(z=!1)=>{if(z)i.value.page_no=1;else if(h.value||a.value)return;a.value=!0,l.value==1&&(i.value.paid=null),l.value==2&&(i.value.paid=0),H(i.value).then(_=>{z?v.value=_.data.lists:v.value=[...v.value,..._.data.lists],_.data.lists.length{h.value=!0,a.value=!1})},y=(z,_)=>{b.value=_,D.emit("set-c-order-detail",z)};return A({getOrderList:$}),Y(()=>{D.on("update-c-order-detail",z=>{v.value[b.value].paid=1})}),q(()=>{D.off("update-c-order-detail")}),(z,_)=>{const F=g("el-date-picker"),x=g("el-button"),E=g("el-input"),K=L("loading"),P=L("infinite-scroll");return u(),m("div",se,[e("div",le,[ae,e("div",ie,[o(F,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=V=>s.value=V),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY-MM-DD","disabled-date":k,onChange:c},null,8,["modelValue"])])]),e("div",ne,[o(E,{modelValue:i.value.number,"onUpdate:modelValue":_[2]||(_[2]=V=>i.value.number=V),placeholder:"请输入订单编号",onKeydown:_[3]||(_[3]=T(V=>$(!0),["enter"])),onClear:_[4]||(_[4]=V=>$(!0)),clearable:""},{append:f(()=>[o(x,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:_[1]||(_[1]=V=>$(!0))},{default:f(()=>[C("搜索")]),_:1})]),_:1},8,["modelValue"])]),I((u(),m("div",de,[(u(!0),m(Q,null,j(v.value,(V,B)=>(u(),m("div",{class:G(["item",{"item-active":b.value==B}]),key:B,onClick:Mt=>y(V,B)},[e("div",ce,[e("div",re,"单号: "+d(V.number),1),e("div",ue,d(V.create_time),1)]),e("div",ve,[e("div",me,[e("div",null,"订单数量 x "+d(V.order_count),1)]),e("div",fe,[e("div",pe,"¥"+d(V.total),1)])]),he],10,_e))),128)),h.value?(u(),m("div",ge,"没有更多了")):S("",!0),a.value?(u(),m("div",be,"加载中...")):S("",!0)])),[[K,a.value],[P,$]])])}}},$e=O(ye,[["__scopeId","data-v-fa3e0699"]]),w=p=>(R("data-v-928e3cd0"),p=p(),N(),p),we=w(()=>e("h4",{style:{padding:"0",margin:"0",color:"#000"}},"订单详情",-1)),Ve={class:"dra-body"},ke={class:"detail"},ze={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ce={class:"table-info"},Ae={class:"info-item"},xe=w(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),De={class:"info-item-info"},Le={class:"info-item"},Ue=w(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Se={class:"info-item-info"},Ie={class:"info-item"},Fe=w(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Be={class:"info-item-info"},Oe={class:"info-item"},Re=w(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ne={class:"info-item-info"},We={class:"info-item"},Ye=w(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),qe={class:"info-item-info"},Me={class:"info-item"},Ee=w(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),Ke={class:"info-item-info"},Pe={class:"info-item"},Te=w(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),Qe={class:"info-item-info"},je={class:"info-item"},Ge=w(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),He={class:"info-item-info"},Je={key:0},Xe={key:1},Ze={key:2},et=w(()=>e("div",{class:"table-title"},"收货人信息",-1)),tt={key:0,class:"table-info",style:{"flex-direction":"column"}},ot={class:"info-item"},st=w(()=>e("div",{class:"info-item-title"},"收货人:",-1)),lt={class:"info-item-info"},at={class:"info-item"},it=w(()=>e("div",{class:"info-item-title"},"联系方式:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},_t=w(()=>e("div",{class:"info-item-title"},"收货地址:",-1)),ct={class:"info-item-info"},rt={key:1,class:"addAddress"},ut={style:{"font-size":"0.9rem"}},vt={style:{color:"#ff4a00"}},mt={style:{display:"flex","align-items":"center"}},ft={style:{"margin-left":"0.5rem"}},pt={__name:"sub",setup(p,{expose:A}){const r=t(!1),l=t({id:""});t([]),t(null);const s=t(!1),c=t({page_no:1,page_size:15,loadend:!1,loading:!1}),k=t([]),i=()=>{console.log("触底"),l.value.id&&!c.value.loadend&&(console.log("加载"),c.value.loading=!0,X({pid:l.value.id,page_no:c.value.page_no,page_size:c.value.page_size}).then(n=>{l.value.goods_count=n.data.count,k.value=[...k.value,...n.data.lists],n.data.lists.length{l.value=n,c.value.page_no=1,c.value.loadend=!1,c.value.loading=!1,k.value=[],i()}}),(n,b)=>{const h=g("el-button"),v=g("el-table-column"),$=g("el-image"),y=g("el-table"),z=g("el-drawer"),_=L("loading"),F=L("infinite-scroll");return u(),J(z,{size:"64rem",modelValue:r.value,"onUpdate:modelValue":b[1]||(b[1]=x=>r.value=x),direction:"rtl"},{header:f(()=>[we]),default:f(()=>[e("div",Ve,[I((u(),m("div",ke,[I((u(),m("div",ze,[e("div",Ce,[e("div",Ae,[xe,e("div",De,d(l.value.number),1)]),e("div",Le,[Ue,e("div",Se,d(l.value.goods_count),1)]),e("div",Ie,[Fe,e("div",Be,"¥"+d(l.value.total),1)]),e("div",Oe,[Re,e("div",Ne,d(l.value.create_time),1)]),e("div",We,[Ye,e("div",qe," ¥"+d(l.value.deduction_price),1)]),e("div",Me,[Ee,e("div",Ke,"¥"+d(l.value.actual),1)]),e("div",Pe,[Te,e("div",Qe,d(l.value.update_time),1)]),e("div",je,[Ge,e("div",He,[l.value.pay_type==9?(u(),m("span",Je,"微信收款")):S("",!0),l.value.pay_type==3?(u(),m("span",Xe,"余额支付")):S("",!0),l.value.pay_type==1?(u(),m("span",Ze,"微信支付")):S("",!0)])])]),et,l.value.user_phone?(u(),m("div",tt,[e("div",ot,[st,e("div",lt,d(l.value.real_name),1)]),e("div",at,[it,e("div",nt,d(l.value.user_phone),1)]),e("div",dt,[_t,e("div",ct,d(l.value.user_address),1)])])):(u(),m("div",rt,[o(h,{type:"primary",onClick:b[0]||(b[0]=x=>n.addAddress(l.value)),size:"large"},{default:f(()=>[C("点击添加收货地址")]),_:1})])),e("div",ut,[C(" 共计 "),e("span",vt,d(l.value.goods_count),1),C(" 款商品 ")]),o(y,{data:k.value},{default:f(()=>[o(v,{type:"index",width:"60",label:"序号"}),o(v,{label:"商品信息"},{default:f(({row:x})=>[e("div",mt,[o($,{style:{height:"3rem",width:"3rem"},src:x.imgs},null,8,["src"]),e("span",ft,d(x.goods_name),1)])]),_:1}),o(v,{prop:"price",label:"单价",width:"150"}),o(v,{prop:"nums",label:"数量",width:"150"}),o(v,{prop:"total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[_,s.value],[F,i]])])),[[_,s.value]])])]),_:1},8,["modelValue"])}}},ht=O(pt,[["__scopeId","data-v-928e3cd0"]]),U=p=>(R("data-v-7bc9887f"),p=p(),N(),p),gt={class:"my-order"},bt={class:"detail"},yt={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},$t=U(()=>e("div",{class:"table-title"},"订单信息",-1)),wt={class:"table-info"},Vt={class:"info-item"},kt=U(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),zt={class:"info-item-info"},Ct={class:"info-item"},At=U(()=>e("div",{class:"info-item-title"},"订单数量:",-1)),xt={class:"info-item-info"},Dt={class:"info-item"},Lt=U(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ut={class:"info-item-info"},St={class:"info-item"},It=U(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ft={class:"info-item-info"},Bt={style:{"font-size":"0.9rem"}},Ot={style:{color:"#ff4a00"}},Rt=U(()=>e("span",{style:{color:"#777"}}," ( 点击订单查看订单详情 )",-1)),Nt={__name:"detail",emits:["addAddress"],setup(p,{emit:A}){W(),Z();const r=t({id:""});t([]),t(null);const l=t(!1);t(0),t(0),t(["商品信息","订单详情"]),t(""),t(!1);const s=t({page_no:1,page_size:15,loadend:!1,loading:!1}),c=t([]),k=()=>{console.log("触底"),r.value.id&&!s.value.loadend&&(console.log("加载"),s.value.loading=!0,ee({id:r.value.id,page_no:s.value.page_no,page_size:s.value.page_size}).then(n=>{c.value=[...c.value,...n.data.lists],n.data.lists.length{console.log(n),a.value.drawer=!0,a.value.setForm(n)},a=t(null);return Y(()=>{D.on("set-c-order-detail",n=>{r.value=n,s.value.page_no=1,s.value.loadend=!1,s.value.loading=!1,c.value=[],k()})}),q(()=>{D.off("set-c-order-detail")}),(n,b)=>{const h=g("el-table-column"),v=g("el-table"),$=L("loading"),y=L("infinite-scroll");return u(),m("div",gt,[I((u(),m("div",bt,[I((u(),m("div",yt,[$t,e("div",wt,[e("div",Vt,[kt,e("div",zt,d(r.value.number),1)]),e("div",Ct,[At,e("div",xt,d(r.value.order_count),1)]),e("div",Dt,[Lt,e("div",Ut,"¥"+d(r.value.total),1)]),e("div",St,[It,e("div",Ft,d(r.value.create_time),1)])]),e("div",Bt,[C(" 共计 "),e("span",Ot,d(r.value.order_count),1),C("个订单 "),Rt]),o(v,{data:c.value,style:{cursor:"pointer"},onCellClick:i},{default:f(()=>[o(h,{type:"index",width:"60",label:"序号"}),o(h,{prop:"number",label:"订单号",width:"200"}),o(h,{prop:"real_name",label:"收货人",width:"150"}),o(h,{prop:"user_phone",label:"联系方式",width:"150"}),o(h,{prop:"user_address",label:"收货地址"}),o(h,{prop:"update_time",label:"下单时间",width:"200"})]),_:1},8,["data"])])),[[$,l.value],[y,k]])])),[[$,l.value]]),o(ht,{ref_key:"subRef",ref:a},null,512)])}}},Wt=O(Nt,[["__scopeId","data-v-7bc9887f"]]),Yt={class:"my-card"},qt={class:"dialog-footer"},Tt={__name:"index",setup(p){const A=t(null),r=t(!1),l=i=>{i.id!=s.value.order_id?s.value={real_name:"",phone:"",detail:"",order_id:i.id}:s.value.order_id=i.id,r.value=!0},s=t({real_name:"",phone:"",detail:"",order_id:""}),c=t({real_name:[{required:!0,message:"请输入姓名",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],detail:[{required:!0,message:"请输入地址",trigger:"blur"}]}),k=()=>{te(s.value).then(i=>{var a;r.value=!1,(a=A.value)==null||a.getOrderList(!0)})};return(i,a)=>{const n=g("el-input"),b=g("el-form-item"),h=g("el-form"),v=g("el-button"),$=g("el-dialog");return u(),m("div",Yt,[o($e,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:A,onAddAddress:l},null,512),o(oe),o(Wt,{ref:"detailRef",onAddAddress:l},null,512),o($,{modelValue:r.value,"onUpdate:modelValue":a[4]||(a[4]=y=>r.value=y),title:"添加地址",width:"500"},{footer:f(()=>[e("div",qt,[o(v,{onClick:a[3]||(a[3]=y=>r.value=!1)},{default:f(()=>[C("取消")]),_:1}),o(v,{type:"primary",onClick:k},{default:f(()=>[C(" 确认 ")]),_:1})])]),default:f(()=>[o(h,{model:s.value,"label-width":"100",rules:c.value},{default:f(()=>[o(b,{label:"收货人","label-width":i.formLabelWidth,prop:"real_name"},{default:f(()=>[o(n,{modelValue:s.value.real_name,"onUpdate:modelValue":a[0]||(a[0]=y=>s.value.real_name=y),autocomplete:"off",placeholder:"请输入收货人"},null,8,["modelValue"])]),_:1},8,["label-width"]),o(b,{label:"电话","label-width":i.formLabelWidth,prop:"phone"},{default:f(()=>[o(n,{modelValue:s.value.phone,"onUpdate:modelValue":a[1]||(a[1]=y=>s.value.phone=y),type:"number",placeholder:"请输入电话"},null,8,["modelValue"])]),_:1},8,["label-width"]),o(b,{label:"地址","label-width":i.formLabelWidth,prop:"detail"},{default:f(()=>[o(n,{modelValue:s.value.detail,"onUpdate:modelValue":a[2]||(a[2]=y=>s.value.detail=y),placeholder:"请输入地址"},null,8,["modelValue"])]),_:1},8,["label-width"])]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}};export{Tt as default}; +import{_ as O,u as W,r as t,o as Y,m as D,a as q,b as g,s as L,c as u,h as m,e,f as o,w as f,g as C,v as T,z as I,F as Q,i as j,y as G,t as d,A as S,V as H,B as R,C as N,d as J,Q as X,P as Z,W as ee,U as te}from"./index-BpHEZm7m.js";import"./moment-Cl4UOzQZ.js";import{p as oe}from"./padding-Dv3RYtNt.js";const M=p=>(R("data-v-fa3e0699"),p=p(),N(),p),se={class:"my-order"},le={class:"header-nav"},ae=M(()=>e("div",{class:"nav-item"},d("采购订单"),-1)),ie={class:"nav-item-btn"},ne={class:"header-input"},de={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},_e=["onClick"],ce={class:"top"},re={class:"sn"},ue={class:"create-time"},ve={class:"shop"},me={class:"left"},fe={class:"right"},pe={class:"money"},he=M(()=>e("div",{class:"bottom"},null,-1)),ge={key:0,class:"load-end"},be={key:1,class:"load-end"},ye={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:0}},emits:["addAddress"],setup(p,{expose:A,emit:r}){W(),t([]);const l=t(1);t(null);const s=t(""),c=()=>{i.value.start_time=s.value[0]+" 00:00:00",i.value.end_time=s.value[1]+" 23:59:59",$(!0)},k=z=>z.getTime()>Date.now(),i=t({page_no:1,page_size:20,number:"",start_time:"",end_time:""}),a=t(!1),n=t(0),b=t(0),h=t(!1),v=t([]),$=(z=!1)=>{if(z)i.value.page_no=1;else if(h.value||a.value)return;a.value=!0,l.value==1&&(i.value.paid=null),l.value==2&&(i.value.paid=0),H(i.value).then(_=>{z?v.value=_.data.lists:v.value=[...v.value,..._.data.lists],_.data.lists.length{h.value=!0,a.value=!1})},y=(z,_)=>{b.value=_,D.emit("set-c-order-detail",z)};return A({getOrderList:$}),Y(()=>{D.on("update-c-order-detail",z=>{v.value[b.value].paid=1})}),q(()=>{D.off("update-c-order-detail")}),(z,_)=>{const F=g("el-date-picker"),x=g("el-button"),E=g("el-input"),K=L("loading"),P=L("infinite-scroll");return u(),m("div",se,[e("div",le,[ae,e("div",ie,[o(F,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=V=>s.value=V),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY-MM-DD","disabled-date":k,onChange:c},null,8,["modelValue"])])]),e("div",ne,[o(E,{modelValue:i.value.number,"onUpdate:modelValue":_[2]||(_[2]=V=>i.value.number=V),placeholder:"请输入订单编号",onKeydown:_[3]||(_[3]=T(V=>$(!0),["enter"])),onClear:_[4]||(_[4]=V=>$(!0)),clearable:""},{append:f(()=>[o(x,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:_[1]||(_[1]=V=>$(!0))},{default:f(()=>[C("搜索")]),_:1})]),_:1},8,["modelValue"])]),I((u(),m("div",de,[(u(!0),m(Q,null,j(v.value,(V,B)=>(u(),m("div",{class:G(["item",{"item-active":b.value==B}]),key:B,onClick:Mt=>y(V,B)},[e("div",ce,[e("div",re,"单号: "+d(V.number),1),e("div",ue,d(V.create_time),1)]),e("div",ve,[e("div",me,[e("div",null,"订单数量 x "+d(V.order_count),1)]),e("div",fe,[e("div",pe,"¥"+d(V.total),1)])]),he],10,_e))),128)),h.value?(u(),m("div",ge,"没有更多了")):S("",!0),a.value?(u(),m("div",be,"加载中...")):S("",!0)])),[[K,a.value],[P,$]])])}}},$e=O(ye,[["__scopeId","data-v-fa3e0699"]]),w=p=>(R("data-v-928e3cd0"),p=p(),N(),p),we=w(()=>e("h4",{style:{padding:"0",margin:"0",color:"#000"}},"订单详情",-1)),Ve={class:"dra-body"},ke={class:"detail"},ze={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ce={class:"table-info"},Ae={class:"info-item"},xe=w(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),De={class:"info-item-info"},Le={class:"info-item"},Ue=w(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Se={class:"info-item-info"},Ie={class:"info-item"},Fe=w(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Be={class:"info-item-info"},Oe={class:"info-item"},Re=w(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ne={class:"info-item-info"},We={class:"info-item"},Ye=w(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),qe={class:"info-item-info"},Me={class:"info-item"},Ee=w(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),Ke={class:"info-item-info"},Pe={class:"info-item"},Te=w(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),Qe={class:"info-item-info"},je={class:"info-item"},Ge=w(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),He={class:"info-item-info"},Je={key:0},Xe={key:1},Ze={key:2},et=w(()=>e("div",{class:"table-title"},"收货人信息",-1)),tt={key:0,class:"table-info",style:{"flex-direction":"column"}},ot={class:"info-item"},st=w(()=>e("div",{class:"info-item-title"},"收货人:",-1)),lt={class:"info-item-info"},at={class:"info-item"},it=w(()=>e("div",{class:"info-item-title"},"联系方式:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},_t=w(()=>e("div",{class:"info-item-title"},"收货地址:",-1)),ct={class:"info-item-info"},rt={key:1,class:"addAddress"},ut={style:{"font-size":"0.9rem"}},vt={style:{color:"#ff4a00"}},mt={style:{display:"flex","align-items":"center"}},ft={style:{"margin-left":"0.5rem"}},pt={__name:"sub",setup(p,{expose:A}){const r=t(!1),l=t({id:""});t([]),t(null);const s=t(!1),c=t({page_no:1,page_size:15,loadend:!1,loading:!1}),k=t([]),i=()=>{console.log("触底"),l.value.id&&!c.value.loadend&&(console.log("加载"),c.value.loading=!0,X({pid:l.value.id,page_no:c.value.page_no,page_size:c.value.page_size}).then(n=>{l.value.goods_count=n.data.count,k.value=[...k.value,...n.data.lists],n.data.lists.length{l.value=n,c.value.page_no=1,c.value.loadend=!1,c.value.loading=!1,k.value=[],i()}}),(n,b)=>{const h=g("el-button"),v=g("el-table-column"),$=g("el-image"),y=g("el-table"),z=g("el-drawer"),_=L("loading"),F=L("infinite-scroll");return u(),J(z,{size:"64rem",modelValue:r.value,"onUpdate:modelValue":b[1]||(b[1]=x=>r.value=x),direction:"rtl"},{header:f(()=>[we]),default:f(()=>[e("div",Ve,[I((u(),m("div",ke,[I((u(),m("div",ze,[e("div",Ce,[e("div",Ae,[xe,e("div",De,d(l.value.number),1)]),e("div",Le,[Ue,e("div",Se,d(l.value.goods_count),1)]),e("div",Ie,[Fe,e("div",Be,"¥"+d(l.value.total),1)]),e("div",Oe,[Re,e("div",Ne,d(l.value.create_time),1)]),e("div",We,[Ye,e("div",qe," ¥"+d(l.value.deduction_price),1)]),e("div",Me,[Ee,e("div",Ke,"¥"+d(l.value.actual),1)]),e("div",Pe,[Te,e("div",Qe,d(l.value.update_time),1)]),e("div",je,[Ge,e("div",He,[l.value.pay_type==9?(u(),m("span",Je,"微信收款")):S("",!0),l.value.pay_type==3?(u(),m("span",Xe,"余额支付")):S("",!0),l.value.pay_type==1?(u(),m("span",Ze,"微信支付")):S("",!0)])])]),et,l.value.user_phone?(u(),m("div",tt,[e("div",ot,[st,e("div",lt,d(l.value.real_name),1)]),e("div",at,[it,e("div",nt,d(l.value.user_phone),1)]),e("div",dt,[_t,e("div",ct,d(l.value.user_address),1)])])):(u(),m("div",rt,[o(h,{type:"primary",onClick:b[0]||(b[0]=x=>n.addAddress(l.value)),size:"large"},{default:f(()=>[C("点击添加收货地址")]),_:1})])),e("div",ut,[C(" 共计 "),e("span",vt,d(l.value.goods_count),1),C(" 款商品 ")]),o(y,{data:k.value},{default:f(()=>[o(v,{type:"index",width:"60",label:"序号"}),o(v,{label:"商品信息"},{default:f(({row:x})=>[e("div",mt,[o($,{style:{height:"3rem",width:"3rem"},src:x.imgs},null,8,["src"]),e("span",ft,d(x.goods_name),1)])]),_:1}),o(v,{prop:"price",label:"单价",width:"150"}),o(v,{prop:"nums",label:"数量",width:"150"}),o(v,{prop:"total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[_,s.value],[F,i]])])),[[_,s.value]])])]),_:1},8,["modelValue"])}}},ht=O(pt,[["__scopeId","data-v-928e3cd0"]]),U=p=>(R("data-v-7bc9887f"),p=p(),N(),p),gt={class:"my-order"},bt={class:"detail"},yt={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},$t=U(()=>e("div",{class:"table-title"},"订单信息",-1)),wt={class:"table-info"},Vt={class:"info-item"},kt=U(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),zt={class:"info-item-info"},Ct={class:"info-item"},At=U(()=>e("div",{class:"info-item-title"},"订单数量:",-1)),xt={class:"info-item-info"},Dt={class:"info-item"},Lt=U(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ut={class:"info-item-info"},St={class:"info-item"},It=U(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ft={class:"info-item-info"},Bt={style:{"font-size":"0.9rem"}},Ot={style:{color:"#ff4a00"}},Rt=U(()=>e("span",{style:{color:"#777"}}," ( 点击订单查看订单详情 )",-1)),Nt={__name:"detail",emits:["addAddress"],setup(p,{emit:A}){W(),Z();const r=t({id:""});t([]),t(null);const l=t(!1);t(0),t(0),t(["商品信息","订单详情"]),t(""),t(!1);const s=t({page_no:1,page_size:15,loadend:!1,loading:!1}),c=t([]),k=()=>{console.log("触底"),r.value.id&&!s.value.loadend&&(console.log("加载"),s.value.loading=!0,ee({id:r.value.id,page_no:s.value.page_no,page_size:s.value.page_size}).then(n=>{c.value=[...c.value,...n.data.lists],n.data.lists.length{console.log(n),a.value.drawer=!0,a.value.setForm(n)},a=t(null);return Y(()=>{D.on("set-c-order-detail",n=>{r.value=n,s.value.page_no=1,s.value.loadend=!1,s.value.loading=!1,c.value=[],k()})}),q(()=>{D.off("set-c-order-detail")}),(n,b)=>{const h=g("el-table-column"),v=g("el-table"),$=L("loading"),y=L("infinite-scroll");return u(),m("div",gt,[I((u(),m("div",bt,[I((u(),m("div",yt,[$t,e("div",wt,[e("div",Vt,[kt,e("div",zt,d(r.value.number),1)]),e("div",Ct,[At,e("div",xt,d(r.value.order_count),1)]),e("div",Dt,[Lt,e("div",Ut,"¥"+d(r.value.total),1)]),e("div",St,[It,e("div",Ft,d(r.value.create_time),1)])]),e("div",Bt,[C(" 共计 "),e("span",Ot,d(r.value.order_count),1),C("个订单 "),Rt]),o(v,{data:c.value,style:{cursor:"pointer"},onCellClick:i},{default:f(()=>[o(h,{type:"index",width:"60",label:"序号"}),o(h,{prop:"number",label:"订单号",width:"200"}),o(h,{prop:"real_name",label:"收货人",width:"150"}),o(h,{prop:"user_phone",label:"联系方式",width:"150"}),o(h,{prop:"user_address",label:"收货地址"}),o(h,{prop:"update_time",label:"下单时间",width:"200"})]),_:1},8,["data"])])),[[$,l.value],[y,k]])])),[[$,l.value]]),o(ht,{ref_key:"subRef",ref:a},null,512)])}}},Wt=O(Nt,[["__scopeId","data-v-7bc9887f"]]),Yt={class:"my-card"},qt={class:"dialog-footer"},Tt={__name:"index",setup(p){const A=t(null),r=t(!1),l=i=>{i.id!=s.value.order_id?s.value={real_name:"",phone:"",detail:"",order_id:i.id}:s.value.order_id=i.id,r.value=!0},s=t({real_name:"",phone:"",detail:"",order_id:""}),c=t({real_name:[{required:!0,message:"请输入姓名",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],detail:[{required:!0,message:"请输入地址",trigger:"blur"}]}),k=()=>{te(s.value).then(i=>{var a;r.value=!1,(a=A.value)==null||a.getOrderList(!0)})};return(i,a)=>{const n=g("el-input"),b=g("el-form-item"),h=g("el-form"),v=g("el-button"),$=g("el-dialog");return u(),m("div",Yt,[o($e,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:A,onAddAddress:l},null,512),o(oe),o(Wt,{ref:"detailRef",onAddAddress:l},null,512),o($,{modelValue:r.value,"onUpdate:modelValue":a[4]||(a[4]=y=>r.value=y),title:"添加地址",width:"500"},{footer:f(()=>[e("div",qt,[o(v,{onClick:a[3]||(a[3]=y=>r.value=!1)},{default:f(()=>[C("取消")]),_:1}),o(v,{type:"primary",onClick:k},{default:f(()=>[C(" 确认 ")]),_:1})])]),default:f(()=>[o(h,{model:s.value,"label-width":"100",rules:c.value},{default:f(()=>[o(b,{label:"收货人","label-width":i.formLabelWidth,prop:"real_name"},{default:f(()=>[o(n,{modelValue:s.value.real_name,"onUpdate:modelValue":a[0]||(a[0]=y=>s.value.real_name=y),autocomplete:"off",placeholder:"请输入收货人"},null,8,["modelValue"])]),_:1},8,["label-width"]),o(b,{label:"电话","label-width":i.formLabelWidth,prop:"phone"},{default:f(()=>[o(n,{modelValue:s.value.phone,"onUpdate:modelValue":a[1]||(a[1]=y=>s.value.phone=y),type:"number",placeholder:"请输入电话"},null,8,["modelValue"])]),_:1},8,["label-width"]),o(b,{label:"地址","label-width":i.formLabelWidth,prop:"detail"},{default:f(()=>[o(n,{modelValue:s.value.detail,"onUpdate:modelValue":a[2]||(a[2]=y=>s.value.detail=y),placeholder:"请输入地址"},null,8,["modelValue"])]),_:1},8,["label-width"])]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}};export{Tt as default}; diff --git a/build/assets/index-y3YnOtXt.js b/build/assets/index-BSxnEJg_.js similarity index 96% rename from build/assets/index-y3YnOtXt.js rename to build/assets/index-BSxnEJg_.js index 5c70c51..231a808 100644 --- a/build/assets/index-y3YnOtXt.js +++ b/build/assets/index-BSxnEJg_.js @@ -1 +1 @@ -import{_ as B,u as R,r as k,b as m,c as s,h as p,e as t,t as v,g as _,F as T,i as E,y as J,f as l,w as d,E as Y,m as D,B as j,C as W,o as q,a as G,s as L,d as b,A as w,z as N}from"./index-BhwfcSvx.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-CtlTM3LR.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-dm0HkGpn.js";const z=y=>(j("data-v-e01d9d71"),y=y(),W(),y),ee={class:"my-order"},ae={class:"header-nav"},te=z(()=>t("div",{class:"nav-item"},v("提现"),-1)),le={class:"nav-body"},ne={class:"my-money"},oe=z(()=>t("div",null,"我的余额:",-1)),se={style:{"text-align":"center",color:"#2ec479"}},ie={class:"my-count"},de={class:"count"},_e={class:"money"},re={style:{color:"#ff4a00"}},ue={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ce=["onClick"],ve={style:{color:"#1890ff"}},me={class:"own"},pe=z(()=>t("div",{style:{height:"8.2rem"}},null,-1)),fe={class:"order-footer"},he={class:"input-btn"},ge={class:"order-btn"},be={__name:"order",setup(y){R();const e=k({balance:0,count:0,total:0}),h=k([]),r=()=>{H().then(o=>{o.data.bank_list.forEach(i=>{i.is_check&&(a.value.merchant_bank_id=i.id)}),a.value.merchant_bank_id||(a.value.merchant_bank_id=o.data.bank_list[0].id),h.value=o.data.bank_list,e.value.balance=o.data.balance}),K().then(o=>{e.value=Object.assign(e.value,o.data)})};r();const a=k({merchant_bank_id:"",amount:""}),f=o=>{a.value.merchant_bank_id=o.id},$=()=>{if(a.value.amount=Math.floor(a.value.amount*100)/100,+a.value.amount<=0)return a.value.amount="",Y.error("提现金额必须大于0");if(+a.value.amount>+e.value.balance)return a.value.amount=e.value.balance,Y.error("提现金额不能大于余额");P(a.value).then(o=>{a.value.amount="",Y.success("提现成功,等待管理员审核"),D.emit("get-taking-lists"),r()})};return(o,i)=>{const g=m("el-input"),V=m("el-button");return s(),p("div",ee,[t("div",ae,[te,t("div",le,[t("div",ne,[oe,t("div",se,[t("span",null,v(e.value.balance),1),_("元 ")])]),t("div",ie,[t("div",de,[_("提现次数: "),t("span",null,v(e.value.count),1),_("次")]),t("div",_e,[_("累计提现到账: "),t("span",re,v(e.value.total),1),_("元")])])])]),t("div",ue,[(s(!0),p(T,null,E(h.value,(u,x)=>(s(),p("div",{class:J(["item",{"item-active":a.value.merchant_bank_id==u.id}]),key:x,onClick:c=>f(u)},[t("div",null,[_(" 提现至 "),t("span",ve,v(u.bank_name)+"("+v(u.bank_code.slice(-4))+")",1),t("span",me,v(u.is_own==1?"对公":"个人"),1)])],10,ce))),128))]),pe,t("div",fe,[t("div",he,[l(g,{modelValue:a.value.amount,"onUpdate:modelValue":i[0]||(i[0]=u=>a.value.amount=u),placeholder:"请输入提现金额",type:"number"},null,8,["modelValue"]),l(V,{class:"btn",type:"primary",onClick:i[1]||(i[1]=u=>a.value.amount=e.value.balance)},{default:d(()=>[_("全部")]),_:1})]),t("div",ge,[l(V,{class:"btn",type:"primary",onClick:$,disabled:e.value.balance<=0||h.value.length==0},{default:d(()=>[_("立即提现")]),_:1},8,["disabled"])])])])}}},ye=B(be,[["__scopeId","data-v-e01d9d71"]]),ke={class:"my-order"},we={class:"date"},Ve={class:"detail"},Ce={key:0,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ye={key:0},$e={key:1},xe={key:1,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},De={__name:"detail",setup(y){const e=k({page_no:1,page_size:15,loadend:!1,loading:!1,create_time:"",start_time:""}),h=()=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()},r=k(1),a=k([]),f=()=>{if(console.log("触底",!e.value.loadend,!e.value.loading),!e.value.loadend&&!e.value.loading&&(console.log("加载"),e.value.loading=!0,r.value==1&&Q({page_no:e.value.page_no,page_size:e.value.page_size,create_time:e.value.create_time}).then(o=>{a.value=[...a.value,...o.data.lists],o.data.lists.length=e.value.start_time[1])return e.value.loading=!1,Y.error("开始时间不能大于等于结束时间");let o=e.value.start_time[0]?U(e.value.start_time[0]).format("YYYY-MM-DD"):"",i=e.value.start_time[1]?U(e.value.start_time[1]).format("YYYY-MM-DD"):"";X({page_no:e.value.page_no,page_size:e.value.page_size,start_time:o,end_time:i}).then(g=>{a.value=[...a.value,...g.data.lists],g.data.lists.length{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()};return q(()=>{D.on("get-taking-lists",o=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()})}),G(()=>{D.off("get-taking-lists")}),(o,i)=>{const g=m("el-date-picker"),V=m("el-button"),u=m("el-radio-button"),x=m("el-radio-group"),c=m("el-table-column"),O=m("el-image"),C=m("el-tag"),M=m("el-table"),A=L("loading"),I=L("infinite-scroll");return s(),p("div",ke,[t("div",we,[t("div",null,[r.value==1?(s(),b(g,{key:0,modelValue:e.value.create_time,"onUpdate:modelValue":i[0]||(i[0]=n=>e.value.create_time=n),type:"month",placeholder:"请选择月份",onChange:h},null,8,["modelValue"])):w("",!0),r.value==2?(s(),b(g,{key:1,modelValue:e.value.start_time,"onUpdate:modelValue":i[1]||(i[1]=n=>e.value.start_time=n),type:"daterange",placeholder:"请选择日期",onChange:h,format:"YYYY-MM-DD"},null,8,["modelValue"])):w("",!0),l(V,{type:"primary",style:{"margin-left":"1rem"}},{default:d(()=>[_("重置")]),_:1})]),l(x,{modelValue:r.value,"onUpdate:modelValue":i[2]||(i[2]=n=>r.value=n),onChange:$},{default:d(()=>[l(u,{label:"提现记录",value:1}),l(u,{label:"余额明细",value:2})]),_:1},8,["modelValue"])]),t("div",Ve,[r.value==1?N((s(),p("div",Ce,[l(M,{data:a.value},{default:d(()=>[l(c,{prop:"merchant_bank_info.is_own",label:"账户类型",width:"100"},{default:d(({row:n})=>[t("div",null,v(n.merchant_bank_info.is_own?"对公账户":"个人账户"),1)]),_:1}),l(c,{prop:"price",label:"银行卡"},{default:d(({row:n})=>[t("div",null,v(n.merchant_bank_info.bank_info.name)+" ("+v(n.merchant_bank_info.bank_code.slice(-4))+") ",1)]),_:1}),l(c,{prop:"amount",label:"提现金额",width:"150"}),l(c,{label:"备注/凭证",width:"200"},{default:d(({row:n})=>[n.arrival_proof?(s(),p("div",Ye,[(s(!0),p(T,null,E(JSON.parse(n.arrival_proof),(F,S)=>(s(),b(O,{style:{width:"3rem",height:"3rem","margin-right":"0.2rem"},key:S,src:F,"preview-src-list":JSON.parse(n.arrival_proof),"initial-index":S},null,8,["src","preview-src-list","initial-index"]))),128))])):(s(),p("div",$e,v(n.fail_msg),1))]),_:1}),l(c,{label:"提现状态",width:"100"},{default:d(({row:n})=>[n.arrival_proof?(s(),b(C,{key:0,type:"success"},{default:d(()=>[_("已到账")]),_:1})):n.is_check==1?(s(),b(C,{key:1,type:"primary"},{default:d(()=>[_("待转账")]),_:1})):n.is_check==0?(s(),b(C,{key:2,type:"info"},{default:d(()=>[_("待审核")]),_:1})):n.is_check==2?(s(),b(C,{key:3,type:"danger"},{default:d(()=>[_("提现失败")]),_:1})):w("",!0)]),_:1}),l(c,{prop:"create_time",label:"提现时间",width:"200"})]),_:1},8,["data"])])),[[A,e.value.loading],[I,f]]):w("",!0),r.value==2?N((s(),p("div",xe,[l(M,{data:a.value},{default:d(()=>[l(c,{prop:"number_sn",label:"订单号",width:"250"}),l(c,{prop:"number",label:"变动金额",width:"180"}),l(c,{prop:"financial_type",label:"变动类型",width:"180"}),l(c,{prop:"create_time",label:"时间"})]),_:1},8,["data"])])),[[A,e.value.loading],[I,f]]):w("",!0)])])}}},ze=B(De,[["__scopeId","data-v-129102fe"]]),Me={class:"my-card"},Ne={__name:"index",setup(y){return(e,h)=>(s(),p("div",Me,[l(ye,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(Z),l(ze,{ref:"detailRef"},null,512)]))}};export{Ne as default}; +import{_ as B,u as R,r as k,b as m,c as s,h as p,e as t,t as v,g as _,F as T,i as E,y as J,f as l,w as d,E as Y,m as D,B as j,C as W,o as q,a as G,s as L,d as b,A as w,z as N}from"./index-BpHEZm7m.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-29VIPZnM.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-Dv3RYtNt.js";const z=y=>(j("data-v-e01d9d71"),y=y(),W(),y),ee={class:"my-order"},ae={class:"header-nav"},te=z(()=>t("div",{class:"nav-item"},v("提现"),-1)),le={class:"nav-body"},ne={class:"my-money"},oe=z(()=>t("div",null,"我的余额:",-1)),se={style:{"text-align":"center",color:"#2ec479"}},ie={class:"my-count"},de={class:"count"},_e={class:"money"},re={style:{color:"#ff4a00"}},ue={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ce=["onClick"],ve={style:{color:"#1890ff"}},me={class:"own"},pe=z(()=>t("div",{style:{height:"8.2rem"}},null,-1)),fe={class:"order-footer"},he={class:"input-btn"},ge={class:"order-btn"},be={__name:"order",setup(y){R();const e=k({balance:0,count:0,total:0}),h=k([]),r=()=>{H().then(o=>{o.data.bank_list.forEach(i=>{i.is_check&&(a.value.merchant_bank_id=i.id)}),a.value.merchant_bank_id||(a.value.merchant_bank_id=o.data.bank_list[0].id),h.value=o.data.bank_list,e.value.balance=o.data.balance}),K().then(o=>{e.value=Object.assign(e.value,o.data)})};r();const a=k({merchant_bank_id:"",amount:""}),f=o=>{a.value.merchant_bank_id=o.id},$=()=>{if(a.value.amount=Math.floor(a.value.amount*100)/100,+a.value.amount<=0)return a.value.amount="",Y.error("提现金额必须大于0");if(+a.value.amount>+e.value.balance)return a.value.amount=e.value.balance,Y.error("提现金额不能大于余额");P(a.value).then(o=>{a.value.amount="",Y.success("提现成功,等待管理员审核"),D.emit("get-taking-lists"),r()})};return(o,i)=>{const g=m("el-input"),V=m("el-button");return s(),p("div",ee,[t("div",ae,[te,t("div",le,[t("div",ne,[oe,t("div",se,[t("span",null,v(e.value.balance),1),_("元 ")])]),t("div",ie,[t("div",de,[_("提现次数: "),t("span",null,v(e.value.count),1),_("次")]),t("div",_e,[_("累计提现到账: "),t("span",re,v(e.value.total),1),_("元")])])])]),t("div",ue,[(s(!0),p(T,null,E(h.value,(u,x)=>(s(),p("div",{class:J(["item",{"item-active":a.value.merchant_bank_id==u.id}]),key:x,onClick:c=>f(u)},[t("div",null,[_(" 提现至 "),t("span",ve,v(u.bank_name)+"("+v(u.bank_code.slice(-4))+")",1),t("span",me,v(u.is_own==1?"对公":"个人"),1)])],10,ce))),128))]),pe,t("div",fe,[t("div",he,[l(g,{modelValue:a.value.amount,"onUpdate:modelValue":i[0]||(i[0]=u=>a.value.amount=u),placeholder:"请输入提现金额",type:"number"},null,8,["modelValue"]),l(V,{class:"btn",type:"primary",onClick:i[1]||(i[1]=u=>a.value.amount=e.value.balance)},{default:d(()=>[_("全部")]),_:1})]),t("div",ge,[l(V,{class:"btn",type:"primary",onClick:$,disabled:e.value.balance<=0||h.value.length==0},{default:d(()=>[_("立即提现")]),_:1},8,["disabled"])])])])}}},ye=B(be,[["__scopeId","data-v-e01d9d71"]]),ke={class:"my-order"},we={class:"date"},Ve={class:"detail"},Ce={key:0,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ye={key:0},$e={key:1},xe={key:1,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},De={__name:"detail",setup(y){const e=k({page_no:1,page_size:15,loadend:!1,loading:!1,create_time:"",start_time:""}),h=()=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()},r=k(1),a=k([]),f=()=>{if(console.log("触底",!e.value.loadend,!e.value.loading),!e.value.loadend&&!e.value.loading&&(console.log("加载"),e.value.loading=!0,r.value==1&&Q({page_no:e.value.page_no,page_size:e.value.page_size,create_time:e.value.create_time}).then(o=>{a.value=[...a.value,...o.data.lists],o.data.lists.length=e.value.start_time[1])return e.value.loading=!1,Y.error("开始时间不能大于等于结束时间");let o=e.value.start_time[0]?U(e.value.start_time[0]).format("YYYY-MM-DD"):"",i=e.value.start_time[1]?U(e.value.start_time[1]).format("YYYY-MM-DD"):"";X({page_no:e.value.page_no,page_size:e.value.page_size,start_time:o,end_time:i}).then(g=>{a.value=[...a.value,...g.data.lists],g.data.lists.length{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()};return q(()=>{D.on("get-taking-lists",o=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()})}),G(()=>{D.off("get-taking-lists")}),(o,i)=>{const g=m("el-date-picker"),V=m("el-button"),u=m("el-radio-button"),x=m("el-radio-group"),c=m("el-table-column"),O=m("el-image"),C=m("el-tag"),M=m("el-table"),A=L("loading"),I=L("infinite-scroll");return s(),p("div",ke,[t("div",we,[t("div",null,[r.value==1?(s(),b(g,{key:0,modelValue:e.value.create_time,"onUpdate:modelValue":i[0]||(i[0]=n=>e.value.create_time=n),type:"month",placeholder:"请选择月份",onChange:h},null,8,["modelValue"])):w("",!0),r.value==2?(s(),b(g,{key:1,modelValue:e.value.start_time,"onUpdate:modelValue":i[1]||(i[1]=n=>e.value.start_time=n),type:"daterange",placeholder:"请选择日期",onChange:h,format:"YYYY-MM-DD"},null,8,["modelValue"])):w("",!0),l(V,{type:"primary",style:{"margin-left":"1rem"}},{default:d(()=>[_("重置")]),_:1})]),l(x,{modelValue:r.value,"onUpdate:modelValue":i[2]||(i[2]=n=>r.value=n),onChange:$},{default:d(()=>[l(u,{label:"提现记录",value:1}),l(u,{label:"余额明细",value:2})]),_:1},8,["modelValue"])]),t("div",Ve,[r.value==1?N((s(),p("div",Ce,[l(M,{data:a.value},{default:d(()=>[l(c,{prop:"merchant_bank_info.is_own",label:"账户类型",width:"100"},{default:d(({row:n})=>[t("div",null,v(n.merchant_bank_info.is_own?"对公账户":"个人账户"),1)]),_:1}),l(c,{prop:"price",label:"银行卡"},{default:d(({row:n})=>[t("div",null,v(n.merchant_bank_info.bank_info.name)+" ("+v(n.merchant_bank_info.bank_code.slice(-4))+") ",1)]),_:1}),l(c,{prop:"amount",label:"提现金额",width:"150"}),l(c,{label:"备注/凭证",width:"200"},{default:d(({row:n})=>[n.arrival_proof?(s(),p("div",Ye,[(s(!0),p(T,null,E(JSON.parse(n.arrival_proof),(F,S)=>(s(),b(O,{style:{width:"3rem",height:"3rem","margin-right":"0.2rem"},key:S,src:F,"preview-src-list":JSON.parse(n.arrival_proof),"initial-index":S},null,8,["src","preview-src-list","initial-index"]))),128))])):(s(),p("div",$e,v(n.fail_msg),1))]),_:1}),l(c,{label:"提现状态",width:"100"},{default:d(({row:n})=>[n.arrival_proof?(s(),b(C,{key:0,type:"success"},{default:d(()=>[_("已到账")]),_:1})):n.is_check==1?(s(),b(C,{key:1,type:"primary"},{default:d(()=>[_("待转账")]),_:1})):n.is_check==0?(s(),b(C,{key:2,type:"info"},{default:d(()=>[_("待审核")]),_:1})):n.is_check==2?(s(),b(C,{key:3,type:"danger"},{default:d(()=>[_("提现失败")]),_:1})):w("",!0)]),_:1}),l(c,{prop:"create_time",label:"提现时间",width:"200"})]),_:1},8,["data"])])),[[A,e.value.loading],[I,f]]):w("",!0),r.value==2?N((s(),p("div",xe,[l(M,{data:a.value},{default:d(()=>[l(c,{prop:"number_sn",label:"订单号",width:"250"}),l(c,{prop:"number",label:"变动金额",width:"180"}),l(c,{prop:"financial_type",label:"变动类型",width:"180"}),l(c,{prop:"create_time",label:"时间"})]),_:1},8,["data"])])),[[A,e.value.loading],[I,f]]):w("",!0)])])}}},ze=B(De,[["__scopeId","data-v-129102fe"]]),Me={class:"my-card"},Ne={__name:"index",setup(y){return(e,h)=>(s(),p("div",Me,[l(ye,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(Z),l(ze,{ref:"detailRef"},null,512)]))}};export{Ne as default}; diff --git a/build/assets/index-CktcNDDK.js b/build/assets/index-BYmmAKvH.js similarity index 96% rename from build/assets/index-CktcNDDK.js rename to build/assets/index-BYmmAKvH.js index 4437269..5a1d762 100644 --- a/build/assets/index-CktcNDDK.js +++ b/build/assets/index-BYmmAKvH.js @@ -1 +1 @@ -import{D as U,_ as I,u as R,r as u,o as S,b as a,c as b,h as B,e as w,f as e,w as t,v,g as C,B as L,C as E,P as K,E as d}from"./index-BhwfcSvx.js";function N(l){return U.post("/login/account",l)}const M=l=>(L("data-v-4397c91e"),l=l(),E(),l),T={class:"body"},q={class:"login"},D=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),P={__name:"index",setup(l){const p=R(),h=K(),y=u(null),_=u(null),n=u({account:"",password:"",terminal:3,scene:1}),i=()=>{if(!n.value.account)return d({message:"请填写账号",type:"error"});if(!n.value.password)return d({message:"请填写密码",type:"error"});N(n.value).then(s=>{var o;if((o=s.data)!=null&&o.token){if(!s.data.merchant||!s.data.merchant.service_phone)return d.error("请先完善商户信息");p.setToken(s.data.token),p.setUserInfo(s.data),h.push("/")}}).catch(s=>{})};return S(()=>{}),(s,o)=>{const k=a("User"),f=a("el-icon"),m=a("el-input"),c=a("el-form-item"),g=a("Lock"),x=a("el-button"),V=a("el-form");return b(),B("div",T,[w("div",q,[D,e(V,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:y,modelValue:n.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>n.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:n.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>n.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(x,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[C("登录")]),_:1})]),_:1})]),_:1})])])}}},j=I(P,[["__scopeId","data-v-4397c91e"]]);export{j as default}; +import{D as U,_ as I,u as R,r as u,o as S,b as a,c as b,h as B,e as w,f as e,w as t,v,g as C,B as L,C as E,P as K,E as d}from"./index-BpHEZm7m.js";function N(l){return U.post("/login/account",l)}const M=l=>(L("data-v-4397c91e"),l=l(),E(),l),T={class:"body"},q={class:"login"},D=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),P={__name:"index",setup(l){const p=R(),h=K(),y=u(null),_=u(null),n=u({account:"",password:"",terminal:3,scene:1}),i=()=>{if(!n.value.account)return d({message:"请填写账号",type:"error"});if(!n.value.password)return d({message:"请填写密码",type:"error"});N(n.value).then(s=>{var o;if((o=s.data)!=null&&o.token){if(!s.data.merchant||!s.data.merchant.service_phone)return d.error("请先完善商户信息");p.setToken(s.data.token),p.setUserInfo(s.data),h.push("/")}}).catch(s=>{})};return S(()=>{}),(s,o)=>{const k=a("User"),f=a("el-icon"),m=a("el-input"),c=a("el-form-item"),g=a("Lock"),x=a("el-button"),V=a("el-form");return b(),B("div",T,[w("div",q,[D,e(V,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:y,modelValue:n.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>n.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:n.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>n.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(x,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[C("登录")]),_:1})]),_:1})]),_:1})])])}}},j=I(P,[["__scopeId","data-v-4397c91e"]]);export{j as default}; diff --git a/build/assets/index-BhwfcSvx.js b/build/assets/index-BpHEZm7m.js similarity index 99% rename from build/assets/index-BhwfcSvx.js rename to build/assets/index-BpHEZm7m.js index f86416d..651f256 100644 --- a/build/assets/index-BhwfcSvx.js +++ b/build/assets/index-BpHEZm7m.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-DOUgTo5g.js","./padding-dm0HkGpn.js","./moment-Cl4UOzQZ.js","./index-BFjUtgpE.css","./pay-CbwNLFlp.css","./index-BnBeULNb.js","./index-mjUDQaM6.css","./index-5yTa6--L.js","./index-CeRCa_xK.css","./index-iWHpo5iP.js","./index-DYRS7XRS.css","./indexCount-BcXKZ5Q7.js","./merchant-CtlTM3LR.js","./indexCount-quL7L4Zi.css","./index-y3YnOtXt.js","./index-eI32Y_bf.css","./test-BD_tZfDb.js","./test-CmC8-tN2.css","./index-CktcNDDK.js","./index-hEtpVxhF.css"] + __vite__mapDeps.viteFileDeps = ["./index-lUdLNBZu.js","./padding-Dv3RYtNt.js","./moment-Cl4UOzQZ.js","./index-DZ4o8U_J.css","./pay-CbwNLFlp.css","./index-CsE-2pl6.js","./index-mjUDQaM6.css","./index-CbwoHAUG.js","./index-CeRCa_xK.css","./index-B8kkKC-V.js","./index-DYRS7XRS.css","./indexCount-DeHuVrzY.js","./merchant-29VIPZnM.js","./indexCount-quL7L4Zi.css","./index-BSxnEJg_.js","./index-eI32Y_bf.css","./test-CVdMUgg0.js","./test-CmC8-tN2.css","./index-BYmmAKvH.js","./index-hEtpVxhF.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -94,4 +94,4 @@ function __vite__mapDeps(indexes) { `,n+=ms(" ")+` `,n+=x4()+`欢迎下次光临! `,n+=Yce(" ")+` -`,n+=Xce(),n},wv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Li=e=>(Lw("data-v-c52222cf"),e=e(),Vw(),e),Qce={class:"my-card"},ede={class:"card-header"},tde={style:{width:"4.5rem"}},nde=Li(()=>k("div",{class:"card-title"},"泸优采收银系统",-1)),ode={style:{"margin-left":"1rem",display:"flex","flex-direction":"column","justify-content":"center",cursor:"pointer"}},rde={class:"card-body"},ade={style:{"margin-right":"1rem"}},lde=Li(()=>k("span",null,"打印自检",-1)),sde={key:0,style:{"margin-right":"1rem"}},ide=Li(()=>k("span",null,"点击自动连接打印机",-1)),ude=Li(()=>k("div",null,"已连接打印机T58",-1)),cde={style:{"font-size":"0.7rem",color:"#ccc"}},dde=Li(()=>k("span",null,"打印机已连接,是否重新连接",-1)),fde={class:"dialog-footer"},pde={class:"el-dropdown-link"},vde={class:"info"},hde={__name:"myHeader",setup(e){const t=_d(),n=Wce(),o=L({});o.value=t.userInfo;const r=hb(),a=()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")},l=()=>{window.location.reload()},s=L(!1),u=()=>{console.log("连接打印机"),uni.getEnv(p=>{p.h5?Io.error("请使用APP连接打印机"):(n.setConnect(!1),n.setPrintAddress(""),s.value=!1,uni.postMessage({data:{type:"connect"}}))})};let c=!1;const f=(p="")=>{console.log("预打印"),console.log($4(p,!0)),!c&&(c=!0,uni.getEnv(h=>{h.h5?(Io.error("请使用APP打印小票"),c=!1):(d(p),setTimeout(()=>{c=!1},4e3))}))},d=(p="")=>{let h="";p===""?(h=$4({},!0),console.log(h)):h=p,uni.postMessage({data:{type:"print",content:h}})};return et(()=>{tn.on("printReceipt",f),window.addEventListener("message",function(p){if(p.data.type==="connect"){let h=p.data.data.address;n.setConnect(!0),n.setPrintAddress(h),Io.success("已连接打印机T58("+h+")")}},!1)}),ko(()=>{tn.off("printReceipt",f)}),(p,h)=>{const m=Ze("el-image"),v=Ze("Refresh"),_=Ze("el-icon"),g=Ze("el-button"),C=Ze("el-dialog"),y=Ze("el-avatar"),w=Ze("arrow-down"),E=Ze("el-dropdown-item"),x=Ze("el-dropdown-menu"),A=Ze("el-dropdown");return b(),M("div",Qce,[k("div",ede,[k("div",tde,[j(m,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),nde,k("div",ode,[j(_,{color:"#fff",size:"18",onClick:l},{default:X(()=>[j(v)]),_:1})])]),k("div",rde,[k("div",ade,[j(g,{onClick:h[0]||(h[0]=$=>i(tn).emit("printReceipt")),type:"primary"},{default:X(()=>[lde]),_:1})]),!i(n).is_connect||!i(n).printAddress?(b(),M("div",sde,[j(g,{onClick:u,type:"warning"},{default:X(()=>[ide]),_:1})])):(b(),M("div",{key:1,style:{"margin-right":"1rem","font-size":"0.9rem"},onClick:h[1]||(h[1]=$=>s.value=!0)},[ude,k("div",cde,"("+$e(i(n).printAddress)+")",1)])),j(C,{modelValue:s.value,"onUpdate:modelValue":h[3]||(h[3]=$=>s.value=$),title:"提示",width:"500"},{footer:X(()=>[k("div",fde,[j(g,{onClick:h[2]||(h[2]=$=>s.value=!1)},{default:X(()=>[mt("取消")]),_:1}),j(g,{type:"primary",onClick:u},{default:X(()=>[mt(" 重新连接 ")]),_:1})])]),default:X(()=>[dde]),_:1},8,["modelValue"]),j(A,{trigger:"hover"},{dropdown:X(()=>[j(x,null,{default:X(()=>[j(E,{onClick:a},{default:X(()=>[mt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",pde,[j(y,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",vde,[k("div",null,$e(o.value.merchant.mer_name),1),k("div",null,$e(o.value.merchant.service_phone),1)]),j(_,{class:"el-icon--right"},{default:X(()=>[j(w)]),_:1})])]),_:1})])])}}},mde=wv(hde,[["__scopeId","data-v-c52222cf"]]),gde=vv("order",()=>{const e=L(localStorage.getItem("orderCount")||0);return{orderCount:e,setOrderCount:n=>{e.value=n,localStorage.setItem("orderCount",n)}}});function Lde(e){return bn.post("/order/cart/create",e)}function Vde(e){return bn.get("/order/cart/list",{params:e})}function Bde(e){return bn.post("/order/RetailOrder/checkOrder",e)}function zde(e){return bn.post("/order/cart/delete",e)}function Hde(e){return bn.post("/order/RetailOrder/createOrder",e)}function Dde(e,t){return bn.post(`order/pay/${e}`,t)}function Fde(e){return bn.get("micropay_query",{params:e})}function Kde(e){return bn.get("/order/retailOrder/merchant_order_list",{params:e})}function jde(e){return bn.get("/order/retailOrder/order_list",{params:e})}function Wde(e){return bn.post("/order/OpurchaseOrder/createOrder",{params:e})}function qde(e){return bn.get("/order/cashierinfo/lists",{params:e})}function Ude(e){return bn.post("/user/address/merchant_create",e)}function Gde(e){return bn.get("/order/OpurchaseOrder/lists",{params:e})}function Yde(e){return bn.get("/order/OpurchaseOrder/sub_orders",{params:e})}function T4(e){return bn.get("/order/retailOrder/merchant_order_count",{params:e})}const yde={class:"my-card"},_de=["onClick"],bde={key:0,class:"badge"},wde={__name:"myAside",setup(e){const t=hb(),n=_ue(),o=gde(),r=(d=1)=>{o.setOrderCount(d),u.value.forEach(p=>{p.name=="order"&&(p.count=d)})};let a=!1;const l=d=>{if(T4().then(h=>{var m;r(((m=h==null?void 0:h.data)==null?void 0:m.order_count)||0)}),Io.success("您有新的订单"),!a){var p=new Audio("/src/assets/order.mp3");p.play(),a=!0,p.addEventListener("ended",function(){a=!1})}},s=d=>{t.push({name:d})},u=L([{name:"saleHome",title:"收银",ico:"Sell",count:0},{name:"saleOrder",title:"收银订单",ico:"DataLine",count:0},{name:"order",title:"摊贩订单",ico:"DataAnalysis",count:+o.orderCount},{name:"purchaseOrder",title:"采购订单",ico:"Van",count:0},{name:"orderCount",title:"订单统计",ico:"DocumentRemove",count:0},{name:"wallet",title:"余额提现",ico:"Wallet",count:0}]),c=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==0&&(d=u.value.length),d>0&&s(u.value[d-1].name)},f=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==u.value.length-1&&(d=-1),d{tn.on("up",c),tn.on("down",f),tn.on("new_order",l),tn.on("set-order-count-zero",()=>{r(0)}),T4().then(d=>{var p;r(((p=d==null?void 0:d.data)==null?void 0:p.order_count)||0)})}),ko(()=>{tn.off("aup",c),tn.off("adown",f),tn.off("new_order",l),tn.on("set-order-count-zero")}),(d,p)=>{const h=Ze("el-icon");return b(),M("div",yde,[(b(!0),M(Fe,null,ht(u.value,m=>(b(),M("div",{key:m.name,class:T(["list-item",{active:i(n).name==m.name}]),onClick:v=>s(m.name)},[j(h,{size:"2rem"},{default:X(()=>[(b(),le(st(m.ico)))]),_:2},1024),k("div",null,$e(m.title),1),m.count?(b(),M("div",bde,$e(m.count),1)):ne("",!0)],10,_de))),128))])}}},Cde=wv(wde,[["__scopeId","data-v-d6402e2a"]]),$o=function e(t){this.doNotConnect=0,t=t||{},t.heartbeat=t.heartbeat||25e3,t.pingTimeout=t.pingTimeout||1e4,this.config=t,this.uid=0,this.channels={},this.connection=null,this.pingTimeoutTimer=0,e.instances.push(this),this.createConnection()};$o.prototype.checkoutPing=function(){var e=this;e.checkoutPingTimer&&clearTimeout(e.checkoutPingTimer),e.checkoutPingTimer=setTimeout(function(){e.checkoutPingTimer=0,e.connection.state==="connected"&&(e.connection.send('{"event":"pusher:ping","data":{}}'),e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),e.pingTimeoutTimer=setTimeout(function(){e.connection.closeAndClean(),e.connection.doNotConnect||e.connection.waitReconnect()},e.config.pingTimeout))},this.config.heartbeat)};$o.prototype.channel=function(e){return this.channels.find(e)};$o.prototype.allChannels=function(){return this.channels.all()};$o.prototype.createConnection=function(){if(this.connection)throw Error("Connection already exist");var e=this,t=this.config.url;function n(){for(var o in e.channels)e.channels[o].subscribed=!1}this.connection=new el({url:t,app_key:this.config.app_key,onOpen:function(){e.connection.state="connecting",e.checkoutPing()},onMessage:function(o){e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),o=JSON.parse(o.data);var r=o.event,a=o.channel;if(r==="pusher:pong"){e.checkoutPing();return}if(r==="pusher:error")throw Error(o.data.message);var l=JSON.parse(o.data),s;if(r==="pusher_internal:subscription_succeeded"){s=e.channels[a],s.subscribed=!0,s.processQueue(),s.emit("pusher:subscription_succeeded");return}if(r==="pusher:connection_established"&&(e.connection.socket_id=l.socket_id,e.connection.updateNetworkState("connected"),e.subscribeAll()),r.indexOf("pusher_internal")!==-1){console.log("Event '"+r+"' not implement");return}s=e.channels[a],s&&s.emit(r,l)},onClose:function(){n()},onError:function(){n()}})};$o.prototype.disconnect=function(){this.connection.doNotConnect=1,this.connection.close()};$o.prototype.subscribeAll=function(){if(this.connection.state==="connected")for(var e in this.channels)this.channels[e].processSubscribe()};$o.prototype.unsubscribe=function(e){this.channels[e]&&(delete this.channels[e],this.connection.state==="connected"&&this.connection.send(JSON.stringify({event:"pusher:unsubscribe",data:{channel:e}})))};$o.prototype.unsubscribeAll=function(){var e=Object.keys(this.channels);if(e.length&&this.connection.state==="connected")for(var t in this.channels)this.unsubscribe(t);this.channels={}};$o.prototype.subscribe=function(e){return this.channels[e]?this.channels[e]:e.indexOf("private-")===0?Fb(e,this):e.indexOf("presence-")===0?kde(e,this):Sde(e,this)};$o.instances=[];function Sde(e,t){var n=new Vi(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){t.connection.send(JSON.stringify({event:"pusher:subscribe",data:{channel:e}}))},n.processSubscribe(),n}function Fb(e,t){var n=new Vi(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){xde({url:t.config.auth,type:"POST",data:{channel_name:e,socket_id:t.connection.socket_id},success:function(o){o=JSON.parse(o),o.channel=e,t.connection.send(JSON.stringify({event:"pusher:subscribe",data:o}))},error:function(o){throw Error(o)}})},n.processSubscribe(),n}function kde(e,t){return Fb(e,t)}function el(e){this.dispatcher=new jb,Kb(this,this.dispatcher);var t=["on","off","emit"];for(var n in t)this[t[n]]=this.dispatcher[t[n]];this.options=e,this.state="initialized",this.doNotConnect=0,this.reconnectInterval=1,this.connection=null,this.reconnectTimer=0,this.connect()}el.prototype.updateNetworkState=function(e){var t=this.state;this.state=e,t!==e&&this.emit("state_change",{previous:t,current:e})};el.prototype.connect=function(){if(this.doNotConnect=0,this.state==="connected"){console.log('networkState is "'+this.state+'" and do not need connect');return}this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=0),this.closeAndClean();var e=this.options,t=new WebSocket(e.url+"/app/"+e.app_key);this.updateNetworkState("connecting");var n=this;t.onopen=function(o){if(n.reconnectInterval=1,n.doNotConnect){n.updateNetworkState("disconnected"),t.close();return}e.onOpen&&e.onOpen(o)},e.onMessage&&(t.onmessage=e.onMessage),t.onclose=function(o){t.onmessage=t.onopen=t.onclose=t.onerror=null,n.updateNetworkState("disconnected"),n.doNotConnect||n.waitReconnect(),e.onClose&&e.onClose(o)},t.onerror=function(o){n.close(),n.doNotConnect||n.waitReconnect(),e.onError&&e.onError(o)},this.connection=t};el.prototype.closeAndClean=function(){if(this.connection){var e=this.connection;e.onmessage=e.onopen=e.onclose=e.onerror=null;try{e.close()}catch{}this.updateNetworkState("disconnected")}};el.prototype.waitReconnect=function(){if(!(this.state==="connected"||this.state==="connecting")&&!this.doNotConnect){this.updateNetworkState("connecting");var e=this;this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout(function(){e.connect()},this.reconnectInterval),this.reconnectInterval<1e3?this.reconnectInterval=1e3:this.reconnectInterval=this.reconnectInterval*2,this.reconnectInterval>2e3&&navigator.onLine&&(e.reconnectInterval=2e3)}};el.prototype.send=function(e){if(this.state!=="connected"){console.trace('networkState is "'+this.state+'", can not send '+e);return}this.connection.send(e)};el.prototype.close=function(){this.updateNetworkState("disconnected"),this.connection.close()};var Kb=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)};function Vi(e,t){this.subscribed=!1,this.dispatcher=new jb,this.connection=e,this.channelName=t,this.subscribeCb=null,this.queue=[],Kb(this,this.dispatcher);var n=["on","off","emit"];for(var o in n)this[n[o]]=this.dispatcher[n[o]]}Vi.prototype.processSubscribe=function(){this.connection.state==="connected"&&this.subscribeCb()};Vi.prototype.processQueue=function(){if(!(this.connection.state!=="connected"||!this.subscribed)){for(var e in this.queue)this.queue[e]();this.queue=[]}};Vi.prototype.trigger=function(e,t){if(e.indexOf("client-")!==0)throw new Error("Event '"+e+"' should start with 'client-'");var n=this;this.queue.push(function(){n.connection.send(JSON.stringify({event:e,data:t,channel:n.channelName}))}),this.processQueue()};var pu=function(){var e={};function t(y){for(var w=[],E=1;E0)for(o=0;o=200&&n<300?e.success&&e.success(t.responseText,t.responseXML):e.error&&e.error(n)}},e.type==="GET"?(t.open("GET",e.url+"?"+params,!0),t.send(null)):e.type==="POST"&&(t.open("POST",e.url,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(params))}function Mde(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}const $de={class:"common-layout"},Tde={__name:"index",setup(e){const t=_d(),o=new $o({url:"wss://erp.lihaink.cn/pull",app_key:"2ce3ce22329517213caa7dad261f5695"}).subscribe(`store_merchant_${t.userInfo.merchant.mer_id}`);o.on("message",function(a){var l,s,u,c,f;console.log("收到消息--",a);try{((l=a==null?void 0:a.content)==null?void 0:l.type)=="cash_register"&&((s=a==null?void 0:a.content)==null?void 0:s.msg)=="您有一笔订单已支付"&&tn.emit("pay_success",(u=a==null?void 0:a.content)==null?void 0:u.data),((c=a==null?void 0:a.content)==null?void 0:c.type)=="store_merchant"&&((f=a==null?void 0:a.content)==null?void 0:f.msg)=="您有一笔新的订单"&&tn.emit("new_order",a==null?void 0:a.content)}catch{}}),o.on("close",function(){});const r=a=>{console.log("按下",a.keyCode),a.keyCode==16&&tn.emit("shift"),a.keyCode==120&&tn.emit("F9"),a.keyCode==13&&tn.emit("enter"),a.keyCode==37&&tn.emit("left"),a.keyCode==39&&tn.emit("right"),a.keyCode==38&&tn.emit("up"),a.keyCode==40&&tn.emit("down"),a.keyCode==46&&tn.emit("delete"),a.keyCode==45&&tn.emit("insert")};return et(()=>{window.addEventListener("keydown",r),console.log("开启键盘监听")}),ko(()=>{window.removeEventListener("keydown",r),console.log("关闭键盘监听")}),(a,l)=>{const s=Ze("el-header"),u=Ze("el-aside"),c=Ze("router-view"),f=Ze("el-main"),d=Ze("el-container");return b(),M("div",$de,[j(d,null,{default:X(()=>[j(s,null,{default:X(()=>[j(mde)]),_:1}),j(d,null,{default:X(()=>[j(u,{width:"6.25rem"},{default:X(()=>[j(Cde)]),_:1}),j(f,{style:{color:"#333"}},{default:X(()=>[j(c,{class:"my-main"},{default:X(({Component:p})=>[j(nn,{name:"el-zoom-in-top"},{default:X(()=>[(b(),le(st(p)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Ode=wv(Tde,[["__scopeId","data-v-62514d1e"]]),Ade=[{path:"/",name:"layout",component:Ode,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>Qo(()=>import("./index-DOUgTo5g.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"采购订单"},component:()=>Qo(()=>import("./index-BnBeULNb.js"),__vite__mapDeps([5,1,6,4]),import.meta.url)},{path:"/order",name:"order",meta:{title:"待提采购"},component:()=>Qo(()=>import("./index-5yTa6--L.js"),__vite__mapDeps([7,2,1,8,4]),import.meta.url)},{path:"/purchaseOrder",name:"purchaseOrder",meta:{title:"采购订单"},component:()=>Qo(()=>import("./index-iWHpo5iP.js"),__vite__mapDeps([9,2,1,10]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>Qo(()=>import("./indexCount-BcXKZ5Q7.js"),__vite__mapDeps([11,12,13]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>Qo(()=>import("./index-y3YnOtXt.js"),__vite__mapDeps([14,12,2,1,15]),import.meta.url)},{path:"/test",name:"test",component:()=>Qo(()=>import("./test-BD_tZfDb.js"),__vite__mapDeps([16,17]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Qo(()=>import("./index-CktcNDDK.js"),__vite__mapDeps([18,19]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Qo(()=>import("./index-3vfsZl43.js"),__vite__mapDeps([]),import.meta.url)}],Wb=gue({history:qie(),routes:Ade});Wb.beforeEach((e,t,n)=>{const o=_d();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const qb=Wb,Bi=Fg(m9);for(const[e,t]of Object.entries(WL))Bi.component(e,t);const Nde=wue();Bi.use(qb);Bi.use(Nde);Bi.use(die,{locale:fie});Bi.mount("#app");export{ne as A,Lw as B,Vw as C,bn as D,Io as E,Fe as F,cr as G,S as H,Hde as I,Dde as J,Fde as K,_ue as L,$4 as M,Bde as N,jde as O,hb as P,qde as Q,Ye as R,Kde as S,Wde as T,Ude as U,Gde as V,Yde as W,wv as _,ko as a,Ze as b,b as c,le as d,k as e,j as f,mt as g,M as h,ht as i,zde as j,Vde as k,Lde as l,tn as m,je as n,et as o,kr as p,Er as q,L as r,Rc as s,$e as t,_d as u,Mt as v,X as w,i as x,T as y,tt as z}; +`,n+=Xce(),n},wv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Li=e=>(Lw("data-v-c52222cf"),e=e(),Vw(),e),Qce={class:"my-card"},ede={class:"card-header"},tde={style:{width:"4.5rem"}},nde=Li(()=>k("div",{class:"card-title"},"泸优采收银系统",-1)),ode={style:{"margin-left":"1rem",display:"flex","flex-direction":"column","justify-content":"center",cursor:"pointer"}},rde={class:"card-body"},ade={style:{"margin-right":"1rem"}},lde=Li(()=>k("span",null,"打印自检",-1)),sde={key:0,style:{"margin-right":"1rem"}},ide=Li(()=>k("span",null,"点击自动连接打印机",-1)),ude=Li(()=>k("div",null,"已连接打印机T58",-1)),cde={style:{"font-size":"0.7rem",color:"#ccc"}},dde=Li(()=>k("span",null,"打印机已连接,是否重新连接",-1)),fde={class:"dialog-footer"},pde={class:"el-dropdown-link"},vde={class:"info"},hde={__name:"myHeader",setup(e){const t=_d(),n=Wce(),o=L({});o.value=t.userInfo;const r=hb(),a=()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")},l=()=>{window.location.reload()},s=L(!1),u=()=>{console.log("连接打印机"),uni.getEnv(p=>{p.h5?Io.error("请使用APP连接打印机"):(n.setConnect(!1),n.setPrintAddress(""),s.value=!1,uni.postMessage({data:{type:"connect"}}))})};let c=!1;const f=(p="")=>{console.log("预打印"),console.log($4(p,!0)),!c&&(c=!0,uni.getEnv(h=>{h.h5?(Io.error("请使用APP打印小票"),c=!1):(d(p),setTimeout(()=>{c=!1},4e3))}))},d=(p="")=>{let h="";p===""?(h=$4({},!0),console.log(h)):h=p,uni.postMessage({data:{type:"print",content:h}})};return et(()=>{tn.on("printReceipt",f),window.addEventListener("message",function(p){if(p.data.type==="connect"){let h=p.data.data.address;n.setConnect(!0),n.setPrintAddress(h),Io.success("已连接打印机T58("+h+")")}},!1)}),ko(()=>{tn.off("printReceipt",f)}),(p,h)=>{const m=Ze("el-image"),v=Ze("Refresh"),_=Ze("el-icon"),g=Ze("el-button"),C=Ze("el-dialog"),y=Ze("el-avatar"),w=Ze("arrow-down"),E=Ze("el-dropdown-item"),x=Ze("el-dropdown-menu"),A=Ze("el-dropdown");return b(),M("div",Qce,[k("div",ede,[k("div",tde,[j(m,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),nde,k("div",ode,[j(_,{color:"#fff",size:"18",onClick:l},{default:X(()=>[j(v)]),_:1})])]),k("div",rde,[k("div",ade,[j(g,{onClick:h[0]||(h[0]=$=>i(tn).emit("printReceipt")),type:"primary"},{default:X(()=>[lde]),_:1})]),!i(n).is_connect||!i(n).printAddress?(b(),M("div",sde,[j(g,{onClick:u,type:"warning"},{default:X(()=>[ide]),_:1})])):(b(),M("div",{key:1,style:{"margin-right":"1rem","font-size":"0.9rem"},onClick:h[1]||(h[1]=$=>s.value=!0)},[ude,k("div",cde,"("+$e(i(n).printAddress)+")",1)])),j(C,{modelValue:s.value,"onUpdate:modelValue":h[3]||(h[3]=$=>s.value=$),title:"提示",width:"500"},{footer:X(()=>[k("div",fde,[j(g,{onClick:h[2]||(h[2]=$=>s.value=!1)},{default:X(()=>[mt("取消")]),_:1}),j(g,{type:"primary",onClick:u},{default:X(()=>[mt(" 重新连接 ")]),_:1})])]),default:X(()=>[dde]),_:1},8,["modelValue"]),j(A,{trigger:"hover"},{dropdown:X(()=>[j(x,null,{default:X(()=>[j(E,{onClick:a},{default:X(()=>[mt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",pde,[j(y,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",vde,[k("div",null,$e(o.value.merchant.mer_name),1),k("div",null,$e(o.value.merchant.service_phone),1)]),j(_,{class:"el-icon--right"},{default:X(()=>[j(w)]),_:1})])]),_:1})])])}}},mde=wv(hde,[["__scopeId","data-v-c52222cf"]]),gde=vv("order",()=>{const e=L(localStorage.getItem("orderCount")||0);return{orderCount:e,setOrderCount:n=>{e.value=n,localStorage.setItem("orderCount",n)}}});function Lde(e){return bn.post("/order/cart/create",e)}function Vde(e){return bn.get("/order/cart/list",{params:e})}function Bde(e){return bn.post("/order/RetailOrder/checkOrder",e)}function zde(e){return bn.post("/order/cart/delete",e)}function Hde(e){return bn.post("/order/RetailOrder/createOrder",e)}function Dde(e,t){return bn.post(`order/pay/${e}`,t)}function Fde(e){return bn.get("micropay_query",{params:e})}function Kde(e){return bn.get("/order/retailOrder/merchant_order_list",{params:e})}function jde(e){return bn.get("/order/retailOrder/order_list",{params:e})}function Wde(e){return bn.post("/order/OpurchaseOrder/createOrder",{params:e})}function qde(e){return bn.get("/order/cashierinfo/lists",{params:e})}function Ude(e){return bn.post("/user/address/merchant_create",e)}function Gde(e){return bn.get("/order/OpurchaseOrder/lists",{params:e})}function Yde(e){return bn.get("/order/OpurchaseOrder/sub_orders",{params:e})}function T4(e){return bn.get("/order/retailOrder/merchant_order_count",{params:e})}const yde={class:"my-card"},_de=["onClick"],bde={key:0,class:"badge"},wde={__name:"myAside",setup(e){const t=hb(),n=_ue(),o=gde(),r=(d=1)=>{o.setOrderCount(d),u.value.forEach(p=>{p.name=="order"&&(p.count=d)})};let a=!1;const l=d=>{if(T4().then(h=>{var m;r(((m=h==null?void 0:h.data)==null?void 0:m.order_count)||0)}),Io.success("您有新的订单"),!a){var p=new Audio("/src/assets/order.mp3");p.play(),a=!0,p.addEventListener("ended",function(){a=!1})}},s=d=>{t.push({name:d})},u=L([{name:"saleHome",title:"收银",ico:"Sell",count:0},{name:"saleOrder",title:"收银订单",ico:"DataLine",count:0},{name:"order",title:"摊贩订单",ico:"DataAnalysis",count:+o.orderCount},{name:"purchaseOrder",title:"采购订单",ico:"Van",count:0},{name:"orderCount",title:"订单统计",ico:"DocumentRemove",count:0},{name:"wallet",title:"余额提现",ico:"Wallet",count:0}]),c=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==0&&(d=u.value.length),d>0&&s(u.value[d-1].name)},f=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==u.value.length-1&&(d=-1),d{tn.on("up",c),tn.on("down",f),tn.on("new_order",l),tn.on("set-order-count-zero",()=>{r(0)}),T4().then(d=>{var p;r(((p=d==null?void 0:d.data)==null?void 0:p.order_count)||0)})}),ko(()=>{tn.off("aup",c),tn.off("adown",f),tn.off("new_order",l),tn.on("set-order-count-zero")}),(d,p)=>{const h=Ze("el-icon");return b(),M("div",yde,[(b(!0),M(Fe,null,ht(u.value,m=>(b(),M("div",{key:m.name,class:T(["list-item",{active:i(n).name==m.name}]),onClick:v=>s(m.name)},[j(h,{size:"2rem"},{default:X(()=>[(b(),le(st(m.ico)))]),_:2},1024),k("div",null,$e(m.title),1),m.count?(b(),M("div",bde,$e(m.count),1)):ne("",!0)],10,_de))),128))])}}},Cde=wv(wde,[["__scopeId","data-v-d6402e2a"]]),$o=function e(t){this.doNotConnect=0,t=t||{},t.heartbeat=t.heartbeat||25e3,t.pingTimeout=t.pingTimeout||1e4,this.config=t,this.uid=0,this.channels={},this.connection=null,this.pingTimeoutTimer=0,e.instances.push(this),this.createConnection()};$o.prototype.checkoutPing=function(){var e=this;e.checkoutPingTimer&&clearTimeout(e.checkoutPingTimer),e.checkoutPingTimer=setTimeout(function(){e.checkoutPingTimer=0,e.connection.state==="connected"&&(e.connection.send('{"event":"pusher:ping","data":{}}'),e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),e.pingTimeoutTimer=setTimeout(function(){e.connection.closeAndClean(),e.connection.doNotConnect||e.connection.waitReconnect()},e.config.pingTimeout))},this.config.heartbeat)};$o.prototype.channel=function(e){return this.channels.find(e)};$o.prototype.allChannels=function(){return this.channels.all()};$o.prototype.createConnection=function(){if(this.connection)throw Error("Connection already exist");var e=this,t=this.config.url;function n(){for(var o in e.channels)e.channels[o].subscribed=!1}this.connection=new el({url:t,app_key:this.config.app_key,onOpen:function(){e.connection.state="connecting",e.checkoutPing()},onMessage:function(o){e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),o=JSON.parse(o.data);var r=o.event,a=o.channel;if(r==="pusher:pong"){e.checkoutPing();return}if(r==="pusher:error")throw Error(o.data.message);var l=JSON.parse(o.data),s;if(r==="pusher_internal:subscription_succeeded"){s=e.channels[a],s.subscribed=!0,s.processQueue(),s.emit("pusher:subscription_succeeded");return}if(r==="pusher:connection_established"&&(e.connection.socket_id=l.socket_id,e.connection.updateNetworkState("connected"),e.subscribeAll()),r.indexOf("pusher_internal")!==-1){console.log("Event '"+r+"' not implement");return}s=e.channels[a],s&&s.emit(r,l)},onClose:function(){n()},onError:function(){n()}})};$o.prototype.disconnect=function(){this.connection.doNotConnect=1,this.connection.close()};$o.prototype.subscribeAll=function(){if(this.connection.state==="connected")for(var e in this.channels)this.channels[e].processSubscribe()};$o.prototype.unsubscribe=function(e){this.channels[e]&&(delete this.channels[e],this.connection.state==="connected"&&this.connection.send(JSON.stringify({event:"pusher:unsubscribe",data:{channel:e}})))};$o.prototype.unsubscribeAll=function(){var e=Object.keys(this.channels);if(e.length&&this.connection.state==="connected")for(var t in this.channels)this.unsubscribe(t);this.channels={}};$o.prototype.subscribe=function(e){return this.channels[e]?this.channels[e]:e.indexOf("private-")===0?Fb(e,this):e.indexOf("presence-")===0?kde(e,this):Sde(e,this)};$o.instances=[];function Sde(e,t){var n=new Vi(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){t.connection.send(JSON.stringify({event:"pusher:subscribe",data:{channel:e}}))},n.processSubscribe(),n}function Fb(e,t){var n=new Vi(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){xde({url:t.config.auth,type:"POST",data:{channel_name:e,socket_id:t.connection.socket_id},success:function(o){o=JSON.parse(o),o.channel=e,t.connection.send(JSON.stringify({event:"pusher:subscribe",data:o}))},error:function(o){throw Error(o)}})},n.processSubscribe(),n}function kde(e,t){return Fb(e,t)}function el(e){this.dispatcher=new jb,Kb(this,this.dispatcher);var t=["on","off","emit"];for(var n in t)this[t[n]]=this.dispatcher[t[n]];this.options=e,this.state="initialized",this.doNotConnect=0,this.reconnectInterval=1,this.connection=null,this.reconnectTimer=0,this.connect()}el.prototype.updateNetworkState=function(e){var t=this.state;this.state=e,t!==e&&this.emit("state_change",{previous:t,current:e})};el.prototype.connect=function(){if(this.doNotConnect=0,this.state==="connected"){console.log('networkState is "'+this.state+'" and do not need connect');return}this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=0),this.closeAndClean();var e=this.options,t=new WebSocket(e.url+"/app/"+e.app_key);this.updateNetworkState("connecting");var n=this;t.onopen=function(o){if(n.reconnectInterval=1,n.doNotConnect){n.updateNetworkState("disconnected"),t.close();return}e.onOpen&&e.onOpen(o)},e.onMessage&&(t.onmessage=e.onMessage),t.onclose=function(o){t.onmessage=t.onopen=t.onclose=t.onerror=null,n.updateNetworkState("disconnected"),n.doNotConnect||n.waitReconnect(),e.onClose&&e.onClose(o)},t.onerror=function(o){n.close(),n.doNotConnect||n.waitReconnect(),e.onError&&e.onError(o)},this.connection=t};el.prototype.closeAndClean=function(){if(this.connection){var e=this.connection;e.onmessage=e.onopen=e.onclose=e.onerror=null;try{e.close()}catch{}this.updateNetworkState("disconnected")}};el.prototype.waitReconnect=function(){if(!(this.state==="connected"||this.state==="connecting")&&!this.doNotConnect){this.updateNetworkState("connecting");var e=this;this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout(function(){e.connect()},this.reconnectInterval),this.reconnectInterval<1e3?this.reconnectInterval=1e3:this.reconnectInterval=this.reconnectInterval*2,this.reconnectInterval>2e3&&navigator.onLine&&(e.reconnectInterval=2e3)}};el.prototype.send=function(e){if(this.state!=="connected"){console.trace('networkState is "'+this.state+'", can not send '+e);return}this.connection.send(e)};el.prototype.close=function(){this.updateNetworkState("disconnected"),this.connection.close()};var Kb=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)};function Vi(e,t){this.subscribed=!1,this.dispatcher=new jb,this.connection=e,this.channelName=t,this.subscribeCb=null,this.queue=[],Kb(this,this.dispatcher);var n=["on","off","emit"];for(var o in n)this[n[o]]=this.dispatcher[n[o]]}Vi.prototype.processSubscribe=function(){this.connection.state==="connected"&&this.subscribeCb()};Vi.prototype.processQueue=function(){if(!(this.connection.state!=="connected"||!this.subscribed)){for(var e in this.queue)this.queue[e]();this.queue=[]}};Vi.prototype.trigger=function(e,t){if(e.indexOf("client-")!==0)throw new Error("Event '"+e+"' should start with 'client-'");var n=this;this.queue.push(function(){n.connection.send(JSON.stringify({event:e,data:t,channel:n.channelName}))}),this.processQueue()};var pu=function(){var e={};function t(y){for(var w=[],E=1;E0)for(o=0;o=200&&n<300?e.success&&e.success(t.responseText,t.responseXML):e.error&&e.error(n)}},e.type==="GET"?(t.open("GET",e.url+"?"+params,!0),t.send(null)):e.type==="POST"&&(t.open("POST",e.url,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(params))}function Mde(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}const $de={class:"common-layout"},Tde={__name:"index",setup(e){const t=_d(),o=new $o({url:"wss://erp.lihaink.cn/pull",app_key:"2ce3ce22329517213caa7dad261f5695"}).subscribe(`store_merchant_${t.userInfo.merchant.mer_id}`);o.on("message",function(a){var l,s,u,c,f;console.log("收到消息--",a);try{((l=a==null?void 0:a.content)==null?void 0:l.type)=="cash_register"&&((s=a==null?void 0:a.content)==null?void 0:s.msg)=="您有一笔订单已支付"&&tn.emit("pay_success",(u=a==null?void 0:a.content)==null?void 0:u.data),((c=a==null?void 0:a.content)==null?void 0:c.type)=="store_merchant"&&((f=a==null?void 0:a.content)==null?void 0:f.msg)=="您有一笔新的订单"&&tn.emit("new_order",a==null?void 0:a.content)}catch{}}),o.on("close",function(){});const r=a=>{console.log("按下",a.keyCode),a.keyCode==16&&tn.emit("shift"),a.keyCode==120&&tn.emit("F9"),a.keyCode==13&&tn.emit("enter"),a.keyCode==37&&tn.emit("left"),a.keyCode==39&&tn.emit("right"),a.keyCode==38&&tn.emit("up"),a.keyCode==40&&tn.emit("down"),a.keyCode==46&&tn.emit("delete"),a.keyCode==45&&tn.emit("insert")};return et(()=>{window.addEventListener("keydown",r),console.log("开启键盘监听")}),ko(()=>{window.removeEventListener("keydown",r),console.log("关闭键盘监听")}),(a,l)=>{const s=Ze("el-header"),u=Ze("el-aside"),c=Ze("router-view"),f=Ze("el-main"),d=Ze("el-container");return b(),M("div",$de,[j(d,null,{default:X(()=>[j(s,null,{default:X(()=>[j(mde)]),_:1}),j(d,null,{default:X(()=>[j(u,{width:"6.25rem"},{default:X(()=>[j(Cde)]),_:1}),j(f,{style:{color:"#333"}},{default:X(()=>[j(c,{class:"my-main"},{default:X(({Component:p})=>[j(nn,{name:"el-zoom-in-top"},{default:X(()=>[(b(),le(st(p)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Ode=wv(Tde,[["__scopeId","data-v-62514d1e"]]),Ade=[{path:"/",name:"layout",component:Ode,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>Qo(()=>import("./index-lUdLNBZu.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"采购订单"},component:()=>Qo(()=>import("./index-CsE-2pl6.js"),__vite__mapDeps([5,1,6,4]),import.meta.url)},{path:"/order",name:"order",meta:{title:"待提采购"},component:()=>Qo(()=>import("./index-CbwoHAUG.js"),__vite__mapDeps([7,2,1,8,4]),import.meta.url)},{path:"/purchaseOrder",name:"purchaseOrder",meta:{title:"采购订单"},component:()=>Qo(()=>import("./index-B8kkKC-V.js"),__vite__mapDeps([9,2,1,10]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>Qo(()=>import("./indexCount-DeHuVrzY.js"),__vite__mapDeps([11,12,13]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>Qo(()=>import("./index-BSxnEJg_.js"),__vite__mapDeps([14,12,2,1,15]),import.meta.url)},{path:"/test",name:"test",component:()=>Qo(()=>import("./test-CVdMUgg0.js"),__vite__mapDeps([16,17]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Qo(()=>import("./index-BYmmAKvH.js"),__vite__mapDeps([18,19]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Qo(()=>import("./index-DOIxz6bQ.js"),__vite__mapDeps([]),import.meta.url)}],Wb=gue({history:qie(),routes:Ade});Wb.beforeEach((e,t,n)=>{const o=_d();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const qb=Wb,Bi=Fg(m9);for(const[e,t]of Object.entries(WL))Bi.component(e,t);const Nde=wue();Bi.use(qb);Bi.use(Nde);Bi.use(die,{locale:fie});Bi.mount("#app");export{ne as A,Lw as B,Vw as C,bn as D,Io as E,Fe as F,cr as G,S as H,Hde as I,Dde as J,Fde as K,_ue as L,$4 as M,Bde as N,jde as O,hb as P,qde as Q,Ye as R,Kde as S,Wde as T,Ude as U,Gde as V,Yde as W,wv as _,ko as a,Ze as b,b as c,le as d,k as e,j as f,mt as g,M as h,ht as i,zde as j,Vde as k,Lde as l,tn as m,je as n,et as o,kr as p,Er as q,L as r,Rc as s,$e as t,_d as u,Mt as v,X as w,i as x,T as y,tt as z}; diff --git a/build/assets/index-5yTa6--L.js b/build/assets/index-CbwoHAUG.js similarity index 98% rename from build/assets/index-5yTa6--L.js rename to build/assets/index-CbwoHAUG.js index 621323f..3235378 100644 --- a/build/assets/index-5yTa6--L.js +++ b/build/assets/index-CbwoHAUG.js @@ -1 +1 @@ -import{_ as F,u as q,L as te,r as i,o as T,m as z,a as W,b as p,s as x,c as a,h as d,e,f as s,w as u,g as w,v as se,z as N,F as O,i as E,y as oe,t as c,d as le,A as y,R as ae,S as ie,T as de,E as ne,B as K,C as P,P as re,Q as _e,U as ce}from"./index-BhwfcSvx.js";import{h as ue}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as ve}from"./padding-dm0HkGpn.js";const Q=V=>(K("data-v-27ca906a"),V=V(),P(),V),me={class:"my-order"},fe={class:"header-nav"},pe=Q(()=>e("div",{class:"nav-item"},c("待提交采购订单"),-1)),he={class:"nav-item-btn"},ge={class:"header-input"},ye={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},be=["onClick"],$e={class:"top"},ke={class:"sn"},we={class:"create-time"},Ve={class:"shop"},Ce={key:0,class:"left"},Ae={key:0,class:"shop-name"},ze={class:"right"},De={class:"money"},Le={class:"count"},Ue={class:"bottom"},Se={class:"pay"},Re={key:0},Ye={key:0},xe={key:1},Me={key:2},Be={key:1,style:{color:"#ff4a00"}},Ie={key:0,class:"cashier"},Ne={key:0,class:"load-end"},Oe={key:1,class:"load-end"},Ee=Q(()=>e("div",{style:{width:"100%",height:"7rem"}},null,-1)),Fe={key:0,class:"bottom-btn-fiexd"},qe={class:"dialog-footer"},Te={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:0}},emits:["addAddress"],setup(V,{expose:U,emit:t}){q();const D=te();i([]);const o=i(1);i(null);const A=f=>{v(!0)},L=f=>f.getTime()>Date.now(),m=i({page_no:1,page_size:20,number:"",date:ue(new Date).format("YYYY-MM-DD"),is_mer:1}),_=i(!1),r=i(0),$=i(0),h=i(!1),k=i([]),v=(f=!1)=>{if(f)m.value.page_no=1;else if(h.value||_.value)return;_.value=!0,o.value==1&&(m.value.paid=null),o.value==2&&(m.value.paid=0),C.value=!1,ie(m.value).then(n=>{f?k.value=n.data.lists:k.value=[...k.value,...n.data.lists],n.data.lists.length{h.value=!0,_.value=!1})},S=()=>{de().then(f=>{ne.success("提交成功"),v(!0),z.emit("set-order-count-zero",f.data)})},g=(f,n)=>{$.value=n,z.emit("set-c-order-detail",f)};U({getOrderList:v});const M=t,Y=f=>{M("addAddress",f)},C=i(!1);return T(()=>{z.on("update-c-order-detail",f=>{k.value[$.value].paid=1}),C.value=!0,z.on("new_order",()=>{D.name=="order"&&(C.value=!0)})}),W(()=>{z.off("update-c-order-detail")}),(f,n)=>{const j=p("el-date-picker"),R=p("el-button"),G=p("el-input"),H=p("el-image"),J=p("el-dialog"),X=x("loading"),Z=x("infinite-scroll");return a(),d("div",me,[e("div",fe,[pe,e("div",he,[s(j,{modelValue:m.value.date,"onUpdate:modelValue":n[0]||(n[0]=l=>m.value.date=l),type:"date",placeholder:"请选择时间",size:"small",clearable:!1,"value-format":"YYYY-MM-DD","disabled-date":L,onChange:A},null,8,["modelValue"])])]),e("div",ge,[s(G,{modelValue:m.value.number,"onUpdate:modelValue":n[2]||(n[2]=l=>m.value.number=l),placeholder:"请输入订单编号",onKeydown:n[3]||(n[3]=se(l=>v(!0),["enter"])),onClear:n[4]||(n[4]=l=>v(!0)),clearable:""},{append:u(()=>[s(R,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:n[1]||(n[1]=l=>v(!0))},{default:u(()=>[w("搜索")]),_:1})]),_:1},8,["modelValue"])]),N((a(),d("div",ye,[(a(!0),d(O,null,E(k.value,(l,B)=>(a(),d("div",{class:oe(["item",{"item-active":$.value==B}]),key:B,onClick:I=>g(l,B)},[e("div",$e,[e("div",ke,"单号: "+c(l.number),1),e("div",we,c(l.create_time),1)]),e("div",Ve,[l.goods_list?(a(),d("div",Ce,[(a(!0),d(O,null,E(l.goods_list.slice(0,5),(I,ee)=>(a(),le(H,{key:ee,src:I.imgs,class:"shop-img"},null,8,["src"]))),128)),l.goods_list.length==1?(a(),d("div",Ae,c(l.goods_list[0].class_name),1)):y("",!0)])):y("",!0),e("div",ze,[e("div",De,"¥"+c(l.total),1),e("div",Le,"共"+c(l.goods_count)+"款商品",1)])]),e("div",Ue,[e("div",Se,[l.paid?(a(),d("div",Re,[w(" 已支付 "),l.pay_type==9?(a(),d("span",Ye,"(微信收款)")):y("",!0),l.pay_type==3?(a(),d("span",xe,"(余额支付)")):y("",!0),l.pay_type==1?(a(),d("span",Me,"(微信支付)")):y("",!0)])):(a(),d("div",Be,"未支付"))]),l.address_id?y("",!0):(a(),d("div",Ie,[s(R,{size:"small",type:"primary",onClick:ae(I=>Y(l),["stop"])},{default:u(()=>[w("添加收货地址")]),_:2},1032,["onClick"])]))])],10,be))),128)),h.value?(a(),d("div",Ne,"没有更多了")):y("",!0),_.value?(a(),d("div",Oe,"加载中...")):y("",!0),Ee])),[[X,_.value],[Z,v]]),_.value?y("",!0):(a(),d("div",Fe,[s(R,{class:"btn",type:"primary",onClick:S,disabled:!k.value.length},{default:u(()=>[w(" 提交采购")]),_:1},8,["disabled"])])),s(J,{modelValue:C.value,"onUpdate:modelValue":n[7]||(n[7]=l=>C.value=l),title:"您有新的订单,是否立即刷新",width:"500","before-close":f.handleClose},{footer:u(()=>[e("div",qe,[s(R,{onClick:n[5]||(n[5]=l=>C.value=!1)},{default:u(()=>[w("稍后刷新")]),_:1}),s(R,{type:"primary",onClick:n[6]||(n[6]=l=>v(!0))},{default:u(()=>[w(" 立即刷新 ")]),_:1})])]),_:1},8,["modelValue","before-close"])])}}},We=F(Te,[["__scopeId","data-v-27ca906a"]]),b=V=>(K("data-v-0317eb70"),V=V(),P(),V),Ke={class:"my-order"},Pe={class:"detail"},Qe={key:0,class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},je=b(()=>e("div",{class:"table-title"},"订单信息",-1)),Ge={class:"table-info"},He={class:"info-item"},Je=b(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=b(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=b(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),lt={class:"info-item-info"},at={class:"info-item"},it=b(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),dt={class:"info-item-info"},nt={class:"info-item"},rt=b(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},ut=b(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),vt={class:"info-item-info"},mt={class:"info-item"},ft=b(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),pt={class:"info-item-info"},ht={class:"info-item"},gt=b(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),yt={class:"info-item-info"},bt={key:0},$t={key:1},kt={key:2},wt=b(()=>e("div",{class:"table-title"},"收货人信息",-1)),Vt={key:0,class:"table-info",style:{"flex-direction":"column"}},Ct={class:"info-item"},At=b(()=>e("div",{class:"info-item-title"},"收货人:",-1)),zt={class:"info-item-info"},Dt={class:"info-item"},Lt=b(()=>e("div",{class:"info-item-title"},"联系方式:",-1)),Ut={class:"info-item-info"},St={class:"info-item"},Rt=b(()=>e("div",{class:"info-item-title"},"收货地址:",-1)),Yt={class:"info-item-info"},xt={key:1,class:"addAddress"},Mt={style:{"font-size":"0.9rem"}},Bt={style:{color:"#ff4a00"}},It={style:{display:"flex","align-items":"center"}},Nt={style:{"margin-left":"0.5rem"}},Ot={__name:"detail",emits:["addAddress"],setup(V,{emit:U}){q(),re();const t=i({id:""});i([]),i(null);const D=i(!1);i(0),i(0),i(["商品信息","订单详情"]),i(""),i(!1);const o=i({page_no:1,page_size:15,loadend:!1,loading:!1}),A=i([]),L=()=>{console.log("触底"),t.value.id&&!o.value.loadend&&(console.log("加载"),o.value.loading=!0,_e({pid:t.value.id,page_no:o.value.page_no,page_size:o.value.page_size}).then(r=>{A.value=[...A.value,...r.data.lists],r.data.lists.length{m("addAddress",r)};return T(()=>{z.on("set-c-order-detail",r=>{t.value=r,o.value.page_no=1,o.value.loadend=!1,o.value.loading=!1,A.value=[],L()})}),W(()=>{z.off("set-c-order-detail")}),(r,$)=>{var Y;const h=p("el-button"),k=p("el-image"),v=p("el-table-column"),S=p("el-table"),g=x("loading"),M=x("infinite-scroll");return a(),d("div",Ke,[N((a(),d("div",Pe,[(Y=t.value)!=null&&Y.id?N((a(),d("div",Qe,[je,e("div",Ge,[e("div",He,[Je,e("div",Xe,c(t.value.number),1)]),e("div",Ze,[et,e("div",tt,c(t.value.goods_count),1)]),e("div",st,[ot,e("div",lt,"¥"+c(t.value.total),1)]),e("div",at,[it,e("div",dt,c(t.value.create_time),1)]),e("div",nt,[rt,e("div",_t,"¥"+c(t.value.deduction_price),1)]),e("div",ct,[ut,e("div",vt,"¥"+c(t.value.actual),1)]),e("div",mt,[ft,e("div",pt,c(t.value.update_time),1)]),e("div",ht,[gt,e("div",yt,[t.value.pay_type==9?(a(),d("span",bt,"微信收款")):y("",!0),t.value.pay_type==3?(a(),d("span",$t,"余额支付")):y("",!0),t.value.pay_type==1?(a(),d("span",kt,"微信支付")):y("",!0)])])]),wt,t.value.user_phone?(a(),d("div",Vt,[e("div",Ct,[At,e("div",zt,c(t.value.real_name),1)]),e("div",Dt,[Lt,e("div",Ut,c(t.value.user_phone),1)]),e("div",St,[Rt,e("div",Yt,c(t.value.user_address),1)])])):(a(),d("div",xt,[s(h,{type:"primary",onClick:$[0]||($[0]=C=>_(t.value)),size:"large"},{default:u(()=>[w("点击添加收货地址")]),_:1})])),e("div",Mt,[w(" 共计 "),e("span",Bt,c(t.value.goods_count),1),w(" 款商品 ")]),s(S,{data:A.value},{default:u(()=>[s(v,{label:"商品信息"},{default:u(({row:C})=>[e("div",It,[s(k,{style:{height:"3rem",width:"3rem"},src:C.imgs},null,8,["src"]),e("span",Nt,c(C.goods_name),1)])]),_:1}),s(v,{prop:"price",label:"单价",width:"150"}),s(v,{prop:"nums",label:"数量",width:"150"}),s(v,{prop:"total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[g,D.value],[M,L]]):y("",!0)])),[[g,D.value]])])}}},Et=F(Ot,[["__scopeId","data-v-0317eb70"]]),Ft={class:"my-card"},qt={class:"dialog-footer"},Qt={__name:"index",setup(V){const U=i(null),t=i(!1),D=_=>{_.id!=o.value.order_id?o.value={real_name:"",phone:"",detail:"",order_id:_.id}:o.value.order_id=_.id,t.value=!0},o=i({real_name:"",phone:"",detail:"",order_id:""}),A=i({real_name:[{required:!0,message:"请输入姓名",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],detail:[{required:!0,message:"请输入地址",trigger:"blur"}]}),L=i(null),m=()=>{var _;(_=L.value)==null||_.validate(r=>{r&&ce(o.value).then($=>{var h;t.value=!1,(h=U.value)==null||h.getOrderList(!0)})})};return(_,r)=>{const $=p("el-input"),h=p("el-form-item"),k=p("el-form"),v=p("el-button"),S=p("el-dialog");return a(),d("div",Ft,[s(We,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:U,onAddAddress:D},null,512),s(ve),s(Et,{ref:"detailRef",onAddAddress:D},null,512),s(S,{modelValue:t.value,"onUpdate:modelValue":r[4]||(r[4]=g=>t.value=g),title:"添加地址",width:"500"},{footer:u(()=>[e("div",qt,[s(v,{onClick:r[3]||(r[3]=g=>t.value=!1)},{default:u(()=>[w("取消")]),_:1}),s(v,{type:"primary",onClick:m},{default:u(()=>[w(" 确认 ")]),_:1})])]),default:u(()=>[s(k,{ref_key:"formRef",ref:L,model:o.value,"label-width":"100",rules:A.value},{default:u(()=>[s(h,{label:"收货人","label-width":_.formLabelWidth,prop:"real_name"},{default:u(()=>[s($,{modelValue:o.value.real_name,"onUpdate:modelValue":r[0]||(r[0]=g=>o.value.real_name=g),autocomplete:"off",placeholder:"请输入收货人"},null,8,["modelValue"])]),_:1},8,["label-width"]),s(h,{label:"电话","label-width":_.formLabelWidth,prop:"phone"},{default:u(()=>[s($,{modelValue:o.value.phone,"onUpdate:modelValue":r[1]||(r[1]=g=>o.value.phone=g),type:"number",placeholder:"请输入电话"},null,8,["modelValue"])]),_:1},8,["label-width"]),s(h,{label:"地址","label-width":_.formLabelWidth,prop:"detail"},{default:u(()=>[s($,{modelValue:o.value.detail,"onUpdate:modelValue":r[2]||(r[2]=g=>o.value.detail=g),placeholder:"请输入地址"},null,8,["modelValue"])]),_:1},8,["label-width"])]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}};export{Qt as default}; +import{_ as F,u as q,L as te,r as i,o as T,m as z,a as W,b as p,s as x,c as a,h as d,e,f as s,w as u,g as w,v as se,z as N,F as O,i as E,y as oe,t as c,d as le,A as y,R as ae,S as ie,T as de,E as ne,B as K,C as P,P as re,Q as _e,U as ce}from"./index-BpHEZm7m.js";import{h as ue}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as ve}from"./padding-Dv3RYtNt.js";const Q=V=>(K("data-v-27ca906a"),V=V(),P(),V),me={class:"my-order"},fe={class:"header-nav"},pe=Q(()=>e("div",{class:"nav-item"},c("待提交采购订单"),-1)),he={class:"nav-item-btn"},ge={class:"header-input"},ye={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},be=["onClick"],$e={class:"top"},ke={class:"sn"},we={class:"create-time"},Ve={class:"shop"},Ce={key:0,class:"left"},Ae={key:0,class:"shop-name"},ze={class:"right"},De={class:"money"},Le={class:"count"},Ue={class:"bottom"},Se={class:"pay"},Re={key:0},Ye={key:0},xe={key:1},Me={key:2},Be={key:1,style:{color:"#ff4a00"}},Ie={key:0,class:"cashier"},Ne={key:0,class:"load-end"},Oe={key:1,class:"load-end"},Ee=Q(()=>e("div",{style:{width:"100%",height:"7rem"}},null,-1)),Fe={key:0,class:"bottom-btn-fiexd"},qe={class:"dialog-footer"},Te={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:0}},emits:["addAddress"],setup(V,{expose:U,emit:t}){q();const D=te();i([]);const o=i(1);i(null);const A=f=>{v(!0)},L=f=>f.getTime()>Date.now(),m=i({page_no:1,page_size:20,number:"",date:ue(new Date).format("YYYY-MM-DD"),is_mer:1}),_=i(!1),r=i(0),$=i(0),h=i(!1),k=i([]),v=(f=!1)=>{if(f)m.value.page_no=1;else if(h.value||_.value)return;_.value=!0,o.value==1&&(m.value.paid=null),o.value==2&&(m.value.paid=0),C.value=!1,ie(m.value).then(n=>{f?k.value=n.data.lists:k.value=[...k.value,...n.data.lists],n.data.lists.length{h.value=!0,_.value=!1})},S=()=>{de().then(f=>{ne.success("提交成功"),v(!0),z.emit("set-order-count-zero",f.data)})},g=(f,n)=>{$.value=n,z.emit("set-c-order-detail",f)};U({getOrderList:v});const M=t,Y=f=>{M("addAddress",f)},C=i(!1);return T(()=>{z.on("update-c-order-detail",f=>{k.value[$.value].paid=1}),C.value=!0,z.on("new_order",()=>{D.name=="order"&&(C.value=!0)})}),W(()=>{z.off("update-c-order-detail")}),(f,n)=>{const j=p("el-date-picker"),R=p("el-button"),G=p("el-input"),H=p("el-image"),J=p("el-dialog"),X=x("loading"),Z=x("infinite-scroll");return a(),d("div",me,[e("div",fe,[pe,e("div",he,[s(j,{modelValue:m.value.date,"onUpdate:modelValue":n[0]||(n[0]=l=>m.value.date=l),type:"date",placeholder:"请选择时间",size:"small",clearable:!1,"value-format":"YYYY-MM-DD","disabled-date":L,onChange:A},null,8,["modelValue"])])]),e("div",ge,[s(G,{modelValue:m.value.number,"onUpdate:modelValue":n[2]||(n[2]=l=>m.value.number=l),placeholder:"请输入订单编号",onKeydown:n[3]||(n[3]=se(l=>v(!0),["enter"])),onClear:n[4]||(n[4]=l=>v(!0)),clearable:""},{append:u(()=>[s(R,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:n[1]||(n[1]=l=>v(!0))},{default:u(()=>[w("搜索")]),_:1})]),_:1},8,["modelValue"])]),N((a(),d("div",ye,[(a(!0),d(O,null,E(k.value,(l,B)=>(a(),d("div",{class:oe(["item",{"item-active":$.value==B}]),key:B,onClick:I=>g(l,B)},[e("div",$e,[e("div",ke,"单号: "+c(l.number),1),e("div",we,c(l.create_time),1)]),e("div",Ve,[l.goods_list?(a(),d("div",Ce,[(a(!0),d(O,null,E(l.goods_list.slice(0,5),(I,ee)=>(a(),le(H,{key:ee,src:I.imgs,class:"shop-img"},null,8,["src"]))),128)),l.goods_list.length==1?(a(),d("div",Ae,c(l.goods_list[0].class_name),1)):y("",!0)])):y("",!0),e("div",ze,[e("div",De,"¥"+c(l.total),1),e("div",Le,"共"+c(l.goods_count)+"款商品",1)])]),e("div",Ue,[e("div",Se,[l.paid?(a(),d("div",Re,[w(" 已支付 "),l.pay_type==9?(a(),d("span",Ye,"(微信收款)")):y("",!0),l.pay_type==3?(a(),d("span",xe,"(余额支付)")):y("",!0),l.pay_type==1?(a(),d("span",Me,"(微信支付)")):y("",!0)])):(a(),d("div",Be,"未支付"))]),l.address_id?y("",!0):(a(),d("div",Ie,[s(R,{size:"small",type:"primary",onClick:ae(I=>Y(l),["stop"])},{default:u(()=>[w("添加收货地址")]),_:2},1032,["onClick"])]))])],10,be))),128)),h.value?(a(),d("div",Ne,"没有更多了")):y("",!0),_.value?(a(),d("div",Oe,"加载中...")):y("",!0),Ee])),[[X,_.value],[Z,v]]),_.value?y("",!0):(a(),d("div",Fe,[s(R,{class:"btn",type:"primary",onClick:S,disabled:!k.value.length},{default:u(()=>[w(" 提交采购")]),_:1},8,["disabled"])])),s(J,{modelValue:C.value,"onUpdate:modelValue":n[7]||(n[7]=l=>C.value=l),title:"您有新的订单,是否立即刷新",width:"500","before-close":f.handleClose},{footer:u(()=>[e("div",qe,[s(R,{onClick:n[5]||(n[5]=l=>C.value=!1)},{default:u(()=>[w("稍后刷新")]),_:1}),s(R,{type:"primary",onClick:n[6]||(n[6]=l=>v(!0))},{default:u(()=>[w(" 立即刷新 ")]),_:1})])]),_:1},8,["modelValue","before-close"])])}}},We=F(Te,[["__scopeId","data-v-27ca906a"]]),b=V=>(K("data-v-0317eb70"),V=V(),P(),V),Ke={class:"my-order"},Pe={class:"detail"},Qe={key:0,class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},je=b(()=>e("div",{class:"table-title"},"订单信息",-1)),Ge={class:"table-info"},He={class:"info-item"},Je=b(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=b(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=b(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),lt={class:"info-item-info"},at={class:"info-item"},it=b(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),dt={class:"info-item-info"},nt={class:"info-item"},rt=b(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},ut=b(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),vt={class:"info-item-info"},mt={class:"info-item"},ft=b(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),pt={class:"info-item-info"},ht={class:"info-item"},gt=b(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),yt={class:"info-item-info"},bt={key:0},$t={key:1},kt={key:2},wt=b(()=>e("div",{class:"table-title"},"收货人信息",-1)),Vt={key:0,class:"table-info",style:{"flex-direction":"column"}},Ct={class:"info-item"},At=b(()=>e("div",{class:"info-item-title"},"收货人:",-1)),zt={class:"info-item-info"},Dt={class:"info-item"},Lt=b(()=>e("div",{class:"info-item-title"},"联系方式:",-1)),Ut={class:"info-item-info"},St={class:"info-item"},Rt=b(()=>e("div",{class:"info-item-title"},"收货地址:",-1)),Yt={class:"info-item-info"},xt={key:1,class:"addAddress"},Mt={style:{"font-size":"0.9rem"}},Bt={style:{color:"#ff4a00"}},It={style:{display:"flex","align-items":"center"}},Nt={style:{"margin-left":"0.5rem"}},Ot={__name:"detail",emits:["addAddress"],setup(V,{emit:U}){q(),re();const t=i({id:""});i([]),i(null);const D=i(!1);i(0),i(0),i(["商品信息","订单详情"]),i(""),i(!1);const o=i({page_no:1,page_size:15,loadend:!1,loading:!1}),A=i([]),L=()=>{console.log("触底"),t.value.id&&!o.value.loadend&&(console.log("加载"),o.value.loading=!0,_e({pid:t.value.id,page_no:o.value.page_no,page_size:o.value.page_size}).then(r=>{A.value=[...A.value,...r.data.lists],r.data.lists.length{m("addAddress",r)};return T(()=>{z.on("set-c-order-detail",r=>{t.value=r,o.value.page_no=1,o.value.loadend=!1,o.value.loading=!1,A.value=[],L()})}),W(()=>{z.off("set-c-order-detail")}),(r,$)=>{var Y;const h=p("el-button"),k=p("el-image"),v=p("el-table-column"),S=p("el-table"),g=x("loading"),M=x("infinite-scroll");return a(),d("div",Ke,[N((a(),d("div",Pe,[(Y=t.value)!=null&&Y.id?N((a(),d("div",Qe,[je,e("div",Ge,[e("div",He,[Je,e("div",Xe,c(t.value.number),1)]),e("div",Ze,[et,e("div",tt,c(t.value.goods_count),1)]),e("div",st,[ot,e("div",lt,"¥"+c(t.value.total),1)]),e("div",at,[it,e("div",dt,c(t.value.create_time),1)]),e("div",nt,[rt,e("div",_t,"¥"+c(t.value.deduction_price),1)]),e("div",ct,[ut,e("div",vt,"¥"+c(t.value.actual),1)]),e("div",mt,[ft,e("div",pt,c(t.value.update_time),1)]),e("div",ht,[gt,e("div",yt,[t.value.pay_type==9?(a(),d("span",bt,"微信收款")):y("",!0),t.value.pay_type==3?(a(),d("span",$t,"余额支付")):y("",!0),t.value.pay_type==1?(a(),d("span",kt,"微信支付")):y("",!0)])])]),wt,t.value.user_phone?(a(),d("div",Vt,[e("div",Ct,[At,e("div",zt,c(t.value.real_name),1)]),e("div",Dt,[Lt,e("div",Ut,c(t.value.user_phone),1)]),e("div",St,[Rt,e("div",Yt,c(t.value.user_address),1)])])):(a(),d("div",xt,[s(h,{type:"primary",onClick:$[0]||($[0]=C=>_(t.value)),size:"large"},{default:u(()=>[w("点击添加收货地址")]),_:1})])),e("div",Mt,[w(" 共计 "),e("span",Bt,c(t.value.goods_count),1),w(" 款商品 ")]),s(S,{data:A.value},{default:u(()=>[s(v,{label:"商品信息"},{default:u(({row:C})=>[e("div",It,[s(k,{style:{height:"3rem",width:"3rem"},src:C.imgs},null,8,["src"]),e("span",Nt,c(C.goods_name),1)])]),_:1}),s(v,{prop:"price",label:"单价",width:"150"}),s(v,{prop:"nums",label:"数量",width:"150"}),s(v,{prop:"total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[g,D.value],[M,L]]):y("",!0)])),[[g,D.value]])])}}},Et=F(Ot,[["__scopeId","data-v-0317eb70"]]),Ft={class:"my-card"},qt={class:"dialog-footer"},Qt={__name:"index",setup(V){const U=i(null),t=i(!1),D=_=>{_.id!=o.value.order_id?o.value={real_name:"",phone:"",detail:"",order_id:_.id}:o.value.order_id=_.id,t.value=!0},o=i({real_name:"",phone:"",detail:"",order_id:""}),A=i({real_name:[{required:!0,message:"请输入姓名",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],detail:[{required:!0,message:"请输入地址",trigger:"blur"}]}),L=i(null),m=()=>{var _;(_=L.value)==null||_.validate(r=>{r&&ce(o.value).then($=>{var h;t.value=!1,(h=U.value)==null||h.getOrderList(!0)})})};return(_,r)=>{const $=p("el-input"),h=p("el-form-item"),k=p("el-form"),v=p("el-button"),S=p("el-dialog");return a(),d("div",Ft,[s(We,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:U,onAddAddress:D},null,512),s(ve),s(Et,{ref:"detailRef",onAddAddress:D},null,512),s(S,{modelValue:t.value,"onUpdate:modelValue":r[4]||(r[4]=g=>t.value=g),title:"添加地址",width:"500"},{footer:u(()=>[e("div",qt,[s(v,{onClick:r[3]||(r[3]=g=>t.value=!1)},{default:u(()=>[w("取消")]),_:1}),s(v,{type:"primary",onClick:m},{default:u(()=>[w(" 确认 ")]),_:1})])]),default:u(()=>[s(k,{ref_key:"formRef",ref:L,model:o.value,"label-width":"100",rules:A.value},{default:u(()=>[s(h,{label:"收货人","label-width":_.formLabelWidth,prop:"real_name"},{default:u(()=>[s($,{modelValue:o.value.real_name,"onUpdate:modelValue":r[0]||(r[0]=g=>o.value.real_name=g),autocomplete:"off",placeholder:"请输入收货人"},null,8,["modelValue"])]),_:1},8,["label-width"]),s(h,{label:"电话","label-width":_.formLabelWidth,prop:"phone"},{default:u(()=>[s($,{modelValue:o.value.phone,"onUpdate:modelValue":r[1]||(r[1]=g=>o.value.phone=g),type:"number",placeholder:"请输入电话"},null,8,["modelValue"])]),_:1},8,["label-width"]),s(h,{label:"地址","label-width":_.formLabelWidth,prop:"detail"},{default:u(()=>[s($,{modelValue:o.value.detail,"onUpdate:modelValue":r[2]||(r[2]=g=>o.value.detail=g),placeholder:"请输入地址"},null,8,["modelValue"])]),_:1},8,["label-width"])]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}};export{Qt as default}; diff --git a/build/assets/index-BnBeULNb.js b/build/assets/index-CsE-2pl6.js similarity index 97% rename from build/assets/index-BnBeULNb.js rename to build/assets/index-CsE-2pl6.js index f9ec7a9..ce40461 100644 --- a/build/assets/index-BnBeULNb.js +++ b/build/assets/index-CsE-2pl6.js @@ -1 +1 @@ -import{_ as A,u as F,r as a,o as M,m as C,a as P,b as h,s as S,c as s,h as o,e,f as d,w,g as D,v as X,z as I,F as U,i as O,y as Y,t as n,d as Z,A as u,O as ee,B as R,C as T,P as te,Q as se}from"./index-BhwfcSvx.js";/* empty css */import{p as oe}from"./padding-dm0HkGpn.js";const ae=_=>(R("data-v-9d0ec279"),_=_(),T(),_),le={class:"my-order"},ie={class:"header-nav"},ne=ae(()=>e("div",{class:"nav-item"},n("收银订单"),-1)),de={class:"nav-item-btn"},ce={class:"header-input"},_e={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},re=["onClick"],ue={class:"top"},ve={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},me={key:0,class:"shop-name"},he={class:"right"},ge={class:"money"},ye={class:"count"},$e={class:"bottom"},be={class:"pay"},ke={key:0},we={key:0},Ve={key:1},ze={key:2},Ce={key:1,style:{color:"#ff4a00"}},De={key:0,class:"load-end"},xe={key:1,class:"load-end"},Se={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(_){F();const i=_;a([]);const y=a(1),c=m=>{r.value.page_no=1,b.value=!1,v.value=!1,p.value=[],f(!0)};a(null);const $=a(""),x=()=>{r.value.date=$.value.join("-"),f(!0)},k=m=>m.getTime()>Date.now(),r=a({page_no:1,page_size:20,number:"",date:"",source:i.source}),v=a(!1),V=a(0),z=a(0),b=a(!1),p=a([]),f=(m=!1)=>{if(m)r.value.page_no=1;else if(b.value||v.value)return;v.value=!0,y.value==1&&(r.value.paid=null),y.value==2&&(r.value.paid=0),ee(r.value).then(l=>{m?p.value=l.data.lists:p.value=[...p.value,...l.data.lists],l.data.lists.length{b.value=!0,v.value=!1})},E=(m,l)=>{z.value=l,C.emit("set-sale-order-detail",m)};return M(()=>{C.on("update-sale-order-detail",m=>{console.log("==="),p.value[z.value].paid=1})}),P(()=>{C.off("update-sale-order-detail")}),(m,l)=>{const L=h("el-radio-button"),K=h("el-radio-group"),j=h("el-date-picker"),Q=h("el-button"),q=h("el-input"),G=h("el-image"),H=S("loading"),J=S("infinite-scroll");return s(),o("div",le,[e("div",ie,[ne,e("div",de,[d(K,{modelValue:y.value,"onUpdate:modelValue":l[0]||(l[0]=t=>y.value=t),onChange:c,size:"small"},{default:w(()=>[d(L,{value:1},{default:w(()=>[D("全部")]),_:1}),d(L,{value:2},{default:w(()=>[D("未支付")]),_:1})]),_:1},8,["modelValue"]),d(j,{modelValue:$.value,"onUpdate:modelValue":l[1]||(l[1]=t=>$.value=t),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":k,onChange:x,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ce,[d(q,{modelValue:r.value.number,"onUpdate:modelValue":l[3]||(l[3]=t=>r.value.number=t),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=X(t=>f(!0),["enter"])),onClear:l[5]||(l[5]=t=>f(!0)),clearable:""},{append:w(()=>[d(Q,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:l[2]||(l[2]=t=>f(!0))},{default:w(()=>[D("搜索")]),_:1})]),_:1},8,["modelValue"])]),I((s(),o("div",_e,[(s(!0),o(U,null,O(p.value,(t,B)=>(s(),o("div",{class:Y(["item",{"item-active":z.value==B}]),key:B,onClick:N=>E(t,B)},[e("div",ue,[e("div",{class:Y(["sn","cahier"])},"单号: "+n(t.number),1),e("div",ve,n(t.create_time),1)]),e("div",pe,[t.goods_list?(s(),o("div",fe,[(s(!0),o(U,null,O(t.goods_list.slice(0,5),(N,W)=>(s(),Z(G,{key:W,src:N.imgs,class:"shop-img"},null,8,["src"]))),128)),t.goods_list.length==1?(s(),o("div",me,n(t.goods_list[0].class_name),1)):u("",!0)])):u("",!0),e("div",he,[e("div",ge,"¥"+n(t.total),1),e("div",ye,"共"+n(t.goods_count)+"款商品",1)])]),e("div",$e,[e("div",be,[t.paid?(s(),o("div",ke,[D(" 已支付 "),t.pay_type==9?(s(),o("span",we,"(微信收款)")):u("",!0),t.pay_type==3?(s(),o("span",Ve,"(余额支付)")):u("",!0),t.pay_type==1?(s(),o("span",ze,"(微信支付)")):u("",!0)])):(s(),o("div",Ce,"未支付"))])])],10,re))),128)),b.value?(s(),o("div",De,"没有更多了")):u("",!0),v.value?(s(),o("div",xe,"加载中...")):u("",!0)])),[[H,v.value],[J,f]])])}}},Be=A(Se,[["__scopeId","data-v-9d0ec279"]]),g=_=>(R("data-v-4e281875"),_=_(),T(),_),Ie={class:"my-order"},Le={class:"detail"},Ne={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ue=g(()=>e("div",{class:"table-title"},"订单信息",-1)),Oe={class:"table-info"},Ye={class:"info-item"},Ae=g(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Fe={class:"info-item-info"},Me={class:"info-item"},Pe=g(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Re={class:"info-item-info"},Te={class:"info-item"},Ee=g(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ke={class:"info-item-info"},je={class:"info-item"},Qe=g(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),qe={class:"info-item-info"},Ge={class:"info-item"},He=g(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),Je={class:"info-item-info"},We={class:"info-item"},Xe=g(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=g(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=g(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),lt={class:"info-item-info"},it={key:0},nt={key:1},dt={key:2},ct={style:{"font-size":"0.9rem"}},_t={style:{color:"#ff4a00"}},rt={style:{display:"flex","align-items":"center"}},ut={style:{"margin-left":"0.5rem"}},vt={__name:"detail",setup(_){F(),te();const i=a({id:""});a([]),a(null);const y=a(!1);a(0),a(0),a(["商品信息","订单详情"]),a(""),a(!1);const c=a({page_no:1,page_size:15,loadend:!1,loading:!1}),$=a([]),x=()=>{console.log("触底"),i.value.id&&!c.value.loadend&&(console.log("加载"),c.value.loading=!0,se({pid:i.value.id,page_no:c.value.page_no,page_size:c.value.page_size}).then(k=>{$.value=[...$.value,...k.data.lists],k.data.lists.length{C.on("set-sale-order-detail",k=>{i.value=k,c.value.page_no=1,c.value.loadend=!1,c.value.loading=!1,$.value=[],x()})}),P(()=>{C.off("set-sale-order-detail")}),(k,r)=>{const v=h("el-image"),V=h("el-table-column"),z=h("el-table"),b=S("loading"),p=S("infinite-scroll");return s(),o("div",Ie,[I((s(),o("div",Le,[I((s(),o("div",Ne,[Ue,e("div",Oe,[e("div",Ye,[Ae,e("div",Fe,n(i.value.number),1)]),e("div",Me,[Pe,e("div",Re,n(i.value.goods_count),1)]),e("div",Te,[Ee,e("div",Ke,"¥"+n(i.value.total),1)]),e("div",je,[Qe,e("div",qe,n(i.value.create_time),1)]),e("div",Ge,[He,e("div",Je,"¥"+n(i.value.deduction_price),1)]),e("div",We,[Xe,e("div",Ze,"¥"+n(i.value.actual),1)]),e("div",et,[tt,e("div",st,n(i.value.update_time),1)]),e("div",ot,[at,e("div",lt,[i.value.pay_type==9?(s(),o("span",it,"微信收款")):u("",!0),i.value.pay_type==3?(s(),o("span",nt,"余额支付")):u("",!0),i.value.pay_type==1?(s(),o("span",dt,"微信支付")):u("",!0)])])]),e("div",ct,[D(" 共计 "),e("span",_t,n(i.value.goods_count),1),D(" 款商品 ")]),d(z,{data:$.value},{default:w(()=>[d(V,{label:"商品信息"},{default:w(({row:f})=>[e("div",rt,[d(v,{style:{height:"3rem",width:"3rem"},src:f.imgs},null,8,["src"]),e("span",ut,n(f.goods_name),1)])]),_:1}),d(V,{prop:"price",label:"单价",width:"150"}),d(V,{prop:"nums",label:"数量",width:"150"}),d(V,{prop:"total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[b,y.value],[p,x]])])),[[b,y.value]])])}}},pt=A(vt,[["__scopeId","data-v-4e281875"]]),ft={class:"my-card"},yt={__name:"index",setup(_){return(i,y)=>(s(),o("div",ft,[d(Be,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(oe),d(pt,{ref:"detailRef"},null,512)]))}};export{yt as default}; +import{_ as A,u as F,r as a,o as M,m as C,a as P,b as h,s as S,c as s,h as o,e,f as d,w,g as D,v as X,z as I,F as U,i as O,y as Y,t as n,d as Z,A as u,O as ee,B as R,C as T,P as te,Q as se}from"./index-BpHEZm7m.js";/* empty css */import{p as oe}from"./padding-Dv3RYtNt.js";const ae=_=>(R("data-v-9d0ec279"),_=_(),T(),_),le={class:"my-order"},ie={class:"header-nav"},ne=ae(()=>e("div",{class:"nav-item"},n("收银订单"),-1)),de={class:"nav-item-btn"},ce={class:"header-input"},_e={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},re=["onClick"],ue={class:"top"},ve={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},me={key:0,class:"shop-name"},he={class:"right"},ge={class:"money"},ye={class:"count"},$e={class:"bottom"},be={class:"pay"},ke={key:0},we={key:0},Ve={key:1},ze={key:2},Ce={key:1,style:{color:"#ff4a00"}},De={key:0,class:"load-end"},xe={key:1,class:"load-end"},Se={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(_){F();const i=_;a([]);const y=a(1),c=m=>{r.value.page_no=1,b.value=!1,v.value=!1,p.value=[],f(!0)};a(null);const $=a(""),x=()=>{r.value.date=$.value.join("-"),f(!0)},k=m=>m.getTime()>Date.now(),r=a({page_no:1,page_size:20,number:"",date:"",source:i.source}),v=a(!1),V=a(0),z=a(0),b=a(!1),p=a([]),f=(m=!1)=>{if(m)r.value.page_no=1;else if(b.value||v.value)return;v.value=!0,y.value==1&&(r.value.paid=null),y.value==2&&(r.value.paid=0),ee(r.value).then(l=>{m?p.value=l.data.lists:p.value=[...p.value,...l.data.lists],l.data.lists.length{b.value=!0,v.value=!1})},E=(m,l)=>{z.value=l,C.emit("set-sale-order-detail",m)};return M(()=>{C.on("update-sale-order-detail",m=>{console.log("==="),p.value[z.value].paid=1})}),P(()=>{C.off("update-sale-order-detail")}),(m,l)=>{const L=h("el-radio-button"),K=h("el-radio-group"),j=h("el-date-picker"),Q=h("el-button"),q=h("el-input"),G=h("el-image"),H=S("loading"),J=S("infinite-scroll");return s(),o("div",le,[e("div",ie,[ne,e("div",de,[d(K,{modelValue:y.value,"onUpdate:modelValue":l[0]||(l[0]=t=>y.value=t),onChange:c,size:"small"},{default:w(()=>[d(L,{value:1},{default:w(()=>[D("全部")]),_:1}),d(L,{value:2},{default:w(()=>[D("未支付")]),_:1})]),_:1},8,["modelValue"]),d(j,{modelValue:$.value,"onUpdate:modelValue":l[1]||(l[1]=t=>$.value=t),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":k,onChange:x,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ce,[d(q,{modelValue:r.value.number,"onUpdate:modelValue":l[3]||(l[3]=t=>r.value.number=t),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=X(t=>f(!0),["enter"])),onClear:l[5]||(l[5]=t=>f(!0)),clearable:""},{append:w(()=>[d(Q,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:l[2]||(l[2]=t=>f(!0))},{default:w(()=>[D("搜索")]),_:1})]),_:1},8,["modelValue"])]),I((s(),o("div",_e,[(s(!0),o(U,null,O(p.value,(t,B)=>(s(),o("div",{class:Y(["item",{"item-active":z.value==B}]),key:B,onClick:N=>E(t,B)},[e("div",ue,[e("div",{class:Y(["sn","cahier"])},"单号: "+n(t.number),1),e("div",ve,n(t.create_time),1)]),e("div",pe,[t.goods_list?(s(),o("div",fe,[(s(!0),o(U,null,O(t.goods_list.slice(0,5),(N,W)=>(s(),Z(G,{key:W,src:N.imgs,class:"shop-img"},null,8,["src"]))),128)),t.goods_list.length==1?(s(),o("div",me,n(t.goods_list[0].class_name),1)):u("",!0)])):u("",!0),e("div",he,[e("div",ge,"¥"+n(t.total),1),e("div",ye,"共"+n(t.goods_count)+"款商品",1)])]),e("div",$e,[e("div",be,[t.paid?(s(),o("div",ke,[D(" 已支付 "),t.pay_type==9?(s(),o("span",we,"(微信收款)")):u("",!0),t.pay_type==3?(s(),o("span",Ve,"(余额支付)")):u("",!0),t.pay_type==1?(s(),o("span",ze,"(微信支付)")):u("",!0)])):(s(),o("div",Ce,"未支付"))])])],10,re))),128)),b.value?(s(),o("div",De,"没有更多了")):u("",!0),v.value?(s(),o("div",xe,"加载中...")):u("",!0)])),[[H,v.value],[J,f]])])}}},Be=A(Se,[["__scopeId","data-v-9d0ec279"]]),g=_=>(R("data-v-4e281875"),_=_(),T(),_),Ie={class:"my-order"},Le={class:"detail"},Ne={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ue=g(()=>e("div",{class:"table-title"},"订单信息",-1)),Oe={class:"table-info"},Ye={class:"info-item"},Ae=g(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Fe={class:"info-item-info"},Me={class:"info-item"},Pe=g(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Re={class:"info-item-info"},Te={class:"info-item"},Ee=g(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ke={class:"info-item-info"},je={class:"info-item"},Qe=g(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),qe={class:"info-item-info"},Ge={class:"info-item"},He=g(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),Je={class:"info-item-info"},We={class:"info-item"},Xe=g(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=g(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=g(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),lt={class:"info-item-info"},it={key:0},nt={key:1},dt={key:2},ct={style:{"font-size":"0.9rem"}},_t={style:{color:"#ff4a00"}},rt={style:{display:"flex","align-items":"center"}},ut={style:{"margin-left":"0.5rem"}},vt={__name:"detail",setup(_){F(),te();const i=a({id:""});a([]),a(null);const y=a(!1);a(0),a(0),a(["商品信息","订单详情"]),a(""),a(!1);const c=a({page_no:1,page_size:15,loadend:!1,loading:!1}),$=a([]),x=()=>{console.log("触底"),i.value.id&&!c.value.loadend&&(console.log("加载"),c.value.loading=!0,se({pid:i.value.id,page_no:c.value.page_no,page_size:c.value.page_size}).then(k=>{$.value=[...$.value,...k.data.lists],k.data.lists.length{C.on("set-sale-order-detail",k=>{i.value=k,c.value.page_no=1,c.value.loadend=!1,c.value.loading=!1,$.value=[],x()})}),P(()=>{C.off("set-sale-order-detail")}),(k,r)=>{const v=h("el-image"),V=h("el-table-column"),z=h("el-table"),b=S("loading"),p=S("infinite-scroll");return s(),o("div",Ie,[I((s(),o("div",Le,[I((s(),o("div",Ne,[Ue,e("div",Oe,[e("div",Ye,[Ae,e("div",Fe,n(i.value.number),1)]),e("div",Me,[Pe,e("div",Re,n(i.value.goods_count),1)]),e("div",Te,[Ee,e("div",Ke,"¥"+n(i.value.total),1)]),e("div",je,[Qe,e("div",qe,n(i.value.create_time),1)]),e("div",Ge,[He,e("div",Je,"¥"+n(i.value.deduction_price),1)]),e("div",We,[Xe,e("div",Ze,"¥"+n(i.value.actual),1)]),e("div",et,[tt,e("div",st,n(i.value.update_time),1)]),e("div",ot,[at,e("div",lt,[i.value.pay_type==9?(s(),o("span",it,"微信收款")):u("",!0),i.value.pay_type==3?(s(),o("span",nt,"余额支付")):u("",!0),i.value.pay_type==1?(s(),o("span",dt,"微信支付")):u("",!0)])])]),e("div",ct,[D(" 共计 "),e("span",_t,n(i.value.goods_count),1),D(" 款商品 ")]),d(z,{data:$.value},{default:w(()=>[d(V,{label:"商品信息"},{default:w(({row:f})=>[e("div",rt,[d(v,{style:{height:"3rem",width:"3rem"},src:f.imgs},null,8,["src"]),e("span",ut,n(f.goods_name),1)])]),_:1}),d(V,{prop:"price",label:"单价",width:"150"}),d(V,{prop:"nums",label:"数量",width:"150"}),d(V,{prop:"total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[b,y.value],[p,x]])])),[[b,y.value]])])}}},pt=A(vt,[["__scopeId","data-v-4e281875"]]),ft={class:"my-card"},yt={__name:"index",setup(_){return(i,y)=>(s(),o("div",ft,[d(Be,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(oe),d(pt,{ref:"detailRef"},null,512)]))}};export{yt as default}; diff --git a/build/assets/index-3vfsZl43.js b/build/assets/index-DOIxz6bQ.js similarity index 84% rename from build/assets/index-3vfsZl43.js rename to build/assets/index-DOIxz6bQ.js index 4d20421..591e04e 100644 --- a/build/assets/index-3vfsZl43.js +++ b/build/assets/index-DOIxz6bQ.js @@ -1 +1 @@ -import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-BhwfcSvx.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; +import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-BpHEZm7m.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; diff --git a/build/assets/index-DOUgTo5g.js b/build/assets/index-DOUgTo5g.js deleted file mode 100644 index b316c34..0000000 --- a/build/assets/index-DOUgTo5g.js +++ /dev/null @@ -1,27 +0,0 @@ -import{_ as zt,r as P,o as vt,m as En,a as mt,b as an,c as fn,d as gt,w as mn,e as v,f as Z,g as wn,t as Tn,n as Oe,E as Yn,u as su,h as Ln,F as fu,i as au,j as Wp,k as Bp,l as Ko,p as kt,q as $p,s as Mr,v as Yo,x as Br,y as Ur,z as cu,A as $r,B as Zo,C as Vo,D as Up,G as Mp,H as Dp,I as qo,J as Np,K as Gp,L as Hp,M as kp,N as zp}from"./index-BhwfcSvx.js";import{p as qp}from"./padding-dm0HkGpn.js";/* empty css */import"./moment-Cl4UOzQZ.js";const Kp={class:"price"},Yp={class:"flex"},Zp={style:{margin:"0.625rem","padding-bottom":"40px"}},Vp={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Xp={class:"dialog-footer"},Jp={__name:"price",emits:["changeAllPrice"],setup(dn,{expose:Sn,emit:o}){const L=P(!1),B=P(null),I=P(0),A=($=!0,H=0)=>{V.value.nowPrice="",V.value.percentage="",L.value=$,I.value=H,Oe(()=>{setTimeout(()=>{var tn;(tn=B.value)==null||tn.focus()},150)})},V=P({nowPrice:"",percentage:""}),cn=$=>{V.value.percentage=($/I.value*100).toFixed(2)},hn=$=>{V.value.nowPrice=(I.value*$/100).toFixed(2)},j=o,en=()=>{if(V.value.percentage>100)return V.value.nowPrice="",V.value.percentage="",Yn.error("改价金额不能大于当前订单金额");if(V.value.nowPrice<=0)return V.value.nowPrice="",V.value.percentage="",Yn.error("金额不能小于0");j("changeAllPrice",V.value.nowPrice)};Sn({show:A,dialogVisible:L});const On=()=>{L.value&&en()};return vt(()=>{En.on("enter",On)}),mt(()=>{En.off("enter",On)}),($,H)=>{const tn=an("el-input"),un=an("el-button"),ln=an("el-dialog");return fn(),gt(ln,{modelValue:L.value,"onUpdate:modelValue":H[2]||(H[2]=An=>L.value=An),title:"订单改价",width:"650"},{footer:mn(()=>[v("div",Xp,[Z(un,{class:"ok-btn",type:"primary",onClick:en},{default:mn(()=>[wn(" 确定 (Enter) ")]),_:1})])]),default:mn(()=>[v("div",Kp,[v("div",Yp,[Z(tn,{ref_key:"priceRef",ref:B,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:V.value.nowPrice,"onUpdate:modelValue":H[0]||(H[0]=An=>V.value.nowPrice=An),type:"number",placeholder:"请输入改价后的价格",onInput:cn},{suffix:mn(()=>[wn("元")]),_:1},8,["modelValue"]),Z(tn,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:V.value.percentage,"onUpdate:modelValue":H[1]||(H[1]=An=>V.value.percentage=An),type:"number",placeholder:"请输入比例",onInput:hn},{suffix:mn(()=>[wn("%")]),_:1},8,["modelValue"])]),v("div",Zp,[wn(" 改价后金额: "),v("span",Vp,"¥"+Tn(V.value.nowPrice||I.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Qp=zt(Jp,[["__scopeId","data-v-924edcc0"]]),jp={class:"my-order"},ng={class:"header-nav"},eg={class:"nav-item"},tg={class:"order-list"},rg={class:"order-item-info"},ig={class:"order-item-title"},ug={class:"title"},lg=["onClick"],og={class:"order-item-sku"},sg={class:"order-item-price"},fg={class:"order-footer"},ag={class:"order-total"},cg={class:"price"},hg={class:"total-item"},_g={style:{"font-size":"1.4rem"}},dg={class:"total-item"},pg={class:"order-btn"},gg={__name:"order",emits:["goPay","editAttr"],setup(dn,{expose:Sn,emit:o}){const L=P([]),B=P(0),I=P(0),A=P(0);su();const V=()=>{let O=[];L.value.map(q=>{O.push(q.cart_id)}),O.length!=0&&hn(O)},cn=O=>{L.value=L.value.filter(q=>q.cart_id!=O),hn([O])},hn=O=>{Wp({cart_id:O}).then(q=>{console.log(q),j()})},j=()=>{B.value=0,I.value=0,A.value=0,Bp().then(O=>{var q,gn;((gn=(q=O.data)==null?void 0:q.lists)==null?void 0:gn.length)>0?(L.value=O.data.lists,B.value=+O.data.extend.total_price,I.value=B.value):L.value=[]})};j();const en=o,On=()=>{en("goPay")},$=(O,q)=>{Ko({goods_id:O.goods_id,is_new:0,cart_num:O.cart_num}).then(gn=>{B.value=0,L.value.forEach(Cn=>{B.value+=Cn.sell*Cn.cart_num}),I.value=B.value})},H=O=>{A.value=I.value-O,B.value=+O,Oe(()=>{setTimeout(()=>{un(!1)},150)})};P(0);const tn=P(null),un=(O=!0)=>{tn.value.show(O,I.value)};Sn({getList:j,list:L,discounts:A,allPrice:B});const ln=()=>{tn.value.dialogVisible?tn.value.dialogVisible=!1:un()},An=()=>{L.value.length>0&&V()};return vt(()=>{En.on("insert",ln),En.on("delete",An)}),mt(()=>{En.off("insert",ln),En.off("delete",An)}),(O,q)=>{const gn=an("Delete"),Cn=an("el-icon"),R=an("el-empty"),D=an("el-image"),X=an("el-input-number"),J=an("el-button");return fn(),Ln("div",jp,[v("div",ng,[v("div",eg,[wn(" 已选购 "),v("span",null,Tn(L.value.length),1),wn(" 款 ")]),v("div",{class:"nav-item-clear",onClick:V},[Z(Cn,null,{default:mn(()=>[Z(gn)]),_:1}),wn("清空 (Delete) ")])]),v("div",tg,[L.value.length==0?(fn(),gt(R,{key:0,description:"请点击右侧添加商品"})):(fn(!0),Ln(fu,{key:1},au(L.value,(on,Pn)=>(fn(),Ln("div",{class:"order-item",key:Pn},[Z(D,{loading:"lazy",class:"order-item-img",src:on.imgs},null,8,["src"]),v("div",rg,[v("div",ig,[v("div",ug,Tn(on.goods_name),1),v("div",{class:"delete",onClick:ae=>cn(on.cart_id)},"删除",8,lg)]),v("div",og,[v("span",null,Tn(on.unit_name),1)]),v("div",sg,[v("div",null,[wn(" ¥"),v("span",null,Tn(on.sell),1)]),v("div",null,[Z(X,{modelValue:on.cart_num,"onUpdate:modelValue":ae=>on.cart_num=ae,"step-strictly":"",min:1,step:1,onChange:ae=>$(on)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),v("div",fg,[v("div",ag,[v("div",cg,[v("div",hg,[wn(" 实付: "),v("span",null,[wn("¥"),v("span",_g,Tn(B.value.toFixed(2)),1)])]),v("div",dg,[wn(" 优惠: "),v("span",null,[wn("¥"),v("span",null,Tn(A.value.toFixed(2)),1)])])])]),v("div",pg,[Z(J,{class:"btn",type:"primary",onClick:On,disabled:L.value.length==0},{default:mn(()=>[wn("立即结账 (F9)")]),_:1},8,["disabled"])])]),Z(Qp,{ref_key:"priceRef",ref:tn,onChangeAllPrice:H},null,512)])}}},vg=zt(gg,[["__scopeId","data-v-bb5d2c2b"]]);var Dr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Dr.exports;(function(dn,Sn){(function(){var o,L="4.17.21",B=200,I="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",A="Expected a function",V="Invalid `variable` option passed into `_.template`",cn="__lodash_hash_undefined__",hn=500,j="__lodash_placeholder__",en=1,On=2,$=4,H=1,tn=2,un=1,ln=2,An=4,O=8,q=16,gn=32,Cn=64,R=128,D=256,X=512,J=30,on="...",Pn=800,ae=16,xt=1,yt=2,Un=3,ve=1/0,ee=9007199254740991,je=17976931348623157e292,Ge=NaN,Zn=4294967295,N=Zn-1,E=Zn>>>1,z=[["ary",R],["bind",un],["bindKey",ln],["curry",O],["curryRight",q],["flip",X],["partial",gn],["partialRight",Cn],["rearg",D]],Mn="[object Arguments]",nt="[object Array]",Nr="[object AsyncFunction]",He="[object Boolean]",ke="[object Date]",Hn="[object DOMException]",At="[object Error]",qt="[object Function]",_u="[object GeneratorFunction]",ce="[object Map]",St="[object Number]",Xo="[object Null]",ye="[object Object]",du="[object Promise]",Jo="[object Proxy]",Ct="[object RegExp]",he="[object Set]",It="[object String]",Kt="[object Symbol]",Qo="[object Undefined]",Rt="[object WeakMap]",jo="[object WeakSet]",Et="[object ArrayBuffer]",et="[object DataView]",Gr="[object Float32Array]",Hr="[object Float64Array]",kr="[object Int8Array]",zr="[object Int16Array]",qr="[object Int32Array]",Kr="[object Uint8Array]",Yr="[object Uint8ClampedArray]",Zr="[object Uint16Array]",Vr="[object Uint32Array]",ns=/\b__p \+= '';/g,es=/\b(__p \+=) '' \+/g,ts=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pu=/&(?:amp|lt|gt|quot|#39);/g,gu=/[&<>"']/g,rs=RegExp(pu.source),is=RegExp(gu.source),us=/<%-([\s\S]+?)%>/g,ls=/<%([\s\S]+?)%>/g,vu=/<%=([\s\S]+?)%>/g,os=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ss=/^\w*$/,fs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xr=/[\\^$.*+?()[\]{}|]/g,as=RegExp(Xr.source),Jr=/^\s+/,cs=/\s/,hs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_s=/\{\n\/\* \[wrapped with (.+)\] \*/,ds=/,? & /,ps=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gs=/[()=,{}\[\]\/\s]/,vs=/\\(\\)?/g,ms=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mu=/\w*$/,ws=/^[-+]0x[0-9a-f]+$/i,xs=/^0b[01]+$/i,ys=/^\[object .+?Constructor\]$/,As=/^0o[0-7]+$/i,Ss=/^(?:0|[1-9]\d*)$/,Cs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yt=/($^)/,Is=/['\n\r\u2028\u2029\\]/g,Zt="\\ud800-\\udfff",Rs="\\u0300-\\u036f",Es="\\ufe20-\\ufe2f",Ls="\\u20d0-\\u20ff",wu=Rs+Es+Ls,xu="\\u2700-\\u27bf",yu="a-z\\xdf-\\xf6\\xf8-\\xff",bs="\\xac\\xb1\\xd7\\xf7",Ts="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Os="\\u2000-\\u206f",Ps=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Au="A-Z\\xc0-\\xd6\\xd8-\\xde",Su="\\ufe0e\\ufe0f",Cu=bs+Ts+Os+Ps,Qr="['’]",Fs="["+Zt+"]",Iu="["+Cu+"]",Vt="["+wu+"]",Ru="\\d+",Ws="["+xu+"]",Eu="["+yu+"]",Lu="[^"+Zt+Cu+Ru+xu+yu+Au+"]",jr="\\ud83c[\\udffb-\\udfff]",Bs="(?:"+Vt+"|"+jr+")",bu="[^"+Zt+"]",ni="(?:\\ud83c[\\udde6-\\uddff]){2}",ei="[\\ud800-\\udbff][\\udc00-\\udfff]",tt="["+Au+"]",Tu="\\u200d",Ou="(?:"+Eu+"|"+Lu+")",$s="(?:"+tt+"|"+Lu+")",Pu="(?:"+Qr+"(?:d|ll|m|re|s|t|ve))?",Fu="(?:"+Qr+"(?:D|LL|M|RE|S|T|VE))?",Wu=Bs+"?",Bu="["+Su+"]?",Us="(?:"+Tu+"(?:"+[bu,ni,ei].join("|")+")"+Bu+Wu+")*",Ms="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ds="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$u=Bu+Wu+Us,Ns="(?:"+[Ws,ni,ei].join("|")+")"+$u,Gs="(?:"+[bu+Vt+"?",Vt,ni,ei,Fs].join("|")+")",Hs=RegExp(Qr,"g"),ks=RegExp(Vt,"g"),ti=RegExp(jr+"(?="+jr+")|"+Gs+$u,"g"),zs=RegExp([tt+"?"+Eu+"+"+Pu+"(?="+[Iu,tt,"$"].join("|")+")",$s+"+"+Fu+"(?="+[Iu,tt+Ou,"$"].join("|")+")",tt+"?"+Ou+"+"+Pu,tt+"+"+Fu,Ds,Ms,Ru,Ns].join("|"),"g"),qs=RegExp("["+Tu+Zt+wu+Su+"]"),Ks=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ys=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zs=-1,sn={};sn[Gr]=sn[Hr]=sn[kr]=sn[zr]=sn[qr]=sn[Kr]=sn[Yr]=sn[Zr]=sn[Vr]=!0,sn[Mn]=sn[nt]=sn[Et]=sn[He]=sn[et]=sn[ke]=sn[At]=sn[qt]=sn[ce]=sn[St]=sn[ye]=sn[Ct]=sn[he]=sn[It]=sn[Rt]=!1;var rn={};rn[Mn]=rn[nt]=rn[Et]=rn[et]=rn[He]=rn[ke]=rn[Gr]=rn[Hr]=rn[kr]=rn[zr]=rn[qr]=rn[ce]=rn[St]=rn[ye]=rn[Ct]=rn[he]=rn[It]=rn[Kt]=rn[Kr]=rn[Yr]=rn[Zr]=rn[Vr]=!0,rn[At]=rn[qt]=rn[Rt]=!1;var Vs={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Xs={"&":"&","<":"<",">":">",'"':""","'":"'"},Js={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qs={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},js=parseFloat,nf=parseInt,Uu=typeof kt=="object"&&kt&&kt.Object===Object&&kt,ef=typeof self=="object"&&self&&self.Object===Object&&self,Fn=Uu||ef||Function("return this")(),ri=Sn&&!Sn.nodeType&&Sn,ze=ri&&!0&&dn&&!dn.nodeType&&dn,Mu=ze&&ze.exports===ri,ii=Mu&&Uu.process,te=function(){try{var a=ze&&ze.require&&ze.require("util").types;return a||ii&&ii.binding&&ii.binding("util")}catch{}}(),Du=te&&te.isArrayBuffer,Nu=te&&te.isDate,Gu=te&&te.isMap,Hu=te&&te.isRegExp,ku=te&&te.isSet,zu=te&&te.isTypedArray;function Vn(a,_,h){switch(h.length){case 0:return a.call(_);case 1:return a.call(_,h[0]);case 2:return a.call(_,h[0],h[1]);case 3:return a.call(_,h[0],h[1],h[2])}return a.apply(_,h)}function tf(a,_,h,w){for(var b=-1,K=a==null?0:a.length;++b-1}function ui(a,_,h){for(var w=-1,b=a==null?0:a.length;++w-1;);return h}function Qu(a,_){for(var h=a.length;h--&&rt(_,a[h],0)>-1;);return h}function hf(a,_){for(var h=a.length,w=0;h--;)a[h]===_&&++w;return w}var _f=fi(Vs),df=fi(Xs);function pf(a){return"\\"+Qs[a]}function gf(a,_){return a==null?o:a[_]}function it(a){return qs.test(a)}function vf(a){return Ks.test(a)}function mf(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function _i(a){var _=-1,h=Array(a.size);return a.forEach(function(w,b){h[++_]=[b,w]}),h}function ju(a,_){return function(h){return a(_(h))}}function We(a,_){for(var h=-1,w=a.length,b=0,K=[];++h-1}function ua(n,e){var t=this.__data__,r=_r(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}Ae.prototype.clear=ea,Ae.prototype.delete=ta,Ae.prototype.get=ra,Ae.prototype.has=ia,Ae.prototype.set=ua;function Se(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function le(n,e,t,r,i,l){var s,f=e&en,c=e&On,d=e&$;if(t&&(s=i?t(n,r,i,l):t(n)),s!==o)return s;if(!pn(n))return n;var p=T(n);if(p){if(s=fc(n),!f)return kn(n,s)}else{var g=$n(n),m=g==qt||g==_u;if(Ne(n))return Bl(n,f);if(g==ye||g==Mn||m&&!i){if(s=c||m?{}:no(n),!f)return c?Qa(n,ya(s,n)):Ja(n,cl(s,n))}else{if(!rn[g])return i?n:{};s=ac(n,g,f)}}l||(l=new de);var x=l.get(n);if(x)return x;l.set(n,s),To(n)?n.forEach(function(C){s.add(le(C,e,t,C,n,l))}):Lo(n)&&n.forEach(function(C,M){s.set(M,le(C,e,t,M,n,l))});var S=d?c?Di:Mi:c?qn:bn,W=p?o:S(n);return re(W||n,function(C,M){W&&(M=C,C=n[M]),Wt(s,M,le(C,e,t,M,n,l))}),s}function Aa(n){var e=bn(n);return function(t){return hl(t,n,e)}}function hl(n,e,t){var r=t.length;if(n==null)return!r;for(n=nn(n);r--;){var i=t[r],l=e[i],s=n[i];if(s===o&&!(i in n)||!l(s))return!1}return!0}function _l(n,e,t){if(typeof n!="function")throw new ie(A);return Gt(function(){n.apply(o,t)},e)}function Bt(n,e,t,r){var i=-1,l=Xt,s=!0,f=n.length,c=[],d=e.length;if(!f)return c;t&&(e=_n(e,Xn(t))),r?(l=ui,s=!1):e.length>=B&&(l=Lt,s=!1,e=new Ye(e));n:for(;++ii?0:i+t),r=r===o||r>i?i:F(r),r<0&&(r+=i),r=t>r?0:Po(r);t0&&t(f)?e>1?Wn(f,e-1,t,r,i):Fe(i,f):r||(i[i.length]=f)}return i}var xi=Gl(),gl=Gl(!0);function me(n,e){return n&&xi(n,e,bn)}function yi(n,e){return n&&gl(n,e,bn)}function pr(n,e){return Pe(e,function(t){return Le(n[t])})}function Ve(n,e){e=Me(e,n);for(var t=0,r=e.length;n!=null&&te}function Ia(n,e){return n!=null&&Q.call(n,e)}function Ra(n,e){return n!=null&&e in nn(n)}function Ea(n,e,t){return n>=Bn(e,t)&&n=120&&p.length>=120)?new Ye(s&&p):o}p=n[0];var g=-1,m=f[0];n:for(;++g-1;)f!==n&&lr.call(f,c,1),lr.call(n,c,1);return n}function El(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==l){var l=i;Ee(i)?lr.call(n,i,1):Oi(n,i)}}return n}function Li(n,e){return n+fr(ol()*(e-n+1))}function Na(n,e,t,r){for(var i=-1,l=Rn(sr((e-n)/(t||1)),0),s=h(l);l--;)s[r?l:++i]=n,n+=t;return s}function bi(n,e){var t="";if(!n||e<1||e>ee)return t;do e%2&&(t+=n),e=fr(e/2),e&&(n+=n);while(e);return t}function U(n,e){return Ki(ro(n,e,Kn),n+"")}function Ga(n){return al(pt(n))}function Ha(n,e){var t=pt(n);return Rr(t,Ze(e,0,t.length))}function Mt(n,e,t,r){if(!pn(n))return n;e=Me(e,n);for(var i=-1,l=e.length,s=l-1,f=n;f!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var l=h(i);++r>>1,s=n[l];s!==null&&!Qn(s)&&(t?s<=e:s=B){var d=e?null:tc(n);if(d)return Qt(d);s=!1,i=Lt,c=new Ye}else c=e?[]:f;n:for(;++r=r?n:oe(n,e,t)}var Wl=Ff||function(n){return Fn.clearTimeout(n)};function Bl(n,e){if(e)return n.slice();var t=n.length,r=tl?tl(t):new n.constructor(t);return n.copy(r),r}function Bi(n){var e=new n.constructor(n.byteLength);return new ir(e).set(new ir(n)),e}function Ya(n,e){var t=e?Bi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Za(n){var e=new n.constructor(n.source,mu.exec(n));return e.lastIndex=n.lastIndex,e}function Va(n){return Ft?nn(Ft.call(n)):{}}function $l(n,e){var t=e?Bi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function Ul(n,e){if(n!==e){var t=n!==o,r=n===null,i=n===n,l=Qn(n),s=e!==o,f=e===null,c=e===e,d=Qn(e);if(!f&&!d&&!l&&n>e||l&&s&&c&&!f&&!d||r&&s&&c||!t&&c||!i)return 1;if(!r&&!l&&!d&&n=f)return c;var d=t[r];return c*(d=="desc"?-1:1)}}return n.index-e.index}function Ml(n,e,t,r){for(var i=-1,l=n.length,s=t.length,f=-1,c=e.length,d=Rn(l-s,0),p=h(c+d),g=!r;++f1?t[i-1]:o,s=i>2?t[2]:o;for(l=n.length>3&&typeof l=="function"?(i--,l):o,s&&Nn(t[0],t[1],s)&&(l=i<3?o:l,i=1),e=nn(e);++r-1?i[l?e[s]:s]:o}}function zl(n){return Re(function(e){var t=e.length,r=t,i=ue.prototype.thru;for(n&&e.reverse();r--;){var l=e[r];if(typeof l!="function")throw new ie(A);if(i&&!s&&Cr(l)=="wrapper")var s=new ue([],!0)}for(r=s?r:t;++r1&&k.reverse(),p&&cf))return!1;var d=l.get(n),p=l.get(e);if(d&&p)return d==e&&p==n;var g=-1,m=!0,x=t&tn?new Ye:o;for(l.set(n,e),l.set(e,n);++g1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(hs,`{ -/* [wrapped with `+e+`] */ -`)}function hc(n){return T(n)||Qe(n)||!!(ul&&n&&n[ul])}function Ee(n,e){var t=typeof n;return e=e??ee,!!e&&(t=="number"||t!="symbol"&&Ss.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Pn)return arguments[0]}else e=0;return n.apply(o,arguments)}}function Rr(n,e){var t=-1,r=n.length,i=r-1;for(e=e===o?r:e;++t1?n[e-1]:o;return t=typeof t=="function"?(n.pop(),t):o,go(n,t)});function vo(n){var e=u(n);return e.__chain__=!0,e}function Sh(n,e){return e(n),n}function Er(n,e){return e(n)}var Ch=Re(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(l){return wi(l,n)};return e>1||this.__actions__.length||!(r instanceof G)||!Ee(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Er,args:[i],thisArg:o}),new ue(r,this.__chain__).thru(function(l){return e&&!l.length&&l.push(o),l}))});function Ih(){return vo(this)}function Rh(){return new ue(this.value(),this.__chain__)}function Eh(){this.__values__===o&&(this.__values__=Oo(this.value()));var n=this.__index__>=this.__values__.length,e=n?o:this.__values__[this.__index__++];return{done:n,value:e}}function Lh(){return this}function bh(n){for(var e,t=this;t instanceof hr;){var r=fo(t);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Th(){var n=this.__wrapped__;if(n instanceof G){var e=n;return this.__actions__.length&&(e=new G(this)),e=e.reverse(),e.__actions__.push({func:Er,args:[Yi],thisArg:o}),new ue(e,this.__chain__)}return this.thru(Yi)}function Oh(){return Pl(this.__wrapped__,this.__actions__)}var Ph=wr(function(n,e,t){Q.call(n,t)?++n[t]:Ce(n,t,1)});function Fh(n,e,t){var r=T(n)?qu:Sa;return t&&Nn(n,e,t)&&(e=o),r(n,y(e,3))}function Wh(n,e){var t=T(n)?Pe:pl;return t(n,y(e,3))}var Bh=kl(ao),$h=kl(co);function Uh(n,e){return Wn(Lr(n,e),1)}function Mh(n,e){return Wn(Lr(n,e),ve)}function Dh(n,e,t){return t=t===o?1:F(t),Wn(Lr(n,e),t)}function mo(n,e){var t=T(n)?re:$e;return t(n,y(e,3))}function wo(n,e){var t=T(n)?rf:dl;return t(n,y(e,3))}var Nh=wr(function(n,e,t){Q.call(n,t)?n[t].push(e):Ce(n,t,[e])});function Gh(n,e,t,r){n=zn(n)?n:pt(n),t=t&&!r?F(t):0;var i=n.length;return t<0&&(t=Rn(i+t,0)),Fr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&rt(n,e,t)>-1}var Hh=U(function(n,e,t){var r=-1,i=typeof e=="function",l=zn(n)?h(n.length):[];return $e(n,function(s){l[++r]=i?Vn(e,s,t):$t(s,e,t)}),l}),kh=wr(function(n,e,t){Ce(n,t,e)});function Lr(n,e){var t=T(n)?_n:yl;return t(n,y(e,3))}function zh(n,e,t,r){return n==null?[]:(T(e)||(e=e==null?[]:[e]),t=r?o:t,T(t)||(t=t==null?[]:[t]),Il(n,e,t))}var qh=wr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Kh(n,e,t){var r=T(n)?li:Vu,i=arguments.length<3;return r(n,y(e,4),t,i,$e)}function Yh(n,e,t){var r=T(n)?uf:Vu,i=arguments.length<3;return r(n,y(e,4),t,i,dl)}function Zh(n,e){var t=T(n)?Pe:pl;return t(n,Or(y(e,3)))}function Vh(n){var e=T(n)?al:Ga;return e(n)}function Xh(n,e,t){(t?Nn(n,e,t):e===o)?e=1:e=F(e);var r=T(n)?ma:Ha;return r(n,e)}function Jh(n){var e=T(n)?wa:za;return e(n)}function Qh(n){if(n==null)return 0;if(zn(n))return Fr(n)?ut(n):n.length;var e=$n(n);return e==ce||e==he?n.size:Ii(n).length}function jh(n,e,t){var r=T(n)?oi:qa;return t&&Nn(n,e,t)&&(e=o),r(n,y(e,3))}var n_=U(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Nn(n,e[0],e[1])?e=[]:t>2&&Nn(e[0],e[1],e[2])&&(e=[e[0]]),Il(n,Wn(e,1),[])}),br=Wf||function(){return Fn.Date.now()};function e_(n,e){if(typeof e!="function")throw new ie(A);return n=F(n),function(){if(--n<1)return e.apply(this,arguments)}}function xo(n,e,t){return e=t?o:e,e=n&&e==null?n.length:e,Ie(n,R,o,o,o,o,e)}function yo(n,e){var t;if(typeof e!="function")throw new ie(A);return n=F(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Vi=U(function(n,e,t){var r=un;if(t.length){var i=We(t,_t(Vi));r|=gn}return Ie(n,r,e,t,i)}),Ao=U(function(n,e,t){var r=un|ln;if(t.length){var i=We(t,_t(Ao));r|=gn}return Ie(e,r,n,t,i)});function So(n,e,t){e=t?o:e;var r=Ie(n,O,o,o,o,o,o,e);return r.placeholder=So.placeholder,r}function Co(n,e,t){e=t?o:e;var r=Ie(n,q,o,o,o,o,o,e);return r.placeholder=Co.placeholder,r}function Io(n,e,t){var r,i,l,s,f,c,d=0,p=!1,g=!1,m=!0;if(typeof n!="function")throw new ie(A);e=fe(e)||0,pn(t)&&(p=!!t.leading,g="maxWait"in t,l=g?Rn(fe(t.maxWait)||0,e):l,m="trailing"in t?!!t.trailing:m);function x(yn){var ge=r,Te=i;return r=i=o,d=yn,s=n.apply(Te,ge),s}function S(yn){return d=yn,f=Gt(M,e),p?x(yn):s}function W(yn){var ge=yn-c,Te=yn-d,zo=e-ge;return g?Bn(zo,l-Te):zo}function C(yn){var ge=yn-c,Te=yn-d;return c===o||ge>=e||ge<0||g&&Te>=l}function M(){var yn=br();if(C(yn))return k(yn);f=Gt(M,W(yn))}function k(yn){return f=o,m&&r?x(yn):(r=i=o,s)}function jn(){f!==o&&Wl(f),d=0,r=c=i=f=o}function Gn(){return f===o?s:k(br())}function ne(){var yn=br(),ge=C(yn);if(r=arguments,i=this,c=yn,ge){if(f===o)return S(c);if(g)return Wl(f),f=Gt(M,e),x(c)}return f===o&&(f=Gt(M,e)),s}return ne.cancel=jn,ne.flush=Gn,ne}var t_=U(function(n,e){return _l(n,1,e)}),r_=U(function(n,e,t){return _l(n,fe(e)||0,t)});function i_(n){return Ie(n,X)}function Tr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new ie(A);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],l=t.cache;if(l.has(i))return l.get(i);var s=n.apply(this,r);return t.cache=l.set(i,s)||l,s};return t.cache=new(Tr.Cache||Se),t}Tr.Cache=Se;function Or(n){if(typeof n!="function")throw new ie(A);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function u_(n){return yo(2,n)}var l_=Ka(function(n,e){e=e.length==1&&T(e[0])?_n(e[0],Xn(y())):_n(Wn(e,1),Xn(y()));var t=e.length;return U(function(r){for(var i=-1,l=Bn(r.length,t);++i=e}),Qe=ml(function(){return arguments}())?ml:function(n){return vn(n)&&Q.call(n,"callee")&&!il.call(n,"callee")},T=h.isArray,y_=Du?Xn(Du):ba;function zn(n){return n!=null&&Pr(n.length)&&!Le(n)}function xn(n){return vn(n)&&zn(n)}function A_(n){return n===!0||n===!1||vn(n)&&Dn(n)==He}var Ne=$f||ou,S_=Nu?Xn(Nu):Ta;function C_(n){return vn(n)&&n.nodeType===1&&!Ht(n)}function I_(n){if(n==null)return!0;if(zn(n)&&(T(n)||typeof n=="string"||typeof n.splice=="function"||Ne(n)||dt(n)||Qe(n)))return!n.length;var e=$n(n);if(e==ce||e==he)return!n.size;if(Nt(n))return!Ii(n).length;for(var t in n)if(Q.call(n,t))return!1;return!0}function R_(n,e){return Ut(n,e)}function E_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?Ut(n,e,o,t):!!r}function Ji(n){if(!vn(n))return!1;var e=Dn(n);return e==At||e==Hn||typeof n.message=="string"&&typeof n.name=="string"&&!Ht(n)}function L_(n){return typeof n=="number"&&ll(n)}function Le(n){if(!pn(n))return!1;var e=Dn(n);return e==qt||e==_u||e==Nr||e==Jo}function Eo(n){return typeof n=="number"&&n==F(n)}function Pr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ee}function pn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function vn(n){return n!=null&&typeof n=="object"}var Lo=Gu?Xn(Gu):Pa;function b_(n,e){return n===e||Ci(n,e,Gi(e))}function T_(n,e,t){return t=typeof t=="function"?t:o,Ci(n,e,Gi(e),t)}function O_(n){return bo(n)&&n!=+n}function P_(n){if(pc(n))throw new b(I);return wl(n)}function F_(n){return n===null}function W_(n){return n==null}function bo(n){return typeof n=="number"||vn(n)&&Dn(n)==St}function Ht(n){if(!vn(n)||Dn(n)!=ye)return!1;var e=ur(n);if(e===null)return!0;var t=Q.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&er.call(t)==Tf}var Qi=Hu?Xn(Hu):Fa;function B_(n){return Eo(n)&&n>=-ee&&n<=ee}var To=ku?Xn(ku):Wa;function Fr(n){return typeof n=="string"||!T(n)&&vn(n)&&Dn(n)==It}function Qn(n){return typeof n=="symbol"||vn(n)&&Dn(n)==Kt}var dt=zu?Xn(zu):Ba;function $_(n){return n===o}function U_(n){return vn(n)&&$n(n)==Rt}function M_(n){return vn(n)&&Dn(n)==jo}var D_=Sr(Ri),N_=Sr(function(n,e){return n<=e});function Oo(n){if(!n)return[];if(zn(n))return Fr(n)?_e(n):kn(n);if(bt&&n[bt])return mf(n[bt]());var e=$n(n),t=e==ce?_i:e==he?Qt:pt;return t(n)}function be(n){if(!n)return n===0?n:0;if(n=fe(n),n===ve||n===-ve){var e=n<0?-1:1;return e*je}return n===n?n:0}function F(n){var e=be(n),t=e%1;return e===e?t?e-t:e:0}function Po(n){return n?Ze(F(n),0,Zn):0}function fe(n){if(typeof n=="number")return n;if(Qn(n))return Ge;if(pn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=pn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Xu(n);var t=xs.test(n);return t||As.test(n)?nf(n.slice(2),t?2:8):ws.test(n)?Ge:+n}function Fo(n){return we(n,qn(n))}function G_(n){return n?Ze(F(n),-ee,ee):n===0?n:0}function Y(n){return n==null?"":Jn(n)}var H_=ct(function(n,e){if(Nt(e)||zn(e)){we(e,bn(e),n);return}for(var t in e)Q.call(e,t)&&Wt(n,t,e[t])}),Wo=ct(function(n,e){we(e,qn(e),n)}),Wr=ct(function(n,e,t,r){we(e,qn(e),n,r)}),k_=ct(function(n,e,t,r){we(e,bn(e),n,r)}),z_=Re(wi);function q_(n,e){var t=at(n);return e==null?t:cl(t,e)}var K_=U(function(n,e){n=nn(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&Nn(e[0],e[1],i)&&(r=1);++t1),l}),we(n,Di(n),t),r&&(t=le(t,en|On|$,rc));for(var i=e.length;i--;)Oi(t,e[i]);return t});function ad(n,e){return $o(n,Or(y(e)))}var cd=Re(function(n,e){return n==null?{}:Ma(n,e)});function $o(n,e){if(n==null)return{};var t=_n(Di(n),function(r){return[r]});return e=y(e),Rl(n,t,function(r,i){return e(r,i[0])})}function hd(n,e,t){e=Me(e,n);var r=-1,i=e.length;for(i||(i=1,n=o);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=ol();return Bn(n+i*(e-n+js("1e-"+((i+"").length-1))),e)}return Li(n,e)}var Sd=ht(function(n,e,t){return e=e.toLowerCase(),n+(t?Do(e):e)});function Do(n){return eu(Y(n).toLowerCase())}function No(n){return n=Y(n),n&&n.replace(Cs,_f).replace(ks,"")}function Cd(n,e,t){n=Y(n),e=Jn(e);var r=n.length;t=t===o?r:Ze(F(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function Id(n){return n=Y(n),n&&is.test(n)?n.replace(gu,df):n}function Rd(n){return n=Y(n),n&&as.test(n)?n.replace(Xr,"\\$&"):n}var Ed=ht(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Ld=ht(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),bd=Hl("toLowerCase");function Td(n,e,t){n=Y(n),e=F(e);var r=e?ut(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return Ar(fr(i),t)+n+Ar(sr(i),t)}function Od(n,e,t){n=Y(n),e=F(e);var r=e?ut(n):0;return e&&r>>0,t?(n=Y(n),n&&(typeof e=="string"||e!=null&&!Qi(e))&&(e=Jn(e),!e&&it(n))?De(_e(n),0,t):n.split(e,t)):[]}var Md=ht(function(n,e,t){return n+(t?" ":"")+eu(e)});function Dd(n,e,t){return n=Y(n),t=t==null?0:Ze(F(t),0,n.length),e=Jn(e),n.slice(t,t+e.length)==e}function Nd(n,e,t){var r=u.templateSettings;t&&Nn(n,e,t)&&(e=o),n=Y(n),e=Wr({},e,r,Vl);var i=Wr({},e.imports,r.imports,Vl),l=bn(i),s=hi(i,l),f,c,d=0,p=e.interpolate||Yt,g="__p += '",m=di((e.escape||Yt).source+"|"+p.source+"|"+(p===vu?ms:Yt).source+"|"+(e.evaluate||Yt).source+"|$","g"),x="//# sourceURL="+(Q.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zs+"]")+` -`;n.replace(m,function(C,M,k,jn,Gn,ne){return k||(k=jn),g+=n.slice(d,ne).replace(Is,pf),M&&(f=!0,g+=`' + -__e(`+M+`) + -'`),Gn&&(c=!0,g+=`'; -`+Gn+`; -__p += '`),k&&(g+=`' + -((__t = (`+k+`)) == null ? '' : __t) + -'`),d=ne+C.length,C}),g+=`'; -`;var S=Q.call(e,"variable")&&e.variable;if(!S)g=`with (obj) { -`+g+` -} -`;else if(gs.test(S))throw new b(V);g=(c?g.replace(ns,""):g).replace(es,"$1").replace(ts,"$1;"),g="function("+(S||"obj")+`) { -`+(S?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(f?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+g+`return __p -}`;var W=Ho(function(){return K(l,x+"return "+g).apply(o,s)});if(W.source=g,Ji(W))throw W;return W}function Gd(n){return Y(n).toLowerCase()}function Hd(n){return Y(n).toUpperCase()}function kd(n,e,t){if(n=Y(n),n&&(t||e===o))return Xu(n);if(!n||!(e=Jn(e)))return n;var r=_e(n),i=_e(e),l=Ju(r,i),s=Qu(r,i)+1;return De(r,l,s).join("")}function zd(n,e,t){if(n=Y(n),n&&(t||e===o))return n.slice(0,nl(n)+1);if(!n||!(e=Jn(e)))return n;var r=_e(n),i=Qu(r,_e(e))+1;return De(r,0,i).join("")}function qd(n,e,t){if(n=Y(n),n&&(t||e===o))return n.replace(Jr,"");if(!n||!(e=Jn(e)))return n;var r=_e(n),i=Ju(r,_e(e));return De(r,i).join("")}function Kd(n,e){var t=J,r=on;if(pn(e)){var i="separator"in e?e.separator:i;t="length"in e?F(e.length):t,r="omission"in e?Jn(e.omission):r}n=Y(n);var l=n.length;if(it(n)){var s=_e(n);l=s.length}if(t>=l)return n;var f=t-ut(r);if(f<1)return r;var c=s?De(s,0,f).join(""):n.slice(0,f);if(i===o)return c+r;if(s&&(f+=c.length-f),Qi(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=di(i.source,Y(mu.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var g=d.index;c=c.slice(0,g===o?f:g)}}else if(n.indexOf(Jn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function Yd(n){return n=Y(n),n&&rs.test(n)?n.replace(pu,Af):n}var Zd=ht(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),eu=Hl("toUpperCase");function Go(n,e,t){return n=Y(n),e=t?o:e,e===o?vf(n)?If(n):sf(n):n.match(e)||[]}var Ho=U(function(n,e){try{return Vn(n,o,e)}catch(t){return Ji(t)?t:new b(t)}}),Vd=Re(function(n,e){return re(e,function(t){t=xe(t),Ce(n,t,Vi(n[t],n))}),n});function Xd(n){var e=n==null?0:n.length,t=y();return n=e?_n(n,function(r){if(typeof r[1]!="function")throw new ie(A);return[t(r[0]),r[1]]}):[],U(function(r){for(var i=-1;++iee)return[];var t=Zn,r=Bn(n,Zn);e=y(e),n-=Zn;for(var i=ci(r,e);++t0||e<0)?new G(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=F(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},G.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},G.prototype.toArray=function(){return this.take(Zn)},me(G.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],l=r||/^find/.test(e);i&&(u.prototype[e]=function(){var s=this.__wrapped__,f=r?[1]:arguments,c=s instanceof G,d=f[0],p=c||T(s),g=function(M){var k=i.apply(u,Fe([M],f));return r&&m?k[0]:k};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var m=this.__chain__,x=!!this.__actions__.length,S=l&&!m,W=c&&!x;if(!l&&p){s=W?s:new G(this);var C=n.apply(s,f);return C.__actions__.push({func:Er,args:[g],thisArg:o}),new ue(C,m)}return S&&W?n.apply(this,f):(C=this.thru(g),S?r?C.value()[0]:C.value():C)})}),re(["pop","push","shift","sort","splice","unshift"],function(n){var e=jt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var l=this.value();return e.apply(T(l)?l:[],i)}return this[t](function(s){return e.apply(T(s)?s:[],i)})}}),me(G.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";Q.call(ft,r)||(ft[r]=[]),ft[r].push({name:e,func:t})}}),ft[xr(o,ln).name]=[{name:"wrapper",func:o}],G.prototype.clone=Yf,G.prototype.reverse=Zf,G.prototype.value=Vf,u.prototype.at=Ch,u.prototype.chain=Ih,u.prototype.commit=Rh,u.prototype.next=Eh,u.prototype.plant=bh,u.prototype.reverse=Th,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Oh,u.prototype.first=u.prototype.head,bt&&(u.prototype[bt]=Lh),u},lt=Rf();ze?((ze.exports=lt)._=lt,ri._=lt):Fn._=lt}).call(kt)})(Dr,Dr.exports);var mg=Dr.exports;const wg=$p(mg),hu=dn=>(Zo("data-v-93755dee"),dn=dn(),Vo(),dn),xg={class:"my-order"},yg=hu(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Ag={class:"nav-item-input"},Sg={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},Cg=["onClick"],Ig={class:"shop-name"},Rg={class:"shop-price"},Eg={class:"unit-name"},Lg={key:0,class:"no-stock"},bg=hu(()=>v("div",null,[v("span",null,"暂无"),v("span",null,"库存")],-1)),Tg=[bg],Og={key:1,class:"no-stock"},Pg=hu(()=>v("div",null,[v("span",null,"平台"),v("span",null,"关闭")],-1)),Fg=[Pg],Wg={key:1,class:"no-data"},Bg={__name:"shop",props:{storeList:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(dn,{expose:Sn,emit:o}){const L=P(null),B=o,I=P(""),A=()=>{B("loadMore",{name:I.value})},V=$=>{if($.is_used==0)return Yn.error("该商品已被平台关闭");if($.stock==0)return Yn.warning("该商品无库存");B("changeItem",$)},cn=wg.throttle(()=>{let $={};/^\d+$/.test(I.value)?$.code=I.value:$.name=I.value,B("getStoreList",$,!0)},300);Sn({name:I});const hn=P(!1),j=()=>{hn.value=!0},en=()=>{hn.value=!1},On=()=>{var $;($=L.value)==null||$.focus()};return vt(()=>{Oe(()=>{var $;($=L.value)==null||$.focus(),j()}),En.on("shift",On)}),mt(()=>{En.off("shift",On)}),($,H)=>{const tn=an("el-input"),un=an("Search"),ln=an("el-icon"),An=an("el-button"),O=an("el-image"),q=an("el-space"),gn=an("el-empty"),Cn=Mr("loading"),R=Mr("infinite-scroll");return fn(),Ln("div",xg,[v("div",{class:Ur(["header-nav",{"input-focus":hn.value}])},[yg,v("div",Ag,[Z(tn,{modelValue:I.value,"onUpdate:modelValue":H[0]||(H[0]=D=>I.value=D),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:L,onFocus:j,onBlur:en,onKeyup:Yo(Br(cn),["enter"]),onClear:Br(cn)},null,8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:H[1]||(H[1]=(...D)=>Br(cn)&&Br(cn)(...D))},[Z(An,{class:"btn",type:"primary"},{default:mn(()=>[Z(ln,null,{default:mn(()=>[Z(un)]),_:1})]),_:1})])],2),cu((fn(),Ln("div",Sg,[dn.storeList.length?(fn(),gt(q,{key:0,wrap:""},{default:mn(()=>[(fn(!0),Ln(fu,null,au(dn.storeList,(D,X)=>(fn(),Ln("div",{class:"shop-item",key:X,onClick:J=>V(D)},[Z(O,{loading:"lazy",src:D.imgs},null,8,["src"]),v("div",Ig,Tn(D.name),1),v("div",Rg,[wn(" ¥"),v("span",null,Tn(D.sell),1),v("span",Eg,"/"+Tn(D.unit_name),1)]),D.stock==0?(fn(),Ln("div",Lg,Tg)):$r("",!0),D.is_used==0?(fn(),Ln("div",Og,Fg)):$r("",!0)],8,Cg))),128))]),_:1})):$r("",!0),dn.storeList.length?$r("",!0):(fn(),Ln("div",Wg,[Z(gn,{"image-size":200,description:"没有找到对应商品"})]))])),[[Cn,dn.loading],[R,A]])])}}},$g=zt(Bg,[["__scopeId","data-v-93755dee"]]);function Ug(dn){return Up.get("/goods/goods/mer_list",{params:dn})}const Mg={class:"shop"},Dg={class:"shop-info"},Ng={class:"shop-info-left"},Gg={class:"shop-info-right"},Hg={class:"shop-info-right-top"},kg={class:"shop-info-right-price"},zg={style:{"font-size":"1rem",color:"#777"}},qg={class:"shop-sku"},Kg={class:"title"},Yg={class:"sku"},Zg={class:"dialog-footer"},Vg={__name:"pupop",emits:["changeItem"],setup(dn,{expose:Sn,emit:o}){const L=P(!1),B=P(null),I=$=>{L.value=$},A=P({}),V=P(!1),cn=P("add"),hn=($,H="add")=>{cn.value=H,A.value=JSON.parse(JSON.stringify($))},j=o,en=()=>{A.value.cart_num||(A.value.cart_num=1),j("changeItem",A.value),L.value=!1};Sn({show:I,setForm:hn});const On=()=>{L.value&&en()};return vt(()=>{En.on("enter",On)}),mt(()=>{En.off("enter",On)}),($,H)=>{const tn=an("el-image"),un=an("el-input-number"),ln=an("el-button"),An=an("el-dialog"),O=Mr("loading");return fn(),gt(An,{modelValue:L.value,"onUpdate:modelValue":H[1]||(H[1]=q=>L.value=q),title:"购买数量",width:"650",onOpened:H[2]||(H[2]=q=>B.value.focus())},Mp({default:mn(()=>[cu((fn(),Ln("div",Mg,[v("div",Dg,[v("div",Ng,[Z(tn,{loading:"lazy",src:A.value.imgs},null,8,["src"])]),v("div",Gg,[v("div",Hg,Tn(A.value.name),1),v("div",kg,[wn(" ¥"),v("span",null,Tn(A.value.sell),1),v("span",zg," / "+Tn(A.value.unit_name),1)])])]),v("div",qg,[v("div",Kg,"购买数量 ( "+Tn(A.value.unit_name)+" )",1),v("div",Yg,[Z(un,{ref_key:"inputRef",ref:B,modelValue:A.value.cart_num,"onUpdate:modelValue":H[0]||(H[0]=q=>A.value.cart_num=q),"step-strictly":"",placeholder:"请输入数量(默认为1)",min:0,step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue"])])])])),[[O,V.value]])]),_:2},[cn.value!="add"&&A.value.attr&&A.value.attr.length==1?void 0:{name:"footer",fn:mn(()=>[v("div",Zg,[Z(ln,{class:"ok-btn",type:"primary",onClick:en},{default:mn(()=>[wn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},Xg=zt(Vg,[["__scopeId","data-v-308e2ab0"]]),wt=dn=>(Zo("data-v-33527f7d"),dn=dn(),Vo(),dn),Jg=wt(()=>v("h4",null,"选择支付方式",-1)),Qg={class:"dra-body"},jg={class:"header"},nv=wt(()=>v("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),ev={style:{color:"#f5222d","padding-bottom":"2rem"}},tv={style:{"font-size":"1.6rem"}},rv={key:0,"element-loading-text":"支付中",class:"card1"},iv=wt(()=>v("div",{class:"tips"},null,-1)),uv={key:1,class:"card2"},lv={class:"drawer-body"},ov={class:"counter"},sv={class:"received"},fv={key:0},av={key:1,style:{"font-size":"1rem",color:"#999"}},cv={key:0,class:"balance"},hv={class:"money"},_v=wt(()=>v("div",{class:"tips"},"按回车(Enter)确认支付",-1)),dv={key:1,class:"balance"},pv=wt(()=>v("div",null,"不够找零, 请支付更多金额",-1)),gv=wt(()=>v("div",{class:"tips"},"按下小键盘输入金额",-1)),vv=[pv,gv],mv={class:"keypad"},wv={class:"left"},xv={class:"right"},yv={style:{width:"100%",display:"flex","justify-content":"center"}},Av={__name:"pay",emits:["paySuccess"],setup(dn,{expose:Sn,emit:o}){const L=P(!1),B=P(1),I=P(""),A=P("");su();const V=()=>{X()},cn=()=>{Oe(()=>{setTimeout(()=>{var N;J.value=!1,I.value="",tn.value=!0,(N=A.value)==null||N.focus(),hn(B.value)},300)})},hn=N=>{B.value=N,B.value==2?window.addEventListener("keydown",ee):(window.removeEventListener("keydown",ee),Oe(()=>{var E;I.value="",(E=A.value)==null||E.focus()}))},j=P({}),en=P([]),On=N=>{j.value=N.data,en.value=N.cart_id},$=N=>{j.value.total=N.price,q.value=N.order_id},H=o,tn=P(!1),un=P(["1","2","3","4","5","6","7","8","9","0","00","."]);let ln=0;const An=/^(10|11|12|13|14|15)\d{16}$/,O=/^(25|26|27|28|29|30)\d{14,22}$/,q=P(""),gn=()=>{if(J.value=!0,A.value.blur(),q.value)Cn(q.value);else{let N;if(An.test(I.value))N="9";else if(O.test(I.value))N="13";else return J.value=!1,I.value="",A.value.focus(),Yn.error("请输入正确的支付码");qo({address_id:"",key:j.value.key,cart_id:en.value,pay_type:N,auth_code:I.value}).then(E=>{E.data.trade_state=="SUCCESS"?(L.value=!1,Yn({message:E.data.trade_state_desc||"支付成功",type:"success"}),X(E.data)):E.msg=="用户支付中"&&E.code==1&&(Yn.warning(E.msg),En.on("pay_success",z=>{Yn({message:"支付成功",type:"success"}),setTimeout(()=>{En.off("pay_success")},200),L.value=!1,X(z)}))}).catch(E=>{J.value=!1,Oe(()=>{var z;(z=A.value)==null||z.focus()})})}},Cn=N=>{let E;if(B.value==1){let z;if(An.test(I.value))z="micropay";else if(O.test(I.value))z="alipayBar";else return J.value=!1,I.value="",A.value.focus(),Yn.error("请输入正确的支付码");E={type:z,auth_code:I.value}}else E={type:"cash_payment"};Np(N,E).then(z=>{z.data.trade_state=="SUCCESS"?(L.value=!1,Yn({message:z.message=="success"?"支付成功":z.message,type:"success"}),X(z.data)):(q.value=z.data.group_order_id,R.value=0,ln=0,D(z.data.group_order_sn))}).catch(z=>{I.value="",J.value=!1,Oe(()=>{var Mn;(Mn=A.value)==null||Mn.focus()})})},R=P(0),D=N=>{N&&(R.value++,ln+=5e3,Gp({order_sn:N}).then(E=>{E.data.trade_state=="SUCCESS"?(Yn({message:E.message,type:"success"}),X()):(Yn({message:E.data.trade_state=="USERPAYING"?"用户正在支付中":E.message,type:"error"}),I.value="",J.value=!1,Oe(()=>{var z;(z=A.value)==null||z.focus()}))}).catch(E=>{tn.value&&R.value<3?setTimeout(()=>{D(N)},15e3-ln>0?15e3-ln:0):(I.value="",J.value=!1,Oe(()=>{var z;(z=A.value)==null||z.focus()}))}))},X=N=>{var E;window.removeEventListener("keydown",ee),tn.value=!1,J.value=!1,I.value="",Pn.value="",on.value=[],(E=A.value)==null||E.blur(),H("paySuccess",N),L.value=!1},J=P(!1);Sn({drawer:L,setForm:On,setRePay:$,beforeClose:X});const on=P([]),Pn=P(""),ae=Dp(()=>+Pn.value>0?(Pn.value-j.value.total).toFixed(2):-1),xt=P(!1),yt=N=>{N===-1?on.value=[]:on.value.pop(),Pn.value=on.value.length?on.value.join(""):0},Un=N=>{xt.value===!1&&(Pn.value="",xt.value=!0);let E=String(Pn.value).indexOf(".")+1,z=String(Pn.value).length-E;console.log(E,z),(E===0||z<2)&&(on.value.join("")<=9999999&&on.value.push(N),Pn.value=on.value.join("")>99999999?99999999:on.value.join(""))},ve=()=>{if(ae.value===""||ae.value===null||ae.value===void 0||+Pn.value<+j.value.total)return Yn.error("收款金额应该大于等于应收金额");q.value?Cn(q.value):qo({address_id:"",cart_id:en.value,pay_type:"17"}).then(N=>{L.value=!1,Yn({message:N.msg,type:"success"}),hn(1),X()}).catch(N=>{J.value=!1})},ee=N=>{let z=(N||window.event).keyCode;if(z==37)return hn(2);if(z==120)return En.emit("F9");if(z==27)return X();switch(N.stopPropagation(),N.preventDefault(),z){case 96:case 48:Un(0);break;case 97:case 49:Un(1);break;case 98:case 50:Un(2);break;case 99:case 51:Un(3);break;case 100:case 52:Un(4);break;case 101:case 53:Un(5);break;case 102:case 54:Un(6);break;case 103:case 55:Un(7);break;case 104:case 56:Un(8);break;case 105:case 57:Un(9);break;case 110:Un(".");break;case 190:Un(".");break;case 8:yt();break;case 13:ve();break}},je=P(!1),Ge=()=>{if(!(!L.value||je.value&&I.value.length>0)&&B.value==2)return hn(1)},Zn=()=>{if(!(!L.value||je.value&&I.value.length>0)&&B.value==1)return hn(2)};return vt(()=>{En.on("left",Ge),En.on("right",Zn)}),mt(()=>{En.off("left",Ge),En.off("right",Zn)}),(N,E)=>{const z=an("el-input"),Mn=an("el-button"),nt=an("Delete"),Nr=an("el-icon"),He=an("el-drawer"),ke=Mr("loading");return fn(),gt(He,{size:"60rem",modelValue:L.value,"onUpdate:modelValue":E[6]||(E[6]=Hn=>L.value=Hn),direction:"rtl",onOpen:cn,"before-close":X},{header:mn(()=>[Jg]),default:mn(()=>[v("div",Qg,[v("div",jg,[v("div",{class:Ur(["left",{active:B.value==1}]),onClick:E[0]||(E[0]=Hn=>hn(1))}," 微信/支付宝 ",2),v("div",{class:Ur(["right",{active:B.value==2}]),onClick:E[1]||(E[1]=Hn=>hn(2))}," 现金收款 ",2)]),nv,v("div",ev,[wn(" ¥"),v("span",tv,Tn(j.value.total),1)]),B.value==1?cu((fn(),Ln("div",rv,[Z(z,{ref_key:"codeRef",ref:A,modelValue:I.value,"onUpdate:modelValue":E[2]||(E[2]=Hn=>I.value=Hn),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Yo(gn,["enter"]),onFocus:E[3]||(E[3]=Hn=>je.value=!0),onBlur:E[4]||(E[4]=Hn=>je.value=!1)},null,8,["modelValue"]),iv])),[[ke,J.value]]):(fn(),Ln("div",uv,[v("div",lv,[v("div",ov,[v("div",sv,[Pn.value?(fn(),Ln("span",fv,Tn(Pn.value),1)):(fn(),Ln("span",av,"按下键盘输入客户支付金额"))]),ae.value>=0?(fn(),Ln("div",cv,[v("div",null,[wn(" 需找零(元):"),v("span",hv,"¥"+Tn(ae.value),1)]),_v])):(fn(),Ln("div",dv,vv)),v("div",mv,[v("div",wv,[(fn(!0),Ln(fu,null,au(un.value,Hn=>(fn(),gt(Mn,{key:Hn,onClick:At=>Un(Hn)},{default:mn(()=>[wn(Tn(Hn),1)]),_:2},1032,["onClick"]))),128))]),v("div",xv,[Z(Mn,{onClick:yt},{default:mn(()=>[Z(Nr,null,{default:mn(()=>[Z(nt)]),_:1})]),_:1}),Z(Mn,{onClick:E[5]||(E[5]=Hn=>yt(-1))},{default:mn(()=>[wn("C")]),_:1}),Z(Mn,{class:Ur(["enter",{"enter-disable":+Pn.value<+j.value.total}]),disabled:+Pn.value<+j.value.total,onClick:ve},{default:mn(()=>[wn(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:mn(()=>[v("div",yv,[Z(Mn,{class:"cancel-btn",onClick:V},{default:mn(()=>[wn("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},Sv=zt(Av,[["__scopeId","data-v-33527f7d"]]),Cv={class:"my-card"},bv={__name:"index",setup(dn){const Sn=P(null),o=P(null),L=P(null),B=P(null),I=P([]),A=su(),V=Hp(),cn=P({page_no:1,page_size:30}),hn=P(!1),j=(R={},D=!1)=>{cn.value={...cn.value,...R},D&&(I.value=[],cn.value.page_no=1,en.value=!1),hn.value=!0,Ug(cn.value).then(X=>{var J,on;hn.value=!1,((on=(J=X.data)==null?void 0:J.lists)==null?void 0:on.length){en.value||j(R)};function $(R){return/^\d+$/.test(R)}const H=(R,D="")=>{console.log(R,D);let X={goods_id:R.id,is_new:0,cart_num:R.cart_num};Ko(X).then(J=>{o.value.getList()})},tn=(R,D)=>{Sn.value.setForm(R,"add"),Sn.value.show(!0)},un=R=>{Sn.value.setForm(R,"edit"),Sn.value.show(!0)},ln=P({}),An=()=>{let R=o.value.list.map(X=>X.cart_id),D={cart_id:R};o.value.discounts>0&&(D.deduction_price=o.value.discounts.toFixed(2),D.pay_type="micropay"),zp(D).then(X=>{ln.value=X.data.order,B.value.setForm({data:X.data.order,cart_id:R})})},O=()=>{An(),B.value.drawer=!0},q=(R=null)=>{R&&gn(R),setTimeout(()=>{o.value.getList()})},gn=R=>{let D=[];o.value.list.forEach(J=>{D.push({name:J.goods_name,sell:J.sell,nums:J.cart_num,unit_name:J.unit_name,total:J.goods_total_price})});let X={mer_name:A.userInfo.merchant.mer_name,service_phone:A.userInfo.merchant.service_phone,number:R.out_trade_no,create_time:R.create_time,total_price:ln.value.total,pay_price:ln.value.total,pay_type:R.trade_type=="MICROPAY"?"微信支付":"余额支付",pay_number:R.transaction_id,goods:D};if(D.length>0&&R.out_trade_no){let J=kp(X);console.log(J),uni.getEnv(on=>{on.app&&(APPprint(content),setTimeout(()=>{isPrint=!1},4e3))}),uni.postMessage({data:{type:"print",content:J}})}},Cn=()=>{V.name=="saleHome"&&(!B.value.drawer&&o.value.list.length>0?O():B.value.beforeClose())};return vt(()=>{j(),En.on("F9",Cn)}),mt(()=>{En.off("F9",Cn)}),(R,D)=>(fn(),Ln("div",Cv,[Z(vg,{ref_key:"orderRef",ref:o,onGoPay:O,onEditPupop:un},null,512),Z(qp),Z($g,{ref_key:"shopRef",ref:L,style:{flex:"1"},storeList:I.value,loading:hn.value,onGetStoreList:j,onChangeItem:tn,onLoadMore:On},null,8,["storeList","loading"]),Z(Xg,{ref_key:"pupopRef",ref:Sn,onChangeItem:H},null,512),Z(Sv,{ref_key:"payRef",ref:B,onPaySuccess:q},null,512)]))}};export{bv as default}; diff --git a/build/assets/index-BFjUtgpE.css b/build/assets/index-DZ4o8U_J.css similarity index 80% rename from build/assets/index-BFjUtgpE.css rename to build/assets/index-DZ4o8U_J.css index ee772db..4423cfc 100644 --- a/build/assets/index-BFjUtgpE.css +++ b/build/assets/index-DZ4o8U_J.css @@ -1 +1 @@ -@charset "UTF-8";.dialog-footer .ok-btn[data-v-924edcc0]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-924edcc0]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.my-order[data-v-bb5d2c2b]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-bb5d2c2b]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-bb5d2c2b]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-bb5d2c2b]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-bb5d2c2b]{height:calc(100vh - 20.25rem);overflow-y:auto}.my-order .order-list .order-item[data-v-bb5d2c2b]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-bb5d2c2b]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-bb5d2c2b]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-bb5d2c2b]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-bb5d2c2b]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-bb5d2c2b]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-bb5d2c2b]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-bb5d2c2b]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -.0625rem .625rem #eee}.my-order .order-footer .order-total[data-v-bb5d2c2b]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-bb5d2c2b]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-bb5d2c2b]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-bb5d2c2b]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-bb5d2c2b]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-bb5d2c2b]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-bb5d2c2b]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-93755dee]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-93755dee]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-93755dee]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-93755dee]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-93755dee]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-93755dee] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-93755dee]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-93755dee]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-93755dee]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-93755dee]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-93755dee]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-93755dee]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-93755dee]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-93755dee]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-93755dee]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-93755dee]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item[data-v-93755dee]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-93755dee],.my-order .shop-list .shop-item:hover .unit-name[data-v-93755dee]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-93755dee]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-93755dee]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-308e2ab0]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-308e2ab0]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-308e2ab0]{display:flex}.shop .shop-info .shop-info-left[data-v-308e2ab0]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-308e2ab0]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-308e2ab0]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-308e2ab0]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-308e2ab0]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-308e2ab0]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-308e2ab0]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-fdafdeb0]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-fdafdeb0]{width:4rem;margin:1rem;padding:.5rem 1rem;text-align:center;border-radius:3rem;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classify .itemP-active[data-v-fdafdeb0]{background-color:#1890ff;color:#fff}.active-card .title[data-v-fdafdeb0]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-fdafdeb0]{display:flex}.active-card .list div[data-v-fdafdeb0]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-fdafdeb0]{color:#1890ff}[data-v-fdafdeb0]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.dialog-footer .ok-btn[data-v-924edcc0]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-924edcc0]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.my-order[data-v-bb5d2c2b]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-bb5d2c2b]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-bb5d2c2b]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-bb5d2c2b]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-bb5d2c2b]{height:calc(100vh - 20.25rem);overflow-y:auto}.my-order .order-list .order-item[data-v-bb5d2c2b]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-bb5d2c2b]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-bb5d2c2b]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-bb5d2c2b]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-bb5d2c2b]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-bb5d2c2b]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-bb5d2c2b]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-bb5d2c2b]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -.0625rem .625rem #eee}.my-order .order-footer .order-total[data-v-bb5d2c2b]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-bb5d2c2b]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-bb5d2c2b]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-bb5d2c2b]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-bb5d2c2b]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-bb5d2c2b]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-bb5d2c2b]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-8f10d458]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-8f10d458]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-8f10d458]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-8f10d458]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-8f10d458]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-8f10d458] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-8f10d458]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-8f10d458]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-8f10d458]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-8f10d458]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-8f10d458]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-8f10d458]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-8f10d458]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-8f10d458]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-8f10d458]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-8f10d458]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item[data-v-8f10d458]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-8f10d458],.my-order .shop-list .shop-item:hover .unit-name[data-v-8f10d458]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-8f10d458]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-8f10d458]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-308e2ab0]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-308e2ab0]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-308e2ab0]{display:flex}.shop .shop-info .shop-info-left[data-v-308e2ab0]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-308e2ab0]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-308e2ab0]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-308e2ab0]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-308e2ab0]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-308e2ab0]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-308e2ab0]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-fdafdeb0]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-fdafdeb0]{width:4rem;margin:1rem;padding:.5rem 1rem;text-align:center;border-radius:3rem;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classify .itemP-active[data-v-fdafdeb0]{background-color:#1890ff;color:#fff}.active-card .title[data-v-fdafdeb0]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-fdafdeb0]{display:flex}.active-card .list div[data-v-fdafdeb0]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-fdafdeb0]{color:#1890ff}[data-v-fdafdeb0]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/build/assets/index-lUdLNBZu.js b/build/assets/index-lUdLNBZu.js new file mode 100644 index 0000000..df1052f --- /dev/null +++ b/build/assets/index-lUdLNBZu.js @@ -0,0 +1,27 @@ +import{_ as zt,r as F,o as vt,m as En,a as mt,b as an,c as fn,d as gt,w as vn,e as v,f as Z,g as mn,t as Tn,n as Oe,E as Yn,u as su,h as Ln,F as fu,i as au,j as Bp,k as Wp,l as Ko,p as kt,q as $p,s as Mr,v as Yo,x as Wr,y as Ur,z as cu,A as $r,B as Zo,C as Vo,D as Up,G as Mp,H as Dp,I as qo,J as Np,K as Gp,L as Hp,M as kp,N as zp}from"./index-BpHEZm7m.js";import{p as qp}from"./padding-Dv3RYtNt.js";/* empty css */import"./moment-Cl4UOzQZ.js";const Kp={class:"price"},Yp={class:"flex"},Zp={style:{margin:"0.625rem","padding-bottom":"40px"}},Vp={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Xp={class:"dialog-footer"},Jp={__name:"price",emits:["changeAllPrice"],setup(_n,{expose:Sn,emit:o}){const E=F(!1),$=F(null),I=F(0),A=(nn=!0,R=0)=>{V.value.nowPrice="",V.value.percentage="",E.value=nn,I.value=R,Oe(()=>{setTimeout(()=>{var J;(J=$.value)==null||J.focus()},150)})},V=F({nowPrice:"",percentage:""}),cn=nn=>{V.value.percentage=(nn/I.value*100).toFixed(2)},wn=nn=>{V.value.nowPrice=(I.value*nn/100).toFixed(2)},X=o,j=()=>{if(V.value.percentage>100)return V.value.nowPrice="",V.value.percentage="",Yn.error("改价金额不能大于当前订单金额");if(V.value.nowPrice<=0)return V.value.nowPrice="",V.value.percentage="",Yn.error("金额不能小于0");X("changeAllPrice",V.value.nowPrice)};Sn({show:A,dialogVisible:E});const Bn=()=>{E.value&&j()};return vt(()=>{En.on("enter",Bn)}),mt(()=>{En.off("enter",Bn)}),(nn,R)=>{const J=an("el-input"),ln=an("el-button"),on=an("el-dialog");return fn(),gt(on,{modelValue:E.value,"onUpdate:modelValue":R[2]||(R[2]=An=>E.value=An),title:"订单改价",width:"650"},{footer:vn(()=>[v("div",Xp,[Z(ln,{class:"ok-btn",type:"primary",onClick:j},{default:vn(()=>[mn(" 确定 (Enter) ")]),_:1})])]),default:vn(()=>[v("div",Kp,[v("div",Yp,[Z(J,{ref_key:"priceRef",ref:$,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:V.value.nowPrice,"onUpdate:modelValue":R[0]||(R[0]=An=>V.value.nowPrice=An),type:"number",placeholder:"请输入改价后的价格",onInput:cn},{suffix:vn(()=>[mn("元")]),_:1},8,["modelValue"]),Z(J,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:V.value.percentage,"onUpdate:modelValue":R[1]||(R[1]=An=>V.value.percentage=An),type:"number",placeholder:"请输入比例",onInput:wn},{suffix:vn(()=>[mn("%")]),_:1},8,["modelValue"])]),v("div",Zp,[mn(" 改价后金额: "),v("span",Vp,"¥"+Tn(V.value.nowPrice||I.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Qp=zt(Jp,[["__scopeId","data-v-924edcc0"]]),jp={class:"my-order"},ng={class:"header-nav"},eg={class:"nav-item"},tg={class:"order-list"},rg={class:"order-item-info"},ig={class:"order-item-title"},ug={class:"title"},lg=["onClick"],og={class:"order-item-sku"},sg={class:"order-item-price"},fg={class:"order-footer"},ag={class:"order-total"},cg={class:"price"},hg={class:"total-item"},_g={style:{"font-size":"1.4rem"}},dg={class:"total-item"},pg={class:"order-btn"},gg={__name:"order",emits:["goPay","editAttr"],setup(_n,{expose:Sn,emit:o}){const E=F([]),$=F(0),I=F(0),A=F(0);su();const V=()=>{let P=[];E.value.map(z=>{P.push(z.cart_id)}),P.length!=0&&wn(P)},cn=P=>{E.value=E.value.filter(z=>z.cart_id!=P),wn([P])},wn=P=>{Bp({cart_id:P}).then(z=>{console.log(z),X()})},X=()=>{$.value=0,I.value=0,A.value=0,Wp().then(P=>{var z,pn;((pn=(z=P.data)==null?void 0:z.lists)==null?void 0:pn.length)>0?(E.value=P.data.lists,$.value=+P.data.extend.total_price,I.value=$.value):E.value=[]})};X();const j=o,Bn=()=>{j("goPay")},nn=(P,z)=>{Ko({goods_id:P.goods_id,is_new:0,cart_num:P.cart_num}).then(pn=>{$.value=0,E.value.forEach(Cn=>{$.value+=Cn.sell*Cn.cart_num}),I.value=$.value})},R=P=>{A.value=I.value-P,$.value=+P,Oe(()=>{setTimeout(()=>{ln(!1)},150)})};F(0);const J=F(null),ln=(P=!0)=>{J.value.show(P,I.value)};Sn({getList:X,list:E,discounts:A,allPrice:$});const on=()=>{J.value.dialogVisible?J.value.dialogVisible=!1:ln()},An=()=>{E.value.length>0&&V()};return vt(()=>{En.on("insert",on),En.on("delete",An)}),mt(()=>{En.off("insert",on),En.off("delete",An)}),(P,z)=>{const pn=an("Delete"),Cn=an("el-icon"),L=an("el-empty"),tn=an("el-image"),U=an("el-input-number"),K=an("el-button");return fn(),Ln("div",jp,[v("div",ng,[v("div",eg,[mn(" 已选购 "),v("span",null,Tn(E.value.length),1),mn(" 款 ")]),v("div",{class:"nav-item-clear",onClick:V},[Z(Cn,null,{default:vn(()=>[Z(pn)]),_:1}),mn("清空 (Delete) ")])]),v("div",tg,[E.value.length==0?(fn(),gt(L,{key:0,description:"请点击右侧添加商品"})):(fn(!0),Ln(fu,{key:1},au(E.value,(rn,On)=>(fn(),Ln("div",{class:"order-item",key:On},[Z(tn,{loading:"lazy",class:"order-item-img",src:rn.imgs},null,8,["src"]),v("div",rg,[v("div",ig,[v("div",ug,Tn(rn.goods_name),1),v("div",{class:"delete",onClick:ae=>cn(rn.cart_id)},"删除",8,lg)]),v("div",og,[v("span",null,Tn(rn.unit_name),1)]),v("div",sg,[v("div",null,[mn(" ¥"),v("span",null,Tn(rn.sell),1)]),v("div",null,[Z(U,{modelValue:rn.cart_num,"onUpdate:modelValue":ae=>rn.cart_num=ae,"step-strictly":"",min:1,step:1,onChange:ae=>nn(rn)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),v("div",fg,[v("div",ag,[v("div",cg,[v("div",hg,[mn(" 实付: "),v("span",null,[mn("¥"),v("span",_g,Tn($.value.toFixed(2)),1)])]),v("div",dg,[mn(" 优惠: "),v("span",null,[mn("¥"),v("span",null,Tn(A.value.toFixed(2)),1)])])])]),v("div",pg,[Z(K,{class:"btn",type:"primary",onClick:Bn,disabled:E.value.length==0},{default:vn(()=>[mn("立即结账 (F9)")]),_:1},8,["disabled"])])]),Z(Qp,{ref_key:"priceRef",ref:J,onChangeAllPrice:R},null,512)])}}},vg=zt(gg,[["__scopeId","data-v-bb5d2c2b"]]);var Dr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Dr.exports;(function(_n,Sn){(function(){var o,E="4.17.21",$=200,I="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",A="Expected a function",V="Invalid `variable` option passed into `_.template`",cn="__lodash_hash_undefined__",wn=500,X="__lodash_placeholder__",j=1,Bn=2,nn=4,R=1,J=2,ln=1,on=2,An=4,P=8,z=16,pn=32,Cn=64,L=128,tn=256,U=512,K=30,rn="...",On=800,ae=16,xt=1,yt=2,Un=3,ve=1/0,ee=9007199254740991,je=17976931348623157e292,Ge=NaN,Zn=4294967295,N=Zn-1,b=Zn>>>1,k=[["ary",L],["bind",ln],["bindKey",on],["curry",P],["curryRight",z],["flip",U],["partial",pn],["partialRight",Cn],["rearg",tn]],Mn="[object Arguments]",nt="[object Array]",Nr="[object AsyncFunction]",He="[object Boolean]",ke="[object Date]",Hn="[object DOMException]",At="[object Error]",qt="[object Function]",_u="[object GeneratorFunction]",ce="[object Map]",St="[object Number]",Xo="[object Null]",ye="[object Object]",du="[object Promise]",Jo="[object Proxy]",Ct="[object RegExp]",he="[object Set]",It="[object String]",Kt="[object Symbol]",Qo="[object Undefined]",Rt="[object WeakMap]",jo="[object WeakSet]",Et="[object ArrayBuffer]",et="[object DataView]",Gr="[object Float32Array]",Hr="[object Float64Array]",kr="[object Int8Array]",zr="[object Int16Array]",qr="[object Int32Array]",Kr="[object Uint8Array]",Yr="[object Uint8ClampedArray]",Zr="[object Uint16Array]",Vr="[object Uint32Array]",ns=/\b__p \+= '';/g,es=/\b(__p \+=) '' \+/g,ts=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pu=/&(?:amp|lt|gt|quot|#39);/g,gu=/[&<>"']/g,rs=RegExp(pu.source),is=RegExp(gu.source),us=/<%-([\s\S]+?)%>/g,ls=/<%([\s\S]+?)%>/g,vu=/<%=([\s\S]+?)%>/g,os=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ss=/^\w*$/,fs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xr=/[\\^$.*+?()[\]{}|]/g,as=RegExp(Xr.source),Jr=/^\s+/,cs=/\s/,hs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_s=/\{\n\/\* \[wrapped with (.+)\] \*/,ds=/,? & /,ps=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gs=/[()=,{}\[\]\/\s]/,vs=/\\(\\)?/g,ms=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mu=/\w*$/,ws=/^[-+]0x[0-9a-f]+$/i,xs=/^0b[01]+$/i,ys=/^\[object .+?Constructor\]$/,As=/^0o[0-7]+$/i,Ss=/^(?:0|[1-9]\d*)$/,Cs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yt=/($^)/,Is=/['\n\r\u2028\u2029\\]/g,Zt="\\ud800-\\udfff",Rs="\\u0300-\\u036f",Es="\\ufe20-\\ufe2f",Ls="\\u20d0-\\u20ff",wu=Rs+Es+Ls,xu="\\u2700-\\u27bf",yu="a-z\\xdf-\\xf6\\xf8-\\xff",bs="\\xac\\xb1\\xd7\\xf7",Ts="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Os="\\u2000-\\u206f",Ps=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Au="A-Z\\xc0-\\xd6\\xd8-\\xde",Su="\\ufe0e\\ufe0f",Cu=bs+Ts+Os+Ps,Qr="['’]",Fs="["+Zt+"]",Iu="["+Cu+"]",Vt="["+wu+"]",Ru="\\d+",Bs="["+xu+"]",Eu="["+yu+"]",Lu="[^"+Zt+Cu+Ru+xu+yu+Au+"]",jr="\\ud83c[\\udffb-\\udfff]",Ws="(?:"+Vt+"|"+jr+")",bu="[^"+Zt+"]",ni="(?:\\ud83c[\\udde6-\\uddff]){2}",ei="[\\ud800-\\udbff][\\udc00-\\udfff]",tt="["+Au+"]",Tu="\\u200d",Ou="(?:"+Eu+"|"+Lu+")",$s="(?:"+tt+"|"+Lu+")",Pu="(?:"+Qr+"(?:d|ll|m|re|s|t|ve))?",Fu="(?:"+Qr+"(?:D|LL|M|RE|S|T|VE))?",Bu=Ws+"?",Wu="["+Su+"]?",Us="(?:"+Tu+"(?:"+[bu,ni,ei].join("|")+")"+Wu+Bu+")*",Ms="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ds="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$u=Wu+Bu+Us,Ns="(?:"+[Bs,ni,ei].join("|")+")"+$u,Gs="(?:"+[bu+Vt+"?",Vt,ni,ei,Fs].join("|")+")",Hs=RegExp(Qr,"g"),ks=RegExp(Vt,"g"),ti=RegExp(jr+"(?="+jr+")|"+Gs+$u,"g"),zs=RegExp([tt+"?"+Eu+"+"+Pu+"(?="+[Iu,tt,"$"].join("|")+")",$s+"+"+Fu+"(?="+[Iu,tt+Ou,"$"].join("|")+")",tt+"?"+Ou+"+"+Pu,tt+"+"+Fu,Ds,Ms,Ru,Ns].join("|"),"g"),qs=RegExp("["+Tu+Zt+wu+Su+"]"),Ks=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ys=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zs=-1,sn={};sn[Gr]=sn[Hr]=sn[kr]=sn[zr]=sn[qr]=sn[Kr]=sn[Yr]=sn[Zr]=sn[Vr]=!0,sn[Mn]=sn[nt]=sn[Et]=sn[He]=sn[et]=sn[ke]=sn[At]=sn[qt]=sn[ce]=sn[St]=sn[ye]=sn[Ct]=sn[he]=sn[It]=sn[Rt]=!1;var un={};un[Mn]=un[nt]=un[Et]=un[et]=un[He]=un[ke]=un[Gr]=un[Hr]=un[kr]=un[zr]=un[qr]=un[ce]=un[St]=un[ye]=un[Ct]=un[he]=un[It]=un[Kt]=un[Kr]=un[Yr]=un[Zr]=un[Vr]=!0,un[At]=un[qt]=un[Rt]=!1;var Vs={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Xs={"&":"&","<":"<",">":">",'"':""","'":"'"},Js={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qs={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},js=parseFloat,nf=parseInt,Uu=typeof kt=="object"&&kt&&kt.Object===Object&&kt,ef=typeof self=="object"&&self&&self.Object===Object&&self,Pn=Uu||ef||Function("return this")(),ri=Sn&&!Sn.nodeType&&Sn,ze=ri&&!0&&_n&&!_n.nodeType&&_n,Mu=ze&&ze.exports===ri,ii=Mu&&Uu.process,te=function(){try{var a=ze&&ze.require&&ze.require("util").types;return a||ii&&ii.binding&&ii.binding("util")}catch{}}(),Du=te&&te.isArrayBuffer,Nu=te&&te.isDate,Gu=te&&te.isMap,Hu=te&&te.isRegExp,ku=te&&te.isSet,zu=te&&te.isTypedArray;function Vn(a,_,h){switch(h.length){case 0:return a.call(_);case 1:return a.call(_,h[0]);case 2:return a.call(_,h[0],h[1]);case 3:return a.call(_,h[0],h[1],h[2])}return a.apply(_,h)}function tf(a,_,h,w){for(var T=-1,q=a==null?0:a.length;++T-1}function ui(a,_,h){for(var w=-1,T=a==null?0:a.length;++w-1;);return h}function Qu(a,_){for(var h=a.length;h--&&rt(_,a[h],0)>-1;);return h}function hf(a,_){for(var h=a.length,w=0;h--;)a[h]===_&&++w;return w}var _f=fi(Vs),df=fi(Xs);function pf(a){return"\\"+Qs[a]}function gf(a,_){return a==null?o:a[_]}function it(a){return qs.test(a)}function vf(a){return Ks.test(a)}function mf(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function _i(a){var _=-1,h=Array(a.size);return a.forEach(function(w,T){h[++_]=[T,w]}),h}function ju(a,_){return function(h){return a(_(h))}}function Be(a,_){for(var h=-1,w=a.length,T=0,q=[];++h-1}function ua(n,e){var t=this.__data__,r=_r(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}Ae.prototype.clear=ea,Ae.prototype.delete=ta,Ae.prototype.get=ra,Ae.prototype.has=ia,Ae.prototype.set=ua;function Se(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function le(n,e,t,r,i,l){var s,f=e&j,c=e&Bn,d=e&nn;if(t&&(s=i?t(n,r,i,l):t(n)),s!==o)return s;if(!dn(n))return n;var p=O(n);if(p){if(s=fc(n),!f)return kn(n,s)}else{var g=$n(n),m=g==qt||g==_u;if(Ne(n))return Wl(n,f);if(g==ye||g==Mn||m&&!i){if(s=c||m?{}:no(n),!f)return c?Qa(n,ya(s,n)):Ja(n,cl(s,n))}else{if(!un[g])return i?n:{};s=ac(n,g,f)}}l||(l=new de);var x=l.get(n);if(x)return x;l.set(n,s),To(n)?n.forEach(function(C){s.add(le(C,e,t,C,n,l))}):Lo(n)&&n.forEach(function(C,D){s.set(D,le(C,e,t,D,n,l))});var S=d?c?Di:Mi:c?qn:bn,W=p?o:S(n);return re(W||n,function(C,D){W&&(D=C,C=n[D]),Bt(s,D,le(C,e,t,D,n,l))}),s}function Aa(n){var e=bn(n);return function(t){return hl(t,n,e)}}function hl(n,e,t){var r=t.length;if(n==null)return!r;for(n=en(n);r--;){var i=t[r],l=e[i],s=n[i];if(s===o&&!(i in n)||!l(s))return!1}return!0}function _l(n,e,t){if(typeof n!="function")throw new ie(A);return Gt(function(){n.apply(o,t)},e)}function Wt(n,e,t,r){var i=-1,l=Xt,s=!0,f=n.length,c=[],d=e.length;if(!f)return c;t&&(e=hn(e,Xn(t))),r?(l=ui,s=!1):e.length>=$&&(l=Lt,s=!1,e=new Ye(e));n:for(;++ii?0:i+t),r=r===o||r>i?i:B(r),r<0&&(r+=i),r=t>r?0:Po(r);t0&&t(f)?e>1?Fn(f,e-1,t,r,i):Fe(i,f):r||(i[i.length]=f)}return i}var xi=Gl(),gl=Gl(!0);function me(n,e){return n&&xi(n,e,bn)}function yi(n,e){return n&&gl(n,e,bn)}function pr(n,e){return Pe(e,function(t){return Le(n[t])})}function Ve(n,e){e=Me(e,n);for(var t=0,r=e.length;n!=null&&te}function Ia(n,e){return n!=null&&Q.call(n,e)}function Ra(n,e){return n!=null&&e in en(n)}function Ea(n,e,t){return n>=Wn(e,t)&&n=120&&p.length>=120)?new Ye(s&&p):o}p=n[0];var g=-1,m=f[0];n:for(;++g-1;)f!==n&&lr.call(f,c,1),lr.call(n,c,1);return n}function El(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==l){var l=i;Ee(i)?lr.call(n,i,1):Oi(n,i)}}return n}function Li(n,e){return n+fr(ol()*(e-n+1))}function Na(n,e,t,r){for(var i=-1,l=Rn(sr((e-n)/(t||1)),0),s=h(l);l--;)s[r?l:++i]=n,n+=t;return s}function bi(n,e){var t="";if(!n||e<1||e>ee)return t;do e%2&&(t+=n),e=fr(e/2),e&&(n+=n);while(e);return t}function M(n,e){return Ki(ro(n,e,Kn),n+"")}function Ga(n){return al(pt(n))}function Ha(n,e){var t=pt(n);return Rr(t,Ze(e,0,t.length))}function Mt(n,e,t,r){if(!dn(n))return n;e=Me(e,n);for(var i=-1,l=e.length,s=l-1,f=n;f!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var l=h(i);++r>>1,s=n[l];s!==null&&!Qn(s)&&(t?s<=e:s=$){var d=e?null:tc(n);if(d)return Qt(d);s=!1,i=Lt,c=new Ye}else c=e?[]:f;n:for(;++r=r?n:oe(n,e,t)}var Bl=Ff||function(n){return Pn.clearTimeout(n)};function Wl(n,e){if(e)return n.slice();var t=n.length,r=tl?tl(t):new n.constructor(t);return n.copy(r),r}function Wi(n){var e=new n.constructor(n.byteLength);return new ir(e).set(new ir(n)),e}function Ya(n,e){var t=e?Wi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Za(n){var e=new n.constructor(n.source,mu.exec(n));return e.lastIndex=n.lastIndex,e}function Va(n){return Ft?en(Ft.call(n)):{}}function $l(n,e){var t=e?Wi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function Ul(n,e){if(n!==e){var t=n!==o,r=n===null,i=n===n,l=Qn(n),s=e!==o,f=e===null,c=e===e,d=Qn(e);if(!f&&!d&&!l&&n>e||l&&s&&c&&!f&&!d||r&&s&&c||!t&&c||!i)return 1;if(!r&&!l&&!d&&n=f)return c;var d=t[r];return c*(d=="desc"?-1:1)}}return n.index-e.index}function Ml(n,e,t,r){for(var i=-1,l=n.length,s=t.length,f=-1,c=e.length,d=Rn(l-s,0),p=h(c+d),g=!r;++f1?t[i-1]:o,s=i>2?t[2]:o;for(l=n.length>3&&typeof l=="function"?(i--,l):o,s&&Nn(t[0],t[1],s)&&(l=i<3?o:l,i=1),e=en(e);++r-1?i[l?e[s]:s]:o}}function zl(n){return Re(function(e){var t=e.length,r=t,i=ue.prototype.thru;for(n&&e.reverse();r--;){var l=e[r];if(typeof l!="function")throw new ie(A);if(i&&!s&&Cr(l)=="wrapper")var s=new ue([],!0)}for(r=s?r:t;++r1&&H.reverse(),p&&cf))return!1;var d=l.get(n),p=l.get(e);if(d&&p)return d==e&&p==n;var g=-1,m=!0,x=t&J?new Ye:o;for(l.set(n,e),l.set(e,n);++g1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(hs,`{ +/* [wrapped with `+e+`] */ +`)}function hc(n){return O(n)||Qe(n)||!!(ul&&n&&n[ul])}function Ee(n,e){var t=typeof n;return e=e??ee,!!e&&(t=="number"||t!="symbol"&&Ss.test(n))&&n>-1&&n%1==0&&n0){if(++e>=On)return arguments[0]}else e=0;return n.apply(o,arguments)}}function Rr(n,e){var t=-1,r=n.length,i=r-1;for(e=e===o?r:e;++t1?n[e-1]:o;return t=typeof t=="function"?(n.pop(),t):o,go(n,t)});function vo(n){var e=u(n);return e.__chain__=!0,e}function Sh(n,e){return e(n),n}function Er(n,e){return e(n)}var Ch=Re(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(l){return wi(l,n)};return e>1||this.__actions__.length||!(r instanceof G)||!Ee(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Er,args:[i],thisArg:o}),new ue(r,this.__chain__).thru(function(l){return e&&!l.length&&l.push(o),l}))});function Ih(){return vo(this)}function Rh(){return new ue(this.value(),this.__chain__)}function Eh(){this.__values__===o&&(this.__values__=Oo(this.value()));var n=this.__index__>=this.__values__.length,e=n?o:this.__values__[this.__index__++];return{done:n,value:e}}function Lh(){return this}function bh(n){for(var e,t=this;t instanceof hr;){var r=fo(t);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Th(){var n=this.__wrapped__;if(n instanceof G){var e=n;return this.__actions__.length&&(e=new G(this)),e=e.reverse(),e.__actions__.push({func:Er,args:[Yi],thisArg:o}),new ue(e,this.__chain__)}return this.thru(Yi)}function Oh(){return Pl(this.__wrapped__,this.__actions__)}var Ph=wr(function(n,e,t){Q.call(n,t)?++n[t]:Ce(n,t,1)});function Fh(n,e,t){var r=O(n)?qu:Sa;return t&&Nn(n,e,t)&&(e=o),r(n,y(e,3))}function Bh(n,e){var t=O(n)?Pe:pl;return t(n,y(e,3))}var Wh=kl(ao),$h=kl(co);function Uh(n,e){return Fn(Lr(n,e),1)}function Mh(n,e){return Fn(Lr(n,e),ve)}function Dh(n,e,t){return t=t===o?1:B(t),Fn(Lr(n,e),t)}function mo(n,e){var t=O(n)?re:$e;return t(n,y(e,3))}function wo(n,e){var t=O(n)?rf:dl;return t(n,y(e,3))}var Nh=wr(function(n,e,t){Q.call(n,t)?n[t].push(e):Ce(n,t,[e])});function Gh(n,e,t,r){n=zn(n)?n:pt(n),t=t&&!r?B(t):0;var i=n.length;return t<0&&(t=Rn(i+t,0)),Fr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&rt(n,e,t)>-1}var Hh=M(function(n,e,t){var r=-1,i=typeof e=="function",l=zn(n)?h(n.length):[];return $e(n,function(s){l[++r]=i?Vn(e,s,t):$t(s,e,t)}),l}),kh=wr(function(n,e,t){Ce(n,t,e)});function Lr(n,e){var t=O(n)?hn:yl;return t(n,y(e,3))}function zh(n,e,t,r){return n==null?[]:(O(e)||(e=e==null?[]:[e]),t=r?o:t,O(t)||(t=t==null?[]:[t]),Il(n,e,t))}var qh=wr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Kh(n,e,t){var r=O(n)?li:Vu,i=arguments.length<3;return r(n,y(e,4),t,i,$e)}function Yh(n,e,t){var r=O(n)?uf:Vu,i=arguments.length<3;return r(n,y(e,4),t,i,dl)}function Zh(n,e){var t=O(n)?Pe:pl;return t(n,Or(y(e,3)))}function Vh(n){var e=O(n)?al:Ga;return e(n)}function Xh(n,e,t){(t?Nn(n,e,t):e===o)?e=1:e=B(e);var r=O(n)?ma:Ha;return r(n,e)}function Jh(n){var e=O(n)?wa:za;return e(n)}function Qh(n){if(n==null)return 0;if(zn(n))return Fr(n)?ut(n):n.length;var e=$n(n);return e==ce||e==he?n.size:Ii(n).length}function jh(n,e,t){var r=O(n)?oi:qa;return t&&Nn(n,e,t)&&(e=o),r(n,y(e,3))}var n_=M(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Nn(n,e[0],e[1])?e=[]:t>2&&Nn(e[0],e[1],e[2])&&(e=[e[0]]),Il(n,Fn(e,1),[])}),br=Bf||function(){return Pn.Date.now()};function e_(n,e){if(typeof e!="function")throw new ie(A);return n=B(n),function(){if(--n<1)return e.apply(this,arguments)}}function xo(n,e,t){return e=t?o:e,e=n&&e==null?n.length:e,Ie(n,L,o,o,o,o,e)}function yo(n,e){var t;if(typeof e!="function")throw new ie(A);return n=B(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Vi=M(function(n,e,t){var r=ln;if(t.length){var i=Be(t,_t(Vi));r|=pn}return Ie(n,r,e,t,i)}),Ao=M(function(n,e,t){var r=ln|on;if(t.length){var i=Be(t,_t(Ao));r|=pn}return Ie(e,r,n,t,i)});function So(n,e,t){e=t?o:e;var r=Ie(n,P,o,o,o,o,o,e);return r.placeholder=So.placeholder,r}function Co(n,e,t){e=t?o:e;var r=Ie(n,z,o,o,o,o,o,e);return r.placeholder=Co.placeholder,r}function Io(n,e,t){var r,i,l,s,f,c,d=0,p=!1,g=!1,m=!0;if(typeof n!="function")throw new ie(A);e=fe(e)||0,dn(t)&&(p=!!t.leading,g="maxWait"in t,l=g?Rn(fe(t.maxWait)||0,e):l,m="trailing"in t?!!t.trailing:m);function x(yn){var ge=r,Te=i;return r=i=o,d=yn,s=n.apply(Te,ge),s}function S(yn){return d=yn,f=Gt(D,e),p?x(yn):s}function W(yn){var ge=yn-c,Te=yn-d,zo=e-ge;return g?Wn(zo,l-Te):zo}function C(yn){var ge=yn-c,Te=yn-d;return c===o||ge>=e||ge<0||g&&Te>=l}function D(){var yn=br();if(C(yn))return H(yn);f=Gt(D,W(yn))}function H(yn){return f=o,m&&r?x(yn):(r=i=o,s)}function jn(){f!==o&&Bl(f),d=0,r=c=i=f=o}function Gn(){return f===o?s:H(br())}function ne(){var yn=br(),ge=C(yn);if(r=arguments,i=this,c=yn,ge){if(f===o)return S(c);if(g)return Bl(f),f=Gt(D,e),x(c)}return f===o&&(f=Gt(D,e)),s}return ne.cancel=jn,ne.flush=Gn,ne}var t_=M(function(n,e){return _l(n,1,e)}),r_=M(function(n,e,t){return _l(n,fe(e)||0,t)});function i_(n){return Ie(n,U)}function Tr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new ie(A);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],l=t.cache;if(l.has(i))return l.get(i);var s=n.apply(this,r);return t.cache=l.set(i,s)||l,s};return t.cache=new(Tr.Cache||Se),t}Tr.Cache=Se;function Or(n){if(typeof n!="function")throw new ie(A);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function u_(n){return yo(2,n)}var l_=Ka(function(n,e){e=e.length==1&&O(e[0])?hn(e[0],Xn(y())):hn(Fn(e,1),Xn(y()));var t=e.length;return M(function(r){for(var i=-1,l=Wn(r.length,t);++i=e}),Qe=ml(function(){return arguments}())?ml:function(n){return gn(n)&&Q.call(n,"callee")&&!il.call(n,"callee")},O=h.isArray,y_=Du?Xn(Du):ba;function zn(n){return n!=null&&Pr(n.length)&&!Le(n)}function xn(n){return gn(n)&&zn(n)}function A_(n){return n===!0||n===!1||gn(n)&&Dn(n)==He}var Ne=$f||ou,S_=Nu?Xn(Nu):Ta;function C_(n){return gn(n)&&n.nodeType===1&&!Ht(n)}function I_(n){if(n==null)return!0;if(zn(n)&&(O(n)||typeof n=="string"||typeof n.splice=="function"||Ne(n)||dt(n)||Qe(n)))return!n.length;var e=$n(n);if(e==ce||e==he)return!n.size;if(Nt(n))return!Ii(n).length;for(var t in n)if(Q.call(n,t))return!1;return!0}function R_(n,e){return Ut(n,e)}function E_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?Ut(n,e,o,t):!!r}function Ji(n){if(!gn(n))return!1;var e=Dn(n);return e==At||e==Hn||typeof n.message=="string"&&typeof n.name=="string"&&!Ht(n)}function L_(n){return typeof n=="number"&&ll(n)}function Le(n){if(!dn(n))return!1;var e=Dn(n);return e==qt||e==_u||e==Nr||e==Jo}function Eo(n){return typeof n=="number"&&n==B(n)}function Pr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ee}function dn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function gn(n){return n!=null&&typeof n=="object"}var Lo=Gu?Xn(Gu):Pa;function b_(n,e){return n===e||Ci(n,e,Gi(e))}function T_(n,e,t){return t=typeof t=="function"?t:o,Ci(n,e,Gi(e),t)}function O_(n){return bo(n)&&n!=+n}function P_(n){if(pc(n))throw new T(I);return wl(n)}function F_(n){return n===null}function B_(n){return n==null}function bo(n){return typeof n=="number"||gn(n)&&Dn(n)==St}function Ht(n){if(!gn(n)||Dn(n)!=ye)return!1;var e=ur(n);if(e===null)return!0;var t=Q.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&er.call(t)==Tf}var Qi=Hu?Xn(Hu):Fa;function W_(n){return Eo(n)&&n>=-ee&&n<=ee}var To=ku?Xn(ku):Ba;function Fr(n){return typeof n=="string"||!O(n)&&gn(n)&&Dn(n)==It}function Qn(n){return typeof n=="symbol"||gn(n)&&Dn(n)==Kt}var dt=zu?Xn(zu):Wa;function $_(n){return n===o}function U_(n){return gn(n)&&$n(n)==Rt}function M_(n){return gn(n)&&Dn(n)==jo}var D_=Sr(Ri),N_=Sr(function(n,e){return n<=e});function Oo(n){if(!n)return[];if(zn(n))return Fr(n)?_e(n):kn(n);if(bt&&n[bt])return mf(n[bt]());var e=$n(n),t=e==ce?_i:e==he?Qt:pt;return t(n)}function be(n){if(!n)return n===0?n:0;if(n=fe(n),n===ve||n===-ve){var e=n<0?-1:1;return e*je}return n===n?n:0}function B(n){var e=be(n),t=e%1;return e===e?t?e-t:e:0}function Po(n){return n?Ze(B(n),0,Zn):0}function fe(n){if(typeof n=="number")return n;if(Qn(n))return Ge;if(dn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=dn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Xu(n);var t=xs.test(n);return t||As.test(n)?nf(n.slice(2),t?2:8):ws.test(n)?Ge:+n}function Fo(n){return we(n,qn(n))}function G_(n){return n?Ze(B(n),-ee,ee):n===0?n:0}function Y(n){return n==null?"":Jn(n)}var H_=ct(function(n,e){if(Nt(e)||zn(e)){we(e,bn(e),n);return}for(var t in e)Q.call(e,t)&&Bt(n,t,e[t])}),Bo=ct(function(n,e){we(e,qn(e),n)}),Br=ct(function(n,e,t,r){we(e,qn(e),n,r)}),k_=ct(function(n,e,t,r){we(e,bn(e),n,r)}),z_=Re(wi);function q_(n,e){var t=at(n);return e==null?t:cl(t,e)}var K_=M(function(n,e){n=en(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&Nn(e[0],e[1],i)&&(r=1);++t1),l}),we(n,Di(n),t),r&&(t=le(t,j|Bn|nn,rc));for(var i=e.length;i--;)Oi(t,e[i]);return t});function ad(n,e){return $o(n,Or(y(e)))}var cd=Re(function(n,e){return n==null?{}:Ma(n,e)});function $o(n,e){if(n==null)return{};var t=hn(Di(n),function(r){return[r]});return e=y(e),Rl(n,t,function(r,i){return e(r,i[0])})}function hd(n,e,t){e=Me(e,n);var r=-1,i=e.length;for(i||(i=1,n=o);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=ol();return Wn(n+i*(e-n+js("1e-"+((i+"").length-1))),e)}return Li(n,e)}var Sd=ht(function(n,e,t){return e=e.toLowerCase(),n+(t?Do(e):e)});function Do(n){return eu(Y(n).toLowerCase())}function No(n){return n=Y(n),n&&n.replace(Cs,_f).replace(ks,"")}function Cd(n,e,t){n=Y(n),e=Jn(e);var r=n.length;t=t===o?r:Ze(B(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function Id(n){return n=Y(n),n&&is.test(n)?n.replace(gu,df):n}function Rd(n){return n=Y(n),n&&as.test(n)?n.replace(Xr,"\\$&"):n}var Ed=ht(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Ld=ht(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),bd=Hl("toLowerCase");function Td(n,e,t){n=Y(n),e=B(e);var r=e?ut(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return Ar(fr(i),t)+n+Ar(sr(i),t)}function Od(n,e,t){n=Y(n),e=B(e);var r=e?ut(n):0;return e&&r>>0,t?(n=Y(n),n&&(typeof e=="string"||e!=null&&!Qi(e))&&(e=Jn(e),!e&&it(n))?De(_e(n),0,t):n.split(e,t)):[]}var Md=ht(function(n,e,t){return n+(t?" ":"")+eu(e)});function Dd(n,e,t){return n=Y(n),t=t==null?0:Ze(B(t),0,n.length),e=Jn(e),n.slice(t,t+e.length)==e}function Nd(n,e,t){var r=u.templateSettings;t&&Nn(n,e,t)&&(e=o),n=Y(n),e=Br({},e,r,Vl);var i=Br({},e.imports,r.imports,Vl),l=bn(i),s=hi(i,l),f,c,d=0,p=e.interpolate||Yt,g="__p += '",m=di((e.escape||Yt).source+"|"+p.source+"|"+(p===vu?ms:Yt).source+"|"+(e.evaluate||Yt).source+"|$","g"),x="//# sourceURL="+(Q.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zs+"]")+` +`;n.replace(m,function(C,D,H,jn,Gn,ne){return H||(H=jn),g+=n.slice(d,ne).replace(Is,pf),D&&(f=!0,g+=`' + +__e(`+D+`) + +'`),Gn&&(c=!0,g+=`'; +`+Gn+`; +__p += '`),H&&(g+=`' + +((__t = (`+H+`)) == null ? '' : __t) + +'`),d=ne+C.length,C}),g+=`'; +`;var S=Q.call(e,"variable")&&e.variable;if(!S)g=`with (obj) { +`+g+` +} +`;else if(gs.test(S))throw new T(V);g=(c?g.replace(ns,""):g).replace(es,"$1").replace(ts,"$1;"),g="function("+(S||"obj")+`) { +`+(S?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(f?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+g+`return __p +}`;var W=Ho(function(){return q(l,x+"return "+g).apply(o,s)});if(W.source=g,Ji(W))throw W;return W}function Gd(n){return Y(n).toLowerCase()}function Hd(n){return Y(n).toUpperCase()}function kd(n,e,t){if(n=Y(n),n&&(t||e===o))return Xu(n);if(!n||!(e=Jn(e)))return n;var r=_e(n),i=_e(e),l=Ju(r,i),s=Qu(r,i)+1;return De(r,l,s).join("")}function zd(n,e,t){if(n=Y(n),n&&(t||e===o))return n.slice(0,nl(n)+1);if(!n||!(e=Jn(e)))return n;var r=_e(n),i=Qu(r,_e(e))+1;return De(r,0,i).join("")}function qd(n,e,t){if(n=Y(n),n&&(t||e===o))return n.replace(Jr,"");if(!n||!(e=Jn(e)))return n;var r=_e(n),i=Ju(r,_e(e));return De(r,i).join("")}function Kd(n,e){var t=K,r=rn;if(dn(e)){var i="separator"in e?e.separator:i;t="length"in e?B(e.length):t,r="omission"in e?Jn(e.omission):r}n=Y(n);var l=n.length;if(it(n)){var s=_e(n);l=s.length}if(t>=l)return n;var f=t-ut(r);if(f<1)return r;var c=s?De(s,0,f).join(""):n.slice(0,f);if(i===o)return c+r;if(s&&(f+=c.length-f),Qi(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=di(i.source,Y(mu.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var g=d.index;c=c.slice(0,g===o?f:g)}}else if(n.indexOf(Jn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function Yd(n){return n=Y(n),n&&rs.test(n)?n.replace(pu,Af):n}var Zd=ht(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),eu=Hl("toUpperCase");function Go(n,e,t){return n=Y(n),e=t?o:e,e===o?vf(n)?If(n):sf(n):n.match(e)||[]}var Ho=M(function(n,e){try{return Vn(n,o,e)}catch(t){return Ji(t)?t:new T(t)}}),Vd=Re(function(n,e){return re(e,function(t){t=xe(t),Ce(n,t,Vi(n[t],n))}),n});function Xd(n){var e=n==null?0:n.length,t=y();return n=e?hn(n,function(r){if(typeof r[1]!="function")throw new ie(A);return[t(r[0]),r[1]]}):[],M(function(r){for(var i=-1;++iee)return[];var t=Zn,r=Wn(n,Zn);e=y(e),n-=Zn;for(var i=ci(r,e);++t0||e<0)?new G(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=B(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},G.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},G.prototype.toArray=function(){return this.take(Zn)},me(G.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],l=r||/^find/.test(e);i&&(u.prototype[e]=function(){var s=this.__wrapped__,f=r?[1]:arguments,c=s instanceof G,d=f[0],p=c||O(s),g=function(D){var H=i.apply(u,Fe([D],f));return r&&m?H[0]:H};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var m=this.__chain__,x=!!this.__actions__.length,S=l&&!m,W=c&&!x;if(!l&&p){s=W?s:new G(this);var C=n.apply(s,f);return C.__actions__.push({func:Er,args:[g],thisArg:o}),new ue(C,m)}return S&&W?n.apply(this,f):(C=this.thru(g),S?r?C.value()[0]:C.value():C)})}),re(["pop","push","shift","sort","splice","unshift"],function(n){var e=jt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var l=this.value();return e.apply(O(l)?l:[],i)}return this[t](function(s){return e.apply(O(s)?s:[],i)})}}),me(G.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";Q.call(ft,r)||(ft[r]=[]),ft[r].push({name:e,func:t})}}),ft[xr(o,on).name]=[{name:"wrapper",func:o}],G.prototype.clone=Yf,G.prototype.reverse=Zf,G.prototype.value=Vf,u.prototype.at=Ch,u.prototype.chain=Ih,u.prototype.commit=Rh,u.prototype.next=Eh,u.prototype.plant=bh,u.prototype.reverse=Th,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Oh,u.prototype.first=u.prototype.head,bt&&(u.prototype[bt]=Lh),u},lt=Rf();ze?((ze.exports=lt)._=lt,ri._=lt):Pn._=lt}).call(kt)})(Dr,Dr.exports);var mg=Dr.exports;const wg=$p(mg),hu=_n=>(Zo("data-v-8f10d458"),_n=_n(),Vo(),_n),xg={class:"my-order"},yg=hu(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Ag={class:"nav-item-input"},Sg={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},Cg=["onClick"],Ig={class:"shop-name"},Rg={class:"shop-price"},Eg={class:"unit-name"},Lg={key:0,class:"no-stock"},bg=hu(()=>v("div",null,[v("span",null,"暂无"),v("span",null,"库存")],-1)),Tg=[bg],Og={key:1,class:"no-stock"},Pg=hu(()=>v("div",null,[v("span",null,"平台"),v("span",null,"关闭")],-1)),Fg=[Pg],Bg={key:1,class:"no-data"},Wg={__name:"shop",props:{storeList:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(_n,{expose:Sn,emit:o}){const E=F(null),$=o,I=F(""),A=()=>{$("loadMore",{name:I.value})},V=R=>{if(R.is_used==0)return Yn.error("该商品已被平台关闭");if(R.stock==0)return Yn.warning("该商品无库存");$("changeItem",R)},cn=wg.throttle(()=>{let R={};/^\d+$/.test(I.value)?R.code=I.value:R.name=I.value,$("getStoreList",R,!0)},300);Sn({name:I,inputBlur:()=>{var R;(R=E.value)==null||R.blur()}});const X=F(!1),j=()=>{X.value=!0},Bn=()=>{X.value=!1},nn=()=>{var R;(R=E.value)==null||R.focus()};return vt(()=>{Oe(()=>{var R;(R=E.value)==null||R.focus(),j()}),En.on("shift",nn)}),mt(()=>{En.off("shift",nn)}),(R,J)=>{const ln=an("el-input"),on=an("Search"),An=an("el-icon"),P=an("el-button"),z=an("el-image"),pn=an("el-space"),Cn=an("el-empty"),L=Mr("loading"),tn=Mr("infinite-scroll");return fn(),Ln("div",xg,[v("div",{class:Ur(["header-nav",{"input-focus":X.value}])},[yg,v("div",Ag,[Z(ln,{modelValue:I.value,"onUpdate:modelValue":J[0]||(J[0]=U=>I.value=U),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:E,onFocus:j,onBlur:Bn,onKeyup:Yo(Wr(cn),["enter"]),onClear:Wr(cn)},null,8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:J[1]||(J[1]=(...U)=>Wr(cn)&&Wr(cn)(...U))},[Z(P,{class:"btn",type:"primary"},{default:vn(()=>[Z(An,null,{default:vn(()=>[Z(on)]),_:1})]),_:1})])],2),cu((fn(),Ln("div",Sg,[_n.storeList.length?(fn(),gt(pn,{key:0,wrap:""},{default:vn(()=>[(fn(!0),Ln(fu,null,au(_n.storeList,(U,K)=>(fn(),Ln("div",{class:"shop-item",key:K,onClick:rn=>V(U)},[Z(z,{loading:"lazy",src:U.imgs},null,8,["src"]),v("div",Ig,Tn(U.name),1),v("div",Rg,[mn(" ¥"),v("span",null,Tn(U.sell),1),v("span",Eg,"/"+Tn(U.unit_name),1)]),U.stock==0?(fn(),Ln("div",Lg,Tg)):$r("",!0),U.is_used==0?(fn(),Ln("div",Og,Fg)):$r("",!0)],8,Cg))),128))]),_:1})):$r("",!0),_n.storeList.length?$r("",!0):(fn(),Ln("div",Bg,[Z(Cn,{"image-size":200,description:"没有找到对应商品"})]))])),[[L,_n.loading],[tn,A]])])}}},$g=zt(Wg,[["__scopeId","data-v-8f10d458"]]);function Ug(_n){return Up.get("/goods/goods/mer_list",{params:_n})}const Mg={class:"shop"},Dg={class:"shop-info"},Ng={class:"shop-info-left"},Gg={class:"shop-info-right"},Hg={class:"shop-info-right-top"},kg={class:"shop-info-right-price"},zg={style:{"font-size":"1rem",color:"#777"}},qg={class:"shop-sku"},Kg={class:"title"},Yg={class:"sku"},Zg={class:"dialog-footer"},Vg={__name:"pupop",emits:["changeItem"],setup(_n,{expose:Sn,emit:o}){const E=F(!1),$=F(null),I=nn=>{E.value=nn},A=F({}),V=F(!1),cn=F("add"),wn=(nn,R="add")=>{cn.value=R,A.value=JSON.parse(JSON.stringify(nn))},X=o,j=()=>{A.value.cart_num||(A.value.cart_num=1),X("changeItem",A.value),E.value=!1};Sn({show:I,setForm:wn});const Bn=()=>{E.value&&j()};return vt(()=>{En.on("enter",Bn)}),mt(()=>{En.off("enter",Bn)}),(nn,R)=>{const J=an("el-image"),ln=an("el-input-number"),on=an("el-button"),An=an("el-dialog"),P=Mr("loading");return fn(),gt(An,{modelValue:E.value,"onUpdate:modelValue":R[1]||(R[1]=z=>E.value=z),title:"购买数量",width:"650",onOpened:R[2]||(R[2]=z=>$.value.focus())},Mp({default:vn(()=>[cu((fn(),Ln("div",Mg,[v("div",Dg,[v("div",Ng,[Z(J,{loading:"lazy",src:A.value.imgs},null,8,["src"])]),v("div",Gg,[v("div",Hg,Tn(A.value.name),1),v("div",kg,[mn(" ¥"),v("span",null,Tn(A.value.sell),1),v("span",zg," / "+Tn(A.value.unit_name),1)])])]),v("div",qg,[v("div",Kg,"购买数量 ( "+Tn(A.value.unit_name)+" )",1),v("div",Yg,[Z(ln,{ref_key:"inputRef",ref:$,modelValue:A.value.cart_num,"onUpdate:modelValue":R[0]||(R[0]=z=>A.value.cart_num=z),"step-strictly":"",placeholder:"请输入数量(默认为1)",min:0,step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue"])])])])),[[P,V.value]])]),_:2},[cn.value!="add"&&A.value.attr&&A.value.attr.length==1?void 0:{name:"footer",fn:vn(()=>[v("div",Zg,[Z(on,{class:"ok-btn",type:"primary",onClick:j},{default:vn(()=>[mn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},Xg=zt(Vg,[["__scopeId","data-v-308e2ab0"]]),wt=_n=>(Zo("data-v-33527f7d"),_n=_n(),Vo(),_n),Jg=wt(()=>v("h4",null,"选择支付方式",-1)),Qg={class:"dra-body"},jg={class:"header"},nv=wt(()=>v("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),ev={style:{color:"#f5222d","padding-bottom":"2rem"}},tv={style:{"font-size":"1.6rem"}},rv={key:0,"element-loading-text":"支付中",class:"card1"},iv=wt(()=>v("div",{class:"tips"},null,-1)),uv={key:1,class:"card2"},lv={class:"drawer-body"},ov={class:"counter"},sv={class:"received"},fv={key:0},av={key:1,style:{"font-size":"1rem",color:"#999"}},cv={key:0,class:"balance"},hv={class:"money"},_v=wt(()=>v("div",{class:"tips"},"按回车(Enter)确认支付",-1)),dv={key:1,class:"balance"},pv=wt(()=>v("div",null,"不够找零, 请支付更多金额",-1)),gv=wt(()=>v("div",{class:"tips"},"按下小键盘输入金额",-1)),vv=[pv,gv],mv={class:"keypad"},wv={class:"left"},xv={class:"right"},yv={style:{width:"100%",display:"flex","justify-content":"center"}},Av={__name:"pay",emits:["paySuccess"],setup(_n,{expose:Sn,emit:o}){const E=F(!1),$=F(1),I=F(""),A=F("");su();const V=()=>{U()},cn=()=>{Oe(()=>{setTimeout(()=>{var N;K.value=!1,I.value="",J.value=!0,(N=A.value)==null||N.focus(),wn($.value)},300)})},wn=N=>{$.value=N,$.value==2?window.addEventListener("keydown",ee):(window.removeEventListener("keydown",ee),Oe(()=>{var b;I.value="",(b=A.value)==null||b.focus()}))},X=F({}),j=F([]),Bn=N=>{X.value=N.data,j.value=N.cart_id},nn=N=>{X.value.total=N.price,z.value=N.order_id},R=o,J=F(!1),ln=F(["1","2","3","4","5","6","7","8","9","0","00","."]);let on=0;const An=/^(10|11|12|13|14|15)\d{16}$/,P=/^(25|26|27|28|29|30)\d{14,22}$/,z=F(""),pn=()=>{if(K.value=!0,A.value.blur(),z.value)Cn(z.value);else{let N;if(An.test(I.value))N="9";else if(P.test(I.value))N="13";else return K.value=!1,I.value="",A.value.focus(),Yn.error("请输入正确的支付码");qo({address_id:"",key:X.value.key,cart_id:j.value,pay_type:N,auth_code:I.value}).then(b=>{b.data.trade_state=="SUCCESS"?(E.value=!1,Yn({message:b.data.trade_state_desc||"支付成功",type:"success"}),U(b.data)):b.msg=="用户支付中"&&b.code==1&&(Yn.warning(b.msg),En.on("pay_success",k=>{Yn({message:"支付成功",type:"success"}),setTimeout(()=>{En.off("pay_success")},200),E.value=!1,U(k)}))}).catch(b=>{K.value=!1,Oe(()=>{var k;(k=A.value)==null||k.focus()})})}},Cn=N=>{let b;if($.value==1){let k;if(An.test(I.value))k="micropay";else if(P.test(I.value))k="alipayBar";else return K.value=!1,I.value="",A.value.focus(),Yn.error("请输入正确的支付码");b={type:k,auth_code:I.value}}else b={type:"cash_payment"};Np(N,b).then(k=>{k.data.trade_state=="SUCCESS"?(E.value=!1,Yn({message:k.message=="success"?"支付成功":k.message,type:"success"}),U(k.data)):(z.value=k.data.group_order_id,L.value=0,on=0,tn(k.data.group_order_sn))}).catch(k=>{I.value="",K.value=!1,Oe(()=>{var Mn;(Mn=A.value)==null||Mn.focus()})})},L=F(0),tn=N=>{N&&(L.value++,on+=5e3,Gp({order_sn:N}).then(b=>{b.data.trade_state=="SUCCESS"?(Yn({message:b.message,type:"success"}),U()):(Yn({message:b.data.trade_state=="USERPAYING"?"用户正在支付中":b.message,type:"error"}),I.value="",K.value=!1,Oe(()=>{var k;(k=A.value)==null||k.focus()}))}).catch(b=>{J.value&&L.value<3?setTimeout(()=>{tn(N)},15e3-on>0?15e3-on:0):(I.value="",K.value=!1,Oe(()=>{var k;(k=A.value)==null||k.focus()}))}))},U=N=>{var b;window.removeEventListener("keydown",ee),J.value=!1,K.value=!1,I.value="",On.value="",rn.value=[],(b=A.value)==null||b.blur(),R("paySuccess",N),E.value=!1},K=F(!1);Sn({drawer:E,setForm:Bn,setRePay:nn,beforeClose:U});const rn=F([]),On=F(""),ae=Dp(()=>+On.value>0?(On.value-X.value.total).toFixed(2):-1),xt=F(!1),yt=N=>{N===-1?rn.value=[]:rn.value.pop(),On.value=rn.value.length?rn.value.join(""):0},Un=N=>{xt.value===!1&&(On.value="",xt.value=!0);let b=String(On.value).indexOf(".")+1,k=String(On.value).length-b;console.log(b,k),(b===0||k<2)&&(rn.value.join("")<=9999999&&rn.value.push(N),On.value=rn.value.join("")>99999999?99999999:rn.value.join(""))},ve=()=>{if(ae.value===""||ae.value===null||ae.value===void 0||+On.value<+X.value.total)return Yn.error("收款金额应该大于等于应收金额");z.value?Cn(z.value):qo({address_id:"",cart_id:j.value,pay_type:"17"}).then(N=>{E.value=!1,Yn({message:N.msg,type:"success"}),wn(1),U()}).catch(N=>{K.value=!1})},ee=N=>{let k=(N||window.event).keyCode;if(k==37)return wn(2);if(k==120)return En.emit("F9");if(k==27)return U();switch(N.stopPropagation(),N.preventDefault(),k){case 96:case 48:Un(0);break;case 97:case 49:Un(1);break;case 98:case 50:Un(2);break;case 99:case 51:Un(3);break;case 100:case 52:Un(4);break;case 101:case 53:Un(5);break;case 102:case 54:Un(6);break;case 103:case 55:Un(7);break;case 104:case 56:Un(8);break;case 105:case 57:Un(9);break;case 110:Un(".");break;case 190:Un(".");break;case 8:yt();break;case 13:ve();break}},je=F(!1),Ge=()=>{if(!(!E.value||je.value&&I.value.length>0)&&$.value==2)return wn(1)},Zn=()=>{if(!(!E.value||je.value&&I.value.length>0)&&$.value==1)return wn(2)};return vt(()=>{En.on("left",Ge),En.on("right",Zn)}),mt(()=>{En.off("left",Ge),En.off("right",Zn)}),(N,b)=>{const k=an("el-input"),Mn=an("el-button"),nt=an("Delete"),Nr=an("el-icon"),He=an("el-drawer"),ke=Mr("loading");return fn(),gt(He,{size:"60rem",modelValue:E.value,"onUpdate:modelValue":b[6]||(b[6]=Hn=>E.value=Hn),direction:"rtl",onOpen:cn,"before-close":U},{header:vn(()=>[Jg]),default:vn(()=>[v("div",Qg,[v("div",jg,[v("div",{class:Ur(["left",{active:$.value==1}]),onClick:b[0]||(b[0]=Hn=>wn(1))}," 微信/支付宝 ",2),v("div",{class:Ur(["right",{active:$.value==2}]),onClick:b[1]||(b[1]=Hn=>wn(2))}," 现金收款 ",2)]),nv,v("div",ev,[mn(" ¥"),v("span",tv,Tn(X.value.total),1)]),$.value==1?cu((fn(),Ln("div",rv,[Z(k,{ref_key:"codeRef",ref:A,modelValue:I.value,"onUpdate:modelValue":b[2]||(b[2]=Hn=>I.value=Hn),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Yo(pn,["enter"]),onFocus:b[3]||(b[3]=Hn=>je.value=!0),onBlur:b[4]||(b[4]=Hn=>je.value=!1)},null,8,["modelValue"]),iv])),[[ke,K.value]]):(fn(),Ln("div",uv,[v("div",lv,[v("div",ov,[v("div",sv,[On.value?(fn(),Ln("span",fv,Tn(On.value),1)):(fn(),Ln("span",av,"按下键盘输入客户支付金额"))]),ae.value>=0?(fn(),Ln("div",cv,[v("div",null,[mn(" 需找零(元):"),v("span",hv,"¥"+Tn(ae.value),1)]),_v])):(fn(),Ln("div",dv,vv)),v("div",mv,[v("div",wv,[(fn(!0),Ln(fu,null,au(ln.value,Hn=>(fn(),gt(Mn,{key:Hn,onClick:At=>Un(Hn)},{default:vn(()=>[mn(Tn(Hn),1)]),_:2},1032,["onClick"]))),128))]),v("div",xv,[Z(Mn,{onClick:yt},{default:vn(()=>[Z(Nr,null,{default:vn(()=>[Z(nt)]),_:1})]),_:1}),Z(Mn,{onClick:b[5]||(b[5]=Hn=>yt(-1))},{default:vn(()=>[mn("C")]),_:1}),Z(Mn,{class:Ur(["enter",{"enter-disable":+On.value<+X.value.total}]),disabled:+On.value<+X.value.total,onClick:ve},{default:vn(()=>[mn(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:vn(()=>[v("div",yv,[Z(Mn,{class:"cancel-btn",onClick:V},{default:vn(()=>[mn("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},Sv=zt(Av,[["__scopeId","data-v-33527f7d"]]),Cv={class:"my-card"},bv={__name:"index",setup(_n){const Sn=F(null),o=F(null),E=F(null),$=F(null),I=F([]),A=su(),V=Hp(),cn=F({page_no:1,page_size:30}),wn=F(!1),X=(L={},tn=!1)=>{cn.value={...cn.value,...L},tn&&(I.value=[],cn.value.page_no=1,j.value=!1),wn.value=!0,Ug(cn.value).then(U=>{var K,rn;wn.value=!1,((rn=(K=U.data)==null?void 0:K.lists)==null?void 0:rn.length){j.value||X(L)};function nn(L){return/^\d+$/.test(L)}const R=(L,tn="")=>{console.log(L,tn);let U={goods_id:L.id,is_new:0,cart_num:L.cart_num};Ko(U).then(K=>{o.value.getList()})},J=(L,tn)=>{Sn.value.setForm(L,"add"),Sn.value.show(!0)},ln=L=>{Sn.value.setForm(L,"edit"),Sn.value.show(!0)},on=F({}),An=()=>{let L=o.value.list.map(U=>U.cart_id),tn={cart_id:L};o.value.discounts>0&&(tn.deduction_price=o.value.discounts.toFixed(2),tn.pay_type="micropay"),zp(tn).then(U=>{on.value=U.data.order,$.value.setForm({data:U.data.order,cart_id:L})})},P=()=>{An(),$.value.drawer=!0},z=(L=null)=>{L&&pn(L),setTimeout(()=>{o.value.getList()})},pn=L=>{let tn=[];o.value.list.forEach(K=>{tn.push({name:K.goods_name,sell:K.sell,nums:K.cart_num,unit_name:K.unit_name,total:K.goods_total_price})});let U={mer_name:A.userInfo.merchant.mer_name,service_phone:A.userInfo.merchant.service_phone,number:L.out_trade_no,create_time:L.create_time,total_price:on.value.total,pay_price:on.value.total,pay_type:L.trade_type=="MICROPAY"?"微信支付":"余额支付",pay_number:L.transaction_id,goods:tn};if(tn.length>0&&L.out_trade_no){let K=kp(U);console.log(K),uni.getEnv(rn=>{rn.app&&(APPprint(content),setTimeout(()=>{isPrint=!1},4e3))}),uni.postMessage({data:{type:"print",content:K}})}},Cn=()=>{V.name=="saleHome"&&(!$.value.drawer&&o.value.list.length>0?P():$.value.beforeClose())};return vt(()=>{X(),En.on("F9",Cn)}),mt(()=>{En.off("F9",Cn)}),(L,tn)=>(fn(),Ln("div",Cv,[Z(vg,{ref_key:"orderRef",ref:o,onGoPay:P,onEditPupop:ln},null,512),Z(qp),Z($g,{ref_key:"shopRef",ref:E,style:{flex:"1"},storeList:I.value,loading:wn.value,onGetStoreList:X,onChangeItem:J,onLoadMore:Bn},null,8,["storeList","loading"]),Z(Xg,{ref_key:"pupopRef",ref:Sn,onChangeItem:R},null,512),Z(Sv,{ref_key:"payRef",ref:$,onPaySuccess:z},null,512)]))}};export{bv as default}; diff --git a/build/assets/indexCount-BcXKZ5Q7.js b/build/assets/indexCount-DeHuVrzY.js similarity index 86% rename from build/assets/indexCount-BcXKZ5Q7.js rename to build/assets/indexCount-DeHuVrzY.js index e8dbac2..b8f721e 100644 --- a/build/assets/indexCount-BcXKZ5Q7.js +++ b/build/assets/indexCount-DeHuVrzY.js @@ -1 +1 @@ -import{f as i}from"./merchant-CtlTM3LR.js";import{_ as d,r as a,b as l,s as p,z as m,c as u,h,e as f,f as e,w as v}from"./index-BhwfcSvx.js";const b={"element-loading-text":"加载中",class:"my-order"},g={class:"table"},x={__name:"indexCount",setup(w){const o=a([]),n=a({page_no:1,page_size:15}),r=a(!1);return(()=>{i(n.value).then(s=>{o.value=s.data.lists})})(),(s,B)=>{const t=l("el-table-column"),c=l("el-table"),_=p("loading");return m((u(),h("div",b,[f("div",g,[e(c,{data:o.value,style:{width:"100%"}},{default:v(()=>[e(t,{prop:"record_date",label:"时间",width:"260"}),e(t,{prop:"cashier_cash_total_amount",label:"现金收银金额(元)"}),e(t,{prop:"cashier_total_amount",label:"线上收银金额(元)"}),e(t,{prop:"platofrm_total_amount",label:"平台订单金额(元)"}),e(t,{prop:"total_amount",label:"总金额(元)"})]),_:1},8,["data"])])])),[[_,r.value]])}}},y=d(x,[["__scopeId","data-v-d25755c6"]]);export{y as default}; +import{f as i}from"./merchant-29VIPZnM.js";import{_ as d,r as a,b as l,s as p,z as m,c as u,h,e as f,f as e,w as v}from"./index-BpHEZm7m.js";const b={"element-loading-text":"加载中",class:"my-order"},g={class:"table"},x={__name:"indexCount",setup(w){const o=a([]),n=a({page_no:1,page_size:15}),r=a(!1);return(()=>{i(n.value).then(s=>{o.value=s.data.lists})})(),(s,B)=>{const t=l("el-table-column"),c=l("el-table"),_=p("loading");return m((u(),h("div",b,[f("div",g,[e(c,{data:o.value,style:{width:"100%"}},{default:v(()=>[e(t,{prop:"record_date",label:"时间",width:"260"}),e(t,{prop:"cashier_cash_total_amount",label:"现金收银金额(元)"}),e(t,{prop:"cashier_total_amount",label:"线上收银金额(元)"}),e(t,{prop:"platofrm_total_amount",label:"平台订单金额(元)"}),e(t,{prop:"total_amount",label:"总金额(元)"})]),_:1},8,["data"])])])),[[_,r.value]])}}},y=d(x,[["__scopeId","data-v-d25755c6"]]);export{y as default}; diff --git a/build/assets/merchant-CtlTM3LR.js b/build/assets/merchant-29VIPZnM.js similarity index 87% rename from build/assets/merchant-CtlTM3LR.js rename to build/assets/merchant-29VIPZnM.js index 1cd500a..892c24f 100644 --- a/build/assets/merchant-CtlTM3LR.js +++ b/build/assets/merchant-29VIPZnM.js @@ -1 +1 @@ -import{D as a}from"./index-BhwfcSvx.js";function i(){return a.get("/merchant/Merchant/amount_account")}function r(n){return a.get("/merchant/Merchant/taking_lists",{params:n})}function c(){return a.get("/merchant/Merchant/taking_info")}function e(n){return a.post("/merchant/Merchant/withdraw",n)}function o(n){return a.get("/financial/FinancialRecord/lists",{params:n})}function s(n){return a.get("/financial/FinancialRecord/api_lists",{params:n})}export{i as a,c as b,e as c,r as d,s as e,o as f}; +import{D as a}from"./index-BpHEZm7m.js";function i(){return a.get("/merchant/Merchant/amount_account")}function r(n){return a.get("/merchant/Merchant/taking_lists",{params:n})}function c(){return a.get("/merchant/Merchant/taking_info")}function e(n){return a.post("/merchant/Merchant/withdraw",n)}function o(n){return a.get("/financial/FinancialRecord/lists",{params:n})}function s(n){return a.get("/financial/FinancialRecord/api_lists",{params:n})}export{i as a,c as b,e as c,r as d,s as e,o as f}; diff --git a/build/assets/padding-dm0HkGpn.js b/build/assets/padding-Dv3RYtNt.js similarity index 65% rename from build/assets/padding-dm0HkGpn.js rename to build/assets/padding-Dv3RYtNt.js index 454e56d..4e4c359 100644 --- a/build/assets/padding-dm0HkGpn.js +++ b/build/assets/padding-Dv3RYtNt.js @@ -1 +1 @@ -import{_ as e,c as t,h as c}from"./index-BhwfcSvx.js";const n={},o={style:{width:"1rem",height:"100%"}};function r(s,_){return t(),c("div",o)}const i=e(n,[["render",r]]);export{i as p}; +import{_ as e,c as t,h as c}from"./index-BpHEZm7m.js";const n={},o={style:{width:"1rem",height:"100%"}};function r(s,_){return t(),c("div",o)}const i=e(n,[["render",r]]);export{i as p}; diff --git a/build/assets/test-BD_tZfDb.js b/build/assets/test-CVdMUgg0.js similarity index 99% rename from build/assets/test-BD_tZfDb.js rename to build/assets/test-CVdMUgg0.js index 005076d..8eeb3c8 100644 --- a/build/assets/test-BD_tZfDb.js +++ b/build/assets/test-CVdMUgg0.js @@ -1,4 +1,4 @@ -import{r as O,b as S,c as w,h as C,e as g,f as T,w as A,F as x,E as I,g as L}from"./index-BhwfcSvx.js";var D={exports:{}};(function(j,M){(function(a,e){j.exports=e()})(window,function(){return function(h){var a={};function e(o){if(a[o])return a[o].exports;var d=a[o]={i:o,l:!1,exports:{}};return h[o].call(d.exports,d,d.exports,e),d.l=!0,d.exports}return e.m=h,e.c=a,e.d=function(o,d,f){e.o(o,d)||Object.defineProperty(o,d,{enumerable:!0,get:f})},e.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,d){if(d&1&&(o=e(o)),d&8||d&4&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(e.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),d&2&&typeof o!="string")for(var b in o)e.d(f,b,(function(i){return o[i]}).bind(null,b));return f},e.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(d,"a",d),d},e.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},e.p="",e(e.s=0)}({"./src/index.js":function(h,a,e){e.r(a),e("./src/sass/index.scss");var o=e("./src/js/init.js"),d=o.default.init;typeof window<"u"&&(window.printJS=d),a.default=d},"./src/js/browser.js":function(h,a,e){e.r(a);var o={isFirefox:function(){return typeof InstallTrigger<"u"},isIE:function(){return navigator.userAgent.indexOf("MSIE")!==-1||!!document.documentMode},isEdge:function(){return!o.isIE()&&!!window.StyleMedia},isChrome:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;return!!f.chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||navigator.userAgent.toLowerCase().indexOf("safari")!==-1},isIOSChrome:function(){return navigator.userAgent.toLowerCase().indexOf("crios")!==-1}};a.default=o},"./src/js/functions.js":function(h,a,e){e.r(a),e.d(a,"addWrapper",function(){return b}),e.d(a,"capitalizePrint",function(){return i}),e.d(a,"collectStyles",function(){return l}),e.d(a,"addHeader",function(){return n}),e.d(a,"cleanUp",function(){return u}),e.d(a,"isRawHTML",function(){return p});var o=e("./src/js/modal.js"),d=e("./src/js/browser.js");function f(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(c){return typeof c}:f=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},f(t)}function b(t,s){var c="font-family:"+s.font+" !important; font-size: "+s.font_size+" !important; width:100%;";return'
'+t+"
"}function i(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t,s){for(var c=document.defaultView||window,E="",y=c.getComputedStyle(t,""),m=0;m]*>(.*?)");return s.test(t)}},"./src/js/html.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(n){return typeof n}:f=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},f(l)}a.default={print:function(r,n){var u=i(r.printable)?r.printable:document.getElementById(r.printable);if(!u){window.console.error("Invalid HTML element id: "+r.printable);return}r.printableElement=b(u,r),r.header&&Object(o.addHeader)(r.printableElement,r),d.default.send(r,n)}};function b(l,r){for(var n=l.cloneNode(),u=Array.prototype.slice.call(l.childNodes),p=0;p"+t.documentTitle+"",t.css&&(Array.isArray(t.css)||(t.css=[t.css]),t.css.forEach(function(v){y.srcdoc+=''})),y.srcdoc+=""),t.type){case"pdf":if(o.default.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer.");var m=window.open(t.fallbackPrintable,"_blank");m.focus(),t.onIncompatibleBrowser()}catch(v){t.onError(v)}finally{t.showModal&&d.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}else f.default.print(t,y);break;case"image":l.default.print(t,y);break;case"html":b.default.print(t,y);break;case"raw-html":i.default.print(t,y);break;case"json":r.default.print(t,y);break}}}},"./src/js/json.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(r){return typeof r}:f=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(i)}a.default={print:function(l,r){if(f(l.printable)!=="object")throw new Error("Invalid javascript data object (JSON).");if(typeof l.repeatTableHeader!="boolean")throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!l.properties||!Array.isArray(l.properties))throw new Error("Invalid properties array for your JSON data.");l.properties=l.properties.map(function(n){return{field:f(n)==="object"?n.field:n,displayName:f(n)==="object"?n.displayName:n,columnSize:f(n)==="object"&&n.columnSize?n.columnSize+";":100/l.properties.length+"%;"}}),l.printableElement=document.createElement("div"),l.header&&Object(o.addHeader)(l.printableElement,l),l.printableElement.innerHTML+=b(l),d.default.send(l,r)}};function b(i){var l=i.printable,r=i.properties,n='';i.repeatTableHeader&&(n+=""),n+="";for(var u=0;u'+Object(o.capitalizePrint)(r[u].displayName)+"";n+="",i.repeatTableHeader&&(n+=""),n+="";for(var p=0;p";for(var t=0;t1)for(var E=0;E'+s+""}n+=""}return n+="
",n}},"./src/js/modal.js":function(h,a,e){e.r(a);var o={show:function(f){var b="font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;",i=document.createElement("div");i.setAttribute("style",b),i.setAttribute("id","printJS-Modal");var l=document.createElement("div");l.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var r=document.createElement("div");r.setAttribute("class","printClose"),r.setAttribute("id","printClose"),l.appendChild(r);var n=document.createElement("span");n.setAttribute("class","printSpinner"),l.appendChild(n);var u=document.createTextNode(f.modalMessage);l.appendChild(u),i.appendChild(l),document.getElementsByTagName("body")[0].appendChild(i),document.getElementById("printClose").addEventListener("click",function(){o.close()})},close:function(){var f=document.getElementById("printJS-Modal");f&&f.parentNode.removeChild(f)}};a.default=o},"./src/js/pdf.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js"),d=e("./src/js/functions.js");a.default={print:function(i,l){if(i.base64){var r=Uint8Array.from(atob(i.printable),function(u){return u.charCodeAt(0)});f(i,l,r);return}i.printable=/^(blob|http|\/\/)/i.test(i.printable)?i.printable:window.location.origin+(i.printable.charAt(0)!=="/"?"/"+i.printable:i.printable);var n=new window.XMLHttpRequest;n.responseType="arraybuffer",n.addEventListener("error",function(){Object(d.cleanUp)(i),i.onError(n.statusText,n)}),n.addEventListener("load",function(){if([200,201].indexOf(n.status)===-1){Object(d.cleanUp)(i),i.onError(n.statusText,n);return}f(i,l,n.response)}),n.open("GET",i.printable,!0),n.send()}};function f(b,i,l){var r=new window.Blob([l],{type:"application/pdf"});r=window.URL.createObjectURL(r),i.setAttribute("src",r),o.default.send(b,i)}},"./src/js/print.js":function(h,a,e){e.r(a);var o=e("./src/js/browser.js"),d=e("./src/js/functions.js"),f={send:function(n,u){document.getElementsByTagName("body")[0].appendChild(u);var p=document.getElementById(n.frameId);p.onload=function(){if(n.type==="pdf"){o.default.isFirefox()?setTimeout(function(){return b(p,n)},1e3):b(p,n);return}var t=p.contentWindow||p.contentDocument;if(t.document&&(t=t.document),t.body.appendChild(n.printableElement),n.type!=="pdf"&&n.style){var s=document.createElement("style");s.innerHTML=n.style,t.head.appendChild(s)}var c=t.getElementsByTagName("img");c.length>0?i(Array.from(c)).then(function(){return b(p,n)}):b(p,n)}}};function b(r,n){try{if(r.focus(),o.default.isEdge()||o.default.isIE())try{r.contentWindow.document.execCommand("print",!1,null)}catch{r.contentWindow.print()}else r.contentWindow.print()}catch(u){n.onError(u)}finally{o.default.isFirefox()&&(r.style.visibility="hidden",r.style.left="-1px"),Object(d.cleanUp)(n)}}function i(r){var n=r.map(function(u){if(u.src&&u.src!==window.location.href)return l(u)});return Promise.all(n)}function l(r){return new Promise(function(n){var u=function p(){!r||typeof r.naturalWidth>"u"||r.naturalWidth===0||!r.complete?setTimeout(p,500):n()};u()})}a.default=f},"./src/js/raw-html.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js");a.default={print:function(f,b){f.printableElement=document.createElement("div"),f.printableElement.setAttribute("style","width:100%"),f.printableElement.innerHTML=f.printable,o.default.send(f,b)}}},"./src/sass/index.scss":function(h,a,e){},0:function(h,a,e){h.exports=e("./src/index.js")}}).default})})(D);const B=g("h2",null,"小票标题",-1),U=g("p",null,"商品名称: 商品1",-1),R=g("p",null,"价格: ¥10.00",-1),W=g("p",null,"数量: 1",-1),H=g("p",null,"-------------------",-1),N=g("p",null,"总计: ¥10.00",-1),K=g("p",null,"-------------------",-1),z=[B,U,R,W,H,N,K],F={__name:"test",setup(j){const M=O(null),h=()=>{uni.getEnv(e=>{e.h5?I.error("请使用APP打印小票"):a()})},a=()=>{let e="";e+=`******************************** +import{r as O,b as S,c as w,h as C,e as g,f as T,w as A,F as x,E as I,g as L}from"./index-BpHEZm7m.js";var D={exports:{}};(function(j,M){(function(a,e){j.exports=e()})(window,function(){return function(h){var a={};function e(o){if(a[o])return a[o].exports;var d=a[o]={i:o,l:!1,exports:{}};return h[o].call(d.exports,d,d.exports,e),d.l=!0,d.exports}return e.m=h,e.c=a,e.d=function(o,d,f){e.o(o,d)||Object.defineProperty(o,d,{enumerable:!0,get:f})},e.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,d){if(d&1&&(o=e(o)),d&8||d&4&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(e.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),d&2&&typeof o!="string")for(var b in o)e.d(f,b,(function(i){return o[i]}).bind(null,b));return f},e.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(d,"a",d),d},e.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},e.p="",e(e.s=0)}({"./src/index.js":function(h,a,e){e.r(a),e("./src/sass/index.scss");var o=e("./src/js/init.js"),d=o.default.init;typeof window<"u"&&(window.printJS=d),a.default=d},"./src/js/browser.js":function(h,a,e){e.r(a);var o={isFirefox:function(){return typeof InstallTrigger<"u"},isIE:function(){return navigator.userAgent.indexOf("MSIE")!==-1||!!document.documentMode},isEdge:function(){return!o.isIE()&&!!window.StyleMedia},isChrome:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;return!!f.chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||navigator.userAgent.toLowerCase().indexOf("safari")!==-1},isIOSChrome:function(){return navigator.userAgent.toLowerCase().indexOf("crios")!==-1}};a.default=o},"./src/js/functions.js":function(h,a,e){e.r(a),e.d(a,"addWrapper",function(){return b}),e.d(a,"capitalizePrint",function(){return i}),e.d(a,"collectStyles",function(){return l}),e.d(a,"addHeader",function(){return n}),e.d(a,"cleanUp",function(){return u}),e.d(a,"isRawHTML",function(){return p});var o=e("./src/js/modal.js"),d=e("./src/js/browser.js");function f(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(c){return typeof c}:f=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},f(t)}function b(t,s){var c="font-family:"+s.font+" !important; font-size: "+s.font_size+" !important; width:100%;";return'
'+t+"
"}function i(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t,s){for(var c=document.defaultView||window,E="",y=c.getComputedStyle(t,""),m=0;m]*>(.*?)");return s.test(t)}},"./src/js/html.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(n){return typeof n}:f=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},f(l)}a.default={print:function(r,n){var u=i(r.printable)?r.printable:document.getElementById(r.printable);if(!u){window.console.error("Invalid HTML element id: "+r.printable);return}r.printableElement=b(u,r),r.header&&Object(o.addHeader)(r.printableElement,r),d.default.send(r,n)}};function b(l,r){for(var n=l.cloneNode(),u=Array.prototype.slice.call(l.childNodes),p=0;p"+t.documentTitle+"",t.css&&(Array.isArray(t.css)||(t.css=[t.css]),t.css.forEach(function(v){y.srcdoc+=''})),y.srcdoc+=""),t.type){case"pdf":if(o.default.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer.");var m=window.open(t.fallbackPrintable,"_blank");m.focus(),t.onIncompatibleBrowser()}catch(v){t.onError(v)}finally{t.showModal&&d.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}else f.default.print(t,y);break;case"image":l.default.print(t,y);break;case"html":b.default.print(t,y);break;case"raw-html":i.default.print(t,y);break;case"json":r.default.print(t,y);break}}}},"./src/js/json.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(r){return typeof r}:f=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(i)}a.default={print:function(l,r){if(f(l.printable)!=="object")throw new Error("Invalid javascript data object (JSON).");if(typeof l.repeatTableHeader!="boolean")throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!l.properties||!Array.isArray(l.properties))throw new Error("Invalid properties array for your JSON data.");l.properties=l.properties.map(function(n){return{field:f(n)==="object"?n.field:n,displayName:f(n)==="object"?n.displayName:n,columnSize:f(n)==="object"&&n.columnSize?n.columnSize+";":100/l.properties.length+"%;"}}),l.printableElement=document.createElement("div"),l.header&&Object(o.addHeader)(l.printableElement,l),l.printableElement.innerHTML+=b(l),d.default.send(l,r)}};function b(i){var l=i.printable,r=i.properties,n='';i.repeatTableHeader&&(n+=""),n+="";for(var u=0;u'+Object(o.capitalizePrint)(r[u].displayName)+"";n+="",i.repeatTableHeader&&(n+=""),n+="";for(var p=0;p";for(var t=0;t1)for(var E=0;E'+s+""}n+=""}return n+="
",n}},"./src/js/modal.js":function(h,a,e){e.r(a);var o={show:function(f){var b="font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;",i=document.createElement("div");i.setAttribute("style",b),i.setAttribute("id","printJS-Modal");var l=document.createElement("div");l.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var r=document.createElement("div");r.setAttribute("class","printClose"),r.setAttribute("id","printClose"),l.appendChild(r);var n=document.createElement("span");n.setAttribute("class","printSpinner"),l.appendChild(n);var u=document.createTextNode(f.modalMessage);l.appendChild(u),i.appendChild(l),document.getElementsByTagName("body")[0].appendChild(i),document.getElementById("printClose").addEventListener("click",function(){o.close()})},close:function(){var f=document.getElementById("printJS-Modal");f&&f.parentNode.removeChild(f)}};a.default=o},"./src/js/pdf.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js"),d=e("./src/js/functions.js");a.default={print:function(i,l){if(i.base64){var r=Uint8Array.from(atob(i.printable),function(u){return u.charCodeAt(0)});f(i,l,r);return}i.printable=/^(blob|http|\/\/)/i.test(i.printable)?i.printable:window.location.origin+(i.printable.charAt(0)!=="/"?"/"+i.printable:i.printable);var n=new window.XMLHttpRequest;n.responseType="arraybuffer",n.addEventListener("error",function(){Object(d.cleanUp)(i),i.onError(n.statusText,n)}),n.addEventListener("load",function(){if([200,201].indexOf(n.status)===-1){Object(d.cleanUp)(i),i.onError(n.statusText,n);return}f(i,l,n.response)}),n.open("GET",i.printable,!0),n.send()}};function f(b,i,l){var r=new window.Blob([l],{type:"application/pdf"});r=window.URL.createObjectURL(r),i.setAttribute("src",r),o.default.send(b,i)}},"./src/js/print.js":function(h,a,e){e.r(a);var o=e("./src/js/browser.js"),d=e("./src/js/functions.js"),f={send:function(n,u){document.getElementsByTagName("body")[0].appendChild(u);var p=document.getElementById(n.frameId);p.onload=function(){if(n.type==="pdf"){o.default.isFirefox()?setTimeout(function(){return b(p,n)},1e3):b(p,n);return}var t=p.contentWindow||p.contentDocument;if(t.document&&(t=t.document),t.body.appendChild(n.printableElement),n.type!=="pdf"&&n.style){var s=document.createElement("style");s.innerHTML=n.style,t.head.appendChild(s)}var c=t.getElementsByTagName("img");c.length>0?i(Array.from(c)).then(function(){return b(p,n)}):b(p,n)}}};function b(r,n){try{if(r.focus(),o.default.isEdge()||o.default.isIE())try{r.contentWindow.document.execCommand("print",!1,null)}catch{r.contentWindow.print()}else r.contentWindow.print()}catch(u){n.onError(u)}finally{o.default.isFirefox()&&(r.style.visibility="hidden",r.style.left="-1px"),Object(d.cleanUp)(n)}}function i(r){var n=r.map(function(u){if(u.src&&u.src!==window.location.href)return l(u)});return Promise.all(n)}function l(r){return new Promise(function(n){var u=function p(){!r||typeof r.naturalWidth>"u"||r.naturalWidth===0||!r.complete?setTimeout(p,500):n()};u()})}a.default=f},"./src/js/raw-html.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js");a.default={print:function(f,b){f.printableElement=document.createElement("div"),f.printableElement.setAttribute("style","width:100%"),f.printableElement.innerHTML=f.printable,o.default.send(f,b)}}},"./src/sass/index.scss":function(h,a,e){},0:function(h,a,e){h.exports=e("./src/index.js")}}).default})})(D);const B=g("h2",null,"小票标题",-1),U=g("p",null,"商品名称: 商品1",-1),R=g("p",null,"价格: ¥10.00",-1),W=g("p",null,"数量: 1",-1),H=g("p",null,"-------------------",-1),N=g("p",null,"总计: ¥10.00",-1),K=g("p",null,"-------------------",-1),z=[B,U,R,W,H,N,K],F={__name:"test",setup(j){const M=O(null),h=()=>{uni.getEnv(e=>{e.h5?I.error("请使用APP打印小票"):a()})},a=()=>{let e="";e+=`******************************** `,e+=`泸优采-小票 `,e+=`单号: CG171565043141139102 `,e+=`测试商品1 * 1 1.00元 diff --git a/build/index.html b/build/index.html index c8be171..8b81aa6 100644 --- a/build/index.html +++ b/build/index.html @@ -56,7 +56,7 @@ } } - +