From 10c167da7957a19b7b7bd6a0f85bb52aae33d4aa Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Sat, 6 Jul 2024 18:08:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...hCode-5Ni0CM1g.js => authCode-D1GYIlL-.js} | 2 +- ...osAPI-B6mxiJzo.js => axiosAPI-DJRwxDIy.js} | 2 +- build/assets/index-BcY06oMb.js | 27 ------------------- .../{index-DHa9WNzO.js => index-BgHURwU7.js} | 2 +- ...{index-CAy1hogm.css => index-BjpCz5fK.css} | 2 +- .../{index-C1UYAdzy.js => index-BnGigPfR.js} | 4 +-- .../{index-DWib0yOG.js => index-CB72F0mm.js} | 2 +- .../{index-DOH2GsEn.js => index-CDgWfTBA.js} | 2 +- .../{index-DK-Q_wnL.js => index-DMwnq_he.js} | 2 +- build/assets/index-DeDWsEYB.js | 1 + .../{index-ZqC6IftU.js => index-DpnybBgR.js} | 2 +- .../{index-BI42i4fN.js => index-Dvv7npa8.js} | 2 +- .../{index-4N16MaV1.js => index-DwdEL_Er.js} | 2 +- ...{index-DSeWM5d3.css => index-Dwu1TsNn.css} | 2 +- build/assets/index-Si3YHsKU.js | 27 +++++++++++++++++++ .../{index-DtjOe95N.js => index-auH31J6o.js} | 2 +- build/assets/index-tbPBV3b_.js | 1 - ...unt-BAVEhqMF.js => indexCount-DGXdAzbZ.js} | 2 +- ...chant-D8vvQnCS.js => merchant-nsqy9sz9.js} | 2 +- ...adding-B7CJVLVc.js => padding-CO-3gQOa.js} | 2 +- .../{pay-D1eDcnTc.js => pay-BYJnRMtm.js} | 2 +- .../{shop-Oo7M8T-d.js => shop-CUNZMJhl.js} | 2 +- .../{store-DOG1V_EV.js => store-DOZFgKpz.js} | 2 +- .../{test-CMj2k7kj.js => test-B4sX6LfC.js} | 2 +- .../{user-CPvHwcG9.js => user-Cxe1-N3Y.js} | 2 +- build/index.html | 2 +- src/views/saleHome/component/order.vue | 4 +-- src/views/user/component/detail.vue | 9 +++---- src/views/user/component/order.vue | 2 +- 29 files changed, 58 insertions(+), 59 deletions(-) rename build/assets/{authCode-5Ni0CM1g.js => authCode-D1GYIlL-.js} (93%) rename build/assets/{axiosAPI-B6mxiJzo.js => axiosAPI-DJRwxDIy.js} (93%) delete mode 100644 build/assets/index-BcY06oMb.js rename build/assets/{index-DHa9WNzO.js => index-BgHURwU7.js} (98%) rename build/assets/{index-CAy1hogm.css => index-BjpCz5fK.css} (81%) rename build/assets/{index-C1UYAdzy.js => index-BnGigPfR.js} (99%) rename build/assets/{index-DWib0yOG.js => index-CB72F0mm.js} (98%) rename build/assets/{index-DOH2GsEn.js => index-CDgWfTBA.js} (84%) rename build/assets/{index-DK-Q_wnL.js => index-DMwnq_he.js} (98%) create mode 100644 build/assets/index-DeDWsEYB.js rename build/assets/{index-ZqC6IftU.js => index-DpnybBgR.js} (96%) rename build/assets/{index-BI42i4fN.js => index-Dvv7npa8.js} (96%) rename build/assets/{index-4N16MaV1.js => index-DwdEL_Er.js} (94%) rename build/assets/{index-DSeWM5d3.css => index-Dwu1TsNn.css} (59%) create mode 100644 build/assets/index-Si3YHsKU.js rename build/assets/{index-DtjOe95N.js => index-auH31J6o.js} (96%) delete mode 100644 build/assets/index-tbPBV3b_.js rename build/assets/{indexCount-BAVEhqMF.js => indexCount-DGXdAzbZ.js} (86%) rename build/assets/{merchant-D8vvQnCS.js => merchant-nsqy9sz9.js} (87%) rename build/assets/{padding-B7CJVLVc.js => padding-CO-3gQOa.js} (65%) rename build/assets/{pay-D1eDcnTc.js => pay-BYJnRMtm.js} (98%) rename build/assets/{shop-Oo7M8T-d.js => shop-CUNZMJhl.js} (73%) rename build/assets/{store-DOG1V_EV.js => store-DOZFgKpz.js} (94%) rename build/assets/{test-CMj2k7kj.js => test-B4sX6LfC.js} (99%) rename build/assets/{user-CPvHwcG9.js => user-Cxe1-N3Y.js} (91%) diff --git a/build/assets/authCode-5Ni0CM1g.js b/build/assets/authCode-D1GYIlL-.js similarity index 93% rename from build/assets/authCode-5Ni0CM1g.js rename to build/assets/authCode-D1GYIlL-.js index e21b704..4505589 100644 --- a/build/assets/authCode-5Ni0CM1g.js +++ b/build/assets/authCode-D1GYIlL-.js @@ -1 +1 @@ -import{r as o,b as c,c as m,d as y,w as p,g as v,t as f,N as x}from"./index-C1UYAdzy.js";const g={__name:"authCode",props:{type:{type:String,default:"primary"},start:{type:Boolean,default:!0},time:{type:Number,default:60},text:{type:String,default:"发送验证码"},timeText:{type:String,default:"秒重新获取"},width:{type:String,default:"100px"},disabled:{type:Boolean,default:!1}},emits:["sendCode"],setup(t,{expose:s,emit:r}){const l=t,u=r,i=()=>{u("sendCode"),l.start&&n()},e=o(0),a=o(null),n=()=>{e.value=l.time,a.value=setInterval(()=>{e.value--,e.value<=0&&(clearInterval(a.value),e.value=0)},1e3)};return s({startCountDown:n,resetDown:()=>{clearInterval(a.value),e.value=0}}),(b,C)=>{const d=c("el-button");return m(),y(d,{type:t.type,style:x({width:t.width}),onClick:i,disabled:e.value>0||t.disabled},{default:p(()=>[v(f(e.value>0?`${e.value}${t.timeText}`:t.text),1)]),_:1},8,["type","style","disabled"])}}};export{g as _}; +import{r as o,b as c,c as m,d as y,w as p,g as v,t as f,N as x}from"./index-BnGigPfR.js";const g={__name:"authCode",props:{type:{type:String,default:"primary"},start:{type:Boolean,default:!0},time:{type:Number,default:60},text:{type:String,default:"发送验证码"},timeText:{type:String,default:"秒重新获取"},width:{type:String,default:"100px"},disabled:{type:Boolean,default:!1}},emits:["sendCode"],setup(t,{expose:s,emit:r}){const l=t,u=r,i=()=>{u("sendCode"),l.start&&n()},e=o(0),a=o(null),n=()=>{e.value=l.time,a.value=setInterval(()=>{e.value--,e.value<=0&&(clearInterval(a.value),e.value=0)},1e3)};return s({startCountDown:n,resetDown:()=>{clearInterval(a.value),e.value=0}}),(b,C)=>{const d=c("el-button");return m(),y(d,{type:t.type,style:x({width:t.width}),onClick:i,disabled:e.value>0||t.disabled},{default:p(()=>[v(f(e.value>0?`${e.value}${t.timeText}`:t.text),1)]),_:1},8,["type","style","disabled"])}}};export{g as _}; diff --git a/build/assets/axiosAPI-B6mxiJzo.js b/build/assets/axiosAPI-DJRwxDIy.js similarity index 93% rename from build/assets/axiosAPI-B6mxiJzo.js rename to build/assets/axiosAPI-DJRwxDIy.js index 6857638..5047ad4 100644 --- a/build/assets/axiosAPI-B6mxiJzo.js +++ b/build/assets/axiosAPI-DJRwxDIy.js @@ -1 +1 @@ -import{O as o,P as s,E as r,u as d,Q as g}from"./index-C1UYAdzy.js";const m=o.create({baseURL:s.api,timeout:6e4});m.interceptors.request.use(t=>{const a=localStorage.getItem("Token");return a&&(t.headers.token=a),t},t=>(console.error(t),Promise.reject(t)));m.interceptors.response.use(t=>{var a;if(t.data.code===-1&&(t.data.msg=="登录过期"||t.data.msg=="登录超时,请重新登录"))throw r({message:t.data.msg,type:"error"}),setTimeout(()=>{const e=d();e.setUserInfo({}),e.setToken(""),g.push("/login")},500),new Error(t.data.msg);if(t.data.code===400)throw r({message:t.data.msg,type:"error"}),new Error(t.data.msg);if(t.data.show&&r({message:t.data.msg,type:"error"}),t.data.code===500)throw t.data.msg=JSON.parse(t.data.msg),r({message:((a=t.data.msg)==null?void 0:a.msg)||t.data.msg,type:"error"}),new Error(t.data.msg);return t.data.code===0?Promise.reject(t.data):t.data},t=>{var a,e;return console.error(t),r({message:((e=(a=t.response)==null?void 0:a.data)==null?void 0:e.msg)||t,type:"error"}),Promise.reject(t)});export{m as r}; +import{O as o,P as s,E as r,u as d,Q as g}from"./index-BnGigPfR.js";const m=o.create({baseURL:s.api,timeout:6e4});m.interceptors.request.use(t=>{const a=localStorage.getItem("Token");return a&&(t.headers.token=a),t},t=>(console.error(t),Promise.reject(t)));m.interceptors.response.use(t=>{var a;if(t.data.code===-1&&(t.data.msg=="登录过期"||t.data.msg=="登录超时,请重新登录"))throw r({message:t.data.msg,type:"error"}),setTimeout(()=>{const e=d();e.setUserInfo({}),e.setToken(""),g.push("/login")},500),new Error(t.data.msg);if(t.data.code===400)throw r({message:t.data.msg,type:"error"}),new Error(t.data.msg);if(t.data.show&&r({message:t.data.msg,type:"error"}),t.data.code===500)throw t.data.msg=JSON.parse(t.data.msg),r({message:((a=t.data.msg)==null?void 0:a.msg)||t.data.msg,type:"error"}),new Error(t.data.msg);return t.data.code===0?Promise.reject(t.data):t.data},t=>{var a,e;return console.error(t),r({message:((e=(a=t.response)==null?void 0:a.data)==null?void 0:e.msg)||t,type:"error"}),Promise.reject(t)});export{m as r}; diff --git a/build/assets/index-BcY06oMb.js b/build/assets/index-BcY06oMb.js deleted file mode 100644 index bb902a5..0000000 --- a/build/assets/index-BcY06oMb.js +++ /dev/null @@ -1,27 +0,0 @@ -var Nd=Object.defineProperty;var Kd=(P,y,o)=>y in P?Nd(P,y,{enumerable:!0,configurable:!0,writable:!0,value:o}):P[y]=o;var fu=(P,y,o)=>(Kd(P,typeof y!="symbol"?y+"":y,o),o);import{c as Gd,a as zd,b as Yo,s as Hd,o as kd}from"./store-DOG1V_EV.js";import{_ as ct,r as R,o as Dt,m as re,a as Nt,b as un,c as D,d as Re,w as cn,e as v,f as U,g as rn,t as K,n as hu,E as qe,u as Ur,h as Ft,i as Xo,j as _u,k as nn,F as Mt,l as Ut,p as ae,q as pu,s as du,v as Wt,x as qd,y as $r,z as Wr,A as Vd,B as at,C as Br,D as Zd,G as Yd,H as Xd}from"./index-C1UYAdzy.js";import{u as Jd}from"./user-CPvHwcG9.js";import"./moment-Cl4UOzQZ.js";import{p as Zo}from"./padding-B7CJVLVc.js";import"./axiosAPI-B6mxiJzo.js";import{m as au,s as Qd}from"./shop-Oo7M8T-d.js";import{p as jd}from"./pay-D1eDcnTc.js";import"./authCode-5Ni0CM1g.js";/* empty css */const ng={class:"price"},eg={class:"flex"},tg={style:{margin:"0.625rem","padding-bottom":"40px"}},rg={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},ig={class:"dialog-footer"},ug={__name:"price",emits:["changeAllPrice"],setup(P,{expose:y,emit:o}){const E=R(!1),V=R(null),Q=R(0),x=(Z=!0,A=0)=>{X.value.nowPrice="",X.value.percentage="",E.value=Z,Q.value=A,hu(()=>{setTimeout(()=>{var sn;(sn=V.value)==null||sn.focus()},150)})},X=R({nowPrice:"",percentage:""}),_n=Z=>{X.value.percentage=(Z/Q.value*100).toFixed(2)},fn=Z=>{X.value.nowPrice=(Q.value*Z/100).toFixed(2)},en=o,J=()=>{if(X.value.percentage>100)return X.value.nowPrice="",X.value.percentage="",qe.error("改价金额不能大于当前订单金额");if(X.value.nowPrice<=0)return X.value.nowPrice="",X.value.percentage="",qe.error("金额不能小于0");en("changeAllPrice",X.value.nowPrice)};y({show:x,dialogVisible:E});const yn=()=>{E.value&&J()};return Dt(()=>{re.on("enter",yn)}),Nt(()=>{re.off("enter",yn)}),(Z,A)=>{const sn=un("el-input"),B=un("el-button"),G=un("el-dialog");return D(),Re(G,{modelValue:E.value,"onUpdate:modelValue":A[2]||(A[2]=on=>E.value=on),title:"订单改价",width:"650"},{footer:cn(()=>[v("div",ig,[U(B,{class:"ok-btn",type:"primary",onClick:J},{default:cn(()=>[rn(" 确定 (Enter) ")]),_:1})])]),default:cn(()=>[v("div",ng,[v("div",eg,[U(sn,{ref_key:"priceRef",ref:V,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.nowPrice,"onUpdate:modelValue":A[0]||(A[0]=on=>X.value.nowPrice=on),type:"number",placeholder:"请输入改价后的价格",onInput:_n},{suffix:cn(()=>[rn("元")]),_:1},8,["modelValue"]),U(sn,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.percentage,"onUpdate:modelValue":A[1]||(A[1]=on=>X.value.percentage=on),type:"number",placeholder:"请输入比例",onInput:fn},{suffix:cn(()=>[rn("%")]),_:1},8,["modelValue"])]),v("div",tg,[rn(" 改价后金额: "),v("span",rg,"¥"+K(X.value.nowPrice||Q.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},sg=ct(ug,[["__scopeId","data-v-924edcc0"]]),og={class:"check-user-list"},lg={class:"header-input"},fg={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ag=["onClick"],cg={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},hg={class:"top"},_g={class:"bold"},pg={class:"flex-between"},dg={class:"mr-2"},gg={class:"bottom flex",style:{"justify-content":"space-between"}},vg={class:"red"},mg={class:"red"},wg={class:"red"},yg={key:0,class:"load-end"},xg={key:1,class:"load-end"},Ag={__name:"userList",emits:["setUser"],setup(P,{expose:y,emit:o}){Ur();const E=R(!1),V=R({page_no:1,page_size:20,mobile:""}),Q=o,x=R(!1),X=R(0),_n=R(!1),fn=R([]),en=(Z=!1)=>{if(Z)V.value.page_no=1;else if(_n.value||x.value)return;x.value=!0,Jd(V.value).then(A=>{Z?fn.value=A.data.lists:fn.value=[...fn.value,...A.data.lists],A.data.lists.length{_n.value=!0,x.value=!1})},J=(Z,A)=>{Q("setUser",Z),E.value=!1};return y({open:(Z=null)=>{Z||(V.value.mobile=""),E.value=!0,en(!0)}}),(Z,A)=>{const sn=un("el-button"),B=un("el-input"),G=un("el-avatar"),on=un("el-tag"),H=un("el-dialog"),an=Ft("loading"),pn=Ft("infinite-scroll");return D(),Re(H,{modelValue:E.value,"onUpdate:modelValue":A[4]||(A[4]=k=>E.value=k),title:"选择用户",width:"800"},{default:cn(()=>[v("div",og,[v("div",lg,[U(B,{modelValue:V.value.mobile,"onUpdate:modelValue":A[1]||(A[1]=k=>V.value.mobile=k),placeholder:"搜索手机号/ID",onKeydown:A[2]||(A[2]=Xo(k=>en(!0),["enter"])),onClear:A[3]||(A[3]=k=>en(!0)),clearable:""},{append:cn(()=>[U(sn,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:A[0]||(A[0]=k=>en(!0))},{default:cn(()=>[rn("搜索")]),_:1})]),_:1},8,["modelValue"])]),_u((D(),nn("div",fg,[(D(!0),nn(Mt,null,Ut(fn.value,(k,b)=>(D(),nn("div",{class:"item",key:b,onClick:gn=>J(k,b)},[U(G,{class:"avatar",src:k.avatar},null,8,["src"]),v("div",cg,[v("div",hg,[v("div",null,[v("span",_g,K(k.nickname),1),v("span",null,K(" (ID:"+k.id+")"),1)]),v("div",pg,[v("div",dg,"手机号: "+K(k.mobile||k.account),1),k.user_ship==0||k.user_ship==4?(D(),Re(on,{key:0,type:"primary"},{default:cn(()=>[rn(K(k.user_ship_name),1)]),_:2},1024)):(D(),Re(on,{key:1,type:"success"},{default:cn(()=>[rn(K(k.user_ship_name),1)]),_:2},1024))])]),v("div",gg,[v("div",null,[rn("采购款: "),v("span",vg,K(k.purchase_funds),1)]),v("div",null,[rn("礼品券: "),v("span",mg,K(k.get_frozen),1)]),v("div",null,[rn("余额: "),v("span",wg,K(k.now_money),1)])])])],8,ag))),128)),_n.value?(D(),nn("div",yg,"没有更多了")):ae("",!0),x.value?(D(),nn("div",xg,"加载中...")):ae("",!0)])),[[an,x.value],[pn,en]])])]),_:1},8,["modelValue"])}}},Ig=ct(Ag,[["__scopeId","data-v-3a73e14a"]]),Cg=P=>(pu("data-v-97ac6151"),P=P(),du(),P),Lg={class:"my-order"},Sg={class:"user-nav"},Rg={class:"user-info"},Eg={key:0,class:"info"},bg={class:"flex-bewteen"},Tg={class:"flex-bewteen",style:{"align-items":"flex-start"}},Og={class:"user-money"},Pg={style:{"margin-right":"0.5rem"}},$g={style:{color:"#f70"}},Bg={style:{"margin-right":"0.5rem"}},Wg={style:{color:"#f70"}},Fg={style:{color:"#f70"}},Mg={key:1,class:"info",style:{"align-items":"center",display:"flex","justify-content":"space-between"}},Ug={class:"flex-bewteen",style:{width:"100%"}},Dg=Cg(()=>v("div",{style:{"font-size":"1.2rem"}},"游客",-1)),Ng={class:"header-nav"},Kg={class:"nav-item"},Gg={class:"order-list"},zg={class:"order-item-info"},Hg={class:"order-item-title"},kg={class:"title"},qg=["onClick"],Vg={class:"order-item-sku"},Zg={class:"order-item-price"},Yg={class:"order-footer"},Xg={class:"order-total"},Jg={class:"price",style:{"flex-direction":"column","align-items":"flex-start"}},Qg={class:"total-item",style:{"flex-shrink":"0"}},jg={style:{"font-size":"1.4rem"}},nv={key:0,class:"total-item",style:{"padding-right":"0","line-height":"0.8rem"}},ev={style:{"font-size":"0.8rem"}},tv={class:"order-btn"},rv={__name:"order",emits:["goPay","editAttr"],setup(P,{expose:y,emit:o}){const E=R([]),V=R(0),Q=R(0),x=R(0);Ur();const X=R(null),_n=()=>{let $=[];E.value.map(F=>{$.push(F.id)}),$.length!=0&&en($)},fn=$=>{E.value=E.value.filter(F=>F.id!=$),en([$])},en=$=>{Gd({id:$}).then(F=>{yn()})},J=R({}),yn=()=>{V.value=0,Q.value=0,x.value=0,zd().then($=>{J.value=$.data.extend,E.value=$.data.lists||[]})};yn();const Z=o,A=()=>{Z("goPay")},sn=($,F)=>{Yo({product_id:$.product_id,cart_num:$.cart_num}).then(Tn=>{yn()}).catch(Tn=>{var Bn;let On=(Bn=Tn==null?void 0:Tn.msg)==null?void 0:Bn.match(/\b\d+(\.\d+)?\b/);On?$.cart_num=+On[0]:$.cart_num=1})},B=$=>{x.value=Q.value-$,V.value=+$,hu(()=>{setTimeout(()=>{on(!1)},150)})};R(0);const G=R(null),on=($=!0)=>{G.value.show($,Q.value)},H=R({uid:""}),an=$=>{H.value=$,H.value.uid=$.id},pn=R(!1);y({getList:yn,resetView:()=>{pn.value=!1,yn()},list:E,discounts:x,allPrice:V,userInfo:H,is_storage:pn});const b=()=>{G.value.dialogVisible?G.value.dialogVisible=!1:on()},gn=()=>{E.value.length>0&&_n()};return Dt(()=>{re.on("insert",b),re.on("delete",gn)}),Nt(()=>{re.off("insert",b),re.off("delete",gn)}),($,F)=>{const Tn=un("el-avatar"),On=un("ArrowRight"),Bn=un("el-icon"),ce=un("el-button"),Ve=un("RefreshLeft"),Nr=un("Delete"),ge=un("el-empty"),he=un("el-image"),Kr=un("el-input-number");return D(),nn("div",Lg,[v("div",Sg,[v("div",Rg,[U(Tn,{class:"avatar",src:H.value.avatar},null,8,["src"]),H.value.uid?(D(),nn("div",Eg,[v("div",bg,[v("div",null,"手机号: "+K(H.value.mobile||H.value.account),1),U(ce,{type:"primary",link:"",class:"change-user",onClick:F[0]||(F[0]=Sn=>X.value.open(H.value.uid))},{default:cn(()=>[rn("切换用户"),U(Bn,null,{default:cn(()=>[U(On)]),_:1})]),_:1})]),v("div",Tg,[v("div",Og,[v("div",Pg,[rn("采购款: "),v("span",$g,K(H.value.purchase_funds),1)]),v("div",Bg,[rn("礼品券: "),v("span",Wg,K(H.value.get_frozen),1)]),v("div",null,[rn("余额: "),v("span",Fg,K(H.value.now_money),1)])]),U(ce,{style:{"margin-top":"0.2rem"},link:"",onClick:F[1]||(F[1]=Sn=>H.value.uid="")},{default:cn(()=>[rn(" 重置"),U(Bn,null,{default:cn(()=>[U(Ve)]),_:1})]),_:1})])])):(D(),nn("div",Mg,[v("div",Ug,[Dg,U(ce,{type:"primary",link:"",class:"change-user",onClick:F[2]||(F[2]=Sn=>X.value.open())},{default:cn(()=>[rn("切换用户"),U(Bn,null,{default:cn(()=>[U(On)]),_:1})]),_:1})])]))]),U(Ig,{ref_key:"userListRef",ref:X,onSetUser:an},null,512)]),v("div",Ng,[v("div",Kg,[rn(" 已选购 "),v("span",null,K(E.value.length),1),rn(" 款 ")]),v("div",{class:"nav-item-clear",onClick:_n},[U(Bn,null,{default:cn(()=>[U(Nr)]),_:1}),rn("清空 (Delete) ")])]),v("div",Gg,[E.value.length==0?(D(),Re(ge,{key:0,description:"请点击右侧添加商品"})):(D(!0),nn(Mt,{key:1},Ut(E.value,(Sn,Zn)=>(D(),nn("div",{class:"order-item",key:Zn},[U(he,{loading:"lazy",class:"order-item-img",src:Sn.image},null,8,["src"]),v("div",zg,[v("div",Hg,[v("div",kg,K(Sn.store_name),1),v("div",{class:"delete",onClick:ht=>fn(Sn.id)},"删除",8,qg)]),v("div",Vg,[v("span",null,K(Sn.unit_name),1)]),v("div",Zg,[v("div",null,[rn(" ¥"),v("span",null,K(Sn.price),1)]),v("div",null,[U(Kr,{modelValue:Sn.cart_num,"onUpdate:modelValue":ht=>Sn.cart_num=ht,min:+Sn.batch>0?+Sn.batch:1,step:1,"step-strictly":"",onChange:ht=>sn(Sn)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])])])])]))),128))]),v("div",Yg,[v("div",Xg,[v("div",Jg,[v("div",Qg,[rn(" 合计: "),v("span",null,[rn("¥"),v("span",jg,K(J.value.pay_price||"0.00"),1)])]),J.value.msg?(D(),nn("div",nv,[v("span",ev,K(J.value.msg),1)])):ae("",!0)])]),v("div",tv,[U(ce,{class:"btn",type:"primary",onClick:A,disabled:E.value.length==0},{default:cn(()=>[rn(K("立即结账 (F9)"))]),_:1},8,["disabled"])])]),U(sg,{ref_key:"priceRef",ref:G,onChangeAllPrice:B},null,512)])}}},iv=ct(rv,[["__scopeId","data-v-97ac6151"]]);var Fr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Fr.exports;(function(P,y){(function(){var o,E="4.17.21",V=200,Q="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",x="Expected a function",X="Invalid `variable` option passed into `_.template`",_n="__lodash_hash_undefined__",fn=500,en="__lodash_placeholder__",J=1,yn=2,Z=4,A=1,sn=2,B=1,G=2,on=4,H=8,an=16,pn=32,k=64,b=128,gn=256,$=512,F=30,Tn="...",On=800,Bn=16,ce=1,Ve=2,Nr=3,ge=1/0,he=9007199254740991,Kr=17976931348623157e292,Sn=NaN,Zn=4294967295,ht=Zn-1,Qo=Zn>>>1,jo=[["ary",b],["bind",B],["bindKey",G],["curry",H],["curryRight",an],["flip",$],["partial",pn],["partialRight",k],["rearg",gn]],Ze="[object Arguments]",Kt="[object Array]",nl="[object AsyncFunction]",_t="[object Boolean]",pt="[object Date]",el="[object DOMException]",Gt="[object Error]",zt="[object Function]",gu="[object GeneratorFunction]",ie="[object Map]",dt="[object Number]",tl="[object Null]",ve="[object Object]",vu="[object Promise]",rl="[object Proxy]",gt="[object RegExp]",ue="[object Set]",vt="[object String]",Ht="[object Symbol]",il="[object Undefined]",mt="[object WeakMap]",ul="[object WeakSet]",wt="[object ArrayBuffer]",Ye="[object DataView]",Gr="[object Float32Array]",zr="[object Float64Array]",Hr="[object Int8Array]",kr="[object Int16Array]",qr="[object Int32Array]",Vr="[object Uint8Array]",Zr="[object Uint8ClampedArray]",Yr="[object Uint16Array]",Xr="[object Uint32Array]",sl=/\b__p \+= '';/g,ol=/\b(__p \+=) '' \+/g,ll=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mu=/&(?:amp|lt|gt|quot|#39);/g,wu=/[&<>"']/g,fl=RegExp(mu.source),al=RegExp(wu.source),cl=/<%-([\s\S]+?)%>/g,hl=/<%([\s\S]+?)%>/g,yu=/<%=([\s\S]+?)%>/g,_l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pl=/^\w*$/,dl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jr=/[\\^$.*+?()[\]{}|]/g,gl=RegExp(Jr.source),Qr=/^\s+/,vl=/\s/,ml=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wl=/\{\n\/\* \[wrapped with (.+)\] \*/,yl=/,? & /,xl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Al=/[()=,{}\[\]\/\s]/,Il=/\\(\\)?/g,Cl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,xu=/\w*$/,Ll=/^[-+]0x[0-9a-f]+$/i,Sl=/^0b[01]+$/i,Rl=/^\[object .+?Constructor\]$/,El=/^0o[0-7]+$/i,bl=/^(?:0|[1-9]\d*)$/,Tl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,kt=/($^)/,Ol=/['\n\r\u2028\u2029\\]/g,qt="\\ud800-\\udfff",Pl="\\u0300-\\u036f",$l="\\ufe20-\\ufe2f",Bl="\\u20d0-\\u20ff",Au=Pl+$l+Bl,Iu="\\u2700-\\u27bf",Cu="a-z\\xdf-\\xf6\\xf8-\\xff",Wl="\\xac\\xb1\\xd7\\xf7",Fl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ml="\\u2000-\\u206f",Ul=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lu="A-Z\\xc0-\\xd6\\xd8-\\xde",Su="\\ufe0e\\ufe0f",Ru=Wl+Fl+Ml+Ul,jr="['’]",Dl="["+qt+"]",Eu="["+Ru+"]",Vt="["+Au+"]",bu="\\d+",Nl="["+Iu+"]",Tu="["+Cu+"]",Ou="[^"+qt+Ru+bu+Iu+Cu+Lu+"]",ni="\\ud83c[\\udffb-\\udfff]",Kl="(?:"+Vt+"|"+ni+")",Pu="[^"+qt+"]",ei="(?:\\ud83c[\\udde6-\\uddff]){2}",ti="[\\ud800-\\udbff][\\udc00-\\udfff]",Xe="["+Lu+"]",$u="\\u200d",Bu="(?:"+Tu+"|"+Ou+")",Gl="(?:"+Xe+"|"+Ou+")",Wu="(?:"+jr+"(?:d|ll|m|re|s|t|ve))?",Fu="(?:"+jr+"(?:D|LL|M|RE|S|T|VE))?",Mu=Kl+"?",Uu="["+Su+"]?",zl="(?:"+$u+"(?:"+[Pu,ei,ti].join("|")+")"+Uu+Mu+")*",Hl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Du=Uu+Mu+zl,ql="(?:"+[Nl,ei,ti].join("|")+")"+Du,Vl="(?:"+[Pu+Vt+"?",Vt,ei,ti,Dl].join("|")+")",Zl=RegExp(jr,"g"),Yl=RegExp(Vt,"g"),ri=RegExp(ni+"(?="+ni+")|"+Vl+Du,"g"),Xl=RegExp([Xe+"?"+Tu+"+"+Wu+"(?="+[Eu,Xe,"$"].join("|")+")",Gl+"+"+Fu+"(?="+[Eu,Xe+Bu,"$"].join("|")+")",Xe+"?"+Bu+"+"+Wu,Xe+"+"+Fu,kl,Hl,bu,ql].join("|"),"g"),Jl=RegExp("["+$u+qt+Au+Su+"]"),Ql=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nf=-1,vn={};vn[Gr]=vn[zr]=vn[Hr]=vn[kr]=vn[qr]=vn[Vr]=vn[Zr]=vn[Yr]=vn[Xr]=!0,vn[Ze]=vn[Kt]=vn[wt]=vn[_t]=vn[Ye]=vn[pt]=vn[Gt]=vn[zt]=vn[ie]=vn[dt]=vn[ve]=vn[gt]=vn[ue]=vn[vt]=vn[mt]=!1;var dn={};dn[Ze]=dn[Kt]=dn[wt]=dn[Ye]=dn[_t]=dn[pt]=dn[Gr]=dn[zr]=dn[Hr]=dn[kr]=dn[qr]=dn[ie]=dn[dt]=dn[ve]=dn[gt]=dn[ue]=dn[vt]=dn[Ht]=dn[Vr]=dn[Zr]=dn[Yr]=dn[Xr]=!0,dn[Gt]=dn[zt]=dn[mt]=!1;var ef={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},tf={"&":"&","<":"<",">":">",'"':""","'":"'"},rf={"&":"&","<":"<",">":">",""":'"',"'":"'"},uf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},sf=parseFloat,of=parseInt,Nu=typeof Wt=="object"&&Wt&&Wt.Object===Object&&Wt,lf=typeof self=="object"&&self&&self.Object===Object&&self,En=Nu||lf||Function("return this")(),ii=y&&!y.nodeType&&y,Me=ii&&!0&&P&&!P.nodeType&&P,Ku=Me&&Me.exports===ii,ui=Ku&&Nu.process,Yn=function(){try{var a=Me&&Me.require&&Me.require("util").types;return a||ui&&ui.binding&&ui.binding("util")}catch{}}(),Gu=Yn&&Yn.isArrayBuffer,zu=Yn&&Yn.isDate,Hu=Yn&&Yn.isMap,ku=Yn&&Yn.isRegExp,qu=Yn&&Yn.isSet,Vu=Yn&&Yn.isTypedArray;function Gn(a,_,h){switch(h.length){case 0:return a.call(_);case 1:return a.call(_,h[0]);case 2:return a.call(_,h[0],h[1]);case 3:return a.call(_,h[0],h[1],h[2])}return a.apply(_,h)}function ff(a,_,h,w){for(var T=-1,j=a==null?0:a.length;++T-1}function si(a,_,h){for(var w=-1,T=a==null?0:a.length;++w-1;);return h}function es(a,_){for(var h=a.length;h--&&Je(_,a[h],0)>-1;);return h}function mf(a,_){for(var h=a.length,w=0;h--;)a[h]===_&&++w;return w}var wf=ai(ef),yf=ai(tf);function xf(a){return"\\"+uf[a]}function Af(a,_){return a==null?o:a[_]}function Qe(a){return Jl.test(a)}function If(a){return Ql.test(a)}function Cf(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function pi(a){var _=-1,h=Array(a.size);return a.forEach(function(w,T){h[++_]=[T,w]}),h}function ts(a,_){return function(h){return a(_(h))}}function Te(a,_){for(var h=-1,w=a.length,T=0,j=[];++h-1}function ca(n,e){var t=this.__data__,r=cr(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}me.prototype.clear=oa,me.prototype.delete=la,me.prototype.get=fa,me.prototype.has=aa,me.prototype.set=ca;function we(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function jn(n,e,t,r,i,s){var l,f=e&J,c=e&yn,p=e&Z;if(t&&(l=i?t(n,r,i,s):t(n)),l!==o)return l;if(!wn(n))return n;var d=O(n);if(d){if(l=dc(n),!f)return Un(n,l)}else{var g=$n(n),m=g==zt||g==gu;if(Fe(n))return Us(n,f);if(g==ve||g==Ze||m&&!i){if(l=c||m?{}:ro(n),!f)return c?ic(n,Ra(l,n)):rc(n,ps(l,n))}else{if(!dn[g])return i?n:{};l=gc(n,g,f)}}s||(s=new oe);var I=s.get(n);if(I)return I;s.set(n,l),$o(n)?n.forEach(function(S){l.add(jn(S,e,t,S,n,s))}):Oo(n)&&n.forEach(function(S,z){l.set(z,jn(S,e,t,z,n,s))});var L=p?c?Ni:Di:c?Nn:Rn,M=d?o:L(n);return Xn(M||n,function(S,z){M&&(z=S,S=n[z]),St(l,z,jn(S,e,t,z,n,s))}),l}function Ea(n){var e=Rn(n);return function(t){return ds(t,n,e)}}function ds(n,e,t){var r=t.length;if(n==null)return!r;for(n=hn(n);r--;){var i=t[r],s=e[i],l=n[i];if(l===o&&!(i in n)||!s(l))return!1}return!0}function gs(n,e,t){if(typeof n!="function")throw new Jn(x);return $t(function(){n.apply(o,t)},e)}function Rt(n,e,t,r){var i=-1,s=Zt,l=!0,f=n.length,c=[],p=e.length;if(!f)return c;t&&(e=mn(e,zn(t))),r?(s=si,l=!1):e.length>=V&&(s=yt,l=!1,e=new Ne(e));n:for(;++ii?0:i+t),r=r===o||r>i?i:W(r),r<0&&(r+=i),r=t>r?0:Wo(r);t0&&t(f)?e>1?bn(f,e-1,t,r,i):be(i,f):r||(i[i.length]=f)}return i}var xi=Hs(),ws=Hs(!0);function _e(n,e){return n&&xi(n,e,Rn)}function Ai(n,e){return n&&ws(n,e,Rn)}function _r(n,e){return Ee(e,function(t){return Ce(n[t])})}function Ge(n,e){e=Be(e,n);for(var t=0,r=e.length;n!=null&&te}function Oa(n,e){return n!=null&&ln.call(n,e)}function Pa(n,e){return n!=null&&e in hn(n)}function $a(n,e,t){return n>=Pn(e,t)&&n=120&&d.length>=120)?new Ne(l&&d):o}d=n[0];var g=-1,m=f[0];n:for(;++g-1;)f!==n&&ir.call(f,c,1),ir.call(n,c,1);return n}function Ts(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==s){var s=i;Ie(i)?ir.call(n,i,1):Pi(n,i)}}return n}function bi(n,e){return n+or(as()*(e-n+1))}function qa(n,e,t,r){for(var i=-1,s=Ln(sr((e-n)/(t||1)),0),l=h(s);s--;)l[r?s:++i]=n,n+=t;return l}function Ti(n,e){var t="";if(!n||e<1||e>he)return t;do e%2&&(t+=n),e=or(e/2),e&&(n+=n);while(e);return t}function N(n,e){return Vi(so(n,e,Kn),n+"")}function Va(n){return _s(ft(n))}function Za(n,e){var t=ft(n);return Cr(t,Ke(e,0,t.length))}function Tt(n,e,t,r){if(!wn(n))return n;e=Be(e,n);for(var i=-1,s=e.length,l=s-1,f=n;f!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=h(i);++r>>1,l=n[s];l!==null&&!kn(l)&&(t?l<=e:l=V){var p=e?null:lc(n);if(p)return Xt(p);l=!1,i=yt,c=new Ne}else c=e?[]:f;n:for(;++r=r?n:ne(n,e,t)}var Ms=Df||function(n){return En.clearTimeout(n)};function Us(n,e){if(e)return n.slice();var t=n.length,r=us?us(t):new n.constructor(t);return n.copy(r),r}function Fi(n){var e=new n.constructor(n.byteLength);return new tr(e).set(new tr(n)),e}function ja(n,e){var t=e?Fi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function nc(n){var e=new n.constructor(n.source,xu.exec(n));return e.lastIndex=n.lastIndex,e}function ec(n){return Lt?hn(Lt.call(n)):{}}function Ds(n,e){var t=e?Fi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function Ns(n,e){if(n!==e){var t=n!==o,r=n===null,i=n===n,s=kn(n),l=e!==o,f=e===null,c=e===e,p=kn(e);if(!f&&!p&&!s&&n>e||s&&l&&c&&!f&&!p||r&&l&&c||!t&&c||!i)return 1;if(!r&&!s&&!p&&n=f)return c;var p=t[r];return c*(p=="desc"?-1:1)}}return n.index-e.index}function Ks(n,e,t,r){for(var i=-1,s=n.length,l=t.length,f=-1,c=e.length,p=Ln(s-l,0),d=h(c+p),g=!r;++f1?t[i-1]:o,l=i>2?t[2]:o;for(s=n.length>3&&typeof s=="function"?(i--,s):o,l&&Fn(t[0],t[1],l)&&(s=i<3?o:s,i=1),e=hn(e);++r-1?i[s?e[l]:l]:o}}function Vs(n){return Ae(function(e){var t=e.length,r=t,i=Qn.prototype.thru;for(n&&e.reverse();r--;){var s=e[r];if(typeof s!="function")throw new Jn(x);if(i&&!l&&Ar(s)=="wrapper")var l=new Qn([],!0)}for(r=l?r:t;++r1&&Y.reverse(),d&&cf))return!1;var p=s.get(n),d=s.get(e);if(p&&d)return p==e&&d==n;var g=-1,m=!0,I=t&sn?new Ne:o;for(s.set(n,e),s.set(e,n);++g1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(ml,`{ -/* [wrapped with `+e+`] */ -`)}function mc(n){return O(n)||ke(n)||!!(ls&&n&&n[ls])}function Ie(n,e){var t=typeof n;return e=e??he,!!e&&(t=="number"||t!="symbol"&&bl.test(n))&&n>-1&&n%1==0&&n0){if(++e>=On)return arguments[0]}else e=0;return n.apply(o,arguments)}}function Cr(n,e){var t=-1,r=n.length,i=r-1;for(e=e===o?r:e;++t1?n[e-1]:o;return t=typeof t=="function"?(n.pop(),t):o,wo(n,t)});function yo(n){var e=u(n);return e.__chain__=!0,e}function bh(n,e){return e(n),n}function Lr(n,e){return e(n)}var Th=Ae(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(s){return yi(s,n)};return e>1||this.__actions__.length||!(r instanceof q)||!Ie(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Lr,args:[i],thisArg:o}),new Qn(r,this.__chain__).thru(function(s){return e&&!s.length&&s.push(o),s}))});function Oh(){return yo(this)}function Ph(){return new Qn(this.value(),this.__chain__)}function $h(){this.__values__===o&&(this.__values__=Bo(this.value()));var n=this.__index__>=this.__values__.length,e=n?o:this.__values__[this.__index__++];return{done:n,value:e}}function Bh(){return this}function Wh(n){for(var e,t=this;t instanceof ar;){var r=ho(t);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Fh(){var n=this.__wrapped__;if(n instanceof q){var e=n;return this.__actions__.length&&(e=new q(this)),e=e.reverse(),e.__actions__.push({func:Lr,args:[Zi],thisArg:o}),new Qn(e,this.__chain__)}return this.thru(Zi)}function Mh(){return Ws(this.__wrapped__,this.__actions__)}var Uh=vr(function(n,e,t){ln.call(n,t)?++n[t]:ye(n,t,1)});function Dh(n,e,t){var r=O(n)?Zu:ba;return t&&Fn(n,e,t)&&(e=o),r(n,C(e,3))}function Nh(n,e){var t=O(n)?Ee:ms;return t(n,C(e,3))}var Kh=qs(_o),Gh=qs(po);function zh(n,e){return bn(Sr(n,e),1)}function Hh(n,e){return bn(Sr(n,e),ge)}function kh(n,e,t){return t=t===o?1:W(t),bn(Sr(n,e),t)}function xo(n,e){var t=O(n)?Xn:Pe;return t(n,C(e,3))}function Ao(n,e){var t=O(n)?af:vs;return t(n,C(e,3))}var qh=vr(function(n,e,t){ln.call(n,t)?n[t].push(e):ye(n,t,[e])});function Vh(n,e,t,r){n=Dn(n)?n:ft(n),t=t&&!r?W(t):0;var i=n.length;return t<0&&(t=Ln(i+t,0)),Or(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&Je(n,e,t)>-1}var Zh=N(function(n,e,t){var r=-1,i=typeof e=="function",s=Dn(n)?h(n.length):[];return Pe(n,function(l){s[++r]=i?Gn(e,l,t):Et(l,e,t)}),s}),Yh=vr(function(n,e,t){ye(n,t,e)});function Sr(n,e){var t=O(n)?mn:Cs;return t(n,C(e,3))}function Xh(n,e,t,r){return n==null?[]:(O(e)||(e=e==null?[]:[e]),t=r?o:t,O(t)||(t=t==null?[]:[t]),Es(n,e,t))}var Jh=vr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Qh(n,e,t){var r=O(n)?oi:Qu,i=arguments.length<3;return r(n,C(e,4),t,i,Pe)}function jh(n,e,t){var r=O(n)?cf:Qu,i=arguments.length<3;return r(n,C(e,4),t,i,vs)}function n_(n,e){var t=O(n)?Ee:ms;return t(n,br(C(e,3)))}function e_(n){var e=O(n)?_s:Va;return e(n)}function t_(n,e,t){(t?Fn(n,e,t):e===o)?e=1:e=W(e);var r=O(n)?Ca:Za;return r(n,e)}function r_(n){var e=O(n)?La:Xa;return e(n)}function i_(n){if(n==null)return 0;if(Dn(n))return Or(n)?je(n):n.length;var e=$n(n);return e==ie||e==ue?n.size:Si(n).length}function u_(n,e,t){var r=O(n)?li:Ja;return t&&Fn(n,e,t)&&(e=o),r(n,C(e,3))}var s_=N(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Fn(n,e[0],e[1])?e=[]:t>2&&Fn(e[0],e[1],e[2])&&(e=[e[0]]),Es(n,bn(e,1),[])}),Rr=Nf||function(){return En.Date.now()};function o_(n,e){if(typeof e!="function")throw new Jn(x);return n=W(n),function(){if(--n<1)return e.apply(this,arguments)}}function Io(n,e,t){return e=t?o:e,e=n&&e==null?n.length:e,xe(n,b,o,o,o,o,e)}function Co(n,e){var t;if(typeof e!="function")throw new Jn(x);return n=W(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Xi=N(function(n,e,t){var r=B;if(t.length){var i=Te(t,ot(Xi));r|=pn}return xe(n,r,e,t,i)}),Lo=N(function(n,e,t){var r=B|G;if(t.length){var i=Te(t,ot(Lo));r|=pn}return xe(e,r,n,t,i)});function So(n,e,t){e=t?o:e;var r=xe(n,H,o,o,o,o,o,e);return r.placeholder=So.placeholder,r}function Ro(n,e,t){e=t?o:e;var r=xe(n,an,o,o,o,o,o,e);return r.placeholder=Ro.placeholder,r}function Eo(n,e,t){var r,i,s,l,f,c,p=0,d=!1,g=!1,m=!0;if(typeof n!="function")throw new Jn(x);e=te(e)||0,wn(t)&&(d=!!t.leading,g="maxWait"in t,s=g?Ln(te(t.maxWait)||0,e):s,m="trailing"in t?!!t.trailing:m);function I(In){var fe=r,Se=i;return r=i=o,p=In,l=n.apply(Se,fe),l}function L(In){return p=In,f=$t(z,e),d?I(In):l}function M(In){var fe=In-c,Se=In-p,Vo=e-fe;return g?Pn(Vo,s-Se):Vo}function S(In){var fe=In-c,Se=In-p;return c===o||fe>=e||fe<0||g&&Se>=s}function z(){var In=Rr();if(S(In))return Y(In);f=$t(z,M(In))}function Y(In){return f=o,m&&r?I(In):(r=i=o,l)}function qn(){f!==o&&Ms(f),p=0,r=c=i=f=o}function Mn(){return f===o?l:Y(Rr())}function Vn(){var In=Rr(),fe=S(In);if(r=arguments,i=this,c=In,fe){if(f===o)return L(c);if(g)return Ms(f),f=$t(z,e),I(c)}return f===o&&(f=$t(z,e)),l}return Vn.cancel=qn,Vn.flush=Mn,Vn}var l_=N(function(n,e){return gs(n,1,e)}),f_=N(function(n,e,t){return gs(n,te(e)||0,t)});function a_(n){return xe(n,$)}function Er(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Jn(x);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=t.cache;if(s.has(i))return s.get(i);var l=n.apply(this,r);return t.cache=s.set(i,l)||s,l};return t.cache=new(Er.Cache||we),t}Er.Cache=we;function br(n){if(typeof n!="function")throw new Jn(x);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function c_(n){return Co(2,n)}var h_=Qa(function(n,e){e=e.length==1&&O(e[0])?mn(e[0],zn(C())):mn(bn(e,1),zn(C()));var t=e.length;return N(function(r){for(var i=-1,s=Pn(r.length,t);++i=e}),ke=xs(function(){return arguments}())?xs:function(n){return xn(n)&&ln.call(n,"callee")&&!os.call(n,"callee")},O=h.isArray,R_=Gu?zn(Gu):Wa;function Dn(n){return n!=null&&Tr(n.length)&&!Ce(n)}function An(n){return xn(n)&&Dn(n)}function E_(n){return n===!0||n===!1||xn(n)&&Wn(n)==_t}var Fe=Gf||lu,b_=zu?zn(zu):Fa;function T_(n){return xn(n)&&n.nodeType===1&&!Bt(n)}function O_(n){if(n==null)return!0;if(Dn(n)&&(O(n)||typeof n=="string"||typeof n.splice=="function"||Fe(n)||lt(n)||ke(n)))return!n.length;var e=$n(n);if(e==ie||e==ue)return!n.size;if(Pt(n))return!Si(n).length;for(var t in n)if(ln.call(n,t))return!1;return!0}function P_(n,e){return bt(n,e)}function $_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?bt(n,e,o,t):!!r}function Qi(n){if(!xn(n))return!1;var e=Wn(n);return e==Gt||e==el||typeof n.message=="string"&&typeof n.name=="string"&&!Bt(n)}function B_(n){return typeof n=="number"&&fs(n)}function Ce(n){if(!wn(n))return!1;var e=Wn(n);return e==zt||e==gu||e==nl||e==rl}function To(n){return typeof n=="number"&&n==W(n)}function Tr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=he}function wn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function xn(n){return n!=null&&typeof n=="object"}var Oo=Hu?zn(Hu):Ua;function W_(n,e){return n===e||Li(n,e,Gi(e))}function F_(n,e,t){return t=typeof t=="function"?t:o,Li(n,e,Gi(e),t)}function M_(n){return Po(n)&&n!=+n}function U_(n){if(xc(n))throw new T(Q);return As(n)}function D_(n){return n===null}function N_(n){return n==null}function Po(n){return typeof n=="number"||xn(n)&&Wn(n)==dt}function Bt(n){if(!xn(n)||Wn(n)!=ve)return!1;var e=rr(n);if(e===null)return!0;var t=ln.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&jt.call(t)==Ff}var ji=ku?zn(ku):Da;function K_(n){return To(n)&&n>=-he&&n<=he}var $o=qu?zn(qu):Na;function Or(n){return typeof n=="string"||!O(n)&&xn(n)&&Wn(n)==vt}function kn(n){return typeof n=="symbol"||xn(n)&&Wn(n)==Ht}var lt=Vu?zn(Vu):Ka;function G_(n){return n===o}function z_(n){return xn(n)&&$n(n)==mt}function H_(n){return xn(n)&&Wn(n)==ul}var k_=xr(Ri),q_=xr(function(n,e){return n<=e});function Bo(n){if(!n)return[];if(Dn(n))return Or(n)?se(n):Un(n);if(xt&&n[xt])return Cf(n[xt]());var e=$n(n),t=e==ie?pi:e==ue?Xt:ft;return t(n)}function Le(n){if(!n)return n===0?n:0;if(n=te(n),n===ge||n===-ge){var e=n<0?-1:1;return e*Kr}return n===n?n:0}function W(n){var e=Le(n),t=e%1;return e===e?t?e-t:e:0}function Wo(n){return n?Ke(W(n),0,Zn):0}function te(n){if(typeof n=="number")return n;if(kn(n))return Sn;if(wn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=wn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=ju(n);var t=Sl.test(n);return t||El.test(n)?of(n.slice(2),t?2:8):Ll.test(n)?Sn:+n}function Fo(n){return pe(n,Nn(n))}function V_(n){return n?Ke(W(n),-he,he):n===0?n:0}function tn(n){return n==null?"":Hn(n)}var Z_=ut(function(n,e){if(Pt(e)||Dn(e)){pe(e,Rn(e),n);return}for(var t in e)ln.call(e,t)&&St(n,t,e[t])}),Mo=ut(function(n,e){pe(e,Nn(e),n)}),Pr=ut(function(n,e,t,r){pe(e,Nn(e),n,r)}),Y_=ut(function(n,e,t,r){pe(e,Rn(e),n,r)}),X_=Ae(yi);function J_(n,e){var t=it(n);return e==null?t:ps(t,e)}var Q_=N(function(n,e){n=hn(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&Fn(e[0],e[1],i)&&(r=1);++t1),s}),pe(n,Ni(n),t),r&&(t=jn(t,J|yn|Z,fc));for(var i=e.length;i--;)Pi(t,e[i]);return t});function gp(n,e){return Do(n,br(C(e)))}var vp=Ae(function(n,e){return n==null?{}:Ha(n,e)});function Do(n,e){if(n==null)return{};var t=mn(Ni(n),function(r){return[r]});return e=C(e),bs(n,t,function(r,i){return e(r,i[0])})}function mp(n,e,t){e=Be(e,n);var r=-1,i=e.length;for(i||(i=1,n=o);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=as();return Pn(n+i*(e-n+sf("1e-"+((i+"").length-1))),e)}return bi(n,e)}var bp=st(function(n,e,t){return e=e.toLowerCase(),n+(t?Go(e):e)});function Go(n){return tu(tn(n).toLowerCase())}function zo(n){return n=tn(n),n&&n.replace(Tl,wf).replace(Yl,"")}function Tp(n,e,t){n=tn(n),e=Hn(e);var r=n.length;t=t===o?r:Ke(W(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function Op(n){return n=tn(n),n&&al.test(n)?n.replace(wu,yf):n}function Pp(n){return n=tn(n),n&&gl.test(n)?n.replace(Jr,"\\$&"):n}var $p=st(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Bp=st(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),Wp=ks("toLowerCase");function Fp(n,e,t){n=tn(n),e=W(e);var r=e?je(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return yr(or(i),t)+n+yr(sr(i),t)}function Mp(n,e,t){n=tn(n),e=W(e);var r=e?je(n):0;return e&&r>>0,t?(n=tn(n),n&&(typeof e=="string"||e!=null&&!ji(e))&&(e=Hn(e),!e&&Qe(n))?We(se(n),0,t):n.split(e,t)):[]}var Hp=st(function(n,e,t){return n+(t?" ":"")+tu(e)});function kp(n,e,t){return n=tn(n),t=t==null?0:Ke(W(t),0,n.length),e=Hn(e),n.slice(t,t+e.length)==e}function qp(n,e,t){var r=u.templateSettings;t&&Fn(n,e,t)&&(e=o),n=tn(n),e=Pr({},e,r,Qs);var i=Pr({},e.imports,r.imports,Qs),s=Rn(i),l=_i(i,s),f,c,p=0,d=e.interpolate||kt,g="__p += '",m=di((e.escape||kt).source+"|"+d.source+"|"+(d===yu?Cl:kt).source+"|"+(e.evaluate||kt).source+"|$","g"),I="//# sourceURL="+(ln.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nf+"]")+` -`;n.replace(m,function(S,z,Y,qn,Mn,Vn){return Y||(Y=qn),g+=n.slice(p,Vn).replace(Ol,xf),z&&(f=!0,g+=`' + -__e(`+z+`) + -'`),Mn&&(c=!0,g+=`'; -`+Mn+`; -__p += '`),Y&&(g+=`' + -((__t = (`+Y+`)) == null ? '' : __t) + -'`),p=Vn+S.length,S}),g+=`'; -`;var L=ln.call(e,"variable")&&e.variable;if(!L)g=`with (obj) { -`+g+` -} -`;else if(Al.test(L))throw new T(X);g=(c?g.replace(sl,""):g).replace(ol,"$1").replace(ll,"$1;"),g="function("+(L||"obj")+`) { -`+(L?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(f?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+g+`return __p -}`;var M=ko(function(){return j(s,I+"return "+g).apply(o,l)});if(M.source=g,Qi(M))throw M;return M}function Vp(n){return tn(n).toLowerCase()}function Zp(n){return tn(n).toUpperCase()}function Yp(n,e,t){if(n=tn(n),n&&(t||e===o))return ju(n);if(!n||!(e=Hn(e)))return n;var r=se(n),i=se(e),s=ns(r,i),l=es(r,i)+1;return We(r,s,l).join("")}function Xp(n,e,t){if(n=tn(n),n&&(t||e===o))return n.slice(0,rs(n)+1);if(!n||!(e=Hn(e)))return n;var r=se(n),i=es(r,se(e))+1;return We(r,0,i).join("")}function Jp(n,e,t){if(n=tn(n),n&&(t||e===o))return n.replace(Qr,"");if(!n||!(e=Hn(e)))return n;var r=se(n),i=ns(r,se(e));return We(r,i).join("")}function Qp(n,e){var t=F,r=Tn;if(wn(e)){var i="separator"in e?e.separator:i;t="length"in e?W(e.length):t,r="omission"in e?Hn(e.omission):r}n=tn(n);var s=n.length;if(Qe(n)){var l=se(n);s=l.length}if(t>=s)return n;var f=t-je(r);if(f<1)return r;var c=l?We(l,0,f).join(""):n.slice(0,f);if(i===o)return c+r;if(l&&(f+=c.length-f),ji(i)){if(n.slice(f).search(i)){var p,d=c;for(i.global||(i=di(i.source,tn(xu.exec(i))+"g")),i.lastIndex=0;p=i.exec(d);)var g=p.index;c=c.slice(0,g===o?f:g)}}else if(n.indexOf(Hn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function jp(n){return n=tn(n),n&&fl.test(n)?n.replace(mu,Ef):n}var nd=st(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),tu=ks("toUpperCase");function Ho(n,e,t){return n=tn(n),e=t?o:e,e===o?If(n)?Of(n):pf(n):n.match(e)||[]}var ko=N(function(n,e){try{return Gn(n,o,e)}catch(t){return Qi(t)?t:new T(t)}}),ed=Ae(function(n,e){return Xn(e,function(t){t=de(t),ye(n,t,Xi(n[t],n))}),n});function td(n){var e=n==null?0:n.length,t=C();return n=e?mn(n,function(r){if(typeof r[1]!="function")throw new Jn(x);return[t(r[0]),r[1]]}):[],N(function(r){for(var i=-1;++ihe)return[];var t=Zn,r=Pn(n,Zn);e=C(e),n-=Zn;for(var i=hi(r,e);++t0||e<0)?new q(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=W(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},q.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},q.prototype.toArray=function(){return this.take(Zn)},_e(q.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],s=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,f=r?[1]:arguments,c=l instanceof q,p=f[0],d=c||O(l),g=function(z){var Y=i.apply(u,be([z],f));return r&&m?Y[0]:Y};d&&t&&typeof p=="function"&&p.length!=1&&(c=d=!1);var m=this.__chain__,I=!!this.__actions__.length,L=s&&!m,M=c&&!I;if(!s&&d){l=M?l:new q(this);var S=n.apply(l,f);return S.__actions__.push({func:Lr,args:[g],thisArg:o}),new Qn(S,m)}return L&&M?n.apply(this,f):(S=this.thru(g),L?r?S.value()[0]:S.value():S)})}),Xn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Jt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var s=this.value();return e.apply(O(s)?s:[],i)}return this[t](function(l){return e.apply(O(l)?l:[],i)})}}),_e(q.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";ln.call(rt,r)||(rt[r]=[]),rt[r].push({name:e,func:t})}}),rt[mr(o,G).name]=[{name:"wrapper",func:o}],q.prototype.clone=jf,q.prototype.reverse=na,q.prototype.value=ea,u.prototype.at=Th,u.prototype.chain=Oh,u.prototype.commit=Ph,u.prototype.next=$h,u.prototype.plant=Wh,u.prototype.reverse=Fh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Mh,u.prototype.first=u.prototype.head,xt&&(u.prototype[xt]=Bh),u},nt=Pf();Me?((Me.exports=nt)._=nt,ii._=nt):En._=nt}).call(Wt)})(Fr,Fr.exports);var uv=Fr.exports;const sv=qd(uv),Dr=P=>(pu("data-v-9f29f2ff"),P=P(),du(),P),ov={class:"my-order"},lv=Dr(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),fv={class:"nav-item-input"},av={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},cv=["onClick"],hv={class:"shop-name"},_v={key:0,class:"shop-price"},pv=Dr(()=>v("span",{class:"unit-name"},"活动价:",-1)),dv={key:0,class:"unit-name"},gv={key:1,class:"shop-price"},vv=Dr(()=>v("span",{class:"unit-name"},"原价: ",-1)),mv={class:"unit-name del"},wv={key:2,class:"shop-price"},yv={class:"unit-name"},xv={key:3,class:"no-stock-re"},Av=Dr(()=>v("div",null,[v("span",null,"次日提")],-1)),Iv=[Av],Cv={key:1,class:"no-data"},Lv={__name:"shop",props:{storeList:{type:Array,default:()=>[]},priceKey:{type:Object,default:()=>({})},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(P,{expose:y,emit:o}){const E=R(null),V=o,Q=R(""),x=()=>{V("loadMore",{store_name:Q.value})},X=A=>{V("changeItem",A)},_n=sv.throttle(()=>{let A={store_name:Q.value};V("getStoreList",A,!0)},300);y({name:Q,inputBlur:()=>{var A;(A=E.value)==null||A.blur()}});const en=R(!1),J=()=>{en.value=!0},yn=()=>{en.value=!1},Z=()=>{var A;(A=E.value)==null||A.focus()};return Dt(()=>{hu(()=>{var A;(A=E.value)==null||A.focus(),J()}),re.on("shift",Z)}),Nt(()=>{re.off("shift",Z)}),(A,sn)=>{const B=un("CircleClose"),G=un("el-icon"),on=un("el-input"),H=un("Search"),an=un("el-button"),pn=un("el-image"),k=un("el-space"),b=un("el-empty"),gn=Ft("loading"),$=Ft("infinite-scroll");return D(),nn("div",ov,[v("div",{class:Wr(["header-nav",{"input-focus":en.value}])},[lv,v("div",fv,[U(on,{modelValue:Q.value,"onUpdate:modelValue":sn[1]||(sn[1]=F=>Q.value=F),placeholder:"搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",ref_key:"codeRef",ref:E,onFocus:J,onBlur:yn,onKeyup:Xo($r(_n),["enter"]),onClear:$r(_n),style:{"font-size":"1rem"}},{suffix:cn(()=>[Q.value!=""?(D(),Re(G,{key:0,size:"28",onClick:sn[0]||(sn[0]=F=>Q.value=""),style:{cursor:"pointer","margin-right":"1rem"}},{default:cn(()=>[U(B)]),_:1})):ae("",!0)]),_:1},8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:sn[2]||(sn[2]=(...F)=>$r(_n)&&$r(_n)(...F))},[U(an,{class:"btn",type:"primary"},{default:cn(()=>[U(G,null,{default:cn(()=>[U(H)]),_:1})]),_:1})])],2),_u((D(),nn("div",av,[P.storeList.length?(D(),Re(k,{key:0,wrap:"",size:14},{default:cn(()=>[(D(!0),nn(Mt,null,Ut(P.storeList,(F,Tn)=>(D(),nn("div",{class:"shop-item",key:Tn,onClick:On=>X(F)},[U(pn,{loading:"lazy",src:F.image},null,8,["src"]),v("div",hv,K(F.store_name),1),P.priceKey.off_activity==1?(D(),nn("div",_v,[pv,rn(" ¥"),v("span",null,K(F[P.priceKey.price]),1),F.unit_name?(D(),nn("span",dv,"/"+K(F.unit_name),1)):ae("",!0)])):ae("",!0),P.priceKey.off_activity==1?(D(),nn("div",gv,[vv,rn(),v("span",mv,"¥"+K(F[P.priceKey.op_price])+" /"+K(F.unit_name),1)])):(D(),nn("div",wv,[rn(" ¥"),v("span",null,K(F[P.priceKey.op_price]),1),v("span",yv,"/"+K(F.unit_name),1)])),F.stock<=0?(D(),nn("div",xv,Iv)):ae("",!0)],8,cv))),128))]),_:1})):ae("",!0),P.storeList.length?ae("",!0):(D(),nn("div",Cv,[U(b,{"image-size":200,description:"没有找到对应商品"})]))])),[[gn,P.loading],[$,x]])])}}},Sv=ct(Lv,[["__scopeId","data-v-9f29f2ff"]]),Jo=P=>(pu("data-v-6c040b11"),P=P(),du(),P),Rv={class:"shop"},Ev={class:"shop-info"},bv={class:"shop-info-left"},Tv={class:"shop-info-right"},Ov={class:"shop-info-right-top"},Pv={key:0,class:"shop-info-right-price"},$v=Jo(()=>v("span",{class:"unit-name"},"活动价:",-1)),Bv={key:0,class:"unit-name"},Wv={key:1,class:"shop-info-right-price"},Fv=Jo(()=>v("span",{class:"unit-name"},"原价: ",-1)),Mv={class:"unit-name del"},Uv={key:2,class:"shop-info-right-price"},Dv={class:"unit-name"},Nv={class:"shop-sku"},Kv={class:"title"},Gv={class:"sku"},zv={class:"dialog-footer"},Hv={__name:"pupop",props:{priceKey:{type:Object,default:()=>({})}},emits:["changeItem"],setup(P,{expose:y,emit:o}){const E=R(!1),V=R(null),Q=Z=>{E.value=Z},x=R({}),X=R(!1),_n=R("add"),fn=(Z,A="add")=>{_n.value=A,x.value=JSON.parse(JSON.stringify(Z))},en=o,J=()=>{x.value.cart_num||(x.value.cart_num=x.value.batch>0?x.value.batch:1),en("changeItem",x.value),E.value=!1};y({show:Q,setForm:fn});const yn=()=>{E.value&&J()};return Dt(()=>{re.on("enter",yn)}),Nt(()=>{re.off("enter",yn)}),(Z,A)=>{const sn=un("el-image"),B=un("el-input-number"),G=un("el-button"),on=un("el-dialog"),H=Ft("loading");return D(),Re(on,{modelValue:E.value,"onUpdate:modelValue":A[1]||(A[1]=an=>E.value=an),title:"购买数量",width:"650",onOpened:A[2]||(A[2]=an=>V.value.focus())},Vd({default:cn(()=>[_u((D(),nn("div",Rv,[v("div",Ev,[v("div",bv,[U(sn,{loading:"lazy",src:x.value.image},null,8,["src"])]),v("div",Tv,[v("div",Ov,K(x.value.store_name),1),v("div",null,[P.priceKey.off_activity==1?(D(),nn("div",Pv,[$v,rn(" ¥"),v("span",null,K(x.value[P.priceKey.price]),1),x.value.unit_name?(D(),nn("span",Bv,"/"+K(x.value.unit_name),1)):ae("",!0)])):ae("",!0),P.priceKey.off_activity==1?(D(),nn("div",Wv,[Fv,rn(),v("span",Mv,"¥"+K(x.value[P.priceKey.op_price])+" /"+K(x.value.unit_name),1)])):(D(),nn("div",Uv,[rn(" ¥"),v("span",null,K(x.value[P.priceKey.op_price]),1),v("span",Dv,"/"+K(x.value.unit_name),1)]))])])]),v("div",Nv,[v("div",Kv,"购买数量 ( "+K(x.value.unit_name)+" )",1),v("div",Gv,[U(B,{ref_key:"inputRef",ref:V,modelValue:x.value.cart_num,"onUpdate:modelValue":A[0]||(A[0]=an=>x.value.cart_num=an),placeholder:`请输入数量(默认为${+x.value.batch>0?x.value.batch:"1"})`,min:+x.value.batch>0?+x.value.batch:1,"step-strictly":"",step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue","placeholder","min"])])])])),[[H,X.value]])]),_:2},[_n.value!="add"&&x.value.attr&&x.value.attr.length==1?void 0:{name:"footer",fn:cn(()=>[v("div",zv,[U(G,{class:"ok-btn",type:"primary",onClick:J},{default:cn(()=>[rn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},kv=ct(Hv,[["__scopeId","data-v-6c040b11"]]),qv=["onClick","onMousemove"],Vv=["onMousemove"],Zv={class:"title"},Yv={class:"list"},Xv=["onClick"],Jv={__name:"classify",emits:["getStoreList"],setup(P,{emit:y}){const o=y,E=R([]),V=R([]),Q=R([]),x=R(-1),X=R(-1),_n=R(-1),fn=R(-1),en=R(!1),J=Ur();(()=>{au({pid:0,page_no:1,page_size:30,level:1,store_id:J.userInfo.store_id}).then(B=>{E.value=B.data.lists,x.value=-1})})();const Z=B=>{au({pid:B,page_no:1,page_size:30,level:2,store_id:J.userInfo.store_id}).then(G=>{V.value=G.data.lists})},A=B=>{au({pid:B,page_no:1,page_size:30,level:3,store_id:J.userInfo.store_id}).then(G=>{Q.value=G.data.lists})},sn=(B=-1,G=1)=>{fn.value=B,en.value=!0;let on="";console.log(B,G),G==1?(x.value=B,X.value=-1,_n.value=-1,B!=-1&&(on=E.value[B].id),Z(on),o("getStoreList",{top_cate_id:on,two_cate_id:null},!0)):G==2&&(X.value=B,_n.value=-1,B!=-1&&(on=V.value[B].id),A(on),o("getStoreList",{two_cate_id:on},!0))};return(B,G)=>{const on=un("el-popover");return D(),nn("div",{class:"classify",onMouseout:G[2]||(G[2]=H=>en.value?en.value=!1:en.value=!0)},[v("div",{class:Wr(["itemP",{"itemP-active":x.value==-1}]),onClick:G[0]||(G[0]=H=>sn(-1))},K("全部"),2),(D(!0),nn(Mt,null,Ut(E.value,(H,an)=>(D(),Re(on,{placement:"left",width:"20rem",trigger:"click",key:an,visible:an==x.value&&fn.value==an},{reference:cn(()=>[v("div",{class:Wr(["itemP",{"itemP-active":an==x.value}]),onClick:pn=>sn(an),onMousemove:pn=>fn.value=an},K(H.name),43,qv)]),default:cn(()=>[v("div",{class:"active-card",onMouseout:G[1]||(G[1]=pn=>fn.value=-1),onMousemove:pn=>fn.value=an},[v("div",Zv,K(H.name),1),v("div",Yv,[(D(!0),nn(Mt,null,Ut(V.value,(pn,k)=>(D(),nn("div",{class:Wr({"list-active":k==X.value}),link:"",type:"primary",key:pn.id,onClick:b=>sn(k,2)},K(pn.name),11,Xv))),128))])],40,Vv)]),_:2},1032,["visible"]))),128))],32)}}},Qv=ct(Jv,[["__scopeId","data-v-4d5623b0"]]),Mr=class Mr{constructor(){fu(this,"loadingInstance",null)}static getInstance(){return this.instance??(this.instance=new Mr)}msg(y){qe.info(y)}msgError(y){y!=="Network Error"&&qe.error(y)}msgSuccess(y){qe.success(y)}msgWarning(y){qe.warning(y)}alert(y){at.alert(y,"系统提示")}alertError(y){at.alert(y,"系统提示",{type:"error"})}alertSuccess(y){at.alert(y,"系统提示",{type:"success"})}alertWarning(y){at.alert(y,"系统提示",{type:"warning"})}notify(y){Br.info(y)}notifyError(y){Br.error(y)}notifySuccess(y){Br.success(y)}notifyWarning(y){Br.warning(y)}confirm(y){return at.confirm(y,"温馨提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"})}prompt(y,o,E){return at.prompt(y,o,{confirmButtonText:"确定",cancelButtonText:"取消",...E})}loading(y){this.loadingInstance=Zd.service({lock:!0,text:y})}closeLoading(){var y;(y=this.loadingInstance)==null||y.close()}};fu(Mr,"instance",null);let cu=Mr;const jv=cu.getInstance(),n1={class:"my-card"},h1={__name:"index",setup(P){const y=R(null),o=R(null),E=R(null),V=R(null),Q=R([]),x=Yd({off_activity:"",op_price:"",price:""}),X=Ur(),_n=Xd(),fn=R({page_no:1,page_size:30}),en=R(!1),J=(b={},gn=!1)=>{var $;fn.value={...fn.value,...b},console.log("===",b,fn.value),gn&&(Q.value=[],fn.value.page_no=1,yn.value=!1),b.top_cate_id===""&&(fn.value.store_name=null),en.value=!0,Qd({...fn.value,store_id:($=X.userInfo)==null?void 0:$.store_id}).then(F=>{var Tn,On;en.value=!1;for(let Bn in F.data.extend)x[Bn]=F.data.extend[Bn];((On=(Tn=F.data)==null?void 0:Tn.lists)==null?void 0:On.length){yn.value||J(b)};function A(b){return/^\d+$/.test(b)}const sn=(b,gn="")=>{console.log(b,gn);let $={product_id:b.product_id,cart_num:b.cart_num};Yo($).then(F=>{o.value.getList()})},B=(b,gn)=>{y.value.setForm(b,"add"),y.value.show(!0)},G=b=>{y.value.setForm(b,"edit"),y.value.show(!0)},on=R({}),H=async()=>{var F,Tn;let b=o.value.list.map(On=>On.id),gn={cart_id:b,uid:((Tn=(F=o.value)==null?void 0:F.userInfo)==null?void 0:Tn.uid)||""},{data:$}=await Hd(gn);$.reservation>0&&await jv.confirm("部分商品暂无现货, 需要次日提货, 是否确认购买?"),o.value.discounts>0&&(gn.deduction_price=o.value.discounts.toFixed(2),gn.pay_type="micropay"),kd(gn).then(On=>{var Bn,ce,Ve;on.value=On.data.order,V.value.setForm({data:On.data.order,reservation:$.reservation,cart_id:b,uid:((ce=(Bn=o.value)==null?void 0:Bn.userInfo)==null?void 0:ce.uid)||"",is_storage:(Ve=o.value)!=null&&Ve.is_storage?1:0})}),V.value.drawer=!0},an=()=>{var b,gn,$;if((b=o.value)!=null&&b.is_storage&&!(($=(gn=o.value)==null?void 0:gn.userInfo)!=null&&$.uid))return qe.error("选择用户才可以存货");H()},pn=(b=null)=>{setTimeout(()=>{o.value.resetView()})},k=()=>{_n.name=="saleHome"&&(!V.value.drawer&&o.value.list.length>0?an():V.value.beforeClose())};return Dt(()=>{J(),re.on("F9",k)}),Nt(()=>{re.off("F9",k)}),(b,gn)=>(D(),nn("div",n1,[U(iv,{ref_key:"orderRef",ref:o,onGoPay:an,onEditPupop:G},null,512),U(Zo),U(Sv,{ref_key:"shopRef",ref:E,style:{flex:"1"},storeList:Q.value,priceKey:x,loading:en.value,onGetStoreList:J,onChangeItem:B,onLoadMore:Z},null,8,["storeList","priceKey","loading"]),U(kv,{ref_key:"pupopRef",ref:y,priceKey:x,onChangeItem:sn},null,8,["priceKey"]),U(Zo),U(Qv,{ref:"classifyRef",onGetStoreList:J},null,512),U(jd,{ref_key:"payRef",ref:V,onPaySuccess:pn},null,512)]))}};export{h1 as default}; diff --git a/build/assets/index-DHa9WNzO.js b/build/assets/index-BgHURwU7.js similarity index 98% rename from build/assets/index-DHa9WNzO.js rename to build/assets/index-BgHURwU7.js index de061fb..d4e0ccf 100644 --- a/build/assets/index-DHa9WNzO.js +++ b/build/assets/index-BgHURwU7.js @@ -1 +1 @@ -import{_ as G,u as H,r as n,o as J,m as D,a as Q,b as u,h as I,c as s,k as o,e,f as d,w as p,g as b,d as F,p as m,i as oe,j as O,F as E,l as K,z as j,t as l,q as W,s as X,I as ae}from"./index-C1UYAdzy.js";import{d as ie,e as le}from"./store-DOG1V_EV.js";import{h as q}from"./moment-Cl4UOzQZ.js";import{p as ne}from"./pay-D1eDcnTc.js";import{p as de}from"./padding-B7CJVLVc.js";import"./authCode-5Ni0CM1g.js";/* empty css */const _e=f=>(W("data-v-bf6504fc"),f=f(),X(),f),ce={class:"my-order"},re={class:"header-nav"},ue=_e(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),ve={class:"nav-item-btn"},pe={class:"header-input"},fe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},me=["onClick"],he={class:"top"},ye={class:"create-time"},ge={class:"shop"},ke={key:0,class:"left"},be={key:0,class:"shop-name"},$e={class:"right"},we={class:"money"},Ce={class:"count"},De={class:"bottom"},Se={class:"pay"},Ve={key:0},Ye={key:1},xe={key:2},ze={key:3},Pe={key:4},Ie={key:5},Re={key:1,style:{color:"#ff4a00"}},Me={key:0,class:"load-end"},Le={key:1,class:"load-end"},Be={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f,{expose:w}){H(),n([]);const t=n(1),h=r=>{_.value.page_no=1,$.value=!1,g.value=!1,c.value=[],k(!0)};n(null);const y=n(""),R=()=>{_.value.start_time=q(y.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=q(y.value[1]).format("YYYY-MM-DD 23:59:59"),k(!0)},S=r=>r.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),g=n(!1),M=n(0),C=n(0),$=n(!1),c=n([]),k=(r=!1)=>{if(r)_.value.page_no=1;else if($.value||g.value)return;g.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),ie(_.value).then(i=>{r?c.value=i.data.lists:c.value=[...c.value,...i.data.lists],_.value.page_no==1&&c.value.length>0&&D.emit("set-sale-order-detail",c.value[0]),i.data.lists.length<_.value.page_size?$.value=!0:_.value.page_no++,C.value=0,console.log(_.value.page_no),M.value=i.data.count,g.value=!1}).catch(i=>{$.value=!0,g.value=!1})},L=(r,i)=>{C.value=i,D.emit("set-sale-order-detail",r)};return w({getOrderList:k}),J(()=>{D.on("update-sale-order-detail",r=>{console.log("==="),c.value[C.value].paid=1})}),Q(()=>{D.off("update-sale-order-detail")}),(r,i)=>{const V=u("el-radio-button"),B=u("el-radio-group"),N=u("el-date-picker"),T=u("CircleClose"),Y=u("el-icon"),x=u("el-button"),z=u("el-input"),P=u("el-image"),Z=u("spna"),ee=I("loading"),te=I("infinite-scroll");return s(),o("div",ce,[e("div",re,[ue,e("div",ve,[d(B,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),onChange:h,size:"small"},{default:p(()=>[d(V,{value:1},{default:p(()=>[b("全部")]),_:1}),d(V,{value:2},{default:p(()=>[b("未支付")]),_:1})]),_:1},8,["modelValue"]),d(N,{modelValue:y.value,"onUpdate:modelValue":i[1]||(i[1]=a=>y.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":S,onChange:R,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",pe,[d(z,{modelValue:_.value.order_id,"onUpdate:modelValue":i[4]||(i[4]=a=>_.value.order_id=a),placeholder:"请输入订单编号",onKeydown:i[5]||(i[5]=oe(a=>k(!0),["enter"])),onClear:i[6]||(i[6]=a=>k(!0))},{suffix:p(()=>[_.value.order_id!=""?(s(),F(Y,{key:0,size:"18",onClick:i[2]||(i[2]=a=>{_.value.order_id="",k(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:p(()=>[d(T)]),_:1})):m("",!0)]),append:p(()=>[d(x,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[3]||(i[3]=a=>k(!0))},{default:p(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),O((s(),o("div",fe,[(s(!0),o(E,null,K(c.value,(a,U)=>(s(),o("div",{class:j(["item",{"item-active":C.value==U}]),key:U,onClick:A=>L(a,U)},[e("div",he,[e("div",{class:j(["sn","cahier"])},"单号: "+l(a.order_id),1),e("div",ye,l(a.pay_time),1)]),e("div",ge,[a.product_info?(s(),o("div",ke,[(s(!0),o(E,null,K(a.product_info.slice(0,5),(A,se)=>(s(),F(P,{key:se,src:A.image,class:"shop-img"},null,8,["src"]))),128)),a.product_info.length==1?(s(),o("div",be,l(a.product_info[0].store_name),1)):m("",!0)])):m("",!0),e("div",$e,[e("div",we,"¥"+l(a.pay_price),1),e("div",Ce,"共"+l(a.total_num)+"款商品",1)])]),e("div",De,[e("div",Se,[a.paid?(s(),o("div",Ve,[b(l(a.paid_name)+" ",1),a.pay_type_name?(s(),F(Z,{key:0},{default:p(()=>[b("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",Ye,"(微信收款)")):a.pay_type==17?(s(),o("span",xe,"(现金支付)")):a.pay_type==13?(s(),o("span",ze,"(支付宝收款)")):a.pay_type==3?(s(),o("span",Pe,"(余额支付)")):a.pay_type==1?(s(),o("span",Ie,"(微信支付)")):m("",!0)])):(s(),o("div",Re,l(a.paid_name),1))])])],10,me))),128)),$.value?(s(),o("div",Me,"没有更多了")):m("",!0),g.value?(s(),o("div",Le,"加载中...")):m("",!0)])),[[ee,g.value],[te,k]])])}}},Ne=G(Be,[["__scopeId","data-v-bf6504fc"]]),v=f=>(W("data-v-b5c92dd9"),f=f(),X(),f),Te={class:"my-order"},Ue={key:0,class:"detail"},Fe={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Oe=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Ae={class:"table-info"},Ee={class:"info-item"},Ke=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},Ge=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),He={class:"info-item-info"},Je={class:"info-item"},Qe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),We={class:"info-item-info"},Xe={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"},at={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},rt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ut={class:"info-item-info"},vt={key:0},pt={key:1},ft={key:2},mt={key:3},ht={key:4},yt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info"},bt={class:"info-item"},$t=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),wt={class:"info-item-info"},Ct={class:"info-item"},Dt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),St={class:"info-item-info"},Vt={class:"info-item"},Yt=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),xt={class:"info-item-info"},zt={style:{"font-size":"0.9rem"}},Pt={style:{color:"#ff4a00"}},It={style:{display:"flex","align-items":"center"}},Rt={style:{"margin-left":"0.5rem"}},Mt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),Lt={key:0,class:"footer"},Bt={key:1},Nt={__name:"detail",emits:["rePaySuccess"],setup(f,{emit:w}){H(),ae();const t=n({id:""});n([]);const h=n(null),y=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const R=()=>{h.value.setForm({isRePay:!0,data:t.value}),h.value.drawer=!0},S=n({page_no:1,page_size:15,loadend:!1,loading:!1}),_=n([]),g=()=>console.log("触底"),M=()=>{y.value=!0,le({id:t.value.id}).then(c=>{t.value=c.data,setTimeout(()=>{y.value=!1},200)})},C=w,$=(c=null)=>{setTimeout(()=>{C("rePaySuccess")})};return J(()=>{D.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,S.value.page_no=1,S.value.loadend=!1,S.value.loading=!1,_.value=[],M()})}),Q(()=>{D.off("set-sale-order-detail")}),(c,k)=>{var Y;const L=u("el-image"),r=u("el-table-column"),i=u("el-table"),V=u("el-button"),B=u("el-empty"),N=I("infinite-scroll"),T=I("loading");return s(),o("div",Te,[t.value.id?O((s(),o("div",Ue,[O((s(),o("div",Fe,[Oe,e("div",Ae,[e("div",Ee,[Ke,e("div",je,l(t.value.order_id),1)]),e("div",qe,[Ge,e("div",He,l(t.value.total_num||0),1)]),e("div",Je,[Qe,e("div",We,"¥"+l(t.value.pay_price),1)]),e("div",Xe,[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",at,[it,e("div",lt,"¥"+l(t.value.pay_price),1)]),e("div",nt,[dt,e("div",_t,l(t.value.pay_time),1)]),e("div",ct,[rt,e("div",ut,[t.value.pay_type_name?(s(),o("span",vt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",pt,"微信收款")):t.value.pay_type==17?(s(),o("span",ft,"现金支付")):t.value.pay_type==13?(s(),o("span",mt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ht,"余额支付")):t.value.pay_type==1?(s(),o("span",yt,"微信支付")):m("",!0)])])]),t.value.uid?(s(),o("div",gt,"用户信息")):m("",!0),t.value.uid?(s(),o("div",kt,[e("div",bt,[$t,e("div",wt,l(t.value.uid),1)]),e("div",Ct,[Dt,e("div",St,l(t.value.nickname),1)]),e("div",Vt,[Yt,e("div",xt,l(t.value.mobile),1)])])):m("",!0),e("div",zt,[b(" 共计 "),e("span",Pt,l(((Y=t.value.product)==null?void 0:Y.length)||" "),1),b(" 款商品 ")]),d(i,{data:t.value.product},{default:p(()=>[d(r,{label:"商品信息"},{default:p(({row:x})=>{var z,P;return[e("div",It,[d(L,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(z=x.cart_info)==null?void 0:z.image},null,8,["src"]),e("span",Rt,l((P=x.cart_info)==null?void 0:P.name),1)])]}),_:1}),d(r,{prop:"cart_info.price",label:"单价",width:"150"}),d(r,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(r,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Mt])),[[N,g]]),t.value.paid?m("",!0):(s(),o("div",Lt,[d(V,{type:"primary",size:"large",onClick:R},{default:p(()=>[b("重新支付")]),_:1})]))])),[[T,y.value]]):(s(),o("div",Bt,[d(B)])),d(ne,{ref_key:"payRef",ref:h,onPaySuccess:$},null,512)])}}},Tt=G(Nt,[["__scopeId","data-v-b5c92dd9"]]),Ut={class:"my-card"},Gt={__name:"index",setup(f){const w=n(null),t=()=>{var h;(h=w.value)==null||h.getOrderList(!0)};return(h,y)=>(s(),o("div",Ut,[d(Ne,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:w},null,512),d(de),d(Tt,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{Gt as default}; +import{_ as G,u as H,r as n,o as J,m as D,a as Q,b as u,h as I,c as s,k as o,e,f as d,w as p,g as b,d as F,p as m,i as oe,j as O,F as E,l as K,z as j,t as l,q as W,s as X,I as ae}from"./index-BnGigPfR.js";import{d as ie,e as le}from"./store-DOZFgKpz.js";import{h as q}from"./moment-Cl4UOzQZ.js";import{p as ne}from"./pay-BYJnRMtm.js";import{p as de}from"./padding-CO-3gQOa.js";import"./authCode-D1GYIlL-.js";/* empty css */const _e=f=>(W("data-v-bf6504fc"),f=f(),X(),f),ce={class:"my-order"},re={class:"header-nav"},ue=_e(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),ve={class:"nav-item-btn"},pe={class:"header-input"},fe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},me=["onClick"],he={class:"top"},ye={class:"create-time"},ge={class:"shop"},ke={key:0,class:"left"},be={key:0,class:"shop-name"},$e={class:"right"},we={class:"money"},Ce={class:"count"},De={class:"bottom"},Se={class:"pay"},Ve={key:0},Ye={key:1},xe={key:2},ze={key:3},Pe={key:4},Ie={key:5},Re={key:1,style:{color:"#ff4a00"}},Me={key:0,class:"load-end"},Le={key:1,class:"load-end"},Be={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f,{expose:w}){H(),n([]);const t=n(1),h=r=>{_.value.page_no=1,$.value=!1,g.value=!1,c.value=[],k(!0)};n(null);const y=n(""),R=()=>{_.value.start_time=q(y.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=q(y.value[1]).format("YYYY-MM-DD 23:59:59"),k(!0)},S=r=>r.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),g=n(!1),M=n(0),C=n(0),$=n(!1),c=n([]),k=(r=!1)=>{if(r)_.value.page_no=1;else if($.value||g.value)return;g.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),ie(_.value).then(i=>{r?c.value=i.data.lists:c.value=[...c.value,...i.data.lists],_.value.page_no==1&&c.value.length>0&&D.emit("set-sale-order-detail",c.value[0]),i.data.lists.length<_.value.page_size?$.value=!0:_.value.page_no++,C.value=0,console.log(_.value.page_no),M.value=i.data.count,g.value=!1}).catch(i=>{$.value=!0,g.value=!1})},L=(r,i)=>{C.value=i,D.emit("set-sale-order-detail",r)};return w({getOrderList:k}),J(()=>{D.on("update-sale-order-detail",r=>{console.log("==="),c.value[C.value].paid=1})}),Q(()=>{D.off("update-sale-order-detail")}),(r,i)=>{const V=u("el-radio-button"),B=u("el-radio-group"),N=u("el-date-picker"),T=u("CircleClose"),Y=u("el-icon"),x=u("el-button"),z=u("el-input"),P=u("el-image"),Z=u("spna"),ee=I("loading"),te=I("infinite-scroll");return s(),o("div",ce,[e("div",re,[ue,e("div",ve,[d(B,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),onChange:h,size:"small"},{default:p(()=>[d(V,{value:1},{default:p(()=>[b("全部")]),_:1}),d(V,{value:2},{default:p(()=>[b("未支付")]),_:1})]),_:1},8,["modelValue"]),d(N,{modelValue:y.value,"onUpdate:modelValue":i[1]||(i[1]=a=>y.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":S,onChange:R,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",pe,[d(z,{modelValue:_.value.order_id,"onUpdate:modelValue":i[4]||(i[4]=a=>_.value.order_id=a),placeholder:"请输入订单编号",onKeydown:i[5]||(i[5]=oe(a=>k(!0),["enter"])),onClear:i[6]||(i[6]=a=>k(!0))},{suffix:p(()=>[_.value.order_id!=""?(s(),F(Y,{key:0,size:"18",onClick:i[2]||(i[2]=a=>{_.value.order_id="",k(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:p(()=>[d(T)]),_:1})):m("",!0)]),append:p(()=>[d(x,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[3]||(i[3]=a=>k(!0))},{default:p(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),O((s(),o("div",fe,[(s(!0),o(E,null,K(c.value,(a,U)=>(s(),o("div",{class:j(["item",{"item-active":C.value==U}]),key:U,onClick:A=>L(a,U)},[e("div",he,[e("div",{class:j(["sn","cahier"])},"单号: "+l(a.order_id),1),e("div",ye,l(a.pay_time),1)]),e("div",ge,[a.product_info?(s(),o("div",ke,[(s(!0),o(E,null,K(a.product_info.slice(0,5),(A,se)=>(s(),F(P,{key:se,src:A.image,class:"shop-img"},null,8,["src"]))),128)),a.product_info.length==1?(s(),o("div",be,l(a.product_info[0].store_name),1)):m("",!0)])):m("",!0),e("div",$e,[e("div",we,"¥"+l(a.pay_price),1),e("div",Ce,"共"+l(a.total_num)+"款商品",1)])]),e("div",De,[e("div",Se,[a.paid?(s(),o("div",Ve,[b(l(a.paid_name)+" ",1),a.pay_type_name?(s(),F(Z,{key:0},{default:p(()=>[b("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",Ye,"(微信收款)")):a.pay_type==17?(s(),o("span",xe,"(现金支付)")):a.pay_type==13?(s(),o("span",ze,"(支付宝收款)")):a.pay_type==3?(s(),o("span",Pe,"(余额支付)")):a.pay_type==1?(s(),o("span",Ie,"(微信支付)")):m("",!0)])):(s(),o("div",Re,l(a.paid_name),1))])])],10,me))),128)),$.value?(s(),o("div",Me,"没有更多了")):m("",!0),g.value?(s(),o("div",Le,"加载中...")):m("",!0)])),[[ee,g.value],[te,k]])])}}},Ne=G(Be,[["__scopeId","data-v-bf6504fc"]]),v=f=>(W("data-v-b5c92dd9"),f=f(),X(),f),Te={class:"my-order"},Ue={key:0,class:"detail"},Fe={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Oe=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Ae={class:"table-info"},Ee={class:"info-item"},Ke=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},Ge=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),He={class:"info-item-info"},Je={class:"info-item"},Qe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),We={class:"info-item-info"},Xe={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"},at={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},rt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ut={class:"info-item-info"},vt={key:0},pt={key:1},ft={key:2},mt={key:3},ht={key:4},yt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info"},bt={class:"info-item"},$t=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),wt={class:"info-item-info"},Ct={class:"info-item"},Dt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),St={class:"info-item-info"},Vt={class:"info-item"},Yt=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),xt={class:"info-item-info"},zt={style:{"font-size":"0.9rem"}},Pt={style:{color:"#ff4a00"}},It={style:{display:"flex","align-items":"center"}},Rt={style:{"margin-left":"0.5rem"}},Mt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),Lt={key:0,class:"footer"},Bt={key:1},Nt={__name:"detail",emits:["rePaySuccess"],setup(f,{emit:w}){H(),ae();const t=n({id:""});n([]);const h=n(null),y=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const R=()=>{h.value.setForm({isRePay:!0,data:t.value}),h.value.drawer=!0},S=n({page_no:1,page_size:15,loadend:!1,loading:!1}),_=n([]),g=()=>console.log("触底"),M=()=>{y.value=!0,le({id:t.value.id}).then(c=>{t.value=c.data,setTimeout(()=>{y.value=!1},200)})},C=w,$=(c=null)=>{setTimeout(()=>{C("rePaySuccess")})};return J(()=>{D.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,S.value.page_no=1,S.value.loadend=!1,S.value.loading=!1,_.value=[],M()})}),Q(()=>{D.off("set-sale-order-detail")}),(c,k)=>{var Y;const L=u("el-image"),r=u("el-table-column"),i=u("el-table"),V=u("el-button"),B=u("el-empty"),N=I("infinite-scroll"),T=I("loading");return s(),o("div",Te,[t.value.id?O((s(),o("div",Ue,[O((s(),o("div",Fe,[Oe,e("div",Ae,[e("div",Ee,[Ke,e("div",je,l(t.value.order_id),1)]),e("div",qe,[Ge,e("div",He,l(t.value.total_num||0),1)]),e("div",Je,[Qe,e("div",We,"¥"+l(t.value.pay_price),1)]),e("div",Xe,[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",at,[it,e("div",lt,"¥"+l(t.value.pay_price),1)]),e("div",nt,[dt,e("div",_t,l(t.value.pay_time),1)]),e("div",ct,[rt,e("div",ut,[t.value.pay_type_name?(s(),o("span",vt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",pt,"微信收款")):t.value.pay_type==17?(s(),o("span",ft,"现金支付")):t.value.pay_type==13?(s(),o("span",mt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ht,"余额支付")):t.value.pay_type==1?(s(),o("span",yt,"微信支付")):m("",!0)])])]),t.value.uid?(s(),o("div",gt,"用户信息")):m("",!0),t.value.uid?(s(),o("div",kt,[e("div",bt,[$t,e("div",wt,l(t.value.uid),1)]),e("div",Ct,[Dt,e("div",St,l(t.value.nickname),1)]),e("div",Vt,[Yt,e("div",xt,l(t.value.mobile),1)])])):m("",!0),e("div",zt,[b(" 共计 "),e("span",Pt,l(((Y=t.value.product)==null?void 0:Y.length)||" "),1),b(" 款商品 ")]),d(i,{data:t.value.product},{default:p(()=>[d(r,{label:"商品信息"},{default:p(({row:x})=>{var z,P;return[e("div",It,[d(L,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(z=x.cart_info)==null?void 0:z.image},null,8,["src"]),e("span",Rt,l((P=x.cart_info)==null?void 0:P.name),1)])]}),_:1}),d(r,{prop:"cart_info.price",label:"单价",width:"150"}),d(r,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(r,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Mt])),[[N,g]]),t.value.paid?m("",!0):(s(),o("div",Lt,[d(V,{type:"primary",size:"large",onClick:R},{default:p(()=>[b("重新支付")]),_:1})]))])),[[T,y.value]]):(s(),o("div",Bt,[d(B)])),d(ne,{ref_key:"payRef",ref:h,onPaySuccess:$},null,512)])}}},Tt=G(Nt,[["__scopeId","data-v-b5c92dd9"]]),Ut={class:"my-card"},Gt={__name:"index",setup(f){const w=n(null),t=()=>{var h;(h=w.value)==null||h.getOrderList(!0)};return(h,y)=>(s(),o("div",Ut,[d(Ne,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:w},null,512),d(de),d(Tt,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{Gt as default}; diff --git a/build/assets/index-CAy1hogm.css b/build/assets/index-BjpCz5fK.css similarity index 81% rename from build/assets/index-CAy1hogm.css rename to build/assets/index-BjpCz5fK.css index 82e5ba9..09e144b 100644 --- a/build/assets/index-CAy1hogm.css +++ b/build/assets/index-BjpCz5fK.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-3a73e14a]{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-3a73e14a]{display:flex;justify-content:space-between;padding:1rem}.check-user-list .header-nav span[data-v-3a73e14a]{color:#ff4a00}.check-user-list .header-nav .nav-item[data-v-3a73e14a]{font-weight:700}.check-user-list .header-input[data-v-3a73e14a]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.check-user-list .order-lists[data-v-3a73e14a]{flex:1;overflow-y:auto;display:flex;flex-wrap:wrap;justify-content:flex-start}.check-user-list .order-lists .item[data-v-3a73e14a]{width:45%;height:7rem;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-3a73e14a]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.check-user-list .order-lists .item .flex-between[data-v-3a73e14a]{display:flex;justify-content:space-between;align-items:center}.check-user-list .order-lists .item .flex[data-v-3a73e14a]{display:flex;flex-wrap:wrap}.check-user-list .order-lists .item .bold[data-v-3a73e14a]{font-weight:700}.check-user-list .order-lists .item .r-1[data-v-3a73e14a]{margin-right:1rem}.check-user-list .order-lists .item .bottom>div[data-v-3a73e14a]{width:50%}.check-user-list .order-lists .item .red[data-v-3a73e14a]{color:#ff4a00}.check-user-list .order-lists .item-active[data-v-3a73e14a]{background-color:#efefef}.check-user-list .load-end[data-v-3a73e14a]{text-align:center;padding:1rem;color:#333;font-size:.8rem;width:100%;height:100%}.my-order[data-v-97ac6151]{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-97ac6151]{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-97ac6151]{width:3rem;height:3rem;flex-shrink:0}.my-order .user-nav .user-info .info[data-v-97ac6151]{flex:1;margin-left:1rem;color:#666}.my-order .user-nav .user-info .info .flex-bewteen[data-v-97ac6151]{display:flex;justify-content:space-between}.my-order .user-nav .user-info .info .change-user[data-v-97ac6151]{font-size:1rem}.my-order .user-nav .user-info .info .user-money[data-v-97ac6151]{display:flex;flex:1;flex-wrap:wrap}.my-order .user-nav .user-info .info .user-money>div[data-v-97ac6151]{flex-shrink:0}.my-order .header-nav[data-v-97ac6151]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-97ac6151]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-97ac6151]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-97ac6151]{flex:1;overflow-y:auto;padding-bottom:10rem}.my-order .order-list .order-item[data-v-97ac6151]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-97ac6151]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-97ac6151]{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-97ac6151]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-97ac6151]{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-97ac6151]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-97ac6151]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-97ac6151]{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-97ac6151]{height:3.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-97ac6151]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-97ac6151]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-97ac6151]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-97ac6151]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-97ac6151]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-97ac6151]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-9f29f2ff]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-9f29f2ff]{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-9f29f2ff]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-9f29f2ff]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-9f29f2ff]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-9f29f2ff] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-9f29f2ff]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-9f29f2ff]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-9f29f2ff]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-9f29f2ff]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-9f29f2ff]{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-9f29f2ff]{border-radius:.5rem;width:11.5rem;height:11.5rem}.my-order .shop-list .shop-item .shop-name[data-v-9f29f2ff]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;margin-top:.5rem}.my-order .shop-list .shop-item .shop-price[data-v-9f29f2ff]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-9f29f2ff]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-9f29f2ff]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item .shop-price .del[data-v-9f29f2ff]{text-decoration:line-through}.my-order .shop-list .shop-item[data-v-9f29f2ff]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-9f29f2ff],.my-order .shop-list .shop-item:hover .unit-name[data-v-9f29f2ff]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-9f29f2ff]{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-9f29f2ff]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.my-order .shop-list .shop-item .no-stock-re[data-v-9f29f2ff]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0000001a;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock-re div[data-v-9f29f2ff]{background-color:#1890ffcc;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-6c040b11]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-6c040b11]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-6c040b11]{display:flex}.shop .shop-info .shop-info-left[data-v-6c040b11]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-6c040b11]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-6c040b11]{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-6c040b11]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-6c040b11]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-6c040b11]{font-size:1.4rem;margin-left:.2rem}.shop .shop-info .shop-info-right .shop-info-right-price .unit-name[data-v-6c040b11]{font-size:.9rem;color:#999;font-weight:400}.shop .shop-info .shop-info-right .shop-info-right-price .del[data-v-6c040b11]{text-decoration:line-through}.shop .shop-sku[data-v-6c040b11]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-4d5623b0]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-4d5623b0]{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-4d5623b0]{background-color:#1890ff;color:#fff}.active-card .title[data-v-4d5623b0]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-4d5623b0]{display:flex;flex-wrap:wrap}.active-card .list div[data-v-4d5623b0]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-4d5623b0]{color:#1890ff}[data-v-4d5623b0]::-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-3a73e14a]{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-3a73e14a]{display:flex;justify-content:space-between;padding:1rem}.check-user-list .header-nav span[data-v-3a73e14a]{color:#ff4a00}.check-user-list .header-nav .nav-item[data-v-3a73e14a]{font-weight:700}.check-user-list .header-input[data-v-3a73e14a]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.check-user-list .order-lists[data-v-3a73e14a]{flex:1;overflow-y:auto;display:flex;flex-wrap:wrap;justify-content:flex-start}.check-user-list .order-lists .item[data-v-3a73e14a]{width:45%;height:7rem;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-3a73e14a]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.check-user-list .order-lists .item .flex-between[data-v-3a73e14a]{display:flex;justify-content:space-between;align-items:center}.check-user-list .order-lists .item .flex[data-v-3a73e14a]{display:flex;flex-wrap:wrap}.check-user-list .order-lists .item .bold[data-v-3a73e14a]{font-weight:700}.check-user-list .order-lists .item .r-1[data-v-3a73e14a]{margin-right:1rem}.check-user-list .order-lists .item .bottom>div[data-v-3a73e14a]{width:50%}.check-user-list .order-lists .item .red[data-v-3a73e14a]{color:#ff4a00}.check-user-list .order-lists .item-active[data-v-3a73e14a]{background-color:#efefef}.check-user-list .load-end[data-v-3a73e14a]{text-align:center;padding:1rem;color:#333;font-size:.8rem;width:100%;height:100%}.my-order[data-v-bcd603bf]{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-bcd603bf]{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-bcd603bf]{width:3rem;height:3rem;flex-shrink:0}.my-order .user-nav .user-info .info[data-v-bcd603bf]{flex:1;margin-left:1rem;color:#666}.my-order .user-nav .user-info .info .flex-bewteen[data-v-bcd603bf]{display:flex;justify-content:space-between}.my-order .user-nav .user-info .info .change-user[data-v-bcd603bf]{font-size:1rem}.my-order .user-nav .user-info .info .user-money[data-v-bcd603bf]{display:flex;flex:1;flex-wrap:wrap}.my-order .user-nav .user-info .info .user-money>div[data-v-bcd603bf]{flex-shrink:0}.my-order .header-nav[data-v-bcd603bf]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-bcd603bf]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-bcd603bf]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-bcd603bf]{flex:1;overflow-y:auto;padding-bottom:10rem}.my-order .order-list .order-item[data-v-bcd603bf]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-bcd603bf]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-bcd603bf]{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-bcd603bf]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-bcd603bf]{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-bcd603bf]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-bcd603bf]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-bcd603bf]{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-bcd603bf]{height:3.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-bcd603bf]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-bcd603bf]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-bcd603bf]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-bcd603bf]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-bcd603bf]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-bcd603bf]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-9f29f2ff]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-9f29f2ff]{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-9f29f2ff]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-9f29f2ff]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-9f29f2ff]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-9f29f2ff] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-9f29f2ff]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-9f29f2ff]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-9f29f2ff]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-9f29f2ff]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-9f29f2ff]{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-9f29f2ff]{border-radius:.5rem;width:11.5rem;height:11.5rem}.my-order .shop-list .shop-item .shop-name[data-v-9f29f2ff]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;margin-top:.5rem}.my-order .shop-list .shop-item .shop-price[data-v-9f29f2ff]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-9f29f2ff]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-9f29f2ff]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item .shop-price .del[data-v-9f29f2ff]{text-decoration:line-through}.my-order .shop-list .shop-item[data-v-9f29f2ff]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-9f29f2ff],.my-order .shop-list .shop-item:hover .unit-name[data-v-9f29f2ff]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-9f29f2ff]{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-9f29f2ff]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.my-order .shop-list .shop-item .no-stock-re[data-v-9f29f2ff]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0000001a;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock-re div[data-v-9f29f2ff]{background-color:#1890ffcc;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-6c040b11]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-6c040b11]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-6c040b11]{display:flex}.shop .shop-info .shop-info-left[data-v-6c040b11]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-6c040b11]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-6c040b11]{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-6c040b11]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-6c040b11]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-6c040b11]{font-size:1.4rem;margin-left:.2rem}.shop .shop-info .shop-info-right .shop-info-right-price .unit-name[data-v-6c040b11]{font-size:.9rem;color:#999;font-weight:400}.shop .shop-info .shop-info-right .shop-info-right-price .del[data-v-6c040b11]{text-decoration:line-through}.shop .shop-sku[data-v-6c040b11]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-4d5623b0]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-4d5623b0]{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-4d5623b0]{background-color:#1890ff;color:#fff}.active-card .title[data-v-4d5623b0]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-4d5623b0]{display:flex;flex-wrap:wrap}.active-card .list div[data-v-4d5623b0]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-4d5623b0]{color:#1890ff}[data-v-4d5623b0]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/build/assets/index-C1UYAdzy.js b/build/assets/index-BnGigPfR.js similarity index 99% rename from build/assets/index-C1UYAdzy.js rename to build/assets/index-BnGigPfR.js index 7481a5a..1638332 100644 --- a/build/assets/index-C1UYAdzy.js +++ b/build/assets/index-BnGigPfR.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-BcY06oMb.js","./store-DOG1V_EV.js","./user-CPvHwcG9.js","./moment-Cl4UOzQZ.js","./padding-B7CJVLVc.js","./axiosAPI-B6mxiJzo.js","./shop-Oo7M8T-d.js","./pay-D1eDcnTc.js","./authCode-5Ni0CM1g.js","./pay-iBTP5sC1.css","./index-CAy1hogm.css","./index-DHa9WNzO.js","./index-SMf-FFTg.css","./index-DWib0yOG.js","./index-CgdtOnOL.css","./indexCount-BAVEhqMF.js","./merchant-D8vvQnCS.js","./indexCount-quL7L4Zi.css","./index-ZqC6IftU.js","./index-ZYBKJJNc.css","./index-DK-Q_wnL.js","./index-D4JTEzRG.css","./index-4N16MaV1.js","./index-Bfak7bLR.css","./index-BI42i4fN.js","./index-DjJP7Zaf.css","./index-tbPBV3b_.js","./index-DSeWM5d3.css","./test-CMj2k7kj.js","./test-CmC8-tN2.css","./index-DtjOe95N.js","./index-BA6nwZsc.css"] + __vite__mapDeps.viteFileDeps = ["./index-Si3YHsKU.js","./store-DOZFgKpz.js","./user-Cxe1-N3Y.js","./moment-Cl4UOzQZ.js","./padding-CO-3gQOa.js","./axiosAPI-DJRwxDIy.js","./shop-CUNZMJhl.js","./pay-BYJnRMtm.js","./authCode-D1GYIlL-.js","./pay-iBTP5sC1.css","./index-BjpCz5fK.css","./index-BgHURwU7.js","./index-SMf-FFTg.css","./index-CB72F0mm.js","./index-CgdtOnOL.css","./indexCount-DGXdAzbZ.js","./merchant-nsqy9sz9.js","./indexCount-quL7L4Zi.css","./index-DpnybBgR.js","./index-ZYBKJJNc.css","./index-DMwnq_he.js","./index-D4JTEzRG.css","./index-DwdEL_Er.js","./index-Bfak7bLR.css","./index-Dvv7npa8.js","./index-DjJP7Zaf.css","./index-DeDWsEYB.js","./index-Dwu1TsNn.css","./test-B4sX6LfC.js","./test-CmC8-tN2.css","./index-auH31J6o.js","./index-BA6nwZsc.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -102,4 +102,4 @@ function __vite__mapDeps(indexes) { `,n+=sl(" ")+` `,n+=T4()+`欢迎下次光临! `,n+=Yce(" ")+` -`,n+=Xce(),n},Sv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=e=>(Vw("data-v-fa9ee521"),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=bd(),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?no.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(Ef(h,!0)),!c&&(c=!0,uni.getEnv(m=>{m.h5?(no.error("请使用APP打印小票"),c=!1):(p(h),setTimeout(()=>{c=!1},4e3))}))},d=(h="")=>{console.log("预打印");let m=Ef(h,!0);console.log(m),!c&&(c=!0,uni.getEnv(v=>{v.h5?(no.error("请使用APP打印小票"),c=!1):(p(m),setTimeout(()=>{c=!1},4e3))}))},p=(h="")=>{let m="";h===""?(m=Ef({},!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),no.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:"25",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=Sv(hde,[["__scopeId","data-v-fa9ee521"]]),gde=mv("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),no.success("您有新的订单"),a)return;var p=new Audio("/public/order.mp3");p.play(),a=!0,console.log("播放中"),p.addEventListener("ended",function(){a=!1})}catch(h){console.error(h),a=!1,no.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:"stock",title:"商品库存",ico:"Box",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=Sv(wde,[["__scopeId","data-v-6c51e07f"]]),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 vu=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=bd(),o=new Oo({url:"wss://multi-store.lihaink.cn/pull",app_key:"2ce3ce22329517213caa7dad261f5695"}).subscribe(`store_merchant_${t.userInfo.store_id}`);o.on("message",function(a){var l,s,u,c,f,d,p,h,m;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),((h=a==null?void 0:a.content)==null?void 0:h.msg)=="订单支付成功"&&Yt.emit("pay_user_success",(m=a==null?void 0:a.content)==null?void 0:m.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")};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=Sv($de,[["__scopeId","data-v-6c618134"]]),Ade=[{path:"/",name:"layout",component:Ode,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>Zn(()=>import("./index-BcY06oMb.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"收银订单"},component:()=>Zn(()=>import("./index-DHa9WNzO.js"),__vite__mapDeps([11,1,3,7,8,9,4,12]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>Zn(()=>import("./index-DWib0yOG.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>Zn(()=>import("./indexCount-BAVEhqMF.js"),__vite__mapDeps([15,16,17]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>Zn(()=>import("./index-ZqC6IftU.js"),__vite__mapDeps([18,16,3,4,19]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>Zn(()=>import("./index-DK-Q_wnL.js"),__vite__mapDeps([20,1,4,21,9]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>Zn(()=>import("./index-4N16MaV1.js"),__vite__mapDeps([22,6,5,23]),import.meta.url)},{path:"/stock",name:"stock",meta:{title:"入库登记"},component:()=>Zn(()=>import("./index-BI42i4fN.js"),__vite__mapDeps([24,6,5,25]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>Zn(()=>import("./index-tbPBV3b_.js"),__vite__mapDeps([26,2,3,5,8,1,4,27]),import.meta.url)},{path:"/test",name:"test",component:()=>Zn(()=>import("./test-CMj2k7kj.js"),__vite__mapDeps([28,29]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Zn(()=>import("./index-DtjOe95N.js"),__vite__mapDeps([30,2,31]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Zn(()=>import("./index-DOH2GsEn.js"),__vite__mapDeps([]),import.meta.url)}],qb=yue({history:Uie(),routes:Ade});qb.beforeEach((e,t,n)=>{const o=bd();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,Jse as B,cie as C,Sse as D,no as E,Fe as F,wt as G,bue as H,hb as I,S as J,Db as K,bt as L,Op as M,De as N,un as O,Wce as P,Ub as Q,Sv as _,xo as a,Ze as b,b as c,le as d,k as e,W as f,mt as g,Pc 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,bd as u,kr as v,X as w,Er as x,i as y,$ as z}; +`,n+=Xce(),n},Sv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=e=>(Vw("data-v-fa9ee521"),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=bd(),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?no.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(Ef(h,!0)),!c&&(c=!0,uni.getEnv(m=>{m.h5?(no.error("请使用APP打印小票"),c=!1):(p(h),setTimeout(()=>{c=!1},4e3))}))},d=(h="")=>{console.log("预打印");let m=Ef(h,!0);console.log(m),!c&&(c=!0,uni.getEnv(v=>{v.h5?(no.error("请使用APP打印小票"),c=!1):(p(m),setTimeout(()=>{c=!1},4e3))}))},p=(h="")=>{let m="";h===""?(m=Ef({},!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),no.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:"25",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=Sv(hde,[["__scopeId","data-v-fa9ee521"]]),gde=mv("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),no.success("您有新的订单"),a)return;var p=new Audio("/public/order.mp3");p.play(),a=!0,console.log("播放中"),p.addEventListener("ended",function(){a=!1})}catch(h){console.error(h),a=!1,no.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:"stock",title:"商品库存",ico:"Box",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=Sv(wde,[["__scopeId","data-v-6c51e07f"]]),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 vu=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=bd(),o=new Oo({url:"wss://multi-store.lihaink.cn/pull",app_key:"2ce3ce22329517213caa7dad261f5695"}).subscribe(`store_merchant_${t.userInfo.store_id}`);o.on("message",function(a){var l,s,u,c,f,d,p,h,m;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),((h=a==null?void 0:a.content)==null?void 0:h.msg)=="订单支付成功"&&Yt.emit("pay_user_success",(m=a==null?void 0:a.content)==null?void 0:m.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")};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=Sv($de,[["__scopeId","data-v-6c618134"]]),Ade=[{path:"/",name:"layout",component:Ode,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>Zn(()=>import("./index-Si3YHsKU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"收银订单"},component:()=>Zn(()=>import("./index-BgHURwU7.js"),__vite__mapDeps([11,1,3,7,8,9,4,12]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>Zn(()=>import("./index-CB72F0mm.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>Zn(()=>import("./indexCount-DGXdAzbZ.js"),__vite__mapDeps([15,16,17]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>Zn(()=>import("./index-DpnybBgR.js"),__vite__mapDeps([18,16,3,4,19]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>Zn(()=>import("./index-DMwnq_he.js"),__vite__mapDeps([20,1,4,21,9]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>Zn(()=>import("./index-DwdEL_Er.js"),__vite__mapDeps([22,6,5,23]),import.meta.url)},{path:"/stock",name:"stock",meta:{title:"入库登记"},component:()=>Zn(()=>import("./index-Dvv7npa8.js"),__vite__mapDeps([24,6,5,25]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>Zn(()=>import("./index-DeDWsEYB.js"),__vite__mapDeps([26,2,3,5,8,1,4,27]),import.meta.url)},{path:"/test",name:"test",component:()=>Zn(()=>import("./test-B4sX6LfC.js"),__vite__mapDeps([28,29]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Zn(()=>import("./index-auH31J6o.js"),__vite__mapDeps([30,2,31]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Zn(()=>import("./index-CDgWfTBA.js"),__vite__mapDeps([]),import.meta.url)}],qb=yue({history:Uie(),routes:Ade});qb.beforeEach((e,t,n)=>{const o=bd();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,Jse as B,cie as C,Sse as D,no as E,Fe as F,wt as G,bue as H,hb as I,S as J,Db as K,bt as L,Op as M,De as N,un as O,Wce as P,Ub as Q,Sv as _,xo as a,Ze as b,b as c,le as d,k as e,W as f,mt as g,Pc 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,bd as u,kr as v,X as w,Er as x,i as y,$ as z}; diff --git a/build/assets/index-DWib0yOG.js b/build/assets/index-CB72F0mm.js similarity index 98% rename from build/assets/index-DWib0yOG.js rename to build/assets/index-CB72F0mm.js index db46f72..8df71e2 100644 --- a/build/assets/index-DWib0yOG.js +++ b/build/assets/index-CB72F0mm.js @@ -1 +1 @@ -import{_ as E,u as K,r as n,o as P,m as w,a as j,b as r,h as x,c as s,k as i,e,f as d,w as c,g,d as B,p as k,i as ie,j as L,F,l as O,z as R,t as l,q,s as G,I as le}from"./index-C1UYAdzy.js";import{d as ne,e as de}from"./store-DOG1V_EV.js";import{h as A}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as _e}from"./padding-B7CJVLVc.js";const H=f=>(q("data-v-d16a314c"),f=f(),G(),f),ce={class:"my-order"},re={class:"header-nav"},ue=H(()=>e("div",{class:"nav-item"},l("线上订单"),-1)),ve={class:"nav-item-btn"},pe={class:"header-input"},fe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},me=["onClick"],he={class:"top"},ye={class:"create-time"},ge={class:"shop"},ke={key:0,class:"left"},$e={key:0,class:"shop-name"},be={class:"right"},we={class:"money"},Ce={class:"count"},Ve={class:"bottom"},De={class:"pay"},Ye={key:0},xe={key:1},ze={key:2},Ie={key:3},Se={key:4},Me={key:5},Ue={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"load-end"},Le={key:1,class:"load-end"},Ne=H(()=>e("span",null,"您有新订单了, 是否立即刷新",-1)),Te={class:"dialog-footer"},Fe={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f){K(),n([]);const o=n(1),C=p=>{_.value.page_no=1,m.value=!1,u.value=!1,h.value=[],y(!0)};n(null);const $=n(""),z=()=>{_.value.start_time=A($.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=A($.value[1]).format("YYYY-MM-DD 23:59:59"),y(!0)},I=p=>p.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:2}),u=n(!1),N=n(0),V=n(0),m=n(!1),h=n([]),y=(p=!1)=>{if(p)_.value.page_no=1;else if(m.value||u.value)return;u.value=!0,o.value==1&&(_.value.paid=null),o.value==2&&(_.value.paid=0),ne(_.value).then(a=>{p?h.value=a.data.lists:h.value=[...h.value,...a.data.lists],_.value.page_no==1&&h.value.length>0&&w.emit("set-sale-order-detail",h.value[0]),a.data.lists.length<_.value.page_size?m.value=!0:_.value.page_no++,V.value=0,N.value=a.data.count,u.value=!1}).catch(a=>{m.value=!0,u.value=!1})},S=(p,a)=>{V.value=a,w.emit("set-sale-order-detail",p)},b=n(!1);return P(()=>{w.on("update-sale-order-detail",p=>{console.log("==="),h.value[V.value].paid=1}),w.on("new_order",()=>{b.value||(b.value=!0)})}),j(()=>{w.off("update-sale-order-detail"),w.off("new_order")}),(p,a)=>{const D=r("el-radio-button"),Y=r("el-radio-group"),J=r("el-date-picker"),Q=r("CircleClose"),W=r("el-icon"),M=r("el-button"),X=r("el-input"),Z=r("el-image"),ee=r("spna"),te=r("el-dialog"),se=x("loading"),oe=x("infinite-scroll");return s(),i("div",ce,[e("div",re,[ue,e("div",ve,[d(Y,{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=t=>o.value=t),onChange:C,size:"small"},{default:c(()=>[d(D,{value:1},{default:c(()=>[g("全部")]),_:1}),d(D,{value:2},{default:c(()=>[g("未支付")]),_:1})]),_:1},8,["modelValue"]),d(J,{modelValue:$.value,"onUpdate:modelValue":a[1]||(a[1]=t=>$.value=t),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":I,onChange:z,clearable:!1,style:{width:"10rem",margin:"0 0 0 1rem"}},null,8,["modelValue"])])]),e("div",pe,[d(X,{modelValue:_.value.order_id,"onUpdate:modelValue":a[4]||(a[4]=t=>_.value.order_id=t),placeholder:"请输入订单编号",onKeydown:a[5]||(a[5]=ie(t=>y(!0),["enter"])),onClear:a[6]||(a[6]=t=>y(!0))},{suffix:c(()=>[_.value.order_id!=""?(s(),B(W,{key:0,size:"18",onClick:a[2]||(a[2]=t=>{_.value.order_id="",y(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:c(()=>[d(Q)]),_:1})):k("",!0)]),append:c(()=>[d(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[3]||(a[3]=t=>y(!0))},{default:c(()=>[g("搜索")]),_:1})]),_:1},8,["modelValue"])]),L((s(),i("div",fe,[(s(!0),i(F,null,O(h.value,(t,U)=>(s(),i("div",{class:R(["item",{"item-active":V.value==U}]),key:U,onClick:T=>S(t,U)},[e("div",he,[e("div",{class:R(["sn","cahier"])},"单号: "+l(t.order_id),1),e("div",ye,l(t.pay_time),1)]),e("div",ge,[t.product_info?(s(),i("div",ke,[(s(!0),i(F,null,O(t.product_info.slice(0,5),(T,ae)=>(s(),B(Z,{key:ae,src:T.image,class:"shop-img"},null,8,["src"]))),128)),t.product_info.length==1?(s(),i("div",$e,l(t.product_info[0].store_name),1)):k("",!0)])):k("",!0),e("div",be,[e("div",we,"¥"+l(t.pay_price),1),e("div",Ce,"共"+l(t.total_num)+"款商品",1)])]),e("div",Ve,[e("div",De,[t.paid?(s(),i("div",Ye,[g(l(t.paid_name)+" ",1),t.pay_type_name?(s(),B(ee,{key:0},{default:c(()=>[g("("+l(t.pay_type_name)+")",1)]),_:2},1024)):t.pay_type==9?(s(),i("span",xe,"(微信收款)")):t.pay_type==17?(s(),i("span",ze,"(现金支付)")):t.pay_type==13?(s(),i("span",Ie,"(支付宝收款)")):t.pay_type==3?(s(),i("span",Se,"(余额支付)")):t.pay_type==1?(s(),i("span",Me,"(微信支付)")):k("",!0)])):(s(),i("div",Ue,l(t.paid_name),1))])])],10,me))),128)),m.value?(s(),i("div",Be,"没有更多了")):k("",!0),u.value?(s(),i("div",Le,"加载中...")):k("",!0)])),[[se,u.value],[oe,y]]),d(te,{modelValue:b.value,"onUpdate:modelValue":a[9]||(a[9]=t=>b.value=t),title:"新订单提醒",width:"500"},{footer:c(()=>[e("div",Te,[d(M,{onClick:a[7]||(a[7]=t=>b.value=!1)},{default:c(()=>[g("稍后刷新")]),_:1}),d(M,{type:"primary",onClick:a[8]||(a[8]=t=>{y(!0),b.value=!1})},{default:c(()=>[g(" 立即刷新 ")]),_:1})])]),default:c(()=>[Ne]),_:1},8,["modelValue"])])}}},Oe=E(Fe,[["__scopeId","data-v-d16a314c"]]),v=f=>(q("data-v-0f1c9a1a"),f=f(),G(),f),Re={class:"my-order"},Ae={key:0,class:"detail"},Ee={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ke=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Pe={class:"table-info"},je={class:"info-item"},qe=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},ct=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),rt={class:"info-item-info"},ut={class:"info-item"},vt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),pt={class:"info-item-info"},ft={key:0},mt={key:1},ht={key:2},yt={key:3},gt={key:4},kt={key:5},$t={key:0,class:"table-title"},bt={key:1,class:"table-info"},wt={class:"info-item"},Ct=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),Vt={class:"info-item-info"},Dt={class:"info-item"},Yt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),xt={class:"info-item-info"},zt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),St={class:"info-item-info"},Mt={style:{"font-size":"0.9rem"}},Ut={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Lt={style:{"margin-left":"0.5rem"}},Nt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),Tt={key:1},Ft={__name:"detail",setup(f){K(),le();const o=n({id:""});n([]),n(null);const C=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const $=n({page_no:1,page_size:15,loadend:!1,loading:!1}),z=n([]),I=()=>console.log("触底"),_=()=>{C.value=!0,de({id:o.value.id}).then(u=>{o.value=u.data,setTimeout(()=>{C.value=!1},200)})};return P(()=>{w.on("set-sale-order-detail",u=>{console.log("===",u),o.value=u,$.value.page_no=1,$.value.loadend=!1,$.value.loading=!1,z.value=[],_()})}),j(()=>{w.off("set-sale-order-detail")}),(u,N)=>{var p;const V=r("el-image"),m=r("el-table-column"),h=r("el-table"),y=r("el-empty"),S=x("infinite-scroll"),b=x("loading");return s(),i("div",Re,[o.value.id?L((s(),i("div",Ae,[L((s(),i("div",Ee,[Ke,e("div",Pe,[e("div",je,[qe,e("div",Ge,l(o.value.order_id),1)]),e("div",He,[Je,e("div",Qe,l(o.value.total_num||0),1)]),e("div",We,[Xe,e("div",Ze,"¥"+l(o.value.pay_price),1)]),e("div",et,[tt,e("div",st,l(o.value.pay_time),1)]),e("div",ot,[at,e("div",it,"¥"+l(o.value.deduction_price),1)]),e("div",lt,[nt,e("div",dt,"¥"+l(o.value.pay_price),1)]),e("div",_t,[ct,e("div",rt,l(o.value.pay_time),1)]),e("div",ut,[vt,e("div",pt,[o.value.pay_type_name?(s(),i("span",ft,l(o.value.pay_type_name),1)):o.value.pay_type==9?(s(),i("span",mt,"微信收款")):o.value.pay_type==17?(s(),i("span",ht,"现金支付")):o.value.pay_type==13?(s(),i("span",yt,"支付宝收款")):o.value.pay_type==3?(s(),i("span",gt,"余额支付")):o.value.pay_type==1?(s(),i("span",kt,"微信支付")):k("",!0)])])]),o.value.uid?(s(),i("div",$t,"用户信息")):k("",!0),o.value.uid?(s(),i("div",bt,[e("div",wt,[Ct,e("div",Vt,l(o.value.uid),1)]),e("div",Dt,[Yt,e("div",xt,l(o.value.nickname),1)]),e("div",zt,[It,e("div",St,l(o.value.mobile),1)])])):k("",!0),e("div",Mt,[g(" 共计 "),e("span",Ut,l(((p=o.value.product)==null?void 0:p.length)||" "),1),g(" 款商品 ")]),d(h,{data:o.value.product},{default:c(()=>[d(m,{label:"商品信息"},{default:c(({row:a})=>{var D,Y;return[e("div",Bt,[d(V,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(D=a.cart_info)==null?void 0:D.image},null,8,["src"]),e("span",Lt,l((Y=a.cart_info)==null?void 0:Y.name),1)])]}),_:1}),d(m,{prop:"cart_info.price",label:"单价",width:"150"}),d(m,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(m,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Nt])),[[S,I]])])),[[b,C.value]]):(s(),i("div",Tt,[d(y)]))])}}},Ot=E(Ft,[["__scopeId","data-v-0f1c9a1a"]]),Rt={class:"my-card"},qt={__name:"index",setup(f){return(o,C)=>(s(),i("div",Rt,[d(Oe,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(_e),d(Ot,{ref:"detailRef"},null,512)]))}};export{qt as default}; +import{_ as E,u as K,r as n,o as P,m as w,a as j,b as r,h as x,c as s,k as i,e,f as d,w as c,g,d as B,p as k,i as ie,j as L,F,l as O,z as R,t as l,q,s as G,I as le}from"./index-BnGigPfR.js";import{d as ne,e as de}from"./store-DOZFgKpz.js";import{h as A}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as _e}from"./padding-CO-3gQOa.js";const H=f=>(q("data-v-d16a314c"),f=f(),G(),f),ce={class:"my-order"},re={class:"header-nav"},ue=H(()=>e("div",{class:"nav-item"},l("线上订单"),-1)),ve={class:"nav-item-btn"},pe={class:"header-input"},fe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},me=["onClick"],he={class:"top"},ye={class:"create-time"},ge={class:"shop"},ke={key:0,class:"left"},$e={key:0,class:"shop-name"},be={class:"right"},we={class:"money"},Ce={class:"count"},Ve={class:"bottom"},De={class:"pay"},Ye={key:0},xe={key:1},ze={key:2},Ie={key:3},Se={key:4},Me={key:5},Ue={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"load-end"},Le={key:1,class:"load-end"},Ne=H(()=>e("span",null,"您有新订单了, 是否立即刷新",-1)),Te={class:"dialog-footer"},Fe={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f){K(),n([]);const o=n(1),C=p=>{_.value.page_no=1,m.value=!1,u.value=!1,h.value=[],y(!0)};n(null);const $=n(""),z=()=>{_.value.start_time=A($.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=A($.value[1]).format("YYYY-MM-DD 23:59:59"),y(!0)},I=p=>p.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:2}),u=n(!1),N=n(0),V=n(0),m=n(!1),h=n([]),y=(p=!1)=>{if(p)_.value.page_no=1;else if(m.value||u.value)return;u.value=!0,o.value==1&&(_.value.paid=null),o.value==2&&(_.value.paid=0),ne(_.value).then(a=>{p?h.value=a.data.lists:h.value=[...h.value,...a.data.lists],_.value.page_no==1&&h.value.length>0&&w.emit("set-sale-order-detail",h.value[0]),a.data.lists.length<_.value.page_size?m.value=!0:_.value.page_no++,V.value=0,N.value=a.data.count,u.value=!1}).catch(a=>{m.value=!0,u.value=!1})},S=(p,a)=>{V.value=a,w.emit("set-sale-order-detail",p)},b=n(!1);return P(()=>{w.on("update-sale-order-detail",p=>{console.log("==="),h.value[V.value].paid=1}),w.on("new_order",()=>{b.value||(b.value=!0)})}),j(()=>{w.off("update-sale-order-detail"),w.off("new_order")}),(p,a)=>{const D=r("el-radio-button"),Y=r("el-radio-group"),J=r("el-date-picker"),Q=r("CircleClose"),W=r("el-icon"),M=r("el-button"),X=r("el-input"),Z=r("el-image"),ee=r("spna"),te=r("el-dialog"),se=x("loading"),oe=x("infinite-scroll");return s(),i("div",ce,[e("div",re,[ue,e("div",ve,[d(Y,{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=t=>o.value=t),onChange:C,size:"small"},{default:c(()=>[d(D,{value:1},{default:c(()=>[g("全部")]),_:1}),d(D,{value:2},{default:c(()=>[g("未支付")]),_:1})]),_:1},8,["modelValue"]),d(J,{modelValue:$.value,"onUpdate:modelValue":a[1]||(a[1]=t=>$.value=t),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":I,onChange:z,clearable:!1,style:{width:"10rem",margin:"0 0 0 1rem"}},null,8,["modelValue"])])]),e("div",pe,[d(X,{modelValue:_.value.order_id,"onUpdate:modelValue":a[4]||(a[4]=t=>_.value.order_id=t),placeholder:"请输入订单编号",onKeydown:a[5]||(a[5]=ie(t=>y(!0),["enter"])),onClear:a[6]||(a[6]=t=>y(!0))},{suffix:c(()=>[_.value.order_id!=""?(s(),B(W,{key:0,size:"18",onClick:a[2]||(a[2]=t=>{_.value.order_id="",y(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:c(()=>[d(Q)]),_:1})):k("",!0)]),append:c(()=>[d(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[3]||(a[3]=t=>y(!0))},{default:c(()=>[g("搜索")]),_:1})]),_:1},8,["modelValue"])]),L((s(),i("div",fe,[(s(!0),i(F,null,O(h.value,(t,U)=>(s(),i("div",{class:R(["item",{"item-active":V.value==U}]),key:U,onClick:T=>S(t,U)},[e("div",he,[e("div",{class:R(["sn","cahier"])},"单号: "+l(t.order_id),1),e("div",ye,l(t.pay_time),1)]),e("div",ge,[t.product_info?(s(),i("div",ke,[(s(!0),i(F,null,O(t.product_info.slice(0,5),(T,ae)=>(s(),B(Z,{key:ae,src:T.image,class:"shop-img"},null,8,["src"]))),128)),t.product_info.length==1?(s(),i("div",$e,l(t.product_info[0].store_name),1)):k("",!0)])):k("",!0),e("div",be,[e("div",we,"¥"+l(t.pay_price),1),e("div",Ce,"共"+l(t.total_num)+"款商品",1)])]),e("div",Ve,[e("div",De,[t.paid?(s(),i("div",Ye,[g(l(t.paid_name)+" ",1),t.pay_type_name?(s(),B(ee,{key:0},{default:c(()=>[g("("+l(t.pay_type_name)+")",1)]),_:2},1024)):t.pay_type==9?(s(),i("span",xe,"(微信收款)")):t.pay_type==17?(s(),i("span",ze,"(现金支付)")):t.pay_type==13?(s(),i("span",Ie,"(支付宝收款)")):t.pay_type==3?(s(),i("span",Se,"(余额支付)")):t.pay_type==1?(s(),i("span",Me,"(微信支付)")):k("",!0)])):(s(),i("div",Ue,l(t.paid_name),1))])])],10,me))),128)),m.value?(s(),i("div",Be,"没有更多了")):k("",!0),u.value?(s(),i("div",Le,"加载中...")):k("",!0)])),[[se,u.value],[oe,y]]),d(te,{modelValue:b.value,"onUpdate:modelValue":a[9]||(a[9]=t=>b.value=t),title:"新订单提醒",width:"500"},{footer:c(()=>[e("div",Te,[d(M,{onClick:a[7]||(a[7]=t=>b.value=!1)},{default:c(()=>[g("稍后刷新")]),_:1}),d(M,{type:"primary",onClick:a[8]||(a[8]=t=>{y(!0),b.value=!1})},{default:c(()=>[g(" 立即刷新 ")]),_:1})])]),default:c(()=>[Ne]),_:1},8,["modelValue"])])}}},Oe=E(Fe,[["__scopeId","data-v-d16a314c"]]),v=f=>(q("data-v-0f1c9a1a"),f=f(),G(),f),Re={class:"my-order"},Ae={key:0,class:"detail"},Ee={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ke=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Pe={class:"table-info"},je={class:"info-item"},qe=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},ct=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),rt={class:"info-item-info"},ut={class:"info-item"},vt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),pt={class:"info-item-info"},ft={key:0},mt={key:1},ht={key:2},yt={key:3},gt={key:4},kt={key:5},$t={key:0,class:"table-title"},bt={key:1,class:"table-info"},wt={class:"info-item"},Ct=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),Vt={class:"info-item-info"},Dt={class:"info-item"},Yt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),xt={class:"info-item-info"},zt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),St={class:"info-item-info"},Mt={style:{"font-size":"0.9rem"}},Ut={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Lt={style:{"margin-left":"0.5rem"}},Nt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),Tt={key:1},Ft={__name:"detail",setup(f){K(),le();const o=n({id:""});n([]),n(null);const C=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const $=n({page_no:1,page_size:15,loadend:!1,loading:!1}),z=n([]),I=()=>console.log("触底"),_=()=>{C.value=!0,de({id:o.value.id}).then(u=>{o.value=u.data,setTimeout(()=>{C.value=!1},200)})};return P(()=>{w.on("set-sale-order-detail",u=>{console.log("===",u),o.value=u,$.value.page_no=1,$.value.loadend=!1,$.value.loading=!1,z.value=[],_()})}),j(()=>{w.off("set-sale-order-detail")}),(u,N)=>{var p;const V=r("el-image"),m=r("el-table-column"),h=r("el-table"),y=r("el-empty"),S=x("infinite-scroll"),b=x("loading");return s(),i("div",Re,[o.value.id?L((s(),i("div",Ae,[L((s(),i("div",Ee,[Ke,e("div",Pe,[e("div",je,[qe,e("div",Ge,l(o.value.order_id),1)]),e("div",He,[Je,e("div",Qe,l(o.value.total_num||0),1)]),e("div",We,[Xe,e("div",Ze,"¥"+l(o.value.pay_price),1)]),e("div",et,[tt,e("div",st,l(o.value.pay_time),1)]),e("div",ot,[at,e("div",it,"¥"+l(o.value.deduction_price),1)]),e("div",lt,[nt,e("div",dt,"¥"+l(o.value.pay_price),1)]),e("div",_t,[ct,e("div",rt,l(o.value.pay_time),1)]),e("div",ut,[vt,e("div",pt,[o.value.pay_type_name?(s(),i("span",ft,l(o.value.pay_type_name),1)):o.value.pay_type==9?(s(),i("span",mt,"微信收款")):o.value.pay_type==17?(s(),i("span",ht,"现金支付")):o.value.pay_type==13?(s(),i("span",yt,"支付宝收款")):o.value.pay_type==3?(s(),i("span",gt,"余额支付")):o.value.pay_type==1?(s(),i("span",kt,"微信支付")):k("",!0)])])]),o.value.uid?(s(),i("div",$t,"用户信息")):k("",!0),o.value.uid?(s(),i("div",bt,[e("div",wt,[Ct,e("div",Vt,l(o.value.uid),1)]),e("div",Dt,[Yt,e("div",xt,l(o.value.nickname),1)]),e("div",zt,[It,e("div",St,l(o.value.mobile),1)])])):k("",!0),e("div",Mt,[g(" 共计 "),e("span",Ut,l(((p=o.value.product)==null?void 0:p.length)||" "),1),g(" 款商品 ")]),d(h,{data:o.value.product},{default:c(()=>[d(m,{label:"商品信息"},{default:c(({row:a})=>{var D,Y;return[e("div",Bt,[d(V,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(D=a.cart_info)==null?void 0:D.image},null,8,["src"]),e("span",Lt,l((Y=a.cart_info)==null?void 0:Y.name),1)])]}),_:1}),d(m,{prop:"cart_info.price",label:"单价",width:"150"}),d(m,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(m,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Nt])),[[S,I]])])),[[b,C.value]]):(s(),i("div",Tt,[d(y)]))])}}},Ot=E(Ft,[["__scopeId","data-v-0f1c9a1a"]]),Rt={class:"my-card"},qt={__name:"index",setup(f){return(o,C)=>(s(),i("div",Rt,[d(Oe,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(_e),d(Ot,{ref:"detailRef"},null,512)]))}};export{qt as default}; diff --git a/build/assets/index-DOH2GsEn.js b/build/assets/index-CDgWfTBA.js similarity index 84% rename from build/assets/index-DOH2GsEn.js rename to build/assets/index-CDgWfTBA.js index d609d78..2646e4c 100644 --- a/build/assets/index-DOH2GsEn.js +++ b/build/assets/index-CDgWfTBA.js @@ -1 +1 @@ -import{b as t,c,k as a,e,f as o,w as d,g as l}from"./index-C1UYAdzy.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-BnGigPfR.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/build/assets/index-DK-Q_wnL.js b/build/assets/index-DMwnq_he.js similarity index 98% rename from build/assets/index-DK-Q_wnL.js rename to build/assets/index-DMwnq_he.js index 9d52289..0dce6c3 100644 --- a/build/assets/index-DK-Q_wnL.js +++ b/build/assets/index-DMwnq_he.js @@ -1 +1 @@ -import{_ as q,u as W,r as l,b as f,h as E,c as s,k as o,e,t as a,f as _,w as y,g as w,i as G,j as $,F as P,l as T,p as u,m as b,E as F,z as j,d as N,I as X,o as H,a as Y,q as Z,s as ee,n as M,L as A,M as te}from"./index-C1UYAdzy.js";import{e as se,j as oe,w as ie,i as ae}from"./store-DOG1V_EV.js";/* empty css */import{p as le}from"./padding-B7CJVLVc.js";const ne={class:"my-order"},ce={class:"header-nav"},de={class:"nav-item"},_e={class:"nav-item-clear"},re={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},ue=["onClick"],fe={class:"top"},pe={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},me={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},we={class:"pay"},Ce={key:0},xe={key:1},Re={key:2},Ie={key:3},ze={key:4},Oe={key:5},Ve={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"},Ae={__name:"order",props:{type:{type:Number,default:2}},emits:["backOne"],setup(C,{expose:t,emit:h}){W(),l([]),l(null);const n=l({verify_code:"",page_no:1,page_size:15}),r=l(!1),m=l(0),k=l(0),I=l(!1),c=l([]),p=(x=!1)=>{r.value||(r.value=!0,n.value.verify_code?(n.value.verify_code=n.value.verify_code.replace("—","-"),n.value.verify_code=n.value.verify_code.replace(/\uFF0D/,"-"),n.value.verify_code=n.value.verify_code.replace(" ",""),se({verify_code:n.value.verify_code}).then(d=>{c.value=[d.data],k.value=0,b.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,r.value=!1,c.value[0].is_writeoff&&F.warning("订单已核销过")}).catch(d=>{r.value=!1,F.error(d.msg||"没有找到该订单"),c.value=[],b.emit("set-sale-order-detail",{})})):oe(n.value).then(d=>{c.value=[...c.value,...d.data.lists],n.value.page_no==1&&b.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,n.value.page_no++,r.value=!1}).catch(d=>{r.value=!1}))},z=(x,d)=>{k.value=d,b.emit("set-sale-order-detail",x)},g=x=>{n.value.verify_code=x,k.value=0,n.value.page_no=1,p(!0)},R=h,O=()=>{b.emit("set-sale-order-detail",{}),c.value=[],R("backOne")};return t({setCode:g}),(x,d)=>{const V=f("el-button"),B=f("el-input"),D=f("el-image"),L=f("spna"),S=E("loading"),J=E("infinite-scroll");return s(),o("div",ne,[e("div",ce,[e("div",de,a(C.type==2?"核销订单":"核销记录"),1),e("div",_e,[_(V,{type:"primary",size:"small",onClick:O},{default:y(()=>[w("返回上一页")]),_:1})])]),e("div",re,[_(B,{modelValue:n.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=i=>n.value.verify_code=i),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=G(i=>p(!0),["enter"])),clearable:""},{append:y(()=>[_(V,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=i=>p(!0))},{default:y(()=>[w("搜索")]),_:1})]),_:1},8,["modelValue"])]),$((s(),o("div",ve,[(s(!0),o(P,null,T(c.value,(i,K)=>(s(),o("div",{class:j(["item",{"item-active":k.value==K}]),key:K,onClick:U=>z(i,K)},[e("div",fe,[e("div",{class:j(["sn","cahier"])},"单号: "+a(i.order_id),1),e("div",pe,a(i.pay_time),1)]),e("div",he,[i.product?(s(),o("div",ye,[(s(!0),o(P,null,T(i.product.slice(0,5),(U,Q)=>(s(),N(D,{key:Q,src:U.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),i.product.length==1?(s(),o("div",me,a(i.product[0].store_name),1)):u("",!0)])):u("",!0),e("div",ke,[e("div",ge,"¥"+a(i.pay_price),1),e("div",$e,"共"+a(i.total_num)+"款商品",1)])]),e("div",be,[e("div",we,[i.paid?(s(),o("div",Ce,[w(a(i.paid_name)+" ",1),i.pay_type_name?(s(),N(L,{key:0},{default:y(()=>[w("("+a(i.pay_type_name)+")",1)]),_:2},1024)):i.pay_type==9?(s(),o("span",xe,"(微信收款)")):i.pay_type==17?(s(),o("span",Re,"(现金支付)")):i.pay_type==13?(s(),o("span",Ie,"(支付宝收款)")):i.pay_type==3?(s(),o("span",ze,"(余额支付)")):i.pay_type==1?(s(),o("span",Oe,"(微信支付)")):u("",!0)])):(s(),o("div",Ve,a(i.paid_name),1))]),i.is_writeoff==0?(s(),o("div",Be,"核销码:"+a(i.verify_code),1)):(s(),o("div",De,"已核销:"+a(i.verify_code),1))])],10,ue))),128)),I.value?(s(),o("div",Le,"没有更多了")):u("",!0),r.value?(s(),o("div",Se,"加载中...")):u("",!0)])),[[S,r.value],[J,p]])])}}},Ee=q(Ae,[["__scopeId","data-v-f1ecc2f9"]]),v=C=>(Z("data-v-1950b4ed"),C=C(),ee(),C),Fe={class:"my-order"},Ne={key:0,class:"detail"},Ke={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)),Ue={class:"table-info"},Pe={class:"info-item"},Te=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},We=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Qe={class:"info-item-info"},Xe={class:"info-item"},Ye=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),at={class:"info-item-info"},lt={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},_t=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),rt={class:"info-item-info"},vt={key:0},ut={key:1},ft={key:2},pt={key:3},ht={key:4},yt={key:5},mt={key:0,class:"table-title"},kt={key:1,class:"table-info"},gt={class:"info-item"},$t=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),bt={class:"info-item-info"},wt={class:"info-item"},Ct=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),xt={class:"info-item-info"},Rt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),zt={class:"info-item-info"},Ot={style:{"font-size":"0.9rem"}},Vt={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Dt={style:{"margin-left":"0.5rem"}},Lt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),St={class:"footer"},At={key:1},Et={key:1},Ft={__name:"detail",setup(C){W(),X();const t=l({id:""});l([]),l(null);const h=l(!1);l(0),l(0),l(["商品信息","订单详情"]),l(""),l(!1);const n=l({page_no:1,page_size:15,loadend:!1,loading:!1}),r=l([]),m=()=>console.log("触底"),k=()=>{ie({verify_code:t.value.verify_code}).then(c=>{c.show==0&&c.msg=="核销成功"&&F.success(c.msg),t.value.is_writeoff=1})},I=()=>{ae({id:t.value.id}).then(c=>{b.emit("letPrintReceipt",c.data)})};return H(()=>{b.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,n.value.page_no=1,n.value.loadend=!1,n.value.loading=!1,r.value=[]})}),Y(()=>{b.off("set-sale-order-detail")}),(c,p)=>{var B;const z=f("el-image"),g=f("el-table-column"),R=f("el-table"),O=f("el-button"),x=f("el-empty"),d=E("infinite-scroll"),V=E("loading");return s(),o("div",Fe,[t.value.id?$((s(),o("div",Ne,[$((s(),o("div",Ke,[Me,e("div",Ue,[e("div",Pe,[Te,e("div",je,a(t.value.order_id),1)]),e("div",qe,[We,e("div",Ge,a(t.value.total_num||0),1)]),e("div",He,[Je,e("div",Qe,"¥"+a(t.value.pay_price),1)]),e("div",Xe,[Ye,e("div",Ze,a(t.value.pay_time),1)]),e("div",et,[tt,e("div",st,"¥"+a(t.value.deduction_price),1)]),e("div",ot,[it,e("div",at,"¥"+a(t.value.pay_price),1)]),e("div",lt,[nt,e("div",ct,a(t.value.pay_time),1)]),e("div",dt,[_t,e("div",rt,[t.value.pay_type_name?(s(),o("span",vt,a(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ut,"微信收款")):t.value.pay_type==17?(s(),o("span",ft,"现金支付")):t.value.pay_type==13?(s(),o("span",pt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ht,"余额支付")):t.value.pay_type==1?(s(),o("span",yt,"微信支付")):u("",!0)])])]),t.value.uid?(s(),o("div",mt,"用户信息")):u("",!0),t.value.uid?(s(),o("div",kt,[e("div",gt,[$t,e("div",bt,a(t.value.uid),1)]),e("div",wt,[Ct,e("div",xt,a(t.value.nickname),1)]),e("div",Rt,[It,e("div",zt,a(t.value.mobile),1)])])):u("",!0),e("div",Ot,[w(" 共计 "),e("span",Vt,a(((B=t.value.product)==null?void 0:B.length)||" "),1),w(" 款商品 ")]),_(R,{data:t.value.product},{default:y(()=>[_(g,{label:"商品信息"},{default:y(({row:D})=>{var L,S;return[e("div",Bt,[_(z,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(L=D.cart_info)==null?void 0:L.image},null,8,["src"]),e("span",Dt,a((S=D.cart_info)==null?void 0:S.name),1)])]}),_:1}),_(g,{prop:"cart_info.price",label:"单价",width:"150"}),_(g,{prop:"cart_info.cart_num",label:"数量",width:"150"}),_(g,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Lt])),[[d,m]]),e("div",St,[t.value.is_writeoff==0?(s(),N(O,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:k},{default:y(()=>[w("立即核销")]),_:1},8,["disabled"])):u("",!0),t.value.is_writeoff==1?(s(),o("div",At,"该订单已核销")):u("",!0),t.value.is_writeoff==1?(s(),N(O,{key:2,style:{"margin-left":"1rem"},type:"warning",size:"large",onClick:I},{default:y(()=>[w("打印小票")]),_:1})):u("",!0)])])),[[V,h.value]]):(s(),o("div",Et,[_(x,{description:"没找到核销订单信息"})]))])}}},Nt=q(Ft,[["__scopeId","data-v-1950b4ed"]]),Kt={class:"my-card"},Mt={class:"my-code"},Ut=e("h2",null,"订单核销",-1),Pt={class:"box"},Tt=e("span",null,"查看核销记录",-1),Ht={__name:"index",setup(C){const t=l(1),h=l(""),n=l(null),r=l(null),m=()=>{if(h.value=="")return F.error("请输入订单编号");t.value=2,M(()=>{r.value.setCode(h.value)})},k=()=>{t.value=3,M(()=>{r.value.setCode("")})},I=()=>{m()};return H(()=>{M(()=>{n.value.focus()})}),(c,p)=>{const z=f("ArrowRightBold"),g=f("el-icon");return s(),o("div",Kt,[$(e("div",Mt,[Ut,e("div",Pt,[$(e("input",{ref_key:"inputRef",ref:n,"onUpdate:modelValue":p[0]||(p[0]=R=>h.value=R),placeholder:"请输入核销码",class:"input",onKeyup:G(m,["enter"])},null,544),[[te,h.value]]),e("div",{class:"btn",onClick:m},"查询")]),e("div",{class:"to-list",onClick:k},[Tt,_(g,null,{default:y(()=>[_(z)]),_:1})])],512),[[A,t.value==1]]),$(_(Ee,{type:t.value,style:{"flex-shrink":"0"},ref_key:"orderRef",ref:r,onBackOne:p[1]||(p[1]=R=>{t.value=1,h.value=""})},null,8,["type"]),[[A,t.value!=1]]),$(_(le,null,null,512),[[A,t.value!=1]]),$(_(Nt,{ref:"detailRef",onReInit:I},null,512),[[A,t.value!=1]])])}}};export{Ht as default}; +import{_ as q,u as W,r as l,b as f,h as E,c as s,k as o,e,t as a,f as _,w as y,g as w,i as G,j as $,F as P,l as T,p as u,m as b,E as F,z as j,d as N,I as X,o as H,a as Y,q as Z,s as ee,n as M,L as A,M as te}from"./index-BnGigPfR.js";import{e as se,j as oe,w as ie,i as ae}from"./store-DOZFgKpz.js";/* empty css */import{p as le}from"./padding-CO-3gQOa.js";const ne={class:"my-order"},ce={class:"header-nav"},de={class:"nav-item"},_e={class:"nav-item-clear"},re={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},ue=["onClick"],fe={class:"top"},pe={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},me={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},we={class:"pay"},Ce={key:0},xe={key:1},Re={key:2},Ie={key:3},ze={key:4},Oe={key:5},Ve={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"},Ae={__name:"order",props:{type:{type:Number,default:2}},emits:["backOne"],setup(C,{expose:t,emit:h}){W(),l([]),l(null);const n=l({verify_code:"",page_no:1,page_size:15}),r=l(!1),m=l(0),k=l(0),I=l(!1),c=l([]),p=(x=!1)=>{r.value||(r.value=!0,n.value.verify_code?(n.value.verify_code=n.value.verify_code.replace("—","-"),n.value.verify_code=n.value.verify_code.replace(/\uFF0D/,"-"),n.value.verify_code=n.value.verify_code.replace(" ",""),se({verify_code:n.value.verify_code}).then(d=>{c.value=[d.data],k.value=0,b.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,r.value=!1,c.value[0].is_writeoff&&F.warning("订单已核销过")}).catch(d=>{r.value=!1,F.error(d.msg||"没有找到该订单"),c.value=[],b.emit("set-sale-order-detail",{})})):oe(n.value).then(d=>{c.value=[...c.value,...d.data.lists],n.value.page_no==1&&b.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,n.value.page_no++,r.value=!1}).catch(d=>{r.value=!1}))},z=(x,d)=>{k.value=d,b.emit("set-sale-order-detail",x)},g=x=>{n.value.verify_code=x,k.value=0,n.value.page_no=1,p(!0)},R=h,O=()=>{b.emit("set-sale-order-detail",{}),c.value=[],R("backOne")};return t({setCode:g}),(x,d)=>{const V=f("el-button"),B=f("el-input"),D=f("el-image"),L=f("spna"),S=E("loading"),J=E("infinite-scroll");return s(),o("div",ne,[e("div",ce,[e("div",de,a(C.type==2?"核销订单":"核销记录"),1),e("div",_e,[_(V,{type:"primary",size:"small",onClick:O},{default:y(()=>[w("返回上一页")]),_:1})])]),e("div",re,[_(B,{modelValue:n.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=i=>n.value.verify_code=i),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=G(i=>p(!0),["enter"])),clearable:""},{append:y(()=>[_(V,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=i=>p(!0))},{default:y(()=>[w("搜索")]),_:1})]),_:1},8,["modelValue"])]),$((s(),o("div",ve,[(s(!0),o(P,null,T(c.value,(i,K)=>(s(),o("div",{class:j(["item",{"item-active":k.value==K}]),key:K,onClick:U=>z(i,K)},[e("div",fe,[e("div",{class:j(["sn","cahier"])},"单号: "+a(i.order_id),1),e("div",pe,a(i.pay_time),1)]),e("div",he,[i.product?(s(),o("div",ye,[(s(!0),o(P,null,T(i.product.slice(0,5),(U,Q)=>(s(),N(D,{key:Q,src:U.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),i.product.length==1?(s(),o("div",me,a(i.product[0].store_name),1)):u("",!0)])):u("",!0),e("div",ke,[e("div",ge,"¥"+a(i.pay_price),1),e("div",$e,"共"+a(i.total_num)+"款商品",1)])]),e("div",be,[e("div",we,[i.paid?(s(),o("div",Ce,[w(a(i.paid_name)+" ",1),i.pay_type_name?(s(),N(L,{key:0},{default:y(()=>[w("("+a(i.pay_type_name)+")",1)]),_:2},1024)):i.pay_type==9?(s(),o("span",xe,"(微信收款)")):i.pay_type==17?(s(),o("span",Re,"(现金支付)")):i.pay_type==13?(s(),o("span",Ie,"(支付宝收款)")):i.pay_type==3?(s(),o("span",ze,"(余额支付)")):i.pay_type==1?(s(),o("span",Oe,"(微信支付)")):u("",!0)])):(s(),o("div",Ve,a(i.paid_name),1))]),i.is_writeoff==0?(s(),o("div",Be,"核销码:"+a(i.verify_code),1)):(s(),o("div",De,"已核销:"+a(i.verify_code),1))])],10,ue))),128)),I.value?(s(),o("div",Le,"没有更多了")):u("",!0),r.value?(s(),o("div",Se,"加载中...")):u("",!0)])),[[S,r.value],[J,p]])])}}},Ee=q(Ae,[["__scopeId","data-v-f1ecc2f9"]]),v=C=>(Z("data-v-1950b4ed"),C=C(),ee(),C),Fe={class:"my-order"},Ne={key:0,class:"detail"},Ke={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)),Ue={class:"table-info"},Pe={class:"info-item"},Te=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},We=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Qe={class:"info-item-info"},Xe={class:"info-item"},Ye=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),at={class:"info-item-info"},lt={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},_t=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),rt={class:"info-item-info"},vt={key:0},ut={key:1},ft={key:2},pt={key:3},ht={key:4},yt={key:5},mt={key:0,class:"table-title"},kt={key:1,class:"table-info"},gt={class:"info-item"},$t=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),bt={class:"info-item-info"},wt={class:"info-item"},Ct=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),xt={class:"info-item-info"},Rt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),zt={class:"info-item-info"},Ot={style:{"font-size":"0.9rem"}},Vt={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Dt={style:{"margin-left":"0.5rem"}},Lt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),St={class:"footer"},At={key:1},Et={key:1},Ft={__name:"detail",setup(C){W(),X();const t=l({id:""});l([]),l(null);const h=l(!1);l(0),l(0),l(["商品信息","订单详情"]),l(""),l(!1);const n=l({page_no:1,page_size:15,loadend:!1,loading:!1}),r=l([]),m=()=>console.log("触底"),k=()=>{ie({verify_code:t.value.verify_code}).then(c=>{c.show==0&&c.msg=="核销成功"&&F.success(c.msg),t.value.is_writeoff=1})},I=()=>{ae({id:t.value.id}).then(c=>{b.emit("letPrintReceipt",c.data)})};return H(()=>{b.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,n.value.page_no=1,n.value.loadend=!1,n.value.loading=!1,r.value=[]})}),Y(()=>{b.off("set-sale-order-detail")}),(c,p)=>{var B;const z=f("el-image"),g=f("el-table-column"),R=f("el-table"),O=f("el-button"),x=f("el-empty"),d=E("infinite-scroll"),V=E("loading");return s(),o("div",Fe,[t.value.id?$((s(),o("div",Ne,[$((s(),o("div",Ke,[Me,e("div",Ue,[e("div",Pe,[Te,e("div",je,a(t.value.order_id),1)]),e("div",qe,[We,e("div",Ge,a(t.value.total_num||0),1)]),e("div",He,[Je,e("div",Qe,"¥"+a(t.value.pay_price),1)]),e("div",Xe,[Ye,e("div",Ze,a(t.value.pay_time),1)]),e("div",et,[tt,e("div",st,"¥"+a(t.value.deduction_price),1)]),e("div",ot,[it,e("div",at,"¥"+a(t.value.pay_price),1)]),e("div",lt,[nt,e("div",ct,a(t.value.pay_time),1)]),e("div",dt,[_t,e("div",rt,[t.value.pay_type_name?(s(),o("span",vt,a(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ut,"微信收款")):t.value.pay_type==17?(s(),o("span",ft,"现金支付")):t.value.pay_type==13?(s(),o("span",pt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ht,"余额支付")):t.value.pay_type==1?(s(),o("span",yt,"微信支付")):u("",!0)])])]),t.value.uid?(s(),o("div",mt,"用户信息")):u("",!0),t.value.uid?(s(),o("div",kt,[e("div",gt,[$t,e("div",bt,a(t.value.uid),1)]),e("div",wt,[Ct,e("div",xt,a(t.value.nickname),1)]),e("div",Rt,[It,e("div",zt,a(t.value.mobile),1)])])):u("",!0),e("div",Ot,[w(" 共计 "),e("span",Vt,a(((B=t.value.product)==null?void 0:B.length)||" "),1),w(" 款商品 ")]),_(R,{data:t.value.product},{default:y(()=>[_(g,{label:"商品信息"},{default:y(({row:D})=>{var L,S;return[e("div",Bt,[_(z,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(L=D.cart_info)==null?void 0:L.image},null,8,["src"]),e("span",Dt,a((S=D.cart_info)==null?void 0:S.name),1)])]}),_:1}),_(g,{prop:"cart_info.price",label:"单价",width:"150"}),_(g,{prop:"cart_info.cart_num",label:"数量",width:"150"}),_(g,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Lt])),[[d,m]]),e("div",St,[t.value.is_writeoff==0?(s(),N(O,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:k},{default:y(()=>[w("立即核销")]),_:1},8,["disabled"])):u("",!0),t.value.is_writeoff==1?(s(),o("div",At,"该订单已核销")):u("",!0),t.value.is_writeoff==1?(s(),N(O,{key:2,style:{"margin-left":"1rem"},type:"warning",size:"large",onClick:I},{default:y(()=>[w("打印小票")]),_:1})):u("",!0)])])),[[V,h.value]]):(s(),o("div",Et,[_(x,{description:"没找到核销订单信息"})]))])}}},Nt=q(Ft,[["__scopeId","data-v-1950b4ed"]]),Kt={class:"my-card"},Mt={class:"my-code"},Ut=e("h2",null,"订单核销",-1),Pt={class:"box"},Tt=e("span",null,"查看核销记录",-1),Ht={__name:"index",setup(C){const t=l(1),h=l(""),n=l(null),r=l(null),m=()=>{if(h.value=="")return F.error("请输入订单编号");t.value=2,M(()=>{r.value.setCode(h.value)})},k=()=>{t.value=3,M(()=>{r.value.setCode("")})},I=()=>{m()};return H(()=>{M(()=>{n.value.focus()})}),(c,p)=>{const z=f("ArrowRightBold"),g=f("el-icon");return s(),o("div",Kt,[$(e("div",Mt,[Ut,e("div",Pt,[$(e("input",{ref_key:"inputRef",ref:n,"onUpdate:modelValue":p[0]||(p[0]=R=>h.value=R),placeholder:"请输入核销码",class:"input",onKeyup:G(m,["enter"])},null,544),[[te,h.value]]),e("div",{class:"btn",onClick:m},"查询")]),e("div",{class:"to-list",onClick:k},[Tt,_(g,null,{default:y(()=>[_(z)]),_:1})])],512),[[A,t.value==1]]),$(_(Ee,{type:t.value,style:{"flex-shrink":"0"},ref_key:"orderRef",ref:r,onBackOne:p[1]||(p[1]=R=>{t.value=1,h.value=""})},null,8,["type"]),[[A,t.value!=1]]),$(_(le,null,null,512),[[A,t.value!=1]]),$(_(Nt,{ref:"detailRef",onReInit:I},null,512),[[A,t.value!=1]])])}}};export{Ht as default}; diff --git a/build/assets/index-DeDWsEYB.js b/build/assets/index-DeDWsEYB.js new file mode 100644 index 0000000..21baa79 --- /dev/null +++ b/build/assets/index-DeDWsEYB.js @@ -0,0 +1 @@ +import{u as ge,r as c,G as Ie,b as g,c as n,k as $,f as a,w as t,F as te,l as ie,d as R,E as D,_ as ke,o as $e,m as J,a as Ve,h as me,e,g as h,p as ee,i as Ee,j as he,z as de,t as k,q as we,s as Ce,J as He,n as pe,I as Qe}from"./index-BnGigPfR.js";import{a as Se,b as Xe,c as Ye,u as Ze,d as Pe,e as Ne,f as el,g as ll,h as al,i as tl}from"./user-Cxe1-N3Y.js";import"./moment-Cl4UOzQZ.js";import{r as fe}from"./axiosAPI-DJRwxDIy.js";import{_ as je}from"./authCode-D1GYIlL-.js";import{g as sl,u as ol,k as il}from"./store-DOZFgKpz.js";import{p as nl}from"./padding-CO-3gQOa.js";function Ue(x){return fe.get("/city",{params:x})}function xe(x){return fe.get("/area",{params:x})}function ze(x){return fe.get("/street",{params:x})}function Ae(x){return fe.get("/village",{params:x})}function Re(x){return fe.get("/brigade",{params:x})}const ul={class:"add-user"},dl={__name:"add",emits:["close"],setup(x,{expose:u,emit:w}){const L=ge(),F=c(null),r=Ie({mobile:"",code:"",real_name:"",user_ship:"",selectedValues:[]}),j=Ie({mobile:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}],real_name:[{required:!0,message:"请输入用户姓名",trigger:"blur"}],user_ship:[{required:!0,message:"请选择用户类型",trigger:"change"}],selectedValues:[{required:!0,message:"请选择用户地址",trigger:"change"}]}),X=c([]),q=async(I,_)=>{const P=I.level;let V;if(P!==0&&!I.data.code)return _([]);P===0?(V=await Ue({province_code:51e4}),V=V.data.map(S=>({code:S.city_code,name:S.city_name}))):P===1?(V=await xe({city_code:I.data.code}),V=V.data.map(S=>({code:S.area_code,name:S.area_name}))):P===2?(V=await ze({area_code:I.data.code}),V=V.data.map(S=>({code:S.street_code,name:S.street_name}))):P===3?(V=await Ae({street_code:I.data.code}),V=V.data.map(S=>({code:S.village_code,name:S.village_name}))):P===4&&(V=await Re({village_code:I.data.code}),V=V.data.map(S=>({code:S.id,name:S.brigade_name,leaf:!0}))),_(V)},W={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:q},C=c([]);(()=>{Se({type_id:4}).then(I=>{var _;C.value=(_=I.data.lists)==null?void 0:_.filter(P=>P.id==0||P.id==4)})})();const O=w,E=()=>{F.value.validate(async I=>{if(I){let _={};_.mobile=r.mobile,_.code=r.code,_.user_ship=r.user_ship,_.real_name=r.real_name,_.province="510000",_.city=r.selectedValues[0],_.area=r.selectedValues[1],_.street=r.selectedValues[2],_.village=r.selectedValues[3],_.brigade=r.selectedValues[4],_.store_id=L.userInfo.store_id,Xe(_).then(P=>{r.mobile="",r.code="",r.user_ship="",r.real_name="",r.selectedValues=[],F.value.resetFields(),O("close")})}})},se=c(null),re=()=>{F.value.validateField("mobile",I=>{I&&Ye({mobile:r.mobile}).then(_=>{D.success("发送成功"),se.value.startCountDown()}).catch(_=>{D.error("发送失败")})})};return u({addUser:E}),(I,_)=>{const P=g("el-input"),V=g("el-form-item"),S=g("el-option"),G=g("el-select"),U=g("el-cascader"),d=g("el-form");return n(),$("div",ul,[a(d,{model:r,rules:j,ref_key:"formDataRef",ref:F,"label-width":"80px"},{default:t(()=>[a(V,{label:"用户电话",prop:"mobile"},{default:t(()=>[a(P,{modelValue:r.mobile,"onUpdate:modelValue":_[0]||(_[0]=f=>r.mobile=f),placeholder:"请输入用户电话"},null,8,["modelValue"])]),_:1}),a(V,{label:"验证码",prop:"code"},{default:t(()=>[a(P,{modelValue:r.code,"onUpdate:modelValue":_[1]||(_[1]=f=>r.code=f),placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),a(je,{ref_key:"authCodeRef",ref:se,style:{"margin-left":"1rem"},onSendCode:re,start:!1},null,512)]),_:1}),a(V,{label:"用户姓名",prop:"real_name"},{default:t(()=>[a(P,{modelValue:r.real_name,"onUpdate:modelValue":_[2]||(_[2]=f=>r.real_name=f),placeholder:"请输入用户姓名"},null,8,["modelValue"])]),_:1}),a(V,{label:"用户类型",prop:"user_ship"},{default:t(()=>[a(G,{modelValue:r.user_ship,"onUpdate:modelValue":_[3]||(_[3]=f=>r.user_ship=f),placeholder:"请选择用户类型",style:{width:"100%"}},{default:t(()=>[(n(!0),$(te,null,ie(C.value,f=>(n(),R(S,{key:f.id,label:f.title,value:f.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(V,{label:"用户地址",prop:"selectedValues"},{default:t(()=>[a(U,{style:{width:"100%"},modelValue:r.selectedValues,"onUpdate:modelValue":_[4]||(_[4]=f=>r.selectedValues=f),options:X.value,props:W,load:q,class:"w-full"},null,8,["modelValue","options"])]),_:1})]),_:1},8,["model","rules"])])}}},Fe=x=>(we("data-v-a0be2eef"),x=x(),Ce(),x),rl={class:"my-order"},cl={class:"header-nav"},vl=Fe(()=>e("div",{class:"nav-item"},k("用户列表"),-1)),_l={class:"header-row"},pl=Fe(()=>e("div",{class:"label"},"用户类型",-1)),ml={class:"header-row"},fl=Fe(()=>e("div",{class:"label"},"用户地区",-1)),yl={class:"header-input"},hl={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},gl=["onClick"],bl={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},kl={class:"top flex"},$l={class:"r-1"},Vl={class:"bold"},wl={class:"bottom flex",style:{"justify-content":"space-between"}},Cl={class:"red"},Sl={class:"red"},Ul={class:"red"},xl={class:"red"},zl={key:0,class:"load-end"},Al={key:1,class:"load-end"},Rl={class:"dialog-footer"},Fl={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(x){const u=ge();c([]);const w=c({page_no:1,page_size:20,mobile:"",user_ship:"",street:null}),L=c(!1),F=c(0),r=c(0),j=c(!1),X=c([]),q=(U=!1)=>{if(U)w.value.page_no=1;else if(j.value||L.value)return;L.value=!0,w.value.mobile==""&&w.value.user_ship==""?w.value.store_id=u.userInfo.store_id:w.value.store_id=null,Ze(w.value).then(d=>{U?X.value=d.data.lists:X.value=[...X.value,...d.data.lists],w.value.page_no==1&&X.value.length>0&&J.emit("set-user-detail",X.value[0]),d.data.lists.length{j.value=!0,L.value=!1})},W=(U,d)=>{r.value=d,J.emit("set-user-detail",U)},C=c(!1),z=c(null),O=()=>{var U;(U=z.value)==null||U.addUser()},E=()=>{C.value=!1,q(!0)},se=c([]);(()=>{Se({type_id:4}).then(U=>{se.value=U.data.lists})})();const I=()=>{w.value.mobile="",w.value.user_ship="",w.value.street=null,_.value=[],q(!0)},_=c([]),P=c([]),V=async(U,d)=>{const f=U.level;let p;if(f!==0&&!U.data.code)return d([]);f===0?(p=await Ue({province_code:51e4}),p=p.data.map(y=>({code:y.city_code,name:y.city_name}))):f===1?(p=await xe({city_code:U.data.code}),p=p.data.map(y=>({code:y.area_code,name:y.area_name}))):f===2?(p=await ze({area_code:U.data.code}),p=p.data.map(y=>({code:y.street_code,name:y.street_name,leaf:!0}))):f===3?(p=await Ae({street_code:U.data.code}),p=p.data.map(y=>({code:y.village_code,name:y.village_name}))):f===4&&(p=await Re({village_code:U.data.code}),p=p.data.map(y=>({code:y.id,name:y.brigade_name,leaf:!0}))),d(p)},S={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:V},G=()=>{_.value.length?w.value.street=_.value[_.value.length-1]:w.value.street="",q(!0)};return $e(()=>{J.on("re-load-user-list",U=>{U&&q(!0)})}),Ve(()=>{J.off("re-load-user-list")}),(U,d)=>{const f=g("Plus"),p=g("el-icon"),y=g("el-button"),Y=g("el-option"),K=g("el-select"),Z=g("el-cascader"),B=g("CircleClose"),ce=g("el-input"),ne=g("el-avatar"),oe=g("el-tag"),le=g("el-dialog"),i=me("loading"),m=me("infinite-scroll");return n(),$("div",rl,[e("div",cl,[vl,a(y,{type:"primary",onClick:d[0]||(d[0]=l=>C.value=!0)},{default:t(()=>[a(p,null,{default:t(()=>[a(f)]),_:1}),h(" 添加用户")]),_:1})]),e("div",_l,[pl,a(K,{modelValue:w.value.user_ship,"onUpdate:modelValue":d[1]||(d[1]=l=>w.value.user_ship=l),onChange:d[2]||(d[2]=l=>q(!0)),placeholder:"请选择用户类型",style:{flex:"1"}},{default:t(()=>[(n(!0),$(te,null,ie(se.value,l=>(n(),R(Y,{key:l.id,label:l.title,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a(y,{onClick:I,style:{"margin-left":"1rem"}},{default:t(()=>[h("重置")]),_:1})]),e("div",ml,[fl,a(Z,{style:{flex:"1"},options:P.value,modelValue:_.value,"onUpdate:modelValue":d[3]||(d[3]=l=>_.value=l),props:S,load:V,class:"w-full",onChange:G},null,8,["options","modelValue"])]),e("div",yl,[a(ce,{modelValue:w.value.mobile,"onUpdate:modelValue":d[6]||(d[6]=l=>w.value.mobile=l),placeholder:"搜索手机号",onKeydown:d[7]||(d[7]=Ee(l=>q(!0),["enter"])),onClear:d[8]||(d[8]=l=>q(!0))},{suffix:t(()=>[w.value.mobile!=""?(n(),R(p,{key:0,size:"18",onClick:d[4]||(d[4]=l=>{w.value.mobile="",q(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:t(()=>[a(B)]),_:1})):ee("",!0)]),append:t(()=>[a(y,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[5]||(d[5]=l=>q(!0))},{default:t(()=>[h("搜索")]),_:1})]),_:1},8,["modelValue"])]),he((n(),$("div",hl,[(n(!0),$(te,null,ie(X.value,(l,A)=>{var H;return n(),$("div",{class:de(["item",{"item-active":r.value==A}]),key:A,onClick:v=>W(l,A)},[a(ne,{class:"avatar",src:l.avatar},null,8,["src"]),e("div",bl,[e("div",kl,[e("div",$l,[e("span",Vl,k(l.real_name||l.nickname),1),e("span",null,k(" (ID:"+l.id+")"),1)]),e("div",null,"手机号: "+k(l.mobile),1)]),e("div",wl,[e("div",null,[h("余额: "),e("span",Cl,k(l.now_money),1)]),e("div",null,[h("采购款: "),e("span",Sl,k(l.purchase_funds),1)]),e("div",null,[h("返还金: "),e("span",Ul,k((H=l.return_money)==null?void 0:H.toFixed(2)),1)]),e("div",null,[h("礼品券: "),e("span",xl,k(l.integral),1)]),e("div",null,[l.user_ship==0||l.user_ship==4?(n(),R(oe,{key:0,type:"primary"},{default:t(()=>[h(k(l.user_ship_name),1)]),_:2},1024)):(n(),R(oe,{key:1,type:"success"},{default:t(()=>[h(k(l.user_ship_name),1)]),_:2},1024))])])])],10,gl)}),128)),j.value?(n(),$("div",zl,"没有更多了")):ee("",!0),L.value?(n(),$("div",Al,"加载中...")):ee("",!0)])),[[i,L.value],[m,q]]),a(le,{modelValue:C.value,"onUpdate:modelValue":d[10]||(d[10]=l=>C.value=l),title:"添加用户",width:"600"},{footer:t(()=>[e("div",Rl,[a(y,{onClick:d[9]||(d[9]=l=>C.value=!1)},{default:t(()=>[h("取消")]),_:1}),a(y,{type:"primary",onClick:O},{default:t(()=>[h(" 添加 ")]),_:1})])]),default:t(()=>[a(dl,{ref_key:"addRef",ref:z,onClose:E},null,512)]),_:1},8,["modelValue"])])}}},Ll=ke(Fl,[["__scopeId","data-v-a0be2eef"]]),ve=x=>(we("data-v-5ad4b8f5"),x=x(),Ce(),x),Ol=ve(()=>e("h4",null,"选择支付方式",-1)),Dl={class:"dra-body"},Il={class:"header"},Pl={style:{display:"inline-block"}},Nl=ve(()=>e("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),El={style:{color:"#f5222d","padding-bottom":"2rem"}},jl={style:{"font-size":"1.6rem"}},ql={key:0,"element-loading-text":"支付中",class:"card1"},Bl=ve(()=>e("div",{class:"tips"},null,-1)),Jl={key:1,class:"card2"},Tl={class:"drawer-body"},Kl={class:"counter"},Ml={class:"received"},Wl={key:0},Gl={key:1,style:{"font-size":"1rem",color:"#999"}},Hl={key:0,class:"balance"},Ql={class:"money"},Xl=ve(()=>e("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Yl={key:1,class:"balance"},Zl=ve(()=>e("div",null,"不够找零, 请支付更多金额",-1)),ea=ve(()=>e("div",{class:"tips"},"按下小键盘输入金额",-1)),la=[Zl,ea],aa={class:"keypad"},ta={class:"left"},sa={class:"right"},oa={style:{width:"100%",display:"flex","justify-content":"center"}},ia={__name:"payUser",emits:["paySuccess"],setup(x,{expose:u,emit:w}){const L=c(!1),F=c(1),r=c(""),j=c("");ge();const X=()=>{d()},q=()=>{pe(()=>{setTimeout(()=>{var m;f.value=!1,r.value="",I.value=!0,(m=j.value)==null||m.focus(),W(F.value)},300)})},W=m=>{m!=1&&j.value.blur(),F.value=m,console.log(F.value),F.value==2?window.addEventListener("keydown",ne):(window.removeEventListener("keydown",ne),pe(()=>{var l;r.value="",(l=j.value)==null||l.focus()}))},C=c({price:0,uid:"",user_ship:"",village:null,brigade:null}),z=c([]),O=c(!1),E=m=>{C.value=m.data,C.value.total=m.data.price,z.value=m.cart_id,O.value=m.isRePay||!1},se=m=>{C.value.total=m.price,S.value=m.order_id},re=w,I=c(!1),_=c(["1","2","3","4","5","6","7","8","9","0","00","."]),P=/^(10|11|12|13|14|15)\d{16}$/,V=/^(25|26|27|28|29|30)\d{14,22}$/,S=c(""),G=()=>{if(f.value=!0,j.value.blur(),O.value)U();else{let m;if(P.test(r.value))m="9";else if(V.test(r.value))m="13";else return f.value=!1,r.value="",j.value.focus(),D.error("请输入正确的支付码");Pe({uid:C.value.uid,user_ship:C.value.user_ship,village:C.value.village,brigade:C.value.brigade,price:C.value.price,pay_type:m,auth_code:r.value}).then(l=>{l.data.out_trade_no&&l.msg=="支付成功"?(L.value=!1,D({message:"支付成功",type:"success"}),d(l.data)):l.msg=="用户支付中"&&l.code==1&&(D.warning(l.msg),J.on("pay_user_success",A=>{D({message:"支付成功",type:"success"}),setTimeout(()=>{J.off("pay_user_success")},200),L.value=!1,d(A)}))}).catch(l=>{f.value=!1,pe(()=>{var A;(A=j.value)==null||A.focus()})})}},U=()=>{let m=17;if(F.value==1)if(P.test(r.value))m="9";else if(V.test(r.value))m="13";else return f.value=!1,r.value="",j.value.focus(),D.error("请输入正确的支付码");sl({order_id:C.value.order_id,pay_type:m,auth_code:r.value}).then(l=>{var A;(A=l.msg)!=null&&A.includes("成功")?(L.value=!1,D({message:"支付成功",type:"success"}),d({msg:"支付成功"})):l.msg=="用户支付中"&&l.code==1&&(D.warning(l.msg),J.on("pay_user_success",H=>{D({message:"支付成功",type:"success"}),setTimeout(()=>{J.off("pay_user_success")},200),L.value=!1,d(H)}))}).catch(l=>{r.value="",f.value=!1,pe(()=>{var A;(A=j.value)==null||A.focus()})})};c(0);const d=(m=null)=>{var l;window.removeEventListener("keydown",ne),I.value=!1,f.value=!1,r.value="",y.value="",p.value=[],(l=j.value)==null||l.blur(),typeof m=="function"&&(m=null),re("paySuccess",m),L.value=!1},f=c(!1);u({drawer:L,setForm:E,setRePay:se,beforeClose:d});const p=c([]),y=c(""),Y=He(()=>+y.value>0?(y.value-C.value.total).toFixed(2):-1),K=c(!1),Z=m=>{m===-1?p.value=[]:p.value.pop(),y.value=p.value.length?p.value.join(""):0},B=m=>{K.value===!1&&(y.value="",K.value=!0);let l=String(y.value).indexOf(".")+1,A=String(y.value).length-l;console.log(l,A),(l===0||A<2)&&(p.value.join("")<=9999999&&p.value.push(m),y.value=p.value.join("")>99999999?99999999:p.value.join(""))},ce=()=>{if(Y.value===""||Y.value===null||Y.value===void 0||+y.value<+C.value.total)return D.error("收款金额应该大于等于应收金额");O.value?U():Pe({uid:C.value.uid,user_ship:C.value.user_ship,village:C.value.village,brigade:C.value.brigade,price:C.value.price,pay_type:17}).then(m=>{console.log("========"),L.value=!1,D({message:m.msg,type:"success"}),F.value=1,d({msg:"收款成功"})}).catch(m=>{f.value=!1})},ne=m=>{let A=(m||window.event).keyCode;if(A==37)return W(2);if(A==120)return J.emit("F9");if(A==27)return d();switch(m.stopPropagation(),m.preventDefault(),A){case 96:case 48:B(0);break;case 97:case 49:B(1);break;case 98:case 50:B(2);break;case 99:case 51:B(3);break;case 100:case 52:B(4);break;case 101:case 53:B(5);break;case 102:case 54:B(6);break;case 103:case 55:B(7);break;case 104:case 56:B(8);break;case 105:case 57:B(9);break;case 110:B(".");break;case 190:B(".");break;case 8:Z();break;case 13:ce();break}},oe=c(!1),le=()=>{if(!(!L.value||oe.value&&r.value.length>0)&&F.value==2)return W(1)},i=()=>{if(!(!L.value||oe.value&&r.value.length>0)&&F.value==1)return W(2)};return $e(()=>{J.on("left",le),J.on("right",i)}),Ve(()=>{J.off("left",le),J.off("right",i)}),(m,l)=>{const A=g("el-input"),H=g("el-button"),v=g("Delete"),s=g("el-icon"),M=g("el-drawer"),N=me("loading");return n(),R(M,{size:"60rem",modelValue:L.value,"onUpdate:modelValue":l[6]||(l[6]=b=>L.value=b),direction:"rtl",onOpen:q,"before-close":d},{header:t(()=>[Ol]),default:t(()=>{var b;return[e("div",Dl,[e("div",Il,[e("div",{class:de(["left",{active:F.value==1}]),onClick:l[0]||(l[0]=Q=>W(1))}," 微信/支付宝 ",2),e("div",{class:de(["right",{active:F.value==2}]),onClick:l[1]||(l[1]=Q=>W(2))}," 现金收款 ",2)]),e("div",null,[e("div",Pl,[Nl,e("div",El,[h(" ¥"),e("span",jl,k((b=C.value)==null?void 0:b.price),1)])])]),F.value==1?he((n(),$("div",ql,[a(A,{ref_key:"codeRef",ref:j,modelValue:r.value,"onUpdate:modelValue":l[2]||(l[2]=Q=>r.value=Q),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Ee(G,["enter"]),onFocus:l[3]||(l[3]=Q=>oe.value=!0),onBlur:l[4]||(l[4]=Q=>oe.value=!1)},null,8,["modelValue"]),Bl])),[[N,f.value]]):(n(),$("div",Jl,[e("div",Tl,[e("div",Kl,[e("div",Ml,[y.value?(n(),$("span",Wl,k(y.value),1)):(n(),$("span",Gl,"按下键盘输入客户支付金额"))]),Y.value>=0?(n(),$("div",Hl,[e("div",null,[h(" 需找零(元):"),e("span",Ql,"¥"+k(Y.value),1)]),Xl])):(n(),$("div",Yl,la)),e("div",aa,[e("div",ta,[(n(!0),$(te,null,ie(_.value,Q=>(n(),R(H,{key:Q,onClick:be=>B(Q)},{default:t(()=>[h(k(Q),1)]),_:2},1032,["onClick"]))),128))]),e("div",sa,[a(H,{onClick:Z},{default:t(()=>[a(s,null,{default:t(()=>[a(v)]),_:1})]),_:1}),a(H,{onClick:l[5]||(l[5]=Q=>Z(-1))},{default:t(()=>[h("C")]),_:1}),a(H,{class:de(["enter",{"enter-disable":+y.value<+C.value.total}]),disabled:+y.value<+C.value.total,onClick:ce},{default:t(()=>[h(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]}),footer:t(()=>[e("div",oa,[a(H,{class:"cancel-btn",onClick:X},{default:t(()=>[h("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},na=ke(ia,[["__scopeId","data-v-5ad4b8f5"]]),T=x=>(we("data-v-80ac9503"),x=x(),Ce(),x),ua={class:"my-order"},da={class:"header-nav"},ra=["onClick"],ca={key:0,class:"detail"},va={class:"table"},_a=T(()=>e("div",{class:"table-title"},"用户信息",-1)),pa={class:"table-info"},ma={class:"info-item"},fa=T(()=>e("div",{class:"info-item-title"},"用户余额:",-1)),ya={class:"info-item-info red"},ha={class:"info-item"},ga=T(()=>e("div",{class:"info-item-title"},"采购款:",-1)),ba={class:"info-item-info red"},ka={class:"info-item"},$a=T(()=>e("div",{class:"info-item-title"},"返还金:",-1)),Va={class:"info-item-info red"},wa={class:"info-item"},Ca=T(()=>e("div",{class:"info-item-title"},"头像:",-1)),Sa={class:"info-item-info"},Ua={class:"info-item"},xa=T(()=>e("div",{class:"info-item-title"},"礼品券:",-1)),za={class:"info-item-info red"},Aa={class:"info-item"},Ra=T(()=>e("div",{class:"info-item-title"},"冻结礼品券:",-1)),Fa={class:"info-item-info red"},La={class:"info-item"},Oa=T(()=>e("div",{class:"info-item-title"},"ID:",-1)),Da={class:"info-item-info"},Ia={class:"info-item"},Pa=T(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Na={class:"info-item-info"},Ea={class:"info-item"},ja=T(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),qa={class:"info-item-info"},Ba={class:"info-item"},Ja=T(()=>e("div",{class:"info-item-title"},"用户账号:",-1)),Ta={class:"info-item-info"},Ka={class:"info-item"},Ma=T(()=>e("div",{class:"info-item-title"},"真实姓名:",-1)),Wa={class:"info-item-info"},Ga={class:"info-item"},Ha=T(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qa={class:"info-item-info"},Xa={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Ya=T(()=>e("div",{class:"info-item-title"},"用户类型:",-1)),Za={class:"info-item-info"},et={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},lt=T(()=>e("div",{class:"info-item-title"},"用户地址:",-1)),at={key:1,class:"detail"},tt={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},st={style:{display:"flex","align-items":"center"}},ot={style:{"margin-left":"0.5rem"}},it={key:0,style:{display:"flex","align-items":"center"}},nt={class:"footer"},ut={key:0},dt={key:1},rt={key:2},ct={class:"dialog-footer"},vt={key:0},_t={class:"ship-money-list"},pt=["onClick"],mt={class:"item1"},ft={class:"item2"},yt={class:"dialog-footer"},ht={__name:"detail",setup(x){ge(),Qe();const u=c({id:""});c({price:"",type:1});const w=c(null),L=(v=null)=>{oe()},F=c(!1),r=c([]);(()=>{Se({type_id:4}).then(v=>{r.value=v.data.lists})})();const X=()=>{el({id:u.value.id,user_ship:u.value.user_ship}).then(v=>{var s;D.success("修改成功"),u.value.user_ship_name=(s=r.value.find(M=>M.id==u.value.user_ship))==null?void 0:s.title,F.value=!1})},q=()=>{F.value=!1},W=c([]);(()=>{ll().then(v=>{W.value=v.data,console.log(v)})})();const z=c({id:"",province:"",city:"",area:"",street:"",brigade:""}),O=c([]),E=c([]),se=()=>{al({uid:u.value.id}).then(v=>{var s;(s=v.data)!=null&&s.village?(O.value=[v.data.city,v.data.area,v.data.street,v.data.village,+v.data.brigade],E.value=JSON.parse(JSON.stringify(O.value)),z.value=v.data):(O.value=[],E.value=[],z.value={id:"",province:"",city:"",area:"",street:"",brigade:""})}).catch(v=>{O.value=[],E.value=[],z.value={id:"",province:"",city:"",area:"",street:"",brigade:""}})},re=c([]),I=async(v,s)=>{const M=v.level;let N;if(M!==0&&!v.data.code)return s([]);M===0?(N=await Ue({province_code:51e4}),N=N.data.map(b=>({code:b.city_code,name:b.city_name}))):M===1?(N=await xe({city_code:v.data.code}),N=N.data.map(b=>({code:b.area_code,name:b.area_name}))):M===2?(N=await ze({area_code:v.data.code}),N=N.data.map(b=>({code:b.street_code,name:b.street_name}))):M===3?(N=await Ae({street_code:v.data.code}),N=N.data.map(b=>({code:b.village_code,name:b.village_name}))):M===4&&(N=await Re({village_code:v.data.code}),N=N.data.map(b=>({code:b.id,name:b.brigade_name,leaf:!0}))),s(N)},_={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:I},P=async()=>{z.value.city=O.value[0],z.value.area=O.value[1],z.value.street=O.value[2],z.value.village=O.value[3],z.value.brigade=O.value[4],z.value.phone||(z.value.phone=u.value.account),z.value.real_name||(z.value.real_name=u.value.real_name||u.value.nickname),tl({...z.value,uid:u.value.id}).then(v=>{E.value=JSON.parse(JSON.stringify(O.value)),D.success("编辑成功"),S.value=!0}).catch(v=>{V()})},V=()=>{O.value=JSON.parse(JSON.stringify(E.value)),E.value.length>0&&(z.value.city=E.value[0],z.value.area=E.value[1],z.value.street=E.value[2],z.value.village=E.value[3],z.value.brigade=E.value[4]),S.value=!0},S=c(!0),G=c(0),U=c(["基本信息","用户资产"]),d=c(!1),f=c([]),p=c({page_no:1,page_size:10,loading:!1,loadend:!1});let y=[];const Y=(v=!1)=>{v&&(f.value=[],p.value.page_no=1,p.value.loadend=!1),!(p.value.loadend||p.value.loading)&&(p.value.loading=!0,ol({uid:u.value.id,page_no:p.value.page_no,page_size:p.value.page_size}).then(s=>{f.value=[...f.value,...s.data.lists],p.value.loading=!1,p.value.page_no++,s.data.lists.length{if(K.value.mobile=u.value.phone,K.value.code="",y=f.value.filter(v=>v.n_num).map(v=>({product_id:v.product_id,nums:v.n_num})),y.length==0)return D.error("请选择商品");Z.value=!0},ce=()=>{console.log("发送短信验证码"),D.success("验证码已发送")},ne=()=>{if(K.value.code=="")return D.error("请输入验证码");il({uid:u.value.id,info:y}).then(v=>{d.value=!1,D.success("出库成功"),Z.value=!1,Y(!0)})},oe=()=>{Ne({id:u.value.id}).then(({data:v})=>{v.phone=v.mobile+"",delete v.mobile,u.value=Object.assign(u.value,v)})},le=c(!1),i=c({user_ship:"",user_ship_name:"",limit:"",money:"",type:""}),m=()=>{i.value.money=Number(i.value.money).toFixed(2),(+i.value.money<+i.value.limit||+i.value.money>1e4)&&(+i.value.limit>0?i.value.money=i.value.limit:i.value.money="")},l=v=>{if(i.value.type=="add"){let s=r.value.find(M=>M.id==v);s&&(i.value.limit=s.limit,i.value.user_ship_name=s.title,i.value.money=s.limit)}},A=()=>{if(i.value.user_ship===""||i.value.user_ship===null||i.value.user_ship===void 0||i.value.user_ship===0||i.value.user_ship===4)return D.error("请选择会员类型");if(i.value.money==0||i.value.money=="")return D.error(i.value.type=="add"?"请输入充值金额":"请选择金额");if(i.value.type=="add"&&(+i.value.money<+i.value.limit||+i.value.money>1e4))return+i.value.limit>0?i.value.money=i.value.limit:i.value.money="",D.error(`该类型至少需要充值${i.value.limit}元`);w.value.setForm({data:{uid:u.value.id,price:i.value.money,user_ship:i.value.user_ship,village:z.value.village,brigade:z.value.brigade}}),w.value.drawer=!0,pe(()=>{le.value=!1})},H=v=>{if(E.value.length==0)return D.error("请先选择用户地址");i.value.type=v,v=="add"&&(i.value.user_ship=u.value.user_ship,i.value.user_ship_name=u.value.user_ship_name,l(i.value.user_ship)),le.value=!0};return $e(()=>{J.on("set-user-detail",v=>{u.value=v,d.value=!1,Ne({id:u.value.id}).then(({data:s})=>{s.phone=s.mobile+"",delete s.mobile,u.value=Object.assign(v,s)}),O.value=[],E.value=[],se(),Y(!0),i.value={user_ship:"",user_ship_name:"",limit:"",money:"",type:""}})}),Ve(()=>{J.off("set-user-detail")}),(v,s)=>{var De;const M=g("el-avatar"),N=g("el-tag"),b=g("el-button"),Q=g("el-option"),be=g("el-select"),qe=g("el-cascader"),Be=g("el-image"),ye=g("el-table-column"),Je=g("el-input-number"),Te=g("el-table"),Ke=g("el-empty"),_e=g("el-input"),ue=g("el-form-item"),Le=g("el-form"),Oe=g("el-dialog"),Me=me("infinite-scroll"),We=me("loading");return n(),$("div",ua,[e("div",da,[(n(!0),$(te,null,ie(U.value,(o,ae)=>(n(),$("div",{key:ae,class:de(["nav-item",{"nav-item-active":G.value==ae,"nav-item-radius1":G.value==ae+1,"nav-item-radius2":G.value==ae-1}]),onClick:Ge=>G.value=ae},k(o),11,ra))),128)),e("div",{class:de(["nav-item",{"nav-item-radius2":G.value==U.value.length-1}]),style:{flex:"1"}},null,2)]),u.value.id&&G.value==0?(n(),$("div",ca,[e("div",va,[_a,e("div",pa,[e("div",ma,[fa,e("div",ya,"¥"+k(u.value.now_money),1)]),e("div",ha,[ga,e("div",ba,"¥"+k(u.value.purchase_funds),1)]),e("div",ka,[$a,e("div",Va,"¥"+k((De=u.value.return_money)==null?void 0:De.toFixed(2)),1)]),e("div",wa,[Ca,e("div",Sa,[a(M,{style:{width:"4rem",height:"4rem"},src:u.value.avatar},null,8,["src"])])]),e("div",Ua,[xa,e("div",za,"¥"+k(u.value.integral),1)]),e("div",Aa,[Ra,e("div",Fa,"¥"+k(u.value.get_frozen),1)]),e("div",La,[Oa,e("div",Da,k(u.value.id),1)]),e("div",Ia,[Pa,e("div",Na,k(u.value.nickname),1)]),e("div",Ea,[ja,e("div",qa,k(u.value.phone),1)]),e("div",Ba,[Ja,e("div",Ta,k(u.value.account),1)]),e("div",Ka,[Ma,e("div",Wa,k(u.value.real_name),1)]),e("div",Ga,[Ha,e("div",Qa,k(u.value.create_time),1)]),e("div",Xa,[Ya,e("div",Za,[F.value==!1?(n(),$(te,{key:0},[u.value.user_ship==0||u.value.user_ship==4?(n(),R(N,{key:0,type:"primary",size:"large"},{default:t(()=>[h(k(u.value.user_ship_name),1)]),_:1})):(n(),R(N,{key:1,type:"success",size:"large"},{default:t(()=>[h(k(u.value.user_ship_name),1)]),_:1})),u.value.user_ship==0||u.value.user_ship==4?(n(),R(b,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:s[0]||(s[0]=o=>F.value=!0)},{default:t(()=>[h("修改")]),_:1})):ee("",!0)],64)):(n(),$(te,{key:1},[a(be,{modelValue:u.value.user_ship,"onUpdate:modelValue":s[1]||(s[1]=o=>u.value.user_ship=o),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:t(()=>[(n(!0),$(te,null,ie(r.value,o=>(n(),R(Q,{key:o.id,label:o.title,value:o.id,disabled:o.id!=0&&o.id!=4},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"]),a(b,{type:"primary",style:{"margin-left":"1rem"},onClick:X},{default:t(()=>[h("确认")]),_:1}),a(b,{style:{"margin-left":"1rem"},onClick:q},{default:t(()=>[h("取消")]),_:1})],64))])]),e("div",et,[lt,(n(),R(qe,{key:u.value.id,style:{flex:"1"},modelValue:O.value,"onUpdate:modelValue":s[2]||(s[2]=o=>O.value=o),options:re.value,props:_,load:I,class:"w-full",disabled:S.value},null,8,["modelValue","options","disabled"])),S.value&&!E.value.length?(n(),R(b,{key:0,type:"primary",style:{"margin-left":"1rem"},onClick:s[3]||(s[3]=o=>S.value=!1)},{default:t(()=>[h("修改")]),_:1})):ee("",!0),S.value?ee("",!0):(n(),R(b,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:P},{default:t(()=>[h("确认")]),_:1})),S.value?ee("",!0):(n(),R(b,{key:2,style:{"margin-left":"1rem"},onClick:V},{default:t(()=>[h("取消")]),_:1}))]),u.value.user_ship!=0&&u.value.user_ship!=4?(n(),R(b,{key:0,type:"success",class:"big-btn",size:"large",onClick:s[4]||(s[4]=o=>H("add"))},{default:t(()=>[h("增加经营资金")]),_:1})):(n(),R(b,{key:1,type:"primary",class:"big-btn",size:"large",onClick:s[5]||(s[5]=o=>H("recharge"))},{default:t(()=>[h("成为会员")]),_:1}))])])])):ee("",!0),u.value.id&&G.value==1?he((n(),$("div",at,[he((n(),$("div",tt,[a(Te,{data:f.value},{default:t(()=>[a(ye,{label:"商品信息"},{default:t(({row:o})=>[e("div",st,[a(Be,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:o.image},null,8,["src"]),e("span",ot,k(o.store_name),1)])]),_:1}),a(ye,{prop:"price",label:"单价",width:d.value?130:200},null,8,["width"]),a(ye,{prop:"nums",label:"存量",width:d.value?100:200},null,8,["width"]),d.value?(n(),R(ye,{key:0,prop:"nums",label:"出库量",width:"250"},{default:t(({row:o})=>[o.nums?(n(),$("div",it,[a(Je,{modelValue:o.n_num,"onUpdate:modelValue":ae=>o.n_num=ae,"step-strictly":"",min:0,max:o.nums},null,8,["modelValue","onUpdate:modelValue","max"]),a(b,{type:"primary",style:{"margin-left":"1rem"},onClick:ae=>o.n_num=o.nums},{default:t(()=>[h("全部")]),_:2},1032,["onClick"])])):ee("",!0)]),_:1})):ee("",!0)]),_:1},8,["data"])])),[[Me,Y]]),e("div",nt,[d.value?(n(),$("div",dt,[a(b,{type:"primary",size:"large",onClick:B},{default:t(()=>[h("确认出库")]),_:1}),a(b,{size:"large",onClick:s[7]||(s[7]=o=>d.value=!1)},{default:t(()=>[h("取消")]),_:1})])):(n(),$("div",ut,[a(b,{type:"warning",size:"large",onClick:s[6]||(s[6]=o=>d.value=!0),disabled:f.value.length==0},{default:t(()=>[h("商品出库")]),_:1},8,["disabled"])]))])])),[[We,p.value.loading]]):(n(),$("div",rt,[a(Ke)])),a(na,{ref_key:"payRef",ref:w,onPaySuccess:L},null,512),a(Oe,{modelValue:Z.value,"onUpdate:modelValue":s[11]||(s[11]=o=>Z.value=o),title:"出库验证",width:"500"},{footer:t(()=>[e("div",ct,[a(b,{onClick:s[10]||(s[10]=o=>Z.value=!1)},{default:t(()=>[h("取消")]),_:1}),a(b,{type:"primary",onClick:ne},{default:t(()=>[h(" 确认 ")]),_:1})])]),default:t(()=>[a(Le,{model:K.value},{default:t(()=>[a(ue,{label:"手机号:"},{default:t(()=>[a(_e,{modelValue:K.value.mobile,"onUpdate:modelValue":s[8]||(s[8]=o=>K.value.mobile=o),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1}),a(ue,{label:"验证码:"},{default:t(()=>[a(_e,{modelValue:K.value.code,"onUpdate:modelValue":s[9]||(s[9]=o=>K.value.code=o),autocomplete:"off",placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),(n(),R(je,{style:{"margin-left":"1rem"},onSendCode:ce,key:K.value.mobile}))]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),a(Oe,{modelValue:le.value,"onUpdate:modelValue":s[18]||(s[18]=o=>le.value=o),title:i.value.type=="add"?"增加经营资金":"成为会员",width:"500"},{footer:t(()=>[e("div",yt,[a(b,{onClick:s[17]||(s[17]=o=>le.value=!1)},{default:t(()=>[h("取消")]),_:1}),a(b,{type:"primary",onClick:A},{default:t(()=>[h(" 确认 ")]),_:1})])]),default:t(()=>[a(Le,{model:i.value,"label-width":"100px"},{default:t(()=>[a(ue,{label:"手机号:"},{default:t(()=>[a(_e,{modelValue:u.value.phone,"onUpdate:modelValue":s[12]||(s[12]=o=>u.value.phone=o),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1}),i.value.type=="add"?(n(),R(ue,{key:0,label:"会员类型:"},{default:t(()=>[a(_e,{modelValue:i.value.user_ship_name,"onUpdate:modelValue":s[13]||(s[13]=o=>i.value.user_ship_name=o),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1})):(n(),R(ue,{key:1,label:"会员类型:",required:""},{default:t(()=>[a(be,{modelValue:i.value.user_ship,"onUpdate:modelValue":s[14]||(s[14]=o=>i.value.user_ship=o),placeholder:"请选择用户类型",style:{flex:"1"},onChange:l},{default:t(()=>[(n(!0),$(te,null,ie(r.value,o=>(n(),R(Q,{key:o.id,label:o.title,value:o.id,disabled:o.id==0||o.id==4},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})),i.value.type=="add"?(n(),R(ue,{key:2,label:"充值金额:",required:""},{default:t(()=>[a(_e,{modelValue:i.value.money,"onUpdate:modelValue":s[15]||(s[15]=o=>i.value.money=o),type:"number",onBlur:m,onFocus:s[16]||(s[16]=o=>i.value.money=""),autocomplete:"off"},{prepend:t(()=>[h("¥")]),append:t(()=>[h("元")]),_:1},8,["modelValue"]),i.value.limit?(n(),$("div",vt,k(`${i.value.user_ship_name}角色至少要充值${i.value.limit}元, 最大不超过10000元`),1)):ee("",!0)]),_:1})):(n(),R(ue,{key:3,label:"充值金额:",required:""},{default:t(()=>[e("div",_t,[(n(!0),$(te,null,ie(W.value,(o,ae)=>(n(),$("div",{class:de(["ship-money-item",{"ship-money-item-active":o.money==i.value.money}]),onClick:Ge=>i.value.money=o.money,key:ae},[e("div",mt,k(o.money)+k(o.money_string),1),e("div",ft,"送"+k(o.send)+k(o.send_string),1)],10,pt))),128))])]),_:1}))]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])}}},gt=ke(ht,[["__scopeId","data-v-80ac9503"]]),bt={class:"my-card"},xt={__name:"index",setup(x){return(u,w)=>(n(),$("div",bt,[a(Ll,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),a(nl),a(gt,{ref:"detailRef"},null,512)]))}};export{xt as default}; diff --git a/build/assets/index-ZqC6IftU.js b/build/assets/index-DpnybBgR.js similarity index 96% rename from build/assets/index-ZqC6IftU.js rename to build/assets/index-DpnybBgR.js index 1311019..b9fa835 100644 --- a/build/assets/index-ZqC6IftU.js +++ b/build/assets/index-DpnybBgR.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-C1UYAdzy.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-D8vvQnCS.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-B7CJVLVc.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-BnGigPfR.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-nsqy9sz9.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-CO-3gQOa.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/build/assets/index-BI42i4fN.js b/build/assets/index-Dvv7npa8.js similarity index 96% rename from build/assets/index-BI42i4fN.js rename to build/assets/index-Dvv7npa8.js index 6583034..4f5d217 100644 --- a/build/assets/index-BI42i4fN.js +++ b/build/assets/index-Dvv7npa8.js @@ -1 +1 @@ -import{r as m,b as n,h,c as r,k as V,e as w,f as l,i as K,w as t,j as P,g as s,d as v,p as b}from"./index-C1UYAdzy.js";import{c as U}from"./shop-Oo7M8T-d.js";import"./axiosAPI-B6mxiJzo.js";const j={class:"my-card put-storage"},A={class:"storage-header"},E={class:"flex"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},q={__name:"index",setup(O){const d=m([]),e=m({page_no:1,page_size:20,loadend:!1,store_name:"",status:null,stock:null}),f=m(!1),g=()=>{e.value.loadend||(f.value=!0,U({page_no:e.value.page_no,page_size:e.value.page_size,store_name:e.value.store_name,stock:e.value.stock,status:e.value.status}).then(o=>{d.value=[...d.value,...o.data.lists],o.data.lists.length{e.value.page_no=1,e.value.loadend=!1,d.value=[],g()},k=m(0),x=o=>{o==0?(e.value.status=null,e.value.stock=null):o==1?(e.value.status=1,e.value.stock=null):o==2?(e.value.status=0,e.value.stock=null):o==3?(e.value.status=null,e.value.stock=10):o==4&&(e.value.status=null,e.value.stock=0),_()};return(o,i)=>{const C=n("el-input"),y=n("el-button"),c=n("el-radio-button"),z=n("el-radio-group"),u=n("el-table-column"),B=n("el-image"),p=n("el-tag"),L=n("el-table"),N=h("loading"),D=h("infinite-scroll");return r(),V("div",j,[w("div",A,[w("div",E,[l(C,{placeholder:"请输入商品名称",style:{width:"20rem"},modelValue:e.value.store_name,"onUpdate:modelValue":i[0]||(i[0]=a=>e.value.store_name=a),onKeydown:K(_,["enter"])},null,8,["modelValue"]),l(y,{style:{"margin-left":"1rem"},type:"primary",onClick:_},{default:t(()=>[s("搜索")]),_:1}),l(y,{style:{"margin-left":"1rem"},onClick:i[1]||(i[1]=a=>{e.value.store_name="",_()})},{default:t(()=>[s("重置")]),_:1})]),l(z,{style:{"margin-bottom":"20px"},modelValue:k.value,"onUpdate:modelValue":i[2]||(i[2]=a=>k.value=a),onChange:x},{default:t(()=>[l(c,{label:0,value:0},{default:t(()=>[s("全部")]),_:1}),l(c,{label:1,value:1},{default:t(()=>[s("上架")]),_:1}),l(c,{label:2,value:2},{default:t(()=>[s("下架")]),_:1}),l(c,{label:3,value:3},{default:t(()=>[s("库存预警")]),_:1}),l(c,{label:4,value:4},{default:t(()=>[s("已售罄")]),_:1})]),_:1},8,["modelValue"])]),P((r(),V("div",I,[l(L,{data:d.value},{default:t(()=>[l(u,{label:"ID",prop:"id","min-width":"55"}),l(u,{label:"商品图",prop:"image",width:"100"},{default:t(({row:a})=>[l(B,{class:"image",src:a.image},null,8,["src"])]),_:1}),l(u,{label:"商品名",prop:"store_name","min-width":"200"}),l(u,{label:"分类",prop:"cate_name"}),l(u,{label:"销量",prop:"sales"}),l(u,{label:"库存",prop:"stock"}),l(u,{label:"状态",prop:"status"},{default:t(({row:a})=>[a.status==1?(r(),v(p,{key:0,class:"el-tag",type:"success"},{default:t(()=>[s("上架")]),_:1})):a.status==0?(r(),v(p,{key:1,class:"el-tag",type:"info"},{default:t(()=>[s("下架")]),_:1})):b("",!0),a.stock<=10&&a.stock>0?(r(),v(p,{key:2,class:"el-tag",type:"warning"},{default:t(()=>[s("库存预警")]),_:1})):b("",!0),a.stock==0?(r(),v(p,{key:3,class:"el-tag",type:"danger"},{default:t(()=>[s("已售罄")]),_:1})):b("",!0)]),_:1})]),_:1},8,["data"])])),[[N,f.value],[D,g]])])}}};export{q as default}; +import{r as m,b as n,h,c as r,k as V,e as w,f as l,i as K,w as t,j as P,g as s,d as v,p as b}from"./index-BnGigPfR.js";import{c as U}from"./shop-CUNZMJhl.js";import"./axiosAPI-DJRwxDIy.js";const j={class:"my-card put-storage"},A={class:"storage-header"},E={class:"flex"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},q={__name:"index",setup(O){const d=m([]),e=m({page_no:1,page_size:20,loadend:!1,store_name:"",status:null,stock:null}),f=m(!1),g=()=>{e.value.loadend||(f.value=!0,U({page_no:e.value.page_no,page_size:e.value.page_size,store_name:e.value.store_name,stock:e.value.stock,status:e.value.status}).then(o=>{d.value=[...d.value,...o.data.lists],o.data.lists.length{e.value.page_no=1,e.value.loadend=!1,d.value=[],g()},k=m(0),x=o=>{o==0?(e.value.status=null,e.value.stock=null):o==1?(e.value.status=1,e.value.stock=null):o==2?(e.value.status=0,e.value.stock=null):o==3?(e.value.status=null,e.value.stock=10):o==4&&(e.value.status=null,e.value.stock=0),_()};return(o,i)=>{const C=n("el-input"),y=n("el-button"),c=n("el-radio-button"),z=n("el-radio-group"),u=n("el-table-column"),B=n("el-image"),p=n("el-tag"),L=n("el-table"),N=h("loading"),D=h("infinite-scroll");return r(),V("div",j,[w("div",A,[w("div",E,[l(C,{placeholder:"请输入商品名称",style:{width:"20rem"},modelValue:e.value.store_name,"onUpdate:modelValue":i[0]||(i[0]=a=>e.value.store_name=a),onKeydown:K(_,["enter"])},null,8,["modelValue"]),l(y,{style:{"margin-left":"1rem"},type:"primary",onClick:_},{default:t(()=>[s("搜索")]),_:1}),l(y,{style:{"margin-left":"1rem"},onClick:i[1]||(i[1]=a=>{e.value.store_name="",_()})},{default:t(()=>[s("重置")]),_:1})]),l(z,{style:{"margin-bottom":"20px"},modelValue:k.value,"onUpdate:modelValue":i[2]||(i[2]=a=>k.value=a),onChange:x},{default:t(()=>[l(c,{label:0,value:0},{default:t(()=>[s("全部")]),_:1}),l(c,{label:1,value:1},{default:t(()=>[s("上架")]),_:1}),l(c,{label:2,value:2},{default:t(()=>[s("下架")]),_:1}),l(c,{label:3,value:3},{default:t(()=>[s("库存预警")]),_:1}),l(c,{label:4,value:4},{default:t(()=>[s("已售罄")]),_:1})]),_:1},8,["modelValue"])]),P((r(),V("div",I,[l(L,{data:d.value},{default:t(()=>[l(u,{label:"ID",prop:"id","min-width":"55"}),l(u,{label:"商品图",prop:"image",width:"100"},{default:t(({row:a})=>[l(B,{class:"image",src:a.image},null,8,["src"])]),_:1}),l(u,{label:"商品名",prop:"store_name","min-width":"200"}),l(u,{label:"分类",prop:"cate_name"}),l(u,{label:"销量",prop:"sales"}),l(u,{label:"库存",prop:"stock"}),l(u,{label:"状态",prop:"status"},{default:t(({row:a})=>[a.status==1?(r(),v(p,{key:0,class:"el-tag",type:"success"},{default:t(()=>[s("上架")]),_:1})):a.status==0?(r(),v(p,{key:1,class:"el-tag",type:"info"},{default:t(()=>[s("下架")]),_:1})):b("",!0),a.stock<=10&&a.stock>0?(r(),v(p,{key:2,class:"el-tag",type:"warning"},{default:t(()=>[s("库存预警")]),_:1})):b("",!0),a.stock==0?(r(),v(p,{key:3,class:"el-tag",type:"danger"},{default:t(()=>[s("已售罄")]),_:1})):b("",!0)]),_:1})]),_:1},8,["data"])])),[[N,f.value],[D,g]])])}}};export{q as default}; diff --git a/build/assets/index-4N16MaV1.js b/build/assets/index-DwdEL_Er.js similarity index 94% rename from build/assets/index-4N16MaV1.js rename to build/assets/index-DwdEL_Er.js index d8febce..1a2ae6c 100644 --- a/build/assets/index-4N16MaV1.js +++ b/build/assets/index-DwdEL_Er.js @@ -1 +1 @@ -import{a as B,b as L}from"./shop-Oo7M8T-d.js";import{r as f,b as s,h as v,c as i,k as b,f as e,w as a,j as N,g as r,d,p as y,E as A}from"./index-C1UYAdzy.js";import"./axiosAPI-B6mxiJzo.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"}},U={__name:"index",setup(S){const u=f([]),t=f({page_no:1,page_size:20,loadend:!1,type:1}),_=f(!1),c=()=>{t.value.loadend||(_.value=!0,B({page_no:t.value.page_no,page_size:t.value.page_size,type:t.value.type}).then(n=>{u.value=[...u.value,...n.data.lists],n.data.lists.length{t.value.page_no=1,t.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:t.value.type,"onUpdate:modelValue":p[0]||(p[0]=l=>t.value.type=l),onChange:h},{default:a(()=>[e(g,{label:1,value:1},{default:a(()=>[r("售卖库存")]),_:1}),e(g,{label:2,value:2},{default:a(()=>[r("兑换库存")]),_:1})]),_:1},8,["modelValue"]),N((i(),b("div",I,[e(E,{data:u.value},{default:a(()=>[e(o,{label:"导入人员",prop:"admin_name"}),e(o,{label:"门店确认人员",prop:"staff_name"}),e(o,{label:"商品图",prop:"image"},{default:a(({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:a(({row:l})=>[l.status===1?(i(),d(m,{key:0,type:"success"},{default:a(()=>[r("已入库")]),_:1})):l.status===0?(i(),d(m,{key:1,type:"warning"},{default:a(()=>[r("待确认")]),_:1})):l.status===-1?(i(),d(m,{key:2,type:"danger"},{default:a(()=>[r("库存不足")]),_:1})):y("",!0)]),_:1}),e(o,{label:"备注",prop:"mark"}),e(o,{label:"操作",width:"120",fixed:"right"},{default:a(({row:l})=>[l.status==0?(i(),d(V,{key:0,type:"success",onClick:j=>k(l)},{default:a(()=>[r(" 确认入库 ")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"])])),[[w,_.value],[z,c]])])}}};export{U as default}; +import{a as B,b as L}from"./shop-CUNZMJhl.js";import{r as f,b as s,h as v,c as i,k as b,f as e,w as a,j as N,g as r,d,p as y,E as A}from"./index-BnGigPfR.js";import"./axiosAPI-DJRwxDIy.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"}},U={__name:"index",setup(S){const u=f([]),t=f({page_no:1,page_size:20,loadend:!1,type:1}),_=f(!1),c=()=>{t.value.loadend||(_.value=!0,B({page_no:t.value.page_no,page_size:t.value.page_size,type:t.value.type}).then(n=>{u.value=[...u.value,...n.data.lists],n.data.lists.length{t.value.page_no=1,t.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:t.value.type,"onUpdate:modelValue":p[0]||(p[0]=l=>t.value.type=l),onChange:h},{default:a(()=>[e(g,{label:1,value:1},{default:a(()=>[r("售卖库存")]),_:1}),e(g,{label:2,value:2},{default:a(()=>[r("兑换库存")]),_:1})]),_:1},8,["modelValue"]),N((i(),b("div",I,[e(E,{data:u.value},{default:a(()=>[e(o,{label:"导入人员",prop:"admin_name"}),e(o,{label:"门店确认人员",prop:"staff_name"}),e(o,{label:"商品图",prop:"image"},{default:a(({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:a(({row:l})=>[l.status===1?(i(),d(m,{key:0,type:"success"},{default:a(()=>[r("已入库")]),_:1})):l.status===0?(i(),d(m,{key:1,type:"warning"},{default:a(()=>[r("待确认")]),_:1})):l.status===-1?(i(),d(m,{key:2,type:"danger"},{default:a(()=>[r("库存不足")]),_:1})):y("",!0)]),_:1}),e(o,{label:"备注",prop:"mark"}),e(o,{label:"操作",width:"120",fixed:"right"},{default:a(({row:l})=>[l.status==0?(i(),d(V,{key:0,type:"success",onClick:j=>k(l)},{default:a(()=>[r(" 确认入库 ")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"])])),[[w,_.value],[z,c]])])}}};export{U as default}; diff --git a/build/assets/index-DSeWM5d3.css b/build/assets/index-Dwu1TsNn.css similarity index 59% rename from build/assets/index-DSeWM5d3.css rename to build/assets/index-Dwu1TsNn.css index 8861dbc..c1545a2 100644 --- a/build/assets/index-DSeWM5d3.css +++ b/build/assets/index-Dwu1TsNn.css @@ -1 +1 @@ -@charset "UTF-8";.my-order[data-v-30895731]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-30895731]{display:flex;justify-content:space-between;padding:1rem}.my-order .header-nav span[data-v-30895731]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-30895731]{font-weight:700}.my-order .header-row[data-v-30895731]{display:flex;padding:0 1rem 1rem;align-items:center}.my-order .header-row .label[data-v-30895731]{flex-shrink:0;margin-right:1rem;font-size:.9rem}.my-order .header-input[data-v-30895731]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-30895731]{flex:1;overflow-y:auto}.my-order .order-lists .item[data-v-30895731]{padding:1rem;border-bottom:.0625rem solid #eee;display:flex}.my-order .order-lists .item .avatar[data-v-30895731]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.my-order .order-lists .item .flex[data-v-30895731]{display:flex;flex-wrap:wrap}.my-order .order-lists .item .bold[data-v-30895731]{font-weight:700}.my-order .order-lists .item .r-1[data-v-30895731]{margin-right:1rem}.my-order .order-lists .item .bottom>div[data-v-30895731]{margin-left:.5rem}.my-order .order-lists .item .red[data-v-30895731]{color:#ff4a00}.my-order .order-lists .item-active[data-v-30895731]{background-color:#efefef}.my-order .load-end[data-v-30895731]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.dra-body[data-v-5ad4b8f5]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-5ad4b8f5]{width:25rem;display:flex}.dra-body .header>div[data-v-5ad4b8f5]{flex:1;border:.0625rem solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-5ad4b8f5]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-5ad4b8f5]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-5ad4b8f5]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-5ad4b8f5]{width:100%;height:3rem}.dra-body .card1 .tips[data-v-5ad4b8f5]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.cancel-btn[data-v-5ad4b8f5]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-5ad4b8f5]{width:100%;overflow-x:hidden}.counter[data-v-5ad4b8f5]{padding:1.25rem;border-radius:1.25rem;background-color:#f3f9ff}.counter .received[data-v-5ad4b8f5]{height:3rem;padding:0 1.25rem;border:.0625rem solid #1890ff;box-shadow:0 0 .18rem #1890ff;border-radius:.5rem;background-color:#fff;font-size:1.62rem;line-height:3rem;color:#333}.counter .balance[data-v-5ad4b8f5]{width:100%;box-sizing:border-box;padding:1.12rem 0 1.12rem .625rem;text-align:start;font-size:.95rem;color:#303133;display:flex;justify-content:space-between}.counter .balance .money[data-v-5ad4b8f5]{color:#ff4a00}.counter .balance .tips[data-v-5ad4b8f5]{font-size:.8rem;color:#999}.counter .keypad[data-v-5ad4b8f5]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:.625rem}.counter .keypad .left[data-v-5ad4b8f5]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:.625rem}.counter .keypad .right[data-v-5ad4b8f5]{display:grid;grid-template-columns:auto;grid-gap:.625rem}.counter .keypad .el-button[data-v-5ad4b8f5]{height:3.875rem;width:8.125rem;margin:0!important;border:0;border-radius:.5rem;font-weight:500;font-size:1.75rem!important;line-height:3.87rem;color:#1890ff}.counter .keypad .el-button[data-v-5ad4b8f5]:focus{box-shadow:none}.counter .keypad .enter[data-v-5ad4b8f5]{grid-row-end:span 4;height:8.37rem;line-height:8.37rem;background-color:#1890ff;font-weight:500;font-size:1.35rem!important;color:#fff;position:relative}.counter .keypad .enter-disable[data-v-5ad4b8f5]{background-color:#ccc}.my-order[data-v-2934a096]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-2934a096]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-2934a096]{height:4rem;width:8rem;cursor:pointer;display:flex;justify-content:center;align-items:center;font-size:1.2rem;background-color:#f5f5f5;border-radius:1rem 1rem 0 0}.my-order .header-nav .nav-item-active[data-v-2934a096]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-2934a096]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-2934a096]{border-radius:0 0 0 1rem}.my-order .detail[data-v-2934a096]{height:calc(100% - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-2934a096]{padding:1rem 1rem 7rem;box-sizing:border-box;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-2934a096]{font-weight:700}.my-order .detail .table .table-title .tips[data-v-2934a096]{font-weight:400;color:#999;font-size:.8rem;margin-left:1rem}.my-order .detail .table .table-info[data-v-2934a096]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-2934a096]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-2934a096]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .red[data-v-2934a096]{color:#ff4a00}.my-order .detail .table .table-info .info-item .info-item-title[data-v-2934a096]{flex-shrink:0;padding-right:1rem}.my-order .detail .table .table-info .pay-btn[data-v-2934a096]{width:100%;display:flex;justify-content:space-between;flex-wrap:wrap;margin-bottom:1rem}.my-order .detail .table .table-info .pay-btn .pay-item[data-v-2934a096]{flex:1;min-width:10rem;margin:1rem .5rem 0;height:5rem;background-color:#67c23a1a;color:#67c23a;border-radius:1rem;border:.125rem solid #67c23a;cursor:pointer;font-size:1.5rem;display:flex;justify-content:center;align-items:center}.my-order .detail .table .table-info .pay-btn .pay-item .input[data-v-2934a096]{font-size:1.5rem;width:100%;height:100%;text-align:center;color:#67c23a}.my-order .detail .table .table-info .pay-btn .pay-item-active[data-v-2934a096]{background-color:#67c23a;color:#fff}.my-order .detail .table .table-info .pay-btn .pay-item-active .input[data-v-2934a096]{color:#fff}.my-order .detail .table .table-info .pay[data-v-2934a096]{width:100%;border-radius:3rem;margin:.5rem}.my-order .detail .table .big-btn[data-v-2934a096]{margin-top:1rem;width:100%;border-radius:3rem}.my-order .detail .footer[data-v-2934a096]{position:absolute;z-index:1000;bottom:0;left:0;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.my-order input[type=number][data-v-2934a096]{border:none;padding:0;background-color:transparent;outline:none;-webkit-text-fill-color:inherit;-webkit-appearance:none;box-shadow:none}.my-order .ship-input[data-v-2934a096]{width:100%;text-align:center;font-size:2rem;border:.2rem solid #67c23a!important;padding:1rem 0!important;color:#67c23a;border-radius:.5rem}.my-order .ship-money-list[data-v-2934a096]{flex:1;display:flex;flex-wrap:wrap}.my-order .ship-money-list .ship-money-item[data-v-2934a096]{width:10rem;height:5rem;margin:0 1rem 1rem 0;background-color:#67c23a1a;border:.125rem solid #67c23a;border-radius:.5rem;display:flex;flex-direction:column;justify-content:center;align-items:center;cursor:pointer}.my-order .ship-money-list .ship-money-item .item1[data-v-2934a096]{font-size:1.1rem;font-weight:700;color:#67c23a}.my-order .ship-money-list .ship-money-item .item2[data-v-2934a096]{font-size:.8rem;line-height:1rem}.my-order .ship-money-list .ship-money-item-active[data-v-2934a096]{background-color:#67c23a;color:#fff!important}.my-order .ship-money-list .ship-money-item-active .item1[data-v-2934a096]{color:#fff!important}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.my-order[data-v-a0be2eef]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-a0be2eef]{display:flex;justify-content:space-between;padding:1rem}.my-order .header-nav span[data-v-a0be2eef]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-a0be2eef]{font-weight:700}.my-order .header-row[data-v-a0be2eef]{display:flex;padding:0 1rem 1rem;align-items:center}.my-order .header-row .label[data-v-a0be2eef]{flex-shrink:0;margin-right:1rem;font-size:.9rem}.my-order .header-input[data-v-a0be2eef]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-a0be2eef]{flex:1;overflow-y:auto}.my-order .order-lists .item[data-v-a0be2eef]{padding:1rem;border-bottom:.0625rem solid #eee;display:flex}.my-order .order-lists .item .avatar[data-v-a0be2eef]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.my-order .order-lists .item .flex[data-v-a0be2eef]{display:flex;flex-wrap:wrap}.my-order .order-lists .item .bold[data-v-a0be2eef]{font-weight:700}.my-order .order-lists .item .r-1[data-v-a0be2eef]{margin-right:1rem}.my-order .order-lists .item .bottom>div[data-v-a0be2eef]{margin-left:.5rem}.my-order .order-lists .item .red[data-v-a0be2eef]{color:#ff4a00}.my-order .order-lists .item-active[data-v-a0be2eef]{background-color:#efefef}.my-order .load-end[data-v-a0be2eef]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.dra-body[data-v-5ad4b8f5]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-5ad4b8f5]{width:25rem;display:flex}.dra-body .header>div[data-v-5ad4b8f5]{flex:1;border:.0625rem solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-5ad4b8f5]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-5ad4b8f5]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-5ad4b8f5]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-5ad4b8f5]{width:100%;height:3rem}.dra-body .card1 .tips[data-v-5ad4b8f5]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.cancel-btn[data-v-5ad4b8f5]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-5ad4b8f5]{width:100%;overflow-x:hidden}.counter[data-v-5ad4b8f5]{padding:1.25rem;border-radius:1.25rem;background-color:#f3f9ff}.counter .received[data-v-5ad4b8f5]{height:3rem;padding:0 1.25rem;border:.0625rem solid #1890ff;box-shadow:0 0 .18rem #1890ff;border-radius:.5rem;background-color:#fff;font-size:1.62rem;line-height:3rem;color:#333}.counter .balance[data-v-5ad4b8f5]{width:100%;box-sizing:border-box;padding:1.12rem 0 1.12rem .625rem;text-align:start;font-size:.95rem;color:#303133;display:flex;justify-content:space-between}.counter .balance .money[data-v-5ad4b8f5]{color:#ff4a00}.counter .balance .tips[data-v-5ad4b8f5]{font-size:.8rem;color:#999}.counter .keypad[data-v-5ad4b8f5]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:.625rem}.counter .keypad .left[data-v-5ad4b8f5]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:.625rem}.counter .keypad .right[data-v-5ad4b8f5]{display:grid;grid-template-columns:auto;grid-gap:.625rem}.counter .keypad .el-button[data-v-5ad4b8f5]{height:3.875rem;width:8.125rem;margin:0!important;border:0;border-radius:.5rem;font-weight:500;font-size:1.75rem!important;line-height:3.87rem;color:#1890ff}.counter .keypad .el-button[data-v-5ad4b8f5]:focus{box-shadow:none}.counter .keypad .enter[data-v-5ad4b8f5]{grid-row-end:span 4;height:8.37rem;line-height:8.37rem;background-color:#1890ff;font-weight:500;font-size:1.35rem!important;color:#fff;position:relative}.counter .keypad .enter-disable[data-v-5ad4b8f5]{background-color:#ccc}.my-order[data-v-80ac9503]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-80ac9503]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-80ac9503]{height:4rem;width:8rem;cursor:pointer;display:flex;justify-content:center;align-items:center;font-size:1.2rem;background-color:#f5f5f5;border-radius:1rem 1rem 0 0}.my-order .header-nav .nav-item-active[data-v-80ac9503]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-80ac9503]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-80ac9503]{border-radius:0 0 0 1rem}.my-order .detail[data-v-80ac9503]{height:calc(100% - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-80ac9503]{padding:1rem 1rem 7rem;box-sizing:border-box;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-80ac9503]{font-weight:700}.my-order .detail .table .table-title .tips[data-v-80ac9503]{font-weight:400;color:#999;font-size:.8rem;margin-left:1rem}.my-order .detail .table .table-info[data-v-80ac9503]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-80ac9503]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-80ac9503]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .red[data-v-80ac9503]{color:#ff4a00}.my-order .detail .table .table-info .info-item .info-item-title[data-v-80ac9503]{flex-shrink:0;padding-right:1rem}.my-order .detail .table .table-info .pay-btn[data-v-80ac9503]{width:100%;display:flex;justify-content:space-between;flex-wrap:wrap;margin-bottom:1rem}.my-order .detail .table .table-info .pay-btn .pay-item[data-v-80ac9503]{flex:1;min-width:10rem;margin:1rem .5rem 0;height:5rem;background-color:#67c23a1a;color:#67c23a;border-radius:1rem;border:.125rem solid #67c23a;cursor:pointer;font-size:1.5rem;display:flex;justify-content:center;align-items:center}.my-order .detail .table .table-info .pay-btn .pay-item .input[data-v-80ac9503]{font-size:1.5rem;width:100%;height:100%;text-align:center;color:#67c23a}.my-order .detail .table .table-info .pay-btn .pay-item-active[data-v-80ac9503]{background-color:#67c23a;color:#fff}.my-order .detail .table .table-info .pay-btn .pay-item-active .input[data-v-80ac9503]{color:#fff}.my-order .detail .table .table-info .pay[data-v-80ac9503]{width:100%;border-radius:3rem;margin:.5rem}.my-order .detail .table .big-btn[data-v-80ac9503]{margin-top:1rem;width:100%;border-radius:3rem}.my-order .detail .footer[data-v-80ac9503]{position:absolute;z-index:1000;bottom:0;left:0;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.my-order input[type=number][data-v-80ac9503]{border:none;padding:0;background-color:transparent;outline:none;-webkit-text-fill-color:inherit;-webkit-appearance:none;box-shadow:none}.my-order .ship-input[data-v-80ac9503]{width:100%;text-align:center;font-size:2rem;border:.2rem solid #67c23a!important;padding:1rem 0!important;color:#67c23a;border-radius:.5rem}.my-order .ship-money-list[data-v-80ac9503]{flex:1;display:flex;flex-wrap:wrap}.my-order .ship-money-list .ship-money-item[data-v-80ac9503]{width:10rem;height:5rem;margin:0 1rem 1rem 0;background-color:#67c23a1a;border:.125rem solid #67c23a;border-radius:.5rem;display:flex;flex-direction:column;justify-content:center;align-items:center;cursor:pointer}.my-order .ship-money-list .ship-money-item .item1[data-v-80ac9503]{font-size:1.1rem;font-weight:700;color:#67c23a}.my-order .ship-money-list .ship-money-item .item2[data-v-80ac9503]{font-size:.8rem;line-height:1rem}.my-order .ship-money-list .ship-money-item-active[data-v-80ac9503]{background-color:#67c23a;color:#fff!important}.my-order .ship-money-list .ship-money-item-active .item1[data-v-80ac9503]{color:#fff!important}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/build/assets/index-Si3YHsKU.js b/build/assets/index-Si3YHsKU.js new file mode 100644 index 0000000..7ba0564 --- /dev/null +++ b/build/assets/index-Si3YHsKU.js @@ -0,0 +1,27 @@ +var Np=Object.defineProperty;var Kp=(P,y,o)=>y in P?Np(P,y,{enumerable:!0,configurable:!0,writable:!0,value:o}):P[y]=o;var au=(P,y,o)=>(Kp(P,typeof y!="symbol"?y+"":y,o),o);import{c as Gp,a as zp,b as Xo,s as Hp,o as kp}from"./store-DOZFgKpz.js";import{_ as ct,r as R,o as Dt,m as te,a as Nt,b as nn,c as D,d as Se,w as hn,e as v,f as U,g as un,t as K,n as _u,E as ke,u as Mr,h as Ft,i as Jo,j as du,k as en,F as Ut,l as Mt,p as fe,q as pu,s as gu,v as Wt,x as qp,y as $r,z as Wr,A as Vp,B as at,C as Br,D as Zp,G as Yp,H as Xp}from"./index-BnGigPfR.js";import{u as Jp}from"./user-Cxe1-N3Y.js";import"./moment-Cl4UOzQZ.js";import{p as Yo}from"./padding-CO-3gQOa.js";import"./axiosAPI-DJRwxDIy.js";import{m as cu,s as Qp}from"./shop-CUNZMJhl.js";import{p as jp}from"./pay-BYJnRMtm.js";import"./authCode-D1GYIlL-.js";/* empty css */const ng={class:"price"},eg={class:"flex"},tg={style:{margin:"0.625rem","padding-bottom":"40px"}},rg={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},ig={class:"dialog-footer"},ug={__name:"price",emits:["changeAllPrice"],setup(P,{expose:y,emit:o}){const E=R(!1),V=R(null),Q=R(0),x=(Z=!0,A=0)=>{X.value.nowPrice="",X.value.percentage="",E.value=Z,Q.value=A,_u(()=>{setTimeout(()=>{var sn;(sn=V.value)==null||sn.focus()},150)})},X=R({nowPrice:"",percentage:""}),dn=Z=>{X.value.percentage=(Z/Q.value*100).toFixed(2)},fn=Z=>{X.value.nowPrice=(Q.value*Z/100).toFixed(2)},tn=o,J=()=>{if(X.value.percentage>100)return X.value.nowPrice="",X.value.percentage="",ke.error("改价金额不能大于当前订单金额");if(X.value.nowPrice<=0)return X.value.nowPrice="",X.value.percentage="",ke.error("金额不能小于0");tn("changeAllPrice",X.value.nowPrice)};y({show:x,dialogVisible:E});const xn=()=>{E.value&&J()};return Dt(()=>{te.on("enter",xn)}),Nt(()=>{te.off("enter",xn)}),(Z,A)=>{const sn=nn("el-input"),W=nn("el-button"),G=nn("el-dialog");return D(),Se(G,{modelValue:E.value,"onUpdate:modelValue":A[2]||(A[2]=on=>E.value=on),title:"订单改价",width:"650"},{footer:hn(()=>[v("div",ig,[U(W,{class:"ok-btn",type:"primary",onClick:J},{default:hn(()=>[un(" 确定 (Enter) ")]),_:1})])]),default:hn(()=>[v("div",ng,[v("div",eg,[U(sn,{ref_key:"priceRef",ref:V,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.nowPrice,"onUpdate:modelValue":A[0]||(A[0]=on=>X.value.nowPrice=on),type:"number",placeholder:"请输入改价后的价格",onInput:dn},{suffix:hn(()=>[un("元")]),_:1},8,["modelValue"]),U(sn,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.percentage,"onUpdate:modelValue":A[1]||(A[1]=on=>X.value.percentage=on),type:"number",placeholder:"请输入比例",onInput:fn},{suffix:hn(()=>[un("%")]),_:1},8,["modelValue"])]),v("div",tg,[un(" 改价后金额: "),v("span",rg,"¥"+K(X.value.nowPrice||Q.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},sg=ct(ug,[["__scopeId","data-v-924edcc0"]]),og={class:"check-user-list"},lg={class:"header-input"},fg={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ag=["onClick"],cg={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},hg={class:"top"},_g={class:"bold"},dg={class:"flex-between"},pg={class:"mr-2"},gg={class:"bottom flex",style:{"justify-content":"space-between"}},vg={class:"red"},mg={class:"red"},wg={class:"red"},yg={key:0,class:"load-end"},xg={key:1,class:"load-end"},Ag={__name:"userList",emits:["setUser"],setup(P,{expose:y,emit:o}){Mr();const E=R(!1),V=R({page_no:1,page_size:20,mobile:""}),Q=o,x=R(!1),X=R(0),dn=R(!1),fn=R([]),tn=(Z=!1)=>{if(Z)V.value.page_no=1;else if(dn.value||x.value)return;x.value=!0,Jp(V.value).then(A=>{Z?fn.value=A.data.lists:fn.value=[...fn.value,...A.data.lists],A.data.lists.length{dn.value=!0,x.value=!1})},J=(Z,A)=>{Q("setUser",Z),E.value=!1};return y({open:(Z=null)=>{Z||(V.value.mobile=""),E.value=!0,tn(!0)}}),(Z,A)=>{const sn=nn("el-button"),W=nn("el-input"),G=nn("el-avatar"),on=nn("el-tag"),H=nn("el-dialog"),an=Ft("loading"),cn=Ft("infinite-scroll");return D(),Se(H,{modelValue:E.value,"onUpdate:modelValue":A[4]||(A[4]=k=>E.value=k),title:"选择用户",width:"800"},{default:hn(()=>[v("div",og,[v("div",lg,[U(W,{modelValue:V.value.mobile,"onUpdate:modelValue":A[1]||(A[1]=k=>V.value.mobile=k),placeholder:"搜索手机号/ID",onKeydown:A[2]||(A[2]=Jo(k=>tn(!0),["enter"])),onClear:A[3]||(A[3]=k=>tn(!0)),clearable:""},{append:hn(()=>[U(sn,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:A[0]||(A[0]=k=>tn(!0))},{default:hn(()=>[un("搜索")]),_:1})]),_:1},8,["modelValue"])]),du((D(),en("div",fg,[(D(!0),en(Ut,null,Mt(fn.value,(k,b)=>(D(),en("div",{class:"item",key:b,onClick:vn=>J(k,b)},[U(G,{class:"avatar",src:k.avatar},null,8,["src"]),v("div",cg,[v("div",hg,[v("div",null,[v("span",_g,K(k.nickname),1),v("span",null,K(" (ID:"+k.id+")"),1)]),v("div",dg,[v("div",pg,"手机号: "+K(k.mobile||k.account),1),k.user_ship==0||k.user_ship==4?(D(),Se(on,{key:0,type:"primary"},{default:hn(()=>[un(K(k.user_ship_name),1)]),_:2},1024)):(D(),Se(on,{key:1,type:"success"},{default:hn(()=>[un(K(k.user_ship_name),1)]),_:2},1024))])]),v("div",gg,[v("div",null,[un("采购款: "),v("span",vg,K(k.purchase_funds),1)]),v("div",null,[un("礼品券: "),v("span",mg,K(k.get_frozen),1)]),v("div",null,[un("余额: "),v("span",wg,K(k.now_money),1)])])])],8,ag))),128)),dn.value?(D(),en("div",yg,"没有更多了")):fe("",!0),x.value?(D(),en("div",xg,"加载中...")):fe("",!0)])),[[an,x.value],[cn,tn]])])]),_:1},8,["modelValue"])}}},Ig=ct(Ag,[["__scopeId","data-v-3a73e14a"]]),Cg=P=>(pu("data-v-bcd603bf"),P=P(),gu(),P),Lg={class:"my-order"},Sg={class:"user-nav"},Rg={class:"user-info"},Eg={key:0,class:"info"},bg={class:"flex-bewteen"},Tg={class:"flex-bewteen",style:{"align-items":"flex-start"}},Og={class:"user-money"},Pg={style:{"margin-right":"0.5rem"}},$g={style:{color:"#f70"}},Bg={style:{"margin-right":"0.5rem"}},Wg={style:{color:"#f70"}},Fg={style:{color:"#f70"}},Ug={key:1,class:"info",style:{"align-items":"center",display:"flex","justify-content":"space-between"}},Mg={class:"flex-bewteen",style:{width:"100%"}},Dg=Cg(()=>v("div",{style:{"font-size":"1.2rem"}},"游客",-1)),Ng={class:"header-nav"},Kg={class:"nav-item"},Gg={class:"order-list"},zg={class:"order-item-info"},Hg={class:"order-item-title"},kg={class:"title"},qg=["onClick"],Vg={class:"order-item-sku"},Zg={class:"order-item-price"},Yg={class:"order-footer"},Xg={class:"order-total"},Jg={class:"price",style:{"flex-direction":"column","align-items":"flex-start"}},Qg={class:"total-item",style:{"flex-shrink":"0"}},jg={style:{"font-size":"1.4rem"}},nv={key:0,class:"total-item",style:{"padding-right":"0","line-height":"0.8rem"}},ev={style:{"font-size":"0.8rem"}},tv={class:"update-price"},rv={class:"order-btn"},iv={__name:"order",emits:["goPay","editAttr"],setup(P,{expose:y,emit:o}){const E=R([]),V=R(0),Q=R(0),x=R(0);Mr();const X=R(null),dn=()=>{let $=[];E.value.map(B=>{$.push(B.id)}),$.length!=0&&tn($)},fn=$=>{E.value=E.value.filter(B=>B.id!=$),tn([$])},tn=$=>{Gp({id:$}).then(B=>{xn()})},J=R({}),xn=()=>{V.value=0,Q.value=0,x.value=0,zp().then($=>{J.value=$.data.extend,E.value=$.data.lists||[]})};xn();const Z=o,A=()=>{Z("goPay")},sn=($,B)=>{Xo({product_id:$.product_id,cart_num:$.cart_num}).then(Tn=>{xn()}).catch(Tn=>{var Bn;let On=(Bn=Tn==null?void 0:Tn.msg)==null?void 0:Bn.match(/\b\d+(\.\d+)?\b/);On?$.cart_num=+On[0]:$.cart_num=1})},W=$=>{x.value=Q.value-$,V.value=+$,_u(()=>{setTimeout(()=>{on(!1)},150)})};R(0);const G=R(null),on=($=!0)=>{G.value.show($,Q.value)},H=R({uid:""}),an=$=>{H.value=$,H.value.uid=$.id},cn=R(!1);y({getList:xn,resetView:()=>{cn.value=!1,xn()},list:E,discounts:x,allPrice:V,userInfo:H,is_storage:cn});const b=()=>{G.value.dialogVisible?G.value.dialogVisible=!1:on()},vn=()=>{E.value.length>0&&dn()};return Dt(()=>{te.on("insert",b),te.on("delete",vn)}),Nt(()=>{te.off("insert",b),te.off("delete",vn)}),($,B)=>{const Tn=nn("el-avatar"),On=nn("ArrowRight"),Bn=nn("el-icon"),ae=nn("el-button"),qe=nn("RefreshLeft"),Nr=nn("Delete"),pe=nn("el-empty"),ce=nn("el-image"),Kr=nn("el-input-number"),Ve=nn("el-switch");return D(),en("div",Lg,[v("div",Sg,[v("div",Rg,[U(Tn,{class:"avatar",src:H.value.avatar},null,8,["src"]),H.value.uid?(D(),en("div",Eg,[v("div",bg,[v("div",null,"手机号: "+K(H.value.mobile||H.value.account),1),U(ae,{type:"primary",link:"",class:"change-user",onClick:B[0]||(B[0]=pn=>X.value.open(H.value.uid))},{default:hn(()=>[un("切换用户"),U(Bn,null,{default:hn(()=>[U(On)]),_:1})]),_:1})]),v("div",Tg,[v("div",Og,[v("div",Pg,[un("采购款: "),v("span",$g,K(H.value.purchase_funds),1)]),v("div",Bg,[un("礼品券: "),v("span",Wg,K(H.value.get_frozen),1)]),v("div",null,[un("余额: "),v("span",Fg,K(H.value.now_money),1)])]),U(ae,{style:{"margin-top":"0.2rem"},link:"",onClick:B[1]||(B[1]=pn=>H.value.uid="")},{default:hn(()=>[un(" 重置"),U(Bn,null,{default:hn(()=>[U(qe)]),_:1})]),_:1})])])):(D(),en("div",Ug,[v("div",Mg,[Dg,U(ae,{type:"primary",link:"",class:"change-user",onClick:B[2]||(B[2]=pn=>X.value.open())},{default:hn(()=>[un("切换用户"),U(Bn,null,{default:hn(()=>[U(On)]),_:1})]),_:1})])]))]),U(Ig,{ref_key:"userListRef",ref:X,onSetUser:an},null,512)]),v("div",Ng,[v("div",Kg,[un(" 已选购 "),v("span",null,K(E.value.length),1),un(" 款 ")]),v("div",{class:"nav-item-clear",onClick:dn},[U(Bn,null,{default:hn(()=>[U(Nr)]),_:1}),un("清空 (Delete) ")])]),v("div",Gg,[E.value.length==0?(D(),Se(pe,{key:0,description:"请点击右侧添加商品"})):(D(!0),en(Ut,{key:1},Mt(E.value,(pn,Gr)=>(D(),en("div",{class:"order-item",key:Gr},[U(ce,{loading:"lazy",class:"order-item-img",src:pn.image},null,8,["src"]),v("div",zg,[v("div",Hg,[v("div",kg,K(pn.store_name),1),v("div",{class:"delete",onClick:ht=>fn(pn.id)},"删除",8,qg)]),v("div",Vg,[v("span",null,K(pn.unit_name),1)]),v("div",Zg,[v("div",null,[un(" ¥"),v("span",null,K(pn.price),1)]),v("div",null,[U(Kr,{modelValue:pn.cart_num,"onUpdate:modelValue":ht=>pn.cart_num=ht,min:+pn.batch>0?+pn.batch:1,step:1,"step-strictly":"",onChange:ht=>sn(pn)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])])])])]))),128))]),v("div",Yg,[v("div",Xg,[v("div",Jg,[v("div",Qg,[un(" 合计: "),v("span",null,[un("¥"),v("span",jg,K(J.value.pay_price||"0.00"),1)])]),J.value.msg?(D(),en("div",nv,[v("span",ev,K(J.value.msg),1)])):fe("",!0)]),v("div",tv,[U(Ve,{modelValue:cn.value,"onUpdate:modelValue":B[3]||(B[3]=pn=>cn.value=pn),size:"large","inline-prompt":"","active-text":"存货","inactive-text":"不存"},null,8,["modelValue"])])]),v("div",rv,[U(ae,{class:"btn",type:"primary",onClick:A,disabled:E.value.length==0},{default:hn(()=>[un(K("立即结账 (F9)"))]),_:1},8,["disabled"])])]),U(sg,{ref_key:"priceRef",ref:G,onChangeAllPrice:W},null,512)])}}},uv=ct(iv,[["__scopeId","data-v-bcd603bf"]]);var Fr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Fr.exports;(function(P,y){(function(){var o,E="4.17.21",V=200,Q="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",x="Expected a function",X="Invalid `variable` option passed into `_.template`",dn="__lodash_hash_undefined__",fn=500,tn="__lodash_placeholder__",J=1,xn=2,Z=4,A=1,sn=2,W=1,G=2,on=4,H=8,an=16,cn=32,k=64,b=128,vn=256,$=512,B=30,Tn="...",On=800,Bn=16,ae=1,qe=2,Nr=3,pe=1/0,ce=9007199254740991,Kr=17976931348623157e292,Ve=NaN,pn=4294967295,Gr=pn-1,ht=pn>>>1,jo=[["ary",b],["bind",W],["bindKey",G],["curry",H],["curryRight",an],["flip",$],["partial",cn],["partialRight",k],["rearg",vn]],Ze="[object Arguments]",Kt="[object Array]",nl="[object AsyncFunction]",_t="[object Boolean]",dt="[object Date]",el="[object DOMException]",Gt="[object Error]",zt="[object Function]",vu="[object GeneratorFunction]",re="[object Map]",pt="[object Number]",tl="[object Null]",ge="[object Object]",mu="[object Promise]",rl="[object Proxy]",gt="[object RegExp]",ie="[object Set]",vt="[object String]",Ht="[object Symbol]",il="[object Undefined]",mt="[object WeakMap]",ul="[object WeakSet]",wt="[object ArrayBuffer]",Ye="[object DataView]",zr="[object Float32Array]",Hr="[object Float64Array]",kr="[object Int8Array]",qr="[object Int16Array]",Vr="[object Int32Array]",Zr="[object Uint8Array]",Yr="[object Uint8ClampedArray]",Xr="[object Uint16Array]",Jr="[object Uint32Array]",sl=/\b__p \+= '';/g,ol=/\b(__p \+=) '' \+/g,ll=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wu=/&(?:amp|lt|gt|quot|#39);/g,yu=/[&<>"']/g,fl=RegExp(wu.source),al=RegExp(yu.source),cl=/<%-([\s\S]+?)%>/g,hl=/<%([\s\S]+?)%>/g,xu=/<%=([\s\S]+?)%>/g,_l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dl=/^\w*$/,pl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qr=/[\\^$.*+?()[\]{}|]/g,gl=RegExp(Qr.source),jr=/^\s+/,vl=/\s/,ml=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wl=/\{\n\/\* \[wrapped with (.+)\] \*/,yl=/,? & /,xl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Al=/[()=,{}\[\]\/\s]/,Il=/\\(\\)?/g,Cl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Au=/\w*$/,Ll=/^[-+]0x[0-9a-f]+$/i,Sl=/^0b[01]+$/i,Rl=/^\[object .+?Constructor\]$/,El=/^0o[0-7]+$/i,bl=/^(?:0|[1-9]\d*)$/,Tl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,kt=/($^)/,Ol=/['\n\r\u2028\u2029\\]/g,qt="\\ud800-\\udfff",Pl="\\u0300-\\u036f",$l="\\ufe20-\\ufe2f",Bl="\\u20d0-\\u20ff",Iu=Pl+$l+Bl,Cu="\\u2700-\\u27bf",Lu="a-z\\xdf-\\xf6\\xf8-\\xff",Wl="\\xac\\xb1\\xd7\\xf7",Fl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ul="\\u2000-\\u206f",Ml=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Su="A-Z\\xc0-\\xd6\\xd8-\\xde",Ru="\\ufe0e\\ufe0f",Eu=Wl+Fl+Ul+Ml,ni="['’]",Dl="["+qt+"]",bu="["+Eu+"]",Vt="["+Iu+"]",Tu="\\d+",Nl="["+Cu+"]",Ou="["+Lu+"]",Pu="[^"+qt+Eu+Tu+Cu+Lu+Su+"]",ei="\\ud83c[\\udffb-\\udfff]",Kl="(?:"+Vt+"|"+ei+")",$u="[^"+qt+"]",ti="(?:\\ud83c[\\udde6-\\uddff]){2}",ri="[\\ud800-\\udbff][\\udc00-\\udfff]",Xe="["+Su+"]",Bu="\\u200d",Wu="(?:"+Ou+"|"+Pu+")",Gl="(?:"+Xe+"|"+Pu+")",Fu="(?:"+ni+"(?:d|ll|m|re|s|t|ve))?",Uu="(?:"+ni+"(?:D|LL|M|RE|S|T|VE))?",Mu=Kl+"?",Du="["+Ru+"]?",zl="(?:"+Bu+"(?:"+[$u,ti,ri].join("|")+")"+Du+Mu+")*",Hl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Nu=Du+Mu+zl,ql="(?:"+[Nl,ti,ri].join("|")+")"+Nu,Vl="(?:"+[$u+Vt+"?",Vt,ti,ri,Dl].join("|")+")",Zl=RegExp(ni,"g"),Yl=RegExp(Vt,"g"),ii=RegExp(ei+"(?="+ei+")|"+Vl+Nu,"g"),Xl=RegExp([Xe+"?"+Ou+"+"+Fu+"(?="+[bu,Xe,"$"].join("|")+")",Gl+"+"+Uu+"(?="+[bu,Xe+Wu,"$"].join("|")+")",Xe+"?"+Wu+"+"+Fu,Xe+"+"+Uu,kl,Hl,Tu,ql].join("|"),"g"),Jl=RegExp("["+Bu+qt+Iu+Ru+"]"),Ql=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nf=-1,mn={};mn[zr]=mn[Hr]=mn[kr]=mn[qr]=mn[Vr]=mn[Zr]=mn[Yr]=mn[Xr]=mn[Jr]=!0,mn[Ze]=mn[Kt]=mn[wt]=mn[_t]=mn[Ye]=mn[dt]=mn[Gt]=mn[zt]=mn[re]=mn[pt]=mn[ge]=mn[gt]=mn[ie]=mn[vt]=mn[mt]=!1;var gn={};gn[Ze]=gn[Kt]=gn[wt]=gn[Ye]=gn[_t]=gn[dt]=gn[zr]=gn[Hr]=gn[kr]=gn[qr]=gn[Vr]=gn[re]=gn[pt]=gn[ge]=gn[gt]=gn[ie]=gn[vt]=gn[Ht]=gn[Zr]=gn[Yr]=gn[Xr]=gn[Jr]=!0,gn[Gt]=gn[zt]=gn[mt]=!1;var ef={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},tf={"&":"&","<":"<",">":">",'"':""","'":"'"},rf={"&":"&","<":"<",">":">",""":'"',"'":"'"},uf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},sf=parseFloat,of=parseInt,Ku=typeof Wt=="object"&&Wt&&Wt.Object===Object&&Wt,lf=typeof self=="object"&&self&&self.Object===Object&&self,En=Ku||lf||Function("return this")(),ui=y&&!y.nodeType&&y,Fe=ui&&!0&&P&&!P.nodeType&&P,Gu=Fe&&Fe.exports===ui,si=Gu&&Ku.process,Zn=function(){try{var a=Fe&&Fe.require&&Fe.require("util").types;return a||si&&si.binding&&si.binding("util")}catch{}}(),zu=Zn&&Zn.isArrayBuffer,Hu=Zn&&Zn.isDate,ku=Zn&&Zn.isMap,qu=Zn&&Zn.isRegExp,Vu=Zn&&Zn.isSet,Zu=Zn&&Zn.isTypedArray;function Gn(a,_,h){switch(h.length){case 0:return a.call(_);case 1:return a.call(_,h[0]);case 2:return a.call(_,h[0],h[1]);case 3:return a.call(_,h[0],h[1],h[2])}return a.apply(_,h)}function ff(a,_,h,w){for(var T=-1,j=a==null?0:a.length;++T-1}function oi(a,_,h){for(var w=-1,T=a==null?0:a.length;++w-1;);return h}function ts(a,_){for(var h=a.length;h--&&Je(_,a[h],0)>-1;);return h}function mf(a,_){for(var h=a.length,w=0;h--;)a[h]===_&&++w;return w}var wf=ci(ef),yf=ci(tf);function xf(a){return"\\"+uf[a]}function Af(a,_){return a==null?o:a[_]}function Qe(a){return Jl.test(a)}function If(a){return Ql.test(a)}function Cf(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function pi(a){var _=-1,h=Array(a.size);return a.forEach(function(w,T){h[++_]=[T,w]}),h}function rs(a,_){return function(h){return a(_(h))}}function be(a,_){for(var h=-1,w=a.length,T=0,j=[];++h-1}function ca(n,e){var t=this.__data__,r=cr(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}ve.prototype.clear=oa,ve.prototype.delete=la,ve.prototype.get=fa,ve.prototype.has=aa,ve.prototype.set=ca;function me(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Qn(n,e,t,r,i,s){var l,f=e&J,c=e&xn,d=e&Z;if(t&&(l=i?t(n,r,i,s):t(n)),l!==o)return l;if(!yn(n))return n;var p=O(n);if(p){if(l=pc(n),!f)return Mn(n,l)}else{var g=$n(n),m=g==zt||g==vu;if(We(n))return Ds(n,f);if(g==ge||g==Ze||m&&!i){if(l=c||m?{}:io(n),!f)return c?ic(n,Ra(l,n)):rc(n,ps(l,n))}else{if(!gn[g])return i?n:{};l=gc(n,g,f)}}s||(s=new se);var I=s.get(n);if(I)return I;s.set(n,l),Bo(n)?n.forEach(function(S){l.add(Qn(S,e,t,S,n,s))}):Po(n)&&n.forEach(function(S,z){l.set(z,Qn(S,e,t,z,n,s))});var L=d?c?Ki:Ni:c?Nn:Rn,M=p?o:L(n);return Yn(M||n,function(S,z){M&&(z=S,S=n[z]),St(l,z,Qn(S,e,t,z,n,s))}),l}function Ea(n){var e=Rn(n);return function(t){return gs(t,n,e)}}function gs(n,e,t){var r=t.length;if(n==null)return!r;for(n=_n(n);r--;){var i=t[r],s=e[i],l=n[i];if(l===o&&!(i in n)||!s(l))return!1}return!0}function vs(n,e,t){if(typeof n!="function")throw new Xn(x);return $t(function(){n.apply(o,t)},e)}function Rt(n,e,t,r){var i=-1,s=Zt,l=!0,f=n.length,c=[],d=e.length;if(!f)return c;t&&(e=wn(e,zn(t))),r?(s=oi,l=!1):e.length>=V&&(s=yt,l=!1,e=new De(e));n:for(;++ii?0:i+t),r=r===o||r>i?i:F(r),r<0&&(r+=i),r=t>r?0:Fo(r);t0&&t(f)?e>1?bn(f,e-1,t,r,i):Ee(i,f):r||(i[i.length]=f)}return i}var Ai=ks(),ys=ks(!0);function he(n,e){return n&&Ai(n,e,Rn)}function Ii(n,e){return n&&ys(n,e,Rn)}function _r(n,e){return Re(e,function(t){return Ie(n[t])})}function Ke(n,e){e=$e(e,n);for(var t=0,r=e.length;n!=null&&te}function Oa(n,e){return n!=null&&ln.call(n,e)}function Pa(n,e){return n!=null&&e in _n(n)}function $a(n,e,t){return n>=Pn(e,t)&&n=120&&p.length>=120)?new De(l&&p):o}p=n[0];var g=-1,m=f[0];n:for(;++g-1;)f!==n&&ir.call(f,c,1),ir.call(n,c,1);return n}function Os(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==s){var s=i;Ae(i)?ir.call(n,i,1):$i(n,i)}}return n}function Ti(n,e){return n+or(cs()*(e-n+1))}function qa(n,e,t,r){for(var i=-1,s=Sn(sr((e-n)/(t||1)),0),l=h(s);s--;)l[r?s:++i]=n,n+=t;return l}function Oi(n,e){var t="";if(!n||e<1||e>ce)return t;do e%2&&(t+=n),e=or(e/2),e&&(n+=n);while(e);return t}function N(n,e){return Zi(oo(n,e,Kn),n+"")}function Va(n){return ds(ft(n))}function Za(n,e){var t=ft(n);return Cr(t,Ne(e,0,t.length))}function Tt(n,e,t,r){if(!yn(n))return n;e=$e(e,n);for(var i=-1,s=e.length,l=s-1,f=n;f!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=h(i);++r>>1,l=n[s];l!==null&&!kn(l)&&(t?l<=e:l=V){var d=e?null:lc(n);if(d)return Xt(d);l=!1,i=yt,c=new De}else c=e?[]:f;n:for(;++r=r?n:jn(n,e,t)}var Ms=Df||function(n){return En.clearTimeout(n)};function Ds(n,e){if(e)return n.slice();var t=n.length,r=ss?ss(t):new n.constructor(t);return n.copy(r),r}function Ui(n){var e=new n.constructor(n.byteLength);return new tr(e).set(new tr(n)),e}function ja(n,e){var t=e?Ui(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function nc(n){var e=new n.constructor(n.source,Au.exec(n));return e.lastIndex=n.lastIndex,e}function ec(n){return Lt?_n(Lt.call(n)):{}}function Ns(n,e){var t=e?Ui(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function Ks(n,e){if(n!==e){var t=n!==o,r=n===null,i=n===n,s=kn(n),l=e!==o,f=e===null,c=e===e,d=kn(e);if(!f&&!d&&!s&&n>e||s&&l&&c&&!f&&!d||r&&l&&c||!t&&c||!i)return 1;if(!r&&!s&&!d&&n=f)return c;var d=t[r];return c*(d=="desc"?-1:1)}}return n.index-e.index}function Gs(n,e,t,r){for(var i=-1,s=n.length,l=t.length,f=-1,c=e.length,d=Sn(s-l,0),p=h(c+d),g=!r;++f1?t[i-1]:o,l=i>2?t[2]:o;for(s=n.length>3&&typeof s=="function"?(i--,s):o,l&&Fn(t[0],t[1],l)&&(s=i<3?o:s,i=1),e=_n(e);++r-1?i[s?e[l]:l]:o}}function Zs(n){return xe(function(e){var t=e.length,r=t,i=Jn.prototype.thru;for(n&&e.reverse();r--;){var s=e[r];if(typeof s!="function")throw new Xn(x);if(i&&!l&&Ar(s)=="wrapper")var l=new Jn([],!0)}for(r=l?r:t;++r1&&Y.reverse(),p&&cf))return!1;var d=s.get(n),p=s.get(e);if(d&&p)return d==e&&p==n;var g=-1,m=!0,I=t&sn?new De:o;for(s.set(n,e),s.set(e,n);++g1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(ml,`{ +/* [wrapped with `+e+`] */ +`)}function mc(n){return O(n)||He(n)||!!(fs&&n&&n[fs])}function Ae(n,e){var t=typeof n;return e=e??ce,!!e&&(t=="number"||t!="symbol"&&bl.test(n))&&n>-1&&n%1==0&&n0){if(++e>=On)return arguments[0]}else e=0;return n.apply(o,arguments)}}function Cr(n,e){var t=-1,r=n.length,i=r-1;for(e=e===o?r:e;++t1?n[e-1]:o;return t=typeof t=="function"?(n.pop(),t):o,yo(n,t)});function xo(n){var e=u(n);return e.__chain__=!0,e}function bh(n,e){return e(n),n}function Lr(n,e){return e(n)}var Th=xe(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(s){return xi(s,n)};return e>1||this.__actions__.length||!(r instanceof q)||!Ae(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Lr,args:[i],thisArg:o}),new Jn(r,this.__chain__).thru(function(s){return e&&!s.length&&s.push(o),s}))});function Oh(){return xo(this)}function Ph(){return new Jn(this.value(),this.__chain__)}function $h(){this.__values__===o&&(this.__values__=Wo(this.value()));var n=this.__index__>=this.__values__.length,e=n?o:this.__values__[this.__index__++];return{done:n,value:e}}function Bh(){return this}function Wh(n){for(var e,t=this;t instanceof ar;){var r=_o(t);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Fh(){var n=this.__wrapped__;if(n instanceof q){var e=n;return this.__actions__.length&&(e=new q(this)),e=e.reverse(),e.__actions__.push({func:Lr,args:[Yi],thisArg:o}),new Jn(e,this.__chain__)}return this.thru(Yi)}function Uh(){return Fs(this.__wrapped__,this.__actions__)}var Mh=vr(function(n,e,t){ln.call(n,t)?++n[t]:we(n,t,1)});function Dh(n,e,t){var r=O(n)?Yu:ba;return t&&Fn(n,e,t)&&(e=o),r(n,C(e,3))}function Nh(n,e){var t=O(n)?Re:ws;return t(n,C(e,3))}var Kh=Vs(po),Gh=Vs(go);function zh(n,e){return bn(Sr(n,e),1)}function Hh(n,e){return bn(Sr(n,e),pe)}function kh(n,e,t){return t=t===o?1:F(t),bn(Sr(n,e),t)}function Ao(n,e){var t=O(n)?Yn:Oe;return t(n,C(e,3))}function Io(n,e){var t=O(n)?af:ms;return t(n,C(e,3))}var qh=vr(function(n,e,t){ln.call(n,t)?n[t].push(e):we(n,t,[e])});function Vh(n,e,t,r){n=Dn(n)?n:ft(n),t=t&&!r?F(t):0;var i=n.length;return t<0&&(t=Sn(i+t,0)),Or(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&Je(n,e,t)>-1}var Zh=N(function(n,e,t){var r=-1,i=typeof e=="function",s=Dn(n)?h(n.length):[];return Oe(n,function(l){s[++r]=i?Gn(e,l,t):Et(l,e,t)}),s}),Yh=vr(function(n,e,t){we(n,t,e)});function Sr(n,e){var t=O(n)?wn:Ls;return t(n,C(e,3))}function Xh(n,e,t,r){return n==null?[]:(O(e)||(e=e==null?[]:[e]),t=r?o:t,O(t)||(t=t==null?[]:[t]),bs(n,e,t))}var Jh=vr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Qh(n,e,t){var r=O(n)?li:ju,i=arguments.length<3;return r(n,C(e,4),t,i,Oe)}function jh(n,e,t){var r=O(n)?cf:ju,i=arguments.length<3;return r(n,C(e,4),t,i,ms)}function n_(n,e){var t=O(n)?Re:ws;return t(n,br(C(e,3)))}function e_(n){var e=O(n)?ds:Va;return e(n)}function t_(n,e,t){(t?Fn(n,e,t):e===o)?e=1:e=F(e);var r=O(n)?Ca:Za;return r(n,e)}function r_(n){var e=O(n)?La:Xa;return e(n)}function i_(n){if(n==null)return 0;if(Dn(n))return Or(n)?je(n):n.length;var e=$n(n);return e==re||e==ie?n.size:Ri(n).length}function u_(n,e,t){var r=O(n)?fi:Ja;return t&&Fn(n,e,t)&&(e=o),r(n,C(e,3))}var s_=N(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Fn(n,e[0],e[1])?e=[]:t>2&&Fn(e[0],e[1],e[2])&&(e=[e[0]]),bs(n,bn(e,1),[])}),Rr=Nf||function(){return En.Date.now()};function o_(n,e){if(typeof e!="function")throw new Xn(x);return n=F(n),function(){if(--n<1)return e.apply(this,arguments)}}function Co(n,e,t){return e=t?o:e,e=n&&e==null?n.length:e,ye(n,b,o,o,o,o,e)}function Lo(n,e){var t;if(typeof e!="function")throw new Xn(x);return n=F(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Ji=N(function(n,e,t){var r=W;if(t.length){var i=be(t,ot(Ji));r|=cn}return ye(n,r,e,t,i)}),So=N(function(n,e,t){var r=W|G;if(t.length){var i=be(t,ot(So));r|=cn}return ye(e,r,n,t,i)});function Ro(n,e,t){e=t?o:e;var r=ye(n,H,o,o,o,o,o,e);return r.placeholder=Ro.placeholder,r}function Eo(n,e,t){e=t?o:e;var r=ye(n,an,o,o,o,o,o,e);return r.placeholder=Eo.placeholder,r}function bo(n,e,t){var r,i,s,l,f,c,d=0,p=!1,g=!1,m=!0;if(typeof n!="function")throw new Xn(x);e=ee(e)||0,yn(t)&&(p=!!t.leading,g="maxWait"in t,s=g?Sn(ee(t.maxWait)||0,e):s,m="trailing"in t?!!t.trailing:m);function I(Cn){var le=r,Le=i;return r=i=o,d=Cn,l=n.apply(Le,le),l}function L(Cn){return d=Cn,f=$t(z,e),p?I(Cn):l}function M(Cn){var le=Cn-c,Le=Cn-d,Zo=e-le;return g?Pn(Zo,s-Le):Zo}function S(Cn){var le=Cn-c,Le=Cn-d;return c===o||le>=e||le<0||g&&Le>=s}function z(){var Cn=Rr();if(S(Cn))return Y(Cn);f=$t(z,M(Cn))}function Y(Cn){return f=o,m&&r?I(Cn):(r=i=o,l)}function qn(){f!==o&&Ms(f),d=0,r=c=i=f=o}function Un(){return f===o?l:Y(Rr())}function Vn(){var Cn=Rr(),le=S(Cn);if(r=arguments,i=this,c=Cn,le){if(f===o)return L(c);if(g)return Ms(f),f=$t(z,e),I(c)}return f===o&&(f=$t(z,e)),l}return Vn.cancel=qn,Vn.flush=Un,Vn}var l_=N(function(n,e){return vs(n,1,e)}),f_=N(function(n,e,t){return vs(n,ee(e)||0,t)});function a_(n){return ye(n,$)}function Er(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Xn(x);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=t.cache;if(s.has(i))return s.get(i);var l=n.apply(this,r);return t.cache=s.set(i,l)||s,l};return t.cache=new(Er.Cache||me),t}Er.Cache=me;function br(n){if(typeof n!="function")throw new Xn(x);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function c_(n){return Lo(2,n)}var h_=Qa(function(n,e){e=e.length==1&&O(e[0])?wn(e[0],zn(C())):wn(bn(e,1),zn(C()));var t=e.length;return N(function(r){for(var i=-1,s=Pn(r.length,t);++i=e}),He=As(function(){return arguments}())?As:function(n){return An(n)&&ln.call(n,"callee")&&!ls.call(n,"callee")},O=h.isArray,R_=zu?zn(zu):Wa;function Dn(n){return n!=null&&Tr(n.length)&&!Ie(n)}function In(n){return An(n)&&Dn(n)}function E_(n){return n===!0||n===!1||An(n)&&Wn(n)==_t}var We=Gf||fu,b_=Hu?zn(Hu):Fa;function T_(n){return An(n)&&n.nodeType===1&&!Bt(n)}function O_(n){if(n==null)return!0;if(Dn(n)&&(O(n)||typeof n=="string"||typeof n.splice=="function"||We(n)||lt(n)||He(n)))return!n.length;var e=$n(n);if(e==re||e==ie)return!n.size;if(Pt(n))return!Ri(n).length;for(var t in n)if(ln.call(n,t))return!1;return!0}function P_(n,e){return bt(n,e)}function $_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?bt(n,e,o,t):!!r}function ji(n){if(!An(n))return!1;var e=Wn(n);return e==Gt||e==el||typeof n.message=="string"&&typeof n.name=="string"&&!Bt(n)}function B_(n){return typeof n=="number"&&as(n)}function Ie(n){if(!yn(n))return!1;var e=Wn(n);return e==zt||e==vu||e==nl||e==rl}function Oo(n){return typeof n=="number"&&n==F(n)}function Tr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ce}function yn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function An(n){return n!=null&&typeof n=="object"}var Po=ku?zn(ku):Ma;function W_(n,e){return n===e||Si(n,e,zi(e))}function F_(n,e,t){return t=typeof t=="function"?t:o,Si(n,e,zi(e),t)}function U_(n){return $o(n)&&n!=+n}function M_(n){if(xc(n))throw new T(Q);return Is(n)}function D_(n){return n===null}function N_(n){return n==null}function $o(n){return typeof n=="number"||An(n)&&Wn(n)==pt}function Bt(n){if(!An(n)||Wn(n)!=ge)return!1;var e=rr(n);if(e===null)return!0;var t=ln.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&jt.call(t)==Ff}var nu=qu?zn(qu):Da;function K_(n){return Oo(n)&&n>=-ce&&n<=ce}var Bo=Vu?zn(Vu):Na;function Or(n){return typeof n=="string"||!O(n)&&An(n)&&Wn(n)==vt}function kn(n){return typeof n=="symbol"||An(n)&&Wn(n)==Ht}var lt=Zu?zn(Zu):Ka;function G_(n){return n===o}function z_(n){return An(n)&&$n(n)==mt}function H_(n){return An(n)&&Wn(n)==ul}var k_=xr(Ei),q_=xr(function(n,e){return n<=e});function Wo(n){if(!n)return[];if(Dn(n))return Or(n)?ue(n):Mn(n);if(xt&&n[xt])return Cf(n[xt]());var e=$n(n),t=e==re?pi:e==ie?Xt:ft;return t(n)}function Ce(n){if(!n)return n===0?n:0;if(n=ee(n),n===pe||n===-pe){var e=n<0?-1:1;return e*Kr}return n===n?n:0}function F(n){var e=Ce(n),t=e%1;return e===e?t?e-t:e:0}function Fo(n){return n?Ne(F(n),0,pn):0}function ee(n){if(typeof n=="number")return n;if(kn(n))return Ve;if(yn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=yn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=ns(n);var t=Sl.test(n);return t||El.test(n)?of(n.slice(2),t?2:8):Ll.test(n)?Ve:+n}function Uo(n){return _e(n,Nn(n))}function V_(n){return n?Ne(F(n),-ce,ce):n===0?n:0}function rn(n){return n==null?"":Hn(n)}var Z_=ut(function(n,e){if(Pt(e)||Dn(e)){_e(e,Rn(e),n);return}for(var t in e)ln.call(e,t)&&St(n,t,e[t])}),Mo=ut(function(n,e){_e(e,Nn(e),n)}),Pr=ut(function(n,e,t,r){_e(e,Nn(e),n,r)}),Y_=ut(function(n,e,t,r){_e(e,Rn(e),n,r)}),X_=xe(xi);function J_(n,e){var t=it(n);return e==null?t:ps(t,e)}var Q_=N(function(n,e){n=_n(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&Fn(e[0],e[1],i)&&(r=1);++t1),s}),_e(n,Ki(n),t),r&&(t=Qn(t,J|xn|Z,fc));for(var i=e.length;i--;)$i(t,e[i]);return t});function gd(n,e){return No(n,br(C(e)))}var vd=xe(function(n,e){return n==null?{}:Ha(n,e)});function No(n,e){if(n==null)return{};var t=wn(Ki(n),function(r){return[r]});return e=C(e),Ts(n,t,function(r,i){return e(r,i[0])})}function md(n,e,t){e=$e(e,n);var r=-1,i=e.length;for(i||(i=1,n=o);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=cs();return Pn(n+i*(e-n+sf("1e-"+((i+"").length-1))),e)}return Ti(n,e)}var bd=st(function(n,e,t){return e=e.toLowerCase(),n+(t?zo(e):e)});function zo(n){return ru(rn(n).toLowerCase())}function Ho(n){return n=rn(n),n&&n.replace(Tl,wf).replace(Yl,"")}function Td(n,e,t){n=rn(n),e=Hn(e);var r=n.length;t=t===o?r:Ne(F(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function Od(n){return n=rn(n),n&&al.test(n)?n.replace(yu,yf):n}function Pd(n){return n=rn(n),n&&gl.test(n)?n.replace(Qr,"\\$&"):n}var $d=st(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Bd=st(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),Wd=qs("toLowerCase");function Fd(n,e,t){n=rn(n),e=F(e);var r=e?je(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return yr(or(i),t)+n+yr(sr(i),t)}function Ud(n,e,t){n=rn(n),e=F(e);var r=e?je(n):0;return e&&r>>0,t?(n=rn(n),n&&(typeof e=="string"||e!=null&&!nu(e))&&(e=Hn(e),!e&&Qe(n))?Be(ue(n),0,t):n.split(e,t)):[]}var Hd=st(function(n,e,t){return n+(t?" ":"")+ru(e)});function kd(n,e,t){return n=rn(n),t=t==null?0:Ne(F(t),0,n.length),e=Hn(e),n.slice(t,t+e.length)==e}function qd(n,e,t){var r=u.templateSettings;t&&Fn(n,e,t)&&(e=o),n=rn(n),e=Pr({},e,r,js);var i=Pr({},e.imports,r.imports,js),s=Rn(i),l=di(i,s),f,c,d=0,p=e.interpolate||kt,g="__p += '",m=gi((e.escape||kt).source+"|"+p.source+"|"+(p===xu?Cl:kt).source+"|"+(e.evaluate||kt).source+"|$","g"),I="//# sourceURL="+(ln.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nf+"]")+` +`;n.replace(m,function(S,z,Y,qn,Un,Vn){return Y||(Y=qn),g+=n.slice(d,Vn).replace(Ol,xf),z&&(f=!0,g+=`' + +__e(`+z+`) + +'`),Un&&(c=!0,g+=`'; +`+Un+`; +__p += '`),Y&&(g+=`' + +((__t = (`+Y+`)) == null ? '' : __t) + +'`),d=Vn+S.length,S}),g+=`'; +`;var L=ln.call(e,"variable")&&e.variable;if(!L)g=`with (obj) { +`+g+` +} +`;else if(Al.test(L))throw new T(X);g=(c?g.replace(sl,""):g).replace(ol,"$1").replace(ll,"$1;"),g="function("+(L||"obj")+`) { +`+(L?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(f?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+g+`return __p +}`;var M=qo(function(){return j(s,I+"return "+g).apply(o,l)});if(M.source=g,ji(M))throw M;return M}function Vd(n){return rn(n).toLowerCase()}function Zd(n){return rn(n).toUpperCase()}function Yd(n,e,t){if(n=rn(n),n&&(t||e===o))return ns(n);if(!n||!(e=Hn(e)))return n;var r=ue(n),i=ue(e),s=es(r,i),l=ts(r,i)+1;return Be(r,s,l).join("")}function Xd(n,e,t){if(n=rn(n),n&&(t||e===o))return n.slice(0,is(n)+1);if(!n||!(e=Hn(e)))return n;var r=ue(n),i=ts(r,ue(e))+1;return Be(r,0,i).join("")}function Jd(n,e,t){if(n=rn(n),n&&(t||e===o))return n.replace(jr,"");if(!n||!(e=Hn(e)))return n;var r=ue(n),i=es(r,ue(e));return Be(r,i).join("")}function Qd(n,e){var t=B,r=Tn;if(yn(e)){var i="separator"in e?e.separator:i;t="length"in e?F(e.length):t,r="omission"in e?Hn(e.omission):r}n=rn(n);var s=n.length;if(Qe(n)){var l=ue(n);s=l.length}if(t>=s)return n;var f=t-je(r);if(f<1)return r;var c=l?Be(l,0,f).join(""):n.slice(0,f);if(i===o)return c+r;if(l&&(f+=c.length-f),nu(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=gi(i.source,rn(Au.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var g=d.index;c=c.slice(0,g===o?f:g)}}else if(n.indexOf(Hn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function jd(n){return n=rn(n),n&&fl.test(n)?n.replace(wu,Ef):n}var np=st(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),ru=qs("toUpperCase");function ko(n,e,t){return n=rn(n),e=t?o:e,e===o?If(n)?Of(n):df(n):n.match(e)||[]}var qo=N(function(n,e){try{return Gn(n,o,e)}catch(t){return ji(t)?t:new T(t)}}),ep=xe(function(n,e){return Yn(e,function(t){t=de(t),we(n,t,Ji(n[t],n))}),n});function tp(n){var e=n==null?0:n.length,t=C();return n=e?wn(n,function(r){if(typeof r[1]!="function")throw new Xn(x);return[t(r[0]),r[1]]}):[],N(function(r){for(var i=-1;++ice)return[];var t=pn,r=Pn(n,pn);e=C(e),n-=pn;for(var i=_i(r,e);++t0||e<0)?new q(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=F(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},q.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},q.prototype.toArray=function(){return this.take(pn)},he(q.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],s=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,f=r?[1]:arguments,c=l instanceof q,d=f[0],p=c||O(l),g=function(z){var Y=i.apply(u,Ee([z],f));return r&&m?Y[0]:Y};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var m=this.__chain__,I=!!this.__actions__.length,L=s&&!m,M=c&&!I;if(!s&&p){l=M?l:new q(this);var S=n.apply(l,f);return S.__actions__.push({func:Lr,args:[g],thisArg:o}),new Jn(S,m)}return L&&M?n.apply(this,f):(S=this.thru(g),L?r?S.value()[0]:S.value():S)})}),Yn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Jt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var s=this.value();return e.apply(O(s)?s:[],i)}return this[t](function(l){return e.apply(O(l)?l:[],i)})}}),he(q.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";ln.call(rt,r)||(rt[r]=[]),rt[r].push({name:e,func:t})}}),rt[mr(o,G).name]=[{name:"wrapper",func:o}],q.prototype.clone=jf,q.prototype.reverse=na,q.prototype.value=ea,u.prototype.at=Th,u.prototype.chain=Oh,u.prototype.commit=Ph,u.prototype.next=$h,u.prototype.plant=Wh,u.prototype.reverse=Fh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Uh,u.prototype.first=u.prototype.head,xt&&(u.prototype[xt]=Bh),u},nt=Pf();Fe?((Fe.exports=nt)._=nt,ui._=nt):En._=nt}).call(Wt)})(Fr,Fr.exports);var sv=Fr.exports;const ov=qp(sv),Dr=P=>(pu("data-v-9f29f2ff"),P=P(),gu(),P),lv={class:"my-order"},fv=Dr(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),av={class:"nav-item-input"},cv={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},hv=["onClick"],_v={class:"shop-name"},dv={key:0,class:"shop-price"},pv=Dr(()=>v("span",{class:"unit-name"},"活动价:",-1)),gv={key:0,class:"unit-name"},vv={key:1,class:"shop-price"},mv=Dr(()=>v("span",{class:"unit-name"},"原价: ",-1)),wv={class:"unit-name del"},yv={key:2,class:"shop-price"},xv={class:"unit-name"},Av={key:3,class:"no-stock-re"},Iv=Dr(()=>v("div",null,[v("span",null,"次日提")],-1)),Cv=[Iv],Lv={key:1,class:"no-data"},Sv={__name:"shop",props:{storeList:{type:Array,default:()=>[]},priceKey:{type:Object,default:()=>({})},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(P,{expose:y,emit:o}){const E=R(null),V=o,Q=R(""),x=()=>{V("loadMore",{store_name:Q.value})},X=A=>{V("changeItem",A)},dn=ov.throttle(()=>{let A={store_name:Q.value};V("getStoreList",A,!0)},300);y({name:Q,inputBlur:()=>{var A;(A=E.value)==null||A.blur()}});const tn=R(!1),J=()=>{tn.value=!0},xn=()=>{tn.value=!1},Z=()=>{var A;(A=E.value)==null||A.focus()};return Dt(()=>{_u(()=>{var A;(A=E.value)==null||A.focus(),J()}),te.on("shift",Z)}),Nt(()=>{te.off("shift",Z)}),(A,sn)=>{const W=nn("CircleClose"),G=nn("el-icon"),on=nn("el-input"),H=nn("Search"),an=nn("el-button"),cn=nn("el-image"),k=nn("el-space"),b=nn("el-empty"),vn=Ft("loading"),$=Ft("infinite-scroll");return D(),en("div",lv,[v("div",{class:Wr(["header-nav",{"input-focus":tn.value}])},[fv,v("div",av,[U(on,{modelValue:Q.value,"onUpdate:modelValue":sn[1]||(sn[1]=B=>Q.value=B),placeholder:"搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",ref_key:"codeRef",ref:E,onFocus:J,onBlur:xn,onKeyup:Jo($r(dn),["enter"]),onClear:$r(dn),style:{"font-size":"1rem"}},{suffix:hn(()=>[Q.value!=""?(D(),Se(G,{key:0,size:"28",onClick:sn[0]||(sn[0]=B=>Q.value=""),style:{cursor:"pointer","margin-right":"1rem"}},{default:hn(()=>[U(W)]),_:1})):fe("",!0)]),_:1},8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:sn[2]||(sn[2]=(...B)=>$r(dn)&&$r(dn)(...B))},[U(an,{class:"btn",type:"primary"},{default:hn(()=>[U(G,null,{default:hn(()=>[U(H)]),_:1})]),_:1})])],2),du((D(),en("div",cv,[P.storeList.length?(D(),Se(k,{key:0,wrap:"",size:14},{default:hn(()=>[(D(!0),en(Ut,null,Mt(P.storeList,(B,Tn)=>(D(),en("div",{class:"shop-item",key:Tn,onClick:On=>X(B)},[U(cn,{loading:"lazy",src:B.image},null,8,["src"]),v("div",_v,K(B.store_name),1),P.priceKey.off_activity==1?(D(),en("div",dv,[pv,un(" ¥"),v("span",null,K(B[P.priceKey.price]),1),B.unit_name?(D(),en("span",gv,"/"+K(B.unit_name),1)):fe("",!0)])):fe("",!0),P.priceKey.off_activity==1?(D(),en("div",vv,[mv,un(),v("span",wv,"¥"+K(B[P.priceKey.op_price])+" /"+K(B.unit_name),1)])):(D(),en("div",yv,[un(" ¥"),v("span",null,K(B[P.priceKey.op_price]),1),v("span",xv,"/"+K(B.unit_name),1)])),B.stock<=0?(D(),en("div",Av,Cv)):fe("",!0)],8,hv))),128))]),_:1})):fe("",!0),P.storeList.length?fe("",!0):(D(),en("div",Lv,[U(b,{"image-size":200,description:"没有找到对应商品"})]))])),[[vn,P.loading],[$,x]])])}}},Rv=ct(Sv,[["__scopeId","data-v-9f29f2ff"]]),Qo=P=>(pu("data-v-6c040b11"),P=P(),gu(),P),Ev={class:"shop"},bv={class:"shop-info"},Tv={class:"shop-info-left"},Ov={class:"shop-info-right"},Pv={class:"shop-info-right-top"},$v={key:0,class:"shop-info-right-price"},Bv=Qo(()=>v("span",{class:"unit-name"},"活动价:",-1)),Wv={key:0,class:"unit-name"},Fv={key:1,class:"shop-info-right-price"},Uv=Qo(()=>v("span",{class:"unit-name"},"原价: ",-1)),Mv={class:"unit-name del"},Dv={key:2,class:"shop-info-right-price"},Nv={class:"unit-name"},Kv={class:"shop-sku"},Gv={class:"title"},zv={class:"sku"},Hv={class:"dialog-footer"},kv={__name:"pupop",props:{priceKey:{type:Object,default:()=>({})}},emits:["changeItem"],setup(P,{expose:y,emit:o}){const E=R(!1),V=R(null),Q=Z=>{E.value=Z},x=R({}),X=R(!1),dn=R("add"),fn=(Z,A="add")=>{dn.value=A,x.value=JSON.parse(JSON.stringify(Z))},tn=o,J=()=>{x.value.cart_num||(x.value.cart_num=x.value.batch>0?x.value.batch:1),tn("changeItem",x.value),E.value=!1};y({show:Q,setForm:fn});const xn=()=>{E.value&&J()};return Dt(()=>{te.on("enter",xn)}),Nt(()=>{te.off("enter",xn)}),(Z,A)=>{const sn=nn("el-image"),W=nn("el-input-number"),G=nn("el-button"),on=nn("el-dialog"),H=Ft("loading");return D(),Se(on,{modelValue:E.value,"onUpdate:modelValue":A[1]||(A[1]=an=>E.value=an),title:"购买数量",width:"650",onOpened:A[2]||(A[2]=an=>V.value.focus())},Vp({default:hn(()=>[du((D(),en("div",Ev,[v("div",bv,[v("div",Tv,[U(sn,{loading:"lazy",src:x.value.image},null,8,["src"])]),v("div",Ov,[v("div",Pv,K(x.value.store_name),1),v("div",null,[P.priceKey.off_activity==1?(D(),en("div",$v,[Bv,un(" ¥"),v("span",null,K(x.value[P.priceKey.price]),1),x.value.unit_name?(D(),en("span",Wv,"/"+K(x.value.unit_name),1)):fe("",!0)])):fe("",!0),P.priceKey.off_activity==1?(D(),en("div",Fv,[Uv,un(),v("span",Mv,"¥"+K(x.value[P.priceKey.op_price])+" /"+K(x.value.unit_name),1)])):(D(),en("div",Dv,[un(" ¥"),v("span",null,K(x.value[P.priceKey.op_price]),1),v("span",Nv,"/"+K(x.value.unit_name),1)]))])])]),v("div",Kv,[v("div",Gv,"购买数量 ( "+K(x.value.unit_name)+" )",1),v("div",zv,[U(W,{ref_key:"inputRef",ref:V,modelValue:x.value.cart_num,"onUpdate:modelValue":A[0]||(A[0]=an=>x.value.cart_num=an),placeholder:`请输入数量(默认为${+x.value.batch>0?x.value.batch:"1"})`,min:+x.value.batch>0?+x.value.batch:1,"step-strictly":"",step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue","placeholder","min"])])])])),[[H,X.value]])]),_:2},[dn.value!="add"&&x.value.attr&&x.value.attr.length==1?void 0:{name:"footer",fn:hn(()=>[v("div",Hv,[U(G,{class:"ok-btn",type:"primary",onClick:J},{default:hn(()=>[un(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},qv=ct(kv,[["__scopeId","data-v-6c040b11"]]),Vv=["onClick","onMousemove"],Zv=["onMousemove"],Yv={class:"title"},Xv={class:"list"},Jv=["onClick"],Qv={__name:"classify",emits:["getStoreList"],setup(P,{emit:y}){const o=y,E=R([]),V=R([]),Q=R([]),x=R(-1),X=R(-1),dn=R(-1),fn=R(-1),tn=R(!1),J=Mr();(()=>{cu({pid:0,page_no:1,page_size:30,level:1,store_id:J.userInfo.store_id}).then(W=>{E.value=W.data.lists,x.value=-1})})();const Z=W=>{cu({pid:W,page_no:1,page_size:30,level:2,store_id:J.userInfo.store_id}).then(G=>{V.value=G.data.lists})},A=W=>{cu({pid:W,page_no:1,page_size:30,level:3,store_id:J.userInfo.store_id}).then(G=>{Q.value=G.data.lists})},sn=(W=-1,G=1)=>{fn.value=W,tn.value=!0;let on="";console.log(W,G),G==1?(x.value=W,X.value=-1,dn.value=-1,W!=-1&&(on=E.value[W].id),Z(on),o("getStoreList",{top_cate_id:on,two_cate_id:null},!0)):G==2&&(X.value=W,dn.value=-1,W!=-1&&(on=V.value[W].id),A(on),o("getStoreList",{two_cate_id:on},!0))};return(W,G)=>{const on=nn("el-popover");return D(),en("div",{class:"classify",onMouseout:G[2]||(G[2]=H=>tn.value?tn.value=!1:tn.value=!0)},[v("div",{class:Wr(["itemP",{"itemP-active":x.value==-1}]),onClick:G[0]||(G[0]=H=>sn(-1))},K("全部"),2),(D(!0),en(Ut,null,Mt(E.value,(H,an)=>(D(),Se(on,{placement:"left",width:"20rem",trigger:"click",key:an,visible:an==x.value&&fn.value==an},{reference:hn(()=>[v("div",{class:Wr(["itemP",{"itemP-active":an==x.value}]),onClick:cn=>sn(an),onMousemove:cn=>fn.value=an},K(H.name),43,Vv)]),default:hn(()=>[v("div",{class:"active-card",onMouseout:G[1]||(G[1]=cn=>fn.value=-1),onMousemove:cn=>fn.value=an},[v("div",Yv,K(H.name),1),v("div",Xv,[(D(!0),en(Ut,null,Mt(V.value,(cn,k)=>(D(),en("div",{class:Wr({"list-active":k==X.value}),link:"",type:"primary",key:cn.id,onClick:b=>sn(k,2)},K(cn.name),11,Jv))),128))])],40,Zv)]),_:2},1032,["visible"]))),128))],32)}}},jv=ct(Qv,[["__scopeId","data-v-4d5623b0"]]),Ur=class Ur{constructor(){au(this,"loadingInstance",null)}static getInstance(){return this.instance??(this.instance=new Ur)}msg(y){ke.info(y)}msgError(y){y!=="Network Error"&&ke.error(y)}msgSuccess(y){ke.success(y)}msgWarning(y){ke.warning(y)}alert(y){at.alert(y,"系统提示")}alertError(y){at.alert(y,"系统提示",{type:"error"})}alertSuccess(y){at.alert(y,"系统提示",{type:"success"})}alertWarning(y){at.alert(y,"系统提示",{type:"warning"})}notify(y){Br.info(y)}notifyError(y){Br.error(y)}notifySuccess(y){Br.success(y)}notifyWarning(y){Br.warning(y)}confirm(y){return at.confirm(y,"温馨提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"})}prompt(y,o,E){return at.prompt(y,o,{confirmButtonText:"确定",cancelButtonText:"取消",...E})}loading(y){this.loadingInstance=Zp.service({lock:!0,text:y})}closeLoading(){var y;(y=this.loadingInstance)==null||y.close()}};au(Ur,"instance",null);let hu=Ur;const n1=hu.getInstance(),e1={class:"my-card"},_1={__name:"index",setup(P){const y=R(null),o=R(null),E=R(null),V=R(null),Q=R([]),x=Yp({off_activity:"",op_price:"",price:""}),X=Mr(),dn=Xp(),fn=R({page_no:1,page_size:30}),tn=R(!1),J=(b={},vn=!1)=>{var $;fn.value={...fn.value,...b},console.log("===",b,fn.value),vn&&(Q.value=[],fn.value.page_no=1,xn.value=!1),b.top_cate_id===""&&(fn.value.store_name=null),tn.value=!0,Qp({...fn.value,store_id:($=X.userInfo)==null?void 0:$.store_id}).then(B=>{var Tn,On;tn.value=!1;for(let Bn in B.data.extend)x[Bn]=B.data.extend[Bn];((On=(Tn=B.data)==null?void 0:Tn.lists)==null?void 0:On.length){xn.value||J(b)};function A(b){return/^\d+$/.test(b)}const sn=(b,vn="")=>{console.log(b,vn);let $={product_id:b.product_id,cart_num:b.cart_num};Xo($).then(B=>{o.value.getList()})},W=(b,vn)=>{y.value.setForm(b,"add"),y.value.show(!0)},G=b=>{y.value.setForm(b,"edit"),y.value.show(!0)},on=R({}),H=async()=>{var B,Tn;let b=o.value.list.map(On=>On.id),vn={cart_id:b,uid:((Tn=(B=o.value)==null?void 0:B.userInfo)==null?void 0:Tn.uid)||""},{data:$}=await Hp(vn);$.reservation>0&&await n1.confirm("部分商品暂无现货, 需要次日提货, 是否确认购买?"),o.value.discounts>0&&(vn.deduction_price=o.value.discounts.toFixed(2),vn.pay_type="micropay"),kp(vn).then(On=>{var Bn,ae,qe;on.value=On.data.order,V.value.setForm({data:On.data.order,reservation:$.reservation,cart_id:b,uid:((ae=(Bn=o.value)==null?void 0:Bn.userInfo)==null?void 0:ae.uid)||"",is_storage:(qe=o.value)!=null&&qe.is_storage?1:0})}),V.value.drawer=!0},an=()=>{var b,vn,$;if((b=o.value)!=null&&b.is_storage&&!(($=(vn=o.value)==null?void 0:vn.userInfo)!=null&&$.uid))return ke.error("选择用户才可以存货");H()},cn=(b=null)=>{setTimeout(()=>{o.value.resetView()})},k=()=>{dn.name=="saleHome"&&(!V.value.drawer&&o.value.list.length>0?an():V.value.beforeClose())};return Dt(()=>{J(),te.on("F9",k)}),Nt(()=>{te.off("F9",k)}),(b,vn)=>(D(),en("div",e1,[U(uv,{ref_key:"orderRef",ref:o,onGoPay:an,onEditPupop:G},null,512),U(Yo),U(Rv,{ref_key:"shopRef",ref:E,style:{flex:"1"},storeList:Q.value,priceKey:x,loading:tn.value,onGetStoreList:J,onChangeItem:W,onLoadMore:Z},null,8,["storeList","priceKey","loading"]),U(qv,{ref_key:"pupopRef",ref:y,priceKey:x,onChangeItem:sn},null,8,["priceKey"]),U(Yo),U(jv,{ref:"classifyRef",onGetStoreList:J},null,512),U(jp,{ref_key:"payRef",ref:V,onPaySuccess:cn},null,512)]))}};export{_1 as default}; diff --git a/build/assets/index-DtjOe95N.js b/build/assets/index-auH31J6o.js similarity index 96% rename from build/assets/index-DtjOe95N.js rename to build/assets/index-auH31J6o.js index b1cb749..be50624 100644 --- a/build/assets/index-DtjOe95N.js +++ b/build/assets/index-auH31J6o.js @@ -1 +1 @@ -import{_ as I,u as U,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 L,q as B,s as C,I as E,E as w}from"./index-C1UYAdzy.js";import{l as K}from"./user-CPvHwcG9.js";const N=l=>(B("data-v-f9ff2ce9"),l=l(),C(),l),M={class:"body"},T={class:"login"},q=N(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__name:"index",setup(l){const d=U(),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(()=>[L("登录")]),_:1})]),_:1})]),_:1})])])}}},A=I($,[["__scopeId","data-v-f9ff2ce9"]]);export{A as default}; +import{_ as I,u as U,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 L,q as B,s as C,I as E,E as w}from"./index-BnGigPfR.js";import{l as K}from"./user-Cxe1-N3Y.js";const N=l=>(B("data-v-f9ff2ce9"),l=l(),C(),l),M={class:"body"},T={class:"login"},q=N(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__name:"index",setup(l){const d=U(),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(()=>[L("登录")]),_:1})]),_:1})]),_:1})])])}}},A=I($,[["__scopeId","data-v-f9ff2ce9"]]);export{A as default}; diff --git a/build/assets/index-tbPBV3b_.js b/build/assets/index-tbPBV3b_.js deleted file mode 100644 index dda37ee..0000000 --- a/build/assets/index-tbPBV3b_.js +++ /dev/null @@ -1 +0,0 @@ -import{u as ge,r as c,G as Pe,b as g,c as n,k as $,f as a,w as t,F as te,l as ie,d as R,E as D,_ as ke,o as $e,m as J,a as Ve,h as me,e,g as h,p as ee,i as je,j as he,z as de,t as k,q as we,s as Ce,J as Qe,n as pe,I as Xe}from"./index-C1UYAdzy.js";import{a as Se,b as Ye,c as Ze,u as el,d as Ne,e as Ee,f as ll,g as al,h as tl,i as sl}from"./user-CPvHwcG9.js";import"./moment-Cl4UOzQZ.js";import{r as fe}from"./axiosAPI-B6mxiJzo.js";import{_ as qe}from"./authCode-5Ni0CM1g.js";import{g as ol,u as il,k as nl}from"./store-DOG1V_EV.js";import{p as ul}from"./padding-B7CJVLVc.js";function Ue(x){return fe.get("/city",{params:x})}function xe(x){return fe.get("/area",{params:x})}function ze(x){return fe.get("/street",{params:x})}function Ae(x){return fe.get("/village",{params:x})}function Re(x){return fe.get("/brigade",{params:x})}const dl={class:"add-user"},rl={__name:"add",emits:["close"],setup(x,{expose:u,emit:w}){const L=ge(),F=c(null),r=Pe({mobile:"",code:"",real_name:"",user_ship:"",selectedValues:[]}),j=Pe({mobile:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}],real_name:[{required:!0,message:"请输入用户姓名",trigger:"blur"}],user_ship:[{required:!0,message:"请选择用户类型",trigger:"change"}],selectedValues:[{required:!0,message:"请选择用户地址",trigger:"change"}]}),X=c([]),q=async(I,_)=>{const P=I.level;let V;if(P!==0&&!I.data.code)return _([]);P===0?(V=await Ue({province_code:51e4}),V=V.data.map(S=>({code:S.city_code,name:S.city_name}))):P===1?(V=await xe({city_code:I.data.code}),V=V.data.map(S=>({code:S.area_code,name:S.area_name}))):P===2?(V=await ze({area_code:I.data.code}),V=V.data.map(S=>({code:S.street_code,name:S.street_name}))):P===3?(V=await Ae({street_code:I.data.code}),V=V.data.map(S=>({code:S.village_code,name:S.village_name}))):P===4&&(V=await Re({village_code:I.data.code}),V=V.data.map(S=>({code:S.id,name:S.brigade_name,leaf:!0}))),_(V)},W={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:q},C=c([]);(()=>{Se({type_id:4}).then(I=>{var _;C.value=(_=I.data.lists)==null?void 0:_.filter(P=>P.id==0||P.id==4)})})();const O=w,E=()=>{F.value.validate(async I=>{if(I){let _={};_.mobile=r.mobile,_.code=r.code,_.user_ship=r.user_ship,_.real_name=r.real_name,_.province="510000",_.city=r.selectedValues[0],_.area=r.selectedValues[1],_.street=r.selectedValues[2],_.village=r.selectedValues[3],_.brigade=r.selectedValues[4],_.store_id=L.userInfo.store_id,Ye(_).then(P=>{r.mobile="",r.code="",r.user_ship="",r.real_name="",r.selectedValues=[],F.value.resetFields(),O("close")})}})},se=c(null),re=()=>{F.value.validateField("mobile",I=>{I&&Ze({mobile:r.mobile}).then(_=>{D.success("发送成功"),se.value.startCountDown()}).catch(_=>{D.error("发送失败")})})};return u({addUser:E}),(I,_)=>{const P=g("el-input"),V=g("el-form-item"),S=g("el-option"),G=g("el-select"),U=g("el-cascader"),d=g("el-form");return n(),$("div",dl,[a(d,{model:r,rules:j,ref_key:"formDataRef",ref:F,"label-width":"80px"},{default:t(()=>[a(V,{label:"用户电话",prop:"mobile"},{default:t(()=>[a(P,{modelValue:r.mobile,"onUpdate:modelValue":_[0]||(_[0]=f=>r.mobile=f),placeholder:"请输入用户电话"},null,8,["modelValue"])]),_:1}),a(V,{label:"验证码",prop:"code"},{default:t(()=>[a(P,{modelValue:r.code,"onUpdate:modelValue":_[1]||(_[1]=f=>r.code=f),placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),a(qe,{ref_key:"authCodeRef",ref:se,style:{"margin-left":"1rem"},onSendCode:re,start:!1},null,512)]),_:1}),a(V,{label:"用户姓名",prop:"real_name"},{default:t(()=>[a(P,{modelValue:r.real_name,"onUpdate:modelValue":_[2]||(_[2]=f=>r.real_name=f),placeholder:"请输入用户姓名"},null,8,["modelValue"])]),_:1}),a(V,{label:"用户类型",prop:"user_ship"},{default:t(()=>[a(G,{modelValue:r.user_ship,"onUpdate:modelValue":_[3]||(_[3]=f=>r.user_ship=f),placeholder:"请选择用户类型",style:{width:"100%"}},{default:t(()=>[(n(!0),$(te,null,ie(C.value,f=>(n(),R(S,{key:f.id,label:f.title,value:f.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(V,{label:"用户地址",prop:"selectedValues"},{default:t(()=>[a(U,{style:{width:"100%"},modelValue:r.selectedValues,"onUpdate:modelValue":_[4]||(_[4]=f=>r.selectedValues=f),options:X.value,props:W,load:q,class:"w-full"},null,8,["modelValue","options"])]),_:1})]),_:1},8,["model","rules"])])}}},Fe=x=>(we("data-v-30895731"),x=x(),Ce(),x),cl={class:"my-order"},vl={class:"header-nav"},_l=Fe(()=>e("div",{class:"nav-item"},k("用户列表"),-1)),pl={class:"header-row"},ml=Fe(()=>e("div",{class:"label"},"用户类型",-1)),fl={class:"header-row"},yl=Fe(()=>e("div",{class:"label"},"用户地区",-1)),hl={class:"header-input"},gl={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},bl=["onClick"],kl={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},$l={class:"top flex"},Vl={class:"r-1"},wl={class:"bold"},Cl={class:"bottom flex",style:{"justify-content":"space-between"}},Sl={class:"red"},Ul={class:"red"},xl={class:"red"},zl={class:"red"},Al={key:0,class:"load-end"},Rl={key:1,class:"load-end"},Fl={class:"dialog-footer"},Ll={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(x){const u=ge();c([]);const w=c({page_no:1,page_size:20,mobile:"",user_ship:"",street:null}),L=c(!1),F=c(0),r=c(0),j=c(!1),X=c([]),q=(U=!1)=>{if(U)w.value.page_no=1;else if(j.value||L.value)return;L.value=!0,w.value.mobile==""&&w.value.user_ship==""?w.value.store_id=u.userInfo.store_id:w.value.store_id=null,el(w.value).then(d=>{U?X.value=d.data.lists:X.value=[...X.value,...d.data.lists],w.value.page_no==1&&X.value.length>0&&J.emit("set-user-detail",X.value[0]),d.data.lists.length{j.value=!0,L.value=!1})},W=(U,d)=>{r.value=d,J.emit("set-user-detail",U)},C=c(!1),z=c(null),O=()=>{var U;(U=z.value)==null||U.addUser()},E=()=>{C.value=!1,q(!0)},se=c([]);(()=>{Se({type_id:4}).then(U=>{se.value=U.data.lists})})();const I=()=>{w.value.mobile="",w.value.user_ship="",w.value.street=null,_.value=[],q(!0)},_=c([]),P=c([]),V=async(U,d)=>{const f=U.level;let p;if(f!==0&&!U.data.code)return d([]);f===0?(p=await Ue({province_code:51e4}),p=p.data.map(y=>({code:y.city_code,name:y.city_name}))):f===1?(p=await xe({city_code:U.data.code}),p=p.data.map(y=>({code:y.area_code,name:y.area_name}))):f===2?(p=await ze({area_code:U.data.code}),p=p.data.map(y=>({code:y.street_code,name:y.street_name,leaf:!0}))):f===3?(p=await Ae({street_code:U.data.code}),p=p.data.map(y=>({code:y.village_code,name:y.village_name}))):f===4&&(p=await Re({village_code:U.data.code}),p=p.data.map(y=>({code:y.id,name:y.brigade_name,leaf:!0}))),d(p)},S={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:V},G=()=>{_.value.length?w.value.street=_.value[_.value.length-1]:w.value.street="",q(!0)};return $e(()=>{J.on("re-load-user-list",U=>{U&&q(!0)})}),Ve(()=>{J.off("re-load-user-list")}),(U,d)=>{const f=g("Plus"),p=g("el-icon"),y=g("el-button"),Y=g("el-option"),K=g("el-select"),Z=g("el-cascader"),B=g("CircleClose"),ce=g("el-input"),ne=g("el-avatar"),oe=g("el-tag"),le=g("el-dialog"),i=me("loading"),m=me("infinite-scroll");return n(),$("div",cl,[e("div",vl,[_l,a(y,{type:"primary",onClick:d[0]||(d[0]=l=>C.value=!0)},{default:t(()=>[a(p,null,{default:t(()=>[a(f)]),_:1}),h(" 添加用户")]),_:1})]),e("div",pl,[ml,a(K,{modelValue:w.value.user_ship,"onUpdate:modelValue":d[1]||(d[1]=l=>w.value.user_ship=l),onChange:d[2]||(d[2]=l=>q(!0)),placeholder:"请选择用户类型",style:{flex:"1"}},{default:t(()=>[(n(!0),$(te,null,ie(se.value,l=>(n(),R(Y,{key:l.id,label:l.title,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a(y,{onClick:I,style:{"margin-left":"1rem"}},{default:t(()=>[h("重置")]),_:1})]),e("div",fl,[yl,a(Z,{style:{flex:"1"},options:P.value,modelValue:_.value,"onUpdate:modelValue":d[3]||(d[3]=l=>_.value=l),props:S,load:V,class:"w-full",onChange:G},null,8,["options","modelValue"])]),e("div",hl,[a(ce,{modelValue:w.value.mobile,"onUpdate:modelValue":d[6]||(d[6]=l=>w.value.mobile=l),placeholder:"搜索手机号",onKeydown:d[7]||(d[7]=je(l=>q(!0),["enter"])),onClear:d[8]||(d[8]=l=>q(!0))},{suffix:t(()=>[w.value.mobile!=""?(n(),R(p,{key:0,size:"18",onClick:d[4]||(d[4]=l=>{w.value.mobile="",q(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:t(()=>[a(B)]),_:1})):ee("",!0)]),append:t(()=>[a(y,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[5]||(d[5]=l=>q(!0))},{default:t(()=>[h("搜索")]),_:1})]),_:1},8,["modelValue"])]),he((n(),$("div",gl,[(n(!0),$(te,null,ie(X.value,(l,A)=>{var H;return n(),$("div",{class:de(["item",{"item-active":r.value==A}]),key:A,onClick:v=>W(l,A)},[a(ne,{class:"avatar",src:l.avatar},null,8,["src"]),e("div",kl,[e("div",$l,[e("div",Vl,[e("span",wl,k(l.real_name||l.nickname),1),e("span",null,k(" (ID:"+l.id+")"),1)]),e("div",null,"手机号: "+k(l.mobile),1)]),e("div",Cl,[e("div",null,[h("余额: "),e("span",Sl,k(l.now_money),1)]),e("div",null,[h("采购款: "),e("span",Ul,k(l.purchase_funds),1)]),e("div",null,[h("返还金: "),e("span",xl,k((H=l.return_money)==null?void 0:H.toFixed(2)),1)]),e("div",null,[h("礼品券: "),e("span",zl,k(l.get_frozen),1)]),e("div",null,[l.user_ship==0||l.user_ship==4?(n(),R(oe,{key:0,type:"primary"},{default:t(()=>[h(k(l.user_ship_name),1)]),_:2},1024)):(n(),R(oe,{key:1,type:"success"},{default:t(()=>[h(k(l.user_ship_name),1)]),_:2},1024))])])])],10,bl)}),128)),j.value?(n(),$("div",Al,"没有更多了")):ee("",!0),L.value?(n(),$("div",Rl,"加载中...")):ee("",!0)])),[[i,L.value],[m,q]]),a(le,{modelValue:C.value,"onUpdate:modelValue":d[10]||(d[10]=l=>C.value=l),title:"添加用户",width:"600"},{footer:t(()=>[e("div",Fl,[a(y,{onClick:d[9]||(d[9]=l=>C.value=!1)},{default:t(()=>[h("取消")]),_:1}),a(y,{type:"primary",onClick:O},{default:t(()=>[h(" 添加 ")]),_:1})])]),default:t(()=>[a(rl,{ref_key:"addRef",ref:z,onClose:E},null,512)]),_:1},8,["modelValue"])])}}},Ol=ke(Ll,[["__scopeId","data-v-30895731"]]),ve=x=>(we("data-v-5ad4b8f5"),x=x(),Ce(),x),Dl=ve(()=>e("h4",null,"选择支付方式",-1)),Il={class:"dra-body"},Pl={class:"header"},Nl={style:{display:"inline-block"}},El=ve(()=>e("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),jl={style:{color:"#f5222d","padding-bottom":"2rem"}},ql={style:{"font-size":"1.6rem"}},Bl={key:0,"element-loading-text":"支付中",class:"card1"},Jl=ve(()=>e("div",{class:"tips"},null,-1)),Tl={key:1,class:"card2"},Kl={class:"drawer-body"},Ml={class:"counter"},Wl={class:"received"},Gl={key:0},Hl={key:1,style:{"font-size":"1rem",color:"#999"}},Ql={key:0,class:"balance"},Xl={class:"money"},Yl=ve(()=>e("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Zl={key:1,class:"balance"},ea=ve(()=>e("div",null,"不够找零, 请支付更多金额",-1)),la=ve(()=>e("div",{class:"tips"},"按下小键盘输入金额",-1)),aa=[ea,la],ta={class:"keypad"},sa={class:"left"},oa={class:"right"},ia={style:{width:"100%",display:"flex","justify-content":"center"}},na={__name:"payUser",emits:["paySuccess"],setup(x,{expose:u,emit:w}){const L=c(!1),F=c(1),r=c(""),j=c("");ge();const X=()=>{d()},q=()=>{pe(()=>{setTimeout(()=>{var m;f.value=!1,r.value="",I.value=!0,(m=j.value)==null||m.focus(),W(F.value)},300)})},W=m=>{m!=1&&j.value.blur(),F.value=m,console.log(F.value),F.value==2?window.addEventListener("keydown",ne):(window.removeEventListener("keydown",ne),pe(()=>{var l;r.value="",(l=j.value)==null||l.focus()}))},C=c({price:0,uid:"",user_ship:"",village:null,brigade:null}),z=c([]),O=c(!1),E=m=>{C.value=m.data,C.value.total=m.data.price,z.value=m.cart_id,O.value=m.isRePay||!1},se=m=>{C.value.total=m.price,S.value=m.order_id},re=w,I=c(!1),_=c(["1","2","3","4","5","6","7","8","9","0","00","."]),P=/^(10|11|12|13|14|15)\d{16}$/,V=/^(25|26|27|28|29|30)\d{14,22}$/,S=c(""),G=()=>{if(f.value=!0,j.value.blur(),O.value)U();else{let m;if(P.test(r.value))m="9";else if(V.test(r.value))m="13";else return f.value=!1,r.value="",j.value.focus(),D.error("请输入正确的支付码");Ne({uid:C.value.uid,user_ship:C.value.user_ship,village:C.value.village,brigade:C.value.brigade,price:C.value.price,pay_type:m,auth_code:r.value}).then(l=>{l.data.out_trade_no&&l.msg=="支付成功"?(L.value=!1,D({message:"支付成功",type:"success"}),d(l.data)):l.msg=="用户支付中"&&l.code==1&&(D.warning(l.msg),J.on("pay_user_success",A=>{D({message:"支付成功",type:"success"}),setTimeout(()=>{J.off("pay_user_success")},200),L.value=!1,d(A)}))}).catch(l=>{f.value=!1,pe(()=>{var A;(A=j.value)==null||A.focus()})})}},U=()=>{let m=17;if(F.value==1)if(P.test(r.value))m="9";else if(V.test(r.value))m="13";else return f.value=!1,r.value="",j.value.focus(),D.error("请输入正确的支付码");ol({order_id:C.value.order_id,pay_type:m,auth_code:r.value}).then(l=>{var A;(A=l.msg)!=null&&A.includes("成功")?(L.value=!1,D({message:"支付成功",type:"success"}),d({msg:"支付成功"})):l.msg=="用户支付中"&&l.code==1&&(D.warning(l.msg),J.on("pay_user_success",H=>{D({message:"支付成功",type:"success"}),setTimeout(()=>{J.off("pay_user_success")},200),L.value=!1,d(H)}))}).catch(l=>{r.value="",f.value=!1,pe(()=>{var A;(A=j.value)==null||A.focus()})})};c(0);const d=(m=null)=>{var l;window.removeEventListener("keydown",ne),I.value=!1,f.value=!1,r.value="",y.value="",p.value=[],(l=j.value)==null||l.blur(),typeof m=="function"&&(m=null),re("paySuccess",m),L.value=!1},f=c(!1);u({drawer:L,setForm:E,setRePay:se,beforeClose:d});const p=c([]),y=c(""),Y=Qe(()=>+y.value>0?(y.value-C.value.total).toFixed(2):-1),K=c(!1),Z=m=>{m===-1?p.value=[]:p.value.pop(),y.value=p.value.length?p.value.join(""):0},B=m=>{K.value===!1&&(y.value="",K.value=!0);let l=String(y.value).indexOf(".")+1,A=String(y.value).length-l;console.log(l,A),(l===0||A<2)&&(p.value.join("")<=9999999&&p.value.push(m),y.value=p.value.join("")>99999999?99999999:p.value.join(""))},ce=()=>{if(Y.value===""||Y.value===null||Y.value===void 0||+y.value<+C.value.total)return D.error("收款金额应该大于等于应收金额");O.value?U():Ne({uid:C.value.uid,user_ship:C.value.user_ship,village:C.value.village,brigade:C.value.brigade,price:C.value.price,pay_type:17}).then(m=>{console.log("========"),L.value=!1,D({message:m.msg,type:"success"}),F.value=1,d({msg:"收款成功"})}).catch(m=>{f.value=!1})},ne=m=>{let A=(m||window.event).keyCode;if(A==37)return W(2);if(A==120)return J.emit("F9");if(A==27)return d();switch(m.stopPropagation(),m.preventDefault(),A){case 96:case 48:B(0);break;case 97:case 49:B(1);break;case 98:case 50:B(2);break;case 99:case 51:B(3);break;case 100:case 52:B(4);break;case 101:case 53:B(5);break;case 102:case 54:B(6);break;case 103:case 55:B(7);break;case 104:case 56:B(8);break;case 105:case 57:B(9);break;case 110:B(".");break;case 190:B(".");break;case 8:Z();break;case 13:ce();break}},oe=c(!1),le=()=>{if(!(!L.value||oe.value&&r.value.length>0)&&F.value==2)return W(1)},i=()=>{if(!(!L.value||oe.value&&r.value.length>0)&&F.value==1)return W(2)};return $e(()=>{J.on("left",le),J.on("right",i)}),Ve(()=>{J.off("left",le),J.off("right",i)}),(m,l)=>{const A=g("el-input"),H=g("el-button"),v=g("Delete"),s=g("el-icon"),M=g("el-drawer"),N=me("loading");return n(),R(M,{size:"60rem",modelValue:L.value,"onUpdate:modelValue":l[6]||(l[6]=b=>L.value=b),direction:"rtl",onOpen:q,"before-close":d},{header:t(()=>[Dl]),default:t(()=>{var b;return[e("div",Il,[e("div",Pl,[e("div",{class:de(["left",{active:F.value==1}]),onClick:l[0]||(l[0]=Q=>W(1))}," 微信/支付宝 ",2),e("div",{class:de(["right",{active:F.value==2}]),onClick:l[1]||(l[1]=Q=>W(2))}," 现金收款 ",2)]),e("div",null,[e("div",Nl,[El,e("div",jl,[h(" ¥"),e("span",ql,k((b=C.value)==null?void 0:b.price),1)])])]),F.value==1?he((n(),$("div",Bl,[a(A,{ref_key:"codeRef",ref:j,modelValue:r.value,"onUpdate:modelValue":l[2]||(l[2]=Q=>r.value=Q),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:je(G,["enter"]),onFocus:l[3]||(l[3]=Q=>oe.value=!0),onBlur:l[4]||(l[4]=Q=>oe.value=!1)},null,8,["modelValue"]),Jl])),[[N,f.value]]):(n(),$("div",Tl,[e("div",Kl,[e("div",Ml,[e("div",Wl,[y.value?(n(),$("span",Gl,k(y.value),1)):(n(),$("span",Hl,"按下键盘输入客户支付金额"))]),Y.value>=0?(n(),$("div",Ql,[e("div",null,[h(" 需找零(元):"),e("span",Xl,"¥"+k(Y.value),1)]),Yl])):(n(),$("div",Zl,aa)),e("div",ta,[e("div",sa,[(n(!0),$(te,null,ie(_.value,Q=>(n(),R(H,{key:Q,onClick:be=>B(Q)},{default:t(()=>[h(k(Q),1)]),_:2},1032,["onClick"]))),128))]),e("div",oa,[a(H,{onClick:Z},{default:t(()=>[a(s,null,{default:t(()=>[a(v)]),_:1})]),_:1}),a(H,{onClick:l[5]||(l[5]=Q=>Z(-1))},{default:t(()=>[h("C")]),_:1}),a(H,{class:de(["enter",{"enter-disable":+y.value<+C.value.total}]),disabled:+y.value<+C.value.total,onClick:ce},{default:t(()=>[h(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]}),footer:t(()=>[e("div",ia,[a(H,{class:"cancel-btn",onClick:X},{default:t(()=>[h("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ua=ke(na,[["__scopeId","data-v-5ad4b8f5"]]),T=x=>(we("data-v-2934a096"),x=x(),Ce(),x),da={class:"my-order"},ra={class:"header-nav"},ca=["onClick"],va={key:0,class:"detail"},_a={class:"table"},pa=T(()=>e("div",{class:"table-title"},"用户信息",-1)),ma={class:"table-info"},fa={class:"info-item"},ya=T(()=>e("div",{class:"info-item-title"},"用户余额:",-1)),ha={class:"info-item-info red"},ga={class:"info-item"},ba=T(()=>e("div",{class:"info-item-title"},"采购款:",-1)),ka={class:"info-item-info red"},$a={class:"info-item"},Va=T(()=>e("div",{class:"info-item-title"},"返还金:",-1)),wa={class:"info-item-info red"},Ca={class:"info-item"},Sa=T(()=>e("div",{class:"info-item-title"},"头像:",-1)),Ua={class:"info-item-info"},xa={class:"info-item"},za=T(()=>e("div",{class:"info-item-title"},"礼品券:",-1)),Aa={class:"info-item-info red"},Ra={class:"info-item"},Fa=T(()=>e("div",{class:"info-item-title"},"冻结礼品券:",-1)),La={class:"info-item-info red"},Oa={class:"info-item"},Da=T(()=>e("div",{class:"info-item-title"},"ID:",-1)),Ia={class:"info-item-info"},Pa={class:"info-item"},Na=T(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Ea={class:"info-item-info"},ja={class:"info-item"},qa=T(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Ba={class:"info-item-info"},Ja={class:"info-item"},Ta=T(()=>e("div",{class:"info-item-title"},"用户账号:",-1)),Ka={class:"info-item-info"},Ma={class:"info-item"},Wa=T(()=>e("div",{class:"info-item-title"},"真实姓名:",-1)),Ga={class:"info-item-info"},Ha={class:"info-item"},Qa=T(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Xa={class:"info-item-info"},Ya={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Za=T(()=>e("div",{class:"info-item-title"},"用户类型:",-1)),et={class:"info-item-info"},lt={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},at=T(()=>e("div",{class:"info-item-title"},"用户地址:",-1)),tt={key:1,class:"detail"},st={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},ot={style:{display:"flex","align-items":"center"}},it={style:{"margin-left":"0.5rem"}},nt={key:0,style:{display:"flex","align-items":"center"}},ut={class:"footer"},dt={key:0},rt={key:1},ct={key:2},vt={class:"dialog-footer"},_t={key:0},pt={class:"ship-money-list"},mt=["onClick"],ft={class:"item1"},yt={class:"item2"},ht={class:"dialog-footer"},gt={__name:"detail",setup(x){ge(),Xe();const u=c({id:""});c({price:"",type:1});const w=c(null),L=(v=null)=>{oe()},F=c(!1),r=c([]);(()=>{Se({type_id:4}).then(v=>{r.value=v.data.lists})})();const X=()=>{ll({id:u.value.id,user_ship:u.value.user_ship}).then(v=>{var s;D.success("修改成功"),u.value.user_ship_name=(s=r.value.find(M=>M.id==u.value.user_ship))==null?void 0:s.title,F.value=!1})},q=()=>{F.value=!1},W=c([]);(()=>{al().then(v=>{W.value=v.data,console.log(v)})})();const z=c({id:"",province:"",city:"",area:"",street:"",brigade:""}),O=c([]),E=c([]),se=()=>{tl({uid:u.value.id}).then(v=>{var s;(s=v.data)!=null&&s.village?(O.value=[v.data.city,v.data.area,v.data.street,v.data.village,+v.data.brigade],E.value=JSON.parse(JSON.stringify(O.value)),z.value=v.data):(O.value=[],E.value=[],z.value={id:"",province:"",city:"",area:"",street:"",brigade:""})}).catch(v=>{O.value=[],E.value=[],z.value={id:"",province:"",city:"",area:"",street:"",brigade:""}})},re=c([]),I=async(v,s)=>{const M=v.level;let N;if(M!==0&&!v.data.code)return s([]);M===0?(N=await Ue({province_code:51e4}),N=N.data.map(b=>({code:b.city_code,name:b.city_name}))):M===1?(N=await xe({city_code:v.data.code}),N=N.data.map(b=>({code:b.area_code,name:b.area_name}))):M===2?(N=await ze({area_code:v.data.code}),N=N.data.map(b=>({code:b.street_code,name:b.street_name}))):M===3?(N=await Ae({street_code:v.data.code}),N=N.data.map(b=>({code:b.village_code,name:b.village_name}))):M===4&&(N=await Re({village_code:v.data.code}),N=N.data.map(b=>({code:b.id,name:b.brigade_name,leaf:!0}))),s(N)},_={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:I},P=async()=>{z.value.city=O.value[0],z.value.area=O.value[1],z.value.street=O.value[2],z.value.village=O.value[3],z.value.brigade=O.value[4],z.value.phone||(z.value.phone=u.value.account),z.value.real_name||(z.value.real_name=u.value.real_name||u.value.nickname),sl({...z.value,uid:u.value.id}).then(v=>{E.value=JSON.parse(JSON.stringify(O.value)),D.success("编辑成功"),S.value=!0}).catch(v=>{V()})},V=()=>{O.value=JSON.parse(JSON.stringify(E.value)),E.value.length>0&&(z.value.city=E.value[0],z.value.area=E.value[1],z.value.street=E.value[2],z.value.village=E.value[3],z.value.brigade=E.value[4]),S.value=!0},S=c(!0),G=c(0),U=c(["基本信息"]),d=c(!1),f=c([]),p=c({page_no:1,page_size:10,loading:!1,loadend:!1});let y=[];const Y=(v=!1)=>{v&&(f.value=[],p.value.page_no=1,p.value.loadend=!1),!(p.value.loadend||p.value.loading)&&(p.value.loading=!0,il({uid:u.value.id,page_no:p.value.page_no,page_size:p.value.page_size}).then(s=>{f.value=[...f.value,...s.data.lists],p.value.loading=!1,p.value.page_no++,s.data.lists.length{if(K.value.mobile=u.value.phone,K.value.code="",y=f.value.filter(v=>v.n_num).map(v=>({product_id:v.product_id,nums:v.n_num})),y.length==0)return D.error("请选择商品");Z.value=!0},ce=()=>{console.log("发送短信验证码"),D.success("验证码已发送")},ne=()=>{if(K.value.code=="")return D.error("请输入验证码");nl({uid:u.value.id,info:y}).then(v=>{d.value=!1,D.success("出库成功"),Z.value=!1,Y(!0)})},oe=()=>{Ee({id:u.value.id}).then(({data:v})=>{v.phone=v.mobile+"",delete v.mobile,u.value=Object.assign(u.value,v),v.integral&&(u.value.get_frozen=v.integral)})},le=c(!1),i=c({user_ship:"",user_ship_name:"",limit:"",money:"",type:""}),m=()=>{i.value.money=Number(i.value.money).toFixed(2),(+i.value.money<+i.value.limit||+i.value.money>1e4)&&(+i.value.limit>0?i.value.money=i.value.limit:i.value.money="")},l=v=>{if(i.value.type=="add"){let s=r.value.find(M=>M.id==v);s&&(i.value.limit=s.limit,i.value.user_ship_name=s.title,i.value.money=s.limit)}},A=()=>{if(i.value.user_ship===""||i.value.user_ship===null||i.value.user_ship===void 0||i.value.user_ship===0||i.value.user_ship===4)return D.error("请选择会员类型");if(i.value.money==0||i.value.money=="")return D.error(i.value.type=="add"?"请输入充值金额":"请选择金额");if(i.value.type=="add"&&(+i.value.money<+i.value.limit||+i.value.money>1e4))return+i.value.limit>0?i.value.money=i.value.limit:i.value.money="",D.error(`该类型至少需要充值${i.value.limit}元`);w.value.setForm({data:{uid:u.value.id,price:i.value.money,user_ship:i.value.user_ship,village:z.value.village,brigade:z.value.brigade}}),w.value.drawer=!0,pe(()=>{le.value=!1})},H=v=>{if(E.value.length==0)return D.error("请先选择用户地址");i.value.type=v,v=="add"&&(i.value.user_ship=u.value.user_ship,i.value.user_ship_name=u.value.user_ship_name,l(i.value.user_ship)),le.value=!0};return $e(()=>{J.on("set-user-detail",v=>{u.value=v,d.value=!1,Ee({id:u.value.id}).then(({data:s})=>{s.phone=s.mobile+"",delete s.mobile,u.value=Object.assign(v,s)}),O.value=[],E.value=[],se(),Y(!0),i.value={user_ship:"",user_ship_name:"",limit:"",money:"",type:""}})}),Ve(()=>{J.off("set-user-detail")}),(v,s)=>{var De,Ie;const M=g("el-avatar"),N=g("el-tag"),b=g("el-button"),Q=g("el-option"),be=g("el-select"),Be=g("el-cascader"),Je=g("el-image"),ye=g("el-table-column"),Te=g("el-input-number"),Ke=g("el-table"),Me=g("el-empty"),_e=g("el-input"),ue=g("el-form-item"),Le=g("el-form"),Oe=g("el-dialog"),We=me("infinite-scroll"),Ge=me("loading");return n(),$("div",da,[e("div",ra,[(n(!0),$(te,null,ie(U.value,(o,ae)=>(n(),$("div",{key:ae,class:de(["nav-item",{"nav-item-active":G.value==ae,"nav-item-radius1":G.value==ae+1,"nav-item-radius2":G.value==ae-1}]),onClick:He=>G.value=ae},k(o),11,ca))),128)),e("div",{class:de(["nav-item",{"nav-item-radius2":G.value==U.value.length-1}]),style:{flex:"1"}},null,2)]),u.value.id&&G.value==0?(n(),$("div",va,[e("div",_a,[pa,e("div",ma,[e("div",fa,[ya,e("div",ha,"¥"+k(u.value.now_money),1)]),e("div",ga,[ba,e("div",ka,"¥"+k(u.value.purchase_funds),1)]),e("div",$a,[Va,e("div",wa,"¥"+k((De=u.value.return_money)==null?void 0:De.toFixed(2)),1)]),e("div",Ca,[Sa,e("div",Ua,[a(M,{style:{width:"4rem",height:"4rem"},src:u.value.avatar},null,8,["src"])])]),e("div",xa,[za,e("div",Aa,"¥"+k(u.value.get_frozen),1)]),e("div",Ra,[Fa,e("div",La,"¥"+k((Ie=u.value.amount_frozen)==null?void 0:Ie.toFixed(2)),1)]),e("div",Oa,[Da,e("div",Ia,k(u.value.id),1)]),e("div",Pa,[Na,e("div",Ea,k(u.value.nickname),1)]),e("div",ja,[qa,e("div",Ba,k(u.value.phone),1)]),e("div",Ja,[Ta,e("div",Ka,k(u.value.account),1)]),e("div",Ma,[Wa,e("div",Ga,k(u.value.real_name),1)]),e("div",Ha,[Qa,e("div",Xa,k(u.value.create_time),1)]),e("div",Ya,[Za,e("div",et,[F.value==!1?(n(),$(te,{key:0},[u.value.user_ship==0||u.value.user_ship==4?(n(),R(N,{key:0,type:"primary",size:"large"},{default:t(()=>[h(k(u.value.user_ship_name),1)]),_:1})):(n(),R(N,{key:1,type:"success",size:"large"},{default:t(()=>[h(k(u.value.user_ship_name),1)]),_:1})),u.value.user_ship==0||u.value.user_ship==4?(n(),R(b,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:s[0]||(s[0]=o=>F.value=!0)},{default:t(()=>[h("修改")]),_:1})):ee("",!0)],64)):(n(),$(te,{key:1},[a(be,{modelValue:u.value.user_ship,"onUpdate:modelValue":s[1]||(s[1]=o=>u.value.user_ship=o),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:t(()=>[(n(!0),$(te,null,ie(r.value,o=>(n(),R(Q,{key:o.id,label:o.title,value:o.id,disabled:o.id!=0&&o.id!=4},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"]),a(b,{type:"primary",style:{"margin-left":"1rem"},onClick:X},{default:t(()=>[h("确认")]),_:1}),a(b,{style:{"margin-left":"1rem"},onClick:q},{default:t(()=>[h("取消")]),_:1})],64))])]),e("div",lt,[at,(n(),R(Be,{key:u.value.id,style:{flex:"1"},modelValue:O.value,"onUpdate:modelValue":s[2]||(s[2]=o=>O.value=o),options:re.value,props:_,load:I,class:"w-full",disabled:S.value},null,8,["modelValue","options","disabled"])),S.value&&!E.value.length?(n(),R(b,{key:0,type:"primary",style:{"margin-left":"1rem"},onClick:s[3]||(s[3]=o=>S.value=!1)},{default:t(()=>[h("修改")]),_:1})):ee("",!0),S.value?ee("",!0):(n(),R(b,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:P},{default:t(()=>[h("确认")]),_:1})),S.value?ee("",!0):(n(),R(b,{key:2,style:{"margin-left":"1rem"},onClick:V},{default:t(()=>[h("取消")]),_:1}))]),u.value.user_ship!=0&&u.value.user_ship!=4?(n(),R(b,{key:0,type:"success",class:"big-btn",size:"large",onClick:s[4]||(s[4]=o=>H("add"))},{default:t(()=>[h("增加经营资金")]),_:1})):(n(),R(b,{key:1,type:"primary",class:"big-btn",size:"large",onClick:s[5]||(s[5]=o=>H("recharge"))},{default:t(()=>[h("成为会员")]),_:1}))])])])):ee("",!0),u.value.id&&G.value==1?he((n(),$("div",tt,[he((n(),$("div",st,[a(Ke,{data:f.value},{default:t(()=>[a(ye,{label:"商品信息"},{default:t(({row:o})=>[e("div",ot,[a(Je,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:o.image},null,8,["src"]),e("span",it,k(o.store_name),1)])]),_:1}),a(ye,{prop:"price",label:"单价",width:d.value?130:200},null,8,["width"]),a(ye,{prop:"nums",label:"存量",width:d.value?100:200},null,8,["width"]),d.value?(n(),R(ye,{key:0,prop:"nums",label:"出库量",width:"250"},{default:t(({row:o})=>[o.nums?(n(),$("div",nt,[a(Te,{modelValue:o.n_num,"onUpdate:modelValue":ae=>o.n_num=ae,"step-strictly":"",min:0,max:o.nums},null,8,["modelValue","onUpdate:modelValue","max"]),a(b,{type:"primary",style:{"margin-left":"1rem"},onClick:ae=>o.n_num=o.nums},{default:t(()=>[h("全部")]),_:2},1032,["onClick"])])):ee("",!0)]),_:1})):ee("",!0)]),_:1},8,["data"])])),[[We,Y]]),e("div",ut,[d.value?(n(),$("div",rt,[a(b,{type:"primary",size:"large",onClick:B},{default:t(()=>[h("确认出库")]),_:1}),a(b,{size:"large",onClick:s[7]||(s[7]=o=>d.value=!1)},{default:t(()=>[h("取消")]),_:1})])):(n(),$("div",dt,[a(b,{type:"warning",size:"large",onClick:s[6]||(s[6]=o=>d.value=!0),disabled:f.value.length==0},{default:t(()=>[h("商品出库")]),_:1},8,["disabled"])]))])])),[[Ge,p.value.loading]]):(n(),$("div",ct,[a(Me)])),a(ua,{ref_key:"payRef",ref:w,onPaySuccess:L},null,512),a(Oe,{modelValue:Z.value,"onUpdate:modelValue":s[11]||(s[11]=o=>Z.value=o),title:"出库验证",width:"500"},{footer:t(()=>[e("div",vt,[a(b,{onClick:s[10]||(s[10]=o=>Z.value=!1)},{default:t(()=>[h("取消")]),_:1}),a(b,{type:"primary",onClick:ne},{default:t(()=>[h(" 确认 ")]),_:1})])]),default:t(()=>[a(Le,{model:K.value},{default:t(()=>[a(ue,{label:"手机号:"},{default:t(()=>[a(_e,{modelValue:K.value.mobile,"onUpdate:modelValue":s[8]||(s[8]=o=>K.value.mobile=o),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1}),a(ue,{label:"验证码:"},{default:t(()=>[a(_e,{modelValue:K.value.code,"onUpdate:modelValue":s[9]||(s[9]=o=>K.value.code=o),autocomplete:"off",placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),(n(),R(qe,{style:{"margin-left":"1rem"},onSendCode:ce,key:K.value.mobile}))]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),a(Oe,{modelValue:le.value,"onUpdate:modelValue":s[18]||(s[18]=o=>le.value=o),title:i.value.type=="add"?"增加经营资金":"成为会员",width:"500"},{footer:t(()=>[e("div",ht,[a(b,{onClick:s[17]||(s[17]=o=>le.value=!1)},{default:t(()=>[h("取消")]),_:1}),a(b,{type:"primary",onClick:A},{default:t(()=>[h(" 确认 ")]),_:1})])]),default:t(()=>[a(Le,{model:i.value,"label-width":"100px"},{default:t(()=>[a(ue,{label:"手机号:"},{default:t(()=>[a(_e,{modelValue:u.value.phone,"onUpdate:modelValue":s[12]||(s[12]=o=>u.value.phone=o),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1}),i.value.type=="add"?(n(),R(ue,{key:0,label:"会员类型:"},{default:t(()=>[a(_e,{modelValue:i.value.user_ship_name,"onUpdate:modelValue":s[13]||(s[13]=o=>i.value.user_ship_name=o),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1})):(n(),R(ue,{key:1,label:"会员类型:",required:""},{default:t(()=>[a(be,{modelValue:i.value.user_ship,"onUpdate:modelValue":s[14]||(s[14]=o=>i.value.user_ship=o),placeholder:"请选择用户类型",style:{flex:"1"},onChange:l},{default:t(()=>[(n(!0),$(te,null,ie(r.value,o=>(n(),R(Q,{key:o.id,label:o.title,value:o.id,disabled:o.id==0||o.id==4},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})),i.value.type=="add"?(n(),R(ue,{key:2,label:"充值金额:",required:""},{default:t(()=>[a(_e,{modelValue:i.value.money,"onUpdate:modelValue":s[15]||(s[15]=o=>i.value.money=o),type:"number",onBlur:m,onFocus:s[16]||(s[16]=o=>i.value.money=""),autocomplete:"off"},{prepend:t(()=>[h("¥")]),append:t(()=>[h("元")]),_:1},8,["modelValue"]),i.value.limit?(n(),$("div",_t,k(`${i.value.user_ship_name}角色至少要充值${i.value.limit}元, 最大不超过10000元`),1)):ee("",!0)]),_:1})):(n(),R(ue,{key:3,label:"充值金额:",required:""},{default:t(()=>[e("div",pt,[(n(!0),$(te,null,ie(W.value,(o,ae)=>(n(),$("div",{class:de(["ship-money-item",{"ship-money-item-active":o.money==i.value.money}]),onClick:He=>i.value.money=o.money,key:ae},[e("div",ft,k(o.money)+k(o.money_string),1),e("div",yt,"送"+k(o.send)+k(o.send_string),1)],10,mt))),128))])]),_:1}))]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])}}},bt=ke(gt,[["__scopeId","data-v-2934a096"]]),kt={class:"my-card"},zt={__name:"index",setup(x){return(u,w)=>(n(),$("div",kt,[a(Ol,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),a(ul),a(bt,{ref:"detailRef"},null,512)]))}};export{zt as default}; diff --git a/build/assets/indexCount-BAVEhqMF.js b/build/assets/indexCount-DGXdAzbZ.js similarity index 86% rename from build/assets/indexCount-BAVEhqMF.js rename to build/assets/indexCount-DGXdAzbZ.js index fd4dbb6..ce2fad5 100644 --- a/build/assets/indexCount-BAVEhqMF.js +++ b/build/assets/indexCount-DGXdAzbZ.js @@ -1 +1 @@ -import{f as i}from"./merchant-D8vvQnCS.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-C1UYAdzy.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-nsqy9sz9.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-BnGigPfR.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/build/assets/merchant-D8vvQnCS.js b/build/assets/merchant-nsqy9sz9.js similarity index 87% rename from build/assets/merchant-D8vvQnCS.js rename to build/assets/merchant-nsqy9sz9.js index 18b2a9d..2f0fee4 100644 --- a/build/assets/merchant-D8vvQnCS.js +++ b/build/assets/merchant-nsqy9sz9.js @@ -1 +1 @@ -import{K as a}from"./index-C1UYAdzy.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{K as a}from"./index-BnGigPfR.js";function i(){return a.get("/merchant/Merchant/amount_account")}function r(n){return a.get("/merchant/Merchant/taking_lists",{params:n})}function c(){return a.get("/merchant/Merchant/taking_info")}function e(n){return a.post("/merchant/Merchant/withdraw",n)}function o(n){return a.get("/financial/FinancialRecord/lists",{params:n})}function s(n){return a.get("/financial/FinancialRecord/api_lists",{params:n})}export{i as a,c as b,e as c,r as d,s as e,o as f}; diff --git a/build/assets/padding-B7CJVLVc.js b/build/assets/padding-CO-3gQOa.js similarity index 65% rename from build/assets/padding-B7CJVLVc.js rename to build/assets/padding-CO-3gQOa.js index 371c3a2..ed44a49 100644 --- a/build/assets/padding-B7CJVLVc.js +++ b/build/assets/padding-CO-3gQOa.js @@ -1 +1 @@ -import{_ as e,c as t,k as c}from"./index-C1UYAdzy.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-BnGigPfR.js";const n={},o={style:{width:"1rem",height:"100%"}};function r(s,_){return t(),c("div",o)}const i=e(n,[["render",r]]);export{i as p}; diff --git a/build/assets/pay-D1eDcnTc.js b/build/assets/pay-BYJnRMtm.js similarity index 98% rename from build/assets/pay-D1eDcnTc.js rename to build/assets/pay-BYJnRMtm.js index 73809fa..ebf922e 100644 --- a/build/assets/pay-D1eDcnTc.js +++ b/build/assets/pay-BYJnRMtm.js @@ -1 +1 @@ -import{_ as ye,r as o,u as me,J as ge,o as he,m,a as ke,b as D,h as be,c as _,d as O,w as g,e as s,z as B,k as w,g as C,t as S,p as Z,j as we,f as x,i as ee,F as Ce,l as xe,n as R,E as c,q as $e,s as Ve}from"./index-C1UYAdzy.js";import{f as K,g as Se,h as Pe,i as Ee}from"./store-DOG1V_EV.js";import{_ as Fe}from"./authCode-5Ni0CM1g.js";/* empty css */const V=L=>($e("data-v-09cf2609"),L=L(),Ve(),L),ze=V(()=>s("h4",null,"选择支付方式",-1)),Be={class:"dra-body"},je={class:"header"},Ae={key:0,style:{display:"inline-block","margin-right":"20px"}},De={style:{display:"inline-block","margin-right":"20px"}},Le=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"原价:",-1)),Re={style:{color:"#f5222d","padding-bottom":"2rem"}},Te={style:{"font-size":"1.6rem"}},Ne={style:{display:"inline-block"}},Ue=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"活动折扣: ",-1)),Ie={style:{color:"#f5222d","padding-bottom":"2rem"}},Oe={style:{"font-size":"1.6rem"}},Ke={style:{display:"inline-block"}},Me=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),qe={style:{color:"#f5222d","padding-bottom":"2rem"}},Je={style:{"font-size":"1.6rem"}},We={key:0,"element-loading-text":"支付中",class:"card1"},Ge=V(()=>s("div",{class:"tips"},null,-1)),He={key:1,class:"card2"},Qe={class:"drawer-body"},Xe={class:"counter"},Ye={class:"received"},Ze={key:0},ea={key:1,style:{"font-size":"1rem",color:"#999"}},aa={key:0,class:"balance"},sa={class:"money"},ta=V(()=>s("div",{class:"tips"},"按回车(Enter)确认支付",-1)),la={key:1,class:"balance"},oa=V(()=>s("div",null,"不够找零, 请支付更多金额",-1)),na=V(()=>s("div",{class:"tips"},"按下小键盘输入金额",-1)),ia=[oa,na],ua={class:"keypad"},ca={class:"left"},ra={class:"right"},da={key:2,class:"card3"},va={class:"codes"},_a={style:{width:"100%",display:"flex","justify-content":"center"}},pa={__name:"pay",emits:["paySuccess"],setup(L,{expose:ae,emit:se}){const v=o(!1),t=o(1),i=o(""),h=o("");me(),o(0);const P=a=>{Ee({id:a}).then(e=>{m.emit("letPrintReceipt",e.data)})},te=()=>{y()},le=()=>{R(()=>{setTimeout(()=>{var a;k.value=!1,i.value="",M.value=!0,(a=h.value)==null||a.focus(),p(t.value)},300)})},p=a=>{t.value=a,t.value==2?window.addEventListener("keydown",U):(window.removeEventListener("keydown",U),R(()=>{var e;i.value="",(e=h.value)==null||e.focus()}))},u=o({}),j=o([]),f=o(""),E=o(null),T=o(!1);let F=0;const oe=a=>{u.value=a.data,j.value=a.cart_id,f.value=a.uid,E.value=a.reservation||null,F=a.is_storage||0,console.log("选择了用户==",f.value||"游客"),T.value=a.isRePay||!1},ne=a=>{u.value.pay_price=a.price,ce.value=a.order_id,F=a.is_storage||0},ie=se,M=o(!1),ue=o(["1","2","3","4","5","6","7","8","9","0","00","."]),q=/^(10|11|12|13|14|15)\d{16}$/,J=/^(25|26|27|28|29|30)\d{14,22}$/,ce=o(""),re=()=>{if(k.value=!0,h.value.blur(),T.value)W();else{let a;if(q.test(i.value))a="9";else if(J.test(i.value))a="13";else return k.value=!1,i.value="",h.value.focus(),c.error("请输入正确的支付码");K({key:u.value.key,cart_id:j.value,pay_type:a,is_storage:F,auth_code:i.value,reservation:E.value,uid:f.value}).then(e=>{e.data.out_trade_no&&e.msg=="支付成功"?(v.value=!1,c({message:"支付成功",type:"success"}),y(e.data),P(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",l=>{c({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y(l)}))}).catch(e=>{k.value=!1,R(()=>{var l;(l=h.value)==null||l.focus()})})}},W=()=>{let a=17;if(t.value==1)if(q.test(i.value))a="9";else if(J.test(i.value))a="13";else return k.value=!1,i.value="",h.value.focus(),c.error("请输入正确的支付码");Se({order_id:u.value.order_id,pay_type:a,is_storage:F,auth_code:i.value,reservation:E.value,uid:f.value}).then(e=>{var l;(l=e.msg)!=null&&l.includes("成功")?(v.value=!1,c({message:"支付成功",type:"success"}),P(e.data.id),y()):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",$=>{c({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y($)}))}).catch(e=>{i.value="",k.value=!1,R(()=>{var l;(l=h.value)==null||l.focus()})})};o(0);const y=a=>{var e;try{window.removeEventListener("keydown",U),M.value=!1,k.value=!1,i.value="",r.value="",b.value=[],(e=h.value)==null||e.blur(),ie("paySuccess",a),v.value=!1}catch{}},k=o(!1);ae({drawer:v,setForm:oe,setRePay:ne,beforeClose:y});const b=o([]),r=o(""),A=ge(()=>+r.value>0?(+r.value-u.value.pay_price).toFixed(2):-1),G=o(!1),N=a=>{a===-1?b.value=[]:b.value.pop(),r.value=b.value.length?b.value.join(""):0},d=a=>{G.value===!1&&(r.value="",G.value=!0);let e=String(r.value).indexOf(".")+1,l=String(r.value).length-e;console.log(e,l),(e===0||l<2)&&(b.value.join("")<=9999999&&b.value.push(a),r.value=b.value.join("")>99999999?99999999:b.value.join(""))},H=()=>{if(A.value===""||A.value===null||A.value===void 0||+r.value<+u.value.pay_price)return c.error("收款金额应该大于等于应收金额");T.value?W():K({cart_id:j.value,pay_type:"17",is_storage:F,reservation:E.value,uid:f.value}).then(a=>{v.value=!1,c({message:a.msg,type:"success"}),P(a.data.id),t.value=1,y()}).catch(a=>{k.value=!1})},U=a=>{let l=(a||window.event).keyCode;if(l==37)return p(2);if(l==120)return m.emit("F9");if(l==27)return y();switch(a.stopPropagation(),a.preventDefault(),l){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:N();break;case 13:H();break}},de=()=>{if(!f.value)return c.error("请先选择用户");let a=1;t.value==4&&(a=2),t.value==5&&(a=3),Pe({cart_id:j.value,reservation:E.value,uid:f.value,type:a}).then(e=>{c({message:"发送成功",type:"success"})})},I=o(""),Q=()=>{if(!f.value)return c.error("请先选择用户");let a=18;t.value==4&&(a=19),t.value==5&&(a=3),K({pay_type:a,is_storage:F,sms_code:I.value,cart_id:j.value,reservation:E.value,uid:f.value}).then(e=>{v.value=!1,c({message:e.msg,type:"success"}),P(e.data.id),p(1),y()})},z=o(!1),X=()=>{if(!(!v.value||z.value&&i.value.length>0)&&t.value!=1)return p(t.value-1)},Y=()=>{if(!(!v.value||z.value&&i.value.length>0)&&t.value!=5)return p(t.value+1)};return he(()=>{m.on("left",X),m.on("right",Y)}),ke(()=>{m.off("left",X),m.off("right",Y)}),(a,e)=>{const l=D("el-input"),$=D("el-button"),ve=D("Delete"),_e=D("el-icon"),pe=D("el-drawer"),fe=be("loading");return _(),O(pe,{size:"60rem",modelValue:v.value,"onUpdate:modelValue":e[12]||(e[12]=n=>v.value=n),direction:"rtl",onOpen:le,"before-close":y},{header:g(()=>[ze]),default:g(()=>[s("div",Be,[s("div",je,[s("div",{class:B(["left",{active:t.value==1}]),onClick:e[0]||(e[0]=n=>p(1))}," 微信/支付宝 ",2),s("div",{class:B(["center",{active:t.value==2}]),onClick:e[1]||(e[1]=n=>p(2))}," 现金收款 ",2),s("div",{class:B(["center",{active:t.value==3}]),style:{"border-left":"none"},onClick:e[2]||(e[2]=n=>p(3))}," 采购款 ",2),s("div",{class:B(["center",{active:t.value==4}]),style:{"border-left":"none"},onClick:e[3]||(e[3]=n=>p(4))}," 礼品券兑换 ",2),s("div",{class:B(["right",{active:t.value==5}]),onClick:e[4]||(e[4]=n=>p(5))}," 余额 ",2)]),s("div",null,[u.value.activities==1&&t.value!=4?(_(),w("div",Ae,[s("div",De,[Le,s("div",Re,[C(" ¥"),s("span",Te,S(u.value.total_price),1)])]),s("div",Ne,[Ue,s("div",Ie,[C(S(u.value.activity)+"¥",1),s("span",Oe,S(u.value.activity_price),1)])])])):Z("",!0),s("div",Ke,[Me,s("div",qe,[C(" ¥"),s("span",Je,S(t.value==4?u.value.total_price:u.value.pay_price),1)])])]),t.value==1?we((_(),w("div",We,[x(l,{ref_key:"codeRef",ref:h,modelValue:i.value,"onUpdate:modelValue":e[5]||(e[5]=n=>i.value=n),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ee(re,["enter"]),onFocus:e[6]||(e[6]=n=>z.value=!0),onBlur:e[7]||(e[7]=n=>z.value=!1)},null,8,["modelValue"]),Ge])),[[fe,k.value]]):t.value==2?(_(),w("div",He,[s("div",Qe,[s("div",Xe,[s("div",Ye,[r.value?(_(),w("span",Ze,S(r.value),1)):(_(),w("span",ea,"按下键盘输入客户支付金额"))]),A.value>=0?(_(),w("div",aa,[s("div",null,[C(" 需找零(元):"),s("span",sa,"¥"+S(A.value),1)]),ta])):(_(),w("div",la,ia)),s("div",ua,[s("div",ca,[(_(!0),w(Ce,null,xe(ue.value,n=>(_(),O($,{key:n,onClick:fa=>d(n)},{default:g(()=>[C(S(n),1)]),_:2},1032,["onClick"]))),128))]),s("div",ra,[x($,{onClick:N},{default:g(()=>[x(_e,null,{default:g(()=>[x(ve)]),_:1})]),_:1}),x($,{onClick:e[8]||(e[8]=n=>N(-1))},{default:g(()=>[C("C")]),_:1}),x($,{class:B(["enter",{"enter-disable":+r.value<+u.value.pay_price}]),disabled:+r.value<+u.value.pay_price,onClick:H},{default:g(()=>[C(" 确认 ")]),_:1},8,["class","disabled"])])])])])])):t.value==3||t.value==4||t.value==5?(_(),w("div",da,[s("div",va,[x(l,{modelValue:I.value,"onUpdate:modelValue":e[9]||(e[9]=n=>I.value=n),autofocus:"",class:"code-input",placeholder:"请输入验证码",onKeyup:ee(Q,["enter"]),onFocus:e[10]||(e[10]=n=>z.value=!0),onBlur:e[11]||(e[11]=n=>z.value=!1)},null,8,["modelValue"]),(_(),O(Fe,{style:{"margin-left":"1rem"},onSendCode:de,start:f.value>0,key:u.value.order_id,class:"get-code-btn"},null,8,["start"]))]),x($,{type:"primary",onClick:Q,class:"code-pay"},{default:g(()=>[C("确认支付")]),_:1})])):Z("",!0)])]),footer:g(()=>[s("div",_a,[x($,{class:"cancel-btn",onClick:te},{default:g(()=>[C("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ka=ye(pa,[["__scopeId","data-v-09cf2609"]]);export{ka as p}; +import{_ as ye,r as o,u as me,J as ge,o as he,m,a as ke,b as D,h as be,c as _,d as O,w as g,e as s,z as B,k as w,g as C,t as S,p as Z,j as we,f as x,i as ee,F as Ce,l as xe,n as R,E as c,q as $e,s as Ve}from"./index-BnGigPfR.js";import{f as K,g as Se,h as Pe,i as Ee}from"./store-DOZFgKpz.js";import{_ as Fe}from"./authCode-D1GYIlL-.js";/* empty css */const V=L=>($e("data-v-09cf2609"),L=L(),Ve(),L),ze=V(()=>s("h4",null,"选择支付方式",-1)),Be={class:"dra-body"},je={class:"header"},Ae={key:0,style:{display:"inline-block","margin-right":"20px"}},De={style:{display:"inline-block","margin-right":"20px"}},Le=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"原价:",-1)),Re={style:{color:"#f5222d","padding-bottom":"2rem"}},Te={style:{"font-size":"1.6rem"}},Ne={style:{display:"inline-block"}},Ue=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"活动折扣: ",-1)),Ie={style:{color:"#f5222d","padding-bottom":"2rem"}},Oe={style:{"font-size":"1.6rem"}},Ke={style:{display:"inline-block"}},Me=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),qe={style:{color:"#f5222d","padding-bottom":"2rem"}},Je={style:{"font-size":"1.6rem"}},We={key:0,"element-loading-text":"支付中",class:"card1"},Ge=V(()=>s("div",{class:"tips"},null,-1)),He={key:1,class:"card2"},Qe={class:"drawer-body"},Xe={class:"counter"},Ye={class:"received"},Ze={key:0},ea={key:1,style:{"font-size":"1rem",color:"#999"}},aa={key:0,class:"balance"},sa={class:"money"},ta=V(()=>s("div",{class:"tips"},"按回车(Enter)确认支付",-1)),la={key:1,class:"balance"},oa=V(()=>s("div",null,"不够找零, 请支付更多金额",-1)),na=V(()=>s("div",{class:"tips"},"按下小键盘输入金额",-1)),ia=[oa,na],ua={class:"keypad"},ca={class:"left"},ra={class:"right"},da={key:2,class:"card3"},va={class:"codes"},_a={style:{width:"100%",display:"flex","justify-content":"center"}},pa={__name:"pay",emits:["paySuccess"],setup(L,{expose:ae,emit:se}){const v=o(!1),t=o(1),i=o(""),h=o("");me(),o(0);const P=a=>{Ee({id:a}).then(e=>{m.emit("letPrintReceipt",e.data)})},te=()=>{y()},le=()=>{R(()=>{setTimeout(()=>{var a;k.value=!1,i.value="",M.value=!0,(a=h.value)==null||a.focus(),p(t.value)},300)})},p=a=>{t.value=a,t.value==2?window.addEventListener("keydown",U):(window.removeEventListener("keydown",U),R(()=>{var e;i.value="",(e=h.value)==null||e.focus()}))},u=o({}),j=o([]),f=o(""),E=o(null),T=o(!1);let F=0;const oe=a=>{u.value=a.data,j.value=a.cart_id,f.value=a.uid,E.value=a.reservation||null,F=a.is_storage||0,console.log("选择了用户==",f.value||"游客"),T.value=a.isRePay||!1},ne=a=>{u.value.pay_price=a.price,ce.value=a.order_id,F=a.is_storage||0},ie=se,M=o(!1),ue=o(["1","2","3","4","5","6","7","8","9","0","00","."]),q=/^(10|11|12|13|14|15)\d{16}$/,J=/^(25|26|27|28|29|30)\d{14,22}$/,ce=o(""),re=()=>{if(k.value=!0,h.value.blur(),T.value)W();else{let a;if(q.test(i.value))a="9";else if(J.test(i.value))a="13";else return k.value=!1,i.value="",h.value.focus(),c.error("请输入正确的支付码");K({key:u.value.key,cart_id:j.value,pay_type:a,is_storage:F,auth_code:i.value,reservation:E.value,uid:f.value}).then(e=>{e.data.out_trade_no&&e.msg=="支付成功"?(v.value=!1,c({message:"支付成功",type:"success"}),y(e.data),P(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",l=>{c({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y(l)}))}).catch(e=>{k.value=!1,R(()=>{var l;(l=h.value)==null||l.focus()})})}},W=()=>{let a=17;if(t.value==1)if(q.test(i.value))a="9";else if(J.test(i.value))a="13";else return k.value=!1,i.value="",h.value.focus(),c.error("请输入正确的支付码");Se({order_id:u.value.order_id,pay_type:a,is_storage:F,auth_code:i.value,reservation:E.value,uid:f.value}).then(e=>{var l;(l=e.msg)!=null&&l.includes("成功")?(v.value=!1,c({message:"支付成功",type:"success"}),P(e.data.id),y()):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",$=>{c({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y($)}))}).catch(e=>{i.value="",k.value=!1,R(()=>{var l;(l=h.value)==null||l.focus()})})};o(0);const y=a=>{var e;try{window.removeEventListener("keydown",U),M.value=!1,k.value=!1,i.value="",r.value="",b.value=[],(e=h.value)==null||e.blur(),ie("paySuccess",a),v.value=!1}catch{}},k=o(!1);ae({drawer:v,setForm:oe,setRePay:ne,beforeClose:y});const b=o([]),r=o(""),A=ge(()=>+r.value>0?(+r.value-u.value.pay_price).toFixed(2):-1),G=o(!1),N=a=>{a===-1?b.value=[]:b.value.pop(),r.value=b.value.length?b.value.join(""):0},d=a=>{G.value===!1&&(r.value="",G.value=!0);let e=String(r.value).indexOf(".")+1,l=String(r.value).length-e;console.log(e,l),(e===0||l<2)&&(b.value.join("")<=9999999&&b.value.push(a),r.value=b.value.join("")>99999999?99999999:b.value.join(""))},H=()=>{if(A.value===""||A.value===null||A.value===void 0||+r.value<+u.value.pay_price)return c.error("收款金额应该大于等于应收金额");T.value?W():K({cart_id:j.value,pay_type:"17",is_storage:F,reservation:E.value,uid:f.value}).then(a=>{v.value=!1,c({message:a.msg,type:"success"}),P(a.data.id),t.value=1,y()}).catch(a=>{k.value=!1})},U=a=>{let l=(a||window.event).keyCode;if(l==37)return p(2);if(l==120)return m.emit("F9");if(l==27)return y();switch(a.stopPropagation(),a.preventDefault(),l){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:N();break;case 13:H();break}},de=()=>{if(!f.value)return c.error("请先选择用户");let a=1;t.value==4&&(a=2),t.value==5&&(a=3),Pe({cart_id:j.value,reservation:E.value,uid:f.value,type:a}).then(e=>{c({message:"发送成功",type:"success"})})},I=o(""),Q=()=>{if(!f.value)return c.error("请先选择用户");let a=18;t.value==4&&(a=19),t.value==5&&(a=3),K({pay_type:a,is_storage:F,sms_code:I.value,cart_id:j.value,reservation:E.value,uid:f.value}).then(e=>{v.value=!1,c({message:e.msg,type:"success"}),P(e.data.id),p(1),y()})},z=o(!1),X=()=>{if(!(!v.value||z.value&&i.value.length>0)&&t.value!=1)return p(t.value-1)},Y=()=>{if(!(!v.value||z.value&&i.value.length>0)&&t.value!=5)return p(t.value+1)};return he(()=>{m.on("left",X),m.on("right",Y)}),ke(()=>{m.off("left",X),m.off("right",Y)}),(a,e)=>{const l=D("el-input"),$=D("el-button"),ve=D("Delete"),_e=D("el-icon"),pe=D("el-drawer"),fe=be("loading");return _(),O(pe,{size:"60rem",modelValue:v.value,"onUpdate:modelValue":e[12]||(e[12]=n=>v.value=n),direction:"rtl",onOpen:le,"before-close":y},{header:g(()=>[ze]),default:g(()=>[s("div",Be,[s("div",je,[s("div",{class:B(["left",{active:t.value==1}]),onClick:e[0]||(e[0]=n=>p(1))}," 微信/支付宝 ",2),s("div",{class:B(["center",{active:t.value==2}]),onClick:e[1]||(e[1]=n=>p(2))}," 现金收款 ",2),s("div",{class:B(["center",{active:t.value==3}]),style:{"border-left":"none"},onClick:e[2]||(e[2]=n=>p(3))}," 采购款 ",2),s("div",{class:B(["center",{active:t.value==4}]),style:{"border-left":"none"},onClick:e[3]||(e[3]=n=>p(4))}," 礼品券兑换 ",2),s("div",{class:B(["right",{active:t.value==5}]),onClick:e[4]||(e[4]=n=>p(5))}," 余额 ",2)]),s("div",null,[u.value.activities==1&&t.value!=4?(_(),w("div",Ae,[s("div",De,[Le,s("div",Re,[C(" ¥"),s("span",Te,S(u.value.total_price),1)])]),s("div",Ne,[Ue,s("div",Ie,[C(S(u.value.activity)+"¥",1),s("span",Oe,S(u.value.activity_price),1)])])])):Z("",!0),s("div",Ke,[Me,s("div",qe,[C(" ¥"),s("span",Je,S(t.value==4?u.value.total_price:u.value.pay_price),1)])])]),t.value==1?we((_(),w("div",We,[x(l,{ref_key:"codeRef",ref:h,modelValue:i.value,"onUpdate:modelValue":e[5]||(e[5]=n=>i.value=n),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ee(re,["enter"]),onFocus:e[6]||(e[6]=n=>z.value=!0),onBlur:e[7]||(e[7]=n=>z.value=!1)},null,8,["modelValue"]),Ge])),[[fe,k.value]]):t.value==2?(_(),w("div",He,[s("div",Qe,[s("div",Xe,[s("div",Ye,[r.value?(_(),w("span",Ze,S(r.value),1)):(_(),w("span",ea,"按下键盘输入客户支付金额"))]),A.value>=0?(_(),w("div",aa,[s("div",null,[C(" 需找零(元):"),s("span",sa,"¥"+S(A.value),1)]),ta])):(_(),w("div",la,ia)),s("div",ua,[s("div",ca,[(_(!0),w(Ce,null,xe(ue.value,n=>(_(),O($,{key:n,onClick:fa=>d(n)},{default:g(()=>[C(S(n),1)]),_:2},1032,["onClick"]))),128))]),s("div",ra,[x($,{onClick:N},{default:g(()=>[x(_e,null,{default:g(()=>[x(ve)]),_:1})]),_:1}),x($,{onClick:e[8]||(e[8]=n=>N(-1))},{default:g(()=>[C("C")]),_:1}),x($,{class:B(["enter",{"enter-disable":+r.value<+u.value.pay_price}]),disabled:+r.value<+u.value.pay_price,onClick:H},{default:g(()=>[C(" 确认 ")]),_:1},8,["class","disabled"])])])])])])):t.value==3||t.value==4||t.value==5?(_(),w("div",da,[s("div",va,[x(l,{modelValue:I.value,"onUpdate:modelValue":e[9]||(e[9]=n=>I.value=n),autofocus:"",class:"code-input",placeholder:"请输入验证码",onKeyup:ee(Q,["enter"]),onFocus:e[10]||(e[10]=n=>z.value=!0),onBlur:e[11]||(e[11]=n=>z.value=!1)},null,8,["modelValue"]),(_(),O(Fe,{style:{"margin-left":"1rem"},onSendCode:de,start:f.value>0,key:u.value.order_id,class:"get-code-btn"},null,8,["start"]))]),x($,{type:"primary",onClick:Q,class:"code-pay"},{default:g(()=>[C("确认支付")]),_:1})])):Z("",!0)])]),footer:g(()=>[s("div",_a,[x($,{class:"cancel-btn",onClick:te},{default:g(()=>[C("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ka=ye(pa,[["__scopeId","data-v-09cf2609"]]);export{ka as p}; diff --git a/build/assets/shop-Oo7M8T-d.js b/build/assets/shop-CUNZMJhl.js similarity index 73% rename from build/assets/shop-Oo7M8T-d.js rename to build/assets/shop-CUNZMJhl.js index 213019d..180a604 100644 --- a/build/assets/shop-Oo7M8T-d.js +++ b/build/assets/shop-CUNZMJhl.js @@ -1 +1 @@ -import{K as s}from"./index-C1UYAdzy.js";import{r}from"./axiosAPI-B6mxiJzo.js";function a(t){return r.get("/product/product/lists",{params:t})}function i(t){return s.get("/cate/cate/lists",{params:t})}function n(t){return s.get("/system_store_storage/systemstorestorage/lists",{params:t})}function u(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}function p(t){return s.get("/store_product/storeProduct/lists",{params:t})}export{n as a,u as b,p as c,i as m,a as s}; +import{K as s}from"./index-BnGigPfR.js";import{r}from"./axiosAPI-DJRwxDIy.js";function a(t){return r.get("/product/product/lists",{params:t})}function i(t){return s.get("/cate/cate/lists",{params:t})}function n(t){return s.get("/system_store_storage/systemstorestorage/lists",{params:t})}function u(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}function p(t){return s.get("/store_product/storeProduct/lists",{params:t})}export{n as a,u as b,p as c,i as m,a as s}; diff --git a/build/assets/store-DOG1V_EV.js b/build/assets/store-DOZFgKpz.js similarity index 94% rename from build/assets/store-DOG1V_EV.js rename to build/assets/store-DOZFgKpz.js index 1a23180..e521c1a 100644 --- a/build/assets/store-DOG1V_EV.js +++ b/build/assets/store-DOZFgKpz.js @@ -1 +1 @@ -import{K as e}from"./index-C1UYAdzy.js";function o(r){return e.post("/cart/cart/create",r)}function s(r){return e.get("/cart/cart/list",{params:r})}function a(r){return e.post("/store_order/storeOrder/checkInventory",r)}function n(r){return e.post("/store_order/StoreOrder/checkOrder",r)}function i(r){return e.post("/cart/cart/delete",r)}function c(r){return e.post("/store_order/StoreOrder/createOrder",r)}function u(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("/store_order/storeOrder/detail",{params:r})}function f(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function O(r){return e.post("/store_order/StoreOrder/writeoff_order",r)}function _(r){return e.post("/store_order/StoreOrder/checkSms",r)}function A(r){return e.get("/store_order/StoreOrder/print",{params:r})}function S(r){return e.get("/user_product_storage/UserProductStorage/lists",{params:r})}function g(r){return e.post("/user_product_storage/UserProductStorage/supply",r)}export{s as a,o as b,i as c,d,p as e,c as f,u as g,_ as h,A as i,f as j,g as k,n as o,a as s,S as u,O as w}; +import{K as e}from"./index-BnGigPfR.js";function o(r){return e.post("/cart/cart/create",r)}function s(r){return e.get("/cart/cart/list",{params:r})}function a(r){return e.post("/store_order/storeOrder/checkInventory",r)}function n(r){return e.post("/store_order/StoreOrder/checkOrder",r)}function i(r){return e.post("/cart/cart/delete",r)}function c(r){return e.post("/store_order/StoreOrder/createOrder",r)}function u(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("/store_order/storeOrder/detail",{params:r})}function f(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function O(r){return e.post("/store_order/StoreOrder/writeoff_order",r)}function _(r){return e.post("/store_order/StoreOrder/checkSms",r)}function A(r){return e.get("/store_order/StoreOrder/print",{params:r})}function S(r){return e.get("/user_product_storage/UserProductStorage/lists",{params:r})}function g(r){return e.post("/user_product_storage/UserProductStorage/supply",r)}export{s as a,o as b,i as c,d,p as e,c as f,u as g,_ as h,A as i,f as j,g as k,n as o,a as s,S as u,O as w}; diff --git a/build/assets/test-CMj2k7kj.js b/build/assets/test-B4sX6LfC.js similarity index 99% rename from build/assets/test-CMj2k7kj.js rename to build/assets/test-B4sX6LfC.js index 3324588..de026a2 100644 --- a/build/assets/test-CMj2k7kj.js +++ b/build/assets/test-B4sX6LfC.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-C1UYAdzy.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-BnGigPfR.js";var D={exports:{}};(function(j,M){(function(a,e){j.exports=e()})(window,function(){return function(h){var a={};function e(o){if(a[o])return a[o].exports;var d=a[o]={i:o,l:!1,exports:{}};return h[o].call(d.exports,d,d.exports,e),d.l=!0,d.exports}return e.m=h,e.c=a,e.d=function(o,d,f){e.o(o,d)||Object.defineProperty(o,d,{enumerable:!0,get:f})},e.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,d){if(d&1&&(o=e(o)),d&8||d&4&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(e.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),d&2&&typeof o!="string")for(var b in o)e.d(f,b,(function(i){return o[i]}).bind(null,b));return f},e.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(d,"a",d),d},e.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},e.p="",e(e.s=0)}({"./src/index.js":function(h,a,e){e.r(a),e("./src/sass/index.scss");var o=e("./src/js/init.js"),d=o.default.init;typeof window<"u"&&(window.printJS=d),a.default=d},"./src/js/browser.js":function(h,a,e){e.r(a);var o={isFirefox:function(){return typeof InstallTrigger<"u"},isIE:function(){return navigator.userAgent.indexOf("MSIE")!==-1||!!document.documentMode},isEdge:function(){return!o.isIE()&&!!window.StyleMedia},isChrome:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;return!!f.chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||navigator.userAgent.toLowerCase().indexOf("safari")!==-1},isIOSChrome:function(){return navigator.userAgent.toLowerCase().indexOf("crios")!==-1}};a.default=o},"./src/js/functions.js":function(h,a,e){e.r(a),e.d(a,"addWrapper",function(){return b}),e.d(a,"capitalizePrint",function(){return i}),e.d(a,"collectStyles",function(){return l}),e.d(a,"addHeader",function(){return n}),e.d(a,"cleanUp",function(){return u}),e.d(a,"isRawHTML",function(){return p});var o=e("./src/js/modal.js"),d=e("./src/js/browser.js");function f(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(c){return typeof c}:f=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},f(t)}function b(t,s){var c="font-family:"+s.font+" !important; font-size: "+s.font_size+" !important; width:100%;";return'
'+t+"
"}function i(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t,s){for(var c=document.defaultView||window,E="",y=c.getComputedStyle(t,""),m=0;m]*>(.*?)");return s.test(t)}},"./src/js/html.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(n){return typeof n}:f=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},f(l)}a.default={print:function(r,n){var u=i(r.printable)?r.printable:document.getElementById(r.printable);if(!u){window.console.error("Invalid HTML element id: "+r.printable);return}r.printableElement=b(u,r),r.header&&Object(o.addHeader)(r.printableElement,r),d.default.send(r,n)}};function b(l,r){for(var n=l.cloneNode(),u=Array.prototype.slice.call(l.childNodes),p=0;p"+t.documentTitle+"",t.css&&(Array.isArray(t.css)||(t.css=[t.css]),t.css.forEach(function(v){y.srcdoc+=''})),y.srcdoc+=""),t.type){case"pdf":if(o.default.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer.");var m=window.open(t.fallbackPrintable,"_blank");m.focus(),t.onIncompatibleBrowser()}catch(v){t.onError(v)}finally{t.showModal&&d.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}else f.default.print(t,y);break;case"image":l.default.print(t,y);break;case"html":b.default.print(t,y);break;case"raw-html":i.default.print(t,y);break;case"json":r.default.print(t,y);break}}}},"./src/js/json.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(r){return typeof r}:f=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(i)}a.default={print:function(l,r){if(f(l.printable)!=="object")throw new Error("Invalid javascript data object (JSON).");if(typeof l.repeatTableHeader!="boolean")throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!l.properties||!Array.isArray(l.properties))throw new Error("Invalid properties array for your JSON data.");l.properties=l.properties.map(function(n){return{field:f(n)==="object"?n.field:n,displayName:f(n)==="object"?n.displayName:n,columnSize:f(n)==="object"&&n.columnSize?n.columnSize+";":100/l.properties.length+"%;"}}),l.printableElement=document.createElement("div"),l.header&&Object(o.addHeader)(l.printableElement,l),l.printableElement.innerHTML+=b(l),d.default.send(l,r)}};function b(i){var l=i.printable,r=i.properties,n='';i.repeatTableHeader&&(n+=""),n+="";for(var u=0;u'+Object(o.capitalizePrint)(r[u].displayName)+"";n+="",i.repeatTableHeader&&(n+=""),n+="";for(var p=0;p";for(var t=0;t1)for(var E=0;E'+s+""}n+=""}return n+="
",n}},"./src/js/modal.js":function(h,a,e){e.r(a);var o={show:function(f){var b="font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;",i=document.createElement("div");i.setAttribute("style",b),i.setAttribute("id","printJS-Modal");var l=document.createElement("div");l.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var r=document.createElement("div");r.setAttribute("class","printClose"),r.setAttribute("id","printClose"),l.appendChild(r);var n=document.createElement("span");n.setAttribute("class","printSpinner"),l.appendChild(n);var u=document.createTextNode(f.modalMessage);l.appendChild(u),i.appendChild(l),document.getElementsByTagName("body")[0].appendChild(i),document.getElementById("printClose").addEventListener("click",function(){o.close()})},close:function(){var f=document.getElementById("printJS-Modal");f&&f.parentNode.removeChild(f)}};a.default=o},"./src/js/pdf.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js"),d=e("./src/js/functions.js");a.default={print:function(i,l){if(i.base64){var r=Uint8Array.from(atob(i.printable),function(u){return u.charCodeAt(0)});f(i,l,r);return}i.printable=/^(blob|http|\/\/)/i.test(i.printable)?i.printable:window.location.origin+(i.printable.charAt(0)!=="/"?"/"+i.printable:i.printable);var n=new window.XMLHttpRequest;n.responseType="arraybuffer",n.addEventListener("error",function(){Object(d.cleanUp)(i),i.onError(n.statusText,n)}),n.addEventListener("load",function(){if([200,201].indexOf(n.status)===-1){Object(d.cleanUp)(i),i.onError(n.statusText,n);return}f(i,l,n.response)}),n.open("GET",i.printable,!0),n.send()}};function f(b,i,l){var r=new window.Blob([l],{type:"application/pdf"});r=window.URL.createObjectURL(r),i.setAttribute("src",r),o.default.send(b,i)}},"./src/js/print.js":function(h,a,e){e.r(a);var o=e("./src/js/browser.js"),d=e("./src/js/functions.js"),f={send:function(n,u){document.getElementsByTagName("body")[0].appendChild(u);var p=document.getElementById(n.frameId);p.onload=function(){if(n.type==="pdf"){o.default.isFirefox()?setTimeout(function(){return b(p,n)},1e3):b(p,n);return}var t=p.contentWindow||p.contentDocument;if(t.document&&(t=t.document),t.body.appendChild(n.printableElement),n.type!=="pdf"&&n.style){var s=document.createElement("style");s.innerHTML=n.style,t.head.appendChild(s)}var c=t.getElementsByTagName("img");c.length>0?i(Array.from(c)).then(function(){return b(p,n)}):b(p,n)}}};function b(r,n){try{if(r.focus(),o.default.isEdge()||o.default.isIE())try{r.contentWindow.document.execCommand("print",!1,null)}catch{r.contentWindow.print()}else r.contentWindow.print()}catch(u){n.onError(u)}finally{o.default.isFirefox()&&(r.style.visibility="hidden",r.style.left="-1px"),Object(d.cleanUp)(n)}}function i(r){var n=r.map(function(u){if(u.src&&u.src!==window.location.href)return l(u)});return Promise.all(n)}function l(r){return new Promise(function(n){var u=function p(){!r||typeof r.naturalWidth>"u"||r.naturalWidth===0||!r.complete?setTimeout(p,500):n()};u()})}a.default=f},"./src/js/raw-html.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js");a.default={print:function(f,b){f.printableElement=document.createElement("div"),f.printableElement.setAttribute("style","width:100%"),f.printableElement.innerHTML=f.printable,o.default.send(f,b)}}},"./src/sass/index.scss":function(h,a,e){},0:function(h,a,e){h.exports=e("./src/index.js")}}).default})})(D);const B=g("h2",null,"小票标题",-1),U=g("p",null,"商品名称: 商品1",-1),R=g("p",null,"价格: ¥10.00",-1),W=g("p",null,"数量: 1",-1),H=g("p",null,"-------------------",-1),N=g("p",null,"总计: ¥10.00",-1),K=g("p",null,"-------------------",-1),z=[B,U,R,W,H,N,K],F={__name:"test",setup(j){const M=O(null),h=()=>{uni.getEnv(e=>{e.h5?I.error("请使用APP打印小票"):a()})},a=()=>{let e="";e+=`******************************** `,e+=`泸优采-小票 `,e+=`单号: CG171565043141139102 `,e+=`测试商品1 * 1 1.00元 diff --git a/build/assets/user-CPvHwcG9.js b/build/assets/user-Cxe1-N3Y.js similarity index 91% rename from build/assets/user-CPvHwcG9.js rename to build/assets/user-Cxe1-N3Y.js index dcc274d..41dfc66 100644 --- a/build/assets/user-CPvHwcG9.js +++ b/build/assets/user-Cxe1-N3Y.js @@ -1 +1 @@ -import{K as r}from"./index-C1UYAdzy.js";function t(s){return r.post("/login/account",s)}function u(s){return r.get("/user/UserShip/lists",{params:s})}function i(s){return r.post("/user/user/add",s)}function n(s){return r.post("/user/user/archives_sms",s)}function a(s){return r.get("/user/user/lists",{params:s})}function o(s){return r.get("/user/user/detail",{params:s})}function p(s){return r.get("/user/Address/detail",{params:s})}function c(s){return r.post("/user/Address/edit",s)}function d(s){return r.post("/store_order/StoreOrder/rechange_amount",s)}function A(s){return r.post("/user/user/user_ship",s)}function f(s){return r.post("/user/User/recharge_list",s)}export{u as a,i as b,n as c,d,o as e,A as f,f as g,p as h,c as i,t as l,a as u}; +import{K as r}from"./index-BnGigPfR.js";function t(s){return r.post("/login/account",s)}function u(s){return r.get("/user/UserShip/lists",{params:s})}function i(s){return r.post("/user/user/add",s)}function n(s){return r.post("/user/user/archives_sms",s)}function a(s){return r.get("/user/user/lists",{params:s})}function o(s){return r.get("/user/user/detail",{params:s})}function p(s){return r.get("/user/Address/detail",{params:s})}function c(s){return r.post("/user/Address/edit",s)}function d(s){return r.post("/store_order/StoreOrder/rechange_amount",s)}function A(s){return r.post("/user/user/user_ship",s)}function f(s){return r.post("/user/User/recharge_list",s)}export{u as a,i as b,n as c,d,o as e,A as f,f as g,p as h,c as i,t as l,a as u}; diff --git a/build/index.html b/build/index.html index 9bd7c88..661765b 100644 --- a/build/index.html +++ b/build/index.html @@ -56,7 +56,7 @@ } } - + diff --git a/src/views/saleHome/component/order.vue b/src/views/saleHome/component/order.vue index 2b45ba9..6e940cd 100644 --- a/src/views/saleHome/component/order.vue +++ b/src/views/saleHome/component/order.vue @@ -238,9 +238,9 @@ onUnmounted(() => { > --> - +
{{ "立即结账 (F9)" }} diff --git a/src/views/user/component/detail.vue b/src/views/user/component/detail.vue index dd452c1..e0cabde 100644 --- a/src/views/user/component/detail.vue +++ b/src/views/user/component/detail.vue @@ -263,8 +263,8 @@ const cancelUpdate = () => { const isDisabled = ref(true); const activeStore = ref(0); -const activeStoreList = ref(["基本信息"]); -// const activeStoreList = ref(["基本信息", "用户资产"]); +// const activeStoreList = ref(["基本信息"]); +const activeStoreList = ref(["基本信息", "用户资产"]); const isOut = ref(false); // 是否为出库状态 const productList = ref([]); // 商品列表 @@ -343,7 +343,6 @@ const getUserInfo = () => { data.phone = data.mobile + ''; delete data.mobile; formData.value = Object.assign(formData.value, data); - if(data.integral) formData.value.get_frozen = data.integral; }) } @@ -474,11 +473,11 @@ onUnmounted(() => {
礼品券:
-
¥{{ formData.get_frozen }}
+
¥{{ formData.integral }}
冻结礼品券:
-
¥{{ formData.amount_frozen?.toFixed(2) }}
+
¥{{ formData.get_frozen }}
ID:
diff --git a/src/views/user/component/order.vue b/src/views/user/component/order.vue index bd8ada2..e15b7a8 100644 --- a/src/views/user/component/order.vue +++ b/src/views/user/component/order.vue @@ -257,7 +257,7 @@ onUnmounted(() => {
余额: {{ item.now_money }}
采购款: {{ item.purchase_funds }}
返还金: {{ item.return_money?.toFixed(2) }}
-
礼品券: {{ item.get_frozen }}
+
礼品券: {{ item.integral }}
{{ item.user_ship_name }} {{ item.user_ship_name }}