diff --git a/build/assets/index-DwY4sWr-.js b/build/assets/index-BVUONBo1.js similarity index 93% rename from build/assets/index-DwY4sWr-.js rename to build/assets/index-BVUONBo1.js index 57d07ec..9422f69 100644 --- a/build/assets/index-DwY4sWr-.js +++ b/build/assets/index-BVUONBo1.js @@ -1 +1 @@ -import{_ as R,u as Y,r as t,o as q,m as D,a as M,b as g,l as L,c as u,h as m,e,f as o,w as f,g as C,p as j,v as I,F as G,i as P,s as H,t as d,x as U,y as B,z as N,d as J,G as Q}from"./index-C2mUYWeU.js";import{i as X,g as Z,j as ee,m as te}from"./store-DGmfknqP.js";import"./moment-Cl4UOzQZ.js";import{p as oe}from"./padding-REVqc2LB.js";const W=p=>(B("data-v-6dfecf0d"),p=p(),N(),p),se={class:"my-order"},le={class:"header-nav"},ae=W(()=>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=W(()=>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}){Y(),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),X(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:$}),q(()=>{D.on("update-c-order-detail",z=>{v.value[b.value].paid=1})}),M(()=>{D.off("update-c-order-detail")}),(z,_)=>{const F=g("el-date-picker"),x=g("el-button"),E=g("el-input"),K=L("loading"),T=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,clearable:!1},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]=j(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(G,null,P(v.value,(V,O)=>(u(),m("div",{class:H(["item",{"item-active":b.value==O}]),key:O,onClick:Wt=>y(V,O)},[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,"没有更多了")):U("",!0),a.value?(u(),m("div",be,"加载中...")):U("",!0)])),[[K,a.value],[T,$]])])}}},$e=R(ye,[["__scopeId","data-v-6dfecf0d"]]),w=p=>(B("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"},Se=w(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ue={class:"info-item-info"},Ie={class:"info-item"},Fe=w(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Oe={class:"info-item-info"},Re={class:"info-item"},Be=w(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ne={class:"info-item-info"},Ye={class:"info-item"},qe=w(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),Me={class:"info-item-info"},We={class:"info-item"},Ee=w(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),Ke={class:"info-item-info"},Te={class:"info-item"},je=w(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),Ge={class:"info-item-info"},Pe={class:"info-item"},He=w(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),Je={class:"info-item-info"},Qe={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,Z({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,[Se,e("div",Ue,d(l.value.goods_count),1)]),e("div",Ie,[Fe,e("div",Oe,"¥"+d(l.value.total),1)]),e("div",Re,[Be,e("div",Ne,d(l.value.create_time),1)]),e("div",Ye,[qe,e("div",Me," ¥"+d(l.value.deduction_price),1)]),e("div",We,[Ee,e("div",Ke,"¥"+d(l.value.actual),1)]),e("div",Te,[je,e("div",Ge,d(l.value.update_time),1)]),e("div",Pe,[He,e("div",Je,[l.value.pay_type==9?(u(),m("span",Qe,"微信收款")):U("",!0),l.value.pay_type==3?(u(),m("span",Xe,"余额支付")):U("",!0),l.value.pay_type==1?(u(),m("span",Ze,"微信支付")):U("",!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=R(pt,[["__scopeId","data-v-928e3cd0"]]),S=p=>(B("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=S(()=>e("div",{class:"table-title"},"订单信息",-1)),wt={class:"table-info"},Vt={class:"info-item"},kt=S(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),zt={class:"info-item-info"},Ct={class:"info-item"},At=S(()=>e("div",{class:"info-item-title"},"订单数量:",-1)),xt={class:"info-item-info"},Dt={class:"info-item"},Lt=S(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),St={class:"info-item-info"},Ut={class:"info-item"},It=S(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ft={class:"info-item-info"},Ot={style:{"font-size":"0.9rem"}},Rt={style:{color:"#ff4a00"}},Bt=S(()=>e("span",{style:{color:"#777"}}," ( 点击订单查看订单详情 )",-1)),Nt={__name:"detail",emits:["addAddress"],setup(p,{emit:A}){Y(),Q();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 q(()=>{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()})}),M(()=>{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",St,"¥"+d(r.value.total),1)]),e("div",Ut,[It,e("div",Ft,d(r.value.create_time),1)])]),e("div",Ot,[C(" 共计 "),e("span",Rt,d(r.value.order_count),1),C("个订单 "),Bt]),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)])}}},Yt=R(Nt,[["__scopeId","data-v-7bc9887f"]]),qt={class:"my-card"},Mt={class:"dialog-footer"},Gt={__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",qt,[o($e,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:A,onAddAddress:l},null,512),o(oe),o(Yt,{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",Mt,[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{Gt as default}; +import{_ as R,u as Y,r as t,o as q,m as D,a as M,b as g,l as L,c as u,h as m,e,f as o,w as f,g as C,p as P,v as I,F as j,i as G,s as H,t as d,x as U,y as B,z as N,d as J,D as Q}from"./index-DhxPMYiX.js";import{h as X,d as Z,i as ee,m as te}from"./store-Bz99DLdk.js";import"./moment-Cl4UOzQZ.js";import{p as oe}from"./padding-DwppsfEF.js";const W=p=>(B("data-v-6dfecf0d"),p=p(),N(),p),se={class:"my-order"},le={class:"header-nav"},ae=W(()=>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=W(()=>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}){Y(),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),X(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:$}),q(()=>{D.on("update-c-order-detail",z=>{v.value[b.value].paid=1})}),M(()=>{D.off("update-c-order-detail")}),(z,_)=>{const F=g("el-date-picker"),x=g("el-button"),E=g("el-input"),K=L("loading"),T=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,clearable:!1},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]=P(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(j,null,G(v.value,(V,O)=>(u(),m("div",{class:H(["item",{"item-active":b.value==O}]),key:O,onClick:Wt=>y(V,O)},[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,"没有更多了")):U("",!0),a.value?(u(),m("div",be,"加载中...")):U("",!0)])),[[K,a.value],[T,$]])])}}},$e=R(ye,[["__scopeId","data-v-6dfecf0d"]]),w=p=>(B("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"},Se=w(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ue={class:"info-item-info"},Ie={class:"info-item"},Fe=w(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Oe={class:"info-item-info"},Re={class:"info-item"},Be=w(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ne={class:"info-item-info"},Ye={class:"info-item"},qe=w(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),Me={class:"info-item-info"},We={class:"info-item"},Ee=w(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),Ke={class:"info-item-info"},Te={class:"info-item"},Pe=w(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),je={class:"info-item-info"},Ge={class:"info-item"},He=w(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),Je={class:"info-item-info"},Qe={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,Z({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,[Se,e("div",Ue,d(l.value.goods_count),1)]),e("div",Ie,[Fe,e("div",Oe,"¥"+d(l.value.total),1)]),e("div",Re,[Be,e("div",Ne,d(l.value.create_time),1)]),e("div",Ye,[qe,e("div",Me," ¥"+d(l.value.deduction_price),1)]),e("div",We,[Ee,e("div",Ke,"¥"+d(l.value.actual),1)]),e("div",Te,[Pe,e("div",je,d(l.value.update_time),1)]),e("div",Ge,[He,e("div",Je,[l.value.pay_type==9?(u(),m("span",Qe,"微信收款")):U("",!0),l.value.pay_type==3?(u(),m("span",Xe,"余额支付")):U("",!0),l.value.pay_type==1?(u(),m("span",Ze,"微信支付")):U("",!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=R(pt,[["__scopeId","data-v-928e3cd0"]]),S=p=>(B("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=S(()=>e("div",{class:"table-title"},"订单信息",-1)),wt={class:"table-info"},Vt={class:"info-item"},kt=S(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),zt={class:"info-item-info"},Ct={class:"info-item"},At=S(()=>e("div",{class:"info-item-title"},"订单数量:",-1)),xt={class:"info-item-info"},Dt={class:"info-item"},Lt=S(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),St={class:"info-item-info"},Ut={class:"info-item"},It=S(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ft={class:"info-item-info"},Ot={style:{"font-size":"0.9rem"}},Rt={style:{color:"#ff4a00"}},Bt=S(()=>e("span",{style:{color:"#777"}}," ( 点击订单查看订单详情 )",-1)),Nt={__name:"detail",emits:["addAddress"],setup(p,{emit:A}){Y(),Q();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 q(()=>{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()})}),M(()=>{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",St,"¥"+d(r.value.total),1)]),e("div",Ut,[It,e("div",Ft,d(r.value.create_time),1)])]),e("div",Ot,[C(" 共计 "),e("span",Rt,d(r.value.order_count),1),C("个订单 "),Bt]),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)])}}},Yt=R(Nt,[["__scopeId","data-v-7bc9887f"]]),qt={class:"my-card"},Mt={class:"dialog-footer"},jt={__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",qt,[o($e,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:A,onAddAddress:l},null,512),o(oe),o(Yt,{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",Mt,[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{jt as default}; diff --git a/build/assets/index-CULyixpc.css b/build/assets/index-CULyixpc.css new file mode 100644 index 0000000..d665e8c --- /dev/null +++ b/build/assets/index-CULyixpc.css @@ -0,0 +1 @@ +@charset "UTF-8";.my-order[data-v-4b07d859]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-4b07d859]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-4b07d859]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-4b07d859]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-4b07d859]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-4b07d859]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-4b07d859]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-lists .item[data-v-4b07d859]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-4b07d859]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-4b07d859]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-4b07d859]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #2ec479;color:#2ec479;border-radius:.187rem}.my-order .order-lists .item .top .cahier2[data-v-4b07d859]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #ff4a00;color:#ff4a00;border-radius:.187rem}.my-order .order-lists .item .top .create-time[data-v-4b07d859]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-4b07d859]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-4b07d859]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-4b07d859]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-4b07d859]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-4b07d859]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-4b07d859]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-4b07d859]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-lists .item .bottom[data-v-4b07d859]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-4b07d859]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-4b07d859]{background-color:#efefef}.my-order .load-end[data-v-4b07d859]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-870cbbd4]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-870cbbd4]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-870cbbd4]{padding:1rem 1rem 6rem;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-870cbbd4]{font-weight:700}.my-order .detail .table .table-info[data-v-870cbbd4]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-870cbbd4]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-870cbbd4]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-870cbbd4]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-870cbbd4]{position:absolute;bottom:0;left:0;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/build/assets/index-6iUJ80tN.js b/build/assets/index-ChX0XmYW.js similarity index 92% rename from build/assets/index-6iUJ80tN.js rename to build/assets/index-ChX0XmYW.js index e19eadf..b7a929b 100644 --- a/build/assets/index-6iUJ80tN.js +++ b/build/assets/index-ChX0XmYW.js @@ -1 +1 @@ -import{A as U,_ as I,u as R,r as c,o as S,b as s,c as b,h as L,e as v,f as e,w as t,p as m,g as B,y as C,z as E,G as K,E as w}from"./index-C2mUYWeU.js";function N(a){return U.post("/login/account",a)}const M=a=>(C("data-v-aaf16e07"),a=a(),E(),a),T={class:"body"},q={class:"login"},z=M(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),A={__name:"index",setup(a){const d=R(),y=K(),h=c(null),p=c(null),n=c({account:"",password:"",terminal:1}),_=()=>{if(!n.value.account)return w({message:"请填写账号",type:"error"});if(!n.value.password)return w({message:"请填写密码",type:"error"});N(n.value).then(l=>{var o;(o=l.data)!=null&&o.token&&(d.setToken(l.data.token),d.setUserInfo(l.data),y.push("/"))}).catch(l=>{})};return S(()=>{}),(l,o)=>{const k=s("User"),f=s("el-icon"),i=s("el-input"),u=s("el-form-item"),g=s("Lock"),x=s("el-button"),V=s("el-form");return b(),L("div",T,[v("div",q,[z,e(V,null,{default:t(()=>[e(u,null,{default:t(()=>[e(i,{ref_key:"accRef",ref:h,modelValue:n.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>n.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=m(r=>p.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:t(()=>[e(i,{ref_key:"pwdRef",ref:p,modelValue:n.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>n.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:m(_,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:t(()=>[e(x,{style:{width:"100%"},type:"primary",onClick:_},{default:t(()=>[B("登录")]),_:1})]),_:1})]),_:1})])])}}},$=I(A,[["__scopeId","data-v-aaf16e07"]]);export{$ as default}; +import{A as U,_ as I,u as R,r as c,o as S,b as s,c as b,h as L,e as v,f as e,w as t,p as m,g as B,y as C,z as E,D as K,E as w}from"./index-DhxPMYiX.js";function N(a){return U.post("/login/account",a)}const M=a=>(C("data-v-aaf16e07"),a=a(),E(),a),T={class:"body"},q={class:"login"},z=M(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),A={__name:"index",setup(a){const d=R(),y=K(),h=c(null),p=c(null),n=c({account:"",password:"",terminal:1}),_=()=>{if(!n.value.account)return w({message:"请填写账号",type:"error"});if(!n.value.password)return w({message:"请填写密码",type:"error"});N(n.value).then(l=>{var o;(o=l.data)!=null&&o.token&&(d.setToken(l.data.token),d.setUserInfo(l.data),y.push("/"))}).catch(l=>{})};return S(()=>{}),(l,o)=>{const k=s("User"),f=s("el-icon"),i=s("el-input"),u=s("el-form-item"),g=s("Lock"),x=s("el-button"),V=s("el-form");return b(),L("div",T,[v("div",q,[z,e(V,null,{default:t(()=>[e(u,null,{default:t(()=>[e(i,{ref_key:"accRef",ref:h,modelValue:n.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>n.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=m(r=>p.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:t(()=>[e(i,{ref_key:"pwdRef",ref:p,modelValue:n.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>n.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:m(_,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:t(()=>[e(x,{style:{width:"100%"},type:"primary",onClick:_},{default:t(()=>[B("登录")]),_:1})]),_:1})]),_:1})])])}}},$=I(A,[["__scopeId","data-v-aaf16e07"]]);export{$ as default}; diff --git a/build/assets/index-D2mqrbKZ.js b/build/assets/index-D2mqrbKZ.js new file mode 100644 index 0000000..4aca5db --- /dev/null +++ b/build/assets/index-D2mqrbKZ.js @@ -0,0 +1 @@ +import{_ as q,u as G,r as l,o as H,m as V,a as J,b as p,l as R,c as s,h as o,e,f as n,w as k,g as w,p as Z,v as F,F as A,i as E,s as K,t as c,d as ee,x as r,y as Q,z as W,D as te}from"./index-DhxPMYiX.js";import{s as se,d as oe,e as ae}from"./store-Bz99DLdk.js";import{h as j}from"./moment-Cl4UOzQZ.js";import{p as ie}from"./pay-BHLYNBxQ.js";import{p as le}from"./padding-DwppsfEF.js";/* empty css */const ne=f=>(Q("data-v-4b07d859"),f=f(),W(),f),de={class:"my-order"},ce={class:"header-nav"},_e=ne(()=>e("div",{class:"nav-item"},c("收银订单"),-1)),re={class:"nav-item-btn"},ue={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},pe=["onClick"],fe={class:"top"},me={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},ge={key:0,class:"shop-name"},be={class:"right"},ke={class:"money"},$e={class:"count"},we={class:"bottom"},De={class:"pay"},Se={key:0},Ve={key:0},ze={key:1},Ye={key:2},Ce={key:3},xe={key:4},Pe={key:1,style:{color:"#ff4a00"}},Re={key:0,class:"load-end"},Le={key:1,class:"load-end"},Me={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f,{expose:D}){G(),l([]);const t=l(1),m=u=>{_.value.page_no=1,$.value=!1,y.value=!1,d.value=[],b(!0)};l(null);const h=l(""),L=()=>{_.value.start_time=j(h.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=j(h.value[1]).format("YYYY-MM-DD 23:59:59"),b(!0)},v=u=>u.getTime()>Date.now(),_=l({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),y=l(!1),M=l(0),S=l(0),$=l(!1),d=l([]),b=(u=!1)=>{if(u)_.value.page_no=1;else if($.value||y.value)return;y.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),se(_.value).then(i=>{u?d.value=i.data.lists:d.value=[...d.value,...i.data.lists],i.data.lists.length<_.value.page_size?$.value=!0:_.value.page_no++,S.value=0,V.emit("set-sale-order-detail",d.value[0]),M.value=i.data.count,y.value=!1}).catch(i=>{$.value=!0,y.value=!1})},I=(u,i)=>{S.value=i,V.emit("set-sale-order-detail",u)};return D({getOrderList:b}),H(()=>{V.on("update-sale-order-detail",u=>{console.log("==="),d.value[S.value].paid=1})}),J(()=>{V.off("update-sale-order-detail")}),(u,i)=>{const z=p("el-radio-button"),B=p("el-radio-group"),N=p("el-date-picker"),T=p("el-button"),Y=p("el-input"),C=p("el-image"),x=R("loading"),P=R("infinite-scroll");return s(),o("div",de,[e("div",ce,[_e,e("div",re,[n(B,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),onChange:m,size:"small"},{default:k(()=>[n(z,{value:1},{default:k(()=>[w("全部")]),_:1}),n(z,{value:2},{default:k(()=>[w("未支付")]),_:1})]),_:1},8,["modelValue"]),n(N,{modelValue:h.value,"onUpdate:modelValue":i[1]||(i[1]=a=>h.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":v,onChange:L,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ue,[n(Y,{modelValue:_.value.order_id,"onUpdate:modelValue":i[3]||(i[3]=a=>_.value.order_id=a),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=Z(a=>b(!0),["enter"])),onClear:i[5]||(i[5]=a=>b(!0)),clearable:""},{append:k(()=>[n(T,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[2]||(i[2]=a=>b(!0))},{default:k(()=>[w("搜索")]),_:1})]),_:1},8,["modelValue"])]),F((s(),o("div",ve,[(s(!0),o(A,null,E(d.value,(a,U)=>(s(),o("div",{class:K(["item",{"item-active":S.value==U}]),key:U,onClick:O=>I(a,U)},[e("div",fe,[e("div",{class:K(["sn","cahier"])},"单号: "+c(a.order_id),1),e("div",me,c(a.pay_time),1)]),e("div",he,[a.product_info?(s(),o("div",ye,[(s(!0),o(A,null,E(a.product_info.slice(0,5),(O,X)=>(s(),ee(C,{key:X,src:O.image,class:"shop-img"},null,8,["src"]))),128)),a.product_info.length==1?(s(),o("div",ge,c(a.product_info[0].store_name),1)):r("",!0)])):r("",!0),e("div",be,[e("div",ke,"¥"+c(a.pay_price),1),e("div",$e,"共"+c(a.product_info.length)+"款商品",1)])]),e("div",we,[e("div",De,[a.paid?(s(),o("div",Se,[w(c(a.paid_name)+" ",1),a.pay_type==9?(s(),o("span",Ve,"(微信收款)")):r("",!0),a.pay_type==17?(s(),o("span",ze,"(现金支付)")):r("",!0),a.pay_type==13?(s(),o("span",Ye,"(支付宝收款)")):r("",!0),a.pay_type==3?(s(),o("span",Ce,"(余额支付)")):r("",!0),a.pay_type==1?(s(),o("span",xe,"(微信支付)")):r("",!0)])):(s(),o("div",Pe,c(a.paid_name),1))])])],10,pe))),128)),$.value?(s(),o("div",Re,"没有更多了")):r("",!0),y.value?(s(),o("div",Le,"加载中...")):r("",!0)])),[[x,y.value],[P,b]])])}}},Ie=q(Me,[["__scopeId","data-v-4b07d859"]]),g=f=>(Q("data-v-870cbbd4"),f=f(),W(),f),Be={class:"my-order"},Ne={key:0,class:"detail"},Te={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)),Fe={class:"table-info"},Oe={class:"info-item"},Ae=g(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ee={class:"info-item-info"},Ke={class:"info-item"},je=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"},Qe={class:"info-item"},We=g(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=g(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=g(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=g(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},ct=g(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),_t={class:"info-item-info"},rt={key:0},ut={key:1},vt={key:2},pt={key:3},ft={key:4},mt={style:{"font-size":"0.9rem"}},ht={style:{color:"#ff4a00"}},yt={style:{display:"flex","align-items":"center"}},gt={style:{"margin-left":"0.5rem"}},bt={key:0,class:"footer"},kt={key:1},$t={__name:"detail",emits:["rePaySuccess"],setup(f,{emit:D}){G(),te();const t=l({id:""});l([]);const m=l(null),h=l(!1);l(0),l(0),l(["商品信息","订单详情"]),l(""),l(!1);const L=()=>{m.value.setForm({isRePay:!0,data:t.value}),m.value.drawer=!0},v=l({page_no:1,page_size:15,loadend:!1,loading:!1}),_=l([]),y=()=>{console.log("触底"),t.value.id&&!v.value.loadend&&(console.log("加载"),v.value.loading=!0,oe({pid:t.value.id,page_no:v.value.page_no,page_size:v.value.page_size}).then(d=>{_.value=[..._.value,...d.data.lists],d.data.lists.length{h.value=!0,ae({id:t.value.id}).then(d=>{t.value=d.data,setTimeout(()=>{h.value=!1},200)})},S=D,$=(d=null)=>{setTimeout(()=>{S("rePaySuccess")})};return H(()=>{V.on("set-sale-order-detail",d=>{console.log("===",d),t.value=d,v.value.page_no=1,v.value.loadend=!1,v.value.loading=!1,_.value=[],M()})}),J(()=>{V.off("set-sale-order-detail")}),(d,b)=>{var Y;const I=p("el-image"),u=p("el-table-column"),i=p("el-table"),z=p("el-button"),B=p("el-empty"),N=R("infinite-scroll"),T=R("loading");return s(),o("div",Be,[t.value.id?F((s(),o("div",Ne,[F((s(),o("div",Te,[Ue,e("div",Fe,[e("div",Oe,[Ae,e("div",Ee,c(t.value.order_id),1)]),e("div",Ke,[je,e("div",qe,c(t.value.total_num||0),1)]),e("div",Ge,[He,e("div",Je,"¥"+c(t.value.total_price),1)]),e("div",Qe,[We,e("div",Xe,c(t.value.pay_time),1)]),e("div",Ze,[et,e("div",tt,"¥"+c(t.value.deduction_price),1)]),e("div",st,[ot,e("div",at,"¥"+c(t.value.pay_price),1)]),e("div",it,[lt,e("div",nt,c(t.value.pay_time),1)]),e("div",dt,[ct,e("div",_t,[t.value.pay_type==9?(s(),o("span",rt,"微信收款")):r("",!0),t.value.pay_type==17?(s(),o("span",ut,"现金支付")):r("",!0),t.value.pay_type==13?(s(),o("span",vt,"支付宝收款")):r("",!0),t.value.pay_type==3?(s(),o("span",pt,"余额支付")):r("",!0),t.value.pay_type==1?(s(),o("span",ft,"微信支付")):r("",!0)])])]),e("div",mt,[w(" 共计 "),e("span",ht,c(((Y=t.value.product)==null?void 0:Y.length)||" "),1),w(" 款商品 ")]),n(i,{data:t.value.product},{default:k(()=>[n(u,{label:"商品信息"},{default:k(({row:C})=>{var x,P;return[e("div",yt,[n(I,{style:{height:"3rem",width:"3rem"},src:(x=C.cart_info)==null?void 0:x.image},null,8,["src"]),e("span",gt,c((P=C.cart_info)==null?void 0:P.name),1)])]}),_:1}),n(u,{prop:"cart_info.price",label:"单价",width:"150"}),n(u,{prop:"cart_info.cart_num",label:"数量",width:"150"}),n(u,{prop:"cart_info.total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[N,y]]),t.value.paid?r("",!0):(s(),o("div",bt,[n(z,{type:"primary",size:"large",onClick:L},{default:k(()=>[w("重新支付")]),_:1})]))])),[[T,h.value]]):(s(),o("div",kt,[n(B)])),n(ie,{ref_key:"payRef",ref:m,onPaySuccess:$},null,512)])}}},wt=q($t,[["__scopeId","data-v-870cbbd4"]]),Dt={class:"my-card"},Pt={__name:"index",setup(f){const D=l(null),t=()=>{var m;(m=D.value)==null||m.getOrderList(!0)};return(m,h)=>(s(),o("div",Dt,[n(Ie,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:D},null,512),n(le),n(wt,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{Pt as default}; diff --git a/build/assets/index-Bqf-2ar_.js b/build/assets/index-DOnIKlS6.js similarity index 84% rename from build/assets/index-Bqf-2ar_.js rename to build/assets/index-DOnIKlS6.js index c6e8c13..42ca9ef 100644 --- a/build/assets/index-Bqf-2ar_.js +++ b/build/assets/index-DOnIKlS6.js @@ -1 +1 @@ -import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-C2mUYWeU.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-DhxPMYiX.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-DQziC176.css b/build/assets/index-DQziC176.css deleted file mode 100644 index ad7ecff..0000000 --- a/build/assets/index-DQziC176.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.my-order[data-v-60ddb1b4]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-60ddb1b4]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-60ddb1b4]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-60ddb1b4]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-60ddb1b4]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-60ddb1b4]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-60ddb1b4]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-lists .item[data-v-60ddb1b4]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-60ddb1b4]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-60ddb1b4]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-60ddb1b4]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #2ec479;color:#2ec479;border-radius:.187rem}.my-order .order-lists .item .top .cahier2[data-v-60ddb1b4]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #ff4a00;color:#ff4a00;border-radius:.187rem}.my-order .order-lists .item .top .create-time[data-v-60ddb1b4]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-60ddb1b4]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-60ddb1b4]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-60ddb1b4]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-60ddb1b4]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-60ddb1b4]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-60ddb1b4]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-60ddb1b4]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-lists .item .bottom[data-v-60ddb1b4]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-60ddb1b4]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-60ddb1b4]{background-color:#efefef}.my-order .load-end[data-v-60ddb1b4]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-371e2053]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-371e2053]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-371e2053]{padding:1rem 1rem 6rem;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-371e2053]{font-weight:700}.my-order .detail .table .table-info[data-v-371e2053]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-371e2053]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-371e2053]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-371e2053]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-371e2053]{position:absolute;bottom:0;left:0;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/build/assets/index-DcQzoY0i.js b/build/assets/index-DcQzoY0i.js new file mode 100644 index 0000000..2fc9a89 --- /dev/null +++ b/build/assets/index-DcQzoY0i.js @@ -0,0 +1,27 @@ +import{c as Eg,a as Tg,b as Po,o as Og}from"./store-Bz99DLdk.js";import{_ as Sr,r as K,o as Ct,m as Qn,a as Lt,b as sn,c as In,d as Cr,w as Gn,e as x,f as en,g as yn,t as Fn,n as Vi,E as Ir,u as Fo,h as Vn,F as Wo,i as Bo,j as St,k as bg,l as Ji,p as Pg,q as Ar,s as Fg,v as Uo,x as yr,y as Wg,z as Bg,A as Ug,B as Mg,C as Dg}from"./index-DhxPMYiX.js";import{p as $g}from"./padding-DwppsfEF.js";import{p as Ng}from"./pay-BHLYNBxQ.js";import"./moment-Cl4UOzQZ.js";/* empty css */const Gg={class:"price"},Hg={class:"flex"},qg={style:{margin:"0.625rem","padding-bottom":"40px"}},zg={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Kg={class:"dialog-footer"},Zg={__name:"price",emits:["changeAllPrice"],setup(_n,{expose:vn,emit:o}){const B=K(!1),N=K(null),H=K(0),P=(X=!0,R=0)=>{M.value.nowPrice="",M.value.percentage="",B.value=X,H.value=R,Vi(()=>{setTimeout(()=>{var Q;(Q=N.value)==null||Q.focus()},150)})},M=K({nowPrice:"",percentage:""}),an=X=>{M.value.percentage=(X/H.value*100).toFixed(2)},Wn=X=>{M.value.nowPrice=(H.value*X/100).toFixed(2)},on=o,rn=()=>{if(M.value.percentage>100)return M.value.nowPrice="",M.value.percentage="",Ir.error("改价金额不能大于当前订单金额");if(M.value.nowPrice<=0)return M.value.nowPrice="",M.value.percentage="",Ir.error("金额不能小于0");on("changeAllPrice",M.value.nowPrice)};vn({show:P,dialogVisible:B});const En=()=>{B.value&&rn()};return Ct(()=>{Qn.on("enter",En)}),Lt(()=>{Qn.off("enter",En)}),(X,R)=>{const Q=sn("el-input"),j=sn("el-button"),pn=sn("el-dialog");return In(),Cr(pn,{modelValue:B.value,"onUpdate:modelValue":R[2]||(R[2]=gn=>B.value=gn),title:"订单改价",width:"650"},{footer:Gn(()=>[x("div",Kg,[en(j,{class:"ok-btn",type:"primary",onClick:rn},{default:Gn(()=>[yn(" 确定 (Enter) ")]),_:1})])]),default:Gn(()=>[x("div",Gg,[x("div",Hg,[en(Q,{ref_key:"priceRef",ref:N,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:M.value.nowPrice,"onUpdate:modelValue":R[0]||(R[0]=gn=>M.value.nowPrice=gn),type:"number",placeholder:"请输入改价后的价格",onInput:an},{suffix:Gn(()=>[yn("元")]),_:1},8,["modelValue"]),en(Q,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:M.value.percentage,"onUpdate:modelValue":R[1]||(R[1]=gn=>M.value.percentage=gn),type:"number",placeholder:"请输入比例",onInput:Wn},{suffix:Gn(()=>[yn("%")]),_:1},8,["modelValue"])]),x("div",qg,[yn(" 改价后金额: "),x("span",zg,"¥"+Fn(M.value.nowPrice||H.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Yg=Sr(Zg,[["__scopeId","data-v-924edcc0"]]),Xg={class:"my-order"},Jg={class:"header-nav"},Vg={class:"nav-item"},Qg={class:"order-list"},kg={class:"order-item-info"},jg={class:"order-item-title"},nd={class:"title"},ed=["onClick"],td={class:"order-item-sku"},rd={class:"order-item-price"},id={class:"order-footer"},ud={class:"order-total"},fd={class:"price"},od={class:"total-item"},ld={style:{"font-size":"1.4rem"}},sd={class:"total-item"},ad={class:"order-btn"},cd={__name:"order",emits:["goPay","editAttr"],setup(_n,{expose:vn,emit:o}){const B=K([]),N=K(0),H=K(0),P=K(0);Fo();const M=()=>{let b=[];B.value.map(q=>{b.push(q.id)}),b.length!=0&&Wn(b)},an=b=>{B.value=B.value.filter(q=>q.id!=b),Wn([b])},Wn=b=>{Eg({id:b}).then(q=>{console.log(q),on()})},on=()=>{N.value=0,H.value=0,P.value=0,Tg().then(b=>{var q,T,Z;((T=(q=b.data)==null?void 0:q.lists)==null?void 0:T.length)>0?(B.value=b.data.lists,N.value=(Z=b.data)==null?void 0:Z.lists.reduce((J,Rn)=>J+Number(Rn.total_price),0),H.value=N.value):B.value=[]})};on();const rn=o,En=()=>{rn("goPay")},X=(b,q)=>{Po({product_id:b.product_id,cart_num:b.cart_num}).then(T=>{N.value=0,B.value.forEach(Z=>{N.value+=Z.price*Z.cart_num}),H.value=N.value})},R=b=>{P.value=H.value-b,N.value=+b,Vi(()=>{setTimeout(()=>{j(!1)},150)})};K(0);const Q=K(null),j=(b=!0)=>{Q.value.show(b,H.value)};vn({getList:on,list:B,discounts:P,allPrice:N});const pn=()=>{Q.value.dialogVisible?Q.value.dialogVisible=!1:j()},gn=()=>{B.value.length>0&&M()};return Ct(()=>{Qn.on("insert",pn),Qn.on("delete",gn)}),Lt(()=>{Qn.off("insert",pn),Qn.off("delete",gn)}),(b,q)=>{const T=sn("Delete"),Z=sn("el-icon"),J=sn("el-empty"),Rn=sn("el-image"),ln=sn("el-input-number"),et=sn("el-button");return In(),Vn("div",Xg,[x("div",Jg,[x("div",Vg,[yn(" 已选购 "),x("span",null,Fn(B.value.length),1),yn(" 款 ")]),x("div",{class:"nav-item-clear",onClick:M},[en(Z,null,{default:Gn(()=>[en(T)]),_:1}),yn("清空 (Delete) ")])]),x("div",Qg,[B.value.length==0?(In(),Cr(J,{key:0,description:"请点击右侧添加商品"})):(In(!0),Vn(Wo,{key:1},Bo(B.value,(kn,Lr)=>(In(),Vn("div",{class:"order-item",key:Lr},[en(Rn,{loading:"lazy",class:"order-item-img",src:kn.image},null,8,["src"]),x("div",kg,[x("div",jg,[x("div",nd,Fn(kn.store_name),1),x("div",{class:"delete",onClick:tt=>an(kn.id)},"删除",8,ed)]),x("div",td,[x("span",null,Fn(kn.unit_name),1)]),x("div",rd,[x("div",null,[yn(" ¥"),x("span",null,Fn(kn.price),1)]),x("div",null,[en(ln,{modelValue:kn.cart_num,"onUpdate:modelValue":tt=>kn.cart_num=tt,"step-strictly":"",min:1,step:1,onChange:tt=>X(kn)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),x("div",id,[x("div",ud,[x("div",fd,[x("div",od,[yn(" 实付: "),x("span",null,[yn("¥"),x("span",ld,Fn(N.value.toFixed(2)),1)])]),x("div",sd,[yn(" 优惠: "),x("span",null,[yn("¥"),x("span",null,Fn(P.value.toFixed(2)),1)])])])]),x("div",ad,[en(et,{class:"btn",type:"primary",onClick:En,disabled:B.value.length==0},{default:Gn(()=>[yn("立即结账 (F9)")]),_:1},8,["disabled"])])]),en(Yg,{ref_key:"priceRef",ref:Q,onChangeAllPrice:R},null,512)])}}},hd=Sr(cd,[["__scopeId","data-v-a98302e2"]]);var Rr={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 + */Rr.exports;(function(_n,vn){(function(){var o,B="4.17.21",N=200,H="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",P="Expected a function",M="Invalid `variable` option passed into `_.template`",an="__lodash_hash_undefined__",Wn=500,on="__lodash_placeholder__",rn=1,En=2,X=4,R=1,Q=2,j=1,pn=2,gn=4,b=8,q=16,T=32,Z=64,J=128,Rn=256,ln=512,et=30,kn="...",Lr=800,tt=16,ki=1,Mo=2,Do=3,Te=1/0,we=9007199254740991,$o=17976931348623157e292,Et=NaN,ue=4294967295,No=ue-1,Go=ue>>>1,Ho=[["ary",J],["bind",j],["bindKey",pn],["curry",b],["curryRight",q],["flip",ln],["partial",T],["partialRight",Z],["rearg",Rn]],$e="[object Arguments]",Tt="[object Array]",qo="[object AsyncFunction]",rt="[object Boolean]",it="[object Date]",zo="[object DOMException]",Ot="[object Error]",bt="[object Function]",ji="[object GeneratorFunction]",jn="[object Map]",ut="[object Number]",Ko="[object Null]",se="[object Object]",nu="[object Promise]",Zo="[object Proxy]",ft="[object RegExp]",ne="[object Set]",ot="[object String]",Pt="[object Symbol]",Yo="[object Undefined]",lt="[object WeakMap]",Xo="[object WeakSet]",st="[object ArrayBuffer]",Ne="[object DataView]",Er="[object Float32Array]",Tr="[object Float64Array]",Or="[object Int8Array]",br="[object Int16Array]",Pr="[object Int32Array]",Fr="[object Uint8Array]",Wr="[object Uint8ClampedArray]",Br="[object Uint16Array]",Ur="[object Uint32Array]",Jo=/\b__p \+= '';/g,Vo=/\b(__p \+=) '' \+/g,Qo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,eu=/&(?:amp|lt|gt|quot|#39);/g,tu=/[&<>"']/g,ko=RegExp(eu.source),jo=RegExp(tu.source),nl=/<%-([\s\S]+?)%>/g,el=/<%([\s\S]+?)%>/g,ru=/<%=([\s\S]+?)%>/g,tl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rl=/^\w*$/,il=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/[\\^$.*+?()[\]{}|]/g,ul=RegExp(Mr.source),Dr=/^\s+/,fl=/\s/,ol=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ll=/\{\n\/\* \[wrapped with (.+)\] \*/,sl=/,? & /,al=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,cl=/[()=,{}\[\]\/\s]/,hl=/\\(\\)?/g,_l=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,iu=/\w*$/,pl=/^[-+]0x[0-9a-f]+$/i,gl=/^0b[01]+$/i,dl=/^\[object .+?Constructor\]$/,vl=/^0o[0-7]+$/i,ml=/^(?:0|[1-9]\d*)$/,wl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ft=/($^)/,xl=/['\n\r\u2028\u2029\\]/g,Wt="\\ud800-\\udfff",Al="\\u0300-\\u036f",yl="\\ufe20-\\ufe2f",Il="\\u20d0-\\u20ff",uu=Al+yl+Il,fu="\\u2700-\\u27bf",ou="a-z\\xdf-\\xf6\\xf8-\\xff",Rl="\\xac\\xb1\\xd7\\xf7",Sl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Cl="\\u2000-\\u206f",Ll=" \\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",lu="A-Z\\xc0-\\xd6\\xd8-\\xde",su="\\ufe0e\\ufe0f",au=Rl+Sl+Cl+Ll,$r="['’]",El="["+Wt+"]",cu="["+au+"]",Bt="["+uu+"]",hu="\\d+",Tl="["+fu+"]",_u="["+ou+"]",pu="[^"+Wt+au+hu+fu+ou+lu+"]",Nr="\\ud83c[\\udffb-\\udfff]",Ol="(?:"+Bt+"|"+Nr+")",gu="[^"+Wt+"]",Gr="(?:\\ud83c[\\udde6-\\uddff]){2}",Hr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ge="["+lu+"]",du="\\u200d",vu="(?:"+_u+"|"+pu+")",bl="(?:"+Ge+"|"+pu+")",mu="(?:"+$r+"(?:d|ll|m|re|s|t|ve))?",wu="(?:"+$r+"(?:D|LL|M|RE|S|T|VE))?",xu=Ol+"?",Au="["+su+"]?",Pl="(?:"+du+"(?:"+[gu,Gr,Hr].join("|")+")"+Au+xu+")*",Fl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",yu=Au+xu+Pl,Bl="(?:"+[Tl,Gr,Hr].join("|")+")"+yu,Ul="(?:"+[gu+Bt+"?",Bt,Gr,Hr,El].join("|")+")",Ml=RegExp($r,"g"),Dl=RegExp(Bt,"g"),qr=RegExp(Nr+"(?="+Nr+")|"+Ul+yu,"g"),$l=RegExp([Ge+"?"+_u+"+"+mu+"(?="+[cu,Ge,"$"].join("|")+")",bl+"+"+wu+"(?="+[cu,Ge+vu,"$"].join("|")+")",Ge+"?"+vu+"+"+mu,Ge+"+"+wu,Wl,Fl,hu,Bl].join("|"),"g"),Nl=RegExp("["+du+Wt+uu+su+"]"),Gl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Hl=["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"],ql=-1,V={};V[Er]=V[Tr]=V[Or]=V[br]=V[Pr]=V[Fr]=V[Wr]=V[Br]=V[Ur]=!0,V[$e]=V[Tt]=V[st]=V[rt]=V[Ne]=V[it]=V[Ot]=V[bt]=V[jn]=V[ut]=V[se]=V[ft]=V[ne]=V[ot]=V[lt]=!1;var Y={};Y[$e]=Y[Tt]=Y[st]=Y[Ne]=Y[rt]=Y[it]=Y[Er]=Y[Tr]=Y[Or]=Y[br]=Y[Pr]=Y[jn]=Y[ut]=Y[se]=Y[ft]=Y[ne]=Y[ot]=Y[Pt]=Y[Fr]=Y[Wr]=Y[Br]=Y[Ur]=!0,Y[Ot]=Y[bt]=Y[lt]=!1;var zl={À:"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"},Kl={"&":"&","<":"<",">":">",'"':""","'":"'"},Zl={"&":"&","<":"<",">":">",""":'"',"'":"'"},Yl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xl=parseFloat,Jl=parseInt,Iu=typeof St=="object"&&St&&St.Object===Object&&St,Vl=typeof self=="object"&&self&&self.Object===Object&&self,mn=Iu||Vl||Function("return this")(),zr=vn&&!vn.nodeType&&vn,Oe=zr&&!0&&_n&&!_n.nodeType&&_n,Ru=Oe&&Oe.exports===zr,Kr=Ru&&Iu.process,Hn=function(){try{var a=Oe&&Oe.require&&Oe.require("util").types;return a||Kr&&Kr.binding&&Kr.binding("util")}catch{}}(),Su=Hn&&Hn.isArrayBuffer,Cu=Hn&&Hn.isDate,Lu=Hn&&Hn.isMap,Eu=Hn&&Hn.isRegExp,Tu=Hn&&Hn.isSet,Ou=Hn&&Hn.isTypedArray;function Bn(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 Ql(a,_,h,m){for(var S=-1,D=a==null?0:a.length;++S-1}function Zr(a,_,h){for(var m=-1,S=a==null?0:a.length;++m-1;);return h}function Du(a,_){for(var h=a.length;h--&&He(_,a[h],0)>-1;);return h}function fs(a,_){for(var h=a.length,m=0;h--;)a[h]===_&&++m;return m}var os=Vr(zl),ls=Vr(Kl);function ss(a){return"\\"+Yl[a]}function as(a,_){return a==null?o:a[_]}function qe(a){return Nl.test(a)}function cs(a){return Gl.test(a)}function hs(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function ni(a){var _=-1,h=Array(a.size);return a.forEach(function(m,S){h[++_]=[S,m]}),h}function $u(a,_){return function(h){return a(_(h))}}function ye(a,_){for(var h=-1,m=a.length,S=0,D=[];++h-1}function js(n,e){var t=this.__data__,r=jt(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}ae.prototype.clear=Js,ae.prototype.delete=Vs,ae.prototype.get=Qs,ae.prototype.has=ks,ae.prototype.set=js;function ce(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Zn(n,e,t,r,i,f){var l,s=e&rn,c=e&En,p=e&X;if(t&&(l=i?t(n,r,i,f):t(n)),l!==o)return l;if(!nn(n))return n;var g=C(n);if(g){if(l=rc(n),!s)return Tn(n,l)}else{var d=An(n),v=d==bt||d==ji;if(Ee(n))return yf(n,s);if(d==se||d==$e||v&&!i){if(l=c||v?{}:Gf(n),!s)return c?Za(n,ga(l,n)):Ka(n,Qu(l,n))}else{if(!Y[d])return i?n:{};l=ic(n,d,s)}}f||(f=new te);var w=f.get(n);if(w)return w;f.set(n,l),vo(n)?n.forEach(function(I){l.add(Zn(I,e,t,I,n,f))}):po(n)&&n.forEach(function(I,F){l.set(F,Zn(I,e,t,F,n,f))});var y=p?c?Ci:Si:c?bn:dn,E=g?o:y(n);return qn(E||n,function(I,F){E&&(F=I,I=n[F]),dt(l,F,Zn(I,e,t,F,n,f))}),l}function da(n){var e=dn(n);return function(t){return ku(t,n,e)}}function ku(n,e,t){var r=t.length;if(n==null)return!r;for(n=z(n);r--;){var i=t[r],f=e[i],l=n[i];if(l===o&&!(i in n)||!f(l))return!1}return!0}function ju(n,e,t){if(typeof n!="function")throw new zn(P);return It(function(){n.apply(o,t)},e)}function vt(n,e,t,r){var i=-1,f=Ut,l=!0,s=n.length,c=[],p=e.length;if(!s)return c;t&&(e=k(e,Un(t))),r?(f=Zr,l=!1):e.length>=N&&(f=at,l=!1,e=new Fe(e));n:for(;++ii?0:i+t),r=r===o||r>i?i:L(r),r<0&&(r+=i),r=t>r?0:wo(r);t0&&t(s)?e>1?wn(s,e-1,t,r,i):Ae(i,s):r||(i[i.length]=s)}return i}var oi=Ef(),tf=Ef(!0);function fe(n,e){return n&&oi(n,e,dn)}function li(n,e){return n&&tf(n,e,dn)}function er(n,e){return xe(e,function(t){return de(n[t])})}function Be(n,e){e=Ce(e,n);for(var t=0,r=e.length;n!=null&&te}function wa(n,e){return n!=null&&G.call(n,e)}function xa(n,e){return n!=null&&e in z(n)}function Aa(n,e,t){return n>=xn(e,t)&&n=120&&g.length>=120)?new Fe(l&&g):o}g=n[0];var d=-1,v=s[0];n:for(;++d-1;)s!==n&&Zt.call(s,c,1),Zt.call(n,c,1);return n}function pf(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==f){var f=i;ge(i)?Zt.call(n,i,1):mi(n,i)}}return n}function gi(n,e){return n+Jt(Yu()*(e-n+1))}function Wa(n,e,t,r){for(var i=-1,f=hn(Xt((e-n)/(t||1)),0),l=h(f);f--;)l[r?f:++i]=n,n+=t;return l}function di(n,e){var t="";if(!n||e<1||e>we)return t;do e%2&&(t+=n),e=Jt(e/2),e&&(n+=n);while(e);return t}function O(n,e){return Fi(zf(n,e,Pn),n+"")}function Ba(n){return Vu(nt(n))}function Ua(n,e){var t=nt(n);return hr(t,We(e,0,t.length))}function xt(n,e,t,r){if(!nn(n))return n;e=Ce(e,n);for(var i=-1,f=e.length,l=f-1,s=n;s!=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 f=h(i);++r>>1,l=n[f];l!==null&&!Dn(l)&&(t?l<=e:l=N){var p=e?null:Va(n);if(p)return Dt(p);l=!1,i=at,c=new Fe}else c=e?[]:s;n:for(;++r=r?n:Yn(n,e,t)}var Af=Ls||function(n){return mn.clearTimeout(n)};function yf(n,e){if(e)return n.slice();var t=n.length,r=Hu?Hu(t):new n.constructor(t);return n.copy(r),r}function yi(n){var e=new n.constructor(n.byteLength);return new zt(e).set(new zt(n)),e}function Ga(n,e){var t=e?yi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Ha(n){var e=new n.constructor(n.source,iu.exec(n));return e.lastIndex=n.lastIndex,e}function qa(n){return gt?z(gt.call(n)):{}}function If(n,e){var t=e?yi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function Rf(n,e){if(n!==e){var t=n!==o,r=n===null,i=n===n,f=Dn(n),l=e!==o,s=e===null,c=e===e,p=Dn(e);if(!s&&!p&&!f&&n>e||f&&l&&c&&!s&&!p||r&&l&&c||!t&&c||!i)return 1;if(!r&&!f&&!p&&n=s)return c;var p=t[r];return c*(p=="desc"?-1:1)}}return n.index-e.index}function Sf(n,e,t,r){for(var i=-1,f=n.length,l=t.length,s=-1,c=e.length,p=hn(f-l,0),g=h(c+p),d=!r;++s1?t[i-1]:o,l=i>2?t[2]:o;for(f=n.length>3&&typeof f=="function"?(i--,f):o,l&&Cn(t[0],t[1],l)&&(f=i<3?o:f,i=1),e=z(e);++r-1?i[f?e[l]:l]:o}}function bf(n){return pe(function(e){var t=e.length,r=t,i=Kn.prototype.thru;for(n&&e.reverse();r--;){var f=e[r];if(typeof f!="function")throw new zn(P);if(i&&!l&&ar(f)=="wrapper")var l=new Kn([],!0)}for(r=l?r:t;++r1&&U.reverse(),g&&cs))return!1;var p=f.get(n),g=f.get(e);if(p&&g)return p==e&&g==n;var d=-1,v=!0,w=t&Q?new Fe:o;for(f.set(n,e),f.set(e,n);++d1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(ol,`{ +/* [wrapped with `+e+`] */ +`)}function fc(n){return C(n)||De(n)||!!(Ku&&n&&n[Ku])}function ge(n,e){var t=typeof n;return e=e??we,!!e&&(t=="number"||t!="symbol"&&ml.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Lr)return arguments[0]}else e=0;return n.apply(o,arguments)}}function hr(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,to(n,t)});function ro(n){var e=u(n);return e.__chain__=!0,e}function vh(n,e){return e(n),n}function _r(n,e){return e(n)}var mh=pe(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(f){return fi(f,n)};return e>1||this.__actions__.length||!(r instanceof W)||!ge(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:_r,args:[i],thisArg:o}),new Kn(r,this.__chain__).thru(function(f){return e&&!f.length&&f.push(o),f}))});function wh(){return ro(this)}function xh(){return new Kn(this.value(),this.__chain__)}function Ah(){this.__values__===o&&(this.__values__=mo(this.value()));var n=this.__index__>=this.__values__.length,e=n?o:this.__values__[this.__index__++];return{done:n,value:e}}function yh(){return this}function Ih(n){for(var e,t=this;t instanceof kt;){var r=Vf(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 Rh(){var n=this.__wrapped__;if(n instanceof W){var e=n;return this.__actions__.length&&(e=new W(this)),e=e.reverse(),e.__actions__.push({func:_r,args:[Wi],thisArg:o}),new Kn(e,this.__chain__)}return this.thru(Wi)}function Sh(){return wf(this.__wrapped__,this.__actions__)}var Ch=ur(function(n,e,t){G.call(n,t)?++n[t]:he(n,t,1)});function Lh(n,e,t){var r=C(n)?bu:va;return t&&Cn(n,e,t)&&(e=o),r(n,A(e,3))}function Eh(n,e){var t=C(n)?xe:ef;return t(n,A(e,3))}var Th=Of(Qf),Oh=Of(kf);function bh(n,e){return wn(pr(n,e),1)}function Ph(n,e){return wn(pr(n,e),Te)}function Fh(n,e,t){return t=t===o?1:L(t),wn(pr(n,e),t)}function io(n,e){var t=C(n)?qn:Re;return t(n,A(e,3))}function uo(n,e){var t=C(n)?kl:nf;return t(n,A(e,3))}var Wh=ur(function(n,e,t){G.call(n,t)?n[t].push(e):he(n,t,[e])});function Bh(n,e,t,r){n=On(n)?n:nt(n),t=t&&!r?L(t):0;var i=n.length;return t<0&&(t=hn(i+t,0)),wr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&He(n,e,t)>-1}var Uh=O(function(n,e,t){var r=-1,i=typeof e=="function",f=On(n)?h(n.length):[];return Re(n,function(l){f[++r]=i?Bn(e,l,t):mt(l,e,t)}),f}),Mh=ur(function(n,e,t){he(n,t,e)});function pr(n,e){var t=C(n)?k:lf;return t(n,A(e,3))}function Dh(n,e,t,r){return n==null?[]:(C(e)||(e=e==null?[]:[e]),t=r?o:t,C(t)||(t=t==null?[]:[t]),hf(n,e,t))}var $h=ur(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Nh(n,e,t){var r=C(n)?Yr:Bu,i=arguments.length<3;return r(n,A(e,4),t,i,Re)}function Gh(n,e,t){var r=C(n)?jl:Bu,i=arguments.length<3;return r(n,A(e,4),t,i,nf)}function Hh(n,e){var t=C(n)?xe:ef;return t(n,vr(A(e,3)))}function qh(n){var e=C(n)?Vu:Ba;return e(n)}function zh(n,e,t){(t?Cn(n,e,t):e===o)?e=1:e=L(e);var r=C(n)?ha:Ua;return r(n,e)}function Kh(n){var e=C(n)?_a:Da;return e(n)}function Zh(n){if(n==null)return 0;if(On(n))return wr(n)?ze(n):n.length;var e=An(n);return e==jn||e==ne?n.size:hi(n).length}function Yh(n,e,t){var r=C(n)?Xr:$a;return t&&Cn(n,e,t)&&(e=o),r(n,A(e,3))}var Xh=O(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Cn(n,e[0],e[1])?e=[]:t>2&&Cn(e[0],e[1],e[2])&&(e=[e[0]]),hf(n,wn(e,1),[])}),gr=Es||function(){return mn.Date.now()};function Jh(n,e){if(typeof e!="function")throw new zn(P);return n=L(n),function(){if(--n<1)return e.apply(this,arguments)}}function fo(n,e,t){return e=t?o:e,e=n&&e==null?n.length:e,_e(n,J,o,o,o,o,e)}function oo(n,e){var t;if(typeof e!="function")throw new zn(P);return n=L(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Ui=O(function(n,e,t){var r=j;if(t.length){var i=ye(t,ke(Ui));r|=T}return _e(n,r,e,t,i)}),lo=O(function(n,e,t){var r=j|pn;if(t.length){var i=ye(t,ke(lo));r|=T}return _e(e,r,n,t,i)});function so(n,e,t){e=t?o:e;var r=_e(n,b,o,o,o,o,o,e);return r.placeholder=so.placeholder,r}function ao(n,e,t){e=t?o:e;var r=_e(n,q,o,o,o,o,o,e);return r.placeholder=ao.placeholder,r}function co(n,e,t){var r,i,f,l,s,c,p=0,g=!1,d=!1,v=!0;if(typeof n!="function")throw new zn(P);e=Jn(e)||0,nn(t)&&(g=!!t.leading,d="maxWait"in t,f=d?hn(Jn(t.maxWait)||0,e):f,v="trailing"in t?!!t.trailing:v);function w(fn){var ie=r,me=i;return r=i=o,p=fn,l=n.apply(me,ie),l}function y(fn){return p=fn,s=It(F,e),g?w(fn):l}function E(fn){var ie=fn-c,me=fn-p,bo=e-ie;return d?xn(bo,f-me):bo}function I(fn){var ie=fn-c,me=fn-p;return c===o||ie>=e||ie<0||d&&me>=f}function F(){var fn=gr();if(I(fn))return U(fn);s=It(F,E(fn))}function U(fn){return s=o,v&&r?w(fn):(r=i=o,l)}function $n(){s!==o&&Af(s),p=0,r=c=i=s=o}function Ln(){return s===o?l:U(gr())}function Nn(){var fn=gr(),ie=I(fn);if(r=arguments,i=this,c=fn,ie){if(s===o)return y(c);if(d)return Af(s),s=It(F,e),w(c)}return s===o&&(s=It(F,e)),l}return Nn.cancel=$n,Nn.flush=Ln,Nn}var Vh=O(function(n,e){return ju(n,1,e)}),Qh=O(function(n,e,t){return ju(n,Jn(e)||0,t)});function kh(n){return _e(n,ln)}function dr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new zn(P);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],f=t.cache;if(f.has(i))return f.get(i);var l=n.apply(this,r);return t.cache=f.set(i,l)||f,l};return t.cache=new(dr.Cache||ce),t}dr.Cache=ce;function vr(n){if(typeof n!="function")throw new zn(P);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 jh(n){return oo(2,n)}var n_=Na(function(n,e){e=e.length==1&&C(e[0])?k(e[0],Un(A())):k(wn(e,1),Un(A()));var t=e.length;return O(function(r){for(var i=-1,f=xn(r.length,t);++i=e}),De=uf(function(){return arguments}())?uf:function(n){return tn(n)&&G.call(n,"callee")&&!zu.call(n,"callee")},C=h.isArray,g_=Su?Un(Su):Ia;function On(n){return n!=null&&mr(n.length)&&!de(n)}function un(n){return tn(n)&&On(n)}function d_(n){return n===!0||n===!1||tn(n)&&Sn(n)==rt}var Ee=Os||Xi,v_=Cu?Un(Cu):Ra;function m_(n){return tn(n)&&n.nodeType===1&&!Rt(n)}function w_(n){if(n==null)return!0;if(On(n)&&(C(n)||typeof n=="string"||typeof n.splice=="function"||Ee(n)||je(n)||De(n)))return!n.length;var e=An(n);if(e==jn||e==ne)return!n.size;if(yt(n))return!hi(n).length;for(var t in n)if(G.call(n,t))return!1;return!0}function x_(n,e){return wt(n,e)}function A_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?wt(n,e,o,t):!!r}function Di(n){if(!tn(n))return!1;var e=Sn(n);return e==Ot||e==zo||typeof n.message=="string"&&typeof n.name=="string"&&!Rt(n)}function y_(n){return typeof n=="number"&&Zu(n)}function de(n){if(!nn(n))return!1;var e=Sn(n);return e==bt||e==ji||e==qo||e==Zo}function _o(n){return typeof n=="number"&&n==L(n)}function mr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=we}function nn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function tn(n){return n!=null&&typeof n=="object"}var po=Lu?Un(Lu):Ca;function I_(n,e){return n===e||ci(n,e,Ei(e))}function R_(n,e,t){return t=typeof t=="function"?t:o,ci(n,e,Ei(e),t)}function S_(n){return go(n)&&n!=+n}function C_(n){if(sc(n))throw new S(H);return ff(n)}function L_(n){return n===null}function E_(n){return n==null}function go(n){return typeof n=="number"||tn(n)&&Sn(n)==ut}function Rt(n){if(!tn(n)||Sn(n)!=se)return!1;var e=Kt(n);if(e===null)return!0;var t=G.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Gt.call(t)==Rs}var $i=Eu?Un(Eu):La;function T_(n){return _o(n)&&n>=-we&&n<=we}var vo=Tu?Un(Tu):Ea;function wr(n){return typeof n=="string"||!C(n)&&tn(n)&&Sn(n)==ot}function Dn(n){return typeof n=="symbol"||tn(n)&&Sn(n)==Pt}var je=Ou?Un(Ou):Ta;function O_(n){return n===o}function b_(n){return tn(n)&&An(n)==lt}function P_(n){return tn(n)&&Sn(n)==Xo}var F_=sr(_i),W_=sr(function(n,e){return n<=e});function mo(n){if(!n)return[];if(On(n))return wr(n)?ee(n):Tn(n);if(ct&&n[ct])return hs(n[ct]());var e=An(n),t=e==jn?ni:e==ne?Dt:nt;return t(n)}function ve(n){if(!n)return n===0?n:0;if(n=Jn(n),n===Te||n===-Te){var e=n<0?-1:1;return e*$o}return n===n?n:0}function L(n){var e=ve(n),t=e%1;return e===e?t?e-t:e:0}function wo(n){return n?We(L(n),0,ue):0}function Jn(n){if(typeof n=="number")return n;if(Dn(n))return Et;if(nn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=nn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Uu(n);var t=gl.test(n);return t||vl.test(n)?Jl(n.slice(2),t?2:8):pl.test(n)?Et:+n}function xo(n){return oe(n,bn(n))}function B_(n){return n?We(L(n),-we,we):n===0?n:0}function $(n){return n==null?"":Mn(n)}var U_=Ve(function(n,e){if(yt(e)||On(e)){oe(e,dn(e),n);return}for(var t in e)G.call(e,t)&&dt(n,t,e[t])}),Ao=Ve(function(n,e){oe(e,bn(e),n)}),xr=Ve(function(n,e,t,r){oe(e,bn(e),n,r)}),M_=Ve(function(n,e,t,r){oe(e,dn(e),n,r)}),D_=pe(fi);function $_(n,e){var t=Je(n);return e==null?t:Qu(t,e)}var N_=O(function(n,e){n=z(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&Cn(e[0],e[1],i)&&(r=1);++t1),f}),oe(n,Ci(n),t),r&&(t=Zn(t,rn|En|X,Qa));for(var i=e.length;i--;)mi(t,e[i]);return t});function ip(n,e){return Io(n,vr(A(e)))}var up=pe(function(n,e){return n==null?{}:Pa(n,e)});function Io(n,e){if(n==null)return{};var t=k(Ci(n),function(r){return[r]});return e=A(e),_f(n,t,function(r,i){return e(r,i[0])})}function fp(n,e,t){e=Ce(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=Yu();return xn(n+i*(e-n+Xl("1e-"+((i+"").length-1))),e)}return gi(n,e)}var vp=Qe(function(n,e,t){return e=e.toLowerCase(),n+(t?Co(e):e)});function Co(n){return Hi($(n).toLowerCase())}function Lo(n){return n=$(n),n&&n.replace(wl,os).replace(Dl,"")}function mp(n,e,t){n=$(n),e=Mn(e);var r=n.length;t=t===o?r:We(L(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function wp(n){return n=$(n),n&&jo.test(n)?n.replace(tu,ls):n}function xp(n){return n=$(n),n&&ul.test(n)?n.replace(Mr,"\\$&"):n}var Ap=Qe(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),yp=Qe(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),Ip=Tf("toLowerCase");function Rp(n,e,t){n=$(n),e=L(e);var r=e?ze(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return lr(Jt(i),t)+n+lr(Xt(i),t)}function Sp(n,e,t){n=$(n),e=L(e);var r=e?ze(n):0;return e&&r>>0,t?(n=$(n),n&&(typeof e=="string"||e!=null&&!$i(e))&&(e=Mn(e),!e&&qe(n))?Le(ee(n),0,t):n.split(e,t)):[]}var Pp=Qe(function(n,e,t){return n+(t?" ":"")+Hi(e)});function Fp(n,e,t){return n=$(n),t=t==null?0:We(L(t),0,n.length),e=Mn(e),n.slice(t,t+e.length)==e}function Wp(n,e,t){var r=u.templateSettings;t&&Cn(n,e,t)&&(e=o),n=$(n),e=xr({},e,r,Uf);var i=xr({},e.imports,r.imports,Uf),f=dn(i),l=jr(i,f),s,c,p=0,g=e.interpolate||Ft,d="__p += '",v=ei((e.escape||Ft).source+"|"+g.source+"|"+(g===ru?_l:Ft).source+"|"+(e.evaluate||Ft).source+"|$","g"),w="//# sourceURL="+(G.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ql+"]")+` +`;n.replace(v,function(I,F,U,$n,Ln,Nn){return U||(U=$n),d+=n.slice(p,Nn).replace(xl,ss),F&&(s=!0,d+=`' + +__e(`+F+`) + +'`),Ln&&(c=!0,d+=`'; +`+Ln+`; +__p += '`),U&&(d+=`' + +((__t = (`+U+`)) == null ? '' : __t) + +'`),p=Nn+I.length,I}),d+=`'; +`;var y=G.call(e,"variable")&&e.variable;if(!y)d=`with (obj) { +`+d+` +} +`;else if(cl.test(y))throw new S(M);d=(c?d.replace(Jo,""):d).replace(Vo,"$1").replace(Qo,"$1;"),d="function("+(y||"obj")+`) { +`+(y?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+d+`return __p +}`;var E=To(function(){return D(f,w+"return "+d).apply(o,l)});if(E.source=d,Di(E))throw E;return E}function Bp(n){return $(n).toLowerCase()}function Up(n){return $(n).toUpperCase()}function Mp(n,e,t){if(n=$(n),n&&(t||e===o))return Uu(n);if(!n||!(e=Mn(e)))return n;var r=ee(n),i=ee(e),f=Mu(r,i),l=Du(r,i)+1;return Le(r,f,l).join("")}function Dp(n,e,t){if(n=$(n),n&&(t||e===o))return n.slice(0,Nu(n)+1);if(!n||!(e=Mn(e)))return n;var r=ee(n),i=Du(r,ee(e))+1;return Le(r,0,i).join("")}function $p(n,e,t){if(n=$(n),n&&(t||e===o))return n.replace(Dr,"");if(!n||!(e=Mn(e)))return n;var r=ee(n),i=Mu(r,ee(e));return Le(r,i).join("")}function Np(n,e){var t=et,r=kn;if(nn(e)){var i="separator"in e?e.separator:i;t="length"in e?L(e.length):t,r="omission"in e?Mn(e.omission):r}n=$(n);var f=n.length;if(qe(n)){var l=ee(n);f=l.length}if(t>=f)return n;var s=t-ze(r);if(s<1)return r;var c=l?Le(l,0,s).join(""):n.slice(0,s);if(i===o)return c+r;if(l&&(s+=c.length-s),$i(i)){if(n.slice(s).search(i)){var p,g=c;for(i.global||(i=ei(i.source,$(iu.exec(i))+"g")),i.lastIndex=0;p=i.exec(g);)var d=p.index;c=c.slice(0,d===o?s:d)}}else if(n.indexOf(Mn(i),s)!=s){var v=c.lastIndexOf(i);v>-1&&(c=c.slice(0,v))}return c+r}function Gp(n){return n=$(n),n&&ko.test(n)?n.replace(eu,ds):n}var Hp=Qe(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Hi=Tf("toUpperCase");function Eo(n,e,t){return n=$(n),e=t?o:e,e===o?cs(n)?ws(n):ts(n):n.match(e)||[]}var To=O(function(n,e){try{return Bn(n,o,e)}catch(t){return Di(t)?t:new S(t)}}),qp=pe(function(n,e){return qn(e,function(t){t=le(t),he(n,t,Ui(n[t],n))}),n});function zp(n){var e=n==null?0:n.length,t=A();return n=e?k(n,function(r){if(typeof r[1]!="function")throw new zn(P);return[t(r[0]),r[1]]}):[],O(function(r){for(var i=-1;++iwe)return[];var t=ue,r=xn(n,ue);e=A(e),n-=ue;for(var i=kr(r,e);++t0||e<0)?new W(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=L(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},W.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},W.prototype.toArray=function(){return this.take(ue)},fe(W.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],f=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,s=r?[1]:arguments,c=l instanceof W,p=s[0],g=c||C(l),d=function(F){var U=i.apply(u,Ae([F],s));return r&&v?U[0]:U};g&&t&&typeof p=="function"&&p.length!=1&&(c=g=!1);var v=this.__chain__,w=!!this.__actions__.length,y=f&&!v,E=c&&!w;if(!f&&g){l=E?l:new W(this);var I=n.apply(l,s);return I.__actions__.push({func:_r,args:[d],thisArg:o}),new Kn(I,v)}return y&&E?n.apply(this,s):(I=this.thru(d),y?r?I.value()[0]:I.value():I)})}),qn(["pop","push","shift","sort","splice","unshift"],function(n){var e=$t[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 f=this.value();return e.apply(C(f)?f:[],i)}return this[t](function(l){return e.apply(C(l)?l:[],i)})}}),fe(W.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";G.call(Xe,r)||(Xe[r]=[]),Xe[r].push({name:e,func:t})}}),Xe[fr(o,pn).name]=[{name:"wrapper",func:o}],W.prototype.clone=Gs,W.prototype.reverse=Hs,W.prototype.value=qs,u.prototype.at=mh,u.prototype.chain=wh,u.prototype.commit=xh,u.prototype.next=Ah,u.prototype.plant=Ih,u.prototype.reverse=Rh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Sh,u.prototype.first=u.prototype.head,ct&&(u.prototype[ct]=yh),u},Ke=xs();Oe?((Oe.exports=Ke)._=Ke,zr._=Ke):mn._=Ke}).call(St)})(Rr,Rr.exports);var _d=Rr.exports;const pd=bg(_d),Qi=_n=>(Wg("data-v-466f28c1"),_n=_n(),Bg(),_n),gd={class:"my-order"},dd=Qi(()=>x("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),vd={class:"nav-item-input"},md={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},wd=["onClick"],xd={class:"shop-name"},Ad={class:"shop-price"},yd={class:"unit-name"},Id={key:0,class:"no-stock"},Rd=Qi(()=>x("div",null,[x("span",null,"暂无"),x("span",null,"库存")],-1)),Sd=[Rd],Cd={key:1,class:"no-stock"},Ld=Qi(()=>x("div",null,[x("span",null,"平台"),x("span",null,"关闭")],-1)),Ed=[Ld],Td={key:1,class:"no-data"},Od={__name:"shop",props:{storeList:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(_n,{expose:vn,emit:o}){const B=K(null),N=o,H=K(""),P=()=>{N("loadMore",{store_name_code:H.value})},M=R=>{if(R.is_used==0)return Ir.error("该商品已被平台关闭");if(R.stock==0)return Ir.warning("该商品无库存");N("changeItem",R)},an=pd.throttle(()=>{let R={store_name_code:H.value};N("getStoreList",R,!0)},300);vn({name:H,inputBlur:()=>{var R;(R=B.value)==null||R.blur()}});const on=K(!1),rn=()=>{on.value=!0},En=()=>{on.value=!1},X=()=>{var R;(R=B.value)==null||R.focus()};return Ct(()=>{Vi(()=>{var R;(R=B.value)==null||R.focus(),rn()}),Qn.on("shift",X)}),Lt(()=>{Qn.off("shift",X)}),(R,Q)=>{const j=sn("el-input"),pn=sn("Search"),gn=sn("el-icon"),b=sn("el-button"),q=sn("el-image"),T=sn("el-space"),Z=sn("el-empty"),J=Ji("loading"),Rn=Ji("infinite-scroll");return In(),Vn("div",gd,[x("div",{class:Fg(["header-nav",{"input-focus":on.value}])},[dd,x("div",vd,[en(j,{modelValue:H.value,"onUpdate:modelValue":Q[0]||(Q[0]=ln=>H.value=ln),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:B,onFocus:rn,onBlur:En,onKeyup:Pg(Ar(an),["enter"]),onClear:Ar(an)},null,8,["modelValue","onKeyup","onClear"])]),x("div",{class:"nav-item-btn",onClick:Q[1]||(Q[1]=(...ln)=>Ar(an)&&Ar(an)(...ln))},[en(b,{class:"btn",type:"primary"},{default:Gn(()=>[en(gn,null,{default:Gn(()=>[en(pn)]),_:1})]),_:1})])],2),Uo((In(),Vn("div",md,[_n.storeList.length?(In(),Cr(T,{key:0,wrap:""},{default:Gn(()=>[(In(!0),Vn(Wo,null,Bo(_n.storeList,(ln,et)=>(In(),Vn("div",{class:"shop-item",key:et,onClick:kn=>M(ln)},[en(q,{loading:"lazy",src:ln.image},null,8,["src"]),x("div",xd,Fn(ln.store_name),1),x("div",Ad,[yn(" ¥"),x("span",null,Fn(ln.price),1),x("span",yd,"/"+Fn(ln.unit_name),1)]),ln.stock==0?(In(),Vn("div",Id,Sd)):yr("",!0),ln.is_used==0?(In(),Vn("div",Cd,Ed)):yr("",!0)],8,wd))),128))]),_:1})):yr("",!0),_n.storeList.length?yr("",!0):(In(),Vn("div",Td,[en(Z,{"image-size":200,description:"没有找到对应商品"})]))])),[[J,_n.loading],[Rn,P]])])}}},bd=Sr(Od,[["__scopeId","data-v-466f28c1"]]);function Pd(_n){return Ug.get("/store_product/storeProduct/lists",{params:_n})}const Fd={class:"shop"},Wd={class:"shop-info"},Bd={class:"shop-info-left"},Ud={class:"shop-info-right"},Md={class:"shop-info-right-top"},Dd={class:"shop-info-right-price"},$d={style:{"font-size":"1rem",color:"#777"}},Nd={class:"shop-sku"},Gd={class:"title"},Hd={class:"sku"},qd={class:"dialog-footer"},zd={__name:"pupop",emits:["changeItem"],setup(_n,{expose:vn,emit:o}){const B=K(!1),N=K(null),H=X=>{B.value=X},P=K({}),M=K(!1),an=K("add"),Wn=(X,R="add")=>{an.value=R,P.value=JSON.parse(JSON.stringify(X))},on=o,rn=()=>{P.value.cart_num||(P.value.cart_num=1),on("changeItem",P.value),B.value=!1};vn({show:H,setForm:Wn});const En=()=>{B.value&&rn()};return Ct(()=>{Qn.on("enter",En)}),Lt(()=>{Qn.off("enter",En)}),(X,R)=>{const Q=sn("el-image"),j=sn("el-input-number"),pn=sn("el-button"),gn=sn("el-dialog"),b=Ji("loading");return In(),Cr(gn,{modelValue:B.value,"onUpdate:modelValue":R[1]||(R[1]=q=>B.value=q),title:"购买数量",width:"650",onOpened:R[2]||(R[2]=q=>N.value.focus())},Mg({default:Gn(()=>[Uo((In(),Vn("div",Fd,[x("div",Wd,[x("div",Bd,[en(Q,{loading:"lazy",src:P.value.image},null,8,["src"])]),x("div",Ud,[x("div",Md,Fn(P.value.store_name),1),x("div",Dd,[yn(" ¥"),x("span",null,Fn(P.value.price),1),x("span",$d," / "+Fn(P.value.unit_name),1)])])]),x("div",Nd,[x("div",Gd,"购买数量 ( "+Fn(P.value.unit_name)+" )",1),x("div",Hd,[en(j,{ref_key:"inputRef",ref:N,modelValue:P.value.cart_num,"onUpdate:modelValue":R[0]||(R[0]=q=>P.value.cart_num=q),"step-strictly":"",placeholder:"请输入数量(默认为1)",min:0,step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue"])])])])),[[b,M.value]])]),_:2},[an.value!="add"&&P.value.attr&&P.value.attr.length==1?void 0:{name:"footer",fn:Gn(()=>[x("div",qd,[en(pn,{class:"ok-btn",type:"primary",onClick:rn},{default:Gn(()=>[yn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},Kd=Sr(zd,[["__scopeId","data-v-c76c24e8"]]),Zd={class:"my-card"},jd={__name:"index",setup(_n){const vn=K(null),o=K(null),B=K(null),N=K(null),H=K([]);Fo();const P=Dg(),M=K({page_no:1,page_size:30}),an=K(!1),Wn=(T={},Z=!1)=>{M.value={...M.value,...T},Z&&(H.value=[],M.value.page_no=1,on.value=!1),an.value=!0,Pd(M.value).then(J=>{var Rn,ln;an.value=!1,((ln=(Rn=J.data)==null?void 0:Rn.lists)==null?void 0:ln.length){on.value||Wn(T)};function En(T){return/^\d+$/.test(T)}const X=(T,Z="")=>{console.log(T,Z);let J={product_id:T.product_id,cart_num:T.cart_num};Po(J).then(Rn=>{o.value.getList()})},R=(T,Z)=>{vn.value.setForm(T,"add"),vn.value.show(!0)},Q=T=>{vn.value.setForm(T,"edit"),vn.value.show(!0)},j=K({}),pn=()=>{let T=o.value.list.map(J=>J.id),Z={cart_id:T};o.value.discounts>0&&(Z.deduction_price=o.value.discounts.toFixed(2),Z.pay_type="micropay"),Og(Z).then(J=>{j.value=J.data.order,N.value.setForm({data:J.data.order,cart_id:T})})},gn=()=>{pn(),N.value.drawer=!0},b=(T=null)=>{setTimeout(()=>{o.value.getList()})},q=()=>{P.name=="saleHome"&&(!N.value.drawer&&o.value.list.length>0?gn():N.value.beforeClose())};return Ct(()=>{Wn(),Qn.on("F9",q)}),Lt(()=>{Qn.off("F9",q)}),(T,Z)=>(In(),Vn("div",Zd,[en(hd,{ref_key:"orderRef",ref:o,onGoPay:gn,onEditPupop:Q},null,512),en($g),en(bd,{ref_key:"shopRef",ref:B,style:{flex:"1"},storeList:H.value,loading:an.value,onGetStoreList:Wn,onChangeItem:R,onLoadMore:rn},null,8,["storeList","loading"]),en(Kd,{ref_key:"pupopRef",ref:vn,onChangeItem:X},null,512),en(Ng,{ref_key:"payRef",ref:N,onPaySuccess:b},null,512)]))}};export{jd as default}; diff --git a/build/assets/index-C2mUYWeU.js b/build/assets/index-DhxPMYiX.js similarity index 99% rename from build/assets/index-C2mUYWeU.js rename to build/assets/index-DhxPMYiX.js index 5f42807..644e01a 100644 --- a/build/assets/index-C2mUYWeU.js +++ b/build/assets/index-DhxPMYiX.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-MiPfj8nz.js","./store-DGmfknqP.js","./padding-REVqc2LB.js","./moment-Cl4UOzQZ.js","./index-CPwqf4kx.css","./pay-ptXuJ7-o.css","./index-DpDt6hhn.js","./index-DQziC176.css","./index-DD9F5rOc.js","./index-BpyJc7UJ.css","./index-DwY4sWr-.js","./index-DEO_ZpML.css","./indexCount-D_5H6yy_.js","./merchant-DENp5ByU.js","./indexCount-quL7L4Zi.css","./index-BR2NF8hh.js","./index-ZYBKJJNc.css","./index-CikQhzev.js","./index-B-Z8wxg-.css","./test-CJB7J_yF.js","./test-CmC8-tN2.css","./index-6iUJ80tN.js","./index-BfPjptIR.css"] + __vite__mapDeps.viteFileDeps = ["./index-DcQzoY0i.js","./store-Bz99DLdk.js","./padding-DwppsfEF.js","./pay-BHLYNBxQ.js","./pay-Da9QS55L.css","./moment-Cl4UOzQZ.js","./index-CPwqf4kx.css","./index-D2mqrbKZ.js","./index-CULyixpc.css","./index-DjgcuwFu.js","./index-BpyJc7UJ.css","./index-BVUONBo1.js","./index-DEO_ZpML.css","./indexCount-CbvLx3AP.js","./merchant-BHd4lT9u.js","./indexCount-quL7L4Zi.css","./index-ZpAsLQZK.js","./index-ZYBKJJNc.css","./index-yjpgdUsb.js","./index-B-Z8wxg-.css","./test-CHguiNij.js","./test-CmC8-tN2.css","./index-ChX0XmYW.js","./index-BfPjptIR.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -93,4 +93,4 @@ function __vite__mapDeps(indexes) { `,n+=hs(" ")+` `,n+=x4()+`欢迎下次光临! `,n+=Gce(" ")+` -`,n+=Yce(),n},wv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=e=>(Iw("data-v-4e1f74b3"),e=e(),Lw(),e),Zce={class:"my-card"},Qce={class:"card-header"},ede={style:{width:"4.5rem"}},tde=Ii(()=>k("div",{class:"card-title"},"泸优采收银系统",-1)),nde={style:{"margin-left":"1rem",display:"flex","flex-direction":"column","justify-content":"center",cursor:"pointer"}},ode={class:"card-body"},rde={style:{"margin-right":"1rem"}},ade=Ii(()=>k("span",null,"打印自检",-1)),lde={key:0,style:{"margin-right":"1rem"}},sde=Ii(()=>k("span",null,"点击自动连接打印机",-1)),ide=Ii(()=>k("div",null,"已连接打印机T58",-1)),ude={style:{"font-size":"0.7rem",color:"#ccc"}},cde=Ii(()=>k("span",null,"打印机已连接,是否重新连接",-1)),dde={class:"dialog-footer"},fde={class:"el-dropdown-link"},pde={class:"info"},vde={__name:"myHeader",setup(e){const t=yd(),n=jce(),o=L({});o.value=t.userInfo;const r=pb(),a=()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")},l=()=>{window.location.reload()},s=L(!1),u=()=>{console.log("连接打印机"),uni.getEnv(h=>{h.h5?_o.error("请使用APP连接打印机"):(n.setConnect(!1),n.setPrintAddress(""),s.value=!1,uni.postMessage({data:{type:"connect"}}))})};let c=!1;const f=(h="")=>{console.log("预打印"),console.log(Sf(h,!0)),!c&&(c=!0,uni.getEnv(m=>{m.h5?(_o.error("请使用APP打印小票"),c=!1):(p(h),setTimeout(()=>{c=!1},4e3))}))},d=(h="")=>{console.log("预打印");let m=Sf(h,!0);console.log(m),!c&&(c=!0,uni.getEnv(v=>{v.h5?(_o.error("请使用APP打印小票"),c=!1):(p(m),setTimeout(()=>{c=!1},4e3))}))},p=(h="")=>{let m="";h===""?(m=Sf({},!0),console.log(m)):m=h,uni.postMessage({data:{type:"print",content:m}})};return et(()=>{Yt.on("printReceipt",f),Yt.on("letPrintReceipt",d),window.addEventListener("message",function(h){if(h.data.type==="connect"){let m=h.data.data.address;n.setConnect(!0),n.setPrintAddress(m),_o.success("已连接打印机T58("+m+")")}},!1)}),ko(()=>{Yt.off("printReceipt",f),Yt.off("letPrintReceipt",d)}),(h,m)=>{const v=Ze("el-image"),_=Ze("Refresh"),g=Ze("el-icon"),w=Ze("el-button"),y=Ze("el-dialog"),C=Ze("el-avatar"),E=Ze("arrow-down"),x=Ze("el-dropdown-item"),A=Ze("el-dropdown-menu"),$=Ze("el-dropdown");return b(),M("div",Zce,[k("div",Qce,[k("div",ede,[j(v,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),tde,k("div",nde,[j(g,{color:"#fff",size:"18",onClick:l},{default:X(()=>[j(_)]),_:1})])]),k("div",ode,[k("div",rde,[j(w,{onClick:m[0]||(m[0]=R=>i(Yt).emit("letPrintReceipt")),type:"primary"},{default:X(()=>[ade]),_:1})]),!i(n).is_connect||!i(n).printAddress?(b(),M("div",lde,[j(w,{onClick:u,type:"warning"},{default:X(()=>[sde]),_:1})])):(b(),M("div",{key:1,style:{"margin-right":"1rem","font-size":"0.9rem"},onClick:m[1]||(m[1]=R=>s.value=!0)},[ide,k("div",ude,"("+$e(i(n).printAddress)+")",1)])),j(y,{modelValue:s.value,"onUpdate:modelValue":m[3]||(m[3]=R=>s.value=R),title:"提示",width:"500"},{footer:X(()=>[k("div",dde,[j(w,{onClick:m[2]||(m[2]=R=>s.value=!1)},{default:X(()=>[mt("取消")]),_:1}),j(w,{type:"primary",onClick:u},{default:X(()=>[mt(" 重新连接 ")]),_:1})])]),default:X(()=>[cde]),_:1},8,["modelValue"]),j($,{trigger:"hover"},{dropdown:X(()=>[j(A,null,{default:X(()=>[j(x,{onClick:a},{default:X(()=>[mt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",fde,[j(C,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",pde,[k("div",null,$e(o.value.name),1),k("div",null,"("+$e(o.value.role_name)+")",1)]),j(g,{class:"el-icon--right"},{default:X(()=>[j(E)]),_:1})])]),_:1})])])}}},hde=wv(vde,[["__scopeId","data-v-4e1f74b3"]]),mde=vv("order",()=>{const e=L(localStorage.getItem("orderCount")||0);return{orderCount:e,setOrderCount:n=>{e.value=n,localStorage.setItem("orderCount",n)}}}),gde={class:"my-card"},yde=["onClick"],_de={key:0,class:"badge"},bde={__name:"myAside",setup(e){const t=pb(),n=yue(),o=mde(),r=(d=1)=>{o.setOrderCount(d),u.value.forEach(p=>{p.name=="order"&&(p.count=d)})};let a=!1;const l=d=>{if(r(0),_o.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:0},{name:"convert",title:"订单核销",ico:"FullScreen",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{Yt.on("up",c),Yt.on("down",f),Yt.on("new_order",l),Yt.on("set-order-count-zero",()=>{r(0)}),r(0)}),ko(()=>{Yt.off("aup",c),Yt.off("adown",f),Yt.off("new_order",l),Yt.on("set-order-count-zero")}),(d,p)=>{const h=Ze("el-icon");return b(),M("div",gde,[(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",_de,$e(m.count),1)):ne("",!0)],10,yde))),128))])}}},wde=wv(bde,[["__scopeId","data-v-ea9d7649"]]),$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 Qa({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?Db(e,this):e.indexOf("presence-")===0?Sde(e,this):Cde(e,this)};$o.instances=[];function Cde(e,t){var n=new Li(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 Db(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){Ede({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 Sde(e,t){return Db(e,t)}function Qa(e){this.dispatcher=new Kb,Fb(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()}Qa.prototype.updateNetworkState=function(e){var t=this.state;this.state=e,t!==e&&this.emit("state_change",{previous:t,current:e})};Qa.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};Qa.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")}};Qa.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)}};Qa.prototype.send=function(e){if(this.state!=="connected"){console.trace('networkState is "'+this.state+'", can not send '+e);return}this.connection.send(e)};Qa.prototype.close=function(){this.updateNetworkState("disconnected"),this.connection.close()};var Fb=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 Li(e,t){this.subscribed=!1,this.dispatcher=new Kb,this.connection=e,this.channelName=t,this.subscribeCb=null,this.queue=[],Fb(this,this.dispatcher);var n=["on","off","emit"];for(var o in n)this[n[o]]=this.dispatcher[n[o]]}Li.prototype.processSubscribe=function(){this.connection.state==="connected"&&this.subscribeCb()};Li.prototype.processQueue=function(){if(!(this.connection.state!=="connected"||!this.subscribed)){for(var e in this.queue)this.queue[e]();this.queue=[]}};Li.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 fu=function(){var e={};function t(y){for(var C=[],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 xde(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}const Mde={class:"common-layout"},$de={__name:"index",setup(e){const t=yd(),o=new $o({url:"wss://multi-store.lihaink.cn/pull",app_key:"2ce3ce22329517213caa7dad261f5695"}).subscribe(`store_merchant_${t.userInfo.store_id}`);o.on("message",function(a){var l,s,u,c,f,d,p;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)=="您有一笔订单已支付"&&Yt.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)=="您有一笔新的订单"&&Yt.emit("new_order",a==null?void 0:a.content),((d=a==null?void 0:a.content)==null?void 0:d.type)=="platform_print"&&Yt.emit("platform_print",(p=a==null?void 0:a.content)==null?void 0:p.data)}catch{}}),o.on("close",function(){});const r=a=>{console.log("按下",a.keyCode),a.keyCode==16&&Yt.emit("shift"),a.keyCode==120&&Yt.emit("F9"),a.keyCode==13&&Yt.emit("enter"),a.keyCode==37&&Yt.emit("left"),a.keyCode==39&&Yt.emit("right"),a.keyCode==38&&Yt.emit("up"),a.keyCode==40&&Yt.emit("down"),a.keyCode==46&&Yt.emit("delete"),a.keyCode==45&&Yt.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",Mde,[j(d,null,{default:X(()=>[j(s,null,{default:X(()=>[j(hde)]),_:1}),j(d,null,{default:X(()=>[j(u,{width:"6.25rem"},{default:X(()=>[j(wde)]),_: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})])}}},Tde=wv($de,[["__scopeId","data-v-d7291879"]]),Ode=[{path:"/",name:"layout",component:Tde,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>No(()=>import("./index-MiPfj8nz.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"采购订单"},component:()=>No(()=>import("./index-DpDt6hhn.js"),__vite__mapDeps([6,1,3,2,7,5]),import.meta.url)},{path:"/order",name:"order",meta:{title:"待提采购"},component:()=>No(()=>import("./index-DD9F5rOc.js"),__vite__mapDeps([8,1,3,2,9,5]),import.meta.url)},{path:"/purchaseOrder",name:"purchaseOrder",meta:{title:"采购订单"},component:()=>No(()=>import("./index-DwY4sWr-.js"),__vite__mapDeps([10,1,3,2,11]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>No(()=>import("./indexCount-D_5H6yy_.js"),__vite__mapDeps([12,13,14]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>No(()=>import("./index-BR2NF8hh.js"),__vite__mapDeps([15,13,3,2,16]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>No(()=>import("./index-CikQhzev.js"),__vite__mapDeps([17,1,2,18,5]),import.meta.url)},{path:"/test",name:"test",component:()=>No(()=>import("./test-CJB7J_yF.js"),__vite__mapDeps([19,20]),import.meta.url)}]},{path:"/login",name:"login",component:()=>No(()=>import("./index-6iUJ80tN.js"),__vite__mapDeps([21,22]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>No(()=>import("./index-Bqf-2ar_.js"),__vite__mapDeps([]),import.meta.url)}],jb=mue({history:Wie(),routes:Ode});jb.beforeEach((e,t,n)=>{const o=yd();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Wb=jb,Vi=Hg(h9);for(const[e,t]of Object.entries(jL))Vi.component(e,t);const Ade=bue();Vi.use(Wb);Vi.use(Ade);Vi.use(cie,{locale:die});Vi.mount("#app");export{zb as A,ur as B,S as C,yue as D,_o as E,Fe as F,pb as G,bt as H,$p as I,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,Sr as j,kr as k,Nc as l,Yt as m,je as n,et as o,Mt as p,i as q,L as r,T as s,$e as t,yd as u,tt as v,X as w,ne as x,Iw as y,Lw as z}; +`,n+=Yce(),n},wv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=e=>(Iw("data-v-4e1f74b3"),e=e(),Lw(),e),Zce={class:"my-card"},Qce={class:"card-header"},ede={style:{width:"4.5rem"}},tde=Ii(()=>k("div",{class:"card-title"},"泸优采收银系统",-1)),nde={style:{"margin-left":"1rem",display:"flex","flex-direction":"column","justify-content":"center",cursor:"pointer"}},ode={class:"card-body"},rde={style:{"margin-right":"1rem"}},ade=Ii(()=>k("span",null,"打印自检",-1)),lde={key:0,style:{"margin-right":"1rem"}},sde=Ii(()=>k("span",null,"点击自动连接打印机",-1)),ide=Ii(()=>k("div",null,"已连接打印机T58",-1)),ude={style:{"font-size":"0.7rem",color:"#ccc"}},cde=Ii(()=>k("span",null,"打印机已连接,是否重新连接",-1)),dde={class:"dialog-footer"},fde={class:"el-dropdown-link"},pde={class:"info"},vde={__name:"myHeader",setup(e){const t=yd(),n=jce(),o=L({});o.value=t.userInfo;const r=pb(),a=()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")},l=()=>{window.location.reload()},s=L(!1),u=()=>{console.log("连接打印机"),uni.getEnv(h=>{h.h5?_o.error("请使用APP连接打印机"):(n.setConnect(!1),n.setPrintAddress(""),s.value=!1,uni.postMessage({data:{type:"connect"}}))})};let c=!1;const f=(h="")=>{console.log("预打印"),console.log(Sf(h,!0)),!c&&(c=!0,uni.getEnv(m=>{m.h5?(_o.error("请使用APP打印小票"),c=!1):(p(h),setTimeout(()=>{c=!1},4e3))}))},d=(h="")=>{console.log("预打印");let m=Sf(h,!0);console.log(m),!c&&(c=!0,uni.getEnv(v=>{v.h5?(_o.error("请使用APP打印小票"),c=!1):(p(m),setTimeout(()=>{c=!1},4e3))}))},p=(h="")=>{let m="";h===""?(m=Sf({},!0),console.log(m)):m=h,uni.postMessage({data:{type:"print",content:m}})};return et(()=>{Yt.on("printReceipt",f),Yt.on("letPrintReceipt",d),window.addEventListener("message",function(h){if(h.data.type==="connect"){let m=h.data.data.address;n.setConnect(!0),n.setPrintAddress(m),_o.success("已连接打印机T58("+m+")")}},!1)}),ko(()=>{Yt.off("printReceipt",f),Yt.off("letPrintReceipt",d)}),(h,m)=>{const v=Ze("el-image"),_=Ze("Refresh"),g=Ze("el-icon"),w=Ze("el-button"),y=Ze("el-dialog"),C=Ze("el-avatar"),E=Ze("arrow-down"),x=Ze("el-dropdown-item"),A=Ze("el-dropdown-menu"),$=Ze("el-dropdown");return b(),M("div",Zce,[k("div",Qce,[k("div",ede,[j(v,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),tde,k("div",nde,[j(g,{color:"#fff",size:"18",onClick:l},{default:X(()=>[j(_)]),_:1})])]),k("div",ode,[k("div",rde,[j(w,{onClick:m[0]||(m[0]=R=>i(Yt).emit("letPrintReceipt")),type:"primary"},{default:X(()=>[ade]),_:1})]),!i(n).is_connect||!i(n).printAddress?(b(),M("div",lde,[j(w,{onClick:u,type:"warning"},{default:X(()=>[sde]),_:1})])):(b(),M("div",{key:1,style:{"margin-right":"1rem","font-size":"0.9rem"},onClick:m[1]||(m[1]=R=>s.value=!0)},[ide,k("div",ude,"("+$e(i(n).printAddress)+")",1)])),j(y,{modelValue:s.value,"onUpdate:modelValue":m[3]||(m[3]=R=>s.value=R),title:"提示",width:"500"},{footer:X(()=>[k("div",dde,[j(w,{onClick:m[2]||(m[2]=R=>s.value=!1)},{default:X(()=>[mt("取消")]),_:1}),j(w,{type:"primary",onClick:u},{default:X(()=>[mt(" 重新连接 ")]),_:1})])]),default:X(()=>[cde]),_:1},8,["modelValue"]),j($,{trigger:"hover"},{dropdown:X(()=>[j(A,null,{default:X(()=>[j(x,{onClick:a},{default:X(()=>[mt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",fde,[j(C,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",pde,[k("div",null,$e(o.value.name),1),k("div",null,"("+$e(o.value.role_name)+")",1)]),j(g,{class:"el-icon--right"},{default:X(()=>[j(E)]),_:1})])]),_:1})])])}}},hde=wv(vde,[["__scopeId","data-v-4e1f74b3"]]),mde=vv("order",()=>{const e=L(localStorage.getItem("orderCount")||0);return{orderCount:e,setOrderCount:n=>{e.value=n,localStorage.setItem("orderCount",n)}}}),gde={class:"my-card"},yde=["onClick"],_de={key:0,class:"badge"},bde={__name:"myAside",setup(e){const t=pb(),n=yue(),o=mde(),r=(d=1)=>{o.setOrderCount(d),u.value.forEach(p=>{p.name=="order"&&(p.count=d)})};let a=!1;const l=d=>{if(r(0),_o.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:0},{name:"convert",title:"订单核销",ico:"FullScreen",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{Yt.on("up",c),Yt.on("down",f),Yt.on("new_order",l),Yt.on("set-order-count-zero",()=>{r(0)}),r(0)}),ko(()=>{Yt.off("aup",c),Yt.off("adown",f),Yt.off("new_order",l),Yt.on("set-order-count-zero")}),(d,p)=>{const h=Ze("el-icon");return b(),M("div",gde,[(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",_de,$e(m.count),1)):ne("",!0)],10,yde))),128))])}}},wde=wv(bde,[["__scopeId","data-v-ea9d7649"]]),$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 Qa({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?Db(e,this):e.indexOf("presence-")===0?Sde(e,this):Cde(e,this)};$o.instances=[];function Cde(e,t){var n=new Li(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 Db(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){Ede({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 Sde(e,t){return Db(e,t)}function Qa(e){this.dispatcher=new Kb,Fb(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()}Qa.prototype.updateNetworkState=function(e){var t=this.state;this.state=e,t!==e&&this.emit("state_change",{previous:t,current:e})};Qa.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};Qa.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")}};Qa.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)}};Qa.prototype.send=function(e){if(this.state!=="connected"){console.trace('networkState is "'+this.state+'", can not send '+e);return}this.connection.send(e)};Qa.prototype.close=function(){this.updateNetworkState("disconnected"),this.connection.close()};var Fb=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 Li(e,t){this.subscribed=!1,this.dispatcher=new Kb,this.connection=e,this.channelName=t,this.subscribeCb=null,this.queue=[],Fb(this,this.dispatcher);var n=["on","off","emit"];for(var o in n)this[n[o]]=this.dispatcher[n[o]]}Li.prototype.processSubscribe=function(){this.connection.state==="connected"&&this.subscribeCb()};Li.prototype.processQueue=function(){if(!(this.connection.state!=="connected"||!this.subscribed)){for(var e in this.queue)this.queue[e]();this.queue=[]}};Li.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 fu=function(){var e={};function t(y){for(var C=[],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 xde(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}const Mde={class:"common-layout"},$de={__name:"index",setup(e){const t=yd(),o=new $o({url:"wss://multi-store.lihaink.cn/pull",app_key:"2ce3ce22329517213caa7dad261f5695"}).subscribe(`store_merchant_${t.userInfo.store_id}`);o.on("message",function(a){var l,s,u,c,f,d,p;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)=="您有一笔订单已支付"&&Yt.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)=="您有一笔新的订单"&&Yt.emit("new_order",a==null?void 0:a.content),((d=a==null?void 0:a.content)==null?void 0:d.type)=="platform_print"&&Yt.emit("platform_print",(p=a==null?void 0:a.content)==null?void 0:p.data)}catch{}}),o.on("close",function(){});const r=a=>{console.log("按下",a.keyCode),a.keyCode==16&&Yt.emit("shift"),a.keyCode==120&&Yt.emit("F9"),a.keyCode==13&&Yt.emit("enter"),a.keyCode==37&&Yt.emit("left"),a.keyCode==39&&Yt.emit("right"),a.keyCode==38&&Yt.emit("up"),a.keyCode==40&&Yt.emit("down"),a.keyCode==46&&Yt.emit("delete"),a.keyCode==45&&Yt.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",Mde,[j(d,null,{default:X(()=>[j(s,null,{default:X(()=>[j(hde)]),_:1}),j(d,null,{default:X(()=>[j(u,{width:"6.25rem"},{default:X(()=>[j(wde)]),_: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})])}}},Tde=wv($de,[["__scopeId","data-v-d7291879"]]),Ode=[{path:"/",name:"layout",component:Tde,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>No(()=>import("./index-DcQzoY0i.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"采购订单"},component:()=>No(()=>import("./index-D2mqrbKZ.js"),__vite__mapDeps([7,1,5,3,4,2,8]),import.meta.url)},{path:"/order",name:"order",meta:{title:"待提采购"},component:()=>No(()=>import("./index-DjgcuwFu.js"),__vite__mapDeps([9,1,5,2,10,4]),import.meta.url)},{path:"/purchaseOrder",name:"purchaseOrder",meta:{title:"采购订单"},component:()=>No(()=>import("./index-BVUONBo1.js"),__vite__mapDeps([11,1,5,2,12]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>No(()=>import("./indexCount-CbvLx3AP.js"),__vite__mapDeps([13,14,15]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>No(()=>import("./index-ZpAsLQZK.js"),__vite__mapDeps([16,14,5,2,17]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>No(()=>import("./index-yjpgdUsb.js"),__vite__mapDeps([18,1,2,19,4]),import.meta.url)},{path:"/test",name:"test",component:()=>No(()=>import("./test-CHguiNij.js"),__vite__mapDeps([20,21]),import.meta.url)}]},{path:"/login",name:"login",component:()=>No(()=>import("./index-ChX0XmYW.js"),__vite__mapDeps([22,23]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>No(()=>import("./index-DOnIKlS6.js"),__vite__mapDeps([]),import.meta.url)}],jb=mue({history:Wie(),routes:Ode});jb.beforeEach((e,t,n)=>{const o=yd();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Wb=jb,Vi=Hg(h9);for(const[e,t]of Object.entries(jL))Vi.component(e,t);const Ade=bue();Vi.use(Wb);Vi.use(Ade);Vi.use(cie,{locale:die});Vi.mount("#app");export{zb as A,ur as B,yue as C,pb as D,_o as E,Fe as F,S as G,bt as H,$p as I,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,Sr as j,kr as k,Nc as l,Yt as m,je as n,et as o,Mt as p,i as q,L as r,T as s,$e as t,yd as u,tt as v,X as w,ne as x,Iw as y,Lw as z}; diff --git a/build/assets/index-DD9F5rOc.js b/build/assets/index-DjgcuwFu.js similarity index 90% rename from build/assets/index-DD9F5rOc.js rename to build/assets/index-DjgcuwFu.js index 57c3c22..a5d8554 100644 --- a/build/assets/index-DD9F5rOc.js +++ b/build/assets/index-DjgcuwFu.js @@ -1 +1 @@ -import{_ as O,u as R,r as l,o as E,m as w,a as K,b as m,l as x,c as t,h as a,e,f as c,w as $,g as D,p as X,v as L,F as U,i as T,s as A,t as n,d as Z,x as r,y as P,z as G,G as ee}from"./index-C2mUYWeU.js";import{s as te,g as se,h as oe}from"./store-DGmfknqP.js";import{h as F}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as ae}from"./padding-REVqc2LB.js";const ie=p=>(P("data-v-274591ed"),p=p(),G(),p),le={class:"my-order"},ne={class:"header-nav"},de=ie(()=>e("div",{class:"nav-item"},n("线上订单"),-1)),_e={class:"nav-item-btn"},ce={class:"header-input"},re={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ue=["onClick"],ve={class:"top"},pe={class:"create-time"},fe={class:"shop"},me={key:0,class:"left"},he={key:0,class:"shop-name"},ye={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},ke={class:"pay"},we={key:0},De={key:0},Ve={key:1},Ye={key:2},ze={key:3},Ce={key:4},xe={key:1,style:{color:"#ff4a00"}},Se={key:0,class:"load-end"},Me={key:1,class:"load-end"},Ie={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(p){R(),l([]);const s=l(1),b=v=>{u.value.page_no=1,f.value=!1,_.value=!1,h.value=[],g(!0)};l(null);const d=l(""),V=()=>{u.value.start_time=F(d.value[0]).format("YYYY-MM-DD 00:00:00"),u.value.end_time=F(d.value[1]).format("YYYY-MM-DD 23:59:59"),g(!0)},S=v=>v.getTime()>Date.now(),u=l({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:2}),_=l(!1),B=l(0),k=l(0),f=l(!1),h=l([]),g=(v=!1)=>{if(v)u.value.page_no=1;else if(f.value||_.value)return;_.value=!0,s.value==1&&(u.value.paid=null),s.value==2&&(u.value.paid=0),te(u.value).then(i=>{v?h.value=i.data.lists:h.value=[...h.value,...i.data.lists],i.data.lists.length{f.value=!0,_.value=!1})},M=(v,i)=>{k.value=i,w.emit("set-sale-order-detail",v)};return E(()=>{w.on("update-sale-order-detail",v=>{console.log("==="),h.value[k.value].paid=1})}),K(()=>{w.off("update-sale-order-detail")}),(v,i)=>{const Y=m("el-radio-button"),z=m("el-radio-group"),C=m("el-date-picker"),j=m("el-button"),q=m("el-input"),H=m("el-image"),J=x("loading"),Q=x("infinite-scroll");return t(),a("div",le,[e("div",ne,[de,e("div",_e,[c(z,{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=o=>s.value=o),onChange:b,size:"small"},{default:$(()=>[c(Y,{value:1},{default:$(()=>[D("全部")]),_:1}),c(Y,{value:2},{default:$(()=>[D("未支付")]),_:1})]),_:1},8,["modelValue"]),c(C,{modelValue:d.value,"onUpdate:modelValue":i[1]||(i[1]=o=>d.value=o),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":S,onChange:V,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ce,[c(q,{modelValue:u.value.order_id,"onUpdate:modelValue":i[3]||(i[3]=o=>u.value.order_id=o),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=X(o=>g(!0),["enter"])),onClear:i[5]||(i[5]=o=>g(!0)),clearable:""},{append:$(()=>[c(j,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[2]||(i[2]=o=>g(!0))},{default:$(()=>[D("搜索")]),_:1})]),_:1},8,["modelValue"])]),L((t(),a("div",re,[(t(!0),a(U,null,T(h.value,(o,I)=>(t(),a("div",{class:A(["item",{"item-active":k.value==I}]),key:I,onClick:N=>M(o,I)},[e("div",ve,[e("div",{class:A(["sn","cahier"])},"单号: "+n(o.order_id),1),e("div",pe,n(o.pay_time),1)]),e("div",fe,[o.product_info?(t(),a("div",me,[(t(!0),a(U,null,T(o.product_info.slice(0,5),(N,W)=>(t(),Z(H,{key:W,src:N.image,class:"shop-img"},null,8,["src"]))),128)),o.product_info.length==1?(t(),a("div",he,n(o.product_info[0].store_name),1)):r("",!0)])):r("",!0),e("div",ye,[e("div",ge,"¥"+n(o.pay_price),1),e("div",$e,"共"+n(o.product_info.length)+"款商品",1)])]),e("div",be,[e("div",ke,[o.paid?(t(),a("div",we,[D(n(o.paid_name)+" ",1),o.pay_type==9?(t(),a("span",De,"(微信收款)")):r("",!0),o.pay_type==17?(t(),a("span",Ve,"(现金支付)")):r("",!0),o.pay_type==13?(t(),a("span",Ye,"(支付宝收款)")):r("",!0),o.pay_type==3?(t(),a("span",ze,"(余额支付)")):r("",!0),o.pay_type==1?(t(),a("span",Ce,"(微信支付)")):r("",!0)])):(t(),a("div",xe,n(o.paid_name),1))])])],10,ue))),128)),f.value?(t(),a("div",Se,"没有更多了")):r("",!0),_.value?(t(),a("div",Me,"加载中...")):r("",!0)])),[[J,_.value],[Q,g]])])}}},Le=O(Ie,[["__scopeId","data-v-274591ed"]]),y=p=>(P("data-v-fbbcbf15"),p=p(),G(),p),Be={class:"my-order"},Ne={key:0,class:"detail"},Ue={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Te=y(()=>e("div",{class:"table-title"},"订单信息",-1)),Ae={class:"table-info"},Fe={class:"info-item"},Oe=y(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Re={class:"info-item-info"},Ee={class:"info-item"},Ke=y(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Pe={class:"info-item-info"},Ge={class:"info-item"},je=y(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),qe={class:"info-item-info"},He={class:"info-item"},Je=y(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=y(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=y(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=y(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=y(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),dt={class:"info-item-info"},_t={key:0},ct={key:1},rt={key:2},ut={key:3},vt={key:4},pt={style:{"font-size":"0.9rem"}},ft={style:{color:"#ff4a00"}},mt={style:{display:"flex","align-items":"center"}},ht={style:{"margin-left":"0.5rem"}},yt={key:1},gt={__name:"detail",setup(p){R(),ee();const s=l({id:""});l([]),l(null);const b=l(!1);l(0),l(0),l(["商品信息","订单详情"]),l(""),l(!1);const d=l({page_no:1,page_size:15,loadend:!1,loading:!1}),V=l([]),S=()=>{console.log("触底"),s.value.id&&!d.value.loadend&&(console.log("加载"),d.value.loading=!0,se({pid:s.value.id,page_no:d.value.page_no,page_size:d.value.page_size}).then(_=>{V.value=[...V.value,..._.data.lists],_.data.lists.length{b.value=!0,oe({id:s.value.id}).then(_=>{s.value=_.data,setTimeout(()=>{b.value=!1},200)})};return E(()=>{w.on("set-sale-order-detail",_=>{console.log("===",_),s.value=_,d.value.page_no=1,d.value.loadend=!1,d.value.loading=!1,V.value=[],u()})}),K(()=>{w.off("set-sale-order-detail")}),(_,B)=>{var i;const k=m("el-image"),f=m("el-table-column"),h=m("el-table"),g=m("el-empty"),M=x("infinite-scroll"),v=x("loading");return t(),a("div",Be,[s.value.id?L((t(),a("div",Ne,[L((t(),a("div",Ue,[Te,e("div",Ae,[e("div",Fe,[Oe,e("div",Re,n(s.value.order_id),1)]),e("div",Ee,[Ke,e("div",Pe,n(s.value.total_num||0),1)]),e("div",Ge,[je,e("div",qe,"¥"+n(s.value.total_price),1)]),e("div",He,[Je,e("div",Qe,n(s.value.pay_time),1)]),e("div",We,[Xe,e("div",Ze,"¥"+n(s.value.deduction_price),1)]),e("div",et,[tt,e("div",st,"¥"+n(s.value.pay_price),1)]),e("div",ot,[at,e("div",it,n(s.value.pay_time),1)]),e("div",lt,[nt,e("div",dt,[s.value.pay_type==9?(t(),a("span",_t,"微信收款")):r("",!0),s.value.pay_type==17?(t(),a("span",ct,"现金支付")):r("",!0),s.value.pay_type==13?(t(),a("span",rt,"支付宝收款")):r("",!0),s.value.pay_type==3?(t(),a("span",ut,"余额支付")):r("",!0),s.value.pay_type==1?(t(),a("span",vt,"微信支付")):r("",!0)])])]),e("div",pt,[D(" 共计 "),e("span",ft,n(((i=s.value.product)==null?void 0:i.length)||" "),1),D(" 款商品 ")]),c(h,{data:s.value.product},{default:$(()=>[c(f,{label:"商品信息"},{default:$(({row:Y})=>{var z,C;return[e("div",mt,[c(k,{style:{height:"3rem",width:"3rem"},src:(z=Y.cart_info)==null?void 0:z.image},null,8,["src"]),e("span",ht,n((C=Y.cart_info)==null?void 0:C.name),1)])]}),_:1}),c(f,{prop:"cart_info.price",label:"单价",width:"150"}),c(f,{prop:"cart_info.cart_num",label:"数量",width:"150"}),c(f,{prop:"cart_info.total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[M,S]])])),[[v,b.value]]):(t(),a("div",yt,[c(g)]))])}}},$t=O(gt,[["__scopeId","data-v-fbbcbf15"]]),bt={class:"my-card"},zt={__name:"index",setup(p){return(s,b)=>(t(),a("div",bt,[c(Le,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),c(ae),c($t,{ref:"detailRef"},null,512)]))}};export{zt as default}; +import{_ as O,u as R,r as l,o as E,m as w,a as K,b as m,l as x,c as t,h as a,e,f as c,w as $,g as D,p as X,v as L,F as U,i as T,s as A,t as n,d as Z,x as r,y as P,z as j,D as ee}from"./index-DhxPMYiX.js";import{s as te,d as se,e as oe}from"./store-Bz99DLdk.js";import{h as F}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as ae}from"./padding-DwppsfEF.js";const ie=p=>(P("data-v-274591ed"),p=p(),j(),p),le={class:"my-order"},ne={class:"header-nav"},de=ie(()=>e("div",{class:"nav-item"},n("线上订单"),-1)),_e={class:"nav-item-btn"},ce={class:"header-input"},re={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ue=["onClick"],ve={class:"top"},pe={class:"create-time"},fe={class:"shop"},me={key:0,class:"left"},he={key:0,class:"shop-name"},ye={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},ke={class:"pay"},we={key:0},De={key:0},Ve={key:1},Ye={key:2},ze={key:3},Ce={key:4},xe={key:1,style:{color:"#ff4a00"}},Se={key:0,class:"load-end"},Me={key:1,class:"load-end"},Ie={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(p){R(),l([]);const s=l(1),b=v=>{u.value.page_no=1,f.value=!1,_.value=!1,h.value=[],g(!0)};l(null);const d=l(""),V=()=>{u.value.start_time=F(d.value[0]).format("YYYY-MM-DD 00:00:00"),u.value.end_time=F(d.value[1]).format("YYYY-MM-DD 23:59:59"),g(!0)},S=v=>v.getTime()>Date.now(),u=l({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:2}),_=l(!1),B=l(0),k=l(0),f=l(!1),h=l([]),g=(v=!1)=>{if(v)u.value.page_no=1;else if(f.value||_.value)return;_.value=!0,s.value==1&&(u.value.paid=null),s.value==2&&(u.value.paid=0),te(u.value).then(i=>{v?h.value=i.data.lists:h.value=[...h.value,...i.data.lists],i.data.lists.length{f.value=!0,_.value=!1})},M=(v,i)=>{k.value=i,w.emit("set-sale-order-detail",v)};return E(()=>{w.on("update-sale-order-detail",v=>{console.log("==="),h.value[k.value].paid=1})}),K(()=>{w.off("update-sale-order-detail")}),(v,i)=>{const Y=m("el-radio-button"),z=m("el-radio-group"),C=m("el-date-picker"),q=m("el-button"),G=m("el-input"),H=m("el-image"),J=x("loading"),Q=x("infinite-scroll");return t(),a("div",le,[e("div",ne,[de,e("div",_e,[c(z,{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=o=>s.value=o),onChange:b,size:"small"},{default:$(()=>[c(Y,{value:1},{default:$(()=>[D("全部")]),_:1}),c(Y,{value:2},{default:$(()=>[D("未支付")]),_:1})]),_:1},8,["modelValue"]),c(C,{modelValue:d.value,"onUpdate:modelValue":i[1]||(i[1]=o=>d.value=o),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":S,onChange:V,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ce,[c(G,{modelValue:u.value.order_id,"onUpdate:modelValue":i[3]||(i[3]=o=>u.value.order_id=o),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=X(o=>g(!0),["enter"])),onClear:i[5]||(i[5]=o=>g(!0)),clearable:""},{append:$(()=>[c(q,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[2]||(i[2]=o=>g(!0))},{default:$(()=>[D("搜索")]),_:1})]),_:1},8,["modelValue"])]),L((t(),a("div",re,[(t(!0),a(U,null,T(h.value,(o,I)=>(t(),a("div",{class:A(["item",{"item-active":k.value==I}]),key:I,onClick:N=>M(o,I)},[e("div",ve,[e("div",{class:A(["sn","cahier"])},"单号: "+n(o.order_id),1),e("div",pe,n(o.pay_time),1)]),e("div",fe,[o.product_info?(t(),a("div",me,[(t(!0),a(U,null,T(o.product_info.slice(0,5),(N,W)=>(t(),Z(H,{key:W,src:N.image,class:"shop-img"},null,8,["src"]))),128)),o.product_info.length==1?(t(),a("div",he,n(o.product_info[0].store_name),1)):r("",!0)])):r("",!0),e("div",ye,[e("div",ge,"¥"+n(o.pay_price),1),e("div",$e,"共"+n(o.product_info.length)+"款商品",1)])]),e("div",be,[e("div",ke,[o.paid?(t(),a("div",we,[D(n(o.paid_name)+" ",1),o.pay_type==9?(t(),a("span",De,"(微信收款)")):r("",!0),o.pay_type==17?(t(),a("span",Ve,"(现金支付)")):r("",!0),o.pay_type==13?(t(),a("span",Ye,"(支付宝收款)")):r("",!0),o.pay_type==3?(t(),a("span",ze,"(余额支付)")):r("",!0),o.pay_type==1?(t(),a("span",Ce,"(微信支付)")):r("",!0)])):(t(),a("div",xe,n(o.paid_name),1))])])],10,ue))),128)),f.value?(t(),a("div",Se,"没有更多了")):r("",!0),_.value?(t(),a("div",Me,"加载中...")):r("",!0)])),[[J,_.value],[Q,g]])])}}},Le=O(Ie,[["__scopeId","data-v-274591ed"]]),y=p=>(P("data-v-fbbcbf15"),p=p(),j(),p),Be={class:"my-order"},Ne={key:0,class:"detail"},Ue={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Te=y(()=>e("div",{class:"table-title"},"订单信息",-1)),Ae={class:"table-info"},Fe={class:"info-item"},Oe=y(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Re={class:"info-item-info"},Ee={class:"info-item"},Ke=y(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Pe={class:"info-item-info"},je={class:"info-item"},qe=y(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=y(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=y(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=y(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=y(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=y(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),dt={class:"info-item-info"},_t={key:0},ct={key:1},rt={key:2},ut={key:3},vt={key:4},pt={style:{"font-size":"0.9rem"}},ft={style:{color:"#ff4a00"}},mt={style:{display:"flex","align-items":"center"}},ht={style:{"margin-left":"0.5rem"}},yt={key:1},gt={__name:"detail",setup(p){R(),ee();const s=l({id:""});l([]),l(null);const b=l(!1);l(0),l(0),l(["商品信息","订单详情"]),l(""),l(!1);const d=l({page_no:1,page_size:15,loadend:!1,loading:!1}),V=l([]),S=()=>{console.log("触底"),s.value.id&&!d.value.loadend&&(console.log("加载"),d.value.loading=!0,se({pid:s.value.id,page_no:d.value.page_no,page_size:d.value.page_size}).then(_=>{V.value=[...V.value,..._.data.lists],_.data.lists.length{b.value=!0,oe({id:s.value.id}).then(_=>{s.value=_.data,setTimeout(()=>{b.value=!1},200)})};return E(()=>{w.on("set-sale-order-detail",_=>{console.log("===",_),s.value=_,d.value.page_no=1,d.value.loadend=!1,d.value.loading=!1,V.value=[],u()})}),K(()=>{w.off("set-sale-order-detail")}),(_,B)=>{var i;const k=m("el-image"),f=m("el-table-column"),h=m("el-table"),g=m("el-empty"),M=x("infinite-scroll"),v=x("loading");return t(),a("div",Be,[s.value.id?L((t(),a("div",Ne,[L((t(),a("div",Ue,[Te,e("div",Ae,[e("div",Fe,[Oe,e("div",Re,n(s.value.order_id),1)]),e("div",Ee,[Ke,e("div",Pe,n(s.value.total_num||0),1)]),e("div",je,[qe,e("div",Ge,"¥"+n(s.value.total_price),1)]),e("div",He,[Je,e("div",Qe,n(s.value.pay_time),1)]),e("div",We,[Xe,e("div",Ze,"¥"+n(s.value.deduction_price),1)]),e("div",et,[tt,e("div",st,"¥"+n(s.value.pay_price),1)]),e("div",ot,[at,e("div",it,n(s.value.pay_time),1)]),e("div",lt,[nt,e("div",dt,[s.value.pay_type==9?(t(),a("span",_t,"微信收款")):r("",!0),s.value.pay_type==17?(t(),a("span",ct,"现金支付")):r("",!0),s.value.pay_type==13?(t(),a("span",rt,"支付宝收款")):r("",!0),s.value.pay_type==3?(t(),a("span",ut,"余额支付")):r("",!0),s.value.pay_type==1?(t(),a("span",vt,"微信支付")):r("",!0)])])]),e("div",pt,[D(" 共计 "),e("span",ft,n(((i=s.value.product)==null?void 0:i.length)||" "),1),D(" 款商品 ")]),c(h,{data:s.value.product},{default:$(()=>[c(f,{label:"商品信息"},{default:$(({row:Y})=>{var z,C;return[e("div",mt,[c(k,{style:{height:"3rem",width:"3rem"},src:(z=Y.cart_info)==null?void 0:z.image},null,8,["src"]),e("span",ht,n((C=Y.cart_info)==null?void 0:C.name),1)])]}),_:1}),c(f,{prop:"cart_info.price",label:"单价",width:"150"}),c(f,{prop:"cart_info.cart_num",label:"数量",width:"150"}),c(f,{prop:"cart_info.total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[M,S]])])),[[v,b.value]]):(t(),a("div",yt,[c(g)]))])}}},$t=O(gt,[["__scopeId","data-v-fbbcbf15"]]),bt={class:"my-card"},zt={__name:"index",setup(p){return(s,b)=>(t(),a("div",bt,[c(Le,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),c(ae),c($t,{ref:"detailRef"},null,512)]))}};export{zt as default}; diff --git a/build/assets/index-DpDt6hhn.js b/build/assets/index-DpDt6hhn.js deleted file mode 100644 index f11a237..0000000 --- a/build/assets/index-DpDt6hhn.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as E,u as K,r as l,o as P,m as D,a as G,b as p,l as I,c as t,h as o,e,f as d,w as $,g as k,p as X,v as U,F as A,i as F,s as O,t as n,d as Z,x as c,y as j,z as q,G as ee}from"./index-C2mUYWeU.js";import{s as te,g as se,h as oe}from"./store-DGmfknqP.js";import{h as R}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as ae}from"./padding-REVqc2LB.js";const ie=f=>(j("data-v-60ddb1b4"),f=f(),q(),f),le={class:"my-order"},ne={class:"header-nav"},de=ie(()=>e("div",{class:"nav-item"},n("收银订单"),-1)),_e={class:"nav-item-btn"},ce={class:"header-input"},re={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ue=["onClick"],ve={class:"top"},pe={class:"create-time"},fe={class:"shop"},me={key:0,class:"left"},he={key:0,class:"shop-name"},ye={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},ke={class:"pay"},we={key:0},De={key:0},Ve={key:1},ze={key:2},Ye={key:3},Ce={key:4},xe={key:1,style:{color:"#ff4a00"}},Se={key:0,class:"load-end"},Me={key:1,class:"load-end"},Ie={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f){K(),l([]);const s=l(1),w=v=>{r.value.page_no=1,b.value=!1,h.value=!1,u.value=[],g(!0)};l(null);const _=l(""),V=()=>{r.value.start_time=R(_.value[0]).format("YYYY-MM-DD 00:00:00"),r.value.end_time=R(_.value[1]).format("YYYY-MM-DD 23:59:59"),g(!0)},L=v=>v.getTime()>Date.now(),r=l({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),h=l(!1),m=l(0),z=l(0),b=l(!1),u=l([]),g=(v=!1)=>{if(v)r.value.page_no=1;else if(b.value||h.value)return;h.value=!0,s.value==1&&(r.value.paid=null),s.value==2&&(r.value.paid=0),te(r.value).then(i=>{v?u.value=i.data.lists:u.value=[...u.value,...i.data.lists],i.data.lists.length{b.value=!0,h.value=!1})},B=(v,i)=>{z.value=i,D.emit("set-sale-order-detail",v)};return P(()=>{D.on("update-sale-order-detail",v=>{console.log("==="),u.value[z.value].paid=1})}),G(()=>{D.off("update-sale-order-detail")}),(v,i)=>{const Y=p("el-radio-button"),C=p("el-radio-group"),x=p("el-date-picker"),S=p("el-button"),M=p("el-input"),H=p("el-image"),J=I("loading"),Q=I("infinite-scroll");return t(),o("div",le,[e("div",ne,[de,e("div",_e,[d(C,{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=a=>s.value=a),onChange:w,size:"small"},{default:$(()=>[d(Y,{value:1},{default:$(()=>[k("全部")]),_:1}),d(Y,{value:2},{default:$(()=>[k("未支付")]),_:1})]),_:1},8,["modelValue"]),d(x,{modelValue:_.value,"onUpdate:modelValue":i[1]||(i[1]=a=>_.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":L,onChange:V,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ce,[d(M,{modelValue:r.value.order_id,"onUpdate:modelValue":i[3]||(i[3]=a=>r.value.order_id=a),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=X(a=>g(!0),["enter"])),onClear:i[5]||(i[5]=a=>g(!0)),clearable:""},{append:$(()=>[d(S,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[2]||(i[2]=a=>g(!0))},{default:$(()=>[k("搜索")]),_:1})]),_:1},8,["modelValue"])]),U((t(),o("div",re,[(t(!0),o(A,null,F(u.value,(a,N)=>(t(),o("div",{class:O(["item",{"item-active":z.value==N}]),key:N,onClick:T=>B(a,N)},[e("div",ve,[e("div",{class:O(["sn","cahier"])},"单号: "+n(a.order_id),1),e("div",pe,n(a.pay_time),1)]),e("div",fe,[a.product_info?(t(),o("div",me,[(t(!0),o(A,null,F(a.product_info.slice(0,5),(T,W)=>(t(),Z(H,{key:W,src:T.image,class:"shop-img"},null,8,["src"]))),128)),a.product_info.length==1?(t(),o("div",he,n(a.product_info[0].store_name),1)):c("",!0)])):c("",!0),e("div",ye,[e("div",ge,"¥"+n(a.pay_price),1),e("div",$e,"共"+n(a.product_info.length)+"款商品",1)])]),e("div",be,[e("div",ke,[a.paid?(t(),o("div",we,[k(n(a.paid_name)+" ",1),a.pay_type==9?(t(),o("span",De,"(微信收款)")):c("",!0),a.pay_type==17?(t(),o("span",Ve,"(现金支付)")):c("",!0),a.pay_type==13?(t(),o("span",ze,"(支付宝收款)")):c("",!0),a.pay_type==3?(t(),o("span",Ye,"(余额支付)")):c("",!0),a.pay_type==1?(t(),o("span",Ce,"(微信支付)")):c("",!0)])):(t(),o("div",xe,n(a.paid_name),1))])])],10,ue))),128)),b.value?(t(),o("div",Se,"没有更多了")):c("",!0),h.value?(t(),o("div",Me,"加载中...")):c("",!0)])),[[J,h.value],[Q,g]])])}}},Le=E(Ie,[["__scopeId","data-v-60ddb1b4"]]),y=f=>(j("data-v-371e2053"),f=f(),q(),f),Be={class:"my-order"},Ne={key:0,class:"detail"},Ue={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Te=y(()=>e("div",{class:"table-title"},"订单信息",-1)),Ae={class:"table-info"},Fe={class:"info-item"},Oe=y(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Re={class:"info-item-info"},Ee={class:"info-item"},Ke=y(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Pe={class:"info-item-info"},Ge={class:"info-item"},je=y(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),qe={class:"info-item-info"},He={class:"info-item"},Je=y(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=y(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=y(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=y(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=y(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),dt={class:"info-item-info"},_t={key:0},ct={key:1},rt={key:2},ut={key:3},vt={key:4},pt={style:{"font-size":"0.9rem"}},ft={style:{color:"#ff4a00"}},mt={style:{display:"flex","align-items":"center"}},ht={style:{"margin-left":"0.5rem"}},yt={key:0,class:"footer"},gt={key:1},$t={__name:"detail",setup(f){K(),ee();const s=l({id:""});l([]),l(null);const w=l(!1);l(0),l(0),l(["商品信息","订单详情"]),l(""),l(!1);const _=l({page_no:1,page_size:15,loadend:!1,loading:!1}),V=l([]),L=()=>{console.log("触底"),s.value.id&&!_.value.loadend&&(console.log("加载"),_.value.loading=!0,se({pid:s.value.id,page_no:_.value.page_no,page_size:_.value.page_size}).then(m=>{V.value=[...V.value,...m.data.lists],m.data.lists.length<_.value.page_size&&(_.value.loadend=!0),_.value.loading=!1,_.value.page_no++}))},r=()=>{w.value=!0,oe({id:s.value.id}).then(m=>{s.value=m.data,setTimeout(()=>{w.value=!1},200)})},h=()=>{};return P(()=>{D.on("set-sale-order-detail",m=>{console.log("===",m),s.value=m,_.value.page_no=1,_.value.loadend=!1,_.value.loading=!1,V.value=[],r()})}),G(()=>{D.off("set-sale-order-detail")}),(m,z)=>{var C;const b=p("el-image"),u=p("el-table-column"),g=p("el-table"),B=p("el-button"),v=p("el-empty"),i=I("infinite-scroll"),Y=I("loading");return t(),o("div",Be,[s.value.id?U((t(),o("div",Ne,[U((t(),o("div",Ue,[Te,e("div",Ae,[e("div",Fe,[Oe,e("div",Re,n(s.value.order_id),1)]),e("div",Ee,[Ke,e("div",Pe,n(s.value.total_num||0),1)]),e("div",Ge,[je,e("div",qe,"¥"+n(s.value.total_price),1)]),e("div",He,[Je,e("div",Qe,n(s.value.pay_time),1)]),e("div",We,[Xe,e("div",Ze,"¥"+n(s.value.deduction_price),1)]),e("div",et,[tt,e("div",st,"¥"+n(s.value.pay_price),1)]),e("div",ot,[at,e("div",it,n(s.value.pay_time),1)]),e("div",lt,[nt,e("div",dt,[s.value.pay_type==9?(t(),o("span",_t,"微信收款")):c("",!0),s.value.pay_type==17?(t(),o("span",ct,"现金支付")):c("",!0),s.value.pay_type==13?(t(),o("span",rt,"支付宝收款")):c("",!0),s.value.pay_type==3?(t(),o("span",ut,"余额支付")):c("",!0),s.value.pay_type==1?(t(),o("span",vt,"微信支付")):c("",!0)])])]),e("div",pt,[k(" 共计 "),e("span",ft,n(((C=s.value.product)==null?void 0:C.length)||" "),1),k(" 款商品 ")]),d(g,{data:s.value.product},{default:$(()=>[d(u,{label:"商品信息"},{default:$(({row:x})=>{var S,M;return[e("div",mt,[d(b,{style:{height:"3rem",width:"3rem"},src:(S=x.cart_info)==null?void 0:S.image},null,8,["src"]),e("span",ht,n((M=x.cart_info)==null?void 0:M.name),1)])]}),_:1}),d(u,{prop:"cart_info.price",label:"单价",width:"150"}),d(u,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(u,{prop:"cart_info.total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[i,L]]),s.value.paid?c("",!0):(t(),o("div",yt,[d(B,{type:"primary",size:"large",onClick:h},{default:$(()=>[k("重新支付")]),_:1})]))])),[[Y,w.value]]):(t(),o("div",gt,[d(v)]))])}}},bt=E($t,[["__scopeId","data-v-371e2053"]]),kt={class:"my-card"},Ct={__name:"index",setup(f){return(s,w)=>(t(),o("div",kt,[d(Le,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(ae),d(bt,{ref:"detailRef"},null,512)]))}};export{Ct as default}; diff --git a/build/assets/index-MiPfj8nz.js b/build/assets/index-MiPfj8nz.js deleted file mode 100644 index 8d25bd8..0000000 --- a/build/assets/index-MiPfj8nz.js +++ /dev/null @@ -1,27 +0,0 @@ -import{c as Bp,a as Wp,b as Ko,o as ko,d as $p,e as Up,f as Dp}from"./store-DGmfknqP.js";import{_ as Ht,r as O,o as pt,m as En,a as vt,b as on,c as ln,d as dt,w as pn,e as g,f as Z,g as vn,t as Pn,n as Oe,E as Yn,u as su,h as bn,F as fu,i as au,j as Gt,k as Mp,l as Ur,p as Yo,q as Br,s as $r,v as cu,x as Wr,y as Zo,z as Vo,A as Np,B as Gp,C as Hp,D as qp}from"./index-C2mUYWeU.js";import{p as zp}from"./padding-REVqc2LB.js";/* empty css */import"./moment-Cl4UOzQZ.js";const kp={class:"price"},Kp={class:"flex"},Yp={style:{margin:"0.625rem","padding-bottom":"40px"}},Zp={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Vp={class:"dialog-footer"},Xp={__name:"price",emits:["changeAllPrice"],setup(fn,{expose:Sn,emit:o}){const L=O(!1),U=O(null),R=O(0),C=(Q=!0,I=0)=>{q.value.nowPrice="",q.value.percentage="",L.value=Q,R.value=I,Oe(()=>{setTimeout(()=>{var en;(en=U.value)==null||en.focus()},150)})},q=O({nowPrice:"",percentage:""}),gn=Q=>{q.value.percentage=(Q/R.value*100).toFixed(2)},mn=Q=>{q.value.nowPrice=(R.value*Q/100).toFixed(2)},k=o,rn=()=>{if(q.value.percentage>100)return q.value.nowPrice="",q.value.percentage="",Yn.error("改价金额不能大于当前订单金额");if(q.value.nowPrice<=0)return q.value.nowPrice="",q.value.percentage="",Yn.error("金额不能小于0");k("changeAllPrice",q.value.nowPrice)};Sn({show:C,dialogVisible:L});const Fn=()=>{L.value&&rn()};return pt(()=>{En.on("enter",Fn)}),vt(()=>{En.off("enter",Fn)}),(Q,I)=>{const en=on("el-input"),j=on("el-button"),An=on("el-dialog");return ln(),dt(An,{modelValue:L.value,"onUpdate:modelValue":I[2]||(I[2]=an=>L.value=an),title:"订单改价",width:"650"},{footer:pn(()=>[g("div",Vp,[Z(j,{class:"ok-btn",type:"primary",onClick:rn},{default:pn(()=>[vn(" 确定 (Enter) ")]),_:1})])]),default:pn(()=>[g("div",kp,[g("div",Kp,[Z(en,{ref_key:"priceRef",ref:U,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:q.value.nowPrice,"onUpdate:modelValue":I[0]||(I[0]=an=>q.value.nowPrice=an),type:"number",placeholder:"请输入改价后的价格",onInput:gn},{suffix:pn(()=>[vn("元")]),_:1},8,["modelValue"]),Z(en,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:q.value.percentage,"onUpdate:modelValue":I[1]||(I[1]=an=>q.value.percentage=an),type:"number",placeholder:"请输入比例",onInput:mn},{suffix:pn(()=>[vn("%")]),_:1},8,["modelValue"])]),g("div",Yp,[vn(" 改价后金额: "),g("span",Zp,"¥"+Pn(q.value.nowPrice||R.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Jp=Ht(Xp,[["__scopeId","data-v-924edcc0"]]),Qp={class:"my-order"},jp={class:"header-nav"},nv={class:"nav-item"},ev={class:"order-list"},tv={class:"order-item-info"},rv={class:"order-item-title"},iv={class:"title"},uv=["onClick"],lv={class:"order-item-sku"},ov={class:"order-item-price"},sv={class:"order-footer"},fv={class:"order-total"},av={class:"price"},cv={class:"total-item"},hv={style:{"font-size":"1.4rem"}},_v={class:"total-item"},dv={class:"order-btn"},pv={__name:"order",emits:["goPay","editAttr"],setup(fn,{expose:Sn,emit:o}){const L=O([]),U=O(0),R=O(0),C=O(0);su();const q=()=>{let P=[];L.value.map(K=>{P.push(K.id)}),P.length!=0&&mn(P)},gn=P=>{L.value=L.value.filter(K=>K.id!=P),mn([P])},mn=P=>{Bp({id:P}).then(K=>{console.log(K),k()})},k=()=>{U.value=0,R.value=0,C.value=0,Wp().then(P=>{var K,E,X;((E=(K=P.data)==null?void 0:K.lists)==null?void 0:E.length)>0?(L.value=P.data.lists,U.value=(X=P.data)==null?void 0:X.lists.reduce((J,Cn)=>J+Number(Cn.total_price),0),R.value=U.value):L.value=[]})};k();const rn=o,Fn=()=>{rn("goPay")},Q=(P,K)=>{Ko({product_id:P.product_id,cart_num:P.cart_num}).then(E=>{U.value=0,L.value.forEach(X=>{U.value+=X.price*X.cart_num}),R.value=U.value})},I=P=>{C.value=R.value-P,U.value=+P,Oe(()=>{setTimeout(()=>{j(!1)},150)})};O(0);const en=O(null),j=(P=!0)=>{en.value.show(P,R.value)};Sn({getList:k,list:L,discounts:C,allPrice:U});const An=()=>{en.value.dialogVisible?en.value.dialogVisible=!1:j()},an=()=>{L.value.length>0&&q()};return pt(()=>{En.on("insert",An),En.on("delete",an)}),vt(()=>{En.off("insert",An),En.off("delete",an)}),(P,K)=>{const E=on("Delete"),X=on("el-icon"),J=on("el-empty"),Cn=on("el-image"),cn=on("el-input-number"),Mn=on("el-button");return ln(),bn("div",Qp,[g("div",jp,[g("div",nv,[vn(" 已选购 "),g("span",null,Pn(L.value.length),1),vn(" 款 ")]),g("div",{class:"nav-item-clear",onClick:q},[Z(X,null,{default:pn(()=>[Z(E)]),_:1}),vn("清空 (Delete) ")])]),g("div",ev,[L.value.length==0?(ln(),dt(J,{key:0,description:"请点击右侧添加商品"})):(ln(!0),bn(fu,{key:1},au(L.value,(hn,Zn)=>(ln(),bn("div",{class:"order-item",key:Zn},[Z(Cn,{loading:"lazy",class:"order-item-img",src:hn.image},null,8,["src"]),g("div",tv,[g("div",rv,[g("div",iv,Pn(hn.store_name),1),g("div",{class:"delete",onClick:Rn=>gn(hn.id)},"删除",8,uv)]),g("div",lv,[g("span",null,Pn(hn.unit_name),1)]),g("div",ov,[g("div",null,[vn(" ¥"),g("span",null,Pn(hn.price),1)]),g("div",null,[Z(cn,{modelValue:hn.cart_num,"onUpdate:modelValue":Rn=>hn.cart_num=Rn,"step-strictly":"",min:1,step:1,onChange:Rn=>Q(hn)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),g("div",sv,[g("div",fv,[g("div",av,[g("div",cv,[vn(" 实付: "),g("span",null,[vn("¥"),g("span",hv,Pn(U.value.toFixed(2)),1)])]),g("div",_v,[vn(" 优惠: "),g("span",null,[vn("¥"),g("span",null,Pn(C.value.toFixed(2)),1)])])])]),g("div",dv,[Z(Mn,{class:"btn",type:"primary",onClick:Fn,disabled:L.value.length==0},{default:pn(()=>[vn("立即结账 (F9)")]),_:1},8,["disabled"])])]),Z(Jp,{ref_key:"priceRef",ref:en,onChangeAllPrice:I},null,512)])}}},vv=Ht(pv,[["__scopeId","data-v-a98302e2"]]);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(fn,Sn){(function(){var o,L="4.17.21",U=200,R="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",C="Expected a function",q="Invalid `variable` option passed into `_.template`",gn="__lodash_hash_undefined__",mn=500,k="__lodash_placeholder__",rn=1,Fn=2,Q=4,I=1,en=2,j=1,An=2,an=4,P=8,K=16,E=32,X=64,J=128,Cn=256,cn=512,Mn=30,hn="...",Zn=800,Rn=16,Pe=1,qt=2,mt=3,wn=1/0,ae=9007199254740991,wt=17976931348623157e292,xe=NaN,Vn=4294967295,zt=Vn-1,M=Vn>>>1,W=[["ary",J],["bind",j],["bindKey",An],["curry",P],["curryRight",K],["flip",cn],["partial",E],["partialRight",X],["rearg",Cn]],F="[object Arguments]",Tn="[object Array]",Mr="[object AsyncFunction]",He="[object Boolean]",qe="[object Date]",Nr="[object DOMException]",Bn="[object Error]",xt="[object Function]",_u="[object GeneratorFunction]",ce="[object Map]",yt="[object Number]",Xo="[object Null]",ye="[object Object]",du="[object Promise]",Jo="[object Proxy]",At="[object RegExp]",he="[object Set]",St="[object String]",kt="[object Symbol]",Qo="[object Undefined]",Ct="[object WeakMap]",jo="[object WeakSet]",Rt="[object ArrayBuffer]",je="[object DataView]",Gr="[object Float32Array]",Hr="[object Float64Array]",qr="[object Int8Array]",zr="[object Int16Array]",kr="[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,vu=/[&<>"']/g,rs=RegExp(pu.source),is=RegExp(vu.source),us=/<%-([\s\S]+?)%>/g,ls=/<%([\s\S]+?)%>/g,gu=/<%=([\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,vs=/[()=,{}\[\]\/\s]/,gs=/\\(\\)?/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,Kt=/($^)/,Rs=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Is="\\u0300-\\u036f",Ls="\\ufe20-\\ufe2f",Es="\\u20d0-\\u20ff",wu=Is+Ls+Es,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="["+Yt+"]",Ru="["+Cu+"]",Zt="["+wu+"]",Iu="\\d+",Bs="["+xu+"]",Lu="["+yu+"]",Eu="[^"+Yt+Cu+Iu+xu+yu+Au+"]",jr="\\ud83c[\\udffb-\\udfff]",Ws="(?:"+Zt+"|"+jr+")",bu="[^"+Yt+"]",ni="(?:\\ud83c[\\udde6-\\uddff]){2}",ei="[\\ud800-\\udbff][\\udc00-\\udfff]",nt="["+Au+"]",Tu="\\u200d",Ou="(?:"+Lu+"|"+Eu+")",$s="(?:"+nt+"|"+Eu+")",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+")*",Ds="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ms="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$u=Wu+Bu+Us,Ns="(?:"+[Bs,ni,ei].join("|")+")"+$u,Gs="(?:"+[bu+Zt+"?",Zt,ni,ei,Fs].join("|")+")",Hs=RegExp(Qr,"g"),qs=RegExp(Zt,"g"),ti=RegExp(jr+"(?="+jr+")|"+Gs+$u,"g"),zs=RegExp([nt+"?"+Lu+"+"+Pu+"(?="+[Ru,nt,"$"].join("|")+")",$s+"+"+Fu+"(?="+[Ru,nt+Ou,"$"].join("|")+")",nt+"?"+Ou+"+"+Pu,nt+"+"+Fu,Ms,Ds,Iu,Ns].join("|"),"g"),ks=RegExp("["+Tu+Yt+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,un={};un[Gr]=un[Hr]=un[qr]=un[zr]=un[kr]=un[Kr]=un[Yr]=un[Zr]=un[Vr]=!0,un[F]=un[Tn]=un[Rt]=un[He]=un[je]=un[qe]=un[Bn]=un[xt]=un[ce]=un[yt]=un[ye]=un[At]=un[he]=un[St]=un[Ct]=!1;var tn={};tn[F]=tn[Tn]=tn[Rt]=tn[je]=tn[He]=tn[qe]=tn[Gr]=tn[Hr]=tn[qr]=tn[zr]=tn[kr]=tn[ce]=tn[yt]=tn[ye]=tn[At]=tn[he]=tn[St]=tn[kt]=tn[Kr]=tn[Yr]=tn[Zr]=tn[Vr]=!0,tn[Bn]=tn[xt]=tn[Ct]=!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 Gt=="object"&&Gt&&Gt.Object===Object&&Gt,ef=typeof self=="object"&&self&&self.Object===Object&&self,Wn=Uu||ef||Function("return this")(),ri=Sn&&!Sn.nodeType&&Sn,ze=ri&&!0&&fn&&!fn.nodeType&&fn,Du=ze&&ze.exports===ri,ii=Du&&Uu.process,te=function(){try{var a=ze&&ze.require&&ze.require("util").types;return a||ii&&ii.binding&&ii.binding("util")}catch{}}(),Mu=te&&te.isArrayBuffer,Nu=te&&te.isDate,Gu=te&&te.isMap,Hu=te&&te.isRegExp,qu=te&&te.isSet,zu=te&&te.isTypedArray;function Xn(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,z=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--&&et(_,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 vf(a,_){return a==null?o:a[_]}function tt(a){return ks.test(a)}function gf(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,z=[];++h-1}function ua(n,e){var t=this.__data__,r=hr(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&rn,c=e&Fn,d=e&Q;if(t&&(s=i?t(n,r,i,l):t(n)),s!==o)return s;if(!_n(n))return n;var p=T(n);if(p){if(s=fc(n),!f)return qn(n,s)}else{var v=Dn(n),m=v==xt||v==_u;if(Ge(n))return Wl(n,f);if(v==ye||v==F||m&&!i){if(s=c||m?{}:no(n),!f)return c?Qa(n,ya(s,n)):Ja(n,cl(s,n))}else{if(!tn[v])return i?n:{};s=ac(n,v,f)}}l||(l=new de);var x=l.get(n);if(x)return x;l.set(n,s),To(n)?n.forEach(function(S){s.add(le(S,e,t,S,n,l))}):Eo(n)&&n.forEach(function(S,N){s.set(N,le(S,e,t,N,n,l))});var A=d?c?Mi:Di:c?kn:On,$=p?o:A(n);return re($||n,function(S,N){$&&(N=S,S=n[N]),Pt(s,N,le(S,e,t,N,n,l))}),s}function Aa(n){var e=On(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(C);return Mt(function(){n.apply(o,t)},e)}function Ft(n,e,t,r){var i=-1,l=Vt,s=!0,f=n.length,c=[],d=e.length;if(!f)return c;t&&(e=sn(e,Jn(t))),r?(l=ui,s=!1):e.length>=U&&(l=It,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?$n(f,e-1,t,r,i):Be(i,f):r||(i[i.length]=f)}return i}var xi=Gl(),vl=Gl(!0);function ge(n,e){return n&&xi(n,e,On)}function yi(n,e){return n&&vl(n,e,On)}function dr(n,e){return Fe(e,function(t){return Ee(n[t])})}function Ve(n,e){e=Me(e,n);for(var t=0,r=e.length;n!=null&&te}function Ra(n,e){return n!=null&&V.call(n,e)}function Ia(n,e){return n!=null&&e in nn(n)}function La(n,e,t){return n>=Un(e,t)&&n=120&&p.length>=120)?new Ye(s&&p):o}p=n[0];var v=-1,m=f[0];n:for(;++v-1;)f!==n&&ur.call(f,c,1),ur.call(n,c,1);return n}function Ll(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;Le(i)?ur.call(n,i,1):Oi(n,i)}}return n}function Ei(n,e){return n+sr(ol()*(e-n+1))}function Na(n,e,t,r){for(var i=-1,l=Ln(or((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>ae)return t;do e%2&&(t+=n),e=sr(e/2),e&&(n+=n);while(e);return t}function D(n,e){return Ki(ro(n,e,Kn),n+"")}function Ga(n){return al(_t(n))}function Ha(n,e){var t=_t(n);return Rr(t,Ze(e,0,t.length))}function $t(n,e,t,r){if(!_n(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&&!jn(s)&&(t?s<=e:s=U){var d=e?null:tc(n);if(d)return Jt(d);s=!1,i=It,c=new Ye}else c=e?[]:f;n:for(;++r=r?n:oe(n,e,t)}var Bl=Ff||function(n){return Wn.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 rr(e).set(new rr(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 Ot?nn(Ot.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=jn(n),s=e!==o,f=e===null,c=e===e,d=jn(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 Dl(n,e,t,r){for(var i=-1,l=n.length,s=t.length,f=-1,c=e.length,d=Ln(l-s,0),p=h(c+d),v=!r;++f1?t[i-1]:o,s=i>2?t[2]:o;for(l=n.length>3&&typeof l=="function"?(i--,l):o,s&&Gn(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 Ie(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(C);if(i&&!s&&Sr(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 v=-1,m=!0,x=t&en?new Ye:o;for(l.set(n,e),l.set(e,n);++v1?"& ":"")+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 Le(n,e){var t=typeof n;return e=e??ae,!!e&&(t=="number"||t!="symbol"&&Ss.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Zn)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,vo(n,t)});function go(n){var e=u(n);return e.__chain__=!0,e}function Sh(n,e){return e(n),n}function Ir(n,e){return e(n)}var Ch=Ie(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)||!Le(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Ir,args:[i],thisArg:o}),new ue(r,this.__chain__).thru(function(l){return e&&!l.length&&l.push(o),l}))});function Rh(){return go(this)}function Ih(){return new ue(this.value(),this.__chain__)}function Lh(){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 Eh(){return this}function bh(n){for(var e,t=this;t instanceof cr;){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:Ir,args:[Yi],thisArg:o}),new ue(e,this.__chain__)}return this.thru(Yi)}function Oh(){return Pl(this.__wrapped__,this.__actions__)}var Ph=mr(function(n,e,t){V.call(n,t)?++n[t]:Ce(n,t,1)});function Fh(n,e,t){var r=T(n)?ku:Sa;return t&&Gn(n,e,t)&&(e=o),r(n,y(e,3))}function Bh(n,e){var t=T(n)?Fe:pl;return t(n,y(e,3))}var Wh=ql(ao),$h=ql(co);function Uh(n,e){return $n(Lr(n,e),1)}function Dh(n,e){return $n(Lr(n,e),wn)}function Mh(n,e,t){return t=t===o?1:B(t),$n(Lr(n,e),t)}function mo(n,e){var t=T(n)?re:Ue;return t(n,y(e,3))}function wo(n,e){var t=T(n)?rf:dl;return t(n,y(e,3))}var Nh=mr(function(n,e,t){V.call(n,t)?n[t].push(e):Ce(n,t,[e])});function Gh(n,e,t,r){n=zn(n)?n:_t(n),t=t&&!r?B(t):0;var i=n.length;return t<0&&(t=Ln(i+t,0)),Pr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&et(n,e,t)>-1}var Hh=D(function(n,e,t){var r=-1,i=typeof e=="function",l=zn(n)?h(n.length):[];return Ue(n,function(s){l[++r]=i?Xn(e,s,t):Bt(s,e,t)}),l}),qh=mr(function(n,e,t){Ce(n,t,e)});function Lr(n,e){var t=T(n)?sn: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]),Rl(n,e,t))}var kh=mr(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,Ue)}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)?Fe:pl;return t(n,Tr(y(e,3)))}function Vh(n){var e=T(n)?al:Ga;return e(n)}function Xh(n,e,t){(t?Gn(n,e,t):e===o)?e=1:e=B(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 Pr(n)?rt(n):n.length;var e=Dn(n);return e==ce||e==he?n.size:Ri(n).length}function jh(n,e,t){var r=T(n)?oi:ka;return t&&Gn(n,e,t)&&(e=o),r(n,y(e,3))}var n_=D(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Gn(n,e[0],e[1])?e=[]:t>2&&Gn(e[0],e[1],e[2])&&(e=[e[0]]),Rl(n,$n(e,1),[])}),Er=Bf||function(){return Wn.Date.now()};function e_(n,e){if(typeof e!="function")throw new ie(C);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,Re(n,J,o,o,o,o,e)}function yo(n,e){var t;if(typeof e!="function")throw new ie(C);return n=B(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Vi=D(function(n,e,t){var r=j;if(t.length){var i=We(t,ct(Vi));r|=E}return Re(n,r,e,t,i)}),Ao=D(function(n,e,t){var r=j|An;if(t.length){var i=We(t,ct(Ao));r|=E}return Re(e,r,n,t,i)});function So(n,e,t){e=t?o:e;var r=Re(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=Re(n,K,o,o,o,o,o,e);return r.placeholder=Co.placeholder,r}function Ro(n,e,t){var r,i,l,s,f,c,d=0,p=!1,v=!1,m=!0;if(typeof n!="function")throw new ie(C);e=fe(e)||0,_n(t)&&(p=!!t.leading,v="maxWait"in t,l=v?Ln(fe(t.maxWait)||0,e):l,m="trailing"in t?!!t.trailing:m);function x(yn){var ve=r,Te=i;return r=i=o,d=yn,s=n.apply(Te,ve),s}function A(yn){return d=yn,f=Mt(N,e),p?x(yn):s}function $(yn){var ve=yn-c,Te=yn-d,zo=e-ve;return v?Un(zo,l-Te):zo}function S(yn){var ve=yn-c,Te=yn-d;return c===o||ve>=e||ve<0||v&&Te>=l}function N(){var yn=Er();if(S(yn))return H(yn);f=Mt(N,$(yn))}function H(yn){return f=o,m&&r?x(yn):(r=i=o,s)}function ne(){f!==o&&Bl(f),d=0,r=c=i=f=o}function Hn(){return f===o?s:H(Er())}function ee(){var yn=Er(),ve=S(yn);if(r=arguments,i=this,c=yn,ve){if(f===o)return A(c);if(v)return Bl(f),f=Mt(N,e),x(c)}return f===o&&(f=Mt(N,e)),s}return ee.cancel=ne,ee.flush=Hn,ee}var t_=D(function(n,e){return _l(n,1,e)}),r_=D(function(n,e,t){return _l(n,fe(e)||0,t)});function i_(n){return Re(n,cn)}function br(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new ie(C);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(br.Cache||Se),t}br.Cache=Se;function Tr(n){if(typeof n!="function")throw new ie(C);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])?sn(e[0],Jn(y())):sn($n(e,1),Jn(y()));var t=e.length;return D(function(r){for(var i=-1,l=Un(r.length,t);++i=e}),Qe=ml(function(){return arguments}())?ml:function(n){return dn(n)&&V.call(n,"callee")&&!il.call(n,"callee")},T=h.isArray,y_=Mu?Jn(Mu):ba;function zn(n){return n!=null&&Or(n.length)&&!Ee(n)}function xn(n){return dn(n)&&zn(n)}function A_(n){return n===!0||n===!1||dn(n)&&Nn(n)==He}var Ge=$f||ou,S_=Nu?Jn(Nu):Ta;function C_(n){return dn(n)&&n.nodeType===1&&!Nt(n)}function R_(n){if(n==null)return!0;if(zn(n)&&(T(n)||typeof n=="string"||typeof n.splice=="function"||Ge(n)||ht(n)||Qe(n)))return!n.length;var e=Dn(n);if(e==ce||e==he)return!n.size;if(Dt(n))return!Ri(n).length;for(var t in n)if(V.call(n,t))return!1;return!0}function I_(n,e){return Wt(n,e)}function L_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?Wt(n,e,o,t):!!r}function Ji(n){if(!dn(n))return!1;var e=Nn(n);return e==Bn||e==Nr||typeof n.message=="string"&&typeof n.name=="string"&&!Nt(n)}function E_(n){return typeof n=="number"&&ll(n)}function Ee(n){if(!_n(n))return!1;var e=Nn(n);return e==xt||e==_u||e==Mr||e==Jo}function Lo(n){return typeof n=="number"&&n==B(n)}function Or(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ae}function _n(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function dn(n){return n!=null&&typeof n=="object"}var Eo=Gu?Jn(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(R);return wl(n)}function F_(n){return n===null}function B_(n){return n==null}function bo(n){return typeof n=="number"||dn(n)&&Nn(n)==yt}function Nt(n){if(!dn(n)||Nn(n)!=ye)return!1;var e=ir(n);if(e===null)return!0;var t=V.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&nr.call(t)==Tf}var Qi=Hu?Jn(Hu):Fa;function W_(n){return Lo(n)&&n>=-ae&&n<=ae}var To=qu?Jn(qu):Ba;function Pr(n){return typeof n=="string"||!T(n)&&dn(n)&&Nn(n)==St}function jn(n){return typeof n=="symbol"||dn(n)&&Nn(n)==kt}var ht=zu?Jn(zu):Wa;function $_(n){return n===o}function U_(n){return dn(n)&&Dn(n)==Ct}function D_(n){return dn(n)&&Nn(n)==jo}var M_=Ar(Ii),N_=Ar(function(n,e){return n<=e});function Oo(n){if(!n)return[];if(zn(n))return Pr(n)?_e(n):qn(n);if(Lt&&n[Lt])return mf(n[Lt]());var e=Dn(n),t=e==ce?_i:e==he?Jt:_t;return t(n)}function be(n){if(!n)return n===0?n:0;if(n=fe(n),n===wn||n===-wn){var e=n<0?-1:1;return e*wt}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,Vn):0}function fe(n){if(typeof n=="number")return n;if(jn(n))return xe;if(_n(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=_n(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)?xe:+n}function Fo(n){return me(n,kn(n))}function G_(n){return n?Ze(B(n),-ae,ae):n===0?n:0}function Y(n){return n==null?"":Qn(n)}var H_=ft(function(n,e){if(Dt(e)||zn(e)){me(e,On(e),n);return}for(var t in e)V.call(e,t)&&Pt(n,t,e[t])}),Bo=ft(function(n,e){me(e,kn(e),n)}),Fr=ft(function(n,e,t,r){me(e,kn(e),n,r)}),q_=ft(function(n,e,t,r){me(e,On(e),n,r)}),z_=Ie(wi);function k_(n,e){var t=st(n);return e==null?t:cl(t,e)}var K_=D(function(n,e){n=nn(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&Gn(e[0],e[1],i)&&(r=1);++t1),l}),me(n,Mi(n),t),r&&(t=le(t,rn|Fn|Q,rc));for(var i=e.length;i--;)Oi(t,e[i]);return t});function ad(n,e){return $o(n,Tr(y(e)))}var cd=Ie(function(n,e){return n==null?{}:Da(n,e)});function $o(n,e){if(n==null)return{};var t=sn(Mi(n),function(r){return[r]});return e=y(e),Il(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 Un(n+i*(e-n+js("1e-"+((i+"").length-1))),e)}return Ei(n,e)}var Sd=at(function(n,e,t){return e=e.toLowerCase(),n+(t?Mo(e):e)});function Mo(n){return eu(Y(n).toLowerCase())}function No(n){return n=Y(n),n&&n.replace(Cs,_f).replace(qs,"")}function Cd(n,e,t){n=Y(n),e=Qn(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 Rd(n){return n=Y(n),n&&is.test(n)?n.replace(vu,df):n}function Id(n){return n=Y(n),n&&as.test(n)?n.replace(Xr,"\\$&"):n}var Ld=at(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Ed=at(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?rt(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return yr(sr(i),t)+n+yr(or(i),t)}function Od(n,e,t){n=Y(n),e=B(e);var r=e?rt(n):0;return e&&r>>0,t?(n=Y(n),n&&(typeof e=="string"||e!=null&&!Qi(e))&&(e=Qn(e),!e&&tt(n))?Ne(_e(n),0,t):n.split(e,t)):[]}var Dd=at(function(n,e,t){return n+(t?" ":"")+eu(e)});function Md(n,e,t){return n=Y(n),t=t==null?0:Ze(B(t),0,n.length),e=Qn(e),n.slice(t,t+e.length)==e}function Nd(n,e,t){var r=u.templateSettings;t&&Gn(n,e,t)&&(e=o),n=Y(n),e=Fr({},e,r,Vl);var i=Fr({},e.imports,r.imports,Vl),l=On(i),s=hi(i,l),f,c,d=0,p=e.interpolate||Kt,v="__p += '",m=di((e.escape||Kt).source+"|"+p.source+"|"+(p===gu?ms:Kt).source+"|"+(e.evaluate||Kt).source+"|$","g"),x="//# sourceURL="+(V.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zs+"]")+` -`;n.replace(m,function(S,N,H,ne,Hn,ee){return H||(H=ne),v+=n.slice(d,ee).replace(Rs,pf),N&&(f=!0,v+=`' + -__e(`+N+`) + -'`),Hn&&(c=!0,v+=`'; -`+Hn+`; -__p += '`),H&&(v+=`' + -((__t = (`+H+`)) == null ? '' : __t) + -'`),d=ee+S.length,S}),v+=`'; -`;var A=V.call(e,"variable")&&e.variable;if(!A)v=`with (obj) { -`+v+` -} -`;else if(vs.test(A))throw new b(q);v=(c?v.replace(ns,""):v).replace(es,"$1").replace(ts,"$1;"),v="function("+(A||"obj")+`) { -`+(A?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(f?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+v+`return __p -}`;var $=Ho(function(){return z(l,x+"return "+v).apply(o,s)});if($.source=v,Ji($))throw $;return $}function Gd(n){return Y(n).toLowerCase()}function Hd(n){return Y(n).toUpperCase()}function qd(n,e,t){if(n=Y(n),n&&(t||e===o))return Xu(n);if(!n||!(e=Qn(e)))return n;var r=_e(n),i=_e(e),l=Ju(r,i),s=Qu(r,i)+1;return Ne(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=Qn(e)))return n;var r=_e(n),i=Qu(r,_e(e))+1;return Ne(r,0,i).join("")}function kd(n,e,t){if(n=Y(n),n&&(t||e===o))return n.replace(Jr,"");if(!n||!(e=Qn(e)))return n;var r=_e(n),i=Ju(r,_e(e));return Ne(r,i).join("")}function Kd(n,e){var t=Mn,r=hn;if(_n(e)){var i="separator"in e?e.separator:i;t="length"in e?B(e.length):t,r="omission"in e?Qn(e.omission):r}n=Y(n);var l=n.length;if(tt(n)){var s=_e(n);l=s.length}if(t>=l)return n;var f=t-rt(r);if(f<1)return r;var c=s?Ne(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 v=d.index;c=c.slice(0,v===o?f:v)}}else if(n.indexOf(Qn(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=at(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?gf(n)?Rf(n):sf(n):n.match(e)||[]}var Ho=D(function(n,e){try{return Xn(n,o,e)}catch(t){return Ji(t)?t:new b(t)}}),Vd=Ie(function(n,e){return re(e,function(t){t=we(t),Ce(n,t,Vi(n[t],n))}),n});function Xd(n){var e=n==null?0:n.length,t=y();return n=e?sn(n,function(r){if(typeof r[1]!="function")throw new ie(C);return[t(r[0]),r[1]]}):[],D(function(r){for(var i=-1;++iae)return[];var t=Vn,r=Un(n,Vn);e=y(e),n-=Vn;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(Vn)},ge(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),v=function(N){var H=i.apply(u,Be([N],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,A=l&&!m,$=c&&!x;if(!l&&p){s=$?s:new G(this);var S=n.apply(s,f);return S.__actions__.push({func:Ir,args:[v],thisArg:o}),new ue(S,m)}return A&&$?n.apply(this,f):(S=this.thru(v),A?r?S.value()[0]:S.value():S)})}),re(["pop","push","shift","sort","splice","unshift"],function(n){var e=Qt[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)})}}),ge(G.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";V.call(ot,r)||(ot[r]=[]),ot[r].push({name:e,func:t})}}),ot[wr(o,An).name]=[{name:"wrapper",func:o}],G.prototype.clone=Yf,G.prototype.reverse=Zf,G.prototype.value=Vf,u.prototype.at=Ch,u.prototype.chain=Rh,u.prototype.commit=Ih,u.prototype.next=Lh,u.prototype.plant=bh,u.prototype.reverse=Th,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Oh,u.prototype.first=u.prototype.head,Lt&&(u.prototype[Lt]=Eh),u},it=If();ze?((ze.exports=it)._=it,ri._=it):Wn._=it}).call(Gt)})(Dr,Dr.exports);var gv=Dr.exports;const mv=Mp(gv),hu=fn=>(Zo("data-v-466f28c1"),fn=fn(),Vo(),fn),wv={class:"my-order"},xv=hu(()=>g("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),yv={class:"nav-item-input"},Av={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},Sv=["onClick"],Cv={class:"shop-name"},Rv={class:"shop-price"},Iv={class:"unit-name"},Lv={key:0,class:"no-stock"},Ev=hu(()=>g("div",null,[g("span",null,"暂无"),g("span",null,"库存")],-1)),bv=[Ev],Tv={key:1,class:"no-stock"},Ov=hu(()=>g("div",null,[g("span",null,"平台"),g("span",null,"关闭")],-1)),Pv=[Ov],Fv={key:1,class:"no-data"},Bv={__name:"shop",props:{storeList:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(fn,{expose:Sn,emit:o}){const L=O(null),U=o,R=O(""),C=()=>{U("loadMore",{store_name_code:R.value})},q=I=>{if(I.is_used==0)return Yn.error("该商品已被平台关闭");if(I.stock==0)return Yn.warning("该商品无库存");U("changeItem",I)},gn=mv.throttle(()=>{let I={store_name_code:R.value};U("getStoreList",I,!0)},300);Sn({name:R,inputBlur:()=>{var I;(I=L.value)==null||I.blur()}});const k=O(!1),rn=()=>{k.value=!0},Fn=()=>{k.value=!1},Q=()=>{var I;(I=L.value)==null||I.focus()};return pt(()=>{Oe(()=>{var I;(I=L.value)==null||I.focus(),rn()}),En.on("shift",Q)}),vt(()=>{En.off("shift",Q)}),(I,en)=>{const j=on("el-input"),An=on("Search"),an=on("el-icon"),P=on("el-button"),K=on("el-image"),E=on("el-space"),X=on("el-empty"),J=Ur("loading"),Cn=Ur("infinite-scroll");return ln(),bn("div",wv,[g("div",{class:$r(["header-nav",{"input-focus":k.value}])},[xv,g("div",yv,[Z(j,{modelValue:R.value,"onUpdate:modelValue":en[0]||(en[0]=cn=>R.value=cn),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:L,onFocus:rn,onBlur:Fn,onKeyup:Yo(Br(gn),["enter"]),onClear:Br(gn)},null,8,["modelValue","onKeyup","onClear"])]),g("div",{class:"nav-item-btn",onClick:en[1]||(en[1]=(...cn)=>Br(gn)&&Br(gn)(...cn))},[Z(P,{class:"btn",type:"primary"},{default:pn(()=>[Z(an,null,{default:pn(()=>[Z(An)]),_:1})]),_:1})])],2),cu((ln(),bn("div",Av,[fn.storeList.length?(ln(),dt(E,{key:0,wrap:""},{default:pn(()=>[(ln(!0),bn(fu,null,au(fn.storeList,(cn,Mn)=>(ln(),bn("div",{class:"shop-item",key:Mn,onClick:hn=>q(cn)},[Z(K,{loading:"lazy",src:cn.image},null,8,["src"]),g("div",Cv,Pn(cn.store_name),1),g("div",Rv,[vn(" ¥"),g("span",null,Pn(cn.price),1),g("span",Iv,"/"+Pn(cn.unit_name),1)]),cn.stock==0?(ln(),bn("div",Lv,bv)):Wr("",!0),cn.is_used==0?(ln(),bn("div",Tv,Pv)):Wr("",!0)],8,Sv))),128))]),_:1})):Wr("",!0),fn.storeList.length?Wr("",!0):(ln(),bn("div",Fv,[Z(X,{"image-size":200,description:"没有找到对应商品"})]))])),[[J,fn.loading],[Cn,C]])])}}},Wv=Ht(Bv,[["__scopeId","data-v-466f28c1"]]);function $v(fn){return Np.get("/store_product/storeProduct/lists",{params:fn})}const Uv={class:"shop"},Dv={class:"shop-info"},Mv={class:"shop-info-left"},Nv={class:"shop-info-right"},Gv={class:"shop-info-right-top"},Hv={class:"shop-info-right-price"},qv={style:{"font-size":"1rem",color:"#777"}},zv={class:"shop-sku"},kv={class:"title"},Kv={class:"sku"},Yv={class:"dialog-footer"},Zv={__name:"pupop",emits:["changeItem"],setup(fn,{expose:Sn,emit:o}){const L=O(!1),U=O(null),R=Q=>{L.value=Q},C=O({}),q=O(!1),gn=O("add"),mn=(Q,I="add")=>{gn.value=I,C.value=JSON.parse(JSON.stringify(Q))},k=o,rn=()=>{C.value.cart_num||(C.value.cart_num=1),k("changeItem",C.value),L.value=!1};Sn({show:R,setForm:mn});const Fn=()=>{L.value&&rn()};return pt(()=>{En.on("enter",Fn)}),vt(()=>{En.off("enter",Fn)}),(Q,I)=>{const en=on("el-image"),j=on("el-input-number"),An=on("el-button"),an=on("el-dialog"),P=Ur("loading");return ln(),dt(an,{modelValue:L.value,"onUpdate:modelValue":I[1]||(I[1]=K=>L.value=K),title:"购买数量",width:"650",onOpened:I[2]||(I[2]=K=>U.value.focus())},Gp({default:pn(()=>[cu((ln(),bn("div",Uv,[g("div",Dv,[g("div",Mv,[Z(en,{loading:"lazy",src:C.value.image},null,8,["src"])]),g("div",Nv,[g("div",Gv,Pn(C.value.store_name),1),g("div",Hv,[vn(" ¥"),g("span",null,Pn(C.value.price),1),g("span",qv," / "+Pn(C.value.unit_name),1)])])]),g("div",zv,[g("div",kv,"购买数量 ( "+Pn(C.value.unit_name)+" )",1),g("div",Kv,[Z(j,{ref_key:"inputRef",ref:U,modelValue:C.value.cart_num,"onUpdate:modelValue":I[0]||(I[0]=K=>C.value.cart_num=K),"step-strictly":"",placeholder:"请输入数量(默认为1)",min:0,step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue"])])])])),[[P,q.value]])]),_:2},[gn.value!="add"&&C.value.attr&&C.value.attr.length==1?void 0:{name:"footer",fn:pn(()=>[g("div",Yv,[Z(An,{class:"ok-btn",type:"primary",onClick:rn},{default:pn(()=>[vn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},Vv=Ht(Zv,[["__scopeId","data-v-c76c24e8"]]),gt=fn=>(Zo("data-v-b32416a8"),fn=fn(),Vo(),fn),Xv=gt(()=>g("h4",null,"选择支付方式",-1)),Jv={class:"dra-body"},Qv={class:"header"},jv=gt(()=>g("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),ng={style:{color:"#f5222d","padding-bottom":"2rem"}},eg={style:{"font-size":"1.6rem"}},tg={key:0,"element-loading-text":"支付中",class:"card1"},rg=gt(()=>g("div",{class:"tips"},null,-1)),ig={key:1,class:"card2"},ug={class:"drawer-body"},lg={class:"counter"},og={class:"received"},sg={key:0},fg={key:1,style:{"font-size":"1rem",color:"#999"}},ag={key:0,class:"balance"},cg={class:"money"},hg=gt(()=>g("div",{class:"tips"},"按回车(Enter)确认支付",-1)),_g={key:1,class:"balance"},dg=gt(()=>g("div",null,"不够找零, 请支付更多金额",-1)),pg=gt(()=>g("div",{class:"tips"},"按下小键盘输入金额",-1)),vg=[dg,pg],gg={class:"keypad"},mg={class:"left"},wg={class:"right"},xg={style:{width:"100%",display:"flex","justify-content":"center"}},yg={__name:"pay",emits:["paySuccess"],setup(fn,{expose:Sn,emit:o}){const L=O(!1),U=O(1),R=O(""),C=O("");su();const q=()=>{Mn()},gn=()=>{Oe(()=>{setTimeout(()=>{var M;hn.value=!1,R.value="",j.value=!0,(M=C.value)==null||M.focus(),mn(U.value)},300)})},mn=M=>{U.value=M,U.value==2?window.addEventListener("keydown",wt):(window.removeEventListener("keydown",wt),Oe(()=>{var W;R.value="",(W=C.value)==null||W.focus()}))},k=O({}),rn=O([]),Fn=O(!1),Q=M=>{k.value=M.data,rn.value=M.cart_id,Fn.value=M.isRePay||!1},I=M=>{k.value.total=M.price,E.value=M.order_id},en=o,j=O(!1),An=O(["1","2","3","4","5","6","7","8","9","0","00","."]);let an=0;const P=/^(10|11|12|13|14|15)\d{16}$/,K=/^(25|26|27|28|29|30)\d{14,22}$/,E=O(""),X=()=>{if(hn.value=!0,C.value.blur(),E.value)J(E.value);else{let M;if(P.test(R.value))M="9";else if(K.test(R.value))M="13";else return hn.value=!1,R.value="",C.value.focus(),Yn.error("请输入正确的支付码");let W={key:k.value.key,cart_id:rn.value,pay_type:M,auth_code:R.value};Fn.value&&(W={order_id:k.value.order_id,pay_type:M,auth_code:R.value}),ko(W).then(F=>{F.data.out_trade_no&&F.msg=="支付成功"?(L.value=!1,Yn({message:"支付成功",type:"success"}),Mn(F.data)):F.msg=="用户支付中"&&F.code==1&&(Yn.warning(F.msg),En.on("pay_success",Tn=>{Yn({message:"支付成功",type:"success"}),setTimeout(()=>{En.off("pay_success")},200),L.value=!1,Mn(Tn)}))}).catch(F=>{hn.value=!1,Oe(()=>{var Tn;(Tn=C.value)==null||Tn.focus()})})}},J=M=>{let W;if(U.value==1){let F;if(P.test(R.value))F="micropay";else if(K.test(R.value))F="alipayBar";else return hn.value=!1,R.value="",C.value.focus(),Yn.error("请输入正确的支付码");W={type:F,auth_code:R.value}}else W={type:"cash_payment"};$p(M,W).then(F=>{F.data.out_trade_no&&F.msg=="支付成功"?(L.value=!1,Yn({message:"支付成功",type:"success"}),Mn(F.data)):(E.value=F.data.group_order_id,Cn.value=0,an=0,cn(F.data.group_order_sn))}).catch(F=>{R.value="",hn.value=!1,Oe(()=>{var Tn;(Tn=C.value)==null||Tn.focus()})})},Cn=O(0),cn=M=>{M&&(Cn.value++,an+=5e3,Up({order_sn:M}).then(W=>{W.data.trade_state=="SUCCESS"?(Yn({message:W.message,type:"success"}),Mn()):(Yn({message:W.data.trade_state=="USERPAYING"?"用户正在支付中":W.message,type:"error"}),R.value="",hn.value=!1,Oe(()=>{var F;(F=C.value)==null||F.focus()}))}).catch(W=>{j.value&&Cn.value<3?setTimeout(()=>{cn(M)},15e3-an>0?15e3-an:0):(R.value="",hn.value=!1,Oe(()=>{var F;(F=C.value)==null||F.focus()}))}))},Mn=M=>{var W;window.removeEventListener("keydown",wt),j.value=!1,hn.value=!1,R.value="",Rn.value="",Zn.value=[],(W=C.value)==null||W.blur(),en("paySuccess",M),L.value=!1},hn=O(!1);Sn({drawer:L,setForm:Q,setRePay:I,beforeClose:Mn});const Zn=O([]),Rn=O(""),Pe=Hp(()=>+Rn.value>0?(Rn.value-k.value.total).toFixed(2):-1),qt=O(!1),mt=M=>{M===-1?Zn.value=[]:Zn.value.pop(),Rn.value=Zn.value.length?Zn.value.join(""):0},wn=M=>{qt.value===!1&&(Rn.value="",qt.value=!0);let W=String(Rn.value).indexOf(".")+1,F=String(Rn.value).length-W;console.log(W,F),(W===0||F<2)&&(Zn.value.join("")<=9999999&&Zn.value.push(M),Rn.value=Zn.value.join("")>99999999?99999999:Zn.value.join(""))},ae=()=>{if(Pe.value===""||Pe.value===null||Pe.value===void 0||+Rn.value<+k.value.total)return Yn.error("收款金额应该大于等于应收金额");E.value?J(E.value):ko({cart_id:rn.value,pay_type:"17"}).then(M=>{L.value=!1,Yn({message:M.msg,type:"success"}),mn(1),Mn()}).catch(M=>{hn.value=!1})},wt=M=>{let F=(M||window.event).keyCode;if(F==37)return mn(2);if(F==120)return En.emit("F9");if(F==27)return Mn();switch(M.stopPropagation(),M.preventDefault(),F){case 96:case 48:wn(0);break;case 97:case 49:wn(1);break;case 98:case 50:wn(2);break;case 99:case 51:wn(3);break;case 100:case 52:wn(4);break;case 101:case 53:wn(5);break;case 102:case 54:wn(6);break;case 103:case 55:wn(7);break;case 104:case 56:wn(8);break;case 105:case 57:wn(9);break;case 110:wn(".");break;case 190:wn(".");break;case 8:mt();break;case 13:ae();break}},xe=O(!1),Vn=()=>{if(!(!L.value||xe.value&&R.value.length>0)&&U.value==2)return mn(1)},zt=()=>{if(!(!L.value||xe.value&&R.value.length>0)&&U.value==1)return mn(2)};return pt(()=>{En.on("left",Vn),En.on("right",zt)}),vt(()=>{En.off("left",Vn),En.off("right",zt)}),(M,W)=>{const F=on("el-input"),Tn=on("el-button"),Mr=on("Delete"),He=on("el-icon"),qe=on("el-drawer"),Nr=Ur("loading");return ln(),dt(qe,{size:"60rem",modelValue:L.value,"onUpdate:modelValue":W[6]||(W[6]=Bn=>L.value=Bn),direction:"rtl",onOpen:gn,"before-close":Mn},{header:pn(()=>[Xv]),default:pn(()=>[g("div",Jv,[g("div",Qv,[g("div",{class:$r(["left",{active:U.value==1}]),onClick:W[0]||(W[0]=Bn=>mn(1))}," 微信/支付宝 ",2),g("div",{class:$r(["right",{active:U.value==2}]),onClick:W[1]||(W[1]=Bn=>mn(2))}," 现金收款 ",2)]),jv,g("div",ng,[vn(" ¥"),g("span",eg,Pn(k.value.pay_price),1)]),U.value==1?cu((ln(),bn("div",tg,[Z(F,{ref_key:"codeRef",ref:C,modelValue:R.value,"onUpdate:modelValue":W[2]||(W[2]=Bn=>R.value=Bn),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Yo(X,["enter"]),onFocus:W[3]||(W[3]=Bn=>xe.value=!0),onBlur:W[4]||(W[4]=Bn=>xe.value=!1)},null,8,["modelValue"]),rg])),[[Nr,hn.value]]):(ln(),bn("div",ig,[g("div",ug,[g("div",lg,[g("div",og,[Rn.value?(ln(),bn("span",sg,Pn(Rn.value),1)):(ln(),bn("span",fg,"按下键盘输入客户支付金额"))]),Pe.value>=0?(ln(),bn("div",ag,[g("div",null,[vn(" 需找零(元):"),g("span",cg,"¥"+Pn(Pe.value),1)]),hg])):(ln(),bn("div",_g,vg)),g("div",gg,[g("div",mg,[(ln(!0),bn(fu,null,au(An.value,Bn=>(ln(),dt(Tn,{key:Bn,onClick:xt=>wn(Bn)},{default:pn(()=>[vn(Pn(Bn),1)]),_:2},1032,["onClick"]))),128))]),g("div",wg,[Z(Tn,{onClick:mt},{default:pn(()=>[Z(He,null,{default:pn(()=>[Z(Mr)]),_:1})]),_:1}),Z(Tn,{onClick:W[5]||(W[5]=Bn=>mt(-1))},{default:pn(()=>[vn("C")]),_:1}),Z(Tn,{class:$r(["enter",{"enter-disable":+Rn.value<+k.value.total}]),disabled:+Rn.value<+k.value.total,onClick:ae},{default:pn(()=>[vn(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:pn(()=>[g("div",xg,[Z(Tn,{class:"cancel-btn",onClick:q},{default:pn(()=>[vn("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},Ag=Ht(yg,[["__scopeId","data-v-b32416a8"]]),Sg={class:"my-card"},bg={__name:"index",setup(fn){const Sn=O(null),o=O(null),L=O(null),U=O(null),R=O([]);su();const C=qp(),q=O({page_no:1,page_size:30}),gn=O(!1),mn=(E={},X=!1)=>{q.value={...q.value,...E},X&&(R.value=[],q.value.page_no=1,k.value=!1),gn.value=!0,$v(q.value).then(J=>{var Cn,cn;gn.value=!1,((cn=(Cn=J.data)==null?void 0:Cn.lists)==null?void 0:cn.length){k.value||mn(E)};function Fn(E){return/^\d+$/.test(E)}const Q=(E,X="")=>{console.log(E,X);let J={product_id:E.product_id,cart_num:E.cart_num};Ko(J).then(Cn=>{o.value.getList()})},I=(E,X)=>{Sn.value.setForm(E,"add"),Sn.value.show(!0)},en=E=>{Sn.value.setForm(E,"edit"),Sn.value.show(!0)},j=O({}),An=()=>{let E=o.value.list.map(J=>J.id),X={cart_id:E};o.value.discounts>0&&(X.deduction_price=o.value.discounts.toFixed(2),X.pay_type="micropay"),Dp(X).then(J=>{j.value=J.data.order,U.value.setForm({data:J.data.order,cart_id:E})})},an=()=>{An(),U.value.drawer=!0},P=(E=null)=>{setTimeout(()=>{o.value.getList()})},K=()=>{C.name=="saleHome"&&(!U.value.drawer&&o.value.list.length>0?an():U.value.beforeClose())};return pt(()=>{mn(),En.on("F9",K)}),vt(()=>{En.off("F9",K)}),(E,X)=>(ln(),bn("div",Sg,[Z(vv,{ref_key:"orderRef",ref:o,onGoPay:an,onEditPupop:en},null,512),Z(zp),Z(Wv,{ref_key:"shopRef",ref:L,style:{flex:"1"},storeList:R.value,loading:gn.value,onGetStoreList:mn,onChangeItem:I,onLoadMore:rn},null,8,["storeList","loading"]),Z(Vv,{ref_key:"pupopRef",ref:Sn,onChangeItem:Q},null,512),Z(Ag,{ref_key:"payRef",ref:U,onPaySuccess:P},null,512)]))}};export{bg as default}; diff --git a/build/assets/index-BR2NF8hh.js b/build/assets/index-ZpAsLQZK.js similarity index 96% rename from build/assets/index-BR2NF8hh.js rename to build/assets/index-ZpAsLQZK.js index 73a8a82..2ddb2be 100644 --- a/build/assets/index-BR2NF8hh.js +++ b/build/assets/index-ZpAsLQZK.js @@ -1 +1 @@ -import{_ as T,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 B,i as E,s as J,f as l,w as d,E as Y,m as D,y as j,z as W,o as q,a as G,l as L,d as b,x as w,v as N}from"./index-C2mUYWeU.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-DENp5ByU.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-REVqc2LB.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(B,null,E(h.value,(u,C)=>(s(),p("div",{class:J(["item",{"item-active":a.value.merchant_bank_id==u.id}]),key:C,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=T(be,[["__scopeId","data-v-e01d9d71"]]),ke={class:"my-order"},we={class:"date"},Ve={class:"detail"},xe={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},Ce={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"),C=m("el-radio-group"),c=m("el-table-column"),O=m("el-image"),x=m("el-tag"),M=m("el-table"),I=L("loading"),S=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,clearable:!1},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",clearable:!1},null,8,["modelValue"])):w("",!0),l(V,{type:"primary",style:{"margin-left":"1rem"}},{default:d(()=>[_("重置")]),_:1})]),l(C,{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",xe,[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(B,null,E(JSON.parse(n.arrival_proof),(F,A)=>(s(),b(O,{style:{width:"3rem",height:"3rem","margin-right":"0.2rem"},key:A,src:F,"preview-src-list":JSON.parse(n.arrival_proof),"initial-index":A},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(x,{key:0,type:"success"},{default:d(()=>[_("已到账")]),_:1})):n.is_check==1?(s(),b(x,{key:1,type:"primary"},{default:d(()=>[_("待转账")]),_:1})):n.is_check==0?(s(),b(x,{key:2,type:"info"},{default:d(()=>[_("待审核")]),_:1})):n.is_check==2?(s(),b(x,{key:3,type:"danger"},{default:d(()=>[_("提现失败")]),_:1})):w("",!0)]),_:1}),l(c,{prop:"create_time",label:"提现时间",width:"200"})]),_:1},8,["data"])])),[[I,e.value.loading],[S,f]]):w("",!0),r.value==2?N((s(),p("div",Ce,[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"])])),[[I,e.value.loading],[S,f]]):w("",!0)])])}}},ze=T(De,[["__scopeId","data-v-b27fe34a"]]),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 T,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 B,i as E,s as J,f as l,w as d,E as Y,m as D,y as j,z as W,o as q,a as G,l as L,d as b,x as w,v as N}from"./index-DhxPMYiX.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-BHd4lT9u.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-DwppsfEF.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(B,null,E(h.value,(u,C)=>(s(),p("div",{class:J(["item",{"item-active":a.value.merchant_bank_id==u.id}]),key:C,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=T(be,[["__scopeId","data-v-e01d9d71"]]),ke={class:"my-order"},we={class:"date"},Ve={class:"detail"},xe={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},Ce={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"),C=m("el-radio-group"),c=m("el-table-column"),O=m("el-image"),x=m("el-tag"),M=m("el-table"),I=L("loading"),S=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,clearable:!1},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",clearable:!1},null,8,["modelValue"])):w("",!0),l(V,{type:"primary",style:{"margin-left":"1rem"}},{default:d(()=>[_("重置")]),_:1})]),l(C,{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",xe,[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(B,null,E(JSON.parse(n.arrival_proof),(F,A)=>(s(),b(O,{style:{width:"3rem",height:"3rem","margin-right":"0.2rem"},key:A,src:F,"preview-src-list":JSON.parse(n.arrival_proof),"initial-index":A},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(x,{key:0,type:"success"},{default:d(()=>[_("已到账")]),_:1})):n.is_check==1?(s(),b(x,{key:1,type:"primary"},{default:d(()=>[_("待转账")]),_:1})):n.is_check==0?(s(),b(x,{key:2,type:"info"},{default:d(()=>[_("待审核")]),_:1})):n.is_check==2?(s(),b(x,{key:3,type:"danger"},{default:d(()=>[_("提现失败")]),_:1})):w("",!0)]),_:1}),l(c,{prop:"create_time",label:"提现时间",width:"200"})]),_:1},8,["data"])])),[[I,e.value.loading],[S,f]]):w("",!0),r.value==2?N((s(),p("div",Ce,[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"])])),[[I,e.value.loading],[S,f]]):w("",!0)])])}}},ze=T(De,[["__scopeId","data-v-b27fe34a"]]),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-CikQhzev.js b/build/assets/index-yjpgdUsb.js similarity index 79% rename from build/assets/index-CikQhzev.js rename to build/assets/index-yjpgdUsb.js index 8f8ae54..b91f809 100644 --- a/build/assets/index-CikQhzev.js +++ b/build/assets/index-yjpgdUsb.js @@ -1 +1 @@ -import{_ as T,u as G,r as a,b as m,l as K,c as s,h as o,e,f as _,w as x,g as C,p as H,v as g,F as U,i as A,x as c,m as R,E as j,s as F,t as l,d as q,y as J,z as P,G as X,o as Q,a as Y,n as M,H as O,I as Z}from"./index-C2mUYWeU.js";import{h as ee,g as te,w as se}from"./store-DGmfknqP.js";/* empty css */import{p as oe}from"./padding-REVqc2LB.js";const ie=r=>(J("data-v-74887828"),r=r(),P(),r),ae={class:"my-order"},ne={class:"header-nav"},le=ie(()=>e("div",{class:"nav-item"},"核销订单",-1)),de={class:"nav-item-clear"},ce={class:"header-input"},_e={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},re=["onClick"],ve={class:"top"},ue={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},he={key:0,class:"shop-name"},ye={class:"right"},me={class:"money"},ge={class:"count"},ke={class:"bottom"},$e={class:"pay"},be={key:0},we={key:0},xe={key:1},Ce={key:2},ze={key:3},Ie={key:4},Se={key:1,style:{color:"#ff4a00"}},Ve={key:0,class:"cashier"},Oe={key:1,class:"cashier",style:{color:"#ff4a00"}},Re={key:0,class:"load-end"},Be={key:1,class:"load-end"},De={__name:"order",emits:["backOne"],setup(r,{expose:t,emit:h}){G(),a([]),a(null);const n=a({verify_code:""}),p=a(!1),k=a(0),$=a(0),v=a(!1),u=a([]),y=(b=!1)=>{ee(n.value).then(d=>{u.value=[d.data],$.value=0,R.emit("set-sale-order-detail",u.value[0]),k.value=d.data.count,u.value[0].is_writeoff&&j.warning("订单已核销过")}).catch(d=>{})},w=(b,d)=>{$.value=d,R.emit("set-order-detail",b)},B=b=>{n.value.verify_code=b,y(!0)},D=h,E=()=>{D("backOne")};return t({setCode:B}),(b,d)=>{const z=m("el-button"),I=m("el-input"),S=m("el-image"),V=K("loading");return s(),o("div",ae,[e("div",ne,[le,e("div",de,[_(z,{type:"primary",size:"small",onClick:E},{default:x(()=>[C("返回上一页")]),_:1})])]),e("div",ce,[_(I,{modelValue:n.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=i=>n.value.verify_code=i),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=H(i=>y(!0),["enter"])),clearable:""},{append:x(()=>[_(z,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=i=>y(!0))},{default:x(()=>[C("搜索")]),_:1})]),_:1},8,["modelValue"])]),g((s(),o("div",_e,[(s(!0),o(U,null,A(u.value,(i,L)=>(s(),o("div",{class:F(["item",{"item-active":$.value==L}]),key:L,onClick:N=>w(i,L)},[e("div",ve,[e("div",{class:F(["sn","cahier"])},"单号: "+l(i.order_id),1),e("div",ue,l(i.pay_time),1)]),e("div",pe,[i.product?(s(),o("div",fe,[(s(!0),o(U,null,A(i.product.slice(0,5),(N,W)=>(s(),q(S,{key:W,src:N.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),i.product.length==1?(s(),o("div",he,l(i.product[0].store_name),1)):c("",!0)])):c("",!0),e("div",ye,[e("div",me,"¥"+l(i.pay_price),1),e("div",ge,"共"+l(i.total_num)+"款商品",1)])]),e("div",ke,[e("div",$e,[i.paid?(s(),o("div",be,[C(l(i.paid_name)+" ",1),i.pay_type==9?(s(),o("span",we,"(微信收款)")):c("",!0),i.pay_type==17?(s(),o("span",xe,"(现金支付)")):c("",!0),i.pay_type==13?(s(),o("span",Ce,"(支付宝收款)")):c("",!0),i.pay_type==3?(s(),o("span",ze,"(余额支付)")):c("",!0),i.pay_type==1?(s(),o("span",Ie,"(微信支付)")):c("",!0)])):(s(),o("div",Se,l(i.paid_name),1))]),i.is_writeoff==0?(s(),o("div",Ve,"核销码:"+l(i.verify_code),1)):(s(),o("div",Oe,"已核销:"+l(i.verify_code),1))])],10,re))),128)),v.value?(s(),o("div",Re,"没有更多了")):c("",!0),p.value?(s(),o("div",Be,"加载中...")):c("",!0)])),[[V,p.value]])])}}},Ee=T(De,[["__scopeId","data-v-74887828"]]),f=r=>(J("data-v-39b7d4a3"),r=r(),P(),r),Le={class:"my-order"},Ke={key:0,class:"detail"},Ne={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ue=f(()=>e("div",{class:"table-title"},"订单信息",-1)),Ae={class:"table-info"},Fe={class:"info-item"},Me=f(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Te={class:"info-item-info"},Ge={class:"info-item"},He=f(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),je={class:"info-item-info"},qe={class:"info-item"},Je=f(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Pe={class:"info-item-info"},Qe={class:"info-item"},We=f(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=f(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=f(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),ot={class:"info-item-info"},it={class:"info-item"},at=f(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),nt={class:"info-item-info"},lt={class:"info-item"},dt=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ct={class:"info-item-info"},_t={key:0},rt={key:1},vt={key:2},ut={key:3},pt={key:4},ft={style:{"font-size":"0.9rem"}},ht={style:{color:"#ff4a00"}},yt={style:{display:"flex","align-items":"center"}},mt={style:{"margin-left":"0.5rem"}},gt={class:"footer"},kt={key:1},$t={key:1},bt={__name:"detail",setup(r){G(),X();const t=a({id:""});a([]),a(null);const h=a(!1);a(0),a(0),a(["商品信息","订单详情"]),a(""),a(!1);const n=a({page_no:1,page_size:15,loadend:!1,loading:!1}),p=a([]),k=()=>{console.log("触底"),t.value.id&&!n.value.loadend&&(console.log("加载"),n.value.loading=!0,te({pid:t.value.id,page_no:n.value.page_no,page_size:n.value.page_size}).then(v=>{p.value=[...p.value,...v.data.lists],v.data.lists.length{se({verify_code:t.value.verify_code}).then(v=>{t.value.verify_code=1})};return Q(()=>{R.on("set-sale-order-detail",v=>{console.log("===",v),t.value=v,n.value.page_no=1,n.value.loadend=!1,n.value.loading=!1,p.value=[]})}),Y(()=>{R.off("set-sale-order-detail")}),(v,u)=>{var z;const y=m("el-image"),w=m("el-table-column"),B=m("el-table"),D=m("el-button"),E=m("el-empty"),b=K("infinite-scroll"),d=K("loading");return s(),o("div",Le,[t.value.id?g((s(),o("div",Ke,[g((s(),o("div",Ne,[Ue,e("div",Ae,[e("div",Fe,[Me,e("div",Te,l(t.value.order_id),1)]),e("div",Ge,[He,e("div",je,l(t.value.total_num||0),1)]),e("div",qe,[Je,e("div",Pe,"¥"+l(t.value.total_price),1)]),e("div",Qe,[We,e("div",Xe,l(t.value.pay_time),1)]),e("div",Ye,[Ze,e("div",et,"¥"+l(t.value.deduction_price),1)]),e("div",tt,[st,e("div",ot,"¥"+l(t.value.pay_price),1)]),e("div",it,[at,e("div",nt,l(t.value.pay_time),1)]),e("div",lt,[dt,e("div",ct,[t.value.pay_type==9?(s(),o("span",_t,"微信收款")):c("",!0),t.value.pay_type==17?(s(),o("span",rt,"现金支付")):c("",!0),t.value.pay_type==13?(s(),o("span",vt,"支付宝收款")):c("",!0),t.value.pay_type==3?(s(),o("span",ut,"余额支付")):c("",!0),t.value.pay_type==1?(s(),o("span",pt,"微信支付")):c("",!0)])])]),e("div",ft,[C(" 共计 "),e("span",ht,l(((z=t.value.product)==null?void 0:z.length)||" "),1),C(" 款商品 ")]),_(B,{data:t.value.product},{default:x(()=>[_(w,{label:"商品信息"},{default:x(({row:I})=>{var S,V;return[e("div",yt,[_(y,{style:{height:"3rem",width:"3rem"},src:(S=I.cart_info)==null?void 0:S.image},null,8,["src"]),e("span",mt,l((V=I.cart_info)==null?void 0:V.name),1)])]}),_:1}),_(w,{prop:"cart_info.price",label:"单价",width:"150"}),_(w,{prop:"cart_info.cart_num",label:"数量",width:"150"}),_(w,{prop:"cart_info.total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[b,k]]),e("div",gt,[t.value.is_writeoff==0?(s(),q(D,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:$},{default:x(()=>[C("立即核销")]),_:1},8,["disabled"])):(s(),o("div",kt,"该订单已核销"))])])),[[d,h.value]]):(s(),o("div",$t,[_(E,{description:"没找到核销订单信息"})]))])}}},wt=T(bt,[["__scopeId","data-v-39b7d4a3"]]),xt={class:"my-card"},Ct={class:"my-code"},zt=e("h2",null,"订单核销",-1),It={class:"box"},Bt={__name:"index",setup(r){const t=a(1),h=a(""),n=a(null),p=a(null),k=()=>{if(h.value=="")return j.error("请输入订单编号");t.value=2,M(()=>{p.value.setCode(h.value)})},$=()=>{k()};return Q(()=>{M(()=>{n.value.focus()})}),(v,u)=>(s(),o("div",xt,[g(e("div",Ct,[zt,e("div",It,[g(e("input",{ref_key:"inputRef",ref:n,"onUpdate:modelValue":u[0]||(u[0]=y=>h.value=y),placeholder:"",class:"input",onKeyup:H(k,["enter"])},null,544),[[Z,h.value]]),e("div",{class:"btn",onClick:k},"查询")])],512),[[O,t.value==1]]),g(_(Ee,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:p,onBackOne:u[1]||(u[1]=y=>t.value=1)},null,512),[[O,t.value==2]]),g(_(oe,null,null,512),[[O,t.value==2]]),g(_(wt,{ref:"detailRef",onReInit:$},null,512),[[O,t.value==2]])]))}};export{Bt as default}; +import{_ as T,u as H,r as a,b as m,l as K,c as s,h as o,e,f as _,w as x,g as C,p as j,v as g,F as U,i as A,x as c,m as R,E as q,s as F,t as l,d as G,y as J,z as P,D as X,o as Q,a as Y,n as M,H as O,I as Z}from"./index-DhxPMYiX.js";import{e as ee,d as te,w as se}from"./store-Bz99DLdk.js";/* empty css */import{p as oe}from"./padding-DwppsfEF.js";const ie=r=>(J("data-v-74887828"),r=r(),P(),r),ae={class:"my-order"},ne={class:"header-nav"},le=ie(()=>e("div",{class:"nav-item"},"核销订单",-1)),de={class:"nav-item-clear"},ce={class:"header-input"},_e={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},re=["onClick"],ve={class:"top"},ue={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},he={key:0,class:"shop-name"},ye={class:"right"},me={class:"money"},ge={class:"count"},ke={class:"bottom"},$e={class:"pay"},be={key:0},we={key:0},xe={key:1},Ce={key:2},ze={key:3},Ie={key:4},Se={key:1,style:{color:"#ff4a00"}},Ve={key:0,class:"cashier"},Oe={key:1,class:"cashier",style:{color:"#ff4a00"}},Re={key:0,class:"load-end"},De={key:1,class:"load-end"},Be={__name:"order",emits:["backOne"],setup(r,{expose:t,emit:h}){H(),a([]),a(null);const n=a({verify_code:""}),p=a(!1),k=a(0),$=a(0),v=a(!1),u=a([]),y=(b=!1)=>{ee(n.value).then(d=>{u.value=[d.data],$.value=0,R.emit("set-sale-order-detail",u.value[0]),k.value=d.data.count,u.value[0].is_writeoff&&q.warning("订单已核销过")}).catch(d=>{})},w=(b,d)=>{$.value=d,R.emit("set-order-detail",b)},D=b=>{n.value.verify_code=b,y(!0)},B=h,E=()=>{B("backOne")};return t({setCode:D}),(b,d)=>{const z=m("el-button"),I=m("el-input"),S=m("el-image"),V=K("loading");return s(),o("div",ae,[e("div",ne,[le,e("div",de,[_(z,{type:"primary",size:"small",onClick:E},{default:x(()=>[C("返回上一页")]),_:1})])]),e("div",ce,[_(I,{modelValue:n.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=i=>n.value.verify_code=i),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=j(i=>y(!0),["enter"])),clearable:""},{append:x(()=>[_(z,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=i=>y(!0))},{default:x(()=>[C("搜索")]),_:1})]),_:1},8,["modelValue"])]),g((s(),o("div",_e,[(s(!0),o(U,null,A(u.value,(i,L)=>(s(),o("div",{class:F(["item",{"item-active":$.value==L}]),key:L,onClick:N=>w(i,L)},[e("div",ve,[e("div",{class:F(["sn","cahier"])},"单号: "+l(i.order_id),1),e("div",ue,l(i.pay_time),1)]),e("div",pe,[i.product?(s(),o("div",fe,[(s(!0),o(U,null,A(i.product.slice(0,5),(N,W)=>(s(),G(S,{key:W,src:N.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),i.product.length==1?(s(),o("div",he,l(i.product[0].store_name),1)):c("",!0)])):c("",!0),e("div",ye,[e("div",me,"¥"+l(i.pay_price),1),e("div",ge,"共"+l(i.total_num)+"款商品",1)])]),e("div",ke,[e("div",$e,[i.paid?(s(),o("div",be,[C(l(i.paid_name)+" ",1),i.pay_type==9?(s(),o("span",we,"(微信收款)")):c("",!0),i.pay_type==17?(s(),o("span",xe,"(现金支付)")):c("",!0),i.pay_type==13?(s(),o("span",Ce,"(支付宝收款)")):c("",!0),i.pay_type==3?(s(),o("span",ze,"(余额支付)")):c("",!0),i.pay_type==1?(s(),o("span",Ie,"(微信支付)")):c("",!0)])):(s(),o("div",Se,l(i.paid_name),1))]),i.is_writeoff==0?(s(),o("div",Ve,"核销码:"+l(i.verify_code),1)):(s(),o("div",Oe,"已核销:"+l(i.verify_code),1))])],10,re))),128)),v.value?(s(),o("div",Re,"没有更多了")):c("",!0),p.value?(s(),o("div",De,"加载中...")):c("",!0)])),[[V,p.value]])])}}},Ee=T(Be,[["__scopeId","data-v-74887828"]]),f=r=>(J("data-v-39b7d4a3"),r=r(),P(),r),Le={class:"my-order"},Ke={key:0,class:"detail"},Ne={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ue=f(()=>e("div",{class:"table-title"},"订单信息",-1)),Ae={class:"table-info"},Fe={class:"info-item"},Me=f(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Te={class:"info-item-info"},He={class:"info-item"},je=f(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),qe={class:"info-item-info"},Ge={class:"info-item"},Je=f(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Pe={class:"info-item-info"},Qe={class:"info-item"},We=f(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=f(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=f(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),ot={class:"info-item-info"},it={class:"info-item"},at=f(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),nt={class:"info-item-info"},lt={class:"info-item"},dt=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ct={class:"info-item-info"},_t={key:0},rt={key:1},vt={key:2},ut={key:3},pt={key:4},ft={style:{"font-size":"0.9rem"}},ht={style:{color:"#ff4a00"}},yt={style:{display:"flex","align-items":"center"}},mt={style:{"margin-left":"0.5rem"}},gt={class:"footer"},kt={key:1},$t={key:1},bt={__name:"detail",setup(r){H(),X();const t=a({id:""});a([]),a(null);const h=a(!1);a(0),a(0),a(["商品信息","订单详情"]),a(""),a(!1);const n=a({page_no:1,page_size:15,loadend:!1,loading:!1}),p=a([]),k=()=>{console.log("触底"),t.value.id&&!n.value.loadend&&(console.log("加载"),n.value.loading=!0,te({pid:t.value.id,page_no:n.value.page_no,page_size:n.value.page_size}).then(v=>{p.value=[...p.value,...v.data.lists],v.data.lists.length{se({verify_code:t.value.verify_code}).then(v=>{t.value.verify_code=1})};return Q(()=>{R.on("set-sale-order-detail",v=>{console.log("===",v),t.value=v,n.value.page_no=1,n.value.loadend=!1,n.value.loading=!1,p.value=[]})}),Y(()=>{R.off("set-sale-order-detail")}),(v,u)=>{var z;const y=m("el-image"),w=m("el-table-column"),D=m("el-table"),B=m("el-button"),E=m("el-empty"),b=K("infinite-scroll"),d=K("loading");return s(),o("div",Le,[t.value.id?g((s(),o("div",Ke,[g((s(),o("div",Ne,[Ue,e("div",Ae,[e("div",Fe,[Me,e("div",Te,l(t.value.order_id),1)]),e("div",He,[je,e("div",qe,l(t.value.total_num||0),1)]),e("div",Ge,[Je,e("div",Pe,"¥"+l(t.value.total_price),1)]),e("div",Qe,[We,e("div",Xe,l(t.value.pay_time),1)]),e("div",Ye,[Ze,e("div",et,"¥"+l(t.value.deduction_price),1)]),e("div",tt,[st,e("div",ot,"¥"+l(t.value.pay_price),1)]),e("div",it,[at,e("div",nt,l(t.value.pay_time),1)]),e("div",lt,[dt,e("div",ct,[t.value.pay_type==9?(s(),o("span",_t,"微信收款")):c("",!0),t.value.pay_type==17?(s(),o("span",rt,"现金支付")):c("",!0),t.value.pay_type==13?(s(),o("span",vt,"支付宝收款")):c("",!0),t.value.pay_type==3?(s(),o("span",ut,"余额支付")):c("",!0),t.value.pay_type==1?(s(),o("span",pt,"微信支付")):c("",!0)])])]),e("div",ft,[C(" 共计 "),e("span",ht,l(((z=t.value.product)==null?void 0:z.length)||" "),1),C(" 款商品 ")]),_(D,{data:t.value.product},{default:x(()=>[_(w,{label:"商品信息"},{default:x(({row:I})=>{var S,V;return[e("div",yt,[_(y,{style:{height:"3rem",width:"3rem"},src:(S=I.cart_info)==null?void 0:S.image},null,8,["src"]),e("span",mt,l((V=I.cart_info)==null?void 0:V.name),1)])]}),_:1}),_(w,{prop:"cart_info.price",label:"单价",width:"150"}),_(w,{prop:"cart_info.cart_num",label:"数量",width:"150"}),_(w,{prop:"cart_info.total",label:"总价",width:"150"})]),_:1},8,["data"])])),[[b,k]]),e("div",gt,[t.value.is_writeoff==0?(s(),G(B,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:$},{default:x(()=>[C("立即核销")]),_:1},8,["disabled"])):(s(),o("div",kt,"该订单已核销"))])])),[[d,h.value]]):(s(),o("div",$t,[_(E,{description:"没找到核销订单信息"})]))])}}},wt=T(bt,[["__scopeId","data-v-39b7d4a3"]]),xt={class:"my-card"},Ct={class:"my-code"},zt=e("h2",null,"订单核销",-1),It={class:"box"},Dt={__name:"index",setup(r){const t=a(1),h=a(""),n=a(null),p=a(null),k=()=>{if(h.value=="")return q.error("请输入订单编号");t.value=2,M(()=>{p.value.setCode(h.value)})},$=()=>{k()};return Q(()=>{M(()=>{n.value.focus()})}),(v,u)=>(s(),o("div",xt,[g(e("div",Ct,[zt,e("div",It,[g(e("input",{ref_key:"inputRef",ref:n,"onUpdate:modelValue":u[0]||(u[0]=y=>h.value=y),placeholder:"",class:"input",onKeyup:j(k,["enter"])},null,544),[[Z,h.value]]),e("div",{class:"btn",onClick:k},"查询")])],512),[[O,t.value==1]]),g(_(Ee,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:p,onBackOne:u[1]||(u[1]=y=>t.value=1)},null,512),[[O,t.value==2]]),g(_(oe,null,null,512),[[O,t.value==2]]),g(_(wt,{ref:"detailRef",onReInit:$},null,512),[[O,t.value==2]])]))}};export{Dt as default}; diff --git a/build/assets/indexCount-D_5H6yy_.js b/build/assets/indexCount-CbvLx3AP.js similarity index 86% rename from build/assets/indexCount-D_5H6yy_.js rename to build/assets/indexCount-CbvLx3AP.js index f7dd129..8dc829e 100644 --- a/build/assets/indexCount-D_5H6yy_.js +++ b/build/assets/indexCount-CbvLx3AP.js @@ -1 +1 @@ -import{f as i}from"./merchant-DENp5ByU.js";import{_ as d,r as a,b as s,l as p,v as m,c as u,h,e as v,f as e,w as f}from"./index-C2mUYWeU.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(l=>{o.value=l.data.lists})})(),(l,B)=>{const t=s("el-table-column"),c=s("el-table"),_=p("loading");return m((u(),h("div",b,[v("div",g,[e(c,{data:o.value,style:{width:"100%"}},{default:f(()=>[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-BHd4lT9u.js";import{_ as d,r as a,b as s,l as p,v as m,c as u,h,e as v,f as e,w as f}from"./index-DhxPMYiX.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(l=>{o.value=l.data.lists})})(),(l,B)=>{const t=s("el-table-column"),c=s("el-table"),_=p("loading");return m((u(),h("div",b,[v("div",g,[e(c,{data:o.value,style:{width:"100%"}},{default:f(()=>[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-DENp5ByU.js b/build/assets/merchant-BHd4lT9u.js similarity index 87% rename from build/assets/merchant-DENp5ByU.js rename to build/assets/merchant-BHd4lT9u.js index 926b969..0a2daef 100644 --- a/build/assets/merchant-DENp5ByU.js +++ b/build/assets/merchant-BHd4lT9u.js @@ -1 +1 @@ -import{A as a}from"./index-C2mUYWeU.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{A as a}from"./index-DhxPMYiX.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-REVqc2LB.js b/build/assets/padding-DwppsfEF.js similarity index 65% rename from build/assets/padding-REVqc2LB.js rename to build/assets/padding-DwppsfEF.js index d6fd05f..83f870e 100644 --- a/build/assets/padding-REVqc2LB.js +++ b/build/assets/padding-DwppsfEF.js @@ -1 +1 @@ -import{_ as e,c as t,h as c}from"./index-C2mUYWeU.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-DhxPMYiX.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/pay-BHLYNBxQ.js b/build/assets/pay-BHLYNBxQ.js new file mode 100644 index 0000000..d3109ba --- /dev/null +++ b/build/assets/pay-BHLYNBxQ.js @@ -0,0 +1 @@ +import{_ as ce,r as o,u as ue,G as ie,o as re,m,a as de,b as E,l as ve,c as h,d as G,w as k,e as s,s as z,g as x,t as F,v as fe,h as w,f as C,p as _e,F as pe,i as ye,n as B,E as r,y as me,z as he}from"./index-DhxPMYiX.js";import{f as W,g as ke}from"./store-Bz99DLdk.js";/* empty css */const S=P=>(me("data-v-cd8f0f21"),P=P(),he(),P),ge=S(()=>s("h4",null,"选择支付方式",-1)),be={class:"dra-body"},we={class:"header"},Ce=S(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),xe={style:{color:"#f5222d","padding-bottom":"2rem"}},Se={style:{"font-size":"1.6rem"}},Ve={key:0,"element-loading-text":"支付中",class:"card1"},Ee=S(()=>s("div",{class:"tips"},null,-1)),Pe={key:1,class:"card2"},$e={class:"drawer-body"},Fe={class:"counter"},Be={class:"received"},De={key:0},Le={key:1,style:{"font-size":"1rem",color:"#999"}},Te={key:0,class:"balance"},je={class:"money"},ze=S(()=>s("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Re={key:1,class:"balance"},Ae=S(()=>s("div",null,"不够找零, 请支付更多金额",-1)),Ie=S(()=>s("div",{class:"tips"},"按下小键盘输入金额",-1)),Ne=[Ae,Ie],Ue={class:"keypad"},Ke={class:"left"},Me={class:"right"},Oe={style:{width:"100%",display:"flex","justify-content":"center"}},Ge={__name:"pay",emits:["paySuccess"],setup(P,{expose:q,emit:H}){const i=o(!1),d=o(1),l=o(""),v=o("");ue();const J=()=>{_()},Q=()=>{B(()=>{setTimeout(()=>{var a;p.value=!1,l.value="",R.value=!0,(a=v.value)==null||a.focus(),g(d.value)},300)})},g=a=>{d.value=a,d.value==2?window.addEventListener("keydown",j):(window.removeEventListener("keydown",j),B(()=>{var e;l.value="",(e=v.value)==null||e.focus()}))},f=o({}),D=o([]),L=o(!1),X=a=>{f.value=a.data,D.value=a.cart_id,L.value=a.isRePay||!1},Y=a=>{f.value.total=a.price,ae.value=a.order_id},Z=H,R=o(!1),ee=o(["1","2","3","4","5","6","7","8","9","0","00","."]),A=/^(10|11|12|13|14|15)\d{16}$/,I=/^(25|26|27|28|29|30)\d{14,22}$/,ae=o(""),se=()=>{if(p.value=!0,v.value.blur(),L.value)N();else{let a;if(A.test(l.value))a="9";else if(I.test(l.value))a="13";else return p.value=!1,l.value="",v.value.focus(),r.error("请输入正确的支付码");W({key:f.value.key,cart_id:D.value,pay_type:a,auth_code:l.value}).then(e=>{e.data.out_trade_no&&e.msg=="支付成功"?(i.value=!1,r({message:"支付成功",type:"success"}),_(e.data)):e.msg=="用户支付中"&&e.code==1&&(r.warning(e.msg),m.on("pay_success",t=>{r({message:"支付成功",type:"success"}),setTimeout(()=>{m.off("pay_success")},200),i.value=!1,_(t)}))}).catch(e=>{p.value=!1,B(()=>{var t;(t=v.value)==null||t.focus()})})}},N=()=>{let a=17;if(d.value==1)if(A.test(l.value))a="9";else if(I.test(l.value))a="13";else return p.value=!1,l.value="",v.value.focus(),r.error("请输入正确的支付码");ke({order_id:f.value.order_id,pay_type:a,auth_code:l.value}).then(e=>{var t;(t=e.msg)!=null&&t.includes("成功")?(i.value=!1,r({message:"支付成功",type:"success"}),_()):e.msg=="用户支付中"&&e.code==1&&(r.warning(e.msg),m.on("pay_success",b=>{r({message:"支付成功",type:"success"}),setTimeout(()=>{m.off("pay_success")},200),i.value=!1,_(b)}))}).catch(e=>{l.value="",p.value=!1,B(()=>{var t;(t=v.value)==null||t.focus()})})};o(0);const _=a=>{var e;window.removeEventListener("keydown",j),R.value=!1,p.value=!1,l.value="",n.value="",y.value=[],(e=v.value)==null||e.blur(),Z("paySuccess",a),i.value=!1},p=o(!1);q({drawer:i,setForm:X,setRePay:Y,beforeClose:_});const y=o([]),n=o(""),V=ie(()=>+n.value>0?(n.value-f.value.total).toFixed(2):-1),U=o(!1),T=a=>{a===-1?y.value=[]:y.value.pop(),n.value=y.value.length?y.value.join(""):0},c=a=>{U.value===!1&&(n.value="",U.value=!0);let e=String(n.value).indexOf(".")+1,t=String(n.value).length-e;console.log(e,t),(e===0||t<2)&&(y.value.join("")<=9999999&&y.value.push(a),n.value=y.value.join("")>99999999?99999999:y.value.join(""))},K=()=>{if(V.value===""||V.value===null||V.value===void 0||+n.value<+f.value.total)return r.error("收款金额应该大于等于应收金额");L.value?N():W({cart_id:D.value,pay_type:"17"}).then(a=>{i.value=!1,r({message:a.msg,type:"success"}),g(1),_()}).catch(a=>{p.value=!1})},j=a=>{let t=(a||window.event).keyCode;if(t==37)return g(2);if(t==120)return m.emit("F9");if(t==27)return _();switch(a.stopPropagation(),a.preventDefault(),t){case 96:case 48:c(0);break;case 97:case 49:c(1);break;case 98:case 50:c(2);break;case 99:case 51:c(3);break;case 100:case 52:c(4);break;case 101:case 53:c(5);break;case 102:case 54:c(6);break;case 103:case 55:c(7);break;case 104:case 56:c(8);break;case 105:case 57:c(9);break;case 110:c(".");break;case 190:c(".");break;case 8:T();break;case 13:K();break}},$=o(!1),M=()=>{if(!(!i.value||$.value&&l.value.length>0)&&d.value==2)return g(1)},O=()=>{if(!(!i.value||$.value&&l.value.length>0)&&d.value==1)return g(2)};return re(()=>{m.on("left",M),m.on("right",O)}),de(()=>{m.off("left",M),m.off("right",O)}),(a,e)=>{const t=E("el-input"),b=E("el-button"),te=E("Delete"),le=E("el-icon"),oe=E("el-drawer"),ne=ve("loading");return h(),G(oe,{size:"60rem",modelValue:i.value,"onUpdate:modelValue":e[6]||(e[6]=u=>i.value=u),direction:"rtl",onOpen:Q,"before-close":_},{header:k(()=>[ge]),default:k(()=>[s("div",be,[s("div",we,[s("div",{class:z(["left",{active:d.value==1}]),onClick:e[0]||(e[0]=u=>g(1))}," 微信/支付宝 ",2),s("div",{class:z(["right",{active:d.value==2}]),onClick:e[1]||(e[1]=u=>g(2))}," 现金收款 ",2)]),Ce,s("div",xe,[x(" ¥"),s("span",Se,F(f.value.pay_price),1)]),d.value==1?fe((h(),w("div",Ve,[C(t,{ref_key:"codeRef",ref:v,modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=u=>l.value=u),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:_e(se,["enter"]),onFocus:e[3]||(e[3]=u=>$.value=!0),onBlur:e[4]||(e[4]=u=>$.value=!1)},null,8,["modelValue"]),Ee])),[[ne,p.value]]):(h(),w("div",Pe,[s("div",$e,[s("div",Fe,[s("div",Be,[n.value?(h(),w("span",De,F(n.value),1)):(h(),w("span",Le,"按下键盘输入客户支付金额"))]),V.value>=0?(h(),w("div",Te,[s("div",null,[x(" 需找零(元):"),s("span",je,"¥"+F(V.value),1)]),ze])):(h(),w("div",Re,Ne)),s("div",Ue,[s("div",Ke,[(h(!0),w(pe,null,ye(ee.value,u=>(h(),G(b,{key:u,onClick:We=>c(u)},{default:k(()=>[x(F(u),1)]),_:2},1032,["onClick"]))),128))]),s("div",Me,[C(b,{onClick:T},{default:k(()=>[C(le,null,{default:k(()=>[C(te)]),_:1})]),_:1}),C(b,{onClick:e[5]||(e[5]=u=>T(-1))},{default:k(()=>[x("C")]),_:1}),C(b,{class:z(["enter",{"enter-disable":+n.value<+f.value.total}]),disabled:+n.value<+f.value.total,onClick:K},{default:k(()=>[x(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:k(()=>[s("div",Oe,[C(b,{class:"cancel-btn",onClick:J},{default:k(()=>[x("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},Qe=ce(Ge,[["__scopeId","data-v-cd8f0f21"]]);export{Qe as p}; diff --git a/build/assets/pay-Da9QS55L.css b/build/assets/pay-Da9QS55L.css new file mode 100644 index 0000000..7e83369 --- /dev/null +++ b/build/assets/pay-Da9QS55L.css @@ -0,0 +1 @@ +.dra-body[data-v-cd8f0f21]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-cd8f0f21]{width:25rem;display:flex}.dra-body .header>div[data-v-cd8f0f21]{flex:1;border:.0625rem solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-cd8f0f21]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-cd8f0f21]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-cd8f0f21]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-cd8f0f21]{width:100%;height:3rem}.dra-body .card1 .tips[data-v-cd8f0f21]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.cancel-btn[data-v-cd8f0f21]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-cd8f0f21]{width:100%;overflow-x:hidden}.counter[data-v-cd8f0f21]{padding:1.25rem;border-radius:1.25rem;background-color:#f3f9ff}.counter .received[data-v-cd8f0f21]{height:3rem;padding:0 1.25rem;border:.0625rem solid #1890ff;box-shadow:0 0 .18rem #1890ff;border-radius:.5rem;background-color:#fff;font-size:1.62rem;line-height:3rem;color:#333}.counter .balance[data-v-cd8f0f21]{width:100%;box-sizing:border-box;padding:1.12rem 0 1.12rem .625rem;text-align:start;font-size:.95rem;color:#303133;display:flex;justify-content:space-between}.counter .balance .money[data-v-cd8f0f21]{color:#ff4a00}.counter .balance .tips[data-v-cd8f0f21]{font-size:.8rem;color:#999}.counter .keypad[data-v-cd8f0f21]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:.625rem}.counter .keypad .left[data-v-cd8f0f21]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:.625rem}.counter .keypad .right[data-v-cd8f0f21]{display:grid;grid-template-columns:auto;grid-gap:.625rem}.counter .keypad .el-button[data-v-cd8f0f21]{height:3.875rem;width:8.125rem;margin:0!important;border:0;border-radius:.5rem;font-weight:500;font-size:1.75rem!important;line-height:3.87rem;color:#1890ff}.counter .keypad .el-button[data-v-cd8f0f21]:focus{box-shadow:none}.counter .keypad .enter[data-v-cd8f0f21]{grid-row-end:span 4;height:8.37rem;line-height:8.37rem;background-color:#1890ff;font-weight:500;font-size:1.35rem!important;color:#fff;position:relative}.counter .keypad .enter-disable[data-v-cd8f0f21]{background-color:#ccc} diff --git a/build/assets/pay-ptXuJ7-o.css b/build/assets/pay-ptXuJ7-o.css deleted file mode 100644 index e03d970..0000000 --- a/build/assets/pay-ptXuJ7-o.css +++ /dev/null @@ -1 +0,0 @@ -.dra-body[data-v-b32416a8]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-b32416a8]{width:25rem;display:flex}.dra-body .header>div[data-v-b32416a8]{flex:1;border:.0625rem solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-b32416a8]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-b32416a8]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-b32416a8]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-b32416a8]{width:100%;height:3rem}.dra-body .card1 .tips[data-v-b32416a8]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.cancel-btn[data-v-b32416a8]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-b32416a8]{width:100%;overflow-x:hidden}.counter[data-v-b32416a8]{padding:1.25rem;border-radius:1.25rem;background-color:#f3f9ff}.counter .received[data-v-b32416a8]{height:3rem;padding:0 1.25rem;border:.0625rem solid #1890ff;box-shadow:0 0 .18rem #1890ff;border-radius:.5rem;background-color:#fff;font-size:1.62rem;line-height:3rem;color:#333}.counter .balance[data-v-b32416a8]{width:100%;box-sizing:border-box;padding:1.12rem 0 1.12rem .625rem;text-align:start;font-size:.95rem;color:#303133;display:flex;justify-content:space-between}.counter .balance .money[data-v-b32416a8]{color:#ff4a00}.counter .balance .tips[data-v-b32416a8]{font-size:.8rem;color:#999}.counter .keypad[data-v-b32416a8]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:.625rem}.counter .keypad .left[data-v-b32416a8]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:.625rem}.counter .keypad .right[data-v-b32416a8]{display:grid;grid-template-columns:auto;grid-gap:.625rem}.counter .keypad .el-button[data-v-b32416a8]{height:3.875rem;width:8.125rem;margin:0!important;border:0;border-radius:.5rem;font-weight:500;font-size:1.75rem!important;line-height:3.87rem;color:#1890ff}.counter .keypad .el-button[data-v-b32416a8]:focus{box-shadow:none}.counter .keypad .enter[data-v-b32416a8]{grid-row-end:span 4;height:8.37rem;line-height:8.37rem;background-color:#1890ff;font-weight:500;font-size:1.35rem!important;color:#fff;position:relative}.counter .keypad .enter-disable[data-v-b32416a8]{background-color:#ccc} diff --git a/build/assets/store-Bz99DLdk.js b/build/assets/store-Bz99DLdk.js new file mode 100644 index 0000000..4148888 --- /dev/null +++ b/build/assets/store-Bz99DLdk.js @@ -0,0 +1 @@ +import{A as e}from"./index-DhxPMYiX.js";function s(r){return e.post("/cart/cart/create",r)}function a(r){return e.get("/cart/cart/list",{params:r})}function o(r){return e.post("/store_order/StoreOrder/checkOrder",r)}function i(r){return e.post("/cart/cart/delete",r)}function n(r){return e.post("/store_order/StoreOrder/createOrder",r)}function c(r){return e.post("/store_order/StoreOrder/pay",r)}function d(r){return e.get("/store_order/StoreOrder/lists",{params:r})}function u(r){return e.get("/order/cashierinfo/lists",{params:r})}function p(r){return e.get("/store_order/storeOrder/detail",{params:r})}function f(r){return e.post("/store_order/StoreOrder/writeoff_order",r)}function O(r){return e.post("/user/address/merchant_create",r)}function A(r){return e.get("/order/OpurchaseOrder/lists",{params:r})}function h(r){return e.get("/order/OpurchaseOrder/sub_orders",{params:r})}export{a,s as b,i as c,u as d,p as e,n as f,c as g,A as h,h as i,O as m,o,d as s,f as w}; diff --git a/build/assets/store-DGmfknqP.js b/build/assets/store-DGmfknqP.js deleted file mode 100644 index 18a669b..0000000 --- a/build/assets/store-DGmfknqP.js +++ /dev/null @@ -1 +0,0 @@ -import{A as e}from"./index-C2mUYWeU.js";function a(r){return e.post("/cart/cart/create",r)}function o(r){return e.get("/cart/cart/list",{params:r})}function i(r){return e.post("/store_order/StoreOrder/checkOrder",r)}function n(r){return e.post("/cart/cart/delete",r)}function c(r){return e.post("/store_order/StoreOrder/createOrder",r)}function u(r,t){return e.post(`order/pay/${r}`,t)}function p(r){return e.get("micropay_query",{params:r})}function d(r){return e.get("/store_order/StoreOrder/lists",{params:r})}function f(r){return e.get("/order/cashierinfo/lists",{params:r})}function A(r){return e.get("/store_order/storeOrder/detail",{params:r})}function O(r){return e.post("/store_order/StoreOrder/writeoff_order",r)}function m(r){return e.post("/user/address/merchant_create",r)}function h(r){return e.get("/order/OpurchaseOrder/lists",{params:r})}function l(r){return e.get("/order/OpurchaseOrder/sub_orders",{params:r})}export{o as a,a as b,n as c,u as d,p as e,i as f,f as g,A as h,h as i,l as j,m,c as o,d as s,O as w}; diff --git a/build/assets/test-CJB7J_yF.js b/build/assets/test-CHguiNij.js similarity index 99% rename from build/assets/test-CJB7J_yF.js rename to build/assets/test-CHguiNij.js index 7d402a5..53903ca 100644 --- a/build/assets/test-CJB7J_yF.js +++ b/build/assets/test-CHguiNij.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-C2mUYWeU.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-DhxPMYiX.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 b6dd8ca..27b4cb7 100644 --- a/build/index.html +++ b/build/index.html @@ -56,7 +56,7 @@ } } - + diff --git a/src/components/pay.vue b/src/components/pay.vue index b400027..0c07cb4 100644 --- a/src/components/pay.vue +++ b/src/components/pay.vue @@ -141,8 +141,8 @@ const handleEnter = () => { const orderPay = () => { let query; - let pay_type=17; - if(active.value==1){ + let pay_type = 17; + if (active.value == 1) { if (regexWechat.test(input.value)) pay_type = "9"; // 微信 else if (regexPay.test(input.value)) pay_type = "13"; // 支付宝 else { @@ -157,21 +157,31 @@ const orderPay = () => { pay_type: pay_type, auth_code: input.value }).then((res) => { - if (res.data.out_trade_no && res.msg == "支付成功") { - drawer.value = false; - ElMessage({ - message: "支付成功", - type: "success", + if (res.msg?.includes('成功')) { + drawer.value = false; + ElMessage({ + message: "支付成功", + type: "success", + }); + // if(res.data.message) audioplay(res.data.message); + beforeClose(); + } else { + if (res.msg == "用户支付中" && res.code == 1) { + ElMessage.warning(res.msg); + mitt.on("pay_success", (e) => { + ElMessage({ + message: "支付成功", + type: "success", + }); + setTimeout(() => { + mitt.off("pay_success"); + }, 200); + drawer.value = false; + beforeClose(e); }); - // if(res.data.message) audioplay(res.data.message); - beforeClose(res.data); - } else { - order_id.value = res.data.group_order_id; - count.value = 0; - timecount = 0; - getOrderStatus(res.data.group_order_sn); } - }) + } + }) .catch((err) => { input.value = ""; loading.value = false; diff --git a/src/views/saleOrder/component/detail.vue b/src/views/saleOrder/component/detail.vue index c181d5e..876995d 100644 --- a/src/views/saleOrder/component/detail.vue +++ b/src/views/saleOrder/component/detail.vue @@ -120,6 +120,7 @@ const getDetail = () => { }) } +const emit = defineEmits(['rePaySuccess']) const paySuccess = (data = null) => { // data = { // out_trade_no: "PF171568087790938356", //单号 @@ -128,9 +129,10 @@ const paySuccess = (data = null) => { // transaction_id: "4200002159202405159003084211", //支付单号 // } // if(data) onPrint(data); -// setTimeout(()=>{ -// orderRef.value.getList(); -// }) + setTimeout(()=>{ + emit('rePaySuccess'); + }) + }; onMounted(() => { diff --git a/src/views/saleOrder/component/order.vue b/src/views/saleOrder/component/order.vue index 76ee4e6..c9b26e2 100644 --- a/src/views/saleOrder/component/order.vue +++ b/src/views/saleOrder/component/order.vue @@ -93,6 +93,10 @@ const setForm = (item, index) => { mitt.emit("set-sale-order-detail", item); }; +defineExpose({ + getOrderList +}) + onMounted(() => { mitt.on("update-sale-order-detail", (item) => { console.log("==="); diff --git a/src/views/saleOrder/index.vue b/src/views/saleOrder/index.vue index be5e477..f4f9fff 100644 --- a/src/views/saleOrder/index.vue +++ b/src/views/saleOrder/index.vue @@ -4,14 +4,17 @@ import detail from "./component/detail.vue"; import padding from "@/components/padding.vue"; import { ref, nextTick } from "vue"; - +const orderRef = ref(null); +const rePaySuccess = ()=>{ + orderRef.value?.getOrderList(true); +}