From e135f6f7b993e050deebe8710222546792577af0 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 21 Jun 2024 14:12:06 +0800 Subject: [PATCH] 1 --- dist/assets/{index-bGNkp3cp.js => index-AigTEg-K.js} | 2 +- dist/assets/{index-LUACW_g6.js => index-BKPqUHgE.js} | 4 ++-- dist/assets/{index-DudCf6-k.js => index-BWXGAaVp.js} | 2 +- dist/assets/{index-ITkwvMbx.js => index-Bi9cdaPf.js} | 2 +- dist/assets/{index-CfQognqk.js => index-BpB5Dek6.js} | 2 +- dist/assets/{index-2bhZOhkw.js => index-C6GhMFOL.js} | 2 +- .../{index-DN94OQSE.css => index-DRMzXjlL.css} | 2 +- dist/assets/{index-LBcC04nt.js => index-DReoLnR3.js} | 2 +- dist/assets/{index-C4rRmnc5.js => index-DcwaEiyg.js} | 4 ++-- dist/assets/{index-Gw_Btmsl.js => index-gCozjTdR.js} | 2 +- dist/assets/{index-B4Rz5OQ5.js => index-vqIWFzd_.js} | 2 +- ...indexCount-B_u3I-N7.js => indexCount-BMHe5nNi.js} | 2 +- .../{merchant--Irsjol6.js => merchant-C7inwBZD.js} | 2 +- .../{padding-BA_o-z8h.js => padding-CG_WCVSK.js} | 2 +- dist/assets/{pay-D6lAYrB4.js => pay-CEy1hIkd.js} | 2 +- dist/assets/{shop-Bs3DGR4g.js => shop-CBW6q5xA.js} | 2 +- dist/assets/{store-BxeA20BY.js => store-85zRAkSB.js} | 2 +- dist/assets/{test-CuqgpxdP.js => test-CheG7YBE.js} | 2 +- dist/assets/{user-UEbWTjyf.js => user-CnK8Y4fd.js} | 2 +- dist/index.html | 2 +- src/views/saleHome/component/shop.vue | 12 ++++++------ 21 files changed, 28 insertions(+), 28 deletions(-) rename dist/assets/{index-bGNkp3cp.js => index-AigTEg-K.js} (98%) rename dist/assets/{index-LUACW_g6.js => index-BKPqUHgE.js} (92%) rename dist/assets/{index-DudCf6-k.js => index-BWXGAaVp.js} (98%) rename dist/assets/{index-ITkwvMbx.js => index-Bi9cdaPf.js} (94%) rename dist/assets/{index-CfQognqk.js => index-BpB5Dek6.js} (98%) rename dist/assets/{index-2bhZOhkw.js => index-C6GhMFOL.js} (96%) rename dist/assets/{index-DN94OQSE.css => index-DRMzXjlL.css} (54%) rename dist/assets/{index-LBcC04nt.js => index-DReoLnR3.js} (96%) rename dist/assets/{index-C4rRmnc5.js => index-DcwaEiyg.js} (99%) rename dist/assets/{index-Gw_Btmsl.js => index-gCozjTdR.js} (84%) rename dist/assets/{index-B4Rz5OQ5.js => index-vqIWFzd_.js} (98%) rename dist/assets/{indexCount-B_u3I-N7.js => indexCount-BMHe5nNi.js} (86%) rename dist/assets/{merchant--Irsjol6.js => merchant-C7inwBZD.js} (87%) rename dist/assets/{padding-BA_o-z8h.js => padding-CG_WCVSK.js} (65%) rename dist/assets/{pay-D6lAYrB4.js => pay-CEy1hIkd.js} (98%) rename dist/assets/{shop-Bs3DGR4g.js => shop-CBW6q5xA.js} (82%) rename dist/assets/{store-BxeA20BY.js => store-85zRAkSB.js} (93%) rename dist/assets/{test-CuqgpxdP.js => test-CheG7YBE.js} (99%) rename dist/assets/{user-UEbWTjyf.js => user-CnK8Y4fd.js} (91%) diff --git a/dist/assets/index-bGNkp3cp.js b/dist/assets/index-AigTEg-K.js similarity index 98% rename from dist/assets/index-bGNkp3cp.js rename to dist/assets/index-AigTEg-K.js index ddf7224..8993a9e 100644 --- a/dist/assets/index-bGNkp3cp.js +++ b/dist/assets/index-AigTEg-K.js @@ -1 +1 @@ -import{_ as q,u as H,r as n,b as f,h as E,c as s,k as o,e,t as l,f as r,w as h,g as b,i as W,j as $,F as P,l as T,p as u,m as x,E as U,z as j,d as F,C as X,o as G,a as Y,q as Z,s as ee,n as K,H as S,I as te}from"./index-C4rRmnc5.js";import{e as se,j as oe,d as ie,w as ae,i as le}from"./store-BxeA20BY.js";/* empty css */import{p as ne}from"./padding-BA_o-z8h.js";const ce={class:"my-order"},de={class:"header-nav"},_e={class:"nav-item"},re={class:"nav-item-clear"},ve={class:"header-input"},ue={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},fe=["onClick"],pe={class:"top"},he={class:"create-time"},ye={class:"shop"},me={key:0,class:"left"},ge={key:0,class:"shop-name"},ke={class:"right"},$e={class:"money"},be={class:"count"},we={class:"bottom"},Ce={class:"pay"},xe={key:0},ze={key:1},Re={key:2},Ie={key:3},Oe={key:4},Ve={key:5},Ae={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"cashier"},De={key:1,class:"cashier",style:{color:"#ff4a00"}},Le={key:0,class:"load-end"},Se={key:1,class:"load-end"},Ee={__name:"order",props:{type:{type:Number,default:2}},emits:["backOne"],setup(w,{expose:t,emit:y}){H(),n([]),n(null);const i=n({verify_code:"",page_no:1,page_size:15}),_=n(!1),m=n(0),g=n(0),z=n(!1),c=n([]),p=(C=!1)=>{_.value||(_.value=!0,i.value.verify_code?(i.value.verify_code=i.value.verify_code.replace("—","-"),i.value.verify_code=i.value.verify_code.replace(/\uFF0D/,"-"),i.value.verify_code=i.value.verify_code.replace(" ",""),se({verify_code:i.value.verify_code}).then(d=>{c.value=[d.data],g.value=0,x.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,_.value=!1,c.value[0].is_writeoff&&U.warning("订单已核销过")}).catch(d=>{_.value=!1})):oe(i.value).then(d=>{c.value=d.data.lists,x.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,_.value=!1}).catch(d=>{_.value=!1}))},I=(C,d)=>{g.value=d,x.emit("set-sale-order-detail",C)},k=C=>{i.value.verify_code=C,g.value=0,p(!0)},R=y,O=()=>{x.emit("set-sale-order-detail",{}),c.value=[],R("backOne")};return t({setCode:k}),(C,d)=>{const V=f("el-button"),A=f("el-input"),B=f("el-image"),D=f("spna"),L=E("loading"),J=E("infinite-scroll");return s(),o("div",ce,[e("div",de,[e("div",_e,l(w.type==2?"核销订单":"核销记录"),1),e("div",re,[r(V,{type:"primary",size:"small",onClick:O},{default:h(()=>[b("返回上一页")]),_:1})])]),e("div",ve,[r(A,{modelValue:i.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=a=>i.value.verify_code=a),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=W(a=>p(!0),["enter"])),clearable:""},{append:h(()=>[r(V,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=a=>p(!0))},{default:h(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),$((s(),o("div",ue,[(s(!0),o(P,null,T(c.value,(a,N)=>(s(),o("div",{class:j(["item",{"item-active":g.value==N}]),key:N,onClick:M=>I(a,N)},[e("div",pe,[e("div",{class:j(["sn","cahier"])},"单号: "+l(a.order_id),1),e("div",he,l(a.pay_time),1)]),e("div",ye,[a.product?(s(),o("div",me,[(s(!0),o(P,null,T(a.product.slice(0,5),(M,Q)=>(s(),F(B,{key:Q,src:M.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),a.product.length==1?(s(),o("div",ge,l(a.product[0].store_name),1)):u("",!0)])):u("",!0),e("div",ke,[e("div",$e,"¥"+l(a.pay_price),1),e("div",be,"共"+l(a.total_num)+"款商品",1)])]),e("div",we,[e("div",Ce,[a.paid?(s(),o("div",xe,[b(l(a.paid_name)+" ",1),a.pay_type_name?(s(),F(D,{key:0},{default:h(()=>[b("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",ze,"(微信收款)")):a.pay_type==17?(s(),o("span",Re,"(现金支付)")):a.pay_type==13?(s(),o("span",Ie,"(支付宝收款)")):a.pay_type==3?(s(),o("span",Oe,"(余额支付)")):a.pay_type==1?(s(),o("span",Ve,"(微信支付)")):u("",!0)])):(s(),o("div",Ae,l(a.paid_name),1))]),a.is_writeoff==0?(s(),o("div",Be,"核销码:"+l(a.verify_code),1)):(s(),o("div",De,"已核销:"+l(a.verify_code),1))])],10,fe))),128)),z.value?(s(),o("div",Le,"没有更多了")):u("",!0),_.value?(s(),o("div",Se,"加载中...")):u("",!0)])),[[L,_.value],[J,p]])])}}},Fe=q(Ee,[["__scopeId","data-v-90e829d8"]]),v=w=>(Z("data-v-2317ae78"),w=w(),ee(),w),Ne={class:"my-order"},Ke={key:0,class:"detail"},Ue={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Me=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Pe={class:"table-info"},Te={class:"info-item"},je=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),qe={class:"info-item-info"},He={class:"info-item"},We=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ge={class:"info-item-info"},Je={class:"info-item"},Qe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),ot={class:"info-item-info"},it={class:"info-item"},at=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},ct=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},rt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),vt={class:"info-item-info"},ut={key:0},ft={key:1},pt={key:2},ht={key:3},yt={key:4},mt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info"},$t={class:"info-item"},bt=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),wt={class:"info-item-info"},Ct={class:"info-item"},xt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),zt={class:"info-item-info"},Rt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Ot={class:"info-item-info"},Vt={style:{"font-size":"0.9rem"}},At={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Dt={style:{"margin-left":"0.5rem"}},Lt={class:"footer"},St={key:1},Et={key:1},Ft={__name:"detail",setup(w){H(),X();const t=n({id:""});n([]),n(null);const y=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const i=n({page_no:1,page_size:15,loadend:!1,loading:!1}),_=n([]),m=()=>{console.log("触底"),t.value.id&&!i.value.loadend&&(console.log("加载"),i.value.loading=!0,ie({pid:t.value.id,page_no:i.value.page_no,page_size:i.value.page_size}).then(c=>{_.value=[..._.value,...c.data.lists],c.data.lists.length{ae({verify_code:t.value.verify_code}).then(c=>{c.show==0&&c.msg=="核销成功"&&U.success(c.msg),t.value.is_writeoff=1,z()})},z=()=>{le({id:t.value.id}).then(c=>{x.emit("letPrintReceipt",c.data)})};return G(()=>{x.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,i.value.page_no=1,i.value.loadend=!1,i.value.loading=!1,_.value=[]})}),Y(()=>{x.off("set-sale-order-detail")}),(c,p)=>{var A;const I=f("el-image"),k=f("el-table-column"),R=f("el-table"),O=f("el-button"),C=f("el-empty"),d=E("infinite-scroll"),V=E("loading");return s(),o("div",Ne,[t.value.id?$((s(),o("div",Ke,[$((s(),o("div",Ue,[Me,e("div",Pe,[e("div",Te,[je,e("div",qe,l(t.value.order_id),1)]),e("div",He,[We,e("div",Ge,l(t.value.total_num||0),1)]),e("div",Je,[Qe,e("div",Xe,"¥"+l(t.value.total_price),1)]),e("div",Ye,[Ze,e("div",et,l(t.value.pay_time),1)]),e("div",tt,[st,e("div",ot,"¥"+l(t.value.deduction_price),1)]),e("div",it,[at,e("div",lt,"¥"+l(t.value.pay_price),1)]),e("div",nt,[ct,e("div",dt,l(t.value.pay_time),1)]),e("div",_t,[rt,e("div",vt,[t.value.pay_type_name?(s(),o("span",ut,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ft,"微信收款")):t.value.pay_type==17?(s(),o("span",pt,"现金支付")):t.value.pay_type==13?(s(),o("span",ht,"支付宝收款")):t.value.pay_type==3?(s(),o("span",yt,"余额支付")):t.value.pay_type==1?(s(),o("span",mt,"微信支付")):u("",!0)])])]),t.value.uid?(s(),o("div",gt,"用户信息")):u("",!0),t.value.uid?(s(),o("div",kt,[e("div",$t,[bt,e("div",wt,l(t.value.uid),1)]),e("div",Ct,[xt,e("div",zt,l(t.value.nickname),1)]),e("div",Rt,[It,e("div",Ot,l(t.value.mobile),1)])])):u("",!0),e("div",Vt,[b(" 共计 "),e("span",At,l(((A=t.value.product)==null?void 0:A.length)||" "),1),b(" 款商品 ")]),r(R,{data:t.value.product},{default:h(()=>[r(k,{label:"商品信息"},{default:h(({row:B})=>{var D,L;return[e("div",Bt,[r(I,{style:{height:"3rem",width:"3rem"},src:(D=B.cart_info)==null?void 0:D.image},null,8,["src"]),e("span",Dt,l((L=B.cart_info)==null?void 0:L.name),1)])]}),_:1}),r(k,{prop:"cart_info.price",label:"单价",width:"150"}),r(k,{prop:"cart_info.cart_num",label:"数量",width:"150"}),r(k,{prop:"cart_info.total_price",label:"总价",width:"150"})]),_:1},8,["data"])])),[[d,m]]),e("div",Lt,[t.value.is_writeoff==0?(s(),F(O,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:g},{default:h(()=>[b("立即核销")]),_:1},8,["disabled"])):u("",!0),t.value.is_writeoff==1?(s(),o("div",St,"该订单已核销")):u("",!0),t.value.is_writeoff==1?(s(),F(O,{key:2,style:{"margin-left":"1rem"},type:"warning",size:"large",onClick:z},{default:h(()=>[b("打印小票")]),_:1})):u("",!0)])])),[[V,y.value]]):(s(),o("div",Et,[r(C,{description:"没找到核销订单信息"})]))])}}},Nt=q(Ft,[["__scopeId","data-v-2317ae78"]]),Kt={class:"my-card"},Ut={class:"my-code"},Mt=e("h2",null,"订单核销",-1),Pt={class:"box"},Tt=e("span",null,"查看核销记录",-1),Gt={__name:"index",setup(w){const t=n(1),y=n(""),i=n(null),_=n(null),m=()=>{if(y.value=="")return U.error("请输入订单编号");t.value=2,K(()=>{_.value.setCode(y.value)})},g=()=>{t.value=3,K(()=>{_.value.setCode("")})},z=()=>{m()};return G(()=>{K(()=>{i.value.focus()})}),(c,p)=>{const I=f("ArrowRightBold"),k=f("el-icon");return s(),o("div",Kt,[$(e("div",Ut,[Mt,e("div",Pt,[$(e("input",{ref_key:"inputRef",ref:i,"onUpdate:modelValue":p[0]||(p[0]=R=>y.value=R),placeholder:"",class:"input",onKeyup:W(m,["enter"])},null,544),[[te,y.value]]),e("div",{class:"btn",onClick:m},"查询")]),e("div",{class:"to-list",onClick:g},[Tt,r(k,null,{default:h(()=>[r(I)]),_:1})])],512),[[S,t.value==1]]),$(r(Fe,{type:t.value,style:{"flex-shrink":"0"},ref_key:"orderRef",ref:_,onBackOne:p[1]||(p[1]=R=>t.value=1)},null,8,["type"]),[[S,t.value!=1]]),$(r(ne,null,null,512),[[S,t.value!=1]]),$(r(Nt,{ref:"detailRef",onReInit:z},null,512),[[S,t.value!=1]])])}}};export{Gt as default}; +import{_ as q,u as H,r as n,b as f,h as E,c as s,k as o,e,t as l,f as r,w as h,g as b,i as W,j as $,F as P,l as T,p as u,m as x,E as U,z as j,d as F,C as X,o as G,a as Y,q as Z,s as ee,n as K,H as S,I as te}from"./index-DcwaEiyg.js";import{e as se,j as oe,d as ie,w as ae,i as le}from"./store-85zRAkSB.js";/* empty css */import{p as ne}from"./padding-CG_WCVSK.js";const ce={class:"my-order"},de={class:"header-nav"},_e={class:"nav-item"},re={class:"nav-item-clear"},ve={class:"header-input"},ue={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},fe=["onClick"],pe={class:"top"},he={class:"create-time"},ye={class:"shop"},me={key:0,class:"left"},ge={key:0,class:"shop-name"},ke={class:"right"},$e={class:"money"},be={class:"count"},we={class:"bottom"},Ce={class:"pay"},xe={key:0},ze={key:1},Re={key:2},Ie={key:3},Oe={key:4},Ve={key:5},Ae={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"cashier"},De={key:1,class:"cashier",style:{color:"#ff4a00"}},Le={key:0,class:"load-end"},Se={key:1,class:"load-end"},Ee={__name:"order",props:{type:{type:Number,default:2}},emits:["backOne"],setup(w,{expose:t,emit:y}){H(),n([]),n(null);const i=n({verify_code:"",page_no:1,page_size:15}),_=n(!1),m=n(0),g=n(0),z=n(!1),c=n([]),p=(C=!1)=>{_.value||(_.value=!0,i.value.verify_code?(i.value.verify_code=i.value.verify_code.replace("—","-"),i.value.verify_code=i.value.verify_code.replace(/\uFF0D/,"-"),i.value.verify_code=i.value.verify_code.replace(" ",""),se({verify_code:i.value.verify_code}).then(d=>{c.value=[d.data],g.value=0,x.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,_.value=!1,c.value[0].is_writeoff&&U.warning("订单已核销过")}).catch(d=>{_.value=!1})):oe(i.value).then(d=>{c.value=d.data.lists,x.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,_.value=!1}).catch(d=>{_.value=!1}))},I=(C,d)=>{g.value=d,x.emit("set-sale-order-detail",C)},k=C=>{i.value.verify_code=C,g.value=0,p(!0)},R=y,O=()=>{x.emit("set-sale-order-detail",{}),c.value=[],R("backOne")};return t({setCode:k}),(C,d)=>{const V=f("el-button"),A=f("el-input"),B=f("el-image"),D=f("spna"),L=E("loading"),J=E("infinite-scroll");return s(),o("div",ce,[e("div",de,[e("div",_e,l(w.type==2?"核销订单":"核销记录"),1),e("div",re,[r(V,{type:"primary",size:"small",onClick:O},{default:h(()=>[b("返回上一页")]),_:1})])]),e("div",ve,[r(A,{modelValue:i.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=a=>i.value.verify_code=a),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=W(a=>p(!0),["enter"])),clearable:""},{append:h(()=>[r(V,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=a=>p(!0))},{default:h(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),$((s(),o("div",ue,[(s(!0),o(P,null,T(c.value,(a,N)=>(s(),o("div",{class:j(["item",{"item-active":g.value==N}]),key:N,onClick:M=>I(a,N)},[e("div",pe,[e("div",{class:j(["sn","cahier"])},"单号: "+l(a.order_id),1),e("div",he,l(a.pay_time),1)]),e("div",ye,[a.product?(s(),o("div",me,[(s(!0),o(P,null,T(a.product.slice(0,5),(M,Q)=>(s(),F(B,{key:Q,src:M.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),a.product.length==1?(s(),o("div",ge,l(a.product[0].store_name),1)):u("",!0)])):u("",!0),e("div",ke,[e("div",$e,"¥"+l(a.pay_price),1),e("div",be,"共"+l(a.total_num)+"款商品",1)])]),e("div",we,[e("div",Ce,[a.paid?(s(),o("div",xe,[b(l(a.paid_name)+" ",1),a.pay_type_name?(s(),F(D,{key:0},{default:h(()=>[b("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",ze,"(微信收款)")):a.pay_type==17?(s(),o("span",Re,"(现金支付)")):a.pay_type==13?(s(),o("span",Ie,"(支付宝收款)")):a.pay_type==3?(s(),o("span",Oe,"(余额支付)")):a.pay_type==1?(s(),o("span",Ve,"(微信支付)")):u("",!0)])):(s(),o("div",Ae,l(a.paid_name),1))]),a.is_writeoff==0?(s(),o("div",Be,"核销码:"+l(a.verify_code),1)):(s(),o("div",De,"已核销:"+l(a.verify_code),1))])],10,fe))),128)),z.value?(s(),o("div",Le,"没有更多了")):u("",!0),_.value?(s(),o("div",Se,"加载中...")):u("",!0)])),[[L,_.value],[J,p]])])}}},Fe=q(Ee,[["__scopeId","data-v-90e829d8"]]),v=w=>(Z("data-v-2317ae78"),w=w(),ee(),w),Ne={class:"my-order"},Ke={key:0,class:"detail"},Ue={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Me=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Pe={class:"table-info"},Te={class:"info-item"},je=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),qe={class:"info-item-info"},He={class:"info-item"},We=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ge={class:"info-item-info"},Je={class:"info-item"},Qe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),ot={class:"info-item-info"},it={class:"info-item"},at=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},ct=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},rt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),vt={class:"info-item-info"},ut={key:0},ft={key:1},pt={key:2},ht={key:3},yt={key:4},mt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info"},$t={class:"info-item"},bt=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),wt={class:"info-item-info"},Ct={class:"info-item"},xt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),zt={class:"info-item-info"},Rt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Ot={class:"info-item-info"},Vt={style:{"font-size":"0.9rem"}},At={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Dt={style:{"margin-left":"0.5rem"}},Lt={class:"footer"},St={key:1},Et={key:1},Ft={__name:"detail",setup(w){H(),X();const t=n({id:""});n([]),n(null);const y=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const i=n({page_no:1,page_size:15,loadend:!1,loading:!1}),_=n([]),m=()=>{console.log("触底"),t.value.id&&!i.value.loadend&&(console.log("加载"),i.value.loading=!0,ie({pid:t.value.id,page_no:i.value.page_no,page_size:i.value.page_size}).then(c=>{_.value=[..._.value,...c.data.lists],c.data.lists.length{ae({verify_code:t.value.verify_code}).then(c=>{c.show==0&&c.msg=="核销成功"&&U.success(c.msg),t.value.is_writeoff=1,z()})},z=()=>{le({id:t.value.id}).then(c=>{x.emit("letPrintReceipt",c.data)})};return G(()=>{x.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,i.value.page_no=1,i.value.loadend=!1,i.value.loading=!1,_.value=[]})}),Y(()=>{x.off("set-sale-order-detail")}),(c,p)=>{var A;const I=f("el-image"),k=f("el-table-column"),R=f("el-table"),O=f("el-button"),C=f("el-empty"),d=E("infinite-scroll"),V=E("loading");return s(),o("div",Ne,[t.value.id?$((s(),o("div",Ke,[$((s(),o("div",Ue,[Me,e("div",Pe,[e("div",Te,[je,e("div",qe,l(t.value.order_id),1)]),e("div",He,[We,e("div",Ge,l(t.value.total_num||0),1)]),e("div",Je,[Qe,e("div",Xe,"¥"+l(t.value.total_price),1)]),e("div",Ye,[Ze,e("div",et,l(t.value.pay_time),1)]),e("div",tt,[st,e("div",ot,"¥"+l(t.value.deduction_price),1)]),e("div",it,[at,e("div",lt,"¥"+l(t.value.pay_price),1)]),e("div",nt,[ct,e("div",dt,l(t.value.pay_time),1)]),e("div",_t,[rt,e("div",vt,[t.value.pay_type_name?(s(),o("span",ut,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ft,"微信收款")):t.value.pay_type==17?(s(),o("span",pt,"现金支付")):t.value.pay_type==13?(s(),o("span",ht,"支付宝收款")):t.value.pay_type==3?(s(),o("span",yt,"余额支付")):t.value.pay_type==1?(s(),o("span",mt,"微信支付")):u("",!0)])])]),t.value.uid?(s(),o("div",gt,"用户信息")):u("",!0),t.value.uid?(s(),o("div",kt,[e("div",$t,[bt,e("div",wt,l(t.value.uid),1)]),e("div",Ct,[xt,e("div",zt,l(t.value.nickname),1)]),e("div",Rt,[It,e("div",Ot,l(t.value.mobile),1)])])):u("",!0),e("div",Vt,[b(" 共计 "),e("span",At,l(((A=t.value.product)==null?void 0:A.length)||" "),1),b(" 款商品 ")]),r(R,{data:t.value.product},{default:h(()=>[r(k,{label:"商品信息"},{default:h(({row:B})=>{var D,L;return[e("div",Bt,[r(I,{style:{height:"3rem",width:"3rem"},src:(D=B.cart_info)==null?void 0:D.image},null,8,["src"]),e("span",Dt,l((L=B.cart_info)==null?void 0:L.name),1)])]}),_:1}),r(k,{prop:"cart_info.price",label:"单价",width:"150"}),r(k,{prop:"cart_info.cart_num",label:"数量",width:"150"}),r(k,{prop:"cart_info.total_price",label:"总价",width:"150"})]),_:1},8,["data"])])),[[d,m]]),e("div",Lt,[t.value.is_writeoff==0?(s(),F(O,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:g},{default:h(()=>[b("立即核销")]),_:1},8,["disabled"])):u("",!0),t.value.is_writeoff==1?(s(),o("div",St,"该订单已核销")):u("",!0),t.value.is_writeoff==1?(s(),F(O,{key:2,style:{"margin-left":"1rem"},type:"warning",size:"large",onClick:z},{default:h(()=>[b("打印小票")]),_:1})):u("",!0)])])),[[V,y.value]]):(s(),o("div",Et,[r(C,{description:"没找到核销订单信息"})]))])}}},Nt=q(Ft,[["__scopeId","data-v-2317ae78"]]),Kt={class:"my-card"},Ut={class:"my-code"},Mt=e("h2",null,"订单核销",-1),Pt={class:"box"},Tt=e("span",null,"查看核销记录",-1),Gt={__name:"index",setup(w){const t=n(1),y=n(""),i=n(null),_=n(null),m=()=>{if(y.value=="")return U.error("请输入订单编号");t.value=2,K(()=>{_.value.setCode(y.value)})},g=()=>{t.value=3,K(()=>{_.value.setCode("")})},z=()=>{m()};return G(()=>{K(()=>{i.value.focus()})}),(c,p)=>{const I=f("ArrowRightBold"),k=f("el-icon");return s(),o("div",Kt,[$(e("div",Ut,[Mt,e("div",Pt,[$(e("input",{ref_key:"inputRef",ref:i,"onUpdate:modelValue":p[0]||(p[0]=R=>y.value=R),placeholder:"",class:"input",onKeyup:W(m,["enter"])},null,544),[[te,y.value]]),e("div",{class:"btn",onClick:m},"查询")]),e("div",{class:"to-list",onClick:g},[Tt,r(k,null,{default:h(()=>[r(I)]),_:1})])],512),[[S,t.value==1]]),$(r(Fe,{type:t.value,style:{"flex-shrink":"0"},ref_key:"orderRef",ref:_,onBackOne:p[1]||(p[1]=R=>t.value=1)},null,8,["type"]),[[S,t.value!=1]]),$(r(ne,null,null,512),[[S,t.value!=1]]),$(r(Nt,{ref:"detailRef",onReInit:z},null,512),[[S,t.value!=1]])])}}};export{Gt as default}; diff --git a/dist/assets/index-LUACW_g6.js b/dist/assets/index-BKPqUHgE.js similarity index 92% rename from dist/assets/index-LUACW_g6.js rename to dist/assets/index-BKPqUHgE.js index 0aeb214..cdf1a67 100644 --- a/dist/assets/index-LUACW_g6.js +++ b/dist/assets/index-BKPqUHgE.js @@ -1,4 +1,4 @@ -import{c as Fp,a as Wp,b as Gl,o as Bp}from"./store-BxeA20BY.js";import{_ as it,r as O,o as $t,m as ne,a as Ft,b as tn,c as X,d as Oe,w as sn,e as v,f as D,g as An,t as fn,n as uu,E as Et,u as Pr,h as Tt,i as Hl,j as ou,k as pn,F as Ot,l as Pt,p as rt,q as zl,s as Kl,v as bt,x as Up,y as Er,z as Tr,A as Mp,B as Dp}from"./index-C4rRmnc5.js";import{u as Np}from"./user-UEbWTjyf.js";import"./moment-Cl4UOzQZ.js";import{p as Nl}from"./padding-BA_o-z8h.js";import{m as iu,s as Gp}from"./shop-Bs3DGR4g.js";import{p as Hp}from"./pay-D6lAYrB4.js";/* empty css */const zp={class:"price"},Kp={class:"flex"},qp={style:{margin:"0.625rem","padding-bottom":"40px"}},kp={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Zp={class:"dialog-footer"},Yp={__name:"price",emits:["changeAllPrice"],setup(gn,{expose:mn,emit:l}){const b=O(!1),P=O(null),Z=O(0),I=(q=!0,x=0)=>{U.value.nowPrice="",U.value.percentage="",b.value=q,Z.value=x,uu(()=>{setTimeout(()=>{var un;(un=P.value)==null||un.focus()},150)})},U=O({nowPrice:"",percentage:""}),rn=q=>{U.value.percentage=(q/Z.value*100).toFixed(2)},hn=q=>{U.value.nowPrice=(Z.value*q/100).toFixed(2)},J=l,j=()=>{if(U.value.percentage>100)return U.value.nowPrice="",U.value.percentage="",Et.error("改价金额不能大于当前订单金额");if(U.value.nowPrice<=0)return U.value.nowPrice="",U.value.percentage="",Et.error("金额不能小于0");J("changeAllPrice",U.value.nowPrice)};mn({show:I,dialogVisible:b});const bn=()=>{b.value&&j()};return $t(()=>{ne.on("enter",bn)}),Ft(()=>{ne.off("enter",bn)}),(q,x)=>{const un=tn("el-input"),$=tn("el-button"),K=tn("el-dialog");return X(),Oe(K,{modelValue:b.value,"onUpdate:modelValue":x[2]||(x[2]=k=>b.value=k),title:"订单改价",width:"650"},{footer:sn(()=>[v("div",Zp,[D($,{class:"ok-btn",type:"primary",onClick:j},{default:sn(()=>[An(" 确定 (Enter) ")]),_:1})])]),default:sn(()=>[v("div",zp,[v("div",Kp,[D(un,{ref_key:"priceRef",ref:P,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:U.value.nowPrice,"onUpdate:modelValue":x[0]||(x[0]=k=>U.value.nowPrice=k),type:"number",placeholder:"请输入改价后的价格",onInput:rn},{suffix:sn(()=>[An("元")]),_:1},8,["modelValue"]),D(un,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:U.value.percentage,"onUpdate:modelValue":x[1]||(x[1]=k=>U.value.percentage=k),type:"number",placeholder:"请输入比例",onInput:hn},{suffix:sn(()=>[An("%")]),_:1},8,["modelValue"])]),v("div",qp,[An(" 改价后金额: "),v("span",kp,"¥"+fn(U.value.nowPrice||Z.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Vp=it(Yp,[["__scopeId","data-v-924edcc0"]]),Xp={class:"check-user-list"},Jp={class:"header-input"},Qp={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},jp=["onClick"],ng={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},eg={class:"top flex"},tg={class:"r-1"},rg={class:"bold"},ig={class:"bottom flex",style:{"justify-content":"space-between"}},ug={class:"red"},og={key:0,class:"load-end"},lg={key:1,class:"load-end"},sg={__name:"userList",emits:["setUser"],setup(gn,{expose:mn,emit:l}){Pr();const b=O(!1),P=O({page_no:1,page_size:20,mobile:""}),Z=l,I=O(!1),U=O(0),rn=O(!1),hn=O([]),J=(q=!1)=>{if(q)P.value.page_no=1;else if(rn.value||I.value)return;I.value=!0,Np(P.value).then(x=>{q?hn.value=x.data.lists:hn.value=[...hn.value,...x.data.lists],x.data.lists.length{rn.value=!0,I.value=!1})},j=(q,x)=>{Z("setUser",q),b.value=!1};return mn({open:()=>{b.value=!0,J(!0)}}),(q,x)=>{const un=tn("el-button"),$=tn("el-input"),K=tn("el-avatar"),k=tn("el-tag"),Y=tn("el-dialog"),nn=Tt("loading"),S=Tt("infinite-scroll");return X(),Oe(Y,{modelValue:b.value,"onUpdate:modelValue":x[4]||(x[4]=y=>b.value=y),title:"选择用户",width:"800"},{default:sn(()=>[v("div",Xp,[v("div",Jp,[D($,{modelValue:P.value.mobile,"onUpdate:modelValue":x[1]||(x[1]=y=>P.value.mobile=y),placeholder:"搜索手机号/ID",onKeydown:x[2]||(x[2]=Hl(y=>J(!0),["enter"])),onClear:x[3]||(x[3]=y=>J(!0)),clearable:""},{append:sn(()=>[D(un,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:x[0]||(x[0]=y=>J(!0))},{default:sn(()=>[An("搜索")]),_:1})]),_:1},8,["modelValue"])]),ou((X(),pn("div",Qp,[(X(!0),pn(Ot,null,Pt(hn.value,(y,W)=>(X(),pn("div",{class:"item",key:W,onClick:an=>j(y,W)},[D(K,{class:"avatar",src:y.avatar},null,8,["src"]),v("div",ng,[v("div",eg,[v("div",tg,[v("span",rg,fn(y.nickname),1),v("span",null,fn(" (ID:"+y.id+")"),1)]),v("div",null,"手机号: "+fn(y.mobile||y.account),1)]),v("div",ig,[v("div",null,[An("采购款: "),v("span",ug,fn(y.purchase_funds),1)]),v("div",null,[y.user_ship!=1?(X(),Oe(k,{key:0,type:"primary"},{default:sn(()=>[An(fn(y.user_ship_name),1)]),_:2},1024)):(X(),Oe(k,{key:1,type:"success"},{default:sn(()=>[An(fn(y.user_ship_name),1)]),_:2},1024))])])])],8,jp))),128)),rn.value?(X(),pn("div",og,"没有更多了")):rt("",!0),I.value?(X(),pn("div",lg,"加载中...")):rt("",!0)])),[[nn,I.value],[S,J]])])]),_:1},8,["modelValue"])}}},fg=it(sg,[["__scopeId","data-v-4bf590bf"]]),ag=gn=>(zl("data-v-d08b12df"),gn=gn(),Kl(),gn),cg={class:"my-order"},hg={class:"user-nav"},_g={class:"user-info"},dg={key:0,class:"info"},pg={class:"flex-bewteen"},gg={class:"flex-bewteen",style:{"align-items":"flex-end"}},vg={key:1,class:"info",style:{"align-items":"center",display:"flex","justify-content":"space-between"}},mg={class:"flex-bewteen",style:{width:"100%"}},wg=ag(()=>v("div",{style:{"font-size":"1.2rem"}},"游客",-1)),xg={class:"header-nav"},yg={class:"nav-item"},Ag={class:"order-list"},Ig={class:"order-item-info"},Cg={class:"order-item-title"},Lg={class:"title"},Rg=["onClick"],Sg={class:"order-item-sku"},bg={class:"order-item-price"},Eg={class:"order-footer"},Tg={class:"order-total"},Og={class:"price"},Pg={class:"total-item"},$g={style:{"font-size":"1.4rem"}},Fg={class:"order-btn"},Wg={__name:"order",emits:["goPay","editAttr"],setup(gn,{expose:mn,emit:l}){const b=O([]),P=O(0),Z=O(0),I=O(0);Pr();const U=O(null),rn=()=>{let y=[];b.value.map(W=>{y.push(W.id)}),y.length!=0&&J(y)},hn=y=>{b.value=b.value.filter(W=>W.id!=y),J([y])},J=y=>{Fp({id:y}).then(W=>{console.log(W),j()})},j=()=>{P.value=0,Z.value=0,I.value=0,Wp().then(y=>{var W,an,H;((an=(W=y.data)==null?void 0:W.lists)==null?void 0:an.length)>0?(b.value=y.data.lists,P.value=(H=y.data)==null?void 0:H.lists.reduce((Mn,qn)=>Mn+Number(qn.total_price),0),Z.value=P.value):b.value=[]})};j();const bn=l,q=()=>{bn("goPay")},x=(y,W)=>{Gl({product_id:y.product_id,cart_num:y.cart_num}).then(an=>{P.value=0,b.value.forEach(H=>{P.value+=H.price*H.cart_num}),Z.value=P.value}).catch(an=>{var H;y.cart_num=((H=an==null?void 0:an.msg)==null?void 0:H.match(/\d+\.\d+/))||1})},un=y=>{I.value=Z.value-y,P.value=+y,uu(()=>{setTimeout(()=>{K(!1)},150)})};O(0);const $=O(null),K=(y=!0)=>{$.value.show(y,Z.value)},k=O({uid:""}),Y=y=>{k.value=y,k.value.uid=y.id};mn({getList:j,list:b,discounts:I,allPrice:P,userInfo:k});const nn=()=>{$.value.dialogVisible?$.value.dialogVisible=!1:K()},S=()=>{b.value.length>0&&rn()};return $t(()=>{ne.on("insert",nn),ne.on("delete",S)}),Ft(()=>{ne.off("insert",nn),ne.off("delete",S)}),(y,W)=>{const an=tn("el-avatar"),H=tn("ArrowRight"),Mn=tn("el-icon"),qn=tn("el-button"),$r=tn("RefreshLeft"),Fr=tn("Delete"),Wt=tn("el-empty"),Wr=tn("el-image"),Br=tn("el-input-number");return X(),pn("div",cg,[v("div",hg,[v("div",_g,[D(an,{class:"avatar",src:k.value.avatar},null,8,["src"]),k.value.uid?(X(),pn("div",dg,[v("div",pg,[v("div",null,"手机号: "+fn(k.value.mobile||k.value.account),1),D(qn,{type:"primary",link:"",class:"change-user",onClick:W[0]||(W[0]=wn=>U.value.open())},{default:sn(()=>[An("切换用户"),D(Mn,null,{default:sn(()=>[D(H)]),_:1})]),_:1})]),v("div",gg,[v("div",null,"采购款: "+fn(k.value.purchase_funds),1),D(qn,{link:"",onClick:W[1]||(W[1]=wn=>k.value.uid="")},{default:sn(()=>[An("重置"),D(Mn,null,{default:sn(()=>[D($r)]),_:1})]),_:1})])])):(X(),pn("div",vg,[v("div",mg,[wg,D(qn,{type:"primary",link:"",class:"change-user",onClick:W[2]||(W[2]=wn=>U.value.open())},{default:sn(()=>[An("切换用户"),D(Mn,null,{default:sn(()=>[D(H)]),_:1})]),_:1})])]))]),D(fg,{ref_key:"userListRef",ref:U,onSetUser:Y},null,512)]),v("div",xg,[v("div",yg,[An(" 已选购 "),v("span",null,fn(b.value.length),1),An(" 款 ")]),v("div",{class:"nav-item-clear",onClick:rn},[D(Mn,null,{default:sn(()=>[D(Fr)]),_:1}),An("清空 (Delete) ")])]),v("div",Ag,[b.value.length==0?(X(),Oe(Wt,{key:0,description:"请点击右侧添加商品"})):(X(!0),pn(Ot,{key:1},Pt(b.value,(wn,le)=>(X(),pn("div",{class:"order-item",key:le},[D(Wr,{loading:"lazy",class:"order-item-img",src:wn.image},null,8,["src"]),v("div",Ig,[v("div",Cg,[v("div",Lg,fn(wn.store_name),1),v("div",{class:"delete",onClick:ut=>hn(wn.id)},"删除",8,Rg)]),v("div",Sg,[v("span",null,fn(wn.unit_name),1)]),v("div",bg,[v("div",null,[An(" ¥"),v("span",null,fn(wn.price),1)]),v("div",null,[D(Br,{modelValue:wn.cart_num,"onUpdate:modelValue":ut=>wn.cart_num=ut,precision:2,min:+wn.batch>0?+wn.batch:1,step:1,onChange:ut=>x(wn)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])])])])]))),128))]),v("div",Eg,[v("div",Tg,[v("div",Og,[v("div",Pg,[An(" 合计: "),v("span",null,[An("¥"),v("span",$g,fn(P.value.toFixed(2)),1)])])])]),v("div",Fg,[D(qn,{class:"btn",type:"primary",onClick:q,disabled:b.value.length==0||P.value<500},{default:sn(()=>[An(fn(P.value<500?"¥500起订":"立即结账 (F9)"),1)]),_:1},8,["disabled"])])]),D(Vp,{ref_key:"priceRef",ref:$,onChangeAllPrice:un},null,512)])}}},Bg=it(Wg,[["__scopeId","data-v-d08b12df"]]);var Or={exports:{}};/** +import{c as Fp,a as Wp,b as Gl,o as Bp}from"./store-85zRAkSB.js";import{_ as it,r as O,o as $t,m as ne,a as Ft,b as tn,c as X,d as Oe,w as sn,e as v,f as D,g as An,t as fn,n as uu,E as Et,u as Pr,h as Tt,i as Hl,j as ou,k as pn,F as Ot,l as Pt,p as rt,q as zl,s as Kl,v as bt,x as Up,y as Er,z as Tr,A as Mp,B as Dp}from"./index-DcwaEiyg.js";import{u as Np}from"./user-CnK8Y4fd.js";import"./moment-Cl4UOzQZ.js";import{p as Nl}from"./padding-CG_WCVSK.js";import{m as iu,s as Gp}from"./shop-CBW6q5xA.js";import{p as Hp}from"./pay-CEy1hIkd.js";/* empty css */const zp={class:"price"},Kp={class:"flex"},qp={style:{margin:"0.625rem","padding-bottom":"40px"}},kp={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Zp={class:"dialog-footer"},Yp={__name:"price",emits:["changeAllPrice"],setup(gn,{expose:mn,emit:l}){const b=O(!1),P=O(null),Z=O(0),I=(q=!0,x=0)=>{U.value.nowPrice="",U.value.percentage="",b.value=q,Z.value=x,uu(()=>{setTimeout(()=>{var un;(un=P.value)==null||un.focus()},150)})},U=O({nowPrice:"",percentage:""}),rn=q=>{U.value.percentage=(q/Z.value*100).toFixed(2)},hn=q=>{U.value.nowPrice=(Z.value*q/100).toFixed(2)},J=l,j=()=>{if(U.value.percentage>100)return U.value.nowPrice="",U.value.percentage="",Et.error("改价金额不能大于当前订单金额");if(U.value.nowPrice<=0)return U.value.nowPrice="",U.value.percentage="",Et.error("金额不能小于0");J("changeAllPrice",U.value.nowPrice)};mn({show:I,dialogVisible:b});const bn=()=>{b.value&&j()};return $t(()=>{ne.on("enter",bn)}),Ft(()=>{ne.off("enter",bn)}),(q,x)=>{const un=tn("el-input"),$=tn("el-button"),K=tn("el-dialog");return X(),Oe(K,{modelValue:b.value,"onUpdate:modelValue":x[2]||(x[2]=k=>b.value=k),title:"订单改价",width:"650"},{footer:sn(()=>[v("div",Zp,[D($,{class:"ok-btn",type:"primary",onClick:j},{default:sn(()=>[An(" 确定 (Enter) ")]),_:1})])]),default:sn(()=>[v("div",zp,[v("div",Kp,[D(un,{ref_key:"priceRef",ref:P,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:U.value.nowPrice,"onUpdate:modelValue":x[0]||(x[0]=k=>U.value.nowPrice=k),type:"number",placeholder:"请输入改价后的价格",onInput:rn},{suffix:sn(()=>[An("元")]),_:1},8,["modelValue"]),D(un,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:U.value.percentage,"onUpdate:modelValue":x[1]||(x[1]=k=>U.value.percentage=k),type:"number",placeholder:"请输入比例",onInput:hn},{suffix:sn(()=>[An("%")]),_:1},8,["modelValue"])]),v("div",qp,[An(" 改价后金额: "),v("span",kp,"¥"+fn(U.value.nowPrice||Z.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Vp=it(Yp,[["__scopeId","data-v-924edcc0"]]),Xp={class:"check-user-list"},Jp={class:"header-input"},Qp={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},jp=["onClick"],ng={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},eg={class:"top flex"},tg={class:"r-1"},rg={class:"bold"},ig={class:"bottom flex",style:{"justify-content":"space-between"}},ug={class:"red"},og={key:0,class:"load-end"},lg={key:1,class:"load-end"},sg={__name:"userList",emits:["setUser"],setup(gn,{expose:mn,emit:l}){Pr();const b=O(!1),P=O({page_no:1,page_size:20,mobile:""}),Z=l,I=O(!1),U=O(0),rn=O(!1),hn=O([]),J=(q=!1)=>{if(q)P.value.page_no=1;else if(rn.value||I.value)return;I.value=!0,Np(P.value).then(x=>{q?hn.value=x.data.lists:hn.value=[...hn.value,...x.data.lists],x.data.lists.length{rn.value=!0,I.value=!1})},j=(q,x)=>{Z("setUser",q),b.value=!1};return mn({open:()=>{b.value=!0,J(!0)}}),(q,x)=>{const un=tn("el-button"),$=tn("el-input"),K=tn("el-avatar"),k=tn("el-tag"),Y=tn("el-dialog"),nn=Tt("loading"),S=Tt("infinite-scroll");return X(),Oe(Y,{modelValue:b.value,"onUpdate:modelValue":x[4]||(x[4]=y=>b.value=y),title:"选择用户",width:"800"},{default:sn(()=>[v("div",Xp,[v("div",Jp,[D($,{modelValue:P.value.mobile,"onUpdate:modelValue":x[1]||(x[1]=y=>P.value.mobile=y),placeholder:"搜索手机号/ID",onKeydown:x[2]||(x[2]=Hl(y=>J(!0),["enter"])),onClear:x[3]||(x[3]=y=>J(!0)),clearable:""},{append:sn(()=>[D(un,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:x[0]||(x[0]=y=>J(!0))},{default:sn(()=>[An("搜索")]),_:1})]),_:1},8,["modelValue"])]),ou((X(),pn("div",Qp,[(X(!0),pn(Ot,null,Pt(hn.value,(y,W)=>(X(),pn("div",{class:"item",key:W,onClick:an=>j(y,W)},[D(K,{class:"avatar",src:y.avatar},null,8,["src"]),v("div",ng,[v("div",eg,[v("div",tg,[v("span",rg,fn(y.nickname),1),v("span",null,fn(" (ID:"+y.id+")"),1)]),v("div",null,"手机号: "+fn(y.mobile||y.account),1)]),v("div",ig,[v("div",null,[An("采购款: "),v("span",ug,fn(y.purchase_funds),1)]),v("div",null,[y.user_ship!=1?(X(),Oe(k,{key:0,type:"primary"},{default:sn(()=>[An(fn(y.user_ship_name),1)]),_:2},1024)):(X(),Oe(k,{key:1,type:"success"},{default:sn(()=>[An(fn(y.user_ship_name),1)]),_:2},1024))])])])],8,jp))),128)),rn.value?(X(),pn("div",og,"没有更多了")):rt("",!0),I.value?(X(),pn("div",lg,"加载中...")):rt("",!0)])),[[nn,I.value],[S,J]])])]),_:1},8,["modelValue"])}}},fg=it(sg,[["__scopeId","data-v-4bf590bf"]]),ag=gn=>(zl("data-v-d08b12df"),gn=gn(),Kl(),gn),cg={class:"my-order"},hg={class:"user-nav"},_g={class:"user-info"},dg={key:0,class:"info"},pg={class:"flex-bewteen"},gg={class:"flex-bewteen",style:{"align-items":"flex-end"}},vg={key:1,class:"info",style:{"align-items":"center",display:"flex","justify-content":"space-between"}},mg={class:"flex-bewteen",style:{width:"100%"}},wg=ag(()=>v("div",{style:{"font-size":"1.2rem"}},"游客",-1)),xg={class:"header-nav"},yg={class:"nav-item"},Ag={class:"order-list"},Ig={class:"order-item-info"},Cg={class:"order-item-title"},Lg={class:"title"},Rg=["onClick"],Sg={class:"order-item-sku"},bg={class:"order-item-price"},Eg={class:"order-footer"},Tg={class:"order-total"},Og={class:"price"},Pg={class:"total-item"},$g={style:{"font-size":"1.4rem"}},Fg={class:"order-btn"},Wg={__name:"order",emits:["goPay","editAttr"],setup(gn,{expose:mn,emit:l}){const b=O([]),P=O(0),Z=O(0),I=O(0);Pr();const U=O(null),rn=()=>{let y=[];b.value.map(W=>{y.push(W.id)}),y.length!=0&&J(y)},hn=y=>{b.value=b.value.filter(W=>W.id!=y),J([y])},J=y=>{Fp({id:y}).then(W=>{console.log(W),j()})},j=()=>{P.value=0,Z.value=0,I.value=0,Wp().then(y=>{var W,an,H;((an=(W=y.data)==null?void 0:W.lists)==null?void 0:an.length)>0?(b.value=y.data.lists,P.value=(H=y.data)==null?void 0:H.lists.reduce((Mn,qn)=>Mn+Number(qn.total_price),0),Z.value=P.value):b.value=[]})};j();const bn=l,q=()=>{bn("goPay")},x=(y,W)=>{Gl({product_id:y.product_id,cart_num:y.cart_num}).then(an=>{P.value=0,b.value.forEach(H=>{P.value+=H.price*H.cart_num}),Z.value=P.value}).catch(an=>{var H;y.cart_num=((H=an==null?void 0:an.msg)==null?void 0:H.match(/\d+\.\d+/))||1})},un=y=>{I.value=Z.value-y,P.value=+y,uu(()=>{setTimeout(()=>{K(!1)},150)})};O(0);const $=O(null),K=(y=!0)=>{$.value.show(y,Z.value)},k=O({uid:""}),Y=y=>{k.value=y,k.value.uid=y.id};mn({getList:j,list:b,discounts:I,allPrice:P,userInfo:k});const nn=()=>{$.value.dialogVisible?$.value.dialogVisible=!1:K()},S=()=>{b.value.length>0&&rn()};return $t(()=>{ne.on("insert",nn),ne.on("delete",S)}),Ft(()=>{ne.off("insert",nn),ne.off("delete",S)}),(y,W)=>{const an=tn("el-avatar"),H=tn("ArrowRight"),Mn=tn("el-icon"),qn=tn("el-button"),$r=tn("RefreshLeft"),Fr=tn("Delete"),Wt=tn("el-empty"),Wr=tn("el-image"),Br=tn("el-input-number");return X(),pn("div",cg,[v("div",hg,[v("div",_g,[D(an,{class:"avatar",src:k.value.avatar},null,8,["src"]),k.value.uid?(X(),pn("div",dg,[v("div",pg,[v("div",null,"手机号: "+fn(k.value.mobile||k.value.account),1),D(qn,{type:"primary",link:"",class:"change-user",onClick:W[0]||(W[0]=wn=>U.value.open())},{default:sn(()=>[An("切换用户"),D(Mn,null,{default:sn(()=>[D(H)]),_:1})]),_:1})]),v("div",gg,[v("div",null,"采购款: "+fn(k.value.purchase_funds),1),D(qn,{link:"",onClick:W[1]||(W[1]=wn=>k.value.uid="")},{default:sn(()=>[An("重置"),D(Mn,null,{default:sn(()=>[D($r)]),_:1})]),_:1})])])):(X(),pn("div",vg,[v("div",mg,[wg,D(qn,{type:"primary",link:"",class:"change-user",onClick:W[2]||(W[2]=wn=>U.value.open())},{default:sn(()=>[An("切换用户"),D(Mn,null,{default:sn(()=>[D(H)]),_:1})]),_:1})])]))]),D(fg,{ref_key:"userListRef",ref:U,onSetUser:Y},null,512)]),v("div",xg,[v("div",yg,[An(" 已选购 "),v("span",null,fn(b.value.length),1),An(" 款 ")]),v("div",{class:"nav-item-clear",onClick:rn},[D(Mn,null,{default:sn(()=>[D(Fr)]),_:1}),An("清空 (Delete) ")])]),v("div",Ag,[b.value.length==0?(X(),Oe(Wt,{key:0,description:"请点击右侧添加商品"})):(X(!0),pn(Ot,{key:1},Pt(b.value,(wn,le)=>(X(),pn("div",{class:"order-item",key:le},[D(Wr,{loading:"lazy",class:"order-item-img",src:wn.image},null,8,["src"]),v("div",Ig,[v("div",Cg,[v("div",Lg,fn(wn.store_name),1),v("div",{class:"delete",onClick:ut=>hn(wn.id)},"删除",8,Rg)]),v("div",Sg,[v("span",null,fn(wn.unit_name),1)]),v("div",bg,[v("div",null,[An(" ¥"),v("span",null,fn(wn.price),1)]),v("div",null,[D(Br,{modelValue:wn.cart_num,"onUpdate:modelValue":ut=>wn.cart_num=ut,precision:2,min:+wn.batch>0?+wn.batch:1,step:1,onChange:ut=>x(wn)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])])])])]))),128))]),v("div",Eg,[v("div",Tg,[v("div",Og,[v("div",Pg,[An(" 合计: "),v("span",null,[An("¥"),v("span",$g,fn(P.value.toFixed(2)),1)])])])]),v("div",Fg,[D(qn,{class:"btn",type:"primary",onClick:q,disabled:b.value.length==0||P.value<500},{default:sn(()=>[An(fn(P.value<500?"¥500起订":"立即结账 (F9)"),1)]),_:1},8,["disabled"])])]),D(Vp,{ref_key:"priceRef",ref:$,onChangeAllPrice:un},null,512)])}}},Bg=it(Wg,[["__scopeId","data-v-d08b12df"]]);var Or={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -24,4 +24,4 @@ __p += '`),z&&(g+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+g+`return __p -}`;var B=Ul(function(){return V(o,A+"return "+g).apply(l,s)});if(B.source=g,Zi(B))throw B;return B}function Gd(n){return Q(n).toLowerCase()}function Hd(n){return Q(n).toUpperCase()}function zd(n,e,t){if(n=Q(n),n&&(t||e===l))return qu(n);if(!n||!(e=Gn(e)))return n;var r=re(n),i=re(e),o=ku(r,i),s=Zu(r,i)+1;return Ee(r,o,s).join("")}function Kd(n,e,t){if(n=Q(n),n&&(t||e===l))return n.slice(0,Vu(n)+1);if(!n||!(e=Gn(e)))return n;var r=re(n),i=Zu(r,re(e))+1;return Ee(r,0,i).join("")}function qd(n,e,t){if(n=Q(n),n&&(t||e===l))return n.replace(Zr,"");if(!n||!(e=Gn(e)))return n;var r=re(n),i=ku(r,re(e));return Ee(r,i).join("")}function kd(n,e){var t=Mn,r=qn;if(dn(e)){var i="separator"in e?e.separator:i;t="length"in e?F(e.length):t,r="omission"in e?Gn(e.omission):r}n=Q(n);var o=n.length;if(qe(n)){var s=re(n);o=s.length}if(t>=o)return n;var f=t-ke(r);if(f<1)return r;var c=s?Ee(s,0,f).join(""):n.slice(0,f);if(i===l)return c+r;if(s&&(f+=c.length-f),Yi(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=ai(i.source,Q(_u.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var g=d.index;c=c.slice(0,g===l?f:g)}}else if(n.indexOf(Gn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function Zd(n){return n=Q(n),n&&rs.test(n)?n.replace(au,Af):n}var Yd=je(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Ji=Mo("toUpperCase");function Bl(n,e,t){return n=Q(n),e=t?l:e,e===l?vf(n)?Lf(n):sf(n):n.match(e)||[]}var Ul=M(function(n,e){try{return Dn(n,l,e)}catch(t){return Zi(t)?t:new E(t)}}),Vd=ve(function(n,e){return Zn(e,function(t){t=ce(t),pe(n,t,qi(n[t],n))}),n});function Xd(n){var e=n==null?0:n.length,t=C();return n=e?_n(n,function(r){if(typeof r[1]!="function")throw new Yn(I);return[t(r[0]),r[1]]}):[],M(function(r){for(var i=-1;++ile)return[];var t=se,r=En(n,se);e=C(e),n-=se;for(var i=li(r,e);++t0||e<0)?new G(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==l&&(e=F(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},G.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},G.prototype.toArray=function(){return this.take(se)},fe(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],o=r||/^find/.test(e);i&&(u.prototype[e]=function(){var s=this.__wrapped__,f=r?[1]:arguments,c=s instanceof G,d=f[0],p=c||T(s),g=function(N){var z=i.apply(u,Ie([N],f));return r&&m?z[0]:z};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var m=this.__chain__,A=!!this.__actions__.length,L=o&&!m,B=c&&!A;if(!o&&p){s=B?s:new G(this);var R=n.apply(s,f);return R.__actions__.push({func:yr,args:[g],thisArg:l}),new Vn(R,m)}return L&&B?n.apply(this,f):(R=this.thru(g),L?r?R.value()[0]:R.value():R)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Zt[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 o=this.value();return e.apply(T(o)?o:[],i)}return this[t](function(s){return e.apply(T(s)?s:[],i)})}}),fe(G.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";en.call(Xe,r)||(Xe[r]=[]),Xe[r].push({name:e,func:t})}}),Xe[dr(l,K).name]=[{name:"wrapper",func:l}],G.prototype.clone=Zf,G.prototype.reverse=Yf,G.prototype.value=Vf,u.prototype.at=Ch,u.prototype.chain=Lh,u.prototype.commit=Rh,u.prototype.next=Sh,u.prototype.plant=Eh,u.prototype.reverse=Th,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Oh,u.prototype.first=u.prototype.head,dt&&(u.prototype[dt]=bh),u},Ze=Rf();Pe?((Pe.exports=Ze)._=Ze,jr._=Ze):Rn._=Ze}).call(bt)})(Or,Or.exports);var Ug=Or.exports;const Mg=Up(Ug),lu=gn=>(zl("data-v-466f28c1"),gn=gn(),Kl(),gn),Dg={class:"my-order"},Ng=lu(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Gg={class:"nav-item-input"},Hg={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},zg=["onClick"],Kg={class:"shop-name"},qg={class:"shop-price"},kg={class:"unit-name"},Zg={key:0,class:"no-stock"},Yg=lu(()=>v("div",null,[v("span",null,"暂无"),v("span",null,"库存")],-1)),Vg=[Yg],Xg={key:1,class:"no-stock"},Jg=lu(()=>v("div",null,[v("span",null,"平台"),v("span",null,"关闭")],-1)),Qg=[Jg],jg={key:1,class:"no-data"},nv={__name:"shop",props:{storeList:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(gn,{expose:mn,emit:l}){const b=O(null),P=l,Z=O(""),I=()=>{P("loadMore",{store_name_code:Z.value})},U=x=>{if(x.is_used==0)return Et.error("该商品已被平台关闭");if(x.stock==0)return Et.warning("该商品无库存");P("changeItem",x)},rn=Mg.throttle(()=>{let x={store_name_code:Z.value};P("getStoreList",x,!0)},300);mn({name:Z,inputBlur:()=>{var x;(x=b.value)==null||x.blur()}});const J=O(!1),j=()=>{J.value=!0},bn=()=>{J.value=!1},q=()=>{var x;(x=b.value)==null||x.focus()};return $t(()=>{uu(()=>{var x;(x=b.value)==null||x.focus(),j()}),ne.on("shift",q)}),Ft(()=>{ne.off("shift",q)}),(x,un)=>{const $=tn("el-input"),K=tn("Search"),k=tn("el-icon"),Y=tn("el-button"),nn=tn("el-image"),S=tn("el-space"),y=tn("el-empty"),W=Tt("loading"),an=Tt("infinite-scroll");return X(),pn("div",Dg,[v("div",{class:Tr(["header-nav",{"input-focus":J.value}])},[Ng,v("div",Gg,[D($,{modelValue:Z.value,"onUpdate:modelValue":un[0]||(un[0]=H=>Z.value=H),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:b,onFocus:j,onBlur:bn,onKeyup:Hl(Er(rn),["enter"]),onClear:Er(rn)},null,8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:un[1]||(un[1]=(...H)=>Er(rn)&&Er(rn)(...H))},[D(Y,{class:"btn",type:"primary"},{default:sn(()=>[D(k,null,{default:sn(()=>[D(K)]),_:1})]),_:1})])],2),ou((X(),pn("div",Hg,[gn.storeList.length?(X(),Oe(S,{key:0,wrap:""},{default:sn(()=>[(X(!0),pn(Ot,null,Pt(gn.storeList,(H,Mn)=>(X(),pn("div",{class:"shop-item",key:Mn,onClick:qn=>U(H)},[D(nn,{loading:"lazy",src:H.image},null,8,["src"]),v("div",Kg,fn(H.store_name),1),v("div",qg,[An(" ¥"),v("span",null,fn(H.price),1),v("span",kg,"/"+fn(H.unit_name),1)]),H.stock==0?(X(),pn("div",Zg,Vg)):rt("",!0),H.is_used==0?(X(),pn("div",Xg,Qg)):rt("",!0)],8,zg))),128))]),_:1})):rt("",!0),gn.storeList.length?rt("",!0):(X(),pn("div",jg,[D(y,{"image-size":200,description:"没有找到对应商品"})]))])),[[W,gn.loading],[an,I]])])}}},ev=it(nv,[["__scopeId","data-v-466f28c1"]]),tv={class:"shop"},rv={class:"shop-info"},iv={class:"shop-info-left"},uv={class:"shop-info-right"},ov={class:"shop-info-right-top"},lv={class:"shop-info-right-price"},sv={style:{"font-size":"1rem",color:"#777"}},fv={class:"shop-sku"},av={class:"title"},cv={class:"sku"},hv={class:"dialog-footer"},_v={__name:"pupop",emits:["changeItem"],setup(gn,{expose:mn,emit:l}){const b=O(!1),P=O(null),Z=q=>{b.value=q},I=O({}),U=O(!1),rn=O("add"),hn=(q,x="add")=>{rn.value=x,I.value=JSON.parse(JSON.stringify(q))},J=l,j=()=>{I.value.cart_num||(I.value.cart_num=I.value.batch>0?I.value.batch:1),J("changeItem",I.value),b.value=!1};mn({show:Z,setForm:hn});const bn=()=>{b.value&&j()};return $t(()=>{ne.on("enter",bn)}),Ft(()=>{ne.off("enter",bn)}),(q,x)=>{const un=tn("el-image"),$=tn("el-input-number"),K=tn("el-button"),k=tn("el-dialog"),Y=Tt("loading");return X(),Oe(k,{modelValue:b.value,"onUpdate:modelValue":x[1]||(x[1]=nn=>b.value=nn),title:"购买数量",width:"650",onOpened:x[2]||(x[2]=nn=>P.value.focus())},Mp({default:sn(()=>[ou((X(),pn("div",tv,[v("div",rv,[v("div",iv,[D(un,{loading:"lazy",src:I.value.image},null,8,["src"])]),v("div",uv,[v("div",ov,fn(I.value.store_name),1),v("div",lv,[An(" ¥"),v("span",null,fn(I.value.price),1),v("span",sv," / "+fn(I.value.unit_name),1)])])]),v("div",fv,[v("div",av,"购买数量 ( "+fn(I.value.unit_name)+" )",1),v("div",cv,[D($,{ref_key:"inputRef",ref:P,precision:2,modelValue:I.value.cart_num,"onUpdate:modelValue":x[0]||(x[0]=nn=>I.value.cart_num=nn),placeholder:`请输入数量(默认为${+I.value.batch>0?I.value.batch:"1.00"})`,min:+I.value.batch>0?+I.value.batch:1,step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue","placeholder","min"])])])])),[[Y,U.value]])]),_:2},[rn.value!="add"&&I.value.attr&&I.value.attr.length==1?void 0:{name:"footer",fn:sn(()=>[v("div",hv,[D(K,{class:"ok-btn",type:"primary",onClick:j},{default:sn(()=>[An(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},dv=it(_v,[["__scopeId","data-v-0b57e9b5"]]),pv=["onClick","onMousemove"],gv=["onMousemove"],vv={class:"title"},mv={class:"list"},wv=["onClick"],xv={__name:"classify",emits:["getStoreList"],setup(gn,{emit:mn}){const l=mn,b=O([]),P=O([]),Z=O([]),I=O(-1),U=O(-1),rn=O(-1),hn=O(-1),J=O(!1),j=Pr();(()=>{iu({pid:0,page_no:1,page_size:30,level:1,store_id:j.userInfo.store_id}).then($=>{b.value=$.data.lists,I.value=-1})})();const q=$=>{iu({pid:$,page_no:1,page_size:30,level:2,store_id:j.userInfo.store_id}).then(K=>{P.value=K.data.lists})},x=$=>{iu({pid:$,page_no:1,page_size:30,level:3,store_id:j.userInfo.store_id}).then(K=>{Z.value=K.data.lists})},un=($=-1,K=1)=>{hn.value=$,J.value=!0;let k="",Y="";K==1?(I.value=$,U.value=-1,rn.value=-1,$!=-1&&(Y=b.value[$].id),q(Y)):K==2&&(U.value=$,rn.value=-1,$!=-1&&(Y=P.value[$].id),x(Y)),l("getStoreList",{cate_id:k,class_all:Y},!0)};return($,K)=>{const k=tn("el-popover");return X(),pn("div",{class:"classify",onMouseout:K[2]||(K[2]=Y=>J.value?J.value=!1:J.value=!0)},[v("div",{class:Tr(["itemP",{"itemP-active":I.value==-1}]),onClick:K[0]||(K[0]=Y=>un(-1))},fn("全部"),2),(X(!0),pn(Ot,null,Pt(b.value,(Y,nn)=>(X(),Oe(k,{placement:"left",width:"20rem",trigger:"click",key:nn,visible:nn==I.value&&hn.value==nn},{reference:sn(()=>[v("div",{class:Tr(["itemP",{"itemP-active":nn==I.value}]),onClick:S=>un(nn),onMousemove:S=>hn.value=nn},fn(Y.name),43,pv)]),default:sn(()=>[v("div",{class:"active-card",onMouseout:K[1]||(K[1]=S=>hn.value=-1),onMousemove:S=>hn.value=nn},[v("div",vv,fn(Y.name),1),v("div",mv,[(X(!0),pn(Ot,null,Pt(P.value,(S,y)=>(X(),pn("div",{class:Tr({"list-active":y==U.value}),link:"",type:"primary",key:S.id,onClick:W=>un(y,2)},fn(S.name),11,wv))),128))])],40,gv)]),_:2},1032,["visible"]))),128))],32)}}},yv=it(xv,[["__scopeId","data-v-00ca5f82"]]),Av={class:"my-card"},Ov={__name:"index",setup(gn){const mn=O(null),l=O(null),b=O(null),P=O(null),Z=O([]);Pr();const I=Dp(),U=O({page_no:1,page_size:30}),rn=O(!1),hn=(S={},y=!1)=>{U.value={...U.value,...S},y&&(Z.value=[],U.value.page_no=1,J.value=!1),rn.value=!0,Gp(U.value).then(W=>{var an,H;rn.value=!1,((H=(an=W.data)==null?void 0:an.lists)==null?void 0:H.length){J.value||hn(S)};function bn(S){return/^\d+$/.test(S)}const q=(S,y="")=>{console.log(S,y);let W={product_id:S.product_id,cart_num:S.cart_num};Gl(W).then(an=>{l.value.getList()})},x=(S,y)=>{mn.value.setForm(S,"add"),mn.value.show(!0)},un=S=>{mn.value.setForm(S,"edit"),mn.value.show(!0)},$=O({}),K=()=>{var W,an;let S=l.value.list.map(H=>H.id),y={cart_id:S,uid:((an=(W=l.value)==null?void 0:W.userInfo)==null?void 0:an.uid)||""};l.value.discounts>0&&(y.deduction_price=l.value.discounts.toFixed(2),y.pay_type="micropay"),Bp(y).then(H=>{var Mn,qn;$.value=H.data.order,P.value.setForm({data:H.data.order,cart_id:S,uid:((qn=(Mn=l.value)==null?void 0:Mn.userInfo)==null?void 0:qn.uid)||""})})},k=()=>{if(l.value.allPrice<500)return Et.error("订单金额不能低于500元");K(),P.value.drawer=!0},Y=(S=null)=>{setTimeout(()=>{l.value.getList()})},nn=()=>{I.name=="saleHome"&&(!P.value.drawer&&l.value.list.length>0?k():P.value.beforeClose())};return $t(()=>{hn(),ne.on("F9",nn)}),Ft(()=>{ne.off("F9",nn)}),(S,y)=>(X(),pn("div",Av,[D(Bg,{ref_key:"orderRef",ref:l,onGoPay:k,onEditPupop:un},null,512),D(Nl),D(ev,{ref_key:"shopRef",ref:b,style:{flex:"1"},storeList:Z.value,loading:rn.value,onGetStoreList:hn,onChangeItem:x,onLoadMore:j},null,8,["storeList","loading"]),D(dv,{ref_key:"pupopRef",ref:mn,onChangeItem:q},null,512),D(Nl),D(yv,{ref:"classifyRef",onGetStoreList:hn},null,512),D(Hp,{ref_key:"payRef",ref:P,onPaySuccess:Y},null,512)]))}};export{Ov as default}; +}`;var B=Ul(function(){return V(o,A+"return "+g).apply(l,s)});if(B.source=g,Zi(B))throw B;return B}function Gd(n){return Q(n).toLowerCase()}function Hd(n){return Q(n).toUpperCase()}function zd(n,e,t){if(n=Q(n),n&&(t||e===l))return qu(n);if(!n||!(e=Gn(e)))return n;var r=re(n),i=re(e),o=ku(r,i),s=Zu(r,i)+1;return Ee(r,o,s).join("")}function Kd(n,e,t){if(n=Q(n),n&&(t||e===l))return n.slice(0,Vu(n)+1);if(!n||!(e=Gn(e)))return n;var r=re(n),i=Zu(r,re(e))+1;return Ee(r,0,i).join("")}function qd(n,e,t){if(n=Q(n),n&&(t||e===l))return n.replace(Zr,"");if(!n||!(e=Gn(e)))return n;var r=re(n),i=ku(r,re(e));return Ee(r,i).join("")}function kd(n,e){var t=Mn,r=qn;if(dn(e)){var i="separator"in e?e.separator:i;t="length"in e?F(e.length):t,r="omission"in e?Gn(e.omission):r}n=Q(n);var o=n.length;if(qe(n)){var s=re(n);o=s.length}if(t>=o)return n;var f=t-ke(r);if(f<1)return r;var c=s?Ee(s,0,f).join(""):n.slice(0,f);if(i===l)return c+r;if(s&&(f+=c.length-f),Yi(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=ai(i.source,Q(_u.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var g=d.index;c=c.slice(0,g===l?f:g)}}else if(n.indexOf(Gn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function Zd(n){return n=Q(n),n&&rs.test(n)?n.replace(au,Af):n}var Yd=je(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Ji=Mo("toUpperCase");function Bl(n,e,t){return n=Q(n),e=t?l:e,e===l?vf(n)?Lf(n):sf(n):n.match(e)||[]}var Ul=M(function(n,e){try{return Dn(n,l,e)}catch(t){return Zi(t)?t:new E(t)}}),Vd=ve(function(n,e){return Zn(e,function(t){t=ce(t),pe(n,t,qi(n[t],n))}),n});function Xd(n){var e=n==null?0:n.length,t=C();return n=e?_n(n,function(r){if(typeof r[1]!="function")throw new Yn(I);return[t(r[0]),r[1]]}):[],M(function(r){for(var i=-1;++ile)return[];var t=se,r=En(n,se);e=C(e),n-=se;for(var i=li(r,e);++t0||e<0)?new G(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==l&&(e=F(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},G.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},G.prototype.toArray=function(){return this.take(se)},fe(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],o=r||/^find/.test(e);i&&(u.prototype[e]=function(){var s=this.__wrapped__,f=r?[1]:arguments,c=s instanceof G,d=f[0],p=c||T(s),g=function(N){var z=i.apply(u,Ie([N],f));return r&&m?z[0]:z};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var m=this.__chain__,A=!!this.__actions__.length,L=o&&!m,B=c&&!A;if(!o&&p){s=B?s:new G(this);var R=n.apply(s,f);return R.__actions__.push({func:yr,args:[g],thisArg:l}),new Vn(R,m)}return L&&B?n.apply(this,f):(R=this.thru(g),L?r?R.value()[0]:R.value():R)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Zt[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 o=this.value();return e.apply(T(o)?o:[],i)}return this[t](function(s){return e.apply(T(s)?s:[],i)})}}),fe(G.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";en.call(Xe,r)||(Xe[r]=[]),Xe[r].push({name:e,func:t})}}),Xe[dr(l,K).name]=[{name:"wrapper",func:l}],G.prototype.clone=Zf,G.prototype.reverse=Yf,G.prototype.value=Vf,u.prototype.at=Ch,u.prototype.chain=Lh,u.prototype.commit=Rh,u.prototype.next=Sh,u.prototype.plant=Eh,u.prototype.reverse=Th,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Oh,u.prototype.first=u.prototype.head,dt&&(u.prototype[dt]=bh),u},Ze=Rf();Pe?((Pe.exports=Ze)._=Ze,jr._=Ze):Rn._=Ze}).call(bt)})(Or,Or.exports);var Ug=Or.exports;const Mg=Up(Ug),lu=gn=>(zl("data-v-2a80ef6f"),gn=gn(),Kl(),gn),Dg={class:"my-order"},Ng=lu(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Gg={class:"nav-item-input"},Hg={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},zg=["onClick"],Kg={class:"shop-name"},qg={class:"shop-price"},kg={class:"unit-name"},Zg={key:0,class:"no-stock"},Yg=lu(()=>v("div",null,[v("span",null,"暂无"),v("span",null,"库存")],-1)),Vg=[Yg],Xg={key:1,class:"no-stock"},Jg=lu(()=>v("div",null,[v("span",null,"平台"),v("span",null,"关闭")],-1)),Qg=[Jg],jg={key:1,class:"no-data"},nv={__name:"shop",props:{storeList:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(gn,{expose:mn,emit:l}){const b=O(null),P=l,Z=O(""),I=()=>{P("loadMore",{store_name_code:Z.value})},U=x=>{if(x.is_used==0)return Et.error("该商品已被平台关闭");if(x.stock==0)return Et.warning("该商品无库存");P("changeItem",x)},rn=Mg.throttle(()=>{let x={store_name_code:Z.value};P("getStoreList",x,!0)},300);mn({name:Z,inputBlur:()=>{var x;(x=b.value)==null||x.blur()}});const J=O(!1),j=()=>{J.value=!0},bn=()=>{J.value=!1},q=()=>{var x;(x=b.value)==null||x.focus()};return $t(()=>{uu(()=>{var x;(x=b.value)==null||x.focus(),j()}),ne.on("shift",q)}),Ft(()=>{ne.off("shift",q)}),(x,un)=>{const $=tn("el-input"),K=tn("Search"),k=tn("el-icon"),Y=tn("el-button"),nn=tn("el-image"),S=tn("el-space"),y=tn("el-empty"),W=Tt("loading"),an=Tt("infinite-scroll");return X(),pn("div",Dg,[v("div",{class:Tr(["header-nav",{"input-focus":J.value}])},[Ng,v("div",Gg,[D($,{modelValue:Z.value,"onUpdate:modelValue":un[0]||(un[0]=H=>Z.value=H),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:b,onFocus:j,onBlur:bn,onKeyup:Hl(Er(rn),["enter"]),onClear:Er(rn)},null,8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:un[1]||(un[1]=(...H)=>Er(rn)&&Er(rn)(...H))},[D(Y,{class:"btn",type:"primary"},{default:sn(()=>[D(k,null,{default:sn(()=>[D(K)]),_:1})]),_:1})])],2),ou((X(),pn("div",Hg,[gn.storeList.length?(X(),Oe(S,{key:0,wrap:"",size:14},{default:sn(()=>[(X(!0),pn(Ot,null,Pt(gn.storeList,(H,Mn)=>(X(),pn("div",{class:"shop-item",key:Mn,onClick:qn=>U(H)},[D(nn,{loading:"lazy",src:H.image},null,8,["src"]),v("div",Kg,fn(H.store_name),1),v("div",qg,[An(" ¥"),v("span",null,fn(H.price),1),v("span",kg,"/"+fn(H.unit_name),1)]),H.stock==0?(X(),pn("div",Zg,Vg)):rt("",!0),H.is_used==0?(X(),pn("div",Xg,Qg)):rt("",!0)],8,zg))),128))]),_:1})):rt("",!0),gn.storeList.length?rt("",!0):(X(),pn("div",jg,[D(y,{"image-size":200,description:"没有找到对应商品"})]))])),[[W,gn.loading],[an,I]])])}}},ev=it(nv,[["__scopeId","data-v-2a80ef6f"]]),tv={class:"shop"},rv={class:"shop-info"},iv={class:"shop-info-left"},uv={class:"shop-info-right"},ov={class:"shop-info-right-top"},lv={class:"shop-info-right-price"},sv={style:{"font-size":"1rem",color:"#777"}},fv={class:"shop-sku"},av={class:"title"},cv={class:"sku"},hv={class:"dialog-footer"},_v={__name:"pupop",emits:["changeItem"],setup(gn,{expose:mn,emit:l}){const b=O(!1),P=O(null),Z=q=>{b.value=q},I=O({}),U=O(!1),rn=O("add"),hn=(q,x="add")=>{rn.value=x,I.value=JSON.parse(JSON.stringify(q))},J=l,j=()=>{I.value.cart_num||(I.value.cart_num=I.value.batch>0?I.value.batch:1),J("changeItem",I.value),b.value=!1};mn({show:Z,setForm:hn});const bn=()=>{b.value&&j()};return $t(()=>{ne.on("enter",bn)}),Ft(()=>{ne.off("enter",bn)}),(q,x)=>{const un=tn("el-image"),$=tn("el-input-number"),K=tn("el-button"),k=tn("el-dialog"),Y=Tt("loading");return X(),Oe(k,{modelValue:b.value,"onUpdate:modelValue":x[1]||(x[1]=nn=>b.value=nn),title:"购买数量",width:"650",onOpened:x[2]||(x[2]=nn=>P.value.focus())},Mp({default:sn(()=>[ou((X(),pn("div",tv,[v("div",rv,[v("div",iv,[D(un,{loading:"lazy",src:I.value.image},null,8,["src"])]),v("div",uv,[v("div",ov,fn(I.value.store_name),1),v("div",lv,[An(" ¥"),v("span",null,fn(I.value.price),1),v("span",sv," / "+fn(I.value.unit_name),1)])])]),v("div",fv,[v("div",av,"购买数量 ( "+fn(I.value.unit_name)+" )",1),v("div",cv,[D($,{ref_key:"inputRef",ref:P,precision:2,modelValue:I.value.cart_num,"onUpdate:modelValue":x[0]||(x[0]=nn=>I.value.cart_num=nn),placeholder:`请输入数量(默认为${+I.value.batch>0?I.value.batch:"1.00"})`,min:+I.value.batch>0?+I.value.batch:1,step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue","placeholder","min"])])])])),[[Y,U.value]])]),_:2},[rn.value!="add"&&I.value.attr&&I.value.attr.length==1?void 0:{name:"footer",fn:sn(()=>[v("div",hv,[D(K,{class:"ok-btn",type:"primary",onClick:j},{default:sn(()=>[An(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},dv=it(_v,[["__scopeId","data-v-0b57e9b5"]]),pv=["onClick","onMousemove"],gv=["onMousemove"],vv={class:"title"},mv={class:"list"},wv=["onClick"],xv={__name:"classify",emits:["getStoreList"],setup(gn,{emit:mn}){const l=mn,b=O([]),P=O([]),Z=O([]),I=O(-1),U=O(-1),rn=O(-1),hn=O(-1),J=O(!1),j=Pr();(()=>{iu({pid:0,page_no:1,page_size:30,level:1,store_id:j.userInfo.store_id}).then($=>{b.value=$.data.lists,I.value=-1})})();const q=$=>{iu({pid:$,page_no:1,page_size:30,level:2,store_id:j.userInfo.store_id}).then(K=>{P.value=K.data.lists})},x=$=>{iu({pid:$,page_no:1,page_size:30,level:3,store_id:j.userInfo.store_id}).then(K=>{Z.value=K.data.lists})},un=($=-1,K=1)=>{hn.value=$,J.value=!0;let k="",Y="";K==1?(I.value=$,U.value=-1,rn.value=-1,$!=-1&&(Y=b.value[$].id),q(Y)):K==2&&(U.value=$,rn.value=-1,$!=-1&&(Y=P.value[$].id),x(Y)),l("getStoreList",{cate_id:k,class_all:Y},!0)};return($,K)=>{const k=tn("el-popover");return X(),pn("div",{class:"classify",onMouseout:K[2]||(K[2]=Y=>J.value?J.value=!1:J.value=!0)},[v("div",{class:Tr(["itemP",{"itemP-active":I.value==-1}]),onClick:K[0]||(K[0]=Y=>un(-1))},fn("全部"),2),(X(!0),pn(Ot,null,Pt(b.value,(Y,nn)=>(X(),Oe(k,{placement:"left",width:"20rem",trigger:"click",key:nn,visible:nn==I.value&&hn.value==nn},{reference:sn(()=>[v("div",{class:Tr(["itemP",{"itemP-active":nn==I.value}]),onClick:S=>un(nn),onMousemove:S=>hn.value=nn},fn(Y.name),43,pv)]),default:sn(()=>[v("div",{class:"active-card",onMouseout:K[1]||(K[1]=S=>hn.value=-1),onMousemove:S=>hn.value=nn},[v("div",vv,fn(Y.name),1),v("div",mv,[(X(!0),pn(Ot,null,Pt(P.value,(S,y)=>(X(),pn("div",{class:Tr({"list-active":y==U.value}),link:"",type:"primary",key:S.id,onClick:W=>un(y,2)},fn(S.name),11,wv))),128))])],40,gv)]),_:2},1032,["visible"]))),128))],32)}}},yv=it(xv,[["__scopeId","data-v-00ca5f82"]]),Av={class:"my-card"},Ov={__name:"index",setup(gn){const mn=O(null),l=O(null),b=O(null),P=O(null),Z=O([]);Pr();const I=Dp(),U=O({page_no:1,page_size:30}),rn=O(!1),hn=(S={},y=!1)=>{U.value={...U.value,...S},y&&(Z.value=[],U.value.page_no=1,J.value=!1),rn.value=!0,Gp(U.value).then(W=>{var an,H;rn.value=!1,((H=(an=W.data)==null?void 0:an.lists)==null?void 0:H.length){J.value||hn(S)};function bn(S){return/^\d+$/.test(S)}const q=(S,y="")=>{console.log(S,y);let W={product_id:S.product_id,cart_num:S.cart_num};Gl(W).then(an=>{l.value.getList()})},x=(S,y)=>{mn.value.setForm(S,"add"),mn.value.show(!0)},un=S=>{mn.value.setForm(S,"edit"),mn.value.show(!0)},$=O({}),K=()=>{var W,an;let S=l.value.list.map(H=>H.id),y={cart_id:S,uid:((an=(W=l.value)==null?void 0:W.userInfo)==null?void 0:an.uid)||""};l.value.discounts>0&&(y.deduction_price=l.value.discounts.toFixed(2),y.pay_type="micropay"),Bp(y).then(H=>{var Mn,qn;$.value=H.data.order,P.value.setForm({data:H.data.order,cart_id:S,uid:((qn=(Mn=l.value)==null?void 0:Mn.userInfo)==null?void 0:qn.uid)||""})})},k=()=>{if(l.value.allPrice<500)return Et.error("订单金额不能低于500元");K(),P.value.drawer=!0},Y=(S=null)=>{setTimeout(()=>{l.value.getList()})},nn=()=>{I.name=="saleHome"&&(!P.value.drawer&&l.value.list.length>0?k():P.value.beforeClose())};return $t(()=>{hn(),ne.on("F9",nn)}),Ft(()=>{ne.off("F9",nn)}),(S,y)=>(X(),pn("div",Av,[D(Bg,{ref_key:"orderRef",ref:l,onGoPay:k,onEditPupop:un},null,512),D(Nl),D(ev,{ref_key:"shopRef",ref:b,style:{flex:"1"},storeList:Z.value,loading:rn.value,onGetStoreList:hn,onChangeItem:x,onLoadMore:j},null,8,["storeList","loading"]),D(dv,{ref_key:"pupopRef",ref:mn,onChangeItem:q},null,512),D(Nl),D(yv,{ref:"classifyRef",onGetStoreList:hn},null,512),D(Hp,{ref_key:"payRef",ref:P,onPaySuccess:Y},null,512)]))}};export{Ov as default}; diff --git a/dist/assets/index-DudCf6-k.js b/dist/assets/index-BWXGAaVp.js similarity index 98% rename from dist/assets/index-DudCf6-k.js rename to dist/assets/index-BWXGAaVp.js index 29009d0..1e673d9 100644 --- a/dist/assets/index-DudCf6-k.js +++ b/dist/assets/index-BWXGAaVp.js @@ -1 +1 @@ -import{_ as G,u as H,r as n,o as J,m as V,a as Q,b as v,h as R,c as s,k as o,e,f as _,w as g,g as b,i as te,j as F,F as A,l as E,z as K,t as l,d as j,p as k,q as W,s as X,C as se}from"./index-C4rRmnc5.js";import{s as oe,d as ae,e as ie}from"./store-BxeA20BY.js";import{h as q}from"./moment-Cl4UOzQZ.js";import{p as le}from"./pay-D6lAYrB4.js";import{p as ne}from"./padding-BA_o-z8h.js";/* empty css */const de=f=>(W("data-v-4002e8c0"),f=f(),X(),f),_e={class:"my-order"},ce={class:"header-nav"},re=de(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),ue={class:"nav-item-btn"},ve={class:"header-input"},pe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},fe=["onClick"],me={class:"top"},he={class:"create-time"},ye={class:"shop"},ge={key:0,class:"left"},ke={key:0,class:"shop-name"},$e={class:"right"},be={class:"money"},we={class:"count"},De={class:"bottom"},Se={class:"pay"},Ve={key:0},ze={key:1},Ce={key:2},Ye={key:3},xe={key:4},Pe={key:5},Re={key:1,style:{color:"#ff4a00"}},Ie={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}){H(),n([]);const t=n(1),m=r=>{c.value.page_no=1,w.value=!1,y.value=!1,d.value=[],$(!0)};n(null);const h=n(""),I=()=>{c.value.start_time=q(h.value[0]).format("YYYY-MM-DD 00:00:00"),c.value.end_time=q(h.value[1]).format("YYYY-MM-DD 23:59:59"),$(!0)},u=r=>r.getTime()>Date.now(),c=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),y=n(!1),L=n(0),S=n(0),w=n(!1),d=n([]),$=(r=!1)=>{if(r)c.value.page_no=1;else if(w.value||y.value)return;y.value=!0,t.value==1&&(c.value.paid=null),t.value==2&&(c.value.paid=0),oe(c.value).then(i=>{r?d.value=i.data.lists:d.value=[...d.value,...i.data.lists],c.value.page_no==1&&d.value.length>0&&V.emit("set-sale-order-detail",d.value[0]),i.data.lists.length{w.value=!0,y.value=!1})},M=(r,i)=>{S.value=i,V.emit("set-sale-order-detail",r)};return D({getOrderList:$}),J(()=>{V.on("update-sale-order-detail",r=>{console.log("==="),d.value[S.value].paid=1})}),Q(()=>{V.off("update-sale-order-detail")}),(r,i)=>{const z=v("el-radio-button"),B=v("el-radio-group"),N=v("el-date-picker"),T=v("el-button"),C=v("el-input"),Y=v("el-image"),x=v("spna"),P=R("loading"),Z=R("infinite-scroll");return s(),o("div",_e,[e("div",ce,[re,e("div",ue,[_(B,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),onChange:m,size:"small"},{default:g(()=>[_(z,{value:1},{default:g(()=>[b("全部")]),_:1}),_(z,{value:2},{default:g(()=>[b("未支付")]),_:1})]),_:1},8,["modelValue"]),_(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":u,onChange:I,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ve,[_(C,{modelValue:c.value.order_id,"onUpdate:modelValue":i[3]||(i[3]=a=>c.value.order_id=a),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=te(a=>$(!0),["enter"])),onClear:i[5]||(i[5]=a=>$(!0)),clearable:""},{append:g(()=>[_(T,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[2]||(i[2]=a=>$(!0))},{default:g(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),F((s(),o("div",pe,[(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=>M(a,U)},[e("div",me,[e("div",{class:K(["sn","cahier"])},"单号: "+l(a.order_id),1),e("div",he,l(a.pay_time),1)]),e("div",ye,[a.product_info?(s(),o("div",ge,[(s(!0),o(A,null,E(a.product_info.slice(0,5),(O,ee)=>(s(),j(Y,{key:ee,src:O.image,class:"shop-img"},null,8,["src"]))),128)),a.product_info.length==1?(s(),o("div",ke,l(a.product_info[0].store_name),1)):k("",!0)])):k("",!0),e("div",$e,[e("div",be,"¥"+l(a.pay_price),1),e("div",we,"共"+l(a.product_info.length)+"款商品",1)])]),e("div",De,[e("div",Se,[a.paid?(s(),o("div",Ve,[b(l(a.paid_name)+" ",1),a.pay_type_name?(s(),j(x,{key:0},{default:g(()=>[b("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",ze,"(微信收款)")):a.pay_type==17?(s(),o("span",Ce,"(现金支付)")):a.pay_type==13?(s(),o("span",Ye,"(支付宝收款)")):a.pay_type==3?(s(),o("span",xe,"(余额支付)")):a.pay_type==1?(s(),o("span",Pe,"(微信支付)")):k("",!0)])):(s(),o("div",Re,l(a.paid_name),1))])])],10,fe))),128)),w.value?(s(),o("div",Ie,"没有更多了")):k("",!0),y.value?(s(),o("div",Le,"加载中...")):k("",!0)])),[[P,y.value],[Z,$]])])}}},Be=G(Me,[["__scopeId","data-v-4002e8c0"]]),p=f=>(W("data-v-d6d231a6"),f=f(),X(),f),Ne={class:"my-order"},Te={key:0,class:"detail"},Ue={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Fe=p(()=>e("div",{class:"table-title"},"订单信息",-1)),Oe={class:"table-info"},Ae={class:"info-item"},Ee=p(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ke={class:"info-item-info"},je={class:"info-item"},qe=p(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=p(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=p(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=p(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=p(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=p(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},ct=p(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),rt={class:"info-item-info"},ut={key:0},vt={key:1},pt={key:2},ft={key:3},mt={key:4},ht={key:5},yt={key:0,class:"table-title"},gt={key:1,class:"table-info"},kt={class:"info-item"},$t=p(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),bt={class:"info-item-info"},wt={class:"info-item"},Dt=p(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),St={class:"info-item-info"},Vt={class:"info-item"},zt=p(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Ct={class:"info-item-info"},Yt={style:{"font-size":"0.9rem"}},xt={style:{color:"#ff4a00"}},Pt={style:{display:"flex","align-items":"center"}},Rt={style:{"margin-left":"0.5rem"}},It={key:0,class:"footer"},Lt={key:1},Mt={__name:"detail",emits:["rePaySuccess"],setup(f,{emit:D}){H(),se();const t=n({id:""});n([]);const m=n(null),h=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const I=()=>{m.value.setForm({isRePay:!0,data:t.value}),m.value.drawer=!0},u=n({page_no:1,page_size:15,loadend:!1,loading:!1}),c=n([]),y=()=>{console.log("触底"),t.value.id&&!u.value.loadend&&(console.log("加载"),u.value.loading=!0,ae({pid:t.value.id,page_no:u.value.page_no,page_size:u.value.page_size}).then(d=>{c.value=[...c.value,...d.data.lists],d.data.lists.length{h.value=!0,ie({id:t.value.id}).then(d=>{t.value=d.data,setTimeout(()=>{h.value=!1},200)})},S=D,w=(d=null)=>{setTimeout(()=>{S("rePaySuccess")})};return J(()=>{V.on("set-sale-order-detail",d=>{console.log("===",d),t.value=d,u.value.page_no=1,u.value.loadend=!1,u.value.loading=!1,c.value=[],L()})}),Q(()=>{V.off("set-sale-order-detail")}),(d,$)=>{var C;const M=v("el-image"),r=v("el-table-column"),i=v("el-table"),z=v("el-button"),B=v("el-empty"),N=R("infinite-scroll"),T=R("loading");return s(),o("div",Ne,[t.value.id?F((s(),o("div",Te,[F((s(),o("div",Ue,[Fe,e("div",Oe,[e("div",Ae,[Ee,e("div",Ke,l(t.value.order_id),1)]),e("div",je,[qe,e("div",Ge,l(t.value.total_num||0),1)]),e("div",He,[Je,e("div",Qe,"¥"+l(t.value.total_price),1)]),e("div",We,[Xe,e("div",Ze,l(t.value.pay_time),1)]),e("div",et,[tt,e("div",st,"¥"+l(t.value.deduction_price),1)]),e("div",ot,[at,e("div",it,"¥"+l(t.value.pay_price),1)]),e("div",lt,[nt,e("div",dt,l(t.value.pay_time),1)]),e("div",_t,[ct,e("div",rt,[t.value.pay_type_name?(s(),o("span",ut,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",vt,"微信收款")):t.value.pay_type==17?(s(),o("span",pt,"现金支付")):t.value.pay_type==13?(s(),o("span",ft,"支付宝收款")):t.value.pay_type==3?(s(),o("span",mt,"余额支付")):t.value.pay_type==1?(s(),o("span",ht,"微信支付")):k("",!0)])])]),t.value.uid?(s(),o("div",yt,"用户信息")):k("",!0),t.value.uid?(s(),o("div",gt,[e("div",kt,[$t,e("div",bt,l(t.value.uid),1)]),e("div",wt,[Dt,e("div",St,l(t.value.nickname),1)]),e("div",Vt,[zt,e("div",Ct,l(t.value.mobile),1)])])):k("",!0),e("div",Yt,[b(" 共计 "),e("span",xt,l(((C=t.value.product)==null?void 0:C.length)||" "),1),b(" 款商品 ")]),_(i,{data:t.value.product},{default:g(()=>[_(r,{label:"商品信息"},{default:g(({row:Y})=>{var x,P;return[e("div",Pt,[_(M,{style:{height:"3rem",width:"3rem"},src:(x=Y.cart_info)==null?void 0:x.image},null,8,["src"]),e("span",Rt,l((P=Y.cart_info)==null?void 0:P.name),1)])]}),_:1}),_(r,{prop:"cart_info.price",label:"单价",width:"150"}),_(r,{prop:"cart_info.cart_num",label:"数量",width:"150"}),_(r,{prop:"cart_info.total_price",label:"总价",width:"150"})]),_:1},8,["data"])])),[[N,y]]),t.value.paid?k("",!0):(s(),o("div",It,[_(z,{type:"primary",size:"large",onClick:I},{default:g(()=>[b("重新支付")]),_:1})]))])),[[T,h.value]]):(s(),o("div",Lt,[_(B)])),_(le,{ref_key:"payRef",ref:m,onPaySuccess:w},null,512)])}}},Bt=G(Mt,[["__scopeId","data-v-d6d231a6"]]),Nt={class:"my-card"},Kt={__name:"index",setup(f){const D=n(null),t=()=>{var m;(m=D.value)==null||m.getOrderList(!0)};return(m,h)=>(s(),o("div",Nt,[_(Be,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:D},null,512),_(ne),_(Bt,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{Kt as default}; +import{_ as G,u as H,r as n,o as J,m as V,a as Q,b as v,h as R,c as s,k as o,e,f as _,w as g,g as b,i as te,j as F,F as A,l as E,z as K,t as l,d as j,p as k,q as W,s as X,C as se}from"./index-DcwaEiyg.js";import{s as oe,d as ae,e as ie}from"./store-85zRAkSB.js";import{h as q}from"./moment-Cl4UOzQZ.js";import{p as le}from"./pay-CEy1hIkd.js";import{p as ne}from"./padding-CG_WCVSK.js";/* empty css */const de=f=>(W("data-v-4002e8c0"),f=f(),X(),f),_e={class:"my-order"},ce={class:"header-nav"},re=de(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),ue={class:"nav-item-btn"},ve={class:"header-input"},pe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},fe=["onClick"],me={class:"top"},he={class:"create-time"},ye={class:"shop"},ge={key:0,class:"left"},ke={key:0,class:"shop-name"},$e={class:"right"},be={class:"money"},we={class:"count"},De={class:"bottom"},Se={class:"pay"},Ve={key:0},ze={key:1},Ce={key:2},Ye={key:3},xe={key:4},Pe={key:5},Re={key:1,style:{color:"#ff4a00"}},Ie={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}){H(),n([]);const t=n(1),m=r=>{c.value.page_no=1,w.value=!1,y.value=!1,d.value=[],$(!0)};n(null);const h=n(""),I=()=>{c.value.start_time=q(h.value[0]).format("YYYY-MM-DD 00:00:00"),c.value.end_time=q(h.value[1]).format("YYYY-MM-DD 23:59:59"),$(!0)},u=r=>r.getTime()>Date.now(),c=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),y=n(!1),L=n(0),S=n(0),w=n(!1),d=n([]),$=(r=!1)=>{if(r)c.value.page_no=1;else if(w.value||y.value)return;y.value=!0,t.value==1&&(c.value.paid=null),t.value==2&&(c.value.paid=0),oe(c.value).then(i=>{r?d.value=i.data.lists:d.value=[...d.value,...i.data.lists],c.value.page_no==1&&d.value.length>0&&V.emit("set-sale-order-detail",d.value[0]),i.data.lists.length{w.value=!0,y.value=!1})},M=(r,i)=>{S.value=i,V.emit("set-sale-order-detail",r)};return D({getOrderList:$}),J(()=>{V.on("update-sale-order-detail",r=>{console.log("==="),d.value[S.value].paid=1})}),Q(()=>{V.off("update-sale-order-detail")}),(r,i)=>{const z=v("el-radio-button"),B=v("el-radio-group"),N=v("el-date-picker"),T=v("el-button"),C=v("el-input"),Y=v("el-image"),x=v("spna"),P=R("loading"),Z=R("infinite-scroll");return s(),o("div",_e,[e("div",ce,[re,e("div",ue,[_(B,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),onChange:m,size:"small"},{default:g(()=>[_(z,{value:1},{default:g(()=>[b("全部")]),_:1}),_(z,{value:2},{default:g(()=>[b("未支付")]),_:1})]),_:1},8,["modelValue"]),_(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":u,onChange:I,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ve,[_(C,{modelValue:c.value.order_id,"onUpdate:modelValue":i[3]||(i[3]=a=>c.value.order_id=a),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=te(a=>$(!0),["enter"])),onClear:i[5]||(i[5]=a=>$(!0)),clearable:""},{append:g(()=>[_(T,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[2]||(i[2]=a=>$(!0))},{default:g(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),F((s(),o("div",pe,[(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=>M(a,U)},[e("div",me,[e("div",{class:K(["sn","cahier"])},"单号: "+l(a.order_id),1),e("div",he,l(a.pay_time),1)]),e("div",ye,[a.product_info?(s(),o("div",ge,[(s(!0),o(A,null,E(a.product_info.slice(0,5),(O,ee)=>(s(),j(Y,{key:ee,src:O.image,class:"shop-img"},null,8,["src"]))),128)),a.product_info.length==1?(s(),o("div",ke,l(a.product_info[0].store_name),1)):k("",!0)])):k("",!0),e("div",$e,[e("div",be,"¥"+l(a.pay_price),1),e("div",we,"共"+l(a.product_info.length)+"款商品",1)])]),e("div",De,[e("div",Se,[a.paid?(s(),o("div",Ve,[b(l(a.paid_name)+" ",1),a.pay_type_name?(s(),j(x,{key:0},{default:g(()=>[b("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",ze,"(微信收款)")):a.pay_type==17?(s(),o("span",Ce,"(现金支付)")):a.pay_type==13?(s(),o("span",Ye,"(支付宝收款)")):a.pay_type==3?(s(),o("span",xe,"(余额支付)")):a.pay_type==1?(s(),o("span",Pe,"(微信支付)")):k("",!0)])):(s(),o("div",Re,l(a.paid_name),1))])])],10,fe))),128)),w.value?(s(),o("div",Ie,"没有更多了")):k("",!0),y.value?(s(),o("div",Le,"加载中...")):k("",!0)])),[[P,y.value],[Z,$]])])}}},Be=G(Me,[["__scopeId","data-v-4002e8c0"]]),p=f=>(W("data-v-d6d231a6"),f=f(),X(),f),Ne={class:"my-order"},Te={key:0,class:"detail"},Ue={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Fe=p(()=>e("div",{class:"table-title"},"订单信息",-1)),Oe={class:"table-info"},Ae={class:"info-item"},Ee=p(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ke={class:"info-item-info"},je={class:"info-item"},qe=p(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=p(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=p(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=p(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=p(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=p(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},ct=p(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),rt={class:"info-item-info"},ut={key:0},vt={key:1},pt={key:2},ft={key:3},mt={key:4},ht={key:5},yt={key:0,class:"table-title"},gt={key:1,class:"table-info"},kt={class:"info-item"},$t=p(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),bt={class:"info-item-info"},wt={class:"info-item"},Dt=p(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),St={class:"info-item-info"},Vt={class:"info-item"},zt=p(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Ct={class:"info-item-info"},Yt={style:{"font-size":"0.9rem"}},xt={style:{color:"#ff4a00"}},Pt={style:{display:"flex","align-items":"center"}},Rt={style:{"margin-left":"0.5rem"}},It={key:0,class:"footer"},Lt={key:1},Mt={__name:"detail",emits:["rePaySuccess"],setup(f,{emit:D}){H(),se();const t=n({id:""});n([]);const m=n(null),h=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const I=()=>{m.value.setForm({isRePay:!0,data:t.value}),m.value.drawer=!0},u=n({page_no:1,page_size:15,loadend:!1,loading:!1}),c=n([]),y=()=>{console.log("触底"),t.value.id&&!u.value.loadend&&(console.log("加载"),u.value.loading=!0,ae({pid:t.value.id,page_no:u.value.page_no,page_size:u.value.page_size}).then(d=>{c.value=[...c.value,...d.data.lists],d.data.lists.length{h.value=!0,ie({id:t.value.id}).then(d=>{t.value=d.data,setTimeout(()=>{h.value=!1},200)})},S=D,w=(d=null)=>{setTimeout(()=>{S("rePaySuccess")})};return J(()=>{V.on("set-sale-order-detail",d=>{console.log("===",d),t.value=d,u.value.page_no=1,u.value.loadend=!1,u.value.loading=!1,c.value=[],L()})}),Q(()=>{V.off("set-sale-order-detail")}),(d,$)=>{var C;const M=v("el-image"),r=v("el-table-column"),i=v("el-table"),z=v("el-button"),B=v("el-empty"),N=R("infinite-scroll"),T=R("loading");return s(),o("div",Ne,[t.value.id?F((s(),o("div",Te,[F((s(),o("div",Ue,[Fe,e("div",Oe,[e("div",Ae,[Ee,e("div",Ke,l(t.value.order_id),1)]),e("div",je,[qe,e("div",Ge,l(t.value.total_num||0),1)]),e("div",He,[Je,e("div",Qe,"¥"+l(t.value.total_price),1)]),e("div",We,[Xe,e("div",Ze,l(t.value.pay_time),1)]),e("div",et,[tt,e("div",st,"¥"+l(t.value.deduction_price),1)]),e("div",ot,[at,e("div",it,"¥"+l(t.value.pay_price),1)]),e("div",lt,[nt,e("div",dt,l(t.value.pay_time),1)]),e("div",_t,[ct,e("div",rt,[t.value.pay_type_name?(s(),o("span",ut,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",vt,"微信收款")):t.value.pay_type==17?(s(),o("span",pt,"现金支付")):t.value.pay_type==13?(s(),o("span",ft,"支付宝收款")):t.value.pay_type==3?(s(),o("span",mt,"余额支付")):t.value.pay_type==1?(s(),o("span",ht,"微信支付")):k("",!0)])])]),t.value.uid?(s(),o("div",yt,"用户信息")):k("",!0),t.value.uid?(s(),o("div",gt,[e("div",kt,[$t,e("div",bt,l(t.value.uid),1)]),e("div",wt,[Dt,e("div",St,l(t.value.nickname),1)]),e("div",Vt,[zt,e("div",Ct,l(t.value.mobile),1)])])):k("",!0),e("div",Yt,[b(" 共计 "),e("span",xt,l(((C=t.value.product)==null?void 0:C.length)||" "),1),b(" 款商品 ")]),_(i,{data:t.value.product},{default:g(()=>[_(r,{label:"商品信息"},{default:g(({row:Y})=>{var x,P;return[e("div",Pt,[_(M,{style:{height:"3rem",width:"3rem"},src:(x=Y.cart_info)==null?void 0:x.image},null,8,["src"]),e("span",Rt,l((P=Y.cart_info)==null?void 0:P.name),1)])]}),_:1}),_(r,{prop:"cart_info.price",label:"单价",width:"150"}),_(r,{prop:"cart_info.cart_num",label:"数量",width:"150"}),_(r,{prop:"cart_info.total_price",label:"总价",width:"150"})]),_:1},8,["data"])])),[[N,y]]),t.value.paid?k("",!0):(s(),o("div",It,[_(z,{type:"primary",size:"large",onClick:I},{default:g(()=>[b("重新支付")]),_:1})]))])),[[T,h.value]]):(s(),o("div",Lt,[_(B)])),_(le,{ref_key:"payRef",ref:m,onPaySuccess:w},null,512)])}}},Bt=G(Mt,[["__scopeId","data-v-d6d231a6"]]),Nt={class:"my-card"},Kt={__name:"index",setup(f){const D=n(null),t=()=>{var m;(m=D.value)==null||m.getOrderList(!0)};return(m,h)=>(s(),o("div",Nt,[_(Be,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:D},null,512),_(ne),_(Bt,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{Kt as default}; diff --git a/dist/assets/index-ITkwvMbx.js b/dist/assets/index-Bi9cdaPf.js similarity index 94% rename from dist/assets/index-ITkwvMbx.js rename to dist/assets/index-Bi9cdaPf.js index f02b979..370ce4f 100644 --- a/dist/assets/index-ITkwvMbx.js +++ b/dist/assets/index-Bi9cdaPf.js @@ -1 +1 @@ -import{a as B,b as L}from"./shop-Bs3DGR4g.js";import{r as f,b as s,h as v,c as i,k as b,f as e,w as t,j as N,g as r,d,p as y,E as A}from"./index-C4rRmnc5.js";const D={class:"my-card put-storage"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},T={__name:"index",setup(S){const u=f([]),a=f({page_no:1,page_size:20,loadend:!1,type:1}),_=f(!1),c=()=>{a.value.loadend||(_.value=!0,B({page_no:a.value.page_no,page_size:a.value.page_size,type:a.value.type}).then(n=>{u.value=[...u.value,...n.data.lists],n.data.lists.length{a.value.page_no=1,a.value.loadend=!1,u.value=[],c()},k=async n=>{L({id:n.id}).then(p=>{n.status=1,A.success("入库成功")})};return(n,p)=>{const g=s("el-radio-button"),x=s("el-radio-group"),o=s("el-table-column"),C=s("el-image"),m=s("el-tag"),V=s("el-button"),E=s("el-table"),w=v("loading"),z=v("infinite-scroll");return i(),b("div",D,[e(x,{style:{"margin-bottom":"20px"},modelValue:a.value.type,"onUpdate:modelValue":p[0]||(p[0]=l=>a.value.type=l),onChange:h},{default:t(()=>[e(g,{label:1,value:1},{default:t(()=>[r("售卖库存")]),_:1}),e(g,{label:2,value:2},{default:t(()=>[r("兑换库存")]),_:1})]),_:1},8,["modelValue"]),N((i(),b("div",I,[e(E,{data:u.value},{default:t(()=>[e(o,{label:"导入人员",prop:"admin_name"}),e(o,{label:"门店确认人员",prop:"staff_name"}),e(o,{label:"商品图",prop:"image"},{default:t(({row:l})=>[e(C,{class:"image",src:l.image},null,8,["src"])]),_:1}),e(o,{label:"商品",prop:"store_name"}),e(o,{label:"数量",prop:"nums"}),e(o,{label:"状态",prop:"status"},{default:t(({row:l})=>[l.status===1?(i(),d(m,{key:0,type:"success"},{default:t(()=>[r("已入库")]),_:1})):l.status===0?(i(),d(m,{key:1,type:"warning"},{default:t(()=>[r("待确认")]),_:1})):l.status===-1?(i(),d(m,{key:2,type:"danger"},{default:t(()=>[r("库存不足")]),_:1})):y("",!0)]),_:1}),e(o,{label:"备注",prop:"mark"}),e(o,{label:"操作",width:"120",fixed:"right"},{default:t(({row:l})=>[l.status==0?(i(),d(V,{key:0,type:"success",onClick:j=>k(l)},{default:t(()=>[r(" 确认入库 ")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"])])),[[w,_.value],[z,c]])])}}};export{T as default}; +import{a as B,b as L}from"./shop-CBW6q5xA.js";import{r as f,b as s,h as v,c as i,k as b,f as e,w as t,j as N,g as r,d,p as y,E as A}from"./index-DcwaEiyg.js";const D={class:"my-card put-storage"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},T={__name:"index",setup(S){const u=f([]),a=f({page_no:1,page_size:20,loadend:!1,type:1}),_=f(!1),c=()=>{a.value.loadend||(_.value=!0,B({page_no:a.value.page_no,page_size:a.value.page_size,type:a.value.type}).then(n=>{u.value=[...u.value,...n.data.lists],n.data.lists.length{a.value.page_no=1,a.value.loadend=!1,u.value=[],c()},k=async n=>{L({id:n.id}).then(p=>{n.status=1,A.success("入库成功")})};return(n,p)=>{const g=s("el-radio-button"),x=s("el-radio-group"),o=s("el-table-column"),C=s("el-image"),m=s("el-tag"),V=s("el-button"),E=s("el-table"),w=v("loading"),z=v("infinite-scroll");return i(),b("div",D,[e(x,{style:{"margin-bottom":"20px"},modelValue:a.value.type,"onUpdate:modelValue":p[0]||(p[0]=l=>a.value.type=l),onChange:h},{default:t(()=>[e(g,{label:1,value:1},{default:t(()=>[r("售卖库存")]),_:1}),e(g,{label:2,value:2},{default:t(()=>[r("兑换库存")]),_:1})]),_:1},8,["modelValue"]),N((i(),b("div",I,[e(E,{data:u.value},{default:t(()=>[e(o,{label:"导入人员",prop:"admin_name"}),e(o,{label:"门店确认人员",prop:"staff_name"}),e(o,{label:"商品图",prop:"image"},{default:t(({row:l})=>[e(C,{class:"image",src:l.image},null,8,["src"])]),_:1}),e(o,{label:"商品",prop:"store_name"}),e(o,{label:"数量",prop:"nums"}),e(o,{label:"状态",prop:"status"},{default:t(({row:l})=>[l.status===1?(i(),d(m,{key:0,type:"success"},{default:t(()=>[r("已入库")]),_:1})):l.status===0?(i(),d(m,{key:1,type:"warning"},{default:t(()=>[r("待确认")]),_:1})):l.status===-1?(i(),d(m,{key:2,type:"danger"},{default:t(()=>[r("库存不足")]),_:1})):y("",!0)]),_:1}),e(o,{label:"备注",prop:"mark"}),e(o,{label:"操作",width:"120",fixed:"right"},{default:t(({row:l})=>[l.status==0?(i(),d(V,{key:0,type:"success",onClick:j=>k(l)},{default:t(()=>[r(" 确认入库 ")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"])])),[[w,_.value],[z,c]])])}}};export{T as default}; diff --git a/dist/assets/index-CfQognqk.js b/dist/assets/index-BpB5Dek6.js similarity index 98% rename from dist/assets/index-CfQognqk.js rename to dist/assets/index-BpB5Dek6.js index 5ed6088..ccc03e5 100644 --- a/dist/assets/index-CfQognqk.js +++ b/dist/assets/index-BpB5Dek6.js @@ -1 +1 @@ -import{_ as E,u as K,r as n,o as P,m as b,a as j,b as p,h as x,c as o,k as i,e,f as d,w as v,g as k,i as oe,j as U,F as T,l as A,z as F,t as l,d as O,p as w,q,s as G,C as ae}from"./index-C4rRmnc5.js";import{s as ie,d as le,e as ne}from"./store-BxeA20BY.js";import{h as R}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as de}from"./padding-BA_o-z8h.js";const H=m=>(q("data-v-ede11fac"),m=m(),G(),m),_e={class:"my-order"},ce={class:"header-nav"},re=H(()=>e("div",{class:"nav-item"},l("线上订单"),-1)),ue={class:"nav-item-btn"},ve={class:"header-input"},pe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},fe=["onClick"],me={class:"top"},he={class:"create-time"},ye={class:"shop"},ge={key:0,class:"left"},ke={key:0,class:"shop-name"},$e={class:"right"},be={class:"money"},we={class:"count"},Ve={class:"bottom"},De={class:"pay"},Ce={key:0},Ye={key:1},ze={key:2},xe={key:3},Se={key:4},Ie={key:5},Me={key:1,style:{color:"#ff4a00"}},Le={key:0,class:"load-end"},Ue={key:1,class:"load-end"},Be=H(()=>e("span",null,"您有新订单了, 是否立即刷新",-1)),Ne={class:"dialog-footer"},Te={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(m){K(),n([]);const t=n(1),V=u=>{r.value.page_no=1,h.value=!1,c.value=!1,y.value=[],g(!0)};n(null);const _=n(""),C=()=>{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)},S=u=>u.getTime()>Date.now(),r=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:2}),c=n(!1),B=n(0),D=n(0),h=n(!1),y=n([]),g=(u=!1)=>{if(u)r.value.page_no=1;else if(h.value||c.value)return;c.value=!0,t.value==1&&(r.value.paid=null),t.value==2&&(r.value.paid=0),ie(r.value).then(a=>{u?y.value=a.data.lists:y.value=[...y.value,...a.data.lists],r.value.page_no==1&&y.value.length>0&&b.emit("set-sale-order-detail",y.value[0]),a.data.lists.length{h.value=!0,c.value=!1})},I=(u,a)=>{D.value=a,b.emit("set-sale-order-detail",u)},$=n(!1);return P(()=>{b.on("update-sale-order-detail",u=>{console.log("==="),y.value[D.value].paid=1}),b.on("new_order",()=>{$.value||($.value=!0)})}),j(()=>{b.off("update-sale-order-detail"),b.off("new_order")}),(u,a)=>{const Y=p("el-radio-button"),z=p("el-radio-group"),J=p("el-date-picker"),M=p("el-button"),Q=p("el-input"),W=p("el-image"),X=p("spna"),Z=p("el-dialog"),ee=x("loading"),te=x("infinite-scroll");return o(),i("div",_e,[e("div",ce,[re,e("div",ue,[d(z,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=s=>t.value=s),onChange:V,size:"small"},{default:v(()=>[d(Y,{value:1},{default:v(()=>[k("全部")]),_:1}),d(Y,{value:2},{default:v(()=>[k("未支付")]),_:1})]),_:1},8,["modelValue"]),d(J,{modelValue:_.value,"onUpdate:modelValue":a[1]||(a[1]=s=>_.value=s),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":S,onChange:C,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ve,[d(Q,{modelValue:r.value.order_id,"onUpdate:modelValue":a[3]||(a[3]=s=>r.value.order_id=s),placeholder:"请输入订单编号",onKeydown:a[4]||(a[4]=oe(s=>g(!0),["enter"])),onClear:a[5]||(a[5]=s=>g(!0)),clearable:""},{append:v(()=>[d(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[2]||(a[2]=s=>g(!0))},{default:v(()=>[k("搜索")]),_:1})]),_:1},8,["modelValue"])]),U((o(),i("div",pe,[(o(!0),i(T,null,A(y.value,(s,L)=>(o(),i("div",{class:F(["item",{"item-active":D.value==L}]),key:L,onClick:N=>I(s,L)},[e("div",me,[e("div",{class:F(["sn","cahier"])},"单号: "+l(s.order_id),1),e("div",he,l(s.pay_time),1)]),e("div",ye,[s.product_info?(o(),i("div",ge,[(o(!0),i(T,null,A(s.product_info.slice(0,5),(N,se)=>(o(),O(W,{key:se,src:N.image,class:"shop-img"},null,8,["src"]))),128)),s.product_info.length==1?(o(),i("div",ke,l(s.product_info[0].store_name),1)):w("",!0)])):w("",!0),e("div",$e,[e("div",be,"¥"+l(s.pay_price),1),e("div",we,"共"+l(s.product_info.length)+"款商品",1)])]),e("div",Ve,[e("div",De,[s.paid?(o(),i("div",Ce,[k(l(s.paid_name)+" ",1),s.pay_type_name?(o(),O(X,{key:0},{default:v(()=>[k("("+l(s.pay_type_name)+")",1)]),_:2},1024)):s.pay_type==9?(o(),i("span",Ye,"(微信收款)")):s.pay_type==17?(o(),i("span",ze,"(现金支付)")):s.pay_type==13?(o(),i("span",xe,"(支付宝收款)")):s.pay_type==3?(o(),i("span",Se,"(余额支付)")):s.pay_type==1?(o(),i("span",Ie,"(微信支付)")):w("",!0)])):(o(),i("div",Me,l(s.paid_name),1))])])],10,fe))),128)),h.value?(o(),i("div",Le,"没有更多了")):w("",!0),c.value?(o(),i("div",Ue,"加载中...")):w("",!0)])),[[ee,c.value],[te,g]]),d(Z,{modelValue:$.value,"onUpdate:modelValue":a[8]||(a[8]=s=>$.value=s),title:"新订单提醒",width:"500"},{footer:v(()=>[e("div",Ne,[d(M,{onClick:a[6]||(a[6]=s=>$.value=!1)},{default:v(()=>[k("稍后刷新")]),_:1}),d(M,{type:"primary",onClick:a[7]||(a[7]=s=>{g(!0),$.value=!1})},{default:v(()=>[k(" 立即刷新 ")]),_:1})])]),default:v(()=>[Be]),_:1},8,["modelValue"])])}}},Ae=E(Te,[["__scopeId","data-v-ede11fac"]]),f=m=>(q("data-v-0d99d774"),m=m(),G(),m),Fe={class:"my-order"},Oe={key:0,class:"detail"},Re={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ee=f(()=>e("div",{class:"table-title"},"订单信息",-1)),Ke={class:"table-info"},Pe={class:"info-item"},je=f(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),qe={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"},We=f(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=f(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=f(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=f(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},_t=f(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},rt={class:"info-item"},ut=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),vt={class:"info-item-info"},pt={key:0},ft={key:1},mt={key:2},ht={key:3},yt={key:4},gt={key:5},kt={key:0,class:"table-title"},$t={key:1,class:"table-info"},bt={class:"info-item"},wt=f(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),Vt={class:"info-item-info"},Dt={class:"info-item"},Ct=f(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Yt={class:"info-item-info"},zt={class:"info-item"},xt=f(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),St={class:"info-item-info"},It={style:{"font-size":"0.9rem"}},Mt={style:{color:"#ff4a00"}},Lt={style:{display:"flex","align-items":"center"}},Ut={style:{"margin-left":"0.5rem"}},Bt={key:1},Nt={__name:"detail",setup(m){K(),ae();const t=n({id:""});n([]),n(null);const V=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const _=n({page_no:1,page_size:15,loadend:!1,loading:!1}),C=n([]),S=()=>{console.log("触底"),t.value.id&&!_.value.loadend&&(console.log("加载"),_.value.loading=!0,le({pid:t.value.id,page_no:_.value.page_no,page_size:_.value.page_size}).then(c=>{C.value=[...C.value,...c.data.lists],c.data.lists.length<_.value.page_size&&(_.value.loadend=!0),_.value.loading=!1,_.value.page_no++}))},r=()=>{V.value=!0,ne({id:t.value.id}).then(c=>{t.value=c.data,setTimeout(()=>{V.value=!1},200)})};return P(()=>{b.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,_.value.page_no=1,_.value.loadend=!1,_.value.loading=!1,C.value=[],r()})}),j(()=>{b.off("set-sale-order-detail")}),(c,B)=>{var u;const D=p("el-image"),h=p("el-table-column"),y=p("el-table"),g=p("el-empty"),I=x("infinite-scroll"),$=x("loading");return o(),i("div",Fe,[t.value.id?U((o(),i("div",Oe,[U((o(),i("div",Re,[Ee,e("div",Ke,[e("div",Pe,[je,e("div",qe,l(t.value.order_id),1)]),e("div",Ge,[He,e("div",Je,l(t.value.total_num||0),1)]),e("div",Qe,[We,e("div",Xe,"¥"+l(t.value.total_price),1)]),e("div",Ze,[et,e("div",tt,l(t.value.pay_time),1)]),e("div",st,[ot,e("div",at,"¥"+l(t.value.deduction_price),1)]),e("div",it,[lt,e("div",nt,"¥"+l(t.value.pay_price),1)]),e("div",dt,[_t,e("div",ct,l(t.value.pay_time),1)]),e("div",rt,[ut,e("div",vt,[t.value.pay_type_name?(o(),i("span",pt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(o(),i("span",ft,"微信收款")):t.value.pay_type==17?(o(),i("span",mt,"现金支付")):t.value.pay_type==13?(o(),i("span",ht,"支付宝收款")):t.value.pay_type==3?(o(),i("span",yt,"余额支付")):t.value.pay_type==1?(o(),i("span",gt,"微信支付")):w("",!0)])])]),t.value.uid?(o(),i("div",kt,"用户信息")):w("",!0),t.value.uid?(o(),i("div",$t,[e("div",bt,[wt,e("div",Vt,l(t.value.uid),1)]),e("div",Dt,[Ct,e("div",Yt,l(t.value.nickname),1)]),e("div",zt,[xt,e("div",St,l(t.value.mobile),1)])])):w("",!0),e("div",It,[k(" 共计 "),e("span",Mt,l(((u=t.value.product)==null?void 0:u.length)||" "),1),k(" 款商品 ")]),d(y,{data:t.value.product},{default:v(()=>[d(h,{label:"商品信息"},{default:v(({row:a})=>{var Y,z;return[e("div",Lt,[d(D,{style:{height:"3rem",width:"3rem"},src:(Y=a.cart_info)==null?void 0:Y.image},null,8,["src"]),e("span",Ut,l((z=a.cart_info)==null?void 0:z.name),1)])]}),_:1}),d(h,{prop:"cart_info.price",label:"单价",width:"150"}),d(h,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(h,{prop:"cart_info.total_price",label:"总价",width:"150"})]),_:1},8,["data"])])),[[I,S]])])),[[$,V.value]]):(o(),i("div",Bt,[d(g)]))])}}},Tt=E(Nt,[["__scopeId","data-v-0d99d774"]]),At={class:"my-card"},Pt={__name:"index",setup(m){return(t,V)=>(o(),i("div",At,[d(Ae,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(de),d(Tt,{ref:"detailRef"},null,512)]))}};export{Pt as default}; +import{_ as E,u as K,r as n,o as P,m as b,a as j,b as p,h as x,c as o,k as i,e,f as d,w as v,g as k,i as oe,j as U,F as T,l as A,z as F,t as l,d as O,p as w,q,s as G,C as ae}from"./index-DcwaEiyg.js";import{s as ie,d as le,e as ne}from"./store-85zRAkSB.js";import{h as R}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as de}from"./padding-CG_WCVSK.js";const H=m=>(q("data-v-ede11fac"),m=m(),G(),m),_e={class:"my-order"},ce={class:"header-nav"},re=H(()=>e("div",{class:"nav-item"},l("线上订单"),-1)),ue={class:"nav-item-btn"},ve={class:"header-input"},pe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},fe=["onClick"],me={class:"top"},he={class:"create-time"},ye={class:"shop"},ge={key:0,class:"left"},ke={key:0,class:"shop-name"},$e={class:"right"},be={class:"money"},we={class:"count"},Ve={class:"bottom"},De={class:"pay"},Ce={key:0},Ye={key:1},ze={key:2},xe={key:3},Se={key:4},Ie={key:5},Me={key:1,style:{color:"#ff4a00"}},Le={key:0,class:"load-end"},Ue={key:1,class:"load-end"},Be=H(()=>e("span",null,"您有新订单了, 是否立即刷新",-1)),Ne={class:"dialog-footer"},Te={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(m){K(),n([]);const t=n(1),V=u=>{r.value.page_no=1,h.value=!1,c.value=!1,y.value=[],g(!0)};n(null);const _=n(""),C=()=>{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)},S=u=>u.getTime()>Date.now(),r=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:2}),c=n(!1),B=n(0),D=n(0),h=n(!1),y=n([]),g=(u=!1)=>{if(u)r.value.page_no=1;else if(h.value||c.value)return;c.value=!0,t.value==1&&(r.value.paid=null),t.value==2&&(r.value.paid=0),ie(r.value).then(a=>{u?y.value=a.data.lists:y.value=[...y.value,...a.data.lists],r.value.page_no==1&&y.value.length>0&&b.emit("set-sale-order-detail",y.value[0]),a.data.lists.length{h.value=!0,c.value=!1})},I=(u,a)=>{D.value=a,b.emit("set-sale-order-detail",u)},$=n(!1);return P(()=>{b.on("update-sale-order-detail",u=>{console.log("==="),y.value[D.value].paid=1}),b.on("new_order",()=>{$.value||($.value=!0)})}),j(()=>{b.off("update-sale-order-detail"),b.off("new_order")}),(u,a)=>{const Y=p("el-radio-button"),z=p("el-radio-group"),J=p("el-date-picker"),M=p("el-button"),Q=p("el-input"),W=p("el-image"),X=p("spna"),Z=p("el-dialog"),ee=x("loading"),te=x("infinite-scroll");return o(),i("div",_e,[e("div",ce,[re,e("div",ue,[d(z,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=s=>t.value=s),onChange:V,size:"small"},{default:v(()=>[d(Y,{value:1},{default:v(()=>[k("全部")]),_:1}),d(Y,{value:2},{default:v(()=>[k("未支付")]),_:1})]),_:1},8,["modelValue"]),d(J,{modelValue:_.value,"onUpdate:modelValue":a[1]||(a[1]=s=>_.value=s),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":S,onChange:C,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ve,[d(Q,{modelValue:r.value.order_id,"onUpdate:modelValue":a[3]||(a[3]=s=>r.value.order_id=s),placeholder:"请输入订单编号",onKeydown:a[4]||(a[4]=oe(s=>g(!0),["enter"])),onClear:a[5]||(a[5]=s=>g(!0)),clearable:""},{append:v(()=>[d(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[2]||(a[2]=s=>g(!0))},{default:v(()=>[k("搜索")]),_:1})]),_:1},8,["modelValue"])]),U((o(),i("div",pe,[(o(!0),i(T,null,A(y.value,(s,L)=>(o(),i("div",{class:F(["item",{"item-active":D.value==L}]),key:L,onClick:N=>I(s,L)},[e("div",me,[e("div",{class:F(["sn","cahier"])},"单号: "+l(s.order_id),1),e("div",he,l(s.pay_time),1)]),e("div",ye,[s.product_info?(o(),i("div",ge,[(o(!0),i(T,null,A(s.product_info.slice(0,5),(N,se)=>(o(),O(W,{key:se,src:N.image,class:"shop-img"},null,8,["src"]))),128)),s.product_info.length==1?(o(),i("div",ke,l(s.product_info[0].store_name),1)):w("",!0)])):w("",!0),e("div",$e,[e("div",be,"¥"+l(s.pay_price),1),e("div",we,"共"+l(s.product_info.length)+"款商品",1)])]),e("div",Ve,[e("div",De,[s.paid?(o(),i("div",Ce,[k(l(s.paid_name)+" ",1),s.pay_type_name?(o(),O(X,{key:0},{default:v(()=>[k("("+l(s.pay_type_name)+")",1)]),_:2},1024)):s.pay_type==9?(o(),i("span",Ye,"(微信收款)")):s.pay_type==17?(o(),i("span",ze,"(现金支付)")):s.pay_type==13?(o(),i("span",xe,"(支付宝收款)")):s.pay_type==3?(o(),i("span",Se,"(余额支付)")):s.pay_type==1?(o(),i("span",Ie,"(微信支付)")):w("",!0)])):(o(),i("div",Me,l(s.paid_name),1))])])],10,fe))),128)),h.value?(o(),i("div",Le,"没有更多了")):w("",!0),c.value?(o(),i("div",Ue,"加载中...")):w("",!0)])),[[ee,c.value],[te,g]]),d(Z,{modelValue:$.value,"onUpdate:modelValue":a[8]||(a[8]=s=>$.value=s),title:"新订单提醒",width:"500"},{footer:v(()=>[e("div",Ne,[d(M,{onClick:a[6]||(a[6]=s=>$.value=!1)},{default:v(()=>[k("稍后刷新")]),_:1}),d(M,{type:"primary",onClick:a[7]||(a[7]=s=>{g(!0),$.value=!1})},{default:v(()=>[k(" 立即刷新 ")]),_:1})])]),default:v(()=>[Be]),_:1},8,["modelValue"])])}}},Ae=E(Te,[["__scopeId","data-v-ede11fac"]]),f=m=>(q("data-v-0d99d774"),m=m(),G(),m),Fe={class:"my-order"},Oe={key:0,class:"detail"},Re={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ee=f(()=>e("div",{class:"table-title"},"订单信息",-1)),Ke={class:"table-info"},Pe={class:"info-item"},je=f(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),qe={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"},We=f(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=f(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=f(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=f(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},_t=f(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},rt={class:"info-item"},ut=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),vt={class:"info-item-info"},pt={key:0},ft={key:1},mt={key:2},ht={key:3},yt={key:4},gt={key:5},kt={key:0,class:"table-title"},$t={key:1,class:"table-info"},bt={class:"info-item"},wt=f(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),Vt={class:"info-item-info"},Dt={class:"info-item"},Ct=f(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Yt={class:"info-item-info"},zt={class:"info-item"},xt=f(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),St={class:"info-item-info"},It={style:{"font-size":"0.9rem"}},Mt={style:{color:"#ff4a00"}},Lt={style:{display:"flex","align-items":"center"}},Ut={style:{"margin-left":"0.5rem"}},Bt={key:1},Nt={__name:"detail",setup(m){K(),ae();const t=n({id:""});n([]),n(null);const V=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const _=n({page_no:1,page_size:15,loadend:!1,loading:!1}),C=n([]),S=()=>{console.log("触底"),t.value.id&&!_.value.loadend&&(console.log("加载"),_.value.loading=!0,le({pid:t.value.id,page_no:_.value.page_no,page_size:_.value.page_size}).then(c=>{C.value=[...C.value,...c.data.lists],c.data.lists.length<_.value.page_size&&(_.value.loadend=!0),_.value.loading=!1,_.value.page_no++}))},r=()=>{V.value=!0,ne({id:t.value.id}).then(c=>{t.value=c.data,setTimeout(()=>{V.value=!1},200)})};return P(()=>{b.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,_.value.page_no=1,_.value.loadend=!1,_.value.loading=!1,C.value=[],r()})}),j(()=>{b.off("set-sale-order-detail")}),(c,B)=>{var u;const D=p("el-image"),h=p("el-table-column"),y=p("el-table"),g=p("el-empty"),I=x("infinite-scroll"),$=x("loading");return o(),i("div",Fe,[t.value.id?U((o(),i("div",Oe,[U((o(),i("div",Re,[Ee,e("div",Ke,[e("div",Pe,[je,e("div",qe,l(t.value.order_id),1)]),e("div",Ge,[He,e("div",Je,l(t.value.total_num||0),1)]),e("div",Qe,[We,e("div",Xe,"¥"+l(t.value.total_price),1)]),e("div",Ze,[et,e("div",tt,l(t.value.pay_time),1)]),e("div",st,[ot,e("div",at,"¥"+l(t.value.deduction_price),1)]),e("div",it,[lt,e("div",nt,"¥"+l(t.value.pay_price),1)]),e("div",dt,[_t,e("div",ct,l(t.value.pay_time),1)]),e("div",rt,[ut,e("div",vt,[t.value.pay_type_name?(o(),i("span",pt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(o(),i("span",ft,"微信收款")):t.value.pay_type==17?(o(),i("span",mt,"现金支付")):t.value.pay_type==13?(o(),i("span",ht,"支付宝收款")):t.value.pay_type==3?(o(),i("span",yt,"余额支付")):t.value.pay_type==1?(o(),i("span",gt,"微信支付")):w("",!0)])])]),t.value.uid?(o(),i("div",kt,"用户信息")):w("",!0),t.value.uid?(o(),i("div",$t,[e("div",bt,[wt,e("div",Vt,l(t.value.uid),1)]),e("div",Dt,[Ct,e("div",Yt,l(t.value.nickname),1)]),e("div",zt,[xt,e("div",St,l(t.value.mobile),1)])])):w("",!0),e("div",It,[k(" 共计 "),e("span",Mt,l(((u=t.value.product)==null?void 0:u.length)||" "),1),k(" 款商品 ")]),d(y,{data:t.value.product},{default:v(()=>[d(h,{label:"商品信息"},{default:v(({row:a})=>{var Y,z;return[e("div",Lt,[d(D,{style:{height:"3rem",width:"3rem"},src:(Y=a.cart_info)==null?void 0:Y.image},null,8,["src"]),e("span",Ut,l((z=a.cart_info)==null?void 0:z.name),1)])]}),_:1}),d(h,{prop:"cart_info.price",label:"单价",width:"150"}),d(h,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(h,{prop:"cart_info.total_price",label:"总价",width:"150"})]),_:1},8,["data"])])),[[I,S]])])),[[$,V.value]]):(o(),i("div",Bt,[d(g)]))])}}},Tt=E(Nt,[["__scopeId","data-v-0d99d774"]]),At={class:"my-card"},Pt={__name:"index",setup(m){return(t,V)=>(o(),i("div",At,[d(Ae,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(de),d(Tt,{ref:"detailRef"},null,512)]))}};export{Pt as default}; diff --git a/dist/assets/index-2bhZOhkw.js b/dist/assets/index-C6GhMFOL.js similarity index 96% rename from dist/assets/index-2bhZOhkw.js rename to dist/assets/index-C6GhMFOL.js index 1ac1026..f683d21 100644 --- a/dist/assets/index-2bhZOhkw.js +++ b/dist/assets/index-C6GhMFOL.js @@ -1 +1 @@ -import{_ as T,u as R,r as y,b as m,c as s,k as p,e as t,t as v,g as _,F as B,l as E,z as j,f as l,w as d,E as $,m as D,q as J,s as q,o as W,a as G,h as L,d as b,p as w,j as N}from"./index-C4rRmnc5.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant--Irsjol6.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-BA_o-z8h.js";const z=k=>(J("data-v-e01d9d71"),k=k(),q(),k),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(k){R();const e=y({balance:0,count:0,total:0}),h=y([]),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=y({merchant_bank_id:"",amount:""}),f=o=>{a.value.merchant_bank_id=o.id},x=()=>{if(a.value.amount=Math.floor(a.value.amount*100)/100,+a.value.amount<=0)return a.value.amount="",$.error("提现金额必须大于0");if(+a.value.amount>+e.value.balance)return a.value.amount=e.value.balance,$.error("提现金额不能大于余额");P(a.value).then(o=>{a.value.amount="",$.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:x,disabled:e.value.balance<=0||h.value.length==0},{default:d(()=>[_("立即提现")]),_:1},8,["disabled"])])])])}}},ke=T(be,[["__scopeId","data-v-e01d9d71"]]),ye={class:"my-order"},we={class:"date"},Ve={class:"detail"},Ye={key:0,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},$e={key:0},xe={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(k){const e=y({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=y(1),a=y([]),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,$.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 W(()=>{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"),Y=m("el-tag"),M=m("el-table"),I=L("loading"),S=L("infinite-scroll");return s(),p("div",ye,[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:x},{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",Ye,[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",$e,[(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",xe,v(n.fail_msg),1))]),_:1}),l(c,{label:"提现状态",width:"100"},{default:d(({row:n})=>[n.arrival_proof?(s(),b(Y,{key:0,type:"success"},{default:d(()=>[_("已到账")]),_:1})):n.is_check==1?(s(),b(Y,{key:1,type:"primary"},{default:d(()=>[_("待转账")]),_:1})):n.is_check==0?(s(),b(Y,{key:2,type:"info"},{default:d(()=>[_("待审核")]),_:1})):n.is_check==2?(s(),b(Y,{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(k){return(e,h)=>(s(),p("div",Me,[l(ke,{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 y,b as m,c as s,k as p,e as t,t as v,g as _,F as B,l as E,z as j,f as l,w as d,E as $,m as D,q as J,s as q,o as W,a as G,h as L,d as b,p as w,j as N}from"./index-DcwaEiyg.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-C7inwBZD.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-CG_WCVSK.js";const z=k=>(J("data-v-e01d9d71"),k=k(),q(),k),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(k){R();const e=y({balance:0,count:0,total:0}),h=y([]),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=y({merchant_bank_id:"",amount:""}),f=o=>{a.value.merchant_bank_id=o.id},x=()=>{if(a.value.amount=Math.floor(a.value.amount*100)/100,+a.value.amount<=0)return a.value.amount="",$.error("提现金额必须大于0");if(+a.value.amount>+e.value.balance)return a.value.amount=e.value.balance,$.error("提现金额不能大于余额");P(a.value).then(o=>{a.value.amount="",$.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:x,disabled:e.value.balance<=0||h.value.length==0},{default:d(()=>[_("立即提现")]),_:1},8,["disabled"])])])])}}},ke=T(be,[["__scopeId","data-v-e01d9d71"]]),ye={class:"my-order"},we={class:"date"},Ve={class:"detail"},Ye={key:0,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},$e={key:0},xe={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(k){const e=y({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=y(1),a=y([]),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,$.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 W(()=>{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"),Y=m("el-tag"),M=m("el-table"),I=L("loading"),S=L("infinite-scroll");return s(),p("div",ye,[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:x},{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",Ye,[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",$e,[(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",xe,v(n.fail_msg),1))]),_:1}),l(c,{label:"提现状态",width:"100"},{default:d(({row:n})=>[n.arrival_proof?(s(),b(Y,{key:0,type:"success"},{default:d(()=>[_("已到账")]),_:1})):n.is_check==1?(s(),b(Y,{key:1,type:"primary"},{default:d(()=>[_("待转账")]),_:1})):n.is_check==0?(s(),b(Y,{key:2,type:"info"},{default:d(()=>[_("待审核")]),_:1})):n.is_check==2?(s(),b(Y,{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(k){return(e,h)=>(s(),p("div",Me,[l(ke,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(Z),l(ze,{ref:"detailRef"},null,512)]))}};export{Ne as default}; diff --git a/dist/assets/index-DN94OQSE.css b/dist/assets/index-DRMzXjlL.css similarity index 54% rename from dist/assets/index-DN94OQSE.css rename to dist/assets/index-DRMzXjlL.css index 77ee7a7..059acd4 100644 --- a/dist/assets/index-DN94OQSE.css +++ b/dist/assets/index-DRMzXjlL.css @@ -1 +1 @@ -@charset "UTF-8";.dialog-footer .ok-btn[data-v-924edcc0]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-924edcc0]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.check-user-list[data-v-4bf590bf]{border-radius:1.2rem;height:70vh;background-color:#fff;width:100%;position:relative;overflow:hidden;display:flex;flex-direction:column}.check-user-list .header-nav[data-v-4bf590bf]{display:flex;justify-content:space-between;padding:1rem}.check-user-list .header-nav span[data-v-4bf590bf]{color:#ff4a00}.check-user-list .header-nav .nav-item[data-v-4bf590bf]{font-weight:700}.check-user-list .header-input[data-v-4bf590bf]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.check-user-list .order-lists[data-v-4bf590bf]{flex:1;overflow-y:auto;display:flex;flex-wrap:wrap}.check-user-list .order-lists .item[data-v-4bf590bf]{width:45%;height:6rem;border-radius:.5rem;cursor:pointer;box-sizing:border-box;padding:1rem;margin:.5rem;background-color:#f5f5f5;display:flex}.check-user-list .order-lists .item .avatar[data-v-4bf590bf]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.check-user-list .order-lists .item .flex[data-v-4bf590bf]{display:flex;flex-wrap:wrap}.check-user-list .order-lists .item .bold[data-v-4bf590bf]{font-weight:700}.check-user-list .order-lists .item .r-1[data-v-4bf590bf]{margin-right:1rem}.check-user-list .order-lists .item .red[data-v-4bf590bf]{color:#ff4a00}.check-user-list .order-lists .item-active[data-v-4bf590bf]{background-color:#efefef}.check-user-list .load-end[data-v-4bf590bf]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-d08b12df]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .user-nav .user-info[data-v-d08b12df]{padding:1rem;margin:1rem;margin-bottom:0;border:.125rem solid #f70;background-color:#ff77001a;border-radius:.5rem;display:flex}.my-order .user-nav .user-info .avatar[data-v-d08b12df]{width:3rem;height:3rem;flex-shrink:0}.my-order .user-nav .user-info .info[data-v-d08b12df]{flex:1;margin-left:1rem;color:#666}.my-order .user-nav .user-info .info .flex-bewteen[data-v-d08b12df]{display:flex;justify-content:space-between}.my-order .user-nav .user-info .info .change-user[data-v-d08b12df]{font-size:1rem}.my-order .header-nav[data-v-d08b12df]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-d08b12df]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-d08b12df]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-d08b12df]{flex:1;overflow-y:auto;padding-bottom:10rem}.my-order .order-list .order-item[data-v-d08b12df]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-d08b12df]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-d08b12df]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-d08b12df]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-d08b12df]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-d08b12df]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-d08b12df]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-d08b12df]{position:absolute;bottom:0;left:0;z-index:20;width:100%;box-shadow:0 -.0625rem .625rem #eee;background-color:#fff}.my-order .order-footer .order-total[data-v-d08b12df]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-d08b12df]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-d08b12df]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-d08b12df]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-d08b12df]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-d08b12df]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-d08b12df]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-466f28c1]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-466f28c1]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-466f28c1]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-466f28c1]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-466f28c1]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-466f28c1] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-466f28c1]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-466f28c1]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-466f28c1]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-466f28c1]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-466f28c1]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-466f28c1]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-466f28c1]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-466f28c1]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-466f28c1]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-466f28c1]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item[data-v-466f28c1]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-466f28c1],.my-order .shop-list .shop-item:hover .unit-name[data-v-466f28c1]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-466f28c1]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-466f28c1]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-0b57e9b5]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-0b57e9b5]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-0b57e9b5]{display:flex}.shop .shop-info .shop-info-left[data-v-0b57e9b5]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-0b57e9b5]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-0b57e9b5]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-0b57e9b5]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-0b57e9b5]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-0b57e9b5]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-0b57e9b5]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-00ca5f82]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-00ca5f82]{width:4rem;margin:1rem;padding:.5rem 1rem;text-align:center;border-radius:3rem;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classify .itemP-active[data-v-00ca5f82]{background-color:#1890ff;color:#fff}.active-card .title[data-v-00ca5f82]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-00ca5f82]{display:flex;flex-wrap:wrap}.active-card .list div[data-v-00ca5f82]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-00ca5f82]{color:#1890ff}[data-v-00ca5f82]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.dialog-footer .ok-btn[data-v-924edcc0]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-924edcc0]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.check-user-list[data-v-4bf590bf]{border-radius:1.2rem;height:70vh;background-color:#fff;width:100%;position:relative;overflow:hidden;display:flex;flex-direction:column}.check-user-list .header-nav[data-v-4bf590bf]{display:flex;justify-content:space-between;padding:1rem}.check-user-list .header-nav span[data-v-4bf590bf]{color:#ff4a00}.check-user-list .header-nav .nav-item[data-v-4bf590bf]{font-weight:700}.check-user-list .header-input[data-v-4bf590bf]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.check-user-list .order-lists[data-v-4bf590bf]{flex:1;overflow-y:auto;display:flex;flex-wrap:wrap}.check-user-list .order-lists .item[data-v-4bf590bf]{width:45%;height:6rem;border-radius:.5rem;cursor:pointer;box-sizing:border-box;padding:1rem;margin:.5rem;background-color:#f5f5f5;display:flex}.check-user-list .order-lists .item .avatar[data-v-4bf590bf]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.check-user-list .order-lists .item .flex[data-v-4bf590bf]{display:flex;flex-wrap:wrap}.check-user-list .order-lists .item .bold[data-v-4bf590bf]{font-weight:700}.check-user-list .order-lists .item .r-1[data-v-4bf590bf]{margin-right:1rem}.check-user-list .order-lists .item .red[data-v-4bf590bf]{color:#ff4a00}.check-user-list .order-lists .item-active[data-v-4bf590bf]{background-color:#efefef}.check-user-list .load-end[data-v-4bf590bf]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-d08b12df]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .user-nav .user-info[data-v-d08b12df]{padding:1rem;margin:1rem;margin-bottom:0;border:.125rem solid #f70;background-color:#ff77001a;border-radius:.5rem;display:flex}.my-order .user-nav .user-info .avatar[data-v-d08b12df]{width:3rem;height:3rem;flex-shrink:0}.my-order .user-nav .user-info .info[data-v-d08b12df]{flex:1;margin-left:1rem;color:#666}.my-order .user-nav .user-info .info .flex-bewteen[data-v-d08b12df]{display:flex;justify-content:space-between}.my-order .user-nav .user-info .info .change-user[data-v-d08b12df]{font-size:1rem}.my-order .header-nav[data-v-d08b12df]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-d08b12df]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-d08b12df]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-d08b12df]{flex:1;overflow-y:auto;padding-bottom:10rem}.my-order .order-list .order-item[data-v-d08b12df]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-d08b12df]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-d08b12df]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-d08b12df]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-d08b12df]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-d08b12df]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-d08b12df]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-d08b12df]{position:absolute;bottom:0;left:0;z-index:20;width:100%;box-shadow:0 -.0625rem .625rem #eee;background-color:#fff}.my-order .order-footer .order-total[data-v-d08b12df]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-d08b12df]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-d08b12df]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-d08b12df]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-d08b12df]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-d08b12df]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-d08b12df]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-2a80ef6f]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-2a80ef6f]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-2a80ef6f]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-2a80ef6f]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-2a80ef6f]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-2a80ef6f] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-2a80ef6f]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-2a80ef6f]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-2a80ef6f]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-2a80ef6f]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-2a80ef6f]{width:11.5rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.7rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-2a80ef6f]{border-radius:.5rem;width:11.5rem;height:11.5rem}.my-order .shop-list .shop-item .shop-name[data-v-2a80ef6f]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-2a80ef6f]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-2a80ef6f]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-2a80ef6f]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item[data-v-2a80ef6f]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-2a80ef6f],.my-order .shop-list .shop-item:hover .unit-name[data-v-2a80ef6f]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-2a80ef6f]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-2a80ef6f]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-0b57e9b5]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-0b57e9b5]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-0b57e9b5]{display:flex}.shop .shop-info .shop-info-left[data-v-0b57e9b5]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-0b57e9b5]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-0b57e9b5]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-0b57e9b5]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-0b57e9b5]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-0b57e9b5]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-0b57e9b5]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-00ca5f82]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-00ca5f82]{width:4rem;margin:1rem;padding:.5rem 1rem;text-align:center;border-radius:3rem;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classify .itemP-active[data-v-00ca5f82]{background-color:#1890ff;color:#fff}.active-card .title[data-v-00ca5f82]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-00ca5f82]{display:flex;flex-wrap:wrap}.active-card .list div[data-v-00ca5f82]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-00ca5f82]{color:#1890ff}[data-v-00ca5f82]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/index-LBcC04nt.js b/dist/assets/index-DReoLnR3.js similarity index 96% rename from dist/assets/index-LBcC04nt.js rename to dist/assets/index-DReoLnR3.js index 8cf2c9f..9671223 100644 --- a/dist/assets/index-LBcC04nt.js +++ b/dist/assets/index-DReoLnR3.js @@ -1 +1 @@ -import{_ as U,u as I,r as u,o as R,b as n,c as S,k as b,e as v,f as e,w as t,i as m,g as C,q as L,s as B,C as E,E as w}from"./index-C4rRmnc5.js";import{l as K}from"./user-UEbWTjyf.js";const N=l=>(L("data-v-f9ff2ce9"),l=l(),B(),l),M={class:"body"},T={class:"login"},q=N(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__name:"index",setup(l){const d=I(),y=E(),k=u(null),p=u(null),s=u({account:"",password:"",terminal:1}),_=()=>{if(!s.value.account)return w({message:"请填写账号",type:"error"});if(!s.value.password)return w({message:"请填写密码",type:"error"});K(s.value).then(a=>{var o;(o=a.data)!=null&&o.token&&(d.setToken(a.data.token),d.setUserInfo(a.data),y.push("/"))}).catch(a=>{})};return R(()=>{}),(a,o)=>{const h=n("User"),f=n("el-icon"),i=n("el-input"),c=n("el-form-item"),x=n("Lock"),V=n("el-button"),g=n("el-form");return S(),b("div",M,[v("div",T,[q,e(g,null,{default:t(()=>[e(c,null,{default:t(()=>[e(i,{ref_key:"accRef",ref:k,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",onKeydown:o[1]||(o[1]=m(r=>p.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(h)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(i,{ref_key:"pwdRef",ref:p,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:m(_,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(x)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:_},{default:t(()=>[C("登录")]),_:1})]),_:1})]),_:1})])])}}},A=U($,[["__scopeId","data-v-f9ff2ce9"]]);export{A as default}; +import{_ as U,u as I,r as u,o as R,b as n,c as S,k as b,e as v,f as e,w as t,i as m,g as C,q as L,s as B,C as E,E as w}from"./index-DcwaEiyg.js";import{l as K}from"./user-CnK8Y4fd.js";const N=l=>(L("data-v-f9ff2ce9"),l=l(),B(),l),M={class:"body"},T={class:"login"},q=N(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__name:"index",setup(l){const d=I(),y=E(),k=u(null),p=u(null),s=u({account:"",password:"",terminal:1}),_=()=>{if(!s.value.account)return w({message:"请填写账号",type:"error"});if(!s.value.password)return w({message:"请填写密码",type:"error"});K(s.value).then(a=>{var o;(o=a.data)!=null&&o.token&&(d.setToken(a.data.token),d.setUserInfo(a.data),y.push("/"))}).catch(a=>{})};return R(()=>{}),(a,o)=>{const h=n("User"),f=n("el-icon"),i=n("el-input"),c=n("el-form-item"),x=n("Lock"),V=n("el-button"),g=n("el-form");return S(),b("div",M,[v("div",T,[q,e(g,null,{default:t(()=>[e(c,null,{default:t(()=>[e(i,{ref_key:"accRef",ref:k,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",onKeydown:o[1]||(o[1]=m(r=>p.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(h)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(i,{ref_key:"pwdRef",ref:p,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:m(_,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(x)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:_},{default:t(()=>[C("登录")]),_:1})]),_:1})]),_:1})])])}}},A=U($,[["__scopeId","data-v-f9ff2ce9"]]);export{A as default}; diff --git a/dist/assets/index-C4rRmnc5.js b/dist/assets/index-DcwaEiyg.js similarity index 99% rename from dist/assets/index-C4rRmnc5.js rename to dist/assets/index-DcwaEiyg.js index 802a761..a3a0116 100644 --- a/dist/assets/index-C4rRmnc5.js +++ b/dist/assets/index-DcwaEiyg.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-LUACW_g6.js","./store-BxeA20BY.js","./user-UEbWTjyf.js","./moment-Cl4UOzQZ.js","./padding-BA_o-z8h.js","./shop-Bs3DGR4g.js","./pay-D6lAYrB4.js","./pay-wlpt4kC6.css","./index-DN94OQSE.css","./index-DudCf6-k.js","./index-Bb_sApH-.css","./index-CfQognqk.js","./index-DCSehbv9.css","./indexCount-B_u3I-N7.js","./merchant--Irsjol6.js","./indexCount-quL7L4Zi.css","./index-2bhZOhkw.js","./index-ZYBKJJNc.css","./index-bGNkp3cp.js","./index-C1Bzc089.css","./index-ITkwvMbx.js","./index-Bfak7bLR.css","./index-B4Rz5OQ5.js","./index-DEqJOzAI.css","./test-CuqgpxdP.js","./test-CmC8-tN2.css","./index-LBcC04nt.js","./index-BA6nwZsc.css"] + __vite__mapDeps.viteFileDeps = ["./index-BKPqUHgE.js","./store-85zRAkSB.js","./user-CnK8Y4fd.js","./moment-Cl4UOzQZ.js","./padding-CG_WCVSK.js","./shop-CBW6q5xA.js","./pay-CEy1hIkd.js","./pay-wlpt4kC6.css","./index-DRMzXjlL.css","./index-BWXGAaVp.js","./index-Bb_sApH-.css","./index-BpB5Dek6.js","./index-DCSehbv9.css","./indexCount-BMHe5nNi.js","./merchant-C7inwBZD.js","./indexCount-quL7L4Zi.css","./index-C6GhMFOL.js","./index-ZYBKJJNc.css","./index-AigTEg-K.js","./index-C1Bzc089.css","./index-Bi9cdaPf.js","./index-Bfak7bLR.css","./index-vqIWFzd_.js","./index-DEqJOzAI.css","./test-CheG7YBE.js","./test-CmC8-tN2.css","./index-DReoLnR3.js","./index-BA6nwZsc.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -98,4 +98,4 @@ function __vite__mapDeps(indexes) { `,n+=sl(" ")+` `,n+=x4()+`欢迎下次光临! `,n+=Yce(" ")+` -`,n+=Xce(),n},wv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=e=>(Vw("data-v-4e1f74b3"),e=e(),Bw(),e),Qce={class:"my-card"},ede={class:"card-header"},tde={style:{width:"4.5rem"}},nde=Ii(()=>k("div",{class:"card-title"},"泸优采收银系统",-1)),ode={style:{"margin-left":"1rem",display:"flex","flex-direction":"column","justify-content":"center",cursor:"pointer"}},rde={class:"card-body"},ade={style:{"margin-right":"1rem"}},lde=Ii(()=>k("span",null,"打印自检",-1)),sde={key:0,style:{"margin-right":"1rem"}},ide=Ii(()=>k("span",null,"点击自动连接打印机",-1)),ude=Ii(()=>k("div",null,"已连接打印机T58",-1)),cde={style:{"font-size":"0.7rem",color:"#ccc"}},dde=Ii(()=>k("span",null,"打印机已连接,是否重新连接",-1)),fde={class:"dialog-footer"},pde={class:"el-dropdown-link"},vde={class:"info"},hde={__name:"myHeader",setup(e){const t=yd(),n=qce(),o=L({});o.value=t.userInfo;const r=hb(),a=()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")},l=()=>{window.location.reload()},s=L(!1),u=()=>{console.log("连接打印机"),uni.getEnv(h=>{h.h5?eo.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?(eo.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?(eo.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),eo.success("已连接打印机T58("+m+")")}},!1)}),xo(()=>{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"),T=Ze("el-dropdown");return b(),M("div",Qce,[k("div",ede,[k("div",tde,[W(v,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),nde,k("div",ode,[W(g,{color:"#fff",size:"18",onClick:l},{default:X(()=>[W(_)]),_:1})])]),k("div",rde,[k("div",ade,[W(w,{onClick:m[0]||(m[0]=R=>i(Yt).emit("letPrintReceipt")),type:"primary"},{default:X(()=>[lde]),_:1})]),!i(n).is_connect||!i(n).printAddress?(b(),M("div",sde,[W(w,{onClick:u,type:"warning"},{default:X(()=>[ide]),_:1})])):(b(),M("div",{key:1,style:{"margin-right":"1rem","font-size":"0.9rem"},onClick:m[1]||(m[1]=R=>s.value=!0)},[ude,k("div",cde,"("+Te(i(n).printAddress)+")",1)])),W(y,{modelValue:s.value,"onUpdate:modelValue":m[3]||(m[3]=R=>s.value=R),title:"提示",width:"500"},{footer:X(()=>[k("div",fde,[W(w,{onClick:m[2]||(m[2]=R=>s.value=!1)},{default:X(()=>[mt("取消")]),_:1}),W(w,{type:"primary",onClick:u},{default:X(()=>[mt(" 重新连接 ")]),_:1})])]),default:X(()=>[dde]),_:1},8,["modelValue"]),W(T,{trigger:"hover"},{dropdown:X(()=>[W(A,null,{default:X(()=>[W(x,{onClick:a},{default:X(()=>[mt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",pde,[W(C,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",vde,[k("div",null,Te(o.value.name),1),k("div",null,"("+Te(o.value.role_name)+")",1)]),W(g,{class:"el-icon--right"},{default:X(()=>[W(E)]),_:1})])]),_:1})])])}}},mde=wv(hde,[["__scopeId","data-v-4e1f74b3"]]),gde=vv("order",()=>{const e=L(localStorage.getItem("orderCount")||0);return{orderCount:e,setOrderCount:n=>{e.value=n,localStorage.setItem("orderCount",n)}}}),yde={class:"my-card"},_de=["onClick"],bde={key:0,class:"badge"},wde={__name:"myAside",setup(e){const t=hb(),n=bue(),o=gde(),r=(d=1)=>{o.setOrderCount(d),u.value.forEach(p=>{p.name=="order"&&(p.count=d)})};let a=!1;const l=d=>{try{if(r(0),eo.success("您有新的订单"),a)return;var p=new Audio("/src/assets/order.mp3");p.play(),a=!0,console.log("播放中"),p.addEventListener("ended",function(){a=!1})}catch(h){console.error(h),a=!1,eo.error("播放失败")}},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},{name:"putStorage",title:"入库登记",ico:"Van",count:0},{name:"user",title:"用户",ico:"User",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)}),xo(()=>{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",yde,[(b(!0),M(Fe,null,ht(u.value,m=>(b(),M("div",{key:m.name,class:$(["list-item",{active:i(n).name==m.name}]),onClick:v=>s(m.name)},[W(h,{size:"2rem"},{default:X(()=>[(b(),le(st(m.ico)))]),_:2},1024),k("div",null,Te(m.title),1),m.count?(b(),M("div",bde,Te(m.count),1)):ne("",!0)],10,_de))),128))])}}},Cde=wv(wde,[["__scopeId","data-v-c2e7e17b"]]),Oo=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()};Oo.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)};Oo.prototype.channel=function(e){return this.channels.find(e)};Oo.prototype.allChannels=function(){return this.channels.all()};Oo.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()}})};Oo.prototype.disconnect=function(){this.connection.doNotConnect=1,this.connection.close()};Oo.prototype.subscribeAll=function(){if(this.connection.state==="connected")for(var e in this.channels)this.channels[e].processSubscribe()};Oo.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}})))};Oo.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={}};Oo.prototype.subscribe=function(e){return this.channels[e]?this.channels[e]:e.indexOf("private-")===0?Kb(e,this):e.indexOf("presence-")===0?kde(e,this):Sde(e,this)};Oo.instances=[];function Sde(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 Kb(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){xde({url:t.config.auth,type:"POST",data:{channel_name:e,socket_id:t.connection.socket_id},success:function(o){o=JSON.parse(o),o.channel=e,t.connection.send(JSON.stringify({event:"pusher:subscribe",data:o}))},error:function(o){throw Error(o)}})},n.processSubscribe(),n}function kde(e,t){return Kb(e,t)}function Qa(e){this.dispatcher=new jb,Wb(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 Wb=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 jb,this.connection=e,this.channelName=t,this.subscribeCb=null,this.queue=[],Wb(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 Mde(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}const Tde={class:"common-layout"},$de={__name:"index",setup(e){const t=yd(),o=new Oo({url:"wss://test-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("letPrintReceipt",(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("开启键盘监听")}),xo(()=>{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",Tde,[W(d,null,{default:X(()=>[W(s,null,{default:X(()=>[W(mde)]),_:1}),W(d,null,{default:X(()=>[W(u,{width:"6.25rem"},{default:X(()=>[W(Cde)]),_:1}),W(f,{style:{color:"#333"}},{default:X(()=>[W(c,{class:"my-main"},{default:X(({Component:p})=>[W(nn,{name:"el-zoom-in-top"},{default:X(()=>[(b(),le(st(p)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Ode=wv($de,[["__scopeId","data-v-392d91f8"]]),Ade=[{path:"/",name:"layout",component:Ode,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>yo(()=>import("./index-LUACW_g6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"收银订单"},component:()=>yo(()=>import("./index-DudCf6-k.js"),__vite__mapDeps([9,1,3,6,7,4,10]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>yo(()=>import("./index-CfQognqk.js"),__vite__mapDeps([11,1,3,4,12,7]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>yo(()=>import("./indexCount-B_u3I-N7.js"),__vite__mapDeps([13,14,15]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>yo(()=>import("./index-2bhZOhkw.js"),__vite__mapDeps([16,14,3,4,17]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>yo(()=>import("./index-bGNkp3cp.js"),__vite__mapDeps([18,1,4,19,7]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>yo(()=>import("./index-ITkwvMbx.js"),__vite__mapDeps([20,5,21]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>yo(()=>import("./index-B4Rz5OQ5.js"),__vite__mapDeps([22,2,3,1,4,23]),import.meta.url)},{path:"/test",name:"test",component:()=>yo(()=>import("./test-CuqgpxdP.js"),__vite__mapDeps([24,25]),import.meta.url)}]},{path:"/login",name:"login",component:()=>yo(()=>import("./index-LBcC04nt.js"),__vite__mapDeps([26,2,27]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>yo(()=>import("./index-Gw_Btmsl.js"),__vite__mapDeps([]),import.meta.url)}],qb=yue({history:Uie(),routes:Ade});qb.beforeEach((e,t,n)=>{const o=yd();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ub=qb,Vi=Fg(g9);for(const[e,t]of Object.entries(qL))Vi.component(e,t);const Nde=Cue();Vi.use(Ub);Vi.use(Nde);Vi.use(fie,{locale:pie});Vi.mount("#app");export{cr as A,bue as B,hb as C,S as D,eo as E,Fe as F,Db as G,bt as H,Tp as I,un as J,Wce as K,Ub as L,wt as M,wv as _,xo as a,Ze as b,b as c,le as d,k as e,W as f,mt as g,Nc as h,Mt as i,tt as j,M as k,ht as l,Yt as m,We as n,et as o,ne as p,Vw as q,L as r,Bw as s,Te as t,yd as u,kr as v,X as w,Er as x,i as y,$ as z}; +`,n+=Xce(),n},wv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=e=>(Vw("data-v-4e1f74b3"),e=e(),Bw(),e),Qce={class:"my-card"},ede={class:"card-header"},tde={style:{width:"4.5rem"}},nde=Ii(()=>k("div",{class:"card-title"},"泸优采收银系统",-1)),ode={style:{"margin-left":"1rem",display:"flex","flex-direction":"column","justify-content":"center",cursor:"pointer"}},rde={class:"card-body"},ade={style:{"margin-right":"1rem"}},lde=Ii(()=>k("span",null,"打印自检",-1)),sde={key:0,style:{"margin-right":"1rem"}},ide=Ii(()=>k("span",null,"点击自动连接打印机",-1)),ude=Ii(()=>k("div",null,"已连接打印机T58",-1)),cde={style:{"font-size":"0.7rem",color:"#ccc"}},dde=Ii(()=>k("span",null,"打印机已连接,是否重新连接",-1)),fde={class:"dialog-footer"},pde={class:"el-dropdown-link"},vde={class:"info"},hde={__name:"myHeader",setup(e){const t=yd(),n=qce(),o=L({});o.value=t.userInfo;const r=hb(),a=()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")},l=()=>{window.location.reload()},s=L(!1),u=()=>{console.log("连接打印机"),uni.getEnv(h=>{h.h5?eo.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?(eo.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?(eo.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),eo.success("已连接打印机T58("+m+")")}},!1)}),xo(()=>{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"),T=Ze("el-dropdown");return b(),M("div",Qce,[k("div",ede,[k("div",tde,[W(v,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),nde,k("div",ode,[W(g,{color:"#fff",size:"18",onClick:l},{default:X(()=>[W(_)]),_:1})])]),k("div",rde,[k("div",ade,[W(w,{onClick:m[0]||(m[0]=R=>i(Yt).emit("letPrintReceipt")),type:"primary"},{default:X(()=>[lde]),_:1})]),!i(n).is_connect||!i(n).printAddress?(b(),M("div",sde,[W(w,{onClick:u,type:"warning"},{default:X(()=>[ide]),_:1})])):(b(),M("div",{key:1,style:{"margin-right":"1rem","font-size":"0.9rem"},onClick:m[1]||(m[1]=R=>s.value=!0)},[ude,k("div",cde,"("+Te(i(n).printAddress)+")",1)])),W(y,{modelValue:s.value,"onUpdate:modelValue":m[3]||(m[3]=R=>s.value=R),title:"提示",width:"500"},{footer:X(()=>[k("div",fde,[W(w,{onClick:m[2]||(m[2]=R=>s.value=!1)},{default:X(()=>[mt("取消")]),_:1}),W(w,{type:"primary",onClick:u},{default:X(()=>[mt(" 重新连接 ")]),_:1})])]),default:X(()=>[dde]),_:1},8,["modelValue"]),W(T,{trigger:"hover"},{dropdown:X(()=>[W(A,null,{default:X(()=>[W(x,{onClick:a},{default:X(()=>[mt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",pde,[W(C,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",vde,[k("div",null,Te(o.value.name),1),k("div",null,"("+Te(o.value.role_name)+")",1)]),W(g,{class:"el-icon--right"},{default:X(()=>[W(E)]),_:1})])]),_:1})])])}}},mde=wv(hde,[["__scopeId","data-v-4e1f74b3"]]),gde=vv("order",()=>{const e=L(localStorage.getItem("orderCount")||0);return{orderCount:e,setOrderCount:n=>{e.value=n,localStorage.setItem("orderCount",n)}}}),yde={class:"my-card"},_de=["onClick"],bde={key:0,class:"badge"},wde={__name:"myAside",setup(e){const t=hb(),n=bue(),o=gde(),r=(d=1)=>{o.setOrderCount(d),u.value.forEach(p=>{p.name=="order"&&(p.count=d)})};let a=!1;const l=d=>{try{if(r(0),eo.success("您有新的订单"),a)return;var p=new Audio("/src/assets/order.mp3");p.play(),a=!0,console.log("播放中"),p.addEventListener("ended",function(){a=!1})}catch(h){console.error(h),a=!1,eo.error("播放失败")}},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},{name:"putStorage",title:"入库登记",ico:"Van",count:0},{name:"user",title:"用户",ico:"User",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)}),xo(()=>{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",yde,[(b(!0),M(Fe,null,ht(u.value,m=>(b(),M("div",{key:m.name,class:$(["list-item",{active:i(n).name==m.name}]),onClick:v=>s(m.name)},[W(h,{size:"2rem"},{default:X(()=>[(b(),le(st(m.ico)))]),_:2},1024),k("div",null,Te(m.title),1),m.count?(b(),M("div",bde,Te(m.count),1)):ne("",!0)],10,_de))),128))])}}},Cde=wv(wde,[["__scopeId","data-v-c2e7e17b"]]),Oo=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()};Oo.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)};Oo.prototype.channel=function(e){return this.channels.find(e)};Oo.prototype.allChannels=function(){return this.channels.all()};Oo.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()}})};Oo.prototype.disconnect=function(){this.connection.doNotConnect=1,this.connection.close()};Oo.prototype.subscribeAll=function(){if(this.connection.state==="connected")for(var e in this.channels)this.channels[e].processSubscribe()};Oo.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}})))};Oo.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={}};Oo.prototype.subscribe=function(e){return this.channels[e]?this.channels[e]:e.indexOf("private-")===0?Kb(e,this):e.indexOf("presence-")===0?kde(e,this):Sde(e,this)};Oo.instances=[];function Sde(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 Kb(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){xde({url:t.config.auth,type:"POST",data:{channel_name:e,socket_id:t.connection.socket_id},success:function(o){o=JSON.parse(o),o.channel=e,t.connection.send(JSON.stringify({event:"pusher:subscribe",data:o}))},error:function(o){throw Error(o)}})},n.processSubscribe(),n}function kde(e,t){return Kb(e,t)}function Qa(e){this.dispatcher=new jb,Wb(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 Wb=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 jb,this.connection=e,this.channelName=t,this.subscribeCb=null,this.queue=[],Wb(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 Mde(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}const Tde={class:"common-layout"},$de={__name:"index",setup(e){const t=yd(),o=new Oo({url:"wss://test-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("letPrintReceipt",(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("开启键盘监听")}),xo(()=>{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",Tde,[W(d,null,{default:X(()=>[W(s,null,{default:X(()=>[W(mde)]),_:1}),W(d,null,{default:X(()=>[W(u,{width:"6.25rem"},{default:X(()=>[W(Cde)]),_:1}),W(f,{style:{color:"#333"}},{default:X(()=>[W(c,{class:"my-main"},{default:X(({Component:p})=>[W(nn,{name:"el-zoom-in-top"},{default:X(()=>[(b(),le(st(p)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Ode=wv($de,[["__scopeId","data-v-392d91f8"]]),Ade=[{path:"/",name:"layout",component:Ode,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>yo(()=>import("./index-BKPqUHgE.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"收银订单"},component:()=>yo(()=>import("./index-BWXGAaVp.js"),__vite__mapDeps([9,1,3,6,7,4,10]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>yo(()=>import("./index-BpB5Dek6.js"),__vite__mapDeps([11,1,3,4,12,7]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>yo(()=>import("./indexCount-BMHe5nNi.js"),__vite__mapDeps([13,14,15]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>yo(()=>import("./index-C6GhMFOL.js"),__vite__mapDeps([16,14,3,4,17]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>yo(()=>import("./index-AigTEg-K.js"),__vite__mapDeps([18,1,4,19,7]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>yo(()=>import("./index-Bi9cdaPf.js"),__vite__mapDeps([20,5,21]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>yo(()=>import("./index-vqIWFzd_.js"),__vite__mapDeps([22,2,3,1,4,23]),import.meta.url)},{path:"/test",name:"test",component:()=>yo(()=>import("./test-CheG7YBE.js"),__vite__mapDeps([24,25]),import.meta.url)}]},{path:"/login",name:"login",component:()=>yo(()=>import("./index-DReoLnR3.js"),__vite__mapDeps([26,2,27]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>yo(()=>import("./index-gCozjTdR.js"),__vite__mapDeps([]),import.meta.url)}],qb=yue({history:Uie(),routes:Ade});qb.beforeEach((e,t,n)=>{const o=yd();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ub=qb,Vi=Fg(g9);for(const[e,t]of Object.entries(qL))Vi.component(e,t);const Nde=Cue();Vi.use(Ub);Vi.use(Nde);Vi.use(fie,{locale:pie});Vi.mount("#app");export{cr as A,bue as B,hb as C,S as D,eo as E,Fe as F,Db as G,bt as H,Tp as I,un as J,Wce as K,Ub as L,wt as M,wv as _,xo as a,Ze as b,b as c,le as d,k as e,W as f,mt as g,Nc as h,Mt as i,tt as j,M as k,ht as l,Yt as m,We as n,et as o,ne as p,Vw as q,L as r,Bw as s,Te as t,yd as u,kr as v,X as w,Er as x,i as y,$ as z}; diff --git a/dist/assets/index-Gw_Btmsl.js b/dist/assets/index-gCozjTdR.js similarity index 84% rename from dist/assets/index-Gw_Btmsl.js rename to dist/assets/index-gCozjTdR.js index aef3218..a6761d1 100644 --- a/dist/assets/index-Gw_Btmsl.js +++ b/dist/assets/index-gCozjTdR.js @@ -1 +1 @@ -import{b as t,c,k as a,e,f as o,w as d,g as l}from"./index-C4rRmnc5.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"}},p=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),h=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,[p,h,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; +import{b as t,c,k as a,e,f as o,w as d,g as l}from"./index-DcwaEiyg.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"}},p=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),h=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,[p,h,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; diff --git a/dist/assets/index-B4Rz5OQ5.js b/dist/assets/index-vqIWFzd_.js similarity index 98% rename from dist/assets/index-B4Rz5OQ5.js rename to dist/assets/index-vqIWFzd_.js index 52095de..1686862 100644 --- a/dist/assets/index-B4Rz5OQ5.js +++ b/dist/assets/index-vqIWFzd_.js @@ -1 +1 @@ -import{J as Ae,K as De,E as A,u as de,L as Ie,r as c,M as ye,b as $,c as o,k,f as v,w as r,F as J,l as te,d as z,_ as re,o as ce,m as E,a as ve,h as ue,e,g as y,i as ge,j as _e,z as W,t as b,p as M,q as pe,s as fe,D as Re,n as ne,C as ze,I as Pe}from"./index-C4rRmnc5.js";import{a as me,b as je,u as Ee,c as he,d as Fe,e as Ne,f as Oe,g as Te,h as Be,i as qe}from"./user-UEbWTjyf.js";import"./moment-Cl4UOzQZ.js";import{g as Je}from"./store-BxeA20BY.js";import{p as Ke}from"./padding-BA_o-z8h.js";const Q=Ae.create({baseURL:De.api,timeout:6e4});Q.interceptors.request.use(s=>{const t=localStorage.getItem("Token");return t&&(s.headers.token=t),s},s=>(console.error(s),Promise.reject(s)));Q.interceptors.response.use(s=>{var t;if(s.data.code===-1&&(s.data.msg=="登录过期"||s.data.msg=="登录超时,请重新登录"))throw A({message:s.data.msg,type:"error"}),setTimeout(()=>{const _=de();_.setUserInfo({}),_.setToken(""),Ie.push("/login")},500),new Error(s.data.msg);if(s.data.code===400)throw A({message:s.data.msg,type:"error"}),new Error(s.data.msg);if(s.data.show&&A({message:s.data.msg,type:"error"}),s.data.code===500)throw s.data.msg=JSON.parse(s.data.msg),A({message:((t=s.data.msg)==null?void 0:t.msg)||s.data.msg,type:"error"}),new Error(s.data.msg);return s.data.code===0?Promise.reject(s.data):s.data},s=>{var t,_;return console.error(s),A({message:((_=(t=s.response)==null?void 0:t.data)==null?void 0:_.msg)||s,type:"error"}),Promise.reject(s)});function be(s){return Q.get("/city",{params:s})}function ke(s){return Q.get("/area",{params:s})}function $e(s){return Q.get("/street",{params:s})}function we(s){return Q.get("/village",{params:s})}function Ve(s){return Q.get("/brigade",{params:s})}const Me={class:"add-user"},We={__name:"add",emits:["close"],setup(s,{expose:t,emit:_}){const S=c(null),f=ye({mobile:"",real_name:"",user_ship:"",selectedValues:[]}),w=ye({mobile:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],real_name:[{required:!0,message:"请输入用户姓名",trigger:"blur"}],user_ship:[{required:!0,message:"请选择用户类型",trigger:"change"}],selectedValues:[{required:!0,message:"请选择用户地址",trigger:"change"}]}),C=c([]),j=async(P,g)=>{const V=P.level;let a;if(V!==0&&!P.data.code)return g([]);V===0?(a=await be({province_code:51e4}),a=a.data.map(m=>({code:m.city_code,name:m.city_name}))):V===1?(a=await ke({city_code:P.data.code}),a=a.data.map(m=>({code:m.area_code,name:m.area_name}))):V===2?(a=await $e({area_code:P.data.code}),a=a.data.map(m=>({code:m.street_code,name:m.street_name}))):V===3?(a=await we({street_code:P.data.code}),a=a.data.map(m=>({code:m.village_code,name:m.village_name}))):V===4&&(a=await Ve({village_code:P.data.code}),a=a.data.map(m=>({code:m.id,name:m.brigade_name,leaf:!0}))),g(a)},X={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:j},I=c([]);(()=>{me().then(P=>{I.value=P.data.lists})})();const O=_;return t({addUser:()=>{S.value.validate(async P=>{if(P){let g={};g.mobile=f.mobile,g.user_ship=f.user_ship,g.real_name=f.real_name,g.province="510000",g.city=f.selectedValues[0],g.area=f.selectedValues[1],g.street=f.selectedValues[2],g.village=f.selectedValues[3],g.brigade=f.selectedValues[4],je(g).then(V=>{O("close")})}})}}),(P,g)=>{const V=$("el-input"),a=$("el-form-item"),m=$("el-option"),K=$("el-select"),T=$("el-cascader"),G=$("el-form");return o(),k("div",Me,[v(G,{model:f,rules:w,ref_key:"formDataRef",ref:S,"label-width":"80px"},{default:r(()=>[v(a,{label:"用户电话",prop:"mobile"},{default:r(()=>[v(V,{modelValue:f.mobile,"onUpdate:modelValue":g[0]||(g[0]=U=>f.mobile=U),placeholder:"请输入用户电话"},null,8,["modelValue"])]),_:1}),v(a,{label:"用户姓名",prop:"real_name"},{default:r(()=>[v(V,{modelValue:f.real_name,"onUpdate:modelValue":g[1]||(g[1]=U=>f.real_name=U),placeholder:"请输入用户姓名"},null,8,["modelValue"])]),_:1}),v(a,{label:"用户类型",prop:"user_ship"},{default:r(()=>[v(K,{modelValue:f.user_ship,"onUpdate:modelValue":g[2]||(g[2]=U=>f.user_ship=U),placeholder:"请选择用户类型",style:{width:"100%"}},{default:r(()=>[(o(!0),k(J,null,te(I.value,U=>(o(),z(m,{key:U.id,label:U.title,value:U.id,disabled:U.id==1},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1}),v(a,{label:"用户地址",prop:"selectedValues"},{default:r(()=>[v(T,{style:{width:"100%"},modelValue:f.selectedValues,"onUpdate:modelValue":g[3]||(g[3]=U=>f.selectedValues=U),options:C.value,props:X,load:j,class:"w-full"},null,8,["modelValue","options"])]),_:1})]),_:1},8,["model","rules"])])}}},Ce=s=>(pe("data-v-e2b0bc71"),s=s(),fe(),s),Ge={class:"my-order"},He={class:"header-nav"},Qe=Ce(()=>e("div",{class:"nav-item"},b("用户列表"),-1)),Xe={class:"header-row"},Ye=Ce(()=>e("div",{class:"label"},"用户类型",-1)),Ze={class:"header-input"},et={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},tt=["onClick"],at={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},lt={class:"top flex"},st={class:"r-1"},ot={class:"bold"},it={class:"bottom flex",style:{"justify-content":"space-between"}},nt={class:"red"},dt={class:"red"},ut={class:"red"},rt={class:"red"},ct={key:0,class:"load-end"},vt={key:1,class:"load-end"},_t={class:"dialog-footer"},pt={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(s){de(),c([]);const t=c({page_no:1,page_size:20,mobile:"",user_ship:""}),_=c(!1),S=c(0),f=c(0),w=c(!1),C=c([]),j=(V=!1)=>{if(V)t.value.page_no=1;else if(w.value||_.value)return;_.value=!0,Ee(t.value).then(a=>{V?C.value=a.data.lists:C.value=[...C.value,...a.data.lists],t.value.page_no==1&&C.value.length>0&&E.emit("set-user-detail",C.value[0]),a.data.lists.length{w.value=!0,_.value=!1})},X=(V,a)=>{f.value=a,E.emit("set-user-detail",V)},I=c(!1),R=c(null),O=()=>{var V;(V=R.value)==null||V.addUser()},B=()=>{I.value=!1,j(!0)},P=c([]);return(()=>{me().then(V=>{P.value=V.data.lists})})(),ce(()=>{E.on("re-load-user-list",()=>{j(!0)})}),ve(()=>{E.off("re-load-user-list")}),(V,a)=>{const m=$("Plus"),K=$("el-icon"),T=$("el-button"),G=$("el-option"),U=$("el-select"),Y=$("el-input"),N=$("el-avatar"),F=$("el-tag"),L=$("el-dialog"),u=ue("loading"),n=ue("infinite-scroll");return o(),k("div",Ge,[e("div",He,[Qe,v(T,{type:"primary",onClick:a[0]||(a[0]=i=>I.value=!0)},{default:r(()=>[v(K,null,{default:r(()=>[v(m)]),_:1}),y(" 添加用户")]),_:1})]),e("div",Xe,[Ye,v(U,{modelValue:t.value.user_ship,"onUpdate:modelValue":a[1]||(a[1]=i=>t.value.user_ship=i),onChange:a[2]||(a[2]=i=>j(!0)),placeholder:"请选择用户类型",style:{flex:"1"}},{default:r(()=>[(o(!0),k(J,null,te(P.value,i=>(o(),z(G,{key:i.id,label:i.title,value:i.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e("div",Ze,[v(Y,{modelValue:t.value.mobile,"onUpdate:modelValue":a[4]||(a[4]=i=>t.value.mobile=i),placeholder:"搜索手机号/ID",onKeydown:a[5]||(a[5]=ge(i=>j(!0),["enter"])),onClear:a[6]||(a[6]=i=>j(!0)),clearable:""},{append:r(()=>[v(T,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[3]||(a[3]=i=>j(!0))},{default:r(()=>[y("搜索")]),_:1})]),_:1},8,["modelValue"])]),_e((o(),k("div",et,[(o(!0),k(J,null,te(C.value,(i,h)=>{var d;return o(),k("div",{class:W(["item",{"item-active":f.value==h}]),key:h,onClick:Z=>X(i,h)},[v(N,{class:"avatar",src:i.avatar},null,8,["src"]),e("div",at,[e("div",lt,[e("div",st,[e("span",ot,b(i.nickname),1),e("span",null,b(" (ID:"+i.id+")"),1)]),e("div",null,"手机号: "+b(i.mobile),1)]),e("div",it,[e("div",null,[y("余额: "),e("span",nt,b(i.now_money),1)]),e("div",null,[y("采购款: "),e("span",dt,b(i.purchase_funds),1)]),e("div",null,[y("返还金: "),e("span",ut,b((d=i.return_money)==null?void 0:d.toFixed(2)),1)]),e("div",null,[y("礼品券: "),e("span",rt,b(i.integral),1)]),e("div",null,[i.user_ship!=1?(o(),z(F,{key:0,type:"primary"},{default:r(()=>[y(b(i.user_ship_name),1)]),_:2},1024)):(o(),z(F,{key:1,type:"success"},{default:r(()=>[y(b(i.user_ship_name),1)]),_:2},1024))])])])],10,tt)}),128)),w.value?(o(),k("div",ct,"没有更多了")):M("",!0),_.value?(o(),k("div",vt,"加载中...")):M("",!0)])),[[u,_.value],[n,j]]),v(L,{modelValue:I.value,"onUpdate:modelValue":a[8]||(a[8]=i=>I.value=i),title:"添加用户",width:"600"},{footer:r(()=>[e("div",_t,[v(T,{onClick:a[7]||(a[7]=i=>I.value=!1)},{default:r(()=>[y("取消")]),_:1}),v(T,{type:"primary",onClick:O},{default:r(()=>[y(" 添加 ")]),_:1})])]),default:r(()=>[v(We,{ref_key:"addRef",ref:R,onClose:B},null,512)]),_:1},8,["modelValue"])])}}},ft=re(pt,[["__scopeId","data-v-e2b0bc71"]]),ae=s=>(pe("data-v-88b7f8af"),s=s(),fe(),s),mt=ae(()=>e("h4",null,"选择支付方式",-1)),yt={class:"dra-body"},ht={class:"header"},gt={style:{display:"inline-block"}},bt=ae(()=>e("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),kt={style:{color:"#f5222d","padding-bottom":"2rem"}},$t={style:{"font-size":"1.6rem"}},wt={key:0,"element-loading-text":"支付中",class:"card1"},Vt=ae(()=>e("div",{class:"tips"},null,-1)),Ct={key:1,class:"card2"},St={class:"drawer-body"},xt={class:"counter"},Ut={class:"received"},Lt={key:0},At={key:1,style:{"font-size":"1rem",color:"#999"}},Dt={key:0,class:"balance"},It={class:"money"},Rt=ae(()=>e("div",{class:"tips"},"按回车(Enter)确认支付",-1)),zt={key:1,class:"balance"},Pt=ae(()=>e("div",null,"不够找零, 请支付更多金额",-1)),jt=ae(()=>e("div",{class:"tips"},"按下小键盘输入金额",-1)),Et=[Pt,jt],Ft={class:"keypad"},Nt={class:"left"},Ot={class:"right"},Tt={style:{width:"100%",display:"flex","justify-content":"center"}},Bt={__name:"payUser",emits:["paySuccess"],setup(s,{expose:t,emit:_}){const S=c(!1),f=c(1),w=c(""),C=c("");de();const j=()=>{N()},X=()=>{ne(()=>{setTimeout(()=>{var l;F.value=!1,w.value="",a.value=!0,(l=C.value)==null||l.focus(),I(f.value)},300)})},I=l=>{if(f.value=l,f.value==2)return f.value=1,A.error("暂不支持现金收款");window.removeEventListener("keydown",le),ne(()=>{var p;w.value="",(p=C.value)==null||p.focus()})},R=c({price:0,uid:""}),O=c([]),B=c(!1),P=l=>{R.value=l.data,O.value=l.cart_id,B.value=l.isRePay||!1},g=l=>{R.value.total=l.price,G.value=l.order_id},V=_,a=c(!1),m=c(["1","2","3","4","5","6","7","8","9","0","00","."]),K=/^(10|11|12|13|14|15)\d{16}$/,T=/^(25|26|27|28|29|30)\d{14,22}$/,G=c(""),U=()=>{if(F.value=!0,C.value.blur(),B.value)Y();else{let l;if(K.test(w.value))l="9";else if(T.test(w.value))l="13";else return F.value=!1,w.value="",C.value.focus(),A.error("请输入正确的支付码");he({uid:R.value.uid,price:R.value.price,pay_type:l,auth_code:w.value}).then(p=>{p.data.out_trade_no&&p.msg=="支付成功"?(S.value=!1,A({message:"支付成功",type:"success"}),N(p.data)):p.msg=="用户支付中"&&p.code==1&&(A.warning(p.msg),E.on("pay_success",x=>{A({message:"支付成功",type:"success"}),setTimeout(()=>{E.off("pay_success")},200),S.value=!1,N(x)}))}).catch(p=>{F.value=!1,ne(()=>{var x;(x=C.value)==null||x.focus()})})}},Y=()=>{let l=17;if(f.value==1)if(K.test(w.value))l="9";else if(T.test(w.value))l="13";else return F.value=!1,w.value="",C.value.focus(),A.error("请输入正确的支付码");Je({order_id:R.value.order_id,pay_type:l,auth_code:w.value}).then(p=>{var x;(x=p.msg)!=null&&x.includes("成功")?(S.value=!1,A({message:"支付成功",type:"success"}),N()):p.msg=="用户支付中"&&p.code==1&&(A.warning(p.msg),E.on("pay_success",H=>{A({message:"支付成功",type:"success"}),setTimeout(()=>{E.off("pay_success")},200),S.value=!1,N(H)}))}).catch(p=>{w.value="",F.value=!1,ne(()=>{var x;(x=C.value)==null||x.focus()})})};c(0);const N=l=>{var p;window.removeEventListener("keydown",le),a.value=!1,F.value=!1,w.value="",u.value="",L.value=[],(p=C.value)==null||p.blur(),V("paySuccess",l),S.value=!1},F=c(!1);t({drawer:S,setForm:P,setRePay:g,beforeClose:N});const L=c([]),u=c(""),n=Re(()=>+u.value>0?(u.value-R.value.total).toFixed(2):-1),i=c(!1),h=l=>{l===-1?L.value=[]:L.value.pop(),u.value=L.value.length?L.value.join(""):0},d=l=>{i.value===!1&&(u.value="",i.value=!0);let p=String(u.value).indexOf(".")+1,x=String(u.value).length-p;console.log(p,x),(p===0||x<2)&&(L.value.join("")<=9999999&&L.value.push(l),u.value=L.value.join("")>99999999?99999999:L.value.join(""))},Z=()=>{if(n.value===""||n.value===null||n.value===void 0||+u.value<+R.value.total)return A.error("收款金额应该大于等于应收金额");B.value?Y():he({uid:R.value.uid,price:R.value.price,pay_type,pay_type:"17"}).then(l=>{S.value=!1,A({message:l.msg,type:"success"}),I(1),N()}).catch(l=>{F.value=!1})},le=l=>{let x=(l||window.event).keyCode;if(x==37)return I(2);if(x==120)return E.emit("F9");if(x==27)return N();switch(l.stopPropagation(),l.preventDefault(),x){case 96:case 48:d(0);break;case 97:case 49:d(1);break;case 98:case 50:d(2);break;case 99:case 51:d(3);break;case 100:case 52:d(4);break;case 101:case 53:d(5);break;case 102:case 54:d(6);break;case 103:case 55:d(7);break;case 104:case 56:d(8);break;case 105:case 57:d(9);break;case 110:d(".");break;case 190:d(".");break;case 8:h();break;case 13:Z();break}},ee=c(!1),oe=()=>{if(!(!S.value||ee.value&&w.value.length>0)&&f.value==2)return I(1)},se=()=>{if(!(!S.value||ee.value&&w.value.length>0)&&f.value==1)return I(2)};return ce(()=>{E.on("left",oe),E.on("right",se)}),ve(()=>{E.off("left",oe),E.off("right",se)}),(l,p)=>{const x=$("el-input"),H=$("el-button"),Se=$("Delete"),xe=$("el-icon"),Ue=$("el-drawer"),Le=ue("loading");return o(),z(Ue,{size:"60rem",modelValue:S.value,"onUpdate:modelValue":p[6]||(p[6]=ie=>S.value=ie),direction:"rtl",onOpen:X,"before-close":N},{header:r(()=>[mt]),default:r(()=>{var ie;return[e("div",yt,[e("div",ht,[e("div",{class:W(["left",{active:f.value==1}]),onClick:p[0]||(p[0]=q=>I(1))}," 微信/支付宝 ",2),e("div",{class:W(["right",{active:f.value==2}]),onClick:p[1]||(p[1]=q=>I(2))}," 现金收款 ",2)]),e("div",null,[e("div",gt,[bt,e("div",kt,[y(" ¥"),e("span",$t,b((ie=R.value)==null?void 0:ie.price),1)])])]),f.value==1?_e((o(),k("div",wt,[v(x,{ref_key:"codeRef",ref:C,modelValue:w.value,"onUpdate:modelValue":p[2]||(p[2]=q=>w.value=q),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ge(U,["enter"]),onFocus:p[3]||(p[3]=q=>ee.value=!0),onBlur:p[4]||(p[4]=q=>ee.value=!1)},null,8,["modelValue"]),Vt])),[[Le,F.value]]):(o(),k("div",Ct,[e("div",St,[e("div",xt,[e("div",Ut,[u.value?(o(),k("span",Lt,b(u.value),1)):(o(),k("span",At,"按下键盘输入客户支付金额"))]),n.value>=0?(o(),k("div",Dt,[e("div",null,[y(" 需找零(元):"),e("span",It,"¥"+b(n.value),1)]),Rt])):(o(),k("div",zt,Et)),e("div",Ft,[e("div",Nt,[(o(!0),k(J,null,te(m.value,q=>(o(),z(H,{key:q,onClick:Ha=>d(q)},{default:r(()=>[y(b(q),1)]),_:2},1032,["onClick"]))),128))]),e("div",Ot,[v(H,{onClick:h},{default:r(()=>[v(xe,null,{default:r(()=>[v(Se)]),_:1})]),_:1}),v(H,{onClick:p[5]||(p[5]=q=>h(-1))},{default:r(()=>[y("C")]),_:1}),v(H,{class:W(["enter",{"enter-disable":+u.value<+R.value.total}]),disabled:+u.value<+R.value.total,onClick:Z},{default:r(()=>[y(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]}),footer:r(()=>[e("div",Tt,[v(H,{class:"cancel-btn",onClick:j},{default:r(()=>[y("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},qt=re(Bt,[["__scopeId","data-v-88b7f8af"]]),D=s=>(pe("data-v-ff0075ff"),s=s(),fe(),s),Jt={class:"my-order"},Kt={key:0,class:"detail"},Mt={class:"table"},Wt=D(()=>e("div",{class:"table-title"},"用户信息",-1)),Gt={class:"table-info"},Ht={class:"info-item"},Qt=D(()=>e("div",{class:"info-item-title"},"用户余额:",-1)),Xt={class:"info-item-info red"},Yt={class:"info-item"},Zt=D(()=>e("div",{class:"info-item-title"},"采购款:",-1)),ea={class:"info-item-info red"},ta={class:"info-item"},aa=D(()=>e("div",{class:"info-item-title"},"返还金:",-1)),la={class:"info-item-info red"},sa={class:"info-item"},oa=D(()=>e("div",{class:"info-item-title"},"头像:",-1)),ia={class:"info-item-info"},na={class:"info-item"},da=D(()=>e("div",{class:"info-item-title"},"礼品券:",-1)),ua={class:"info-item-info red"},ra={class:"info-item"},ca=D(()=>e("div",{class:"info-item-title"},"ID:",-1)),va={class:"info-item-info"},_a={class:"info-item"},pa=D(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),fa={class:"info-item-info"},ma={class:"info-item"},ya=D(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),ha={class:"info-item-info"},ga={class:"info-item"},ba=D(()=>e("div",{class:"info-item-title"},"用户账号:",-1)),ka={class:"info-item-info"},$a={class:"info-item"},wa=D(()=>e("div",{class:"info-item-title"},"真实姓名:",-1)),Va={class:"info-item-info"},Ca={class:"info-item"},Sa=D(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),xa={class:"info-item-info"},Ua={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},La=D(()=>e("div",{class:"info-item-title"},"用户类型:",-1)),Aa={class:"info-item-info"},Da={key:0,class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Ia=D(()=>e("div",{class:"info-item-title"},"用户标签:",-1)),Ra={class:"info-item-info"},za={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Pa=D(()=>e("div",{class:"info-item-title"},"用户地址:",-1)),ja=D(()=>e("div",{class:"table-title"},[y("供销经营礼包"),e("span",{class:"tips"},"首次购买1000元以上成为行业会员")],-1)),Ea={class:"table-info"},Fa={class:"pay-btn"},Na=D(()=>e("div",null,"¥1000.00",-1)),Oa=[Na],Ta=D(()=>e("div",null,"¥2000.00",-1)),Ba=[Ta],qa=D(()=>e("div",null,"¥5000.00",-1)),Ja=[qa],Ka={key:1},Ma={__name:"detail",setup(s){de(),ze();const t=c({id:""}),_=c({price:"",type:1}),S=c(null),f=()=>{_.value.type==1?_.value.price="1000":_.value.type==2?_.value.price="2000":_.value.type==3&&(_.value.price="5000"),_.value.type==0&&(_.value.price=Number(_.value.price).toFixed(2)),console.log("支付",_.value),S.value.setForm({data:{uid:t.value.id,price:_.value.price}}),S.value.drawer=!0},w=()=>{console.log("支付成功"),E.emit("re-load-user-list")},C=c(!1),j=c([]);(()=>{me().then(u=>{j.value=u.data.lists})})();const I=()=>{Ne({id:t.value.id,user_ship:t.value.user_ship}).then(u=>{var n;A.success("修改成功"),t.value.user_ship_name=(n=j.value.find(i=>i.id==t.value.user_ship))==null?void 0:n.title,C.value=!1})},R=()=>{C.value=!1},O=c(!1),B=c([]);(()=>{Oe().then(u=>{B.value=u.data.lists})})();const g=()=>{Te({id:t.value.id,label_id:t.value.label_id}).then(u=>{var n;A.success("修改成功"),t.value.label_name=(n=B.value.find(i=>i.label_id==t.value.label_id))==null?void 0:n.label_name,O.value=!1})},V=()=>{O.value=!1},a=c({id:"",province:"",city:"",area:"",street:"",brigade:""}),m=c([]),K=c([]),T=()=>{Be({uid:t.value.id}).then(u=>{u.data.village&&(m.value=[u.data.city,u.data.area,u.data.street,u.data.village,+u.data.brigade],K.value=JSON.parse(JSON.stringify(m.value)),a.value=Object.assign(a.value,u.data))})},G=c([]),U=async(u,n)=>{const i=u.level;let h;if(i!==0&&!u.data.code)return n([]);i===0?(h=await be({province_code:51e4}),h=h.data.map(d=>({code:d.city_code,name:d.city_name}))):i===1?(h=await ke({city_code:u.data.code}),h=h.data.map(d=>({code:d.area_code,name:d.area_name}))):i===2?(h=await $e({area_code:u.data.code}),h=h.data.map(d=>({code:d.street_code,name:d.street_name}))):i===3?(h=await we({street_code:u.data.code}),h=h.data.map(d=>({code:d.village_code,name:d.village_name}))):i===4&&(h=await Ve({village_code:u.data.code}),h=h.data.map(d=>({code:d.id,name:d.brigade_name,leaf:!0}))),n(h)},Y={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:U},N=async()=>{a.value.city=m.value[0],a.value.area=m.value[1],a.value.street=m.value[2],a.value.village=m.value[3],a.value.brigade=m.value[4],a.value.phone||(a.value.phone=t.value.account),a.value.real_name||(a.value.real_name=t.value.real_name||t.value.nickname),qe({...a.value,uid:t.value.id}).then(u=>{A.success("编辑成功"),L.value=!0})},F=()=>{m.value=JSON.parse(JSON.stringify(K.value)),L.value=!0},L=c(!0);return ce(()=>{E.on("set-user-detail",u=>{t.value=u,Fe({id:u.id}).then(({data:n})=>{t.value=Object.assign(u,n),console.log(t.value)}),T()})}),ve(()=>{E.off("set-user-detail")}),(u,n)=>{var se;const i=$("el-avatar"),h=$("el-tag"),d=$("el-button"),Z=$("el-option"),le=$("el-select"),ee=$("el-cascader"),oe=$("el-empty");return o(),k("div",Jt,[t.value.id?(o(),k("div",Kt,[e("div",Mt,[Wt,e("div",Gt,[e("div",Ht,[Qt,e("div",Xt,"¥"+b(t.value.now_money),1)]),e("div",Yt,[Zt,e("div",ea,"¥"+b(t.value.purchase_funds),1)]),e("div",ta,[aa,e("div",la,"¥"+b((se=t.value.number)==null?void 0:se.toFixed(2)),1)]),e("div",sa,[oa,e("div",ia,[v(i,{style:{width:"4rem",height:"4rem"},src:t.value.avatar},null,8,["src"])])]),e("div",na,[da,e("div",ua,"¥"+b(t.value.integral),1)]),e("div",ra,[ca,e("div",va,b(t.value.id),1)]),e("div",_a,[pa,e("div",fa,b(t.value.nickname),1)]),e("div",ma,[ya,e("div",ha,b(t.value.mobile),1)]),e("div",ga,[ba,e("div",ka,b(t.value.account),1)]),e("div",$a,[wa,e("div",Va,b(t.value.real_name),1)]),e("div",Ca,[Sa,e("div",xa,b(t.value.create_time),1)]),e("div",Ua,[La,e("div",Aa,[C.value==!1?(o(),k(J,{key:0},[t.value.user_ship!=1?(o(),z(h,{key:0,type:"primary",size:"large"},{default:r(()=>[y(b(t.value.user_ship_name),1)]),_:1})):(o(),z(h,{key:1,type:"success",size:"large"},{default:r(()=>[y(b(t.value.user_ship_name),1)]),_:1})),t.value.user_ship!=1?(o(),z(d,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:n[0]||(n[0]=l=>C.value=!0)},{default:r(()=>[y("修改")]),_:1})):M("",!0)],64)):(o(),k(J,{key:1},[v(le,{modelValue:t.value.user_ship,"onUpdate:modelValue":n[1]||(n[1]=l=>t.value.user_ship=l),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:r(()=>[(o(!0),k(J,null,te(j.value,l=>(o(),z(Z,{key:l.id,label:l.title,value:l.id,disabled:l.id==1},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"]),v(d,{type:"primary",style:{"margin-left":"1rem"},onClick:I},{default:r(()=>[y("确认")]),_:1}),v(d,{style:{"margin-left":"1rem"},onClick:R},{default:r(()=>[y("取消")]),_:1})],64))])]),t.value.user_ship==1?(o(),k("div",Da,[Ia,e("div",Ra,[O.value==!1?(o(),k(J,{key:0},[t.value.label_name?(o(),z(h,{key:0,type:"primary",size:"large"},{default:r(()=>[y(b(t.value.label_name),1)]),_:1})):M("",!0),t.value.label_name?(o(),z(d,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:n[2]||(n[2]=l=>O.value=!0)},{default:r(()=>[y("修改")]),_:1})):(o(),z(d,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:n[3]||(n[3]=l=>{t.value.label_id="",O.value=!0})},{default:r(()=>[y("添加")]),_:1}))],64)):(o(),k(J,{key:1},[v(le,{modelValue:t.value.label_id,"onUpdate:modelValue":n[4]||(n[4]=l=>t.value.label_id=l),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:r(()=>[(o(!0),k(J,null,te(B.value,l=>(o(),z(Z,{key:l.label_id,label:l.label_name,value:l.label_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),v(d,{type:"primary",style:{"margin-left":"1rem"},onClick:g},{default:r(()=>[y("确认")]),_:1}),v(d,{style:{"margin-left":"1rem"},onClick:V},{default:r(()=>[y("取消")]),_:1})],64))])])):M("",!0),e("div",za,[Pa,(o(),z(ee,{key:t.value.id,style:{flex:"1"},modelValue:m.value,"onUpdate:modelValue":n[5]||(n[5]=l=>m.value=l),options:G.value,props:Y,load:U,class:"w-full",disabled:L.value},null,8,["modelValue","options","disabled"])),L.value?(o(),z(d,{key:0,type:"primary",style:{"margin-left":"1rem"},onClick:n[6]||(n[6]=l=>L.value=!1)},{default:r(()=>[y("修改")]),_:1})):M("",!0),L.value?M("",!0):(o(),z(d,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:N},{default:r(()=>[y("确认")]),_:1})),L.value?M("",!0):(o(),z(d,{key:2,style:{"margin-left":"1rem"},onClick:F},{default:r(()=>[y("取消")]),_:1}))])]),ja,e("div",Ea,[e("div",Fa,[e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==1}]),onClick:n[7]||(n[7]=l=>_.value.type=1)},Oa,2),e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==2}]),onClick:n[8]||(n[8]=l=>_.value.type=2)},Ba,2),e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==3}]),onClick:n[9]||(n[9]=l=>_.value.type=3)},Ja,2),e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==0}]),onClick:n[11]||(n[11]=l=>_.value.type=0)},[_e(e("input",{type:"number",class:"input","onUpdate:modelValue":n[10]||(n[10]=l=>_.value.price=l),placeholder:"自定义金额"},null,512),[[Pe,_.value.price]])],2)]),v(d,{type:"primary",size:"large",class:"pay",onClick:f},{default:r(()=>[y("立即支付")]),_:1})])])])):(o(),k("div",Ka,[v(oe)])),v(qt,{ref_key:"payRef",ref:S,onPaySuccess:w},null,512)])}}},Wa=re(Ma,[["__scopeId","data-v-ff0075ff"]]),Ga={class:"my-card"},tl={__name:"index",setup(s){return(t,_)=>(o(),k("div",Ga,[v(ft,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),v(Ke),v(Wa,{ref:"detailRef"},null,512)]))}};export{tl as default}; +import{J as Ae,K as De,E as A,u as de,L as Ie,r as c,M as ye,b as $,c as o,k,f as v,w as r,F as J,l as te,d as z,_ as re,o as ce,m as E,a as ve,h as ue,e,g as y,i as ge,j as _e,z as W,t as b,p as M,q as pe,s as fe,D as Re,n as ne,C as ze,I as Pe}from"./index-DcwaEiyg.js";import{a as me,b as je,u as Ee,c as he,d as Fe,e as Ne,f as Oe,g as Te,h as Be,i as qe}from"./user-CnK8Y4fd.js";import"./moment-Cl4UOzQZ.js";import{g as Je}from"./store-85zRAkSB.js";import{p as Ke}from"./padding-CG_WCVSK.js";const Q=Ae.create({baseURL:De.api,timeout:6e4});Q.interceptors.request.use(s=>{const t=localStorage.getItem("Token");return t&&(s.headers.token=t),s},s=>(console.error(s),Promise.reject(s)));Q.interceptors.response.use(s=>{var t;if(s.data.code===-1&&(s.data.msg=="登录过期"||s.data.msg=="登录超时,请重新登录"))throw A({message:s.data.msg,type:"error"}),setTimeout(()=>{const _=de();_.setUserInfo({}),_.setToken(""),Ie.push("/login")},500),new Error(s.data.msg);if(s.data.code===400)throw A({message:s.data.msg,type:"error"}),new Error(s.data.msg);if(s.data.show&&A({message:s.data.msg,type:"error"}),s.data.code===500)throw s.data.msg=JSON.parse(s.data.msg),A({message:((t=s.data.msg)==null?void 0:t.msg)||s.data.msg,type:"error"}),new Error(s.data.msg);return s.data.code===0?Promise.reject(s.data):s.data},s=>{var t,_;return console.error(s),A({message:((_=(t=s.response)==null?void 0:t.data)==null?void 0:_.msg)||s,type:"error"}),Promise.reject(s)});function be(s){return Q.get("/city",{params:s})}function ke(s){return Q.get("/area",{params:s})}function $e(s){return Q.get("/street",{params:s})}function we(s){return Q.get("/village",{params:s})}function Ve(s){return Q.get("/brigade",{params:s})}const Me={class:"add-user"},We={__name:"add",emits:["close"],setup(s,{expose:t,emit:_}){const S=c(null),f=ye({mobile:"",real_name:"",user_ship:"",selectedValues:[]}),w=ye({mobile:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],real_name:[{required:!0,message:"请输入用户姓名",trigger:"blur"}],user_ship:[{required:!0,message:"请选择用户类型",trigger:"change"}],selectedValues:[{required:!0,message:"请选择用户地址",trigger:"change"}]}),C=c([]),j=async(P,g)=>{const V=P.level;let a;if(V!==0&&!P.data.code)return g([]);V===0?(a=await be({province_code:51e4}),a=a.data.map(m=>({code:m.city_code,name:m.city_name}))):V===1?(a=await ke({city_code:P.data.code}),a=a.data.map(m=>({code:m.area_code,name:m.area_name}))):V===2?(a=await $e({area_code:P.data.code}),a=a.data.map(m=>({code:m.street_code,name:m.street_name}))):V===3?(a=await we({street_code:P.data.code}),a=a.data.map(m=>({code:m.village_code,name:m.village_name}))):V===4&&(a=await Ve({village_code:P.data.code}),a=a.data.map(m=>({code:m.id,name:m.brigade_name,leaf:!0}))),g(a)},X={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:j},I=c([]);(()=>{me().then(P=>{I.value=P.data.lists})})();const O=_;return t({addUser:()=>{S.value.validate(async P=>{if(P){let g={};g.mobile=f.mobile,g.user_ship=f.user_ship,g.real_name=f.real_name,g.province="510000",g.city=f.selectedValues[0],g.area=f.selectedValues[1],g.street=f.selectedValues[2],g.village=f.selectedValues[3],g.brigade=f.selectedValues[4],je(g).then(V=>{O("close")})}})}}),(P,g)=>{const V=$("el-input"),a=$("el-form-item"),m=$("el-option"),K=$("el-select"),T=$("el-cascader"),G=$("el-form");return o(),k("div",Me,[v(G,{model:f,rules:w,ref_key:"formDataRef",ref:S,"label-width":"80px"},{default:r(()=>[v(a,{label:"用户电话",prop:"mobile"},{default:r(()=>[v(V,{modelValue:f.mobile,"onUpdate:modelValue":g[0]||(g[0]=U=>f.mobile=U),placeholder:"请输入用户电话"},null,8,["modelValue"])]),_:1}),v(a,{label:"用户姓名",prop:"real_name"},{default:r(()=>[v(V,{modelValue:f.real_name,"onUpdate:modelValue":g[1]||(g[1]=U=>f.real_name=U),placeholder:"请输入用户姓名"},null,8,["modelValue"])]),_:1}),v(a,{label:"用户类型",prop:"user_ship"},{default:r(()=>[v(K,{modelValue:f.user_ship,"onUpdate:modelValue":g[2]||(g[2]=U=>f.user_ship=U),placeholder:"请选择用户类型",style:{width:"100%"}},{default:r(()=>[(o(!0),k(J,null,te(I.value,U=>(o(),z(m,{key:U.id,label:U.title,value:U.id,disabled:U.id==1},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1}),v(a,{label:"用户地址",prop:"selectedValues"},{default:r(()=>[v(T,{style:{width:"100%"},modelValue:f.selectedValues,"onUpdate:modelValue":g[3]||(g[3]=U=>f.selectedValues=U),options:C.value,props:X,load:j,class:"w-full"},null,8,["modelValue","options"])]),_:1})]),_:1},8,["model","rules"])])}}},Ce=s=>(pe("data-v-e2b0bc71"),s=s(),fe(),s),Ge={class:"my-order"},He={class:"header-nav"},Qe=Ce(()=>e("div",{class:"nav-item"},b("用户列表"),-1)),Xe={class:"header-row"},Ye=Ce(()=>e("div",{class:"label"},"用户类型",-1)),Ze={class:"header-input"},et={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},tt=["onClick"],at={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},lt={class:"top flex"},st={class:"r-1"},ot={class:"bold"},it={class:"bottom flex",style:{"justify-content":"space-between"}},nt={class:"red"},dt={class:"red"},ut={class:"red"},rt={class:"red"},ct={key:0,class:"load-end"},vt={key:1,class:"load-end"},_t={class:"dialog-footer"},pt={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(s){de(),c([]);const t=c({page_no:1,page_size:20,mobile:"",user_ship:""}),_=c(!1),S=c(0),f=c(0),w=c(!1),C=c([]),j=(V=!1)=>{if(V)t.value.page_no=1;else if(w.value||_.value)return;_.value=!0,Ee(t.value).then(a=>{V?C.value=a.data.lists:C.value=[...C.value,...a.data.lists],t.value.page_no==1&&C.value.length>0&&E.emit("set-user-detail",C.value[0]),a.data.lists.length{w.value=!0,_.value=!1})},X=(V,a)=>{f.value=a,E.emit("set-user-detail",V)},I=c(!1),R=c(null),O=()=>{var V;(V=R.value)==null||V.addUser()},B=()=>{I.value=!1,j(!0)},P=c([]);return(()=>{me().then(V=>{P.value=V.data.lists})})(),ce(()=>{E.on("re-load-user-list",()=>{j(!0)})}),ve(()=>{E.off("re-load-user-list")}),(V,a)=>{const m=$("Plus"),K=$("el-icon"),T=$("el-button"),G=$("el-option"),U=$("el-select"),Y=$("el-input"),N=$("el-avatar"),F=$("el-tag"),L=$("el-dialog"),u=ue("loading"),n=ue("infinite-scroll");return o(),k("div",Ge,[e("div",He,[Qe,v(T,{type:"primary",onClick:a[0]||(a[0]=i=>I.value=!0)},{default:r(()=>[v(K,null,{default:r(()=>[v(m)]),_:1}),y(" 添加用户")]),_:1})]),e("div",Xe,[Ye,v(U,{modelValue:t.value.user_ship,"onUpdate:modelValue":a[1]||(a[1]=i=>t.value.user_ship=i),onChange:a[2]||(a[2]=i=>j(!0)),placeholder:"请选择用户类型",style:{flex:"1"}},{default:r(()=>[(o(!0),k(J,null,te(P.value,i=>(o(),z(G,{key:i.id,label:i.title,value:i.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e("div",Ze,[v(Y,{modelValue:t.value.mobile,"onUpdate:modelValue":a[4]||(a[4]=i=>t.value.mobile=i),placeholder:"搜索手机号/ID",onKeydown:a[5]||(a[5]=ge(i=>j(!0),["enter"])),onClear:a[6]||(a[6]=i=>j(!0)),clearable:""},{append:r(()=>[v(T,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[3]||(a[3]=i=>j(!0))},{default:r(()=>[y("搜索")]),_:1})]),_:1},8,["modelValue"])]),_e((o(),k("div",et,[(o(!0),k(J,null,te(C.value,(i,h)=>{var d;return o(),k("div",{class:W(["item",{"item-active":f.value==h}]),key:h,onClick:Z=>X(i,h)},[v(N,{class:"avatar",src:i.avatar},null,8,["src"]),e("div",at,[e("div",lt,[e("div",st,[e("span",ot,b(i.nickname),1),e("span",null,b(" (ID:"+i.id+")"),1)]),e("div",null,"手机号: "+b(i.mobile),1)]),e("div",it,[e("div",null,[y("余额: "),e("span",nt,b(i.now_money),1)]),e("div",null,[y("采购款: "),e("span",dt,b(i.purchase_funds),1)]),e("div",null,[y("返还金: "),e("span",ut,b((d=i.return_money)==null?void 0:d.toFixed(2)),1)]),e("div",null,[y("礼品券: "),e("span",rt,b(i.integral),1)]),e("div",null,[i.user_ship!=1?(o(),z(F,{key:0,type:"primary"},{default:r(()=>[y(b(i.user_ship_name),1)]),_:2},1024)):(o(),z(F,{key:1,type:"success"},{default:r(()=>[y(b(i.user_ship_name),1)]),_:2},1024))])])])],10,tt)}),128)),w.value?(o(),k("div",ct,"没有更多了")):M("",!0),_.value?(o(),k("div",vt,"加载中...")):M("",!0)])),[[u,_.value],[n,j]]),v(L,{modelValue:I.value,"onUpdate:modelValue":a[8]||(a[8]=i=>I.value=i),title:"添加用户",width:"600"},{footer:r(()=>[e("div",_t,[v(T,{onClick:a[7]||(a[7]=i=>I.value=!1)},{default:r(()=>[y("取消")]),_:1}),v(T,{type:"primary",onClick:O},{default:r(()=>[y(" 添加 ")]),_:1})])]),default:r(()=>[v(We,{ref_key:"addRef",ref:R,onClose:B},null,512)]),_:1},8,["modelValue"])])}}},ft=re(pt,[["__scopeId","data-v-e2b0bc71"]]),ae=s=>(pe("data-v-88b7f8af"),s=s(),fe(),s),mt=ae(()=>e("h4",null,"选择支付方式",-1)),yt={class:"dra-body"},ht={class:"header"},gt={style:{display:"inline-block"}},bt=ae(()=>e("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),kt={style:{color:"#f5222d","padding-bottom":"2rem"}},$t={style:{"font-size":"1.6rem"}},wt={key:0,"element-loading-text":"支付中",class:"card1"},Vt=ae(()=>e("div",{class:"tips"},null,-1)),Ct={key:1,class:"card2"},St={class:"drawer-body"},xt={class:"counter"},Ut={class:"received"},Lt={key:0},At={key:1,style:{"font-size":"1rem",color:"#999"}},Dt={key:0,class:"balance"},It={class:"money"},Rt=ae(()=>e("div",{class:"tips"},"按回车(Enter)确认支付",-1)),zt={key:1,class:"balance"},Pt=ae(()=>e("div",null,"不够找零, 请支付更多金额",-1)),jt=ae(()=>e("div",{class:"tips"},"按下小键盘输入金额",-1)),Et=[Pt,jt],Ft={class:"keypad"},Nt={class:"left"},Ot={class:"right"},Tt={style:{width:"100%",display:"flex","justify-content":"center"}},Bt={__name:"payUser",emits:["paySuccess"],setup(s,{expose:t,emit:_}){const S=c(!1),f=c(1),w=c(""),C=c("");de();const j=()=>{N()},X=()=>{ne(()=>{setTimeout(()=>{var l;F.value=!1,w.value="",a.value=!0,(l=C.value)==null||l.focus(),I(f.value)},300)})},I=l=>{if(f.value=l,f.value==2)return f.value=1,A.error("暂不支持现金收款");window.removeEventListener("keydown",le),ne(()=>{var p;w.value="",(p=C.value)==null||p.focus()})},R=c({price:0,uid:""}),O=c([]),B=c(!1),P=l=>{R.value=l.data,O.value=l.cart_id,B.value=l.isRePay||!1},g=l=>{R.value.total=l.price,G.value=l.order_id},V=_,a=c(!1),m=c(["1","2","3","4","5","6","7","8","9","0","00","."]),K=/^(10|11|12|13|14|15)\d{16}$/,T=/^(25|26|27|28|29|30)\d{14,22}$/,G=c(""),U=()=>{if(F.value=!0,C.value.blur(),B.value)Y();else{let l;if(K.test(w.value))l="9";else if(T.test(w.value))l="13";else return F.value=!1,w.value="",C.value.focus(),A.error("请输入正确的支付码");he({uid:R.value.uid,price:R.value.price,pay_type:l,auth_code:w.value}).then(p=>{p.data.out_trade_no&&p.msg=="支付成功"?(S.value=!1,A({message:"支付成功",type:"success"}),N(p.data)):p.msg=="用户支付中"&&p.code==1&&(A.warning(p.msg),E.on("pay_success",x=>{A({message:"支付成功",type:"success"}),setTimeout(()=>{E.off("pay_success")},200),S.value=!1,N(x)}))}).catch(p=>{F.value=!1,ne(()=>{var x;(x=C.value)==null||x.focus()})})}},Y=()=>{let l=17;if(f.value==1)if(K.test(w.value))l="9";else if(T.test(w.value))l="13";else return F.value=!1,w.value="",C.value.focus(),A.error("请输入正确的支付码");Je({order_id:R.value.order_id,pay_type:l,auth_code:w.value}).then(p=>{var x;(x=p.msg)!=null&&x.includes("成功")?(S.value=!1,A({message:"支付成功",type:"success"}),N()):p.msg=="用户支付中"&&p.code==1&&(A.warning(p.msg),E.on("pay_success",H=>{A({message:"支付成功",type:"success"}),setTimeout(()=>{E.off("pay_success")},200),S.value=!1,N(H)}))}).catch(p=>{w.value="",F.value=!1,ne(()=>{var x;(x=C.value)==null||x.focus()})})};c(0);const N=l=>{var p;window.removeEventListener("keydown",le),a.value=!1,F.value=!1,w.value="",u.value="",L.value=[],(p=C.value)==null||p.blur(),V("paySuccess",l),S.value=!1},F=c(!1);t({drawer:S,setForm:P,setRePay:g,beforeClose:N});const L=c([]),u=c(""),n=Re(()=>+u.value>0?(u.value-R.value.total).toFixed(2):-1),i=c(!1),h=l=>{l===-1?L.value=[]:L.value.pop(),u.value=L.value.length?L.value.join(""):0},d=l=>{i.value===!1&&(u.value="",i.value=!0);let p=String(u.value).indexOf(".")+1,x=String(u.value).length-p;console.log(p,x),(p===0||x<2)&&(L.value.join("")<=9999999&&L.value.push(l),u.value=L.value.join("")>99999999?99999999:L.value.join(""))},Z=()=>{if(n.value===""||n.value===null||n.value===void 0||+u.value<+R.value.total)return A.error("收款金额应该大于等于应收金额");B.value?Y():he({uid:R.value.uid,price:R.value.price,pay_type,pay_type:"17"}).then(l=>{S.value=!1,A({message:l.msg,type:"success"}),I(1),N()}).catch(l=>{F.value=!1})},le=l=>{let x=(l||window.event).keyCode;if(x==37)return I(2);if(x==120)return E.emit("F9");if(x==27)return N();switch(l.stopPropagation(),l.preventDefault(),x){case 96:case 48:d(0);break;case 97:case 49:d(1);break;case 98:case 50:d(2);break;case 99:case 51:d(3);break;case 100:case 52:d(4);break;case 101:case 53:d(5);break;case 102:case 54:d(6);break;case 103:case 55:d(7);break;case 104:case 56:d(8);break;case 105:case 57:d(9);break;case 110:d(".");break;case 190:d(".");break;case 8:h();break;case 13:Z();break}},ee=c(!1),oe=()=>{if(!(!S.value||ee.value&&w.value.length>0)&&f.value==2)return I(1)},se=()=>{if(!(!S.value||ee.value&&w.value.length>0)&&f.value==1)return I(2)};return ce(()=>{E.on("left",oe),E.on("right",se)}),ve(()=>{E.off("left",oe),E.off("right",se)}),(l,p)=>{const x=$("el-input"),H=$("el-button"),Se=$("Delete"),xe=$("el-icon"),Ue=$("el-drawer"),Le=ue("loading");return o(),z(Ue,{size:"60rem",modelValue:S.value,"onUpdate:modelValue":p[6]||(p[6]=ie=>S.value=ie),direction:"rtl",onOpen:X,"before-close":N},{header:r(()=>[mt]),default:r(()=>{var ie;return[e("div",yt,[e("div",ht,[e("div",{class:W(["left",{active:f.value==1}]),onClick:p[0]||(p[0]=q=>I(1))}," 微信/支付宝 ",2),e("div",{class:W(["right",{active:f.value==2}]),onClick:p[1]||(p[1]=q=>I(2))}," 现金收款 ",2)]),e("div",null,[e("div",gt,[bt,e("div",kt,[y(" ¥"),e("span",$t,b((ie=R.value)==null?void 0:ie.price),1)])])]),f.value==1?_e((o(),k("div",wt,[v(x,{ref_key:"codeRef",ref:C,modelValue:w.value,"onUpdate:modelValue":p[2]||(p[2]=q=>w.value=q),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ge(U,["enter"]),onFocus:p[3]||(p[3]=q=>ee.value=!0),onBlur:p[4]||(p[4]=q=>ee.value=!1)},null,8,["modelValue"]),Vt])),[[Le,F.value]]):(o(),k("div",Ct,[e("div",St,[e("div",xt,[e("div",Ut,[u.value?(o(),k("span",Lt,b(u.value),1)):(o(),k("span",At,"按下键盘输入客户支付金额"))]),n.value>=0?(o(),k("div",Dt,[e("div",null,[y(" 需找零(元):"),e("span",It,"¥"+b(n.value),1)]),Rt])):(o(),k("div",zt,Et)),e("div",Ft,[e("div",Nt,[(o(!0),k(J,null,te(m.value,q=>(o(),z(H,{key:q,onClick:Ha=>d(q)},{default:r(()=>[y(b(q),1)]),_:2},1032,["onClick"]))),128))]),e("div",Ot,[v(H,{onClick:h},{default:r(()=>[v(xe,null,{default:r(()=>[v(Se)]),_:1})]),_:1}),v(H,{onClick:p[5]||(p[5]=q=>h(-1))},{default:r(()=>[y("C")]),_:1}),v(H,{class:W(["enter",{"enter-disable":+u.value<+R.value.total}]),disabled:+u.value<+R.value.total,onClick:Z},{default:r(()=>[y(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]}),footer:r(()=>[e("div",Tt,[v(H,{class:"cancel-btn",onClick:j},{default:r(()=>[y("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},qt=re(Bt,[["__scopeId","data-v-88b7f8af"]]),D=s=>(pe("data-v-ff0075ff"),s=s(),fe(),s),Jt={class:"my-order"},Kt={key:0,class:"detail"},Mt={class:"table"},Wt=D(()=>e("div",{class:"table-title"},"用户信息",-1)),Gt={class:"table-info"},Ht={class:"info-item"},Qt=D(()=>e("div",{class:"info-item-title"},"用户余额:",-1)),Xt={class:"info-item-info red"},Yt={class:"info-item"},Zt=D(()=>e("div",{class:"info-item-title"},"采购款:",-1)),ea={class:"info-item-info red"},ta={class:"info-item"},aa=D(()=>e("div",{class:"info-item-title"},"返还金:",-1)),la={class:"info-item-info red"},sa={class:"info-item"},oa=D(()=>e("div",{class:"info-item-title"},"头像:",-1)),ia={class:"info-item-info"},na={class:"info-item"},da=D(()=>e("div",{class:"info-item-title"},"礼品券:",-1)),ua={class:"info-item-info red"},ra={class:"info-item"},ca=D(()=>e("div",{class:"info-item-title"},"ID:",-1)),va={class:"info-item-info"},_a={class:"info-item"},pa=D(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),fa={class:"info-item-info"},ma={class:"info-item"},ya=D(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),ha={class:"info-item-info"},ga={class:"info-item"},ba=D(()=>e("div",{class:"info-item-title"},"用户账号:",-1)),ka={class:"info-item-info"},$a={class:"info-item"},wa=D(()=>e("div",{class:"info-item-title"},"真实姓名:",-1)),Va={class:"info-item-info"},Ca={class:"info-item"},Sa=D(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),xa={class:"info-item-info"},Ua={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},La=D(()=>e("div",{class:"info-item-title"},"用户类型:",-1)),Aa={class:"info-item-info"},Da={key:0,class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Ia=D(()=>e("div",{class:"info-item-title"},"用户标签:",-1)),Ra={class:"info-item-info"},za={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Pa=D(()=>e("div",{class:"info-item-title"},"用户地址:",-1)),ja=D(()=>e("div",{class:"table-title"},[y("供销经营礼包"),e("span",{class:"tips"},"首次购买1000元以上成为行业会员")],-1)),Ea={class:"table-info"},Fa={class:"pay-btn"},Na=D(()=>e("div",null,"¥1000.00",-1)),Oa=[Na],Ta=D(()=>e("div",null,"¥2000.00",-1)),Ba=[Ta],qa=D(()=>e("div",null,"¥5000.00",-1)),Ja=[qa],Ka={key:1},Ma={__name:"detail",setup(s){de(),ze();const t=c({id:""}),_=c({price:"",type:1}),S=c(null),f=()=>{_.value.type==1?_.value.price="1000":_.value.type==2?_.value.price="2000":_.value.type==3&&(_.value.price="5000"),_.value.type==0&&(_.value.price=Number(_.value.price).toFixed(2)),console.log("支付",_.value),S.value.setForm({data:{uid:t.value.id,price:_.value.price}}),S.value.drawer=!0},w=()=>{console.log("支付成功"),E.emit("re-load-user-list")},C=c(!1),j=c([]);(()=>{me().then(u=>{j.value=u.data.lists})})();const I=()=>{Ne({id:t.value.id,user_ship:t.value.user_ship}).then(u=>{var n;A.success("修改成功"),t.value.user_ship_name=(n=j.value.find(i=>i.id==t.value.user_ship))==null?void 0:n.title,C.value=!1})},R=()=>{C.value=!1},O=c(!1),B=c([]);(()=>{Oe().then(u=>{B.value=u.data.lists})})();const g=()=>{Te({id:t.value.id,label_id:t.value.label_id}).then(u=>{var n;A.success("修改成功"),t.value.label_name=(n=B.value.find(i=>i.label_id==t.value.label_id))==null?void 0:n.label_name,O.value=!1})},V=()=>{O.value=!1},a=c({id:"",province:"",city:"",area:"",street:"",brigade:""}),m=c([]),K=c([]),T=()=>{Be({uid:t.value.id}).then(u=>{u.data.village&&(m.value=[u.data.city,u.data.area,u.data.street,u.data.village,+u.data.brigade],K.value=JSON.parse(JSON.stringify(m.value)),a.value=Object.assign(a.value,u.data))})},G=c([]),U=async(u,n)=>{const i=u.level;let h;if(i!==0&&!u.data.code)return n([]);i===0?(h=await be({province_code:51e4}),h=h.data.map(d=>({code:d.city_code,name:d.city_name}))):i===1?(h=await ke({city_code:u.data.code}),h=h.data.map(d=>({code:d.area_code,name:d.area_name}))):i===2?(h=await $e({area_code:u.data.code}),h=h.data.map(d=>({code:d.street_code,name:d.street_name}))):i===3?(h=await we({street_code:u.data.code}),h=h.data.map(d=>({code:d.village_code,name:d.village_name}))):i===4&&(h=await Ve({village_code:u.data.code}),h=h.data.map(d=>({code:d.id,name:d.brigade_name,leaf:!0}))),n(h)},Y={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:U},N=async()=>{a.value.city=m.value[0],a.value.area=m.value[1],a.value.street=m.value[2],a.value.village=m.value[3],a.value.brigade=m.value[4],a.value.phone||(a.value.phone=t.value.account),a.value.real_name||(a.value.real_name=t.value.real_name||t.value.nickname),qe({...a.value,uid:t.value.id}).then(u=>{A.success("编辑成功"),L.value=!0})},F=()=>{m.value=JSON.parse(JSON.stringify(K.value)),L.value=!0},L=c(!0);return ce(()=>{E.on("set-user-detail",u=>{t.value=u,Fe({id:u.id}).then(({data:n})=>{t.value=Object.assign(u,n),console.log(t.value)}),T()})}),ve(()=>{E.off("set-user-detail")}),(u,n)=>{var se;const i=$("el-avatar"),h=$("el-tag"),d=$("el-button"),Z=$("el-option"),le=$("el-select"),ee=$("el-cascader"),oe=$("el-empty");return o(),k("div",Jt,[t.value.id?(o(),k("div",Kt,[e("div",Mt,[Wt,e("div",Gt,[e("div",Ht,[Qt,e("div",Xt,"¥"+b(t.value.now_money),1)]),e("div",Yt,[Zt,e("div",ea,"¥"+b(t.value.purchase_funds),1)]),e("div",ta,[aa,e("div",la,"¥"+b((se=t.value.number)==null?void 0:se.toFixed(2)),1)]),e("div",sa,[oa,e("div",ia,[v(i,{style:{width:"4rem",height:"4rem"},src:t.value.avatar},null,8,["src"])])]),e("div",na,[da,e("div",ua,"¥"+b(t.value.integral),1)]),e("div",ra,[ca,e("div",va,b(t.value.id),1)]),e("div",_a,[pa,e("div",fa,b(t.value.nickname),1)]),e("div",ma,[ya,e("div",ha,b(t.value.mobile),1)]),e("div",ga,[ba,e("div",ka,b(t.value.account),1)]),e("div",$a,[wa,e("div",Va,b(t.value.real_name),1)]),e("div",Ca,[Sa,e("div",xa,b(t.value.create_time),1)]),e("div",Ua,[La,e("div",Aa,[C.value==!1?(o(),k(J,{key:0},[t.value.user_ship!=1?(o(),z(h,{key:0,type:"primary",size:"large"},{default:r(()=>[y(b(t.value.user_ship_name),1)]),_:1})):(o(),z(h,{key:1,type:"success",size:"large"},{default:r(()=>[y(b(t.value.user_ship_name),1)]),_:1})),t.value.user_ship!=1?(o(),z(d,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:n[0]||(n[0]=l=>C.value=!0)},{default:r(()=>[y("修改")]),_:1})):M("",!0)],64)):(o(),k(J,{key:1},[v(le,{modelValue:t.value.user_ship,"onUpdate:modelValue":n[1]||(n[1]=l=>t.value.user_ship=l),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:r(()=>[(o(!0),k(J,null,te(j.value,l=>(o(),z(Z,{key:l.id,label:l.title,value:l.id,disabled:l.id==1},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"]),v(d,{type:"primary",style:{"margin-left":"1rem"},onClick:I},{default:r(()=>[y("确认")]),_:1}),v(d,{style:{"margin-left":"1rem"},onClick:R},{default:r(()=>[y("取消")]),_:1})],64))])]),t.value.user_ship==1?(o(),k("div",Da,[Ia,e("div",Ra,[O.value==!1?(o(),k(J,{key:0},[t.value.label_name?(o(),z(h,{key:0,type:"primary",size:"large"},{default:r(()=>[y(b(t.value.label_name),1)]),_:1})):M("",!0),t.value.label_name?(o(),z(d,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:n[2]||(n[2]=l=>O.value=!0)},{default:r(()=>[y("修改")]),_:1})):(o(),z(d,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:n[3]||(n[3]=l=>{t.value.label_id="",O.value=!0})},{default:r(()=>[y("添加")]),_:1}))],64)):(o(),k(J,{key:1},[v(le,{modelValue:t.value.label_id,"onUpdate:modelValue":n[4]||(n[4]=l=>t.value.label_id=l),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:r(()=>[(o(!0),k(J,null,te(B.value,l=>(o(),z(Z,{key:l.label_id,label:l.label_name,value:l.label_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),v(d,{type:"primary",style:{"margin-left":"1rem"},onClick:g},{default:r(()=>[y("确认")]),_:1}),v(d,{style:{"margin-left":"1rem"},onClick:V},{default:r(()=>[y("取消")]),_:1})],64))])])):M("",!0),e("div",za,[Pa,(o(),z(ee,{key:t.value.id,style:{flex:"1"},modelValue:m.value,"onUpdate:modelValue":n[5]||(n[5]=l=>m.value=l),options:G.value,props:Y,load:U,class:"w-full",disabled:L.value},null,8,["modelValue","options","disabled"])),L.value?(o(),z(d,{key:0,type:"primary",style:{"margin-left":"1rem"},onClick:n[6]||(n[6]=l=>L.value=!1)},{default:r(()=>[y("修改")]),_:1})):M("",!0),L.value?M("",!0):(o(),z(d,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:N},{default:r(()=>[y("确认")]),_:1})),L.value?M("",!0):(o(),z(d,{key:2,style:{"margin-left":"1rem"},onClick:F},{default:r(()=>[y("取消")]),_:1}))])]),ja,e("div",Ea,[e("div",Fa,[e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==1}]),onClick:n[7]||(n[7]=l=>_.value.type=1)},Oa,2),e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==2}]),onClick:n[8]||(n[8]=l=>_.value.type=2)},Ba,2),e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==3}]),onClick:n[9]||(n[9]=l=>_.value.type=3)},Ja,2),e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==0}]),onClick:n[11]||(n[11]=l=>_.value.type=0)},[_e(e("input",{type:"number",class:"input","onUpdate:modelValue":n[10]||(n[10]=l=>_.value.price=l),placeholder:"自定义金额"},null,512),[[Pe,_.value.price]])],2)]),v(d,{type:"primary",size:"large",class:"pay",onClick:f},{default:r(()=>[y("立即支付")]),_:1})])])])):(o(),k("div",Ka,[v(oe)])),v(qt,{ref_key:"payRef",ref:S,onPaySuccess:w},null,512)])}}},Wa=re(Ma,[["__scopeId","data-v-ff0075ff"]]),Ga={class:"my-card"},tl={__name:"index",setup(s){return(t,_)=>(o(),k("div",Ga,[v(ft,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),v(Ke),v(Wa,{ref:"detailRef"},null,512)]))}};export{tl as default}; diff --git a/dist/assets/indexCount-B_u3I-N7.js b/dist/assets/indexCount-BMHe5nNi.js similarity index 86% rename from dist/assets/indexCount-B_u3I-N7.js rename to dist/assets/indexCount-BMHe5nNi.js index c3bc1a8..44a64a1 100644 --- a/dist/assets/indexCount-B_u3I-N7.js +++ b/dist/assets/indexCount-BMHe5nNi.js @@ -1 +1 @@ -import{f as i}from"./merchant--Irsjol6.js";import{_ as d,r as a,b as l,h as p,j as m,c as u,k as h,e as f,f as e,w as v}from"./index-C4rRmnc5.js";const b={"element-loading-text":"加载中",class:"my-order"},g={class:"table"},x={__name:"indexCount",setup(w){const o=a([]),n=a({page_no:1,page_size:15}),r=a(!1);return(()=>{i(n.value).then(s=>{o.value=s.data.lists})})(),(s,k)=>{const t=l("el-table-column"),c=l("el-table"),_=p("loading");return m((u(),h("div",b,[f("div",g,[e(c,{data:o.value,style:{width:"100%"}},{default:v(()=>[e(t,{prop:"record_date",label:"时间",width:"260"}),e(t,{prop:"cashier_cash_total_amount",label:"现金收银金额(元)"}),e(t,{prop:"cashier_total_amount",label:"线上收银金额(元)"}),e(t,{prop:"platofrm_total_amount",label:"平台订单金额(元)"}),e(t,{prop:"total_amount",label:"总金额(元)"})]),_:1},8,["data"])])])),[[_,r.value]])}}},y=d(x,[["__scopeId","data-v-d25755c6"]]);export{y as default}; +import{f as i}from"./merchant-C7inwBZD.js";import{_ as d,r as a,b as l,h as p,j as m,c as u,k as h,e as f,f as e,w as v}from"./index-DcwaEiyg.js";const b={"element-loading-text":"加载中",class:"my-order"},g={class:"table"},x={__name:"indexCount",setup(w){const o=a([]),n=a({page_no:1,page_size:15}),r=a(!1);return(()=>{i(n.value).then(s=>{o.value=s.data.lists})})(),(s,k)=>{const t=l("el-table-column"),c=l("el-table"),_=p("loading");return m((u(),h("div",b,[f("div",g,[e(c,{data:o.value,style:{width:"100%"}},{default:v(()=>[e(t,{prop:"record_date",label:"时间",width:"260"}),e(t,{prop:"cashier_cash_total_amount",label:"现金收银金额(元)"}),e(t,{prop:"cashier_total_amount",label:"线上收银金额(元)"}),e(t,{prop:"platofrm_total_amount",label:"平台订单金额(元)"}),e(t,{prop:"total_amount",label:"总金额(元)"})]),_:1},8,["data"])])])),[[_,r.value]])}}},y=d(x,[["__scopeId","data-v-d25755c6"]]);export{y as default}; diff --git a/dist/assets/merchant--Irsjol6.js b/dist/assets/merchant-C7inwBZD.js similarity index 87% rename from dist/assets/merchant--Irsjol6.js rename to dist/assets/merchant-C7inwBZD.js index 21436f6..438749c 100644 --- a/dist/assets/merchant--Irsjol6.js +++ b/dist/assets/merchant-C7inwBZD.js @@ -1 +1 @@ -import{G as a}from"./index-C4rRmnc5.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{G as a}from"./index-DcwaEiyg.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/dist/assets/padding-BA_o-z8h.js b/dist/assets/padding-CG_WCVSK.js similarity index 65% rename from dist/assets/padding-BA_o-z8h.js rename to dist/assets/padding-CG_WCVSK.js index 45501e3..56e2882 100644 --- a/dist/assets/padding-BA_o-z8h.js +++ b/dist/assets/padding-CG_WCVSK.js @@ -1 +1 @@ -import{_ as e,c as t,k as c}from"./index-C4rRmnc5.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,k as c}from"./index-DcwaEiyg.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/dist/assets/pay-D6lAYrB4.js b/dist/assets/pay-CEy1hIkd.js similarity index 98% rename from dist/assets/pay-D6lAYrB4.js rename to dist/assets/pay-CEy1hIkd.js index f17ca26..45a38f6 100644 --- a/dist/assets/pay-D6lAYrB4.js +++ b/dist/assets/pay-CEy1hIkd.js @@ -1 +1 @@ -import{_ as _e,r as l,u as pe,D as fe,o as ye,m,a as me,b as B,h as he,c as p,d as Q,w as f,e as a,z as j,k as V,g as h,t as P,p as ge,j as ke,f as g,i as X,F as be,l as we,n as A,E as c,q as Ce,s as xe}from"./index-C4rRmnc5.js";import{f as U,g as Ve,h as Pe,i as Se}from"./store-BxeA20BY.js";/* empty css */const S=D=>(Ce("data-v-5258f337"),D=D(),xe(),D),$e=S(()=>a("h4",null,"选择支付方式",-1)),Ee={class:"dra-body"},Fe={class:"header"},ze={key:0,style:{display:"inline-block","margin-right":"20px"}},Be={style:{display:"inline-block","margin-right":"20px"}},De=S(()=>a("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"原价:",-1)),je={style:{color:"#f5222d","padding-bottom":"2rem"}},Ae={style:{"font-size":"1.6rem"}},Le={style:{display:"inline-block"}},Re={style:{color:"#999",padding:"2rem 0 0.3rem 0"}},Te={style:{color:"#f5222d","padding-bottom":"2rem"}},Ne={style:{"font-size":"1.6rem"}},Ue={style:{display:"inline-block"}},Ie=S(()=>a("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Oe={style:{color:"#f5222d","padding-bottom":"2rem"}},Ke={style:{"font-size":"1.6rem"}},Me={key:0,"element-loading-text":"支付中",class:"card1"},qe=S(()=>a("div",{class:"tips"},null,-1)),We={key:1,class:"card2"},Ge={class:"drawer-body"},He={class:"counter"},Je={class:"received"},Qe={key:0},Xe={key:1,style:{"font-size":"1rem",color:"#999"}},Ye={key:0,class:"balance"},Ze={class:"money"},es=S(()=>a("div",{class:"tips"},"按回车(Enter)确认支付",-1)),ss={key:1,class:"balance"},as=S(()=>a("div",null,"不够找零, 请支付更多金额",-1)),ts=S(()=>a("div",{class:"tips"},"按下小键盘输入金额",-1)),ls=[as,ts],os={class:"keypad"},ns={class:"left"},is={class:"right"},cs={key:2,class:"card3"},us={class:"codes"},ds={style:{width:"100%",display:"flex","justify-content":"center"}},rs={__name:"pay",emits:["paySuccess"],setup(D,{expose:Y,emit:Z}){const v=l(!1),u=l(1),n=l(""),k=l("");pe();const $=s=>{Se({id:s}).then(e=>{m.emit("letPrintReceipt",e.data)})},ee=()=>{y()},se=()=>{A(()=>{setTimeout(()=>{var s;w.value=!1,n.value="",I.value=!0,(s=k.value)==null||s.focus(),_(u.value)},300)})},_=s=>{u.value=s,u.value==2?window.addEventListener("keydown",T):(window.removeEventListener("keydown",T),A(()=>{var e;n.value="",(e=k.value)==null||e.focus()}))},i=l({}),F=l([]),b=l(""),L=l(!1),ae=s=>{i.value=s.data,F.value=s.cart_id,b.value=s.uid,console.log("选择了用户==",b.value||"游客"),L.value=s.isRePay||!1},te=s=>{i.value.pay_price=s.price,ne.value=s.order_id},le=Z,I=l(!1),oe=l(["1","2","3","4","5","6","7","8","9","0","00","."]),O=/^(10|11|12|13|14|15)\d{16}$/,K=/^(25|26|27|28|29|30)\d{14,22}$/,ne=l(""),ie=()=>{if(w.value=!0,k.value.blur(),L.value)M();else{let s;if(O.test(n.value))s="9";else if(K.test(n.value))s="13";else return w.value=!1,n.value="",k.value.focus(),console.log("=====",22),c.error("请输入正确的支付码");U({key:i.value.key,cart_id:F.value,pay_type:s,auth_code:n.value,uid:b.value}).then(e=>{e.data.out_trade_no&&e.msg=="支付成功"?(v.value=!1,c({message:"支付成功",type:"success"}),y(e.data),$(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",t=>{c({message:"支付成功",type:"success"}),$(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y(t)}))}).catch(e=>{w.value=!1,A(()=>{var t;(t=k.value)==null||t.focus()})})}},M=()=>{let s=17;if(u.value==1)if(O.test(n.value))s="9";else if(K.test(n.value))s="13";else return w.value=!1,n.value="",k.value.focus(),c.error("请输入正确的支付码");Ve({order_id:i.value.order_id,pay_type:s,auth_code:n.value,uid:b.value}).then(e=>{var t;(t=e.msg)!=null&&t.includes("成功")?(v.value=!1,c({message:"支付成功",type:"success"}),$(e.data.id),y()):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",x=>{c({message:"支付成功",type:"success"}),$(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y(x)}))}).catch(e=>{n.value="",w.value=!1,A(()=>{var t;(t=k.value)==null||t.focus()})})};l(0);const y=s=>{var e;window.removeEventListener("keydown",T),I.value=!1,w.value=!1,n.value="",d.value="",C.value=[],(e=k.value)==null||e.blur(),le("paySuccess",s),v.value=!1},w=l(!1);Y({drawer:v,setForm:ae,setRePay:te,beforeClose:y});const C=l([]),d=l(""),z=fe(()=>+d.value>0?(+d.value-i.value.pay_price).toFixed(2):-1),q=l(!1),R=s=>{s===-1?C.value=[]:C.value.pop(),d.value=C.value.length?C.value.join(""):0},r=s=>{q.value===!1&&(d.value="",q.value=!0);let e=String(d.value).indexOf(".")+1,t=String(d.value).length-e;console.log(e,t),(e===0||t<2)&&(C.value.join("")<=9999999&&C.value.push(s),d.value=C.value.join("")>99999999?99999999:C.value.join(""))},W=()=>{if(z.value===""||z.value===null||z.value===void 0||+d.value<+i.value.pay_price)return c.error("收款金额应该大于等于应收金额");L.value?M():U({cart_id:F.value,pay_type:"17",uid:b.value}).then(s=>{v.value=!1,c({message:s.msg,type:"success"}),$(s.data.id),_(1),y()}).catch(s=>{w.value=!1})},T=s=>{let t=(s||window.event).keyCode;if(t==37)return _(2);if(t==120)return m.emit("F9");if(t==27)return y();switch(s.stopPropagation(),s.preventDefault(),t){case 96:case 48:r(0);break;case 97:case 49:r(1);break;case 98:case 50:r(2);break;case 99:case 51:r(3);break;case 100:case 52:r(4);break;case 101:case 53:r(5);break;case 102:case 54:r(6);break;case 103:case 55:r(7);break;case 104:case 56:r(8);break;case 105:case 57:r(9);break;case 110:r(".");break;case 190:r(".");break;case 8:R();break;case 13:W();break}},ce=()=>{if(!b.value)return c.error("请先选择用户");Pe({cart_id:F.value,uid:b.value}).then(s=>{c({message:"发送成功",type:"success"})})},N=l(""),G=()=>{if(!b.value)return c.error("请先选择用户");U({pay_type:18,sms_code:N.value,cart_id:F.value,uid:b.value}).then(s=>{v.value=!1,c({message:s.msg,type:"success"}),$(s.data.id),_(1),y()})},E=l(!1),H=()=>{if(!(!v.value||E.value&&n.value.length>0)){if(u.value==2)return _(1);if(u.value==3)return _(2)}},J=()=>{if(!(!v.value||E.value&&n.value.length>0)){if(u.value==1)return _(2);if(u.value==2)return _(3)}};return ye(()=>{m.on("left",H),m.on("right",J)}),me(()=>{m.off("left",H),m.off("right",J)}),(s,e)=>{const t=B("el-input"),x=B("el-button"),ue=B("Delete"),de=B("el-icon"),re=B("el-drawer"),ve=he("loading");return p(),Q(re,{size:"60rem",modelValue:v.value,"onUpdate:modelValue":e[10]||(e[10]=o=>v.value=o),direction:"rtl",onOpen:se,"before-close":y},{header:f(()=>[$e]),default:f(()=>[a("div",Ee,[a("div",Fe,[a("div",{class:j(["left",{active:u.value==1}]),onClick:e[0]||(e[0]=o=>_(1))}," 微信/支付宝 ",2),a("div",{class:j(["center",{active:u.value==2}]),onClick:e[1]||(e[1]=o=>_(2))}," 现金收款 ",2),a("div",{class:j(["right",{active:u.value==3}]),onClick:e[2]||(e[2]=o=>_(3))}," 采购款 ",2)]),a("div",null,[i.value.activities==1?(p(),V("div",ze,[a("div",Be,[De,a("div",je,[h(" ¥"),a("span",Ae,P(i.value.original_price),1)])]),a("div",Le,[a("div",Re,P(i.value.activity?"活动折扣:":"消费返利"),1),a("div",Te,[h(P(i.value.activity)+"¥",1),a("span",Ne,P(i.value.activity_price),1)])])])):ge("",!0),a("div",Ue,[Ie,a("div",Oe,[h(" ¥"),a("span",Ke,P(i.value.pay_price),1)])])]),u.value==1?ke((p(),V("div",Me,[g(t,{ref_key:"codeRef",ref:k,modelValue:n.value,"onUpdate:modelValue":e[3]||(e[3]=o=>n.value=o),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:X(ie,["enter"]),onFocus:e[4]||(e[4]=o=>E.value=!0),onBlur:e[5]||(e[5]=o=>E.value=!1)},null,8,["modelValue"]),qe])),[[ve,w.value]]):u.value==2?(p(),V("div",We,[a("div",Ge,[a("div",He,[a("div",Je,[d.value?(p(),V("span",Qe,P(d.value),1)):(p(),V("span",Xe,"按下键盘输入客户支付金额"))]),z.value>=0?(p(),V("div",Ye,[a("div",null,[h(" 需找零(元):"),a("span",Ze,"¥"+P(z.value),1)]),es])):(p(),V("div",ss,ls)),a("div",os,[a("div",ns,[(p(!0),V(be,null,we(oe.value,o=>(p(),Q(x,{key:o,onClick:vs=>r(o)},{default:f(()=>[h(P(o),1)]),_:2},1032,["onClick"]))),128))]),a("div",is,[g(x,{onClick:R},{default:f(()=>[g(de,null,{default:f(()=>[g(ue)]),_:1})]),_:1}),g(x,{onClick:e[6]||(e[6]=o=>R(-1))},{default:f(()=>[h("C")]),_:1}),g(x,{class:j(["enter",{"enter-disable":+d.value<+i.value.pay_price}]),disabled:+d.value<+i.value.pay_price,onClick:W},{default:f(()=>[h(" 确认 ")]),_:1},8,["class","disabled"])])])])])])):(p(),V("div",cs,[a("div",us,[g(t,{modelValue:N.value,"onUpdate:modelValue":e[7]||(e[7]=o=>N.value=o),autofocus:"",class:"code-input",placeholder:"请输入验证码",onKeyup:X(G,["enter"]),onFocus:e[8]||(e[8]=o=>E.value=!0),onBlur:e[9]||(e[9]=o=>E.value=!1)},null,8,["modelValue"]),g(x,{type:"primary",onClick:ce,class:"get-code-btn"},{default:f(()=>[h("获取验证码")]),_:1})]),g(x,{type:"primary",onClick:G,class:"code-pay"},{default:f(()=>[h("确认支付")]),_:1})]))])]),footer:f(()=>[a("div",ds,[g(x,{class:"cancel-btn",onClick:ee},{default:f(()=>[h("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ys=_e(rs,[["__scopeId","data-v-5258f337"]]);export{ys as p}; +import{_ as _e,r as l,u as pe,D as fe,o as ye,m,a as me,b as B,h as he,c as p,d as Q,w as f,e as a,z as j,k as V,g as h,t as P,p as ge,j as ke,f as g,i as X,F as be,l as we,n as A,E as c,q as Ce,s as xe}from"./index-DcwaEiyg.js";import{f as U,g as Ve,h as Pe,i as Se}from"./store-85zRAkSB.js";/* empty css */const S=D=>(Ce("data-v-5258f337"),D=D(),xe(),D),$e=S(()=>a("h4",null,"选择支付方式",-1)),Ee={class:"dra-body"},Fe={class:"header"},ze={key:0,style:{display:"inline-block","margin-right":"20px"}},Be={style:{display:"inline-block","margin-right":"20px"}},De=S(()=>a("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"原价:",-1)),je={style:{color:"#f5222d","padding-bottom":"2rem"}},Ae={style:{"font-size":"1.6rem"}},Le={style:{display:"inline-block"}},Re={style:{color:"#999",padding:"2rem 0 0.3rem 0"}},Te={style:{color:"#f5222d","padding-bottom":"2rem"}},Ne={style:{"font-size":"1.6rem"}},Ue={style:{display:"inline-block"}},Ie=S(()=>a("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Oe={style:{color:"#f5222d","padding-bottom":"2rem"}},Ke={style:{"font-size":"1.6rem"}},Me={key:0,"element-loading-text":"支付中",class:"card1"},qe=S(()=>a("div",{class:"tips"},null,-1)),We={key:1,class:"card2"},Ge={class:"drawer-body"},He={class:"counter"},Je={class:"received"},Qe={key:0},Xe={key:1,style:{"font-size":"1rem",color:"#999"}},Ye={key:0,class:"balance"},Ze={class:"money"},es=S(()=>a("div",{class:"tips"},"按回车(Enter)确认支付",-1)),ss={key:1,class:"balance"},as=S(()=>a("div",null,"不够找零, 请支付更多金额",-1)),ts=S(()=>a("div",{class:"tips"},"按下小键盘输入金额",-1)),ls=[as,ts],os={class:"keypad"},ns={class:"left"},is={class:"right"},cs={key:2,class:"card3"},us={class:"codes"},ds={style:{width:"100%",display:"flex","justify-content":"center"}},rs={__name:"pay",emits:["paySuccess"],setup(D,{expose:Y,emit:Z}){const v=l(!1),u=l(1),n=l(""),k=l("");pe();const $=s=>{Se({id:s}).then(e=>{m.emit("letPrintReceipt",e.data)})},ee=()=>{y()},se=()=>{A(()=>{setTimeout(()=>{var s;w.value=!1,n.value="",I.value=!0,(s=k.value)==null||s.focus(),_(u.value)},300)})},_=s=>{u.value=s,u.value==2?window.addEventListener("keydown",T):(window.removeEventListener("keydown",T),A(()=>{var e;n.value="",(e=k.value)==null||e.focus()}))},i=l({}),F=l([]),b=l(""),L=l(!1),ae=s=>{i.value=s.data,F.value=s.cart_id,b.value=s.uid,console.log("选择了用户==",b.value||"游客"),L.value=s.isRePay||!1},te=s=>{i.value.pay_price=s.price,ne.value=s.order_id},le=Z,I=l(!1),oe=l(["1","2","3","4","5","6","7","8","9","0","00","."]),O=/^(10|11|12|13|14|15)\d{16}$/,K=/^(25|26|27|28|29|30)\d{14,22}$/,ne=l(""),ie=()=>{if(w.value=!0,k.value.blur(),L.value)M();else{let s;if(O.test(n.value))s="9";else if(K.test(n.value))s="13";else return w.value=!1,n.value="",k.value.focus(),console.log("=====",22),c.error("请输入正确的支付码");U({key:i.value.key,cart_id:F.value,pay_type:s,auth_code:n.value,uid:b.value}).then(e=>{e.data.out_trade_no&&e.msg=="支付成功"?(v.value=!1,c({message:"支付成功",type:"success"}),y(e.data),$(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",t=>{c({message:"支付成功",type:"success"}),$(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y(t)}))}).catch(e=>{w.value=!1,A(()=>{var t;(t=k.value)==null||t.focus()})})}},M=()=>{let s=17;if(u.value==1)if(O.test(n.value))s="9";else if(K.test(n.value))s="13";else return w.value=!1,n.value="",k.value.focus(),c.error("请输入正确的支付码");Ve({order_id:i.value.order_id,pay_type:s,auth_code:n.value,uid:b.value}).then(e=>{var t;(t=e.msg)!=null&&t.includes("成功")?(v.value=!1,c({message:"支付成功",type:"success"}),$(e.data.id),y()):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",x=>{c({message:"支付成功",type:"success"}),$(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y(x)}))}).catch(e=>{n.value="",w.value=!1,A(()=>{var t;(t=k.value)==null||t.focus()})})};l(0);const y=s=>{var e;window.removeEventListener("keydown",T),I.value=!1,w.value=!1,n.value="",d.value="",C.value=[],(e=k.value)==null||e.blur(),le("paySuccess",s),v.value=!1},w=l(!1);Y({drawer:v,setForm:ae,setRePay:te,beforeClose:y});const C=l([]),d=l(""),z=fe(()=>+d.value>0?(+d.value-i.value.pay_price).toFixed(2):-1),q=l(!1),R=s=>{s===-1?C.value=[]:C.value.pop(),d.value=C.value.length?C.value.join(""):0},r=s=>{q.value===!1&&(d.value="",q.value=!0);let e=String(d.value).indexOf(".")+1,t=String(d.value).length-e;console.log(e,t),(e===0||t<2)&&(C.value.join("")<=9999999&&C.value.push(s),d.value=C.value.join("")>99999999?99999999:C.value.join(""))},W=()=>{if(z.value===""||z.value===null||z.value===void 0||+d.value<+i.value.pay_price)return c.error("收款金额应该大于等于应收金额");L.value?M():U({cart_id:F.value,pay_type:"17",uid:b.value}).then(s=>{v.value=!1,c({message:s.msg,type:"success"}),$(s.data.id),_(1),y()}).catch(s=>{w.value=!1})},T=s=>{let t=(s||window.event).keyCode;if(t==37)return _(2);if(t==120)return m.emit("F9");if(t==27)return y();switch(s.stopPropagation(),s.preventDefault(),t){case 96:case 48:r(0);break;case 97:case 49:r(1);break;case 98:case 50:r(2);break;case 99:case 51:r(3);break;case 100:case 52:r(4);break;case 101:case 53:r(5);break;case 102:case 54:r(6);break;case 103:case 55:r(7);break;case 104:case 56:r(8);break;case 105:case 57:r(9);break;case 110:r(".");break;case 190:r(".");break;case 8:R();break;case 13:W();break}},ce=()=>{if(!b.value)return c.error("请先选择用户");Pe({cart_id:F.value,uid:b.value}).then(s=>{c({message:"发送成功",type:"success"})})},N=l(""),G=()=>{if(!b.value)return c.error("请先选择用户");U({pay_type:18,sms_code:N.value,cart_id:F.value,uid:b.value}).then(s=>{v.value=!1,c({message:s.msg,type:"success"}),$(s.data.id),_(1),y()})},E=l(!1),H=()=>{if(!(!v.value||E.value&&n.value.length>0)){if(u.value==2)return _(1);if(u.value==3)return _(2)}},J=()=>{if(!(!v.value||E.value&&n.value.length>0)){if(u.value==1)return _(2);if(u.value==2)return _(3)}};return ye(()=>{m.on("left",H),m.on("right",J)}),me(()=>{m.off("left",H),m.off("right",J)}),(s,e)=>{const t=B("el-input"),x=B("el-button"),ue=B("Delete"),de=B("el-icon"),re=B("el-drawer"),ve=he("loading");return p(),Q(re,{size:"60rem",modelValue:v.value,"onUpdate:modelValue":e[10]||(e[10]=o=>v.value=o),direction:"rtl",onOpen:se,"before-close":y},{header:f(()=>[$e]),default:f(()=>[a("div",Ee,[a("div",Fe,[a("div",{class:j(["left",{active:u.value==1}]),onClick:e[0]||(e[0]=o=>_(1))}," 微信/支付宝 ",2),a("div",{class:j(["center",{active:u.value==2}]),onClick:e[1]||(e[1]=o=>_(2))}," 现金收款 ",2),a("div",{class:j(["right",{active:u.value==3}]),onClick:e[2]||(e[2]=o=>_(3))}," 采购款 ",2)]),a("div",null,[i.value.activities==1?(p(),V("div",ze,[a("div",Be,[De,a("div",je,[h(" ¥"),a("span",Ae,P(i.value.original_price),1)])]),a("div",Le,[a("div",Re,P(i.value.activity?"活动折扣:":"消费返利"),1),a("div",Te,[h(P(i.value.activity)+"¥",1),a("span",Ne,P(i.value.activity_price),1)])])])):ge("",!0),a("div",Ue,[Ie,a("div",Oe,[h(" ¥"),a("span",Ke,P(i.value.pay_price),1)])])]),u.value==1?ke((p(),V("div",Me,[g(t,{ref_key:"codeRef",ref:k,modelValue:n.value,"onUpdate:modelValue":e[3]||(e[3]=o=>n.value=o),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:X(ie,["enter"]),onFocus:e[4]||(e[4]=o=>E.value=!0),onBlur:e[5]||(e[5]=o=>E.value=!1)},null,8,["modelValue"]),qe])),[[ve,w.value]]):u.value==2?(p(),V("div",We,[a("div",Ge,[a("div",He,[a("div",Je,[d.value?(p(),V("span",Qe,P(d.value),1)):(p(),V("span",Xe,"按下键盘输入客户支付金额"))]),z.value>=0?(p(),V("div",Ye,[a("div",null,[h(" 需找零(元):"),a("span",Ze,"¥"+P(z.value),1)]),es])):(p(),V("div",ss,ls)),a("div",os,[a("div",ns,[(p(!0),V(be,null,we(oe.value,o=>(p(),Q(x,{key:o,onClick:vs=>r(o)},{default:f(()=>[h(P(o),1)]),_:2},1032,["onClick"]))),128))]),a("div",is,[g(x,{onClick:R},{default:f(()=>[g(de,null,{default:f(()=>[g(ue)]),_:1})]),_:1}),g(x,{onClick:e[6]||(e[6]=o=>R(-1))},{default:f(()=>[h("C")]),_:1}),g(x,{class:j(["enter",{"enter-disable":+d.value<+i.value.pay_price}]),disabled:+d.value<+i.value.pay_price,onClick:W},{default:f(()=>[h(" 确认 ")]),_:1},8,["class","disabled"])])])])])])):(p(),V("div",cs,[a("div",us,[g(t,{modelValue:N.value,"onUpdate:modelValue":e[7]||(e[7]=o=>N.value=o),autofocus:"",class:"code-input",placeholder:"请输入验证码",onKeyup:X(G,["enter"]),onFocus:e[8]||(e[8]=o=>E.value=!0),onBlur:e[9]||(e[9]=o=>E.value=!1)},null,8,["modelValue"]),g(x,{type:"primary",onClick:ce,class:"get-code-btn"},{default:f(()=>[h("获取验证码")]),_:1})]),g(x,{type:"primary",onClick:G,class:"code-pay"},{default:f(()=>[h("确认支付")]),_:1})]))])]),footer:f(()=>[a("div",ds,[g(x,{class:"cancel-btn",onClick:ee},{default:f(()=>[h("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ys=_e(rs,[["__scopeId","data-v-5258f337"]]);export{ys as p}; diff --git a/dist/assets/shop-Bs3DGR4g.js b/dist/assets/shop-CBW6q5xA.js similarity index 82% rename from dist/assets/shop-Bs3DGR4g.js rename to dist/assets/shop-CBW6q5xA.js index 4fdef8b..2ba0364 100644 --- a/dist/assets/shop-Bs3DGR4g.js +++ b/dist/assets/shop-CBW6q5xA.js @@ -1 +1 @@ -import{G as s}from"./index-C4rRmnc5.js";function r(t){return s.get("/store_product/storeProduct/lists",{params:t})}function o(t){return s.get("/cate/cate/lists",{params:t})}function a(t){return s.get("/system_store_storage/systemstorestorage/lists",{params:t})}function i(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}export{a,i as b,o as m,r as s}; +import{G as s}from"./index-DcwaEiyg.js";function r(t){return s.get("/store_product/storeProduct/lists",{params:t})}function o(t){return s.get("/cate/cate/lists",{params:t})}function a(t){return s.get("/system_store_storage/systemstorestorage/lists",{params:t})}function i(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}export{a,i as b,o as m,r as s}; diff --git a/dist/assets/store-BxeA20BY.js b/dist/assets/store-85zRAkSB.js similarity index 93% rename from dist/assets/store-BxeA20BY.js rename to dist/assets/store-85zRAkSB.js index ab50e3c..033f7c1 100644 --- a/dist/assets/store-BxeA20BY.js +++ b/dist/assets/store-85zRAkSB.js @@ -1 +1 @@ -import{G as e}from"./index-C4rRmnc5.js";function o(r){return e.post("/cart/cart/create",r)}function s(r){return e.get("/cart/cart/list",{params:r})}function i(r){return e.post("/store_order/StoreOrder/checkOrder",r)}function a(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 p(r){return e.get("/order/cashierinfo/lists",{params:r})}function f(r){return e.get("/store_order/storeOrder/detail",{params:r})}function u(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function O(r){return e.post("/store_order/StoreOrder/writeoff_order",r)}function A(r){return e.post("/store_order/StoreOrder/checkSms",r)}function _(r){return e.get("/store_order/StoreOrder/print",{params:r})}export{s as a,o as b,a as c,p as d,f as e,n as f,c as g,A as h,_ as i,u as j,i as o,d as s,O as w}; +import{G as e}from"./index-DcwaEiyg.js";function o(r){return e.post("/cart/cart/create",r)}function s(r){return e.get("/cart/cart/list",{params:r})}function i(r){return e.post("/store_order/StoreOrder/checkOrder",r)}function a(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 p(r){return e.get("/order/cashierinfo/lists",{params:r})}function f(r){return e.get("/store_order/storeOrder/detail",{params:r})}function u(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function O(r){return e.post("/store_order/StoreOrder/writeoff_order",r)}function A(r){return e.post("/store_order/StoreOrder/checkSms",r)}function _(r){return e.get("/store_order/StoreOrder/print",{params:r})}export{s as a,o as b,a as c,p as d,f as e,n as f,c as g,A as h,_ as i,u as j,i as o,d as s,O as w}; diff --git a/dist/assets/test-CuqgpxdP.js b/dist/assets/test-CheG7YBE.js similarity index 99% rename from dist/assets/test-CuqgpxdP.js rename to dist/assets/test-CheG7YBE.js index 728dcc9..d11aa1e 100644 --- a/dist/assets/test-CuqgpxdP.js +++ b/dist/assets/test-CheG7YBE.js @@ -1,4 +1,4 @@ -import{r as O,b as S,c as w,k as C,e as g,f as T,w as A,F as x,E as I,g as L}from"./index-C4rRmnc5.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,k as C,e as g,f as T,w as A,F as x,E as I,g as L}from"./index-DcwaEiyg.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/dist/assets/user-UEbWTjyf.js b/dist/assets/user-CnK8Y4fd.js similarity index 91% rename from dist/assets/user-UEbWTjyf.js rename to dist/assets/user-CnK8Y4fd.js index fab6319..c3bfd5c 100644 --- a/dist/assets/user-UEbWTjyf.js +++ b/dist/assets/user-CnK8Y4fd.js @@ -1 +1 @@ -import{G as s}from"./index-C4rRmnc5.js";function t(e){return s.post("/login/account",e)}function u(e){return s.get("/user/UserShip/lists",{params:e})}function i(e){return s.post("/user/user/add",e)}function n(e){return s.get("/user/user/lists",{params:e})}function a(e){return s.get("/user/user/detail",{params:e})}function p(e){return s.get("/user/Address/detail",{params:e})}function o(e){return s.post("/user/Address/edit",e)}function d(e){return s.post("/store_order/StoreOrder/rechange_amount",e)}function c(e){return s.post("/user/user/user_ship",e)}function A(e){return s.get("/user/UserLabel/lists",{params:e})}function l(e){return s.post("/user/user/user_label",e)}export{u as a,i as b,d as c,a as d,c as e,A as f,l as g,p as h,o as i,t as l,n as u}; +import{G as s}from"./index-DcwaEiyg.js";function t(e){return s.post("/login/account",e)}function u(e){return s.get("/user/UserShip/lists",{params:e})}function i(e){return s.post("/user/user/add",e)}function n(e){return s.get("/user/user/lists",{params:e})}function a(e){return s.get("/user/user/detail",{params:e})}function p(e){return s.get("/user/Address/detail",{params:e})}function o(e){return s.post("/user/Address/edit",e)}function d(e){return s.post("/store_order/StoreOrder/rechange_amount",e)}function c(e){return s.post("/user/user/user_ship",e)}function A(e){return s.get("/user/UserLabel/lists",{params:e})}function l(e){return s.post("/user/user/user_label",e)}export{u as a,i as b,d as c,a as d,c as e,A as f,l as g,p as h,o as i,t as l,n as u}; diff --git a/dist/index.html b/dist/index.html index a76fb04..a1534e1 100644 --- a/dist/index.html +++ b/dist/index.html @@ -56,7 +56,7 @@ } } - + diff --git a/src/views/saleHome/component/shop.vue b/src/views/saleHome/component/shop.vue index 48eac60..de9e5d5 100644 --- a/src/views/saleHome/component/shop.vue +++ b/src/views/saleHome/component/shop.vue @@ -107,7 +107,7 @@ onUnmounted(() => { :infinite-scroll-immediate="false" style="overflow: auto" > - +
{ overflow-y: auto; box-sizing: border-box; padding-top: 1.25rem; - .shop-item { - width: 11rem; + width: 11.5rem; height: 16rem; cursor: pointer; background-color: #fff; border-radius: 1rem; - padding: 0.5rem; + padding: 0.7rem; display: flex; justify-content: space-between; flex-direction: column; @@ -216,8 +215,8 @@ onUnmounted(() => { .el-image { border-radius: 0.5rem; - width: 11rem; - height: 11rem; + width: 11.5rem; + height: 11.5rem; } .shop-name { @@ -274,6 +273,7 @@ onUnmounted(() => { } } } + } }