diff --git a/dist/assets/index-C0eRKKxq.js b/dist/assets/index-0RwqannG.js similarity index 90% rename from dist/assets/index-C0eRKKxq.js rename to dist/assets/index-0RwqannG.js index 7956d49..17c155d 100644 --- a/dist/assets/index-C0eRKKxq.js +++ b/dist/assets/index-0RwqannG.js @@ -1 +1 @@ -import{_ as T,u as j,r as _,b as y,j as N,c as t,h as o,e,f as n,w as u,g as v,k as J,p as q,F as U,i as F,l as A,t as d,d as K,q as l,m as O,s as H,v as M,z as Q,E}from"./index-3-ddzq9I.js";import{e as W,p as X,f as Y,g as Z}from"./pay-DFmO-d88.js";import{p as ee}from"./padding-5Tza0aT3.js";const te=h=>(H("data-v-477f396c"),h=h(),M(),h),se={class:"my-order"},oe={class:"header-nav"},ae=te(()=>e("div",{class:"nav-item"},"订单列表",-1)),ie={class:"nav-item-clear"},le={class:"header-input"},ne={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},ce=["onClick"],de={class:"top"},_e={class:"create-time"},re={class:"shop"},ue={key:0,class:"left"},ve={key:0,class:"shop-name"},pe={class:"right"},fe={class:"money"},me={class:"count"},he={class:"bottom"},ye={class:"pay"},ge={key:0},ke={key:0},$e={key:1},be={key:2},Ce={key:3},Ve={key:4},we={key:5},Se={key:6},Pe={key:1,style:{color:"#ff4a00"}},Le={key:0,class:"cashier"},xe={key:1,class:"cashier"},Ie={key:0,class:"load-end"},Ae={key:1,class:"load-end"},Re={__name:"order",setup(h){const P=j();_([]);const a=_(1),S=$=>{f.value.page=1,m.value=!1,r.value=!1,k.value=[],C(!0)};_(null);const f=_({page:1,limit:20,search_info:""}),r=_(!1),L=_(0),V=_(0),m=_(!1),k=_([]),C=($=!1)=>{if($)f.value.page=1;else if(m.value||r.value)return;r.value=!0,a.value==1&&(f.value.paid=null),a.value==2&&(f.value.paid=0),W(P.userInfo.service.mer_id,f.value).then(i=>{$?k.value=i.data.list:k.value=[...k.value,...i.data.list],i.data.list.length{m.value=!0,r.value=!1})},R=($,i)=>{V.value=i,O.emit("set-order-detail",$)};return($,i)=>{const c=y("el-radio-button"),x=y("el-radio-group"),w=y("el-button"),z=y("el-input"),b=y("el-image"),B=N("loading"),D=N("infinite-scroll");return t(),o("div",se,[e("div",oe,[ae,e("div",ie,[n(x,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=s=>a.value=s),onChange:S,size:"small"},{default:u(()=>[n(c,{value:1},{default:u(()=>[v("全部")]),_:1}),n(c,{value:2},{default:u(()=>[v("未支付")]),_:1})]),_:1},8,["modelValue"])])]),e("div",le,[n(z,{modelValue:f.value.search_info,"onUpdate:modelValue":i[2]||(i[2]=s=>f.value.search_info=s),placeholder:"请输入订单编号",onKeydown:i[3]||(i[3]=J(s=>C(!0),["enter"])),onClear:i[4]||(i[4]=s=>C(!0)),clearable:""},{append:u(()=>[n(w,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:i[1]||(i[1]=s=>C(!0))},{default:u(()=>[v("搜索")]),_:1})]),_:1},8,["modelValue"])]),q((t(),o("div",ne,[(t(!0),o(U,null,F(k.value,(s,g)=>(t(),o("div",{class:A(["item",{"item-active":V.value==g}]),key:g,onClick:I=>R(s,g)},[e("div",de,[e("div",{class:A(["sn",s.pay_type===11||s.pay_type===12||s.pay_type===13?"cahier":"cahier2"])},"单号: "+d(s.order_sn),3),e("div",_e,d(s.create_time),1)]),e("div",re,[s.orderProduct?(t(),o("div",ue,[(t(!0),o(U,null,F(s.orderProduct.slice(0,5),(I,G)=>(t(),K(b,{key:G,src:I.cart_info.productAttr.image||I.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),s.orderProduct.length==1?(t(),o("div",ve,d(s.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",pe,[e("div",fe,"¥"+d(s.pay_price),1),e("div",me,"共"+d(s.total_num)+"件商品",1)])]),e("div",he,[e("div",ye,[s.paid?(t(),o("div",ge,[v(" 已支付 "),s.pay_type==13?(t(),o("span",ke,"(支付宝收款)")):l("",!0),s.pay_type==12?(t(),o("span",$e,"(现金支付)")):l("",!0),s.pay_type==11?(t(),o("span",be,"(微信收款)")):l("",!0),s.pay_type==0?(t(),o("span",Ce,"(余额支付)")):l("",!0),s.pay_type==1?(t(),o("span",Ve,"(微信支付)")):l("",!0),s.pay_type==9?(t(),o("span",we,"(商户余额支付)")):l("",!0),s.pay_type==10?(t(),o("span",Se,"(对公转账)")):l("",!0)])):(t(),o("div",Pe,"未支付"))]),s.service_info?(t(),o("div",Le,"收银员: "+d(s.service_info.nickname),1)):(t(),o("div",xe,"平台订单"))])],10,ce))),128)),m.value?(t(),o("div",Ie,"没有更多了")):l("",!0),r.value?(t(),o("div",Ae,"加载中...")):l("",!0)])),[[B,r.value],[D,C]])])}}},ze=T(Re,[["__scopeId","data-v-477f396c"]]),p=h=>(H("data-v-f0903720"),h=h(),M(),h),Be={class:"my-order"},De={class:"header-nav"},Ee=["onClick"],Ne={class:"detail"},Ue={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},Ke={style:{color:"#ff4a00"}},Oe={style:{display:"flex","align-items":"center"}},Te={style:{"margin-left":"0.5rem"}},je={key:1,class:"table"},qe=p(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},Me={class:"info-item"},Ge=p(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=p(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=p(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=p(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=p(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},ct=p(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},rt=p(()=>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:6},kt={key:0,class:"table-title"},$t={key:1,class:"table-info",style:{"flex-direction":"column"}},bt={class:"info-item"},Ct=p(()=>e("div",{class:"info-item-title"},"头像:",-1)),Vt={class:"info-item-info"},wt={class:"info-item"},St=p(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Pt={class:"info-item-info"},Lt={class:"info-item"},xt=p(()=>e("div",{class:"info-item-title"},"账号:",-1)),It={class:"info-item-info"},At={key:2,class:"footer"},Rt={class:"info"},zt={class:"ser"},Bt={class:"price"},Dt={key:0,class:"handle"},Et={key:1,class:"handle"},Nt=p(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ut={class:"dialog-footer"},Ft={__name:"detail",setup(h){j();const P=Q(),a=_({});O.on("set-order-detail",i=>{a.value=i}),_([]);const S=_(null),f=_(!1);_(0);const r=_(0),L=_(["商品信息","订单详情"]),V=_(""),m=_(!1),k=i=>{V.value=i,m.value=!0},C=()=>{m.value=!1,Y({order_sn:V.value}).then(i=>{E({message:i.message,type:"success"}),P.push({name:"home"})})},R=i=>{S.value.setRePay({price:i.pay_price,order_id:i.group_order_id}),S.value.drawer=!0},$=i=>{Z({order_sn:i}).then(c=>{c.data.paid==1||c.message=="支付成功"?E({message:c.message,type:"success"}):E({message:c.message,type:"error"})}).catch(c=>{})};return(i,c)=>{const x=y("el-image"),w=y("el-table-column"),z=y("el-table"),b=y("el-button"),B=y("el-dialog"),D=N("loading");return t(),o("div",Be,[e("div",De,[(t(!0),o(U,null,F(L.value,(s,g)=>(t(),o("div",{key:g,class:A(["nav-item",{"nav-item-active":r.value==g,"nav-item-radius1":r.value==g+1,"nav-item-radius2":r.value==g-1}]),onClick:I=>r.value=g},d(s),11,Ee))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":r.value==L.value.length-1}]),style:{flex:"1"}},null,2)]),q((t(),o("div",Ne,[a.value.orderProduct&&r.value==0?(t(),o("div",Ue,[e("div",Fe,[v(" 共计 "),e("span",Ke,d(a.value.total_num),1),v(" 件商品 ")]),n(z,{style:{height:"calc(100vh - 100px - 14rem)"},data:a.value.orderProduct},{default:u(()=>[n(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:s})=>[e("div",Oe,[n(x,{style:{height:"3rem",width:"3rem"},src:s.cart_info.productAttr.image||s.cart_info.product.image},null,8,["src"]),e("span",Te,d(s.cart_info.product.store_name),1)])]),_:1}),n(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),n(w,{prop:"product_num",label:"数量",width:"150"}),n(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),a.value.orderProduct&&r.value==1?(t(),o("div",je,[qe,e("div",He,[e("div",Me,[Ge,e("div",Je,d(a.value.create_time),1)]),e("div",Qe,[We,e("div",Xe,d(a.value.total_num),1)]),e("div",Ye,[Ze,e("div",et,"¥"+d(a.value.total_price),1)]),e("div",tt,[st,e("div",ot,d(a.value.pay_time),1)]),e("div",at,[it,e("div",lt,"¥"+d(a.value.deduction_price),1)]),e("div",nt,[ct,e("div",dt,"¥"+d(a.value.pay_price),1)]),e("div",_t,[rt,e("div",ut,[a.value.pay_type==11?(t(),o("span",vt,"微信收款")):l("",!0),a.value.pay_type==12?(t(),o("span",pt,"现金支付")):l("",!0),a.value.pay_type==13?(t(),o("span",ft,"支付宝收款")):l("",!0),a.value.pay_type==0?(t(),o("span",mt,"余额支付")):l("",!0),a.value.pay_type==1?(t(),o("span",ht,"微信支付")):l("",!0),a.value.pay_type==9?(t(),o("span",yt,"商户余额支付")):l("",!0),a.value.pay_type==10?(t(),o("span",gt,"对公转账")):l("",!0)])])]),a.value.service_info?(t(),o("div",kt,"收银员信息")):l("",!0),a.value.service_info?(t(),o("div",$t,[e("div",bt,[Ct,e("div",Vt,[n(x,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:a.value.service_info.avatar},null,8,["src"])])]),e("div",wt,[St,e("div",Pt,d(a.value.service_info.nickname),1)]),e("div",Lt,[xt,e("div",It,d(a.value.service_info.account),1)])])):l("",!0)])):l("",!0),a.value.service_info?(t(),o("div",At,[e("div",Rt,[e("div",zt,"收银员: "+d(a.value.service_info.nickname),1),e("div",Bt,[v(" 实付: "),e("span",null,"¥"+d(a.value.pay_price),1)])]),a.value.pay_time?(t(),o("div",Et,"已支付")):(t(),o("div",Dt,[n(b,{class:"btn",type:"primary",onClick:c[0]||(c[0]=s=>R(a.value))},{default:u(()=>[v("重新支付")]),_:1}),n(b,{class:"btn",type:"primary",onClick:c[1]||(c[1]=s=>$(a.value.order_sn))},{default:u(()=>[v("检测状态")]),_:1}),n(b,{class:"btn",type:"success",onClick:c[2]||(c[2]=s=>k(a.value.order_sn))},{default:u(()=>[v("提单")]),_:1})]))])):l("",!0)])),[[D,f.value]]),n(X,{ref_key:"payRef",ref:S},null,512),n(B,{modelValue:m.value,"onUpdate:modelValue":c[4]||(c[4]=s=>m.value=s),title:"提示",width:"500"},{footer:u(()=>[e("div",Ut,[n(b,{onClick:c[3]||(c[3]=s=>m.value=!1)},{default:u(()=>[v("取消")]),_:1}),i.cartCount>0?(t(),K(b,{key:0,onClick:i.goHome},{default:u(()=>[v(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(b,{key:1,type:"primary",onClick:C},{default:u(()=>[v(" 确认提单 ")]),_:1}))])]),default:u(()=>[Nt]),_:1},8,["modelValue"])])}}},Kt=T(Ft,[["__scopeId","data-v-f0903720"]]),Ot={class:"my-card"},Ht={__name:"index",setup(h){return(P,a)=>(t(),o("div",Ot,[n(ze,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),n(ee),n(Kt,{ref:"detailRef"},null,512)]))}};export{Ht as default}; +import{_ as T,u as H,r as _,b as y,l as N,c as t,h as o,e,f as n,w as u,g as v,p as J,v as M,F as U,i as F,s as A,t as d,d as K,x as l,m as O,y as j,z as q,C as Q,E}from"./index-BpXYCW1n.js";import{e as W,p as X,f as Y,g as Z}from"./pay-EEWGeT4Q.js";import{p as ee}from"./padding-CLyithQn.js";const te=h=>(j("data-v-477f396c"),h=h(),q(),h),se={class:"my-order"},oe={class:"header-nav"},ae=te(()=>e("div",{class:"nav-item"},"订单列表",-1)),ie={class:"nav-item-clear"},le={class:"header-input"},ne={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},ce=["onClick"],de={class:"top"},_e={class:"create-time"},re={class:"shop"},ue={key:0,class:"left"},ve={key:0,class:"shop-name"},pe={class:"right"},fe={class:"money"},me={class:"count"},he={class:"bottom"},ye={class:"pay"},ge={key:0},ke={key:0},$e={key:1},be={key:2},Ce={key:3},Ve={key:4},we={key:5},Se={key:6},Pe={key:1,style:{color:"#ff4a00"}},Le={key:0,class:"cashier"},xe={key:1,class:"cashier"},Ie={key:0,class:"load-end"},Ae={key:1,class:"load-end"},Re={__name:"order",setup(h){const P=H();_([]);const a=_(1),S=$=>{f.value.page=1,m.value=!1,r.value=!1,k.value=[],C(!0)};_(null);const f=_({page:1,limit:20,search_info:""}),r=_(!1),L=_(0),V=_(0),m=_(!1),k=_([]),C=($=!1)=>{if($)f.value.page=1;else if(m.value||r.value)return;r.value=!0,a.value==1&&(f.value.paid=null),a.value==2&&(f.value.paid=0),W(P.userInfo.service.mer_id,f.value).then(i=>{$?k.value=i.data.list:k.value=[...k.value,...i.data.list],i.data.list.length{m.value=!0,r.value=!1})},R=($,i)=>{V.value=i,O.emit("set-order-detail",$)};return($,i)=>{const c=y("el-radio-button"),x=y("el-radio-group"),w=y("el-button"),z=y("el-input"),b=y("el-image"),B=N("loading"),D=N("infinite-scroll");return t(),o("div",se,[e("div",oe,[ae,e("div",ie,[n(x,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=s=>a.value=s),onChange:S,size:"small"},{default:u(()=>[n(c,{value:1},{default:u(()=>[v("全部")]),_:1}),n(c,{value:2},{default:u(()=>[v("未支付")]),_:1})]),_:1},8,["modelValue"])])]),e("div",le,[n(z,{modelValue:f.value.search_info,"onUpdate:modelValue":i[2]||(i[2]=s=>f.value.search_info=s),placeholder:"请输入订单编号",onKeydown:i[3]||(i[3]=J(s=>C(!0),["enter"])),onClear:i[4]||(i[4]=s=>C(!0)),clearable:""},{append:u(()=>[n(w,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:i[1]||(i[1]=s=>C(!0))},{default:u(()=>[v("搜索")]),_:1})]),_:1},8,["modelValue"])]),M((t(),o("div",ne,[(t(!0),o(U,null,F(k.value,(s,g)=>(t(),o("div",{class:A(["item",{"item-active":V.value==g}]),key:g,onClick:I=>R(s,g)},[e("div",de,[e("div",{class:A(["sn",s.pay_type===11||s.pay_type===12||s.pay_type===13?"cahier":"cahier2"])},"单号: "+d(s.order_sn),3),e("div",_e,d(s.create_time),1)]),e("div",re,[s.orderProduct?(t(),o("div",ue,[(t(!0),o(U,null,F(s.orderProduct.slice(0,5),(I,G)=>(t(),K(b,{key:G,src:I.cart_info.productAttr.image||I.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),s.orderProduct.length==1?(t(),o("div",ve,d(s.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",pe,[e("div",fe,"¥"+d(s.pay_price),1),e("div",me,"共"+d(s.total_num)+"件商品",1)])]),e("div",he,[e("div",ye,[s.paid?(t(),o("div",ge,[v(" 已支付 "),s.pay_type==13?(t(),o("span",ke,"(支付宝收款)")):l("",!0),s.pay_type==12?(t(),o("span",$e,"(现金支付)")):l("",!0),s.pay_type==11?(t(),o("span",be,"(微信收款)")):l("",!0),s.pay_type==0?(t(),o("span",Ce,"(余额支付)")):l("",!0),s.pay_type==1?(t(),o("span",Ve,"(微信支付)")):l("",!0),s.pay_type==9?(t(),o("span",we,"(商户余额支付)")):l("",!0),s.pay_type==10?(t(),o("span",Se,"(对公转账)")):l("",!0)])):(t(),o("div",Pe,"未支付"))]),s.service_info?(t(),o("div",Le,"收银员: "+d(s.service_info.nickname),1)):(t(),o("div",xe,"平台订单"))])],10,ce))),128)),m.value?(t(),o("div",Ie,"没有更多了")):l("",!0),r.value?(t(),o("div",Ae,"加载中...")):l("",!0)])),[[B,r.value],[D,C]])])}}},ze=T(Re,[["__scopeId","data-v-477f396c"]]),p=h=>(j("data-v-f0903720"),h=h(),q(),h),Be={class:"my-order"},De={class:"header-nav"},Ee=["onClick"],Ne={class:"detail"},Ue={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},Ke={style:{color:"#ff4a00"}},Oe={style:{display:"flex","align-items":"center"}},Te={style:{"margin-left":"0.5rem"}},He={key:1,class:"table"},Me=p(()=>e("div",{class:"table-title"},"订单信息",-1)),je={class:"table-info"},qe={class:"info-item"},Ge=p(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=p(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=p(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=p(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=p(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},ct=p(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},rt=p(()=>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:6},kt={key:0,class:"table-title"},$t={key:1,class:"table-info",style:{"flex-direction":"column"}},bt={class:"info-item"},Ct=p(()=>e("div",{class:"info-item-title"},"头像:",-1)),Vt={class:"info-item-info"},wt={class:"info-item"},St=p(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Pt={class:"info-item-info"},Lt={class:"info-item"},xt=p(()=>e("div",{class:"info-item-title"},"账号:",-1)),It={class:"info-item-info"},At={key:2,class:"footer"},Rt={class:"info"},zt={class:"ser"},Bt={class:"price"},Dt={key:0,class:"handle"},Et={key:1,class:"handle"},Nt=p(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ut={class:"dialog-footer"},Ft={__name:"detail",setup(h){H();const P=Q(),a=_({});O.on("set-order-detail",i=>{a.value=i}),_([]);const S=_(null),f=_(!1);_(0);const r=_(0),L=_(["商品信息","订单详情"]),V=_(""),m=_(!1),k=i=>{V.value=i,m.value=!0},C=()=>{m.value=!1,Y({order_sn:V.value}).then(i=>{E({message:i.message,type:"success"}),P.push({name:"home"})})},R=i=>{S.value.setRePay({price:i.pay_price,order_id:i.group_order_id}),S.value.drawer=!0},$=i=>{Z({order_sn:i}).then(c=>{c.data.paid==1||c.message=="支付成功"?E({message:c.message,type:"success"}):E({message:c.message,type:"error"})}).catch(c=>{})};return(i,c)=>{const x=y("el-image"),w=y("el-table-column"),z=y("el-table"),b=y("el-button"),B=y("el-dialog"),D=N("loading");return t(),o("div",Be,[e("div",De,[(t(!0),o(U,null,F(L.value,(s,g)=>(t(),o("div",{key:g,class:A(["nav-item",{"nav-item-active":r.value==g,"nav-item-radius1":r.value==g+1,"nav-item-radius2":r.value==g-1}]),onClick:I=>r.value=g},d(s),11,Ee))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":r.value==L.value.length-1}]),style:{flex:"1"}},null,2)]),M((t(),o("div",Ne,[a.value.orderProduct&&r.value==0?(t(),o("div",Ue,[e("div",Fe,[v(" 共计 "),e("span",Ke,d(a.value.total_num),1),v(" 件商品 ")]),n(z,{style:{height:"calc(100vh - 100px - 14rem)"},data:a.value.orderProduct},{default:u(()=>[n(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:s})=>[e("div",Oe,[n(x,{style:{height:"3rem",width:"3rem"},src:s.cart_info.productAttr.image||s.cart_info.product.image},null,8,["src"]),e("span",Te,d(s.cart_info.product.store_name),1)])]),_:1}),n(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),n(w,{prop:"product_num",label:"数量",width:"150"}),n(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),a.value.orderProduct&&r.value==1?(t(),o("div",He,[Me,e("div",je,[e("div",qe,[Ge,e("div",Je,d(a.value.create_time),1)]),e("div",Qe,[We,e("div",Xe,d(a.value.total_num),1)]),e("div",Ye,[Ze,e("div",et,"¥"+d(a.value.total_price),1)]),e("div",tt,[st,e("div",ot,d(a.value.pay_time),1)]),e("div",at,[it,e("div",lt,"¥"+d(a.value.deduction_price),1)]),e("div",nt,[ct,e("div",dt,"¥"+d(a.value.pay_price),1)]),e("div",_t,[rt,e("div",ut,[a.value.pay_type==11?(t(),o("span",vt,"微信收款")):l("",!0),a.value.pay_type==12?(t(),o("span",pt,"现金支付")):l("",!0),a.value.pay_type==13?(t(),o("span",ft,"支付宝收款")):l("",!0),a.value.pay_type==0?(t(),o("span",mt,"余额支付")):l("",!0),a.value.pay_type==1?(t(),o("span",ht,"微信支付")):l("",!0),a.value.pay_type==9?(t(),o("span",yt,"商户余额支付")):l("",!0),a.value.pay_type==10?(t(),o("span",gt,"对公转账")):l("",!0)])])]),a.value.service_info?(t(),o("div",kt,"收银员信息")):l("",!0),a.value.service_info?(t(),o("div",$t,[e("div",bt,[Ct,e("div",Vt,[n(x,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:a.value.service_info.avatar},null,8,["src"])])]),e("div",wt,[St,e("div",Pt,d(a.value.service_info.nickname),1)]),e("div",Lt,[xt,e("div",It,d(a.value.service_info.account),1)])])):l("",!0)])):l("",!0),a.value.service_info?(t(),o("div",At,[e("div",Rt,[e("div",zt,"收银员: "+d(a.value.service_info.nickname),1),e("div",Bt,[v(" 实付: "),e("span",null,"¥"+d(a.value.pay_price),1)])]),a.value.pay_time?(t(),o("div",Et,"已支付")):(t(),o("div",Dt,[n(b,{class:"btn",type:"primary",onClick:c[0]||(c[0]=s=>R(a.value))},{default:u(()=>[v("重新支付")]),_:1}),n(b,{class:"btn",type:"primary",onClick:c[1]||(c[1]=s=>$(a.value.order_sn))},{default:u(()=>[v("检测状态")]),_:1}),n(b,{class:"btn",type:"success",onClick:c[2]||(c[2]=s=>k(a.value.order_sn))},{default:u(()=>[v("提单")]),_:1})]))])):l("",!0)])),[[D,f.value]]),n(X,{ref_key:"payRef",ref:S},null,512),n(B,{modelValue:m.value,"onUpdate:modelValue":c[4]||(c[4]=s=>m.value=s),title:"提示",width:"500"},{footer:u(()=>[e("div",Ut,[n(b,{onClick:c[3]||(c[3]=s=>m.value=!1)},{default:u(()=>[v("取消")]),_:1}),i.cartCount>0?(t(),K(b,{key:0,onClick:i.goHome},{default:u(()=>[v(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(b,{key:1,type:"primary",onClick:C},{default:u(()=>[v(" 确认提单 ")]),_:1}))])]),default:u(()=>[Nt]),_:1},8,["modelValue"])])}}},Kt=T(Ft,[["__scopeId","data-v-f0903720"]]),Ot={class:"my-card"},jt={__name:"index",setup(h){return(P,a)=>(t(),o("div",Ot,[n(ze,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),n(ee),n(Kt,{ref:"detailRef"},null,512)]))}};export{jt as default}; diff --git a/dist/assets/index-BJfOfbMk.css b/dist/assets/index-B1C4miRF.css similarity index 51% rename from dist/assets/index-BJfOfbMk.css rename to dist/assets/index-B1C4miRF.css index bb041e7..d823ec9 100644 --- a/dist/assets/index-BJfOfbMk.css +++ b/dist/assets/index-B1C4miRF.css @@ -1 +1 @@ -@charset "UTF-8";.my-order[data-v-9936e733]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-9936e733]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav span[data-v-9936e733]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-9936e733]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-9936e733]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-9936e733]{height:calc(100vh - 100px - 8.2rem);overflow-y:auto}.my-order .order-list .item[data-v-9936e733]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-9936e733]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-9936e733]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-9936e733]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #2ec479;color:#2ec479;border-radius:3px}.my-order .order-list .item .top .cahier2[data-v-9936e733]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #ff4a00;color:#ff4a00;border-radius:3px}.my-order .order-list .item .top .create-time[data-v-9936e733]{font-size:.8rem}.my-order .order-list .item .shop[data-v-9936e733]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-9936e733]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-9936e733]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-9936e733]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-9936e733]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-9936e733]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-9936e733]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-list .item .bottom[data-v-9936e733]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-9936e733]{background-color:#efefef}.my-order .load-end[data-v-9936e733]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-e01cd4ad]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-e01cd4ad]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-e01cd4ad]{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-e01cd4ad]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-e01cd4ad]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-e01cd4ad]{border-radius:0 0 0 1rem}.my-order .detail[data-v-e01cd4ad]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-e01cd4ad]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-e01cd4ad]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-e01cd4ad]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:2rem;border-bottom:1px solid #eee}.my-order .detail .table .table-info[data-v-e01cd4ad]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-e01cd4ad]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-e01cd4ad]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-e01cd4ad]{height:6rem;box-sizing:border-box;padding:0 1.5rem;position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px 10px #eee;display:flex;justify-content:space-between;align-items:center;background-color:#fff}.my-order .detail .footer .info[data-v-e01cd4ad]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-e01cd4ad]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-e01cd4ad]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-e01cd4ad]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-e01cd4ad]{border-radius:4rem;padding:1.2rem}.my-card{display:flex}.my-card .my-code{height:70%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-card .my-code .box{width:38rem;position:relative}.my-card .my-code .box .input{width:100%;height:3rem;box-sizing:border-box;border-radius:4rem;border:1px solid #1890ff;padding:0 1rem;font-size:1.1rem}.my-card .my-code .box .input:focus{outline:none;box-shadow:0 0 5px #1890ff;transition:all .2s ease-in-out}.my-card .my-code .box .btn{position:absolute;right:0;top:0;width:5rem;height:100%;border-radius:0 4rem 4rem 0;background:#1890ff;color:#fff;display:flex;justify-content:center;align-items:center}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.my-order[data-v-aaa26790]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-aaa26790]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav span[data-v-aaa26790]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-aaa26790]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-aaa26790]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-aaa26790]{height:calc(100vh - 100px - 8.2rem);overflow-y:auto}.my-order .order-list .item[data-v-aaa26790]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-aaa26790]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-aaa26790]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-aaa26790]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #2ec479;color:#2ec479;border-radius:3px}.my-order .order-list .item .top .cahier2[data-v-aaa26790]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #ff4a00;color:#ff4a00;border-radius:3px}.my-order .order-list .item .top .create-time[data-v-aaa26790]{font-size:.8rem}.my-order .order-list .item .shop[data-v-aaa26790]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-aaa26790]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-aaa26790]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-aaa26790]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-aaa26790]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-aaa26790]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-aaa26790]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-list .item .bottom[data-v-aaa26790]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-aaa26790]{background-color:#efefef}.my-order .load-end[data-v-aaa26790]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-a4ec55f6]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-a4ec55f6]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-a4ec55f6]{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-a4ec55f6]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-a4ec55f6]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-a4ec55f6]{border-radius:0 0 0 1rem}.my-order .detail[data-v-a4ec55f6]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-a4ec55f6]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-a4ec55f6]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-a4ec55f6]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:2rem;border-bottom:1px solid #eee}.my-order .detail .table .table-info[data-v-a4ec55f6]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-a4ec55f6]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-a4ec55f6]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-a4ec55f6]{height:6rem;box-sizing:border-box;padding:0 1.5rem;position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px 10px #eee;display:flex;justify-content:space-between;align-items:center;background-color:#fff}.my-order .detail .footer .info[data-v-a4ec55f6]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-a4ec55f6]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-a4ec55f6]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-a4ec55f6]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-a4ec55f6]{border-radius:4rem;padding:1.2rem}.my-card{display:flex}.my-card .my-code{height:70%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-card .my-code .box{width:38rem;position:relative}.my-card .my-code .box .input{width:100%;height:3rem;box-sizing:border-box;border-radius:4rem;border:1px solid #1890ff;padding:0 1rem;font-size:1.1rem}.my-card .my-code .box .input:focus{outline:none;box-shadow:0 0 5px #1890ff;transition:all .2s ease-in-out}.my-card .my-code .box .btn{position:absolute;right:0;top:0;width:5rem;height:100%;border-radius:0 4rem 4rem 0;background:#1890ff;color:#fff;display:flex;justify-content:center;align-items:center}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/index-3-ddzq9I.js b/dist/assets/index-BpXYCW1n.js similarity index 99% rename from dist/assets/index-3-ddzq9I.js rename to dist/assets/index-BpXYCW1n.js index 2424503..0df75c2 100644 --- a/dist/assets/index-3-ddzq9I.js +++ b/dist/assets/index-BpXYCW1n.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-CInbkgrA.js","./pay-DFmO-d88.js","./pay-DhaR4dEp.css","./padding-5Tza0aT3.js","./shop-BCVM-Dnd.js","./index-DzelaVQG.css","./index-C0eRKKxq.js","./index-DXzcP25f.css","./indexList-DCxZB4jo.js","./indexList-Cdt8gTOX.css","./index-Bs0mdlFE.js","./index-Bmp4AY5x.css","./index-CWHs3HNs.js","./index-BJfOfbMk.css","./index-CDZ2C3w9.js","./index-CtNwS61F.css"] + __vite__mapDeps.viteFileDeps = ["./index-hLlMBiY0.js","./pay-EEWGeT4Q.js","./pay-DhaR4dEp.css","./padding-CLyithQn.js","./shop-DouiAmok.js","./index-CUMIE358.css","./index-0RwqannG.js","./index-DXzcP25f.css","./indexList-XCr1z72_.js","./indexList-Cdt8gTOX.css","./index-Cws__d6J.js","./index-Bmp4AY5x.css","./index-CBQTGiyO.js","./index-B1C4miRF.css","./index-CN6ikDMs.js","./index-Dwwi99ut.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -76,4 +76,4 @@ function __vite__mapDeps(indexes) { `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[c4]=this[c4]={accessors:{}}).accessors,r=this.prototype;function a(l){const s=us(l);o[s]||(cce(r,l),o[s]=!0)}return Ve.isArray(t)?t.forEach(a):a(t),this}}hd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ve.reduceDescriptors(hd.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Ve.freezeMethods(hd);const ar=hd;function pf(e,t){const n=this||iv,o=t||n,r=ar.from(o.headers);let a=o.data;return Ve.forEach(e,function(s){a=s.call(n,a,r.normalize(),t?t.status:void 0)}),r.normalize(),a}function kb(e){return!!(e&&e.__CANCEL__)}function Ti(e,t,n){Rt.call(this,e??"canceled",Rt.ERR_CANCELED,t,n),this.name="CanceledError"}Ve.inherits(Ti,Rt,{__CANCEL__:!0});function dce(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const fce=Ro.hasStandardBrowserEnv?{write(e,t,n,o,r,a){const l=[e+"="+encodeURIComponent(t)];Ve.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),Ve.isString(o)&&l.push("path="+o),Ve.isString(r)&&l.push("domain="+r),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function pce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Eb(e,t){return e&&!pce(t)?vce(e,t):t}const hce=Ro.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(a){let l=a;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(l){const s=Ve.isString(l)?r(l):l;return s.protocol===o.protocol&&s.host===o.host}}():function(){return function(){return!0}}();function mce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gce(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,a=0,l;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),f=o[a];l||(l=c),n[r]=u,o[r]=c;let d=a,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===a&&(a=(a+1)%e),c-l{const a=r.loaded,l=r.lengthComputable?r.total:void 0,s=a-n,u=o(s),c=a<=l;n=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&c?(l-a)/u:void 0,event:r};f[t?"download":"upload"]=!0,e(f)}}const yce=typeof XMLHttpRequest<"u",_ce=yce&&function(e){return new Promise(function(n,o){let r=e.data;const a=ar.from(e.headers).normalize();let{responseType:l,withXSRFToken:s}=e,u;function c(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}let f;if(Ve.isFormData(r)){if(Ro.hasStandardBrowserEnv||Ro.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((f=a.getContentType())!==!1){const[v,...y]=f?f.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([v||"multipart/form-data",...y].join("; "))}}let d=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(v+":"+y))}const p=Eb(e.baseURL,e.url);d.open(e.method.toUpperCase(),bb(p,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function h(){if(!d)return;const v=ar.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),g={data:!l||l==="text"||l==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:v,config:e,request:d};dce(function(b){n(b),c()},function(b){o(b),c()},g),d=null}if("onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(h)},d.onabort=function(){d&&(o(new Rt("Request aborted",Rt.ECONNABORTED,e,d)),d=null)},d.onerror=function(){o(new Rt("Network Error",Rt.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||wb;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),o(new Rt(y,g.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,e,d)),d=null},Ro.hasStandardBrowserEnv&&(s&&Ve.isFunction(s)&&(s=s(e)),s||s!==!1&&hce(p))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&fce.read(e.xsrfCookieName);v&&a.set(e.xsrfHeaderName,v)}r===void 0&&a.setContentType(null),"setRequestHeader"in d&&Ve.forEach(a.toJSON(),function(y,g){d.setRequestHeader(g,y)}),Ve.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),l&&l!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",d4(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",d4(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=v=>{d&&(o(!v||v.type?new Ti(null,e,d):v),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const m=mce(p);if(m&&Ro.protocols.indexOf(m)===-1){o(new Rt("Unsupported protocol "+m+":",Rt.ERR_BAD_REQUEST,e));return}d.send(r||null)})},W0={http:Wue,xhr:_ce};Ve.forEach(W0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const f4=e=>`- ${e}`,bce=e=>Ve.isFunction(e)||e===null||e===!1,xb={getAdapter:e=>{e=Ve.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let a=0;a`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=t?a.length>1?`since : `+a.map(f4).join(` `):" "+f4(a[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o},adapters:W0};function vf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ti(null,e)}function p4(e){return vf(e),e.headers=ar.from(e.headers),e.data=pf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xb.getAdapter(e.adapter||iv.adapter)(e).then(function(o){return vf(e),o.data=pf.call(e,e.transformResponse,o),o.headers=ar.from(o.headers),o},function(o){return kb(o)||(vf(e),o&&o.response&&(o.response.data=pf.call(e,e.transformResponse,o.response),o.response.headers=ar.from(o.response.headers))),Promise.reject(o)})}const v4=e=>e instanceof ar?{...e}:e;function Dl(e,t){t=t||{};const n={};function o(c,f,d){return Ve.isPlainObject(c)&&Ve.isPlainObject(f)?Ve.merge.call({caseless:d},c,f):Ve.isPlainObject(f)?Ve.merge({},f):Ve.isArray(f)?f.slice():f}function r(c,f,d){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c,d)}else return o(c,f,d)}function a(c,f){if(!Ve.isUndefined(f))return o(void 0,f)}function l(c,f){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c)}else return o(void 0,f)}function s(c,f,d){if(d in t)return o(c,f);if(d in e)return o(void 0,c)}const u={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(c,f)=>r(v4(c),v4(f),!0)};return Ve.forEach(Object.keys(Object.assign({},e,t)),function(f){const d=u[f]||r,p=d(e[f],t[f],f);Ve.isUndefined(p)&&d!==s||(n[f]=p)}),n}const Mb="1.6.8",uv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{uv[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const h4={};uv.transitional=function(t,n,o){function r(a,l){return"[Axios v"+Mb+"] Transitional option '"+a+"'"+l+(o?". "+o:"")}return(a,l,s)=>{if(t===!1)throw new Rt(r(l," has been removed"+(n?" in "+n:"")),Rt.ERR_DEPRECATED);return n&&!h4[l]&&(h4[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,s):!0}};function wce(e,t,n){if(typeof e!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const a=o[r],l=t[a];if(l){const s=e[a],u=s===void 0||l(s,a,e);if(u!==!0)throw new Rt("option "+a+" must be "+u,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+a,Rt.ERR_BAD_OPTION)}}const j0={assertOptions:wce,validators:uv},xr=j0.validators;class gc{constructor(t){this.defaults=t,this.interceptors={request:new u4,response:new u4}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const a=r.stack?r.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=` -`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Dl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&j0.assertOptions(o,{silentJSONParsing:xr.transitional(xr.boolean),forcedJSONParsing:xr.transitional(xr.boolean),clarifyTimeoutError:xr.transitional(xr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:j0.assertOptions(r,{encode:xr.function,serialize:xr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&Ve.merge(a.common,a[n.method]);a&&Ve.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=ar.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[p4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Ti(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new cv(function(r){t=r}),cancel:t}}}const Cce=cv;function Sce(e){return function(n){return e.apply(null,n)}}function kce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const q0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(q0).forEach(([e,t])=>{q0[t]=e});const Ece=q0;function $b(e){const t=new zu(e),n=ib(zu.prototype.request,t);return Ve.extend(n,zu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return $b(Dl(e,r))},n}const sn=$b(iv);sn.Axios=zu;sn.CanceledError=Ti;sn.CancelToken=Cce;sn.isCancel=kb;sn.VERSION=Mb;sn.toFormData=vd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Sce;sn.isAxiosError=kce;sn.mergeConfig=Dl;sn.AxiosHeaders=ar;sn.formToJSON=e=>Sb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=xb.getAdapter;sn.HttpStatusCode=Ece;sn.default=sn;const Oi=sn.create({baseURL:"https://crmeb-test.shop.lihaink.cn/api",timeout:1e4});Oi.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Oi.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&($s({message:e.data.message,type:"error"}),setTimeout(()=>{const t=rv();t.setUserInfo({}),t.setToken(""),Ob.push("/login")},700)),e.data.status===400)throw $s({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),$s({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Qce(e){return Oi.post("auth/login",e)}function ede(e){return Oi.get("user",e)}function xce(){return Oi.post("logout")}const dv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Mce=e=>(j4("data-v-28f3f43a"),e=e(),q4(),e),$ce={class:"my-card"},Tce={class:"card-header"},Oce=Mce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Ace={class:"card-body"},Nce={class:"el-dropdown-link"},Rce={class:"info"},Ice={style:{"margin-left":"0.3rem"}},Pce={__name:"myHeader",setup(e){const t=rv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=ob(),a=()=>{xce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{$s({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ze("el-image"),c=Ze("el-avatar"),f=Ze("arrow-down"),d=Ze("el-icon"),p=Ze("el-dropdown-item"),h=Ze("el-dropdown-menu"),m=Ze("el-dropdown");return _(),M("div",$ce,[k("div",Tce,[W(u,{style:{height:"3rem",width:"3rem"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"}),Oce]),k("div",Ace,[W(m,{trigger:"hover"},{dropdown:X(()=>[W(h,null,{default:X(()=>[W(p,{onClick:a},{default:X(()=>[gt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",Nce,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Rce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Ice,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:X(()=>[W(f)]),_:1})])]),_:1})])])}}},Lce=dv(Pce,[["__scopeId","data-v-28f3f43a"]]);function Vce(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(r){r(n)}),(o=e.get("*"))&&o.slice().map(function(r){r(t,n)})}}}const qn=Vce(),md=e=>(j4("data-v-72bc38cb"),e=e(),q4(),e),Bce={class:"my-card"},zce=md(()=>k("div",null,"收银",-1)),Hce=md(()=>k("div",null,"订单",-1)),Dce=md(()=>k("div",null,"核销",-1)),Fce=md(()=>k("div",null,"商品",-1)),Kce={__name:"myAside",setup(e){const t=ob(),n=tue(),o=s=>{t.push({name:s})},r=P(["home","order","convert","shop"]),a=()=>{let s=r.value.indexOf(n.name);s>0&&o(r.value[s-1])},l=()=>{let s=r.value.indexOf(n.name);s{qn.on("up",a),qn.on("down",l)}),zo(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Ze("Sell"),f=Ze("el-icon"),d=Ze("DataLine"),p=Ze("FullScreen"),h=Ze("ShoppingBag");return _(),M("div",Bce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:u[0]||(u[0]=m=>o("home"))},[W(f,{size:"30"},{default:X(()=>[W(c)]),_:1}),zce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:u[1]||(u[1]=m=>o("order"))},[W(f,{size:"30"},{default:X(()=>[W(d)]),_:1}),Hce],2),k("div",{class:T(["list-item",{active:i(n).name=="convert"}]),onClick:u[2]||(u[2]=m=>o("convert"))},[W(f,{size:"30"},{default:X(()=>[W(p)]),_:1}),Dce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:u[3]||(u[3]=m=>o("shop"))},[W(f,{size:"30"},{default:X(()=>[W(h)]),_:1}),Fce],2)])}}},Wce=dv(Kce,[["__scopeId","data-v-72bc38cb"]]),jce={class:"common-layout"},qce={__name:"index",setup(e){const t=n=>{console.log("按下",n.keyCode),n.keyCode==16&&qn.emit("shift"),n.keyCode==120&&qn.emit("F9"),n.keyCode==13&&qn.emit("enter"),n.keyCode==37&&qn.emit("left"),n.keyCode==39&&qn.emit("right"),n.keyCode==38&&qn.emit("up"),n.keyCode==40&&qn.emit("down"),n.keyCode==46&&qn.emit("delete"),n.keyCode==45&&qn.emit("insert")};return et(()=>{window.addEventListener("keydown",t),console.log("开启键盘监听")}),zo(()=>{window.removeEventListener("keydown",t),console.log("关闭键盘监听")}),(n,o)=>{const r=Ze("el-header"),a=Ze("el-aside"),l=Ze("router-view"),s=Ze("el-main"),u=Ze("el-container");return _(),M("div",jce,[W(u,null,{default:X(()=>[W(r,null,{default:X(()=>[W(Lce)]),_:1}),W(u,null,{default:X(()=>[W(a,{width:"100px"},{default:X(()=>[W(Wce)]),_:1}),W(s,null,{default:X(()=>[W(l,{class:"my-main"},{default:X(({Component:c})=>[W(tn,{name:"el-zoom-in-top"},{default:X(()=>[(_(),le(it(c)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Uce=dv(qce,[["__scopeId","data-v-64ddf17e"]]),Yce=[{path:"/",name:"layout",component:Uce,redirect:"/home",children:[{path:"/home",name:"home",component:()=>ia(()=>import("./index-CInbkgrA.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/order",name:"order",component:()=>ia(()=>import("./index-C0eRKKxq.js"),__vite__mapDeps([6,1,2,3,7]),import.meta.url)},{path:"/orderList",name:"orderList",component:()=>ia(()=>import("./indexList-DCxZB4jo.js"),__vite__mapDeps([8,1,2,9]),import.meta.url)},{path:"/shop",name:"shop",component:()=>ia(()=>import("./index-Bs0mdlFE.js"),__vite__mapDeps([10,4,11]),import.meta.url)},{path:"/convert",name:"convert",component:()=>ia(()=>import("./index-CWHs3HNs.js"),__vite__mapDeps([12,1,2,3,13]),import.meta.url)}]},{path:"/login",name:"login",component:()=>ia(()=>import("./index-CDZ2C3w9.js"),__vite__mapDeps([14,15]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>ia(()=>import("./index-iRrk4g_r.js"),__vite__mapDeps([]),import.meta.url)}],Tb=Qie({history:$ie(),routes:Yce});Tb.beforeEach((e,t,n)=>{const o=rv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ob=Tb,Ai=Og(Z5);for(const[e,t]of Object.entries(ML))Ai.component(e,t);const Gce=oue();Ai.use(Ob);Ai.use(Gce);Ai.use(Use,{locale:Yse});Ai.mount("#app");export{Oi as A,bt as B,y2 as C,S as D,$s as E,Ke as F,Qce as G,ede as H,dv as _,zo as a,Ze as b,_ as c,le as d,k as e,W as f,gt as g,M as h,ht as i,Ec as j,Mt as k,T as l,qn as m,We as n,et as o,tt as p,ne as q,P as r,j4 as s,Te as t,rv as u,q4 as v,X as w,lr as x,tue as y,ob as z}; +`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Dl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&j0.assertOptions(o,{silentJSONParsing:xr.transitional(xr.boolean),forcedJSONParsing:xr.transitional(xr.boolean),clarifyTimeoutError:xr.transitional(xr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:j0.assertOptions(r,{encode:xr.function,serialize:xr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&Ve.merge(a.common,a[n.method]);a&&Ve.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=ar.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[p4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Ti(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new cv(function(r){t=r}),cancel:t}}}const Cce=cv;function Sce(e){return function(n){return e.apply(null,n)}}function kce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const q0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(q0).forEach(([e,t])=>{q0[t]=e});const Ece=q0;function $b(e){const t=new zu(e),n=ib(zu.prototype.request,t);return Ve.extend(n,zu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return $b(Dl(e,r))},n}const sn=$b(iv);sn.Axios=zu;sn.CanceledError=Ti;sn.CancelToken=Cce;sn.isCancel=kb;sn.VERSION=Mb;sn.toFormData=vd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Sce;sn.isAxiosError=kce;sn.mergeConfig=Dl;sn.AxiosHeaders=ar;sn.formToJSON=e=>Sb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=xb.getAdapter;sn.HttpStatusCode=Ece;sn.default=sn;const Oi=sn.create({baseURL:"https://crmeb-test.shop.lihaink.cn/api",timeout:1e4});Oi.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Oi.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&($s({message:e.data.message,type:"error"}),setTimeout(()=>{const t=rv();t.setUserInfo({}),t.setToken(""),Ob.push("/login")},700)),e.data.status===400)throw $s({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),$s({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Qce(e){return Oi.post("auth/login",e)}function ede(e){return Oi.get("user",e)}function xce(){return Oi.post("logout")}const dv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Mce=e=>(j4("data-v-28f3f43a"),e=e(),q4(),e),$ce={class:"my-card"},Tce={class:"card-header"},Oce=Mce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Ace={class:"card-body"},Nce={class:"el-dropdown-link"},Rce={class:"info"},Ice={style:{"margin-left":"0.3rem"}},Pce={__name:"myHeader",setup(e){const t=rv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=ob(),a=()=>{xce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{$s({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ze("el-image"),c=Ze("el-avatar"),f=Ze("arrow-down"),d=Ze("el-icon"),p=Ze("el-dropdown-item"),h=Ze("el-dropdown-menu"),m=Ze("el-dropdown");return _(),M("div",$ce,[k("div",Tce,[W(u,{style:{height:"3rem",width:"3rem"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"}),Oce]),k("div",Ace,[W(m,{trigger:"hover"},{dropdown:X(()=>[W(h,null,{default:X(()=>[W(p,{onClick:a},{default:X(()=>[gt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",Nce,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Rce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Ice,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:X(()=>[W(f)]),_:1})])]),_:1})])])}}},Lce=dv(Pce,[["__scopeId","data-v-28f3f43a"]]);function Vce(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(r){r(n)}),(o=e.get("*"))&&o.slice().map(function(r){r(t,n)})}}}const qn=Vce(),md=e=>(j4("data-v-72bc38cb"),e=e(),q4(),e),Bce={class:"my-card"},zce=md(()=>k("div",null,"收银",-1)),Hce=md(()=>k("div",null,"订单",-1)),Dce=md(()=>k("div",null,"核销",-1)),Fce=md(()=>k("div",null,"商品",-1)),Kce={__name:"myAside",setup(e){const t=ob(),n=tue(),o=s=>{t.push({name:s})},r=P(["home","order","convert","shop"]),a=()=>{let s=r.value.indexOf(n.name);s>0&&o(r.value[s-1])},l=()=>{let s=r.value.indexOf(n.name);s{qn.on("up",a),qn.on("down",l)}),zo(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Ze("Sell"),f=Ze("el-icon"),d=Ze("DataLine"),p=Ze("FullScreen"),h=Ze("ShoppingBag");return _(),M("div",Bce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:u[0]||(u[0]=m=>o("home"))},[W(f,{size:"30"},{default:X(()=>[W(c)]),_:1}),zce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:u[1]||(u[1]=m=>o("order"))},[W(f,{size:"30"},{default:X(()=>[W(d)]),_:1}),Hce],2),k("div",{class:T(["list-item",{active:i(n).name=="convert"}]),onClick:u[2]||(u[2]=m=>o("convert"))},[W(f,{size:"30"},{default:X(()=>[W(p)]),_:1}),Dce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:u[3]||(u[3]=m=>o("shop"))},[W(f,{size:"30"},{default:X(()=>[W(h)]),_:1}),Fce],2)])}}},Wce=dv(Kce,[["__scopeId","data-v-72bc38cb"]]),jce={class:"common-layout"},qce={__name:"index",setup(e){const t=n=>{console.log("按下",n.keyCode),n.keyCode==16&&qn.emit("shift"),n.keyCode==120&&qn.emit("F9"),n.keyCode==13&&qn.emit("enter"),n.keyCode==37&&qn.emit("left"),n.keyCode==39&&qn.emit("right"),n.keyCode==38&&qn.emit("up"),n.keyCode==40&&qn.emit("down"),n.keyCode==46&&qn.emit("delete"),n.keyCode==45&&qn.emit("insert")};return et(()=>{window.addEventListener("keydown",t),console.log("开启键盘监听")}),zo(()=>{window.removeEventListener("keydown",t),console.log("关闭键盘监听")}),(n,o)=>{const r=Ze("el-header"),a=Ze("el-aside"),l=Ze("router-view"),s=Ze("el-main"),u=Ze("el-container");return _(),M("div",jce,[W(u,null,{default:X(()=>[W(r,null,{default:X(()=>[W(Lce)]),_:1}),W(u,null,{default:X(()=>[W(a,{width:"100px"},{default:X(()=>[W(Wce)]),_:1}),W(s,null,{default:X(()=>[W(l,{class:"my-main"},{default:X(({Component:c})=>[W(tn,{name:"el-zoom-in-top"},{default:X(()=>[(_(),le(it(c)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Uce=dv(qce,[["__scopeId","data-v-64ddf17e"]]),Yce=[{path:"/",name:"layout",component:Uce,redirect:"/home",children:[{path:"/home",name:"home",component:()=>ia(()=>import("./index-hLlMBiY0.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/order",name:"order",component:()=>ia(()=>import("./index-0RwqannG.js"),__vite__mapDeps([6,1,2,3,7]),import.meta.url)},{path:"/orderList",name:"orderList",component:()=>ia(()=>import("./indexList-XCr1z72_.js"),__vite__mapDeps([8,1,2,9]),import.meta.url)},{path:"/shop",name:"shop",component:()=>ia(()=>import("./index-Cws__d6J.js"),__vite__mapDeps([10,4,11]),import.meta.url)},{path:"/convert",name:"convert",component:()=>ia(()=>import("./index-CBQTGiyO.js"),__vite__mapDeps([12,1,2,3,13]),import.meta.url)}]},{path:"/login",name:"login",component:()=>ia(()=>import("./index-CN6ikDMs.js"),__vite__mapDeps([14,15]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>ia(()=>import("./index-DDvDLgtg.js"),__vite__mapDeps([]),import.meta.url)}],Tb=Qie({history:$ie(),routes:Yce});Tb.beforeEach((e,t,n)=>{const o=rv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ob=Tb,Ai=Og(Z5);for(const[e,t]of Object.entries(ML))Ai.component(e,t);const Gce=oue();Ai.use(Ob);Ai.use(Gce);Ai.use(Use,{locale:Yse});Ai.mount("#app");export{lr as A,tue as B,ob as C,Oi as D,$s as E,Ke as F,bt as G,y2 as H,S as I,Qce as J,ede as K,dv as _,zo as a,Ze as b,_ as c,le as d,k as e,W as f,gt as g,M as h,ht as i,br as j,wr as k,Ec as l,qn as m,We as n,et as o,Mt as p,i as q,P as r,T as s,Te as t,rv as u,tt as v,X as w,ne as x,j4 as y,q4 as z}; diff --git a/dist/assets/index-CBQTGiyO.js b/dist/assets/index-CBQTGiyO.js new file mode 100644 index 0000000..bdd6901 --- /dev/null +++ b/dist/assets/index-CBQTGiyO.js @@ -0,0 +1 @@ +import{_ as j,u as J,r as a,b as w,l as M,c as t,h as s,e,f as l,w as p,g as $,p as Q,v as S,F as T,i as H,x as n,E as P,m as U,s as z,t as c,d as q,y as W,z as X,C as Y,o as Z,n as G,G as O,H as ee}from"./index-BpXYCW1n.js";import{v as te,p as se,f as oe,h as ie}from"./pay-EEWGeT4Q.js";import{p as ae}from"./padding-CLyithQn.js";const ne=y=>(W("data-v-aaa26790"),y=y(),X(),y),le={class:"my-order"},ce={class:"header-nav"},de=ne(()=>e("div",{class:"nav-item"},"核销订单",-1)),re={class:"nav-item-clear"},_e={class:"header-input"},ue={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500","infinite-scroll-immediate":"false",style:{overflow:"auto"}},ve=["onClick"],pe={class:"top"},fe={class:"create-time"},he={class:"shop"},me={key:0,class:"left"},ye={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},Ce={class:"pay"},Ve={key:0},we={key:0},xe={key:1},Se={key:2},Ie={key:3},Re={key:4},Le={key:5},Pe={key:6},Ae={key:1,style:{color:"#ff4a00"}},Ee={key:0,class:"cashier"},Oe={key:1,class:"cashier"},Ue={key:0,class:"load-end"},ze={key:1,class:"load-end"},Be={__name:"order",emits:["backOne"],setup(y,{expose:k,emit:x}){const I=J();a([]);const o=a(1);a(null);const v=a({page:1,limit:20,search_info:""}),g=a(!1);a(0);const h=a(0),m=a(!1),b=a([]),C=(r=!1)=>{if(!v.value.search_info)return P.error("请输入订单编号");if(r)v.value.page=1;else if(m.value||g.value)return;g.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),b.value=[],U.emit("set-order-detail",{}),te(I.userInfo.service.mer_id,v.value.search_info).then(d=>{b.value=[d.data],U.emit("set-order-detail",b.value[0]),g.value=!1}).catch(d=>{m.value=!0,g.value=!1})},B=(r,d)=>{h.value=d,U.emit("set-order-detail",r)},D=r=>{v.value.search_info=r,C(!0)},A=x,K=()=>{A("backOne")};return k({setCode:D}),(r,d)=>{const u=w("el-button"),E=w("el-input"),N=w("el-image"),F=M("loading"),R=M("infinite-scroll");return t(),s("div",le,[e("div",ce,[de,e("div",re,[l(u,{type:"primary",size:"small",onClick:K},{default:p(()=>[$("返回上一页")]),_:1})])]),e("div",_e,[l(E,{modelValue:v.value.search_info,"onUpdate:modelValue":d[1]||(d[1]=i=>v.value.search_info=i),placeholder:"请输入订单编号",onKeydown:d[2]||(d[2]=Q(i=>C(!0),["enter"])),clearable:""},{append:p(()=>[l(u,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:d[0]||(d[0]=i=>C(!0))},{default:p(()=>[$("搜索")]),_:1})]),_:1},8,["modelValue"])]),S((t(),s("div",ue,[(t(!0),s(T,null,H(b.value,(i,L)=>(t(),s("div",{class:z(["item",{"item-active":h.value==L}]),key:L,onClick:_=>B(i,L)},[e("div",pe,[e("div",{class:z(["sn",i.pay_type===11||i.pay_type===12||i.pay_type===13?"cahier":"cahier2"])},"单号: "+c(i.order_sn),3),e("div",fe,c(i.create_time),1)]),e("div",he,[i.orderProduct?(t(),s("div",me,[(t(!0),s(T,null,H(i.orderProduct.slice(0,5),(_,V)=>(t(),q(N,{key:V,src:_.cart_info.productAttr.image||_.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),i.orderProduct.length==1?(t(),s("div",ye,c(i.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",ke,[e("div",ge,"¥"+c(i.pay_price),1),e("div",$e,"共"+c(i.total_num)+"件商品",1)])]),e("div",be,[e("div",Ce,[i.paid?(t(),s("div",Ve,[$(" 已支付 "),i.pay_type==13?(t(),s("span",we,"(支付宝收款)")):n("",!0),i.pay_type==12?(t(),s("span",xe,"(现金支付)")):n("",!0),i.pay_type==11?(t(),s("span",Se,"(微信收款)")):n("",!0),i.pay_type==0?(t(),s("span",Ie,"(余额支付)")):n("",!0),i.pay_type==1?(t(),s("span",Re,"(微信支付)")):n("",!0),i.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):n("",!0),i.pay_type==10?(t(),s("span",Pe,"(对公转账)")):n("",!0)])):(t(),s("div",Ae,"未支付"))]),i.service_info?(t(),s("div",Ee,"收银员: "+c(i.service_info.nickname),1)):(t(),s("div",Oe,"平台订单"))])],10,ve))),128)),m.value?(t(),s("div",Ue,"没有更多了")):n("",!0),g.value?(t(),s("div",ze,"加载中...")):n("",!0)])),[[F,g.value],[R,C]])])}}},De=j(Be,[["__scopeId","data-v-aaa26790"]]),f=y=>(W("data-v-a4ec55f6"),y=y(),X(),y),Ke={class:"my-order"},Ne={class:"header-nav"},Fe=["onClick"],Me={class:"detail"},Te={key:0,class:"table"},He={style:{"font-size":"0.9rem"}},qe={style:{color:"#ff4a00"}},Ge={style:{display:"flex","align-items":"center"}},je={style:{"margin-left":"0.5rem"}},Je={key:1,class:"table"},Qe=f(()=>e("div",{class:"table-title"},"订单信息",-1)),We={class:"table-info"},Xe={class:"info-item"},Ye=f(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=f(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=f(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),at={class:"info-item-info"},nt={class:"info-item"},lt=f(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},rt=f(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),_t={class:"info-item-info"},ut={class:"info-item"},vt=f(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),pt={class:"info-item-info"},ft={class:"info-item"},ht=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),mt={class:"info-item-info"},yt={key:0},kt={key:1},gt={key:2},$t={key:3},bt={key:4},Ct={key:5},Vt={key:6},wt={key:0,class:"table-title"},xt={key:1,class:"table-info",style:{"flex-direction":"column"}},St={class:"info-item"},It=f(()=>e("div",{class:"info-item-title"},"头像:",-1)),Rt={class:"info-item-info"},Lt={class:"info-item"},Pt=f(()=>e("div",{class:"info-item-title"},"昵称:",-1)),At={class:"info-item-info"},Et={class:"info-item"},Ot=f(()=>e("div",{class:"info-item-title"},"账号:",-1)),Ut={class:"info-item-info"},zt={class:"footer"},Bt={class:"info"},Dt={class:"price"},Kt={key:0,class:"handle"},Nt={key:1,class:"handle"},Ft=f(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Mt={class:"dialog-footer"},Tt={__name:"detail",emits:["reInit"],setup(y,{emit:k}){const x=J(),I=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r}),a([]);const v=a(null),g=a(!1);a(0);const h=a(0),m=a(["商品信息","订单详情"]),b=a(""),C=a(!1),B=()=>{C.value=!1,oe({order_sn:b.value}).then(r=>{P({message:r.message,type:"success"}),I.push({name:"home"})})},D=k,A=a(null),K=()=>{let r={data:[],verify_code:o.value.verify_code};A.value.getSelectionRows().forEach(u=>{r.data.push({id:u.order_product_id,num:u.product_num})}),ie(x.userInfo.service.mer_id,o.value.order_id,r).then(u=>{P.success(u.message),D("reInit")}).catch(u=>{P.error(u.message)})};return(r,d)=>{const u=w("el-table-column"),E=w("el-image"),N=w("el-input-number"),F=w("el-table"),R=w("el-button"),i=w("el-dialog"),L=M("loading");return t(),s("div",Ke,[e("div",Ne,[(t(!0),s(T,null,H(m.value,(_,V)=>(t(),s("div",{key:V,class:z(["nav-item",{"nav-item-active":h.value==V,"nav-item-radius1":h.value==V+1,"nav-item-radius2":h.value==V-1}]),onClick:Qt=>h.value=V},c(_),11,Fe))),128)),e("div",{class:z(["nav-item",{"nav-item-radius2":h.value==m.value.length-1}]),style:{flex:"1"}},null,2)]),S((t(),s("div",Me,[o.value.orderProduct&&h.value==0?(t(),s("div",Te,[e("div",He,[$(" 共计 "),e("span",qe,c(o.value.total_num),1),$(" 件商品 ")]),l(F,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct,ref_key:"tableRef",ref:A},{default:p(()=>[l(u,{type:"selection",width:"55"}),l(u,{prop:"cart_info.product.store_name",label:"商品信息"},{default:p(({row:_})=>[e("div",Ge,[l(E,{style:{height:"3rem",width:"3rem"},src:_.cart_info.productAttr.image||_.cart_info.product.image},null,8,["src"]),e("span",je,c(_.cart_info.product.store_name),1)])]),_:1}),l(u,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),l(u,{prop:"product_num",label:"数量",width:"180"},{default:p(({row:_})=>[l(N,{modelValue:_.product_num,"onUpdate:modelValue":V=>_.product_num=V,"step-strictly":"",max:_.refund_num,min:1,step:1,size:"small"},null,8,["modelValue","onUpdate:modelValue","max"])]),_:1}),l(u,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&h.value==1?(t(),s("div",Je,[Qe,e("div",We,[e("div",Xe,[Ye,e("div",Ze,c(o.value.create_time),1)]),e("div",et,[tt,e("div",st,c(o.value.total_num),1)]),e("div",ot,[it,e("div",at,"¥"+c(o.value.total_price),1)]),e("div",nt,[lt,e("div",ct,c(o.value.pay_time),1)]),e("div",dt,[rt,e("div",_t,"¥"+c(o.value.deduction_price),1)]),e("div",ut,[vt,e("div",pt,"¥"+c(o.value.pay_price),1)]),e("div",ft,[ht,e("div",mt,[o.value.pay_type==11?(t(),s("span",yt,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",kt,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",$t,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",bt,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",Ct,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",Vt,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",wt,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",xt,[e("div",St,[It,e("div",Rt,[l(E,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Lt,[Pt,e("div",At,c(o.value.service_info.nickname),1)]),e("div",Et,[Ot,e("div",Ut,c(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),e("div",zt,[e("div",Bt,[e("div",Dt,[$(" 实付: "),e("span",null,"¥"+c(o.value.pay_price),1)])]),o.value.verify_status==0?(t(),s("div",Kt,[l(R,{class:"btn",type:"warning",onClick:K},{default:p(()=>[$("核销")]),_:1})])):(t(),s("div",Nt,"已支付"))])])),[[L,g.value]]),l(se,{ref_key:"payRef",ref:v},null,512),l(i,{modelValue:C.value,"onUpdate:modelValue":d[1]||(d[1]=_=>C.value=_),title:"提示",width:"500"},{footer:p(()=>[e("div",Mt,[l(R,{onClick:d[0]||(d[0]=_=>C.value=!1)},{default:p(()=>[$("取消")]),_:1}),r.cartCount>0?(t(),q(R,{key:0,onClick:r.goHome},{default:p(()=>[$(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),q(R,{key:1,type:"primary",onClick:B},{default:p(()=>[$(" 确认提单 ")]),_:1}))])]),default:p(()=>[Ft]),_:1},8,["modelValue"])])}}},Ht=j(Tt,[["__scopeId","data-v-a4ec55f6"]]),qt={class:"my-card"},Gt={class:"my-code"},jt=e("h2",null,"订单核销",-1),Jt={class:"box"},Zt={__name:"index",setup(y){const k=a(1),x=a(""),I=a(null),o=a(null),v=()=>{if(x.value=="")return P.error("请输入订单编号");k.value=2,G(()=>{o.value.setCode(x.value)})},g=()=>{v()};return Z(()=>{G(()=>{I.value.focus()})}),(h,m)=>(t(),s("div",qt,[S(e("div",Gt,[jt,e("div",Jt,[S(e("input",{ref_key:"inputRef",ref:I,"onUpdate:modelValue":m[0]||(m[0]=b=>x.value=b),placeholder:"",class:"input",onKeyup:Q(v,["enter"])},null,544),[[ee,x.value]]),e("div",{class:"btn",onClick:v},"查询")])],512),[[O,k.value==1]]),S(l(De,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:o,onBackOne:m[1]||(m[1]=b=>k.value=1)},null,512),[[O,k.value==2]]),S(l(ae,null,null,512),[[O,k.value==2]]),S(l(Ht,{ref:"detailRef",onReInit:g},null,512),[[O,k.value==2]])]))}};export{Zt as default}; diff --git a/dist/assets/index-CInbkgrA.js b/dist/assets/index-CInbkgrA.js deleted file mode 100644 index 03a1df7..0000000 --- a/dist/assets/index-CInbkgrA.js +++ /dev/null @@ -1 +0,0 @@ -import{c as ce,a as ie,b as Q,p as re,d as ue,o as de}from"./pay-DFmO-d88.js";import{_ as B,r as c,o as q,m as k,a as M,b as f,c as b,d as T,w as $,e,f as n,g as h,t as L,n as X,E as W,u as Y,h as R,F as G,i as J,j as Z,k as _e,l as ee,p as te,q as oe,s as se,v as ae,x as pe,y as ve}from"./index-3-ddzq9I.js";import{p as fe}from"./padding-5Tza0aT3.js";import{g as me,s as he}from"./shop-BCVM-Dnd.js";const ge={class:"price"},ye={class:"flex"},ke={style:{margin:"10px","padding-bottom":"40px"}},be={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},$e={class:"dialog-footer"},we={__name:"price",emits:["changeAllPrice"],setup(V,{expose:A,emit:y}){const a=c(!1),r=c(null),o=c(0),u=(d=!0,v=0)=>{l.value.nowPrice="",l.value.percentage="",a.value=d,o.value=v,X(()=>{setTimeout(()=>{var P;(P=r.value)==null||P.focus()},150)})},l=c({nowPrice:"",percentage:""}),m=d=>{l.value.percentage=(d/o.value*100).toFixed(2)},x=d=>{l.value.nowPrice=(o.value*d/100).toFixed(2)},S=y,I=()=>{if(l.value.percentage>100)return l.value.nowPrice="",l.value.percentage="",W.error("改价金额不能大于当前订单金额");if(l.value.nowPrice<=0)return l.value.nowPrice="",l.value.percentage="",W.error("金额不能小于0");S("changeAllPrice",l.value.nowPrice)};A({show:u,dialogVisible:a});const F=()=>{a.value&&I()};return q(()=>{k.on("enter",F)}),M(()=>{k.off("enter",F)}),(d,v)=>{const P=f("el-input"),D=f("el-button"),_=f("el-dialog");return b(),T(_,{modelValue:a.value,"onUpdate:modelValue":v[2]||(v[2]=p=>a.value=p),title:"订单改价",width:"650"},{footer:$(()=>[e("div",$e,[n(D,{class:"ok-btn",type:"primary",onClick:I},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),default:$(()=>[e("div",ge,[e("div",ye,[n(P,{ref_key:"priceRef",ref:r,style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:l.value.nowPrice,"onUpdate:modelValue":v[0]||(v[0]=p=>l.value.nowPrice=p),type:"number",placeholder:"请输入改价后的价格",onInput:m},{suffix:$(()=>[h("元")]),_:1},8,["modelValue"]),n(P,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:l.value.percentage,"onUpdate:modelValue":v[1]||(v[1]=p=>l.value.percentage=p),type:"number",placeholder:"请输入比例",onInput:x},{suffix:$(()=>[h("%")]),_:1},8,["modelValue"])]),e("div",ke,[h(" 改价后金额: "),e("span",be,"¥"+L(l.value.nowPrice||o.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},xe=B(we,[["__scopeId","data-v-5c8bcd20"]]),Ie={class:"my-order"},Pe={class:"header-nav"},Ce={class:"nav-item"},Ve={class:"order-list"},Ae={class:"order-item-info"},Se={class:"order-item-title"},Fe={class:"title"},Le=["onClick"],Re={class:"order-item-sku"},Ee=["onClick"],De={class:"order-item-price"},Ue={class:"order-footer"},ze={class:"order-total"},Oe={class:"price"},qe={class:"total-item"},Me={style:{"font-size":"1.4rem"}},Ne={class:"total-item"},Be={class:"update-price"},je={class:"order-btn"},Te={__name:"order",emits:["goPay","editAttr"],setup(V,{expose:A,emit:y}){const a=c([]),r=c(0),o=c(0),u=c(0),l=Y(),m=()=>{let t=[];a.value.map(i=>{t.push(i.cart_id)}),t.length!=0&&S(t)},x=t=>{a.value=a.value.filter(i=>i.cart_id!=t),S([t])},S=t=>{ce({cart_id:t}).then(i=>{console.log(i),I()})},I=()=>{r.value=0,o.value=0,u.value=0,ie({staff_id:l.userInfo.service.service_id}).then(t=>{var i,w;((w=(i=t.data)==null?void 0:i.list)==null?void 0:w.length)>0?(a.value=t.data.list[0].list,a.value.forEach(C=>{r.value+=C.productAttr.price*C.cart_num}),o.value=r.value):a.value=[]})};I();const F=y,d=()=>{F("goPay")},v=(t,i)=>{Q(t.cart_id,{cart_num:t.cart_num}).then(w=>{r.value=0,a.value.forEach(C=>{r.value+=C.productAttr.price*C.cart_num}),o.value=r.value})},P=t=>{F("editPupop",t)},D=(t,i)=>{Q(t,i).then(w=>{I()})},_=t=>{u.value=o.value-t,r.value=+t,g(!1)};c(0);const p=c(null),g=(t=!0)=>{p.value.show(t,o.value)};A({getList:I,list:a,editItem:D,discounts:u,allPrice:r});const U=()=>{p.value.dialogVisible?p.value.dialogVisible=!1:g()},s=()=>{a.value.length>0&&m()};return q(()=>{k.on("insert",U),k.on("delete",s)}),M(()=>{k.off("insert",U),k.off("delete",s)}),(t,i)=>{const w=f("Delete"),C=f("el-icon"),O=f("el-empty"),z=f("el-image"),j=f("ArrowDown"),K=f("el-input-number"),H=f("el-button");return b(),R("div",Ie,[e("div",Pe,[e("div",Ce,[h(" 已选购 "),e("span",null,L(a.value.length),1),h(" 件 ")]),e("div",{class:"nav-item-clear",onClick:m},[n(C,null,{default:$(()=>[n(w)]),_:1}),h("清空 (Delete) ")])]),e("div",Ve,[a.value.length==0?(b(),T(O,{key:0,description:"请点击右侧添加商品"})):(b(!0),R(G,{key:1},J(a.value,(E,ne)=>(b(),R("div",{class:"order-item",key:ne},[n(z,{loading:"lazy",class:"order-item-img",src:E.productAttr&&E.productAttr.image||E.product.image},null,8,["src"]),e("div",Ae,[e("div",Se,[e("div",Fe,L(E.spu.store_name),1),e("div",{class:"delete",onClick:N=>x(E.cart_id)},"删除",8,Le)]),e("div",Re,[e("span",{style:{display:"flex","align-items":"center"},onClick:N=>P(E)},[h("商品规格: "+L(E.productAttr.sku||"默认规格"),1),n(C,{size:"16",style:{"margin-left":"0.2rem"}},{default:$(()=>[n(j)]),_:1})],8,Ee)]),e("div",De,[e("div",null,[h(" ¥"),e("span",null,L(E.productAttr.price),1)]),e("div",null,[n(K,{modelValue:E.cart_num,"onUpdate:modelValue":N=>E.cart_num=N,"step-strictly":"",min:1,step:1,onChange:N=>v(E)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Ue,[e("div",ze,[e("div",Oe,[e("div",qe,[h(" 实付: "),e("span",null,[h("¥"),e("span",Me,L(r.value.toFixed(2)),1)])]),e("div",Ne,[h(" 优惠: "),e("span",null,[h("¥"),e("span",null,L(u.value.toFixed(2)),1)])])]),e("div",Be,[n(H,{class:"btn",type:"primary",onClick:g},{default:$(()=>[h("改价 (Insert)")]),_:1})])]),e("div",je,[n(H,{class:"btn",type:"primary",onClick:d,disabled:a.value.length==0},{default:$(()=>[h("立即结账 (F9)")]),_:1},8,["disabled"])])]),n(xe,{ref_key:"priceRef",ref:p,onChangeAllPrice:_},null,512)])}}},Ge=B(Te,[["__scopeId","data-v-5637c3c3"]]),le=V=>(se("data-v-88a3f0f9"),V=V(),ae(),V),Je={class:"my-order"},Ke=le(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),He={class:"nav-item-input"},Qe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500",style:{overflow:"auto"}},We=["onClick"],Xe={class:"shop-name"},Ye={class:"shop-price"},Ze={key:0,class:"no-stock"},et=le(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),tt=[et],ot={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(V,{expose:A,emit:y}){const a=c(null),r=y,o=c(""),u=()=>{r("loadMore",{bar_code:o.value})},l=d=>{r("changeItem",d)},m=()=>{r("getStoreList",{bar_code:o.value},!0)};A({bar_code:o});const x=c(!1),S=()=>{x.value=!0},I=()=>{x.value=!1},F=()=>{var d;(d=a.value)==null||d.focus()};return q(()=>{X(()=>{var d;(d=a.value)==null||d.focus(),S()}),k.on("shift",F)}),M(()=>{k.off("shift",F)}),(d,v)=>{const P=f("el-input"),D=f("Search"),_=f("el-icon"),p=f("el-button"),g=f("el-image"),U=f("el-space"),s=Z("infinite-scroll");return b(),R("div",Je,[e("div",{class:ee(["header-nav",{"input-focus":x.value}])},[Ke,e("div",He,[n(P,{modelValue:o.value,"onUpdate:modelValue":v[0]||(v[0]=t=>o.value=t),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:a,onFocus:S,onBlur:I,onKeyup:_e(m,["enter"]),onClear:m},null,8,["modelValue"])]),e("div",{class:"nav-item-btn",onClick:m},[n(p,{class:"btn",type:"primary"},{default:$(()=>[n(_,null,{default:$(()=>[n(D)]),_:1})]),_:1})])],2),te((b(),R("div",Qe,[n(U,{wrap:"",size:20},{default:$(()=>[(b(!0),R(G,null,J(V.storeList,(t,i)=>(b(),R("div",{class:"shop-item",key:i,onClick:w=>l(t)},[n(g,{loading:"lazy",src:t.image},null,8,["src"]),e("div",Xe,L(t.store_name),1),e("div",Ye,[h(" ¥"),e("span",null,L(t.price),1)]),t.stock==0?(b(),R("div",Ze,tt)):oe("",!0)],8,We))),128))]),_:1})])),[[s,u]])])}}},st=B(ot,[["__scopeId","data-v-88a3f0f9"]]),at=V=>(se("data-v-52f45b9b"),V=V(),ae(),V),lt={class:"shop"},nt={key:0,class:"shop-info"},ct={class:"shop-info-left"},it={class:"shop-info-right"},rt={class:"shop-info-right-top"},ut={class:"shop-info-right-center"},dt={class:"shop-info-right-price"},_t={class:"shop-sku"},pt=at(()=>e("div",{class:"title"},"产品",-1)),vt={class:"sku"},ft=["onClick"],mt={class:"dialog-footer"},ht={__name:"pupop",emits:["changeItem"],setup(V,{expose:A,emit:y}){const a=c(!1),r=_=>{a.value=_},o=c({}),u=c(null),l=c(!1),m=c("add"),x=c({}),S=(_,p="add")=>{m.value=p,p=="add"?(o.value=_,u.value=_.attr[0]):(l.value=!0,x.value=_,me(_.product_id).then(g=>{g.data.attrValue=JSON.parse(JSON.stringify(g.data.attr)),g.data.attr=Object.keys(g.data.sku),o.value=g.data,u.value=g.data.attr[0],l.value=!1}).catch(g=>{l.value=!1}))},I=y,F=()=>{m.value=="add"?I("changeItem",o.value,u.value):I("editItem",x.value.cart_id,{cart_num:x.value.cart_num,product_attr_unique:o.value.sku[u.value].unique}),a.value=!1},d=_=>{u.value=_};A({show:r,setForm:S});const v=()=>{if(!a.value)return;let _=o.value.attr.indexOf(u.value);if(_>0)return d(o.value.attr[_-1])},P=()=>{if(!a.value)return;let _=o.value.attr.indexOf(u.value);if(_{a.value&&F()};return q(()=>{k.on("left",v),k.on("right",P),k.on("enter",D)}),M(()=>{k.off("left",v),k.off("right",P),k.off("enter",D)}),(_,p)=>{const g=f("el-image"),U=f("el-space"),s=f("el-button"),t=f("el-dialog"),i=Z("loading");return b(),T(t,{modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=w=>a.value=w),title:"商品规格",width:"650"},pe({default:$(()=>{var w,C,O;return[te((b(),R("div",lt,[o.value.sku?(b(),R("div",nt,[e("div",ct,[n(g,{loading:"lazy",src:((w=o.value.sku[u.value])==null?void 0:w.image)||o.value.image},null,8,["src"])]),e("div",it,[e("div",rt,L(o.value.store_name),1),e("div",ut,"库存"+L(((C=o.value.sku[u.value])==null?void 0:C.stock)||0),1),e("div",dt,[h("¥"),e("span",null,L(((O=o.value.sku[u.value])==null?void 0:O.price)||o.value.price),1)])])])):oe("",!0),e("div",_t,[pt,e("div",vt,[n(U,{wrap:"",size:20},{default:$(()=>[(b(!0),R(G,null,J(o.value.attr,(z,j)=>(b(),R("div",{class:ee(["sku-item",{"sku-item_active":u.value==z}]),onClick:K=>d(z),key:j},L(z||"默认规格"),11,ft))),128))]),_:1})])])])),[[i,l.value]])]}),_:2},[m.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:$(()=>[e("div",mt,[n(s,{class:"ok-btn",type:"primary",onClick:F},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},gt=B(ht,[["__scopeId","data-v-52f45b9b"]]),yt={class:"my-card"},xt={__name:"index",setup(V){const A=c(null),y=c(null),a=c(null),r=c(null),o=c([]),u=Y(),l=ve(),m=c({page:0,limit:30}),x=(s={},t=!1)=>{m.value={staff_id:u.userInfo.service.service_id,...m.value,...s},t&&(o.value=[],m.value.page=1,S.value=!1),he(u.userInfo.service.mer_id,m.value).then(i=>{var C,O;((O=(C=i.data)==null?void 0:C.list)==null?void 0:O.length)(z.attr=Object.keys(z.sku),z));o.value=o.value.concat(w),s.bar_code&&o.value.length==1&&F(s.bar_code)&&(a.value.bar_code="",v(o.value[0],o.value[0].attr[0]))})},S=c(!1),I=s=>{S.value||(m.value.page++,x(s))};function F(s){return/^\d+$/.test(s)}const d=(s,t="")=>{let i={is_new:0,product_id:s.product_id,cart_num:1,product_attr_unique:s.sku[t]!==void 0?s.sku[t].unique:"",staff_id:u.userInfo.service.service_id,product_type:0};ue(i).then(w=>{y.value.getList()})},v=(s,t)=>{if(!s.attr||s.attr.length==0||s.attr.length==1)return d(s,s.attr[0]?s.attr[0]:"");if(t)return d(s,t);A.value.setForm(s,"add"),A.value.show(!0)},P=(s,t)=>{y.value.editItem(s,t)},D=s=>{A.value.setForm(s,"edit"),A.value.show(!0)},_=()=>{let s=y.value.list.map(i=>i.cart_id),t={takes:[],use_coupon:{},use_integral:!1,cart_id:s};y.value.discounts>0&&(t.deduction_price=y.value.discounts.toFixed(2),t.pay_type="micropay"),de(t).then(i=>{r.value.setForm({data:i.data,cart_id:s})})},p=()=>{_(),r.value.drawer=!0},g=()=>{y.value.getList()},U=()=>{console.log("F9"),l.name=="home"&&(!r.value.drawer&&y.value.list.length>0?p():r.value.beforeClose())};return q(()=>{k.on("F9",U)}),M(()=>{k.off("F9",U)}),(s,t)=>(b(),R("div",yt,[n(Ge,{ref_key:"orderRef",ref:y,onGoPay:p,onEditPupop:D},null,512),n(fe),n(st,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:o.value,onGetStoreList:x,onChangeItem:v,onLoadMore:I},null,8,["storeList"]),n(gt,{ref_key:"pupopRef",ref:A,onChangeItem:v,onEditItem:P},null,512),n(re,{ref_key:"payRef",ref:r,onPaySuccess:g},null,512)]))}};export{xt as default}; diff --git a/dist/assets/index-CDZ2C3w9.js b/dist/assets/index-CN6ikDMs.js similarity index 55% rename from dist/assets/index-CDZ2C3w9.js rename to dist/assets/index-CN6ikDMs.js index 99ffc22..ebdb16d 100644 --- a/dist/assets/index-CDZ2C3w9.js +++ b/dist/assets/index-CN6ikDMs.js @@ -1 +1 @@ -import{_ as U,u as I,r as u,o as R,b as n,c as S,h as b,e as w,f as e,w as t,k as v,g as L,s as B,v as C,z as E,E as d,G as K,H as N}from"./index-3-ddzq9I.js";const M=l=>(B("data-v-271611c3"),l=l(),C(),l),T={class:"body"},z={class:"login"},G=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),H={__name:"index",setup(l){const p=I(),y=E(),h=u(null),_=u(null),s=u({account:"",password:"",key:"",captchaVerification:"",code:""}),i=()=>{if(!s.value.account)return d({message:"请填写账号",type:"error"});if(!s.value.password)return d({message:"请填写密码",type:"error"});K(s.value).then(a=>{console.log(a),a.data&&(p.setToken(a.data.token),N().then(({data:o})=>{if(!o.service)return d({message:"请联系管理员开通服务",type:"error"});p.setUserInfo(o),y.push("/")}))}).catch(a=>{})};return R(()=>{}),(a,o)=>{const k=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),g=n("Lock"),V=n("el-button"),x=n("el-form");return S(),b("div",T,[w("div",z,[G,e(x,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[L("登录")]),_:1})]),_:1})]),_:1})])])}}},j=U(H,[["__scopeId","data-v-271611c3"]]);export{j as default}; +import{_ as U,u as I,r as u,o as R,b as n,c as S,h as b,e as w,f as e,w as t,p as v,g as C,y as K,z as L,C as B,E as d,J as E,K as N}from"./index-BpXYCW1n.js";const M=l=>(K("data-v-59a7e82c"),l=l(),L(),l),T={class:"body"},z={class:"login"},J=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__name:"index",setup(l){const p=I(),y=B(),h=u(null),_=u(null),s=u({account:"",password:"",key:"",captchaVerification:"",code:""}),i=()=>{if(!s.value.account)return d({message:"请填写账号",type:"error"});if(!s.value.password)return d({message:"请填写密码",type:"error"});E(s.value).then(a=>{console.log(a),a.data&&(p.setToken(a.data.token),N().then(({data:o})=>{if(!o.service)return d({message:"请联系管理员开通服务",type:"error"});p.setUserInfo(o),y.push("/")}))}).catch(a=>{})};return R(()=>{}),(a,o)=>{const g=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),k=n("Lock"),V=n("el-button"),x=n("el-form");return S(),b("div",T,[w("div",z,[J,e(x,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[C("登录")]),_:1})]),_:1})]),_:1})])])}}},q=U($,[["__scopeId","data-v-59a7e82c"]]);export{q as default}; diff --git a/dist/assets/index-DzelaVQG.css b/dist/assets/index-CUMIE358.css similarity index 59% rename from dist/assets/index-DzelaVQG.css rename to dist/assets/index-CUMIE358.css index c820ac3..f4ccf7f 100644 --- a/dist/assets/index-DzelaVQG.css +++ b/dist/assets/index-CUMIE358.css @@ -1 +1 @@ -@charset "UTF-8";.dialog-footer .ok-btn[data-v-5c8bcd20]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-5c8bcd20]{border-top:1px solid #eee;padding-top:1rem}.price .flex[data-v-5c8bcd20]{display:flex}.my-order[data-v-5637c3c3]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-5637c3c3]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:1px solid #eee}.my-order .header-nav span[data-v-5637c3c3]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-5637c3c3]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-5637c3c3]{height:calc(100vh - 100px - 14rem);overflow-y:auto}.my-order .order-list .order-item[data-v-5637c3c3]{display:flex;padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .order-item .order-item-img[data-v-5637c3c3]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-5637c3c3]{flex:1;box-sizing:border-box;padding-left:12px;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-5637c3c3]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-5637c3c3]{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-5637c3c3]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-5637c3c3]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-5637c3c3]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px 10px #eee}.my-order .order-footer .order-total[data-v-5637c3c3]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:1px solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-5637c3c3]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-5637c3c3]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-5637c3c3]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-5637c3c3]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-5637c3c3]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-5637c3c3]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-88a3f0f9]{height:100%;box-sizing:border-box;position:relative;overflow:hidden}.my-order .header-nav[data-v-88a3f0f9]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:1px solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-88a3f0f9]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-88a3f0f9]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-88a3f0f9]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-88a3f0f9] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-88a3f0f9]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-88a3f0f9]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-88a3f0f9]{border:1px solid #1890ff}.my-order .shop-list[data-v-88a3f0f9]{height:calc(100vh - 100px - 3.1rem);width:auto;overflow-y:auto;box-sizing:border-box;padding-top:20px}.my-order .shop-list .shop-item[data-v-88a3f0f9]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-88a3f0f9]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-88a3f0f9]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-88a3f0f9]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-88a3f0f9]{font-size:1.2rem;margin-left:3px}.my-order .shop-list .shop-item[data-v-88a3f0f9]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-88a3f0f9]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-88a3f0f9]{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-88a3f0f9]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-52f45b9b]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-52f45b9b]{border-top:1px solid #eee;padding-top:1rem}.shop .shop-info[data-v-52f45b9b]{display:flex}.shop .shop-info .shop-info-left[data-v-52f45b9b]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-52f45b9b]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-52f45b9b]{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-52f45b9b]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-52f45b9b]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-52f45b9b]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-52f45b9b]{min-height:20rem}.shop .shop-sku .title[data-v-52f45b9b]{font-size:1.1rem;font-weight:700;padding:1rem 0 .5rem}.shop .shop-sku .sku .sku-item[data-v-52f45b9b]{cursor:pointer;padding:.5rem 1rem;background-color:#f5f5f5;border-radius:3rem}.shop .shop-sku .sku .sku-item_active[data-v-52f45b9b]{background-color:#1890ff;color:#fff}.my-card{display:flex}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:20px 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.dialog-footer .ok-btn[data-v-5c8bcd20]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-5c8bcd20]{border-top:1px solid #eee;padding-top:1rem}.price .flex[data-v-5c8bcd20]{display:flex}.my-order[data-v-08d90ace]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-08d90ace]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:1px solid #eee}.my-order .header-nav span[data-v-08d90ace]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-08d90ace]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-08d90ace]{height:calc(100vh - 100px - 14rem);overflow-y:auto}.my-order .order-list .order-item[data-v-08d90ace]{display:flex;padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .order-item .order-item-img[data-v-08d90ace]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-08d90ace]{flex:1;box-sizing:border-box;padding-left:12px;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-08d90ace]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-08d90ace]{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-08d90ace]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-08d90ace]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-08d90ace]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px 10px #eee}.my-order .order-footer .order-total[data-v-08d90ace]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:1px solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-08d90ace]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-08d90ace]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-08d90ace]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-08d90ace]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-08d90ace]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-08d90ace]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-f63718c9]{height:100%;box-sizing:border-box;position:relative;overflow:hidden}.my-order .header-nav[data-v-f63718c9]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:1px solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-f63718c9]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-f63718c9]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-f63718c9]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-f63718c9] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-f63718c9]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-f63718c9]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-f63718c9]{border:1px solid #1890ff}.my-order .shop-list[data-v-f63718c9]{height:calc(100vh - 100px - 3.1rem);width:auto;overflow-y:auto;box-sizing:border-box;padding-top:20px}.my-order .shop-list .shop-item[data-v-f63718c9]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-f63718c9]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-f63718c9]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-f63718c9]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-f63718c9]{font-size:1.2rem;margin-left:3px}.my-order .shop-list .shop-item[data-v-f63718c9]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-f63718c9]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-f63718c9]{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-f63718c9]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-52f45b9b]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-52f45b9b]{border-top:1px solid #eee;padding-top:1rem}.shop .shop-info[data-v-52f45b9b]{display:flex}.shop .shop-info .shop-info-left[data-v-52f45b9b]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-52f45b9b]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-52f45b9b]{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-52f45b9b]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-52f45b9b]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-52f45b9b]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-52f45b9b]{min-height:20rem}.shop .shop-sku .title[data-v-52f45b9b]{font-size:1.1rem;font-weight:700;padding:1rem 0 .5rem}.shop .shop-sku .sku .sku-item[data-v-52f45b9b]{cursor:pointer;padding:.5rem 1rem;background-color:#f5f5f5;border-radius:3rem}.shop .shop-sku .sku .sku-item_active[data-v-52f45b9b]{background-color:#1890ff;color:#fff}.my-card{display:flex}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:20px 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/index-CWHs3HNs.js b/dist/assets/index-CWHs3HNs.js deleted file mode 100644 index ef909cc..0000000 --- a/dist/assets/index-CWHs3HNs.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as j,u as H,r as a,b,j as F,c as t,h as s,e,f as c,w as v,g as y,k as G,p as R,F as M,i as T,l as z,t as d,d as q,q as n,E as P,m as U,s as J,v as Q,z as W,o as X,n as O,B as E,C as Y}from"./index-3-ddzq9I.js";import{v as Z,p as ee,f as te,h as se}from"./pay-DFmO-d88.js";import{p as oe}from"./padding-5Tza0aT3.js";const ie=m=>(J("data-v-9936e733"),m=m(),Q(),m),ae={class:"my-order"},ne={class:"header-nav"},le=ie(()=>e("div",{class:"nav-item"},"核销订单",-1)),ce={class:"nav-item-clear"},de={class:"header-input"},_e={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500","infinite-scroll-immediate":"false",style:{overflow:"auto"}},re=["onClick"],ue={class:"top"},ve={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},he={key:0,class:"shop-name"},me={class:"right"},ye={class:"money"},ke={class:"count"},ge={class:"bottom"},$e={class:"pay"},be={key:0},Ce={key:0},Ve={key:1},we={key:2},Se={key:3},xe={key:4},Re={key:5},Le={key:6},Ie={key:1,style:{color:"#ff4a00"}},Pe={key:0,class:"cashier"},Ae={key:1,class:"cashier"},Ee={key:0,class:"load-end"},Ue={key:1,class:"load-end"},ze={__name:"order",setup(m,{expose:k}){const C=H();a([]);const o=a(1);a(null);const u=a({page:1,limit:20,search_info:""}),f=a(!1);a(0);const h=a(0),g=a(!1),V=a([]),$=(w=!1)=>{if(!u.value.search_info)return P.error("请输入订单编号");if(w)u.value.page=1;else if(g.value||f.value)return;f.value=!0,o.value==1&&(u.value.paid=null),o.value==2&&(u.value.paid=0),V.value=[],U.emit("set-order-detail",{}),Z(C.userInfo.service.mer_id,u.value.search_info).then(l=>{V.value=[l.data],U.emit("set-order-detail",V.value[0]),f.value=!1}).catch(l=>{g.value=!0,f.value=!1})},B=(w,l)=>{h.value=l,U.emit("set-order-detail",w)};return k({setCode:w=>{u.value.search_info=w,$(!0)}}),(w,l)=>{const S=b("el-button"),_=b("el-input"),A=b("el-image"),K=F("loading"),N=F("infinite-scroll");return t(),s("div",ae,[e("div",ne,[le,e("div",ce,[c(S,{type:"primary",size:"small"},{default:v(()=>[y("返回上一页")]),_:1})])]),e("div",de,[c(_,{modelValue:u.value.search_info,"onUpdate:modelValue":l[1]||(l[1]=i=>u.value.search_info=i),placeholder:"请输入订单编号",onKeydown:l[2]||(l[2]=G(i=>$(!0),["enter"])),clearable:""},{append:v(()=>[c(S,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:l[0]||(l[0]=i=>$(!0))},{default:v(()=>[y("搜索")]),_:1})]),_:1},8,["modelValue"])]),R((t(),s("div",_e,[(t(!0),s(M,null,T(V.value,(i,L)=>(t(),s("div",{class:z(["item",{"item-active":h.value==L}]),key:L,onClick:I=>B(i,L)},[e("div",ue,[e("div",{class:z(["sn",i.pay_type===11||i.pay_type===12||i.pay_type===13?"cahier":"cahier2"])},"单号: "+d(i.order_sn),3),e("div",ve,d(i.create_time),1)]),e("div",pe,[i.orderProduct?(t(),s("div",fe,[(t(!0),s(M,null,T(i.orderProduct.slice(0,5),(I,r)=>(t(),q(A,{key:r,src:I.cart_info.productAttr.image||I.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),i.orderProduct.length==1?(t(),s("div",he,d(i.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",me,[e("div",ye,"¥"+d(i.pay_price),1),e("div",ke,"共"+d(i.total_num)+"件商品",1)])]),e("div",ge,[e("div",$e,[i.paid?(t(),s("div",be,[y(" 已支付 "),i.pay_type==13?(t(),s("span",Ce,"(支付宝收款)")):n("",!0),i.pay_type==12?(t(),s("span",Ve,"(现金支付)")):n("",!0),i.pay_type==11?(t(),s("span",we,"(微信收款)")):n("",!0),i.pay_type==0?(t(),s("span",Se,"(余额支付)")):n("",!0),i.pay_type==1?(t(),s("span",xe,"(微信支付)")):n("",!0),i.pay_type==9?(t(),s("span",Re,"(商户余额支付)")):n("",!0),i.pay_type==10?(t(),s("span",Le,"(对公转账)")):n("",!0)])):(t(),s("div",Ie,"未支付"))]),i.service_info?(t(),s("div",Pe,"收银员: "+d(i.service_info.nickname),1)):(t(),s("div",Ae,"平台订单"))])],10,re))),128)),g.value?(t(),s("div",Ee,"没有更多了")):n("",!0),f.value?(t(),s("div",Ue,"加载中...")):n("",!0)])),[[K,f.value],[N,$]])])}}},Be=j(ze,[["__scopeId","data-v-9936e733"]]),p=m=>(J("data-v-e01cd4ad"),m=m(),Q(),m),De={class:"my-order"},Ke={class:"header-nav"},Ne=["onClick"],Fe={class:"detail"},Me={key:0,class:"table"},Te={style:{"font-size":"0.9rem"}},qe={style:{color:"#ff4a00"}},Oe={style:{display:"flex","align-items":"center"}},je={style:{"margin-left":"0.5rem"}},He={key:1,class:"table"},Ge=p(()=>e("div",{class:"table-title"},"订单信息",-1)),Je={class:"table-info"},Qe={class:"info-item"},We=p(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=p(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=p(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),ot={class:"info-item-info"},it={class:"info-item"},at=p(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),nt={class:"info-item-info"},lt={class:"info-item"},ct=p(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},rt=p(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),ut={class:"info-item-info"},vt={class:"info-item"},pt=p(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ft={class:"info-item-info"},ht={key:0},mt={key:1},yt={key:2},kt={key:3},gt={key:4},$t={key:5},bt={key:6},Ct={key:0,class:"table-title"},Vt={key:1,class:"table-info",style:{"flex-direction":"column"}},wt={class:"info-item"},St=p(()=>e("div",{class:"info-item-title"},"头像:",-1)),xt={class:"info-item-info"},Rt={class:"info-item"},Lt=p(()=>e("div",{class:"info-item-title"},"昵称:",-1)),It={class:"info-item-info"},Pt={class:"info-item"},At=p(()=>e("div",{class:"info-item-title"},"账号:",-1)),Et={class:"info-item-info"},Ut={class:"footer"},zt={class:"info"},Bt={class:"price"},Dt={key:0,class:"handle"},Kt={key:1,class:"handle"},Nt=p(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ft={class:"dialog-footer"},Mt={__name:"detail",setup(m){const k=H(),C=W(),o=a({});U.on("set-order-detail",l=>{o.value=l}),a([]);const u=a(null),f=a(!1);a(0);const h=a(0),g=a(["商品信息","订单详情"]),V=a(""),$=a(!1),B=()=>{$.value=!1,te({order_sn:V.value}).then(l=>{P({message:l.message,type:"success"}),C.push({name:"home"})})},D=a(null),w=()=>{let l={data:[],verify_code:o.value.verify_code};D.value.getSelectionRows().forEach(_=>{l.data.push({id:_.order_product_id,num:_.product_num})}),se(k.userInfo.service.mer_id,o.value.order_id,l).then(_=>{P.success(_.message)}).catch(_=>{P.error(_.message)})};return(l,S)=>{const _=b("el-table-column"),A=b("el-image"),K=b("el-input-number"),N=b("el-table"),i=b("el-button"),L=b("el-dialog"),I=F("loading");return t(),s("div",De,[e("div",Ke,[(t(!0),s(M,null,T(g.value,(r,x)=>(t(),s("div",{key:x,class:z(["nav-item",{"nav-item-active":h.value==x,"nav-item-radius1":h.value==x+1,"nav-item-radius2":h.value==x-1}]),onClick:Gt=>h.value=x},d(r),11,Ne))),128)),e("div",{class:z(["nav-item",{"nav-item-radius2":h.value==g.value.length-1}]),style:{flex:"1"}},null,2)]),R((t(),s("div",Fe,[o.value.orderProduct&&h.value==0?(t(),s("div",Me,[e("div",Te,[y(" 共计 "),e("span",qe,d(o.value.total_num),1),y(" 件商品 ")]),c(N,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct,ref_key:"tableRef",ref:D},{default:v(()=>[c(_,{type:"selection",width:"55"}),c(_,{prop:"cart_info.product.store_name",label:"商品信息"},{default:v(({row:r})=>[e("div",Oe,[c(A,{style:{height:"3rem",width:"3rem"},src:r.cart_info.productAttr.image||r.cart_info.product.image},null,8,["src"]),e("span",je,d(r.cart_info.product.store_name),1)])]),_:1}),c(_,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(_,{prop:"product_num",label:"数量",width:"180"},{default:v(({row:r})=>[c(K,{modelValue:r.product_num,"onUpdate:modelValue":x=>r.product_num=x,"step-strictly":"",max:r.refund_num,min:1,step:1,size:"small"},null,8,["modelValue","onUpdate:modelValue","max"])]),_:1}),c(_,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&h.value==1?(t(),s("div",He,[Ge,e("div",Je,[e("div",Qe,[We,e("div",Xe,d(o.value.create_time),1)]),e("div",Ye,[Ze,e("div",et,d(o.value.total_num),1)]),e("div",tt,[st,e("div",ot,"¥"+d(o.value.total_price),1)]),e("div",it,[at,e("div",nt,d(o.value.pay_time),1)]),e("div",lt,[ct,e("div",dt,"¥"+d(o.value.deduction_price),1)]),e("div",_t,[rt,e("div",ut,"¥"+d(o.value.pay_price),1)]),e("div",vt,[pt,e("div",ft,[o.value.pay_type==11?(t(),s("span",ht,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",mt,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",yt,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",kt,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",gt,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",$t,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",bt,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",Ct,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",Vt,[e("div",wt,[St,e("div",xt,[c(A,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Rt,[Lt,e("div",It,d(o.value.service_info.nickname),1)]),e("div",Pt,[At,e("div",Et,d(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),e("div",Ut,[e("div",zt,[e("div",Bt,[y(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.verify_status==0?(t(),s("div",Dt,[c(i,{class:"btn",type:"warning",onClick:w},{default:v(()=>[y("核销")]),_:1})])):(t(),s("div",Kt,"已支付"))])])),[[I,f.value]]),c(ee,{ref_key:"payRef",ref:u},null,512),c(L,{modelValue:$.value,"onUpdate:modelValue":S[1]||(S[1]=r=>$.value=r),title:"提示",width:"500"},{footer:v(()=>[e("div",Ft,[c(i,{onClick:S[0]||(S[0]=r=>$.value=!1)},{default:v(()=>[y("取消")]),_:1}),l.cartCount>0?(t(),q(i,{key:0,onClick:l.goHome},{default:v(()=>[y(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),q(i,{key:1,type:"primary",onClick:B},{default:v(()=>[y(" 确认提单 ")]),_:1}))])]),default:v(()=>[Nt]),_:1},8,["modelValue"])])}}},Tt=j(Mt,[["__scopeId","data-v-e01cd4ad"]]),qt={class:"my-card"},Ot={class:"my-code"},jt=e("h2",null,"订单核销",-1),Ht={class:"box"},Xt={__name:"index",setup(m){const k=a(1),C=a("7905655999175400"),o=a(null),u=a(null),f=()=>{if(C.value=="")return P.error("请输入订单编号");k.value=2,O(()=>{u.value.setCode(C.value)})};return X(()=>{O(()=>{o.value.focus()})}),(h,g)=>(t(),s("div",qt,[R(e("div",Ot,[jt,e("div",Ht,[R(e("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":g[0]||(g[0]=V=>C.value=V),placeholder:"",class:"input",onKeyup:G(f,["enter"])},null,544),[[Y,C.value]]),e("div",{class:"btn",onClick:f},"查询")])],512),[[E,k.value==1]]),R(c(Be,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:u},null,512),[[E,k.value==2]]),R(c(oe,null,null,512),[[E,k.value==2]]),R(c(Tt,{ref:"detailRef"},null,512),[[E,k.value==2]])]))}};export{Xt as default}; diff --git a/dist/assets/index-CtNwS61F.css b/dist/assets/index-CtNwS61F.css deleted file mode 100644 index a28892a..0000000 --- a/dist/assets/index-CtNwS61F.css +++ /dev/null @@ -1 +0,0 @@ -.body[data-v-271611c3]{width:100vw;height:100vh;box-sizing:border-box;background-image:url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/78559202404051452598712.png);background-size:100% 100%;background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.body .login[data-v-271611c3]{width:18rem;background-color:#fff;border-radius:2rem;padding:2rem 3rem}.body .login .title[data-v-271611c3]{text-align:center;font-size:1.3rem;padding-bottom:2rem} diff --git a/dist/assets/index-Bs0mdlFE.js b/dist/assets/index-Cws__d6J.js similarity index 77% rename from dist/assets/index-Bs0mdlFE.js rename to dist/assets/index-Cws__d6J.js index 4eb170f..5984f56 100644 --- a/dist/assets/index-Bs0mdlFE.js +++ b/dist/assets/index-Cws__d6J.js @@ -1 +1 @@ -import{s as L,u as S}from"./shop-BCVM-Dnd.js";import{_ as j,r as i,u as A,b as r,j as F,p as T,c as w,h as $,f as e,w as l,g as m,e as k,d as q,t as M,q as O,E as y}from"./index-3-ddzq9I.js";const P={"element-loading-text":"加载中",class:"my-shop"},G={class:"dialog-footer"},H={__name:"index",setup(J){const v=i([]),V=A(),u=i({page:1,limit:15}),d=i(!1),g=i(0),c=()=>{d.value=!0,L(V.userInfo.service.mer_id,u.value).then(t=>{v.value=t.data.list,g.value=t.data.count,d.value=!1})};c();const C=t=>{u.value.page=t,c()},x=t=>{u.value.page=t,c()},N=t=>{u.value.page=t,c()},p=i(!1),o=i({}),U=t=>{o.value=t,p.value=!0},z=()=>{let t={attr:o.value.attr||[],attrValue:o.value.attrValue,mer_cate_id:o.value.merCateId||[],spec_type:o.value.spec_type,is_stock:1};S(o.value.product_id,t).then(n=>{y({message:n.message,type:"success"}),p.value=!1,c()}).catch(n=>{y({message:n,type:"error"})})};return(t,n)=>{const s=r("el-table-column"),f=r("el-image"),_=r("el-button"),h=r("el-table"),B=r("el-pagination"),D=r("el-input-number"),I=r("el-dialog"),E=F("loading");return T((w(),$("div",P,[e(h,{data:v.value,style:{width:"100%"}},{default:l(()=>[e(s,{prop:"product_id",label:"ID",width:"100"}),e(s,{prop:"image",label:"图片",width:"120"},{default:l(a=>[e(f,{loading:"lazy",style:{width:"60px",height:"60px"},src:a.row.image},null,8,["src"])]),_:1}),e(s,{prop:"store_name",label:"商品名称",width:"500"}),e(s,{prop:"price",label:"售价"}),e(s,{prop:"stock",label:"库存"}),e(s,{label:"操作",width:"120"},{default:l(a=>[e(_,{type:"primary",link:"",onClick:b=>U(a.row)},{default:l(()=>[m("编辑")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),e(B,{"page-size":u.value.limit,layout:"prev, pager, next",total:g.value,onPrevClick:C,onNextClick:x,onCurrentChange:N},null,8,["page-size","total"]),e(I,{modelValue:p.value,"onUpdate:modelValue":n[1]||(n[1]=a=>p.value=a),title:"编辑商品库存",width:"800"},{footer:l(()=>[k("div",G,[e(_,{onClick:n[0]||(n[0]=a=>p.value=!1)},{default:l(()=>[m("取消")]),_:1}),e(_,{type:"primary",onClick:z},{default:l(()=>[m(" 确定 ")]),_:1})])]),default:l(()=>[o.value.attrValue?(w(),q(h,{key:0,data:o.value.attrValue,stripe:"",style:{width:"100%"}},{default:l(()=>[e(s,{prop:"image",label:"图片",width:"180"},{default:l(a=>[e(f,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:a.row.image||o.value.image},null,8,["src"])]),_:1}),e(s,{prop:"sku",label:"名称",width:"180"},{default:l(a=>[k("span",null,M(a.row.sku||o.value.store_name),1)]),_:1}),e(s,{prop:"price",label:"价格"}),e(s,{prop:"stock",label:"库存"},{default:l(a=>[e(D,{modelValue:a.row.stock,"onUpdate:modelValue":b=>a.row.stock=b,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):O("",!0)]),_:1},8,["modelValue"])])),[[E,d.value]])}}},R=j(H,[["__scopeId","data-v-33636025"]]);export{R as default}; +import{s as L,u as S}from"./shop-DouiAmok.js";import{_ as A,r as i,u as F,b as r,l as T,v as $,c as w,h as j,f as e,w as l,g as m,e as k,d as M,t as O,x as P,E as y}from"./index-BpXYCW1n.js";const q={"element-loading-text":"加载中",class:"my-shop"},G={class:"dialog-footer"},H={__name:"index",setup(J){const v=i([]),V=F(),u=i({page:1,limit:15}),d=i(!1),g=i(0),c=()=>{d.value=!0,L(V.userInfo.service.mer_id,u.value).then(t=>{v.value=t.data.list,g.value=t.data.count,d.value=!1})};c();const C=t=>{u.value.page=t,c()},x=t=>{u.value.page=t,c()},N=t=>{u.value.page=t,c()},p=i(!1),o=i({}),U=t=>{o.value=t,p.value=!0},z=()=>{let t={attr:o.value.attr||[],attrValue:o.value.attrValue,mer_cate_id:o.value.merCateId||[],spec_type:o.value.spec_type,is_stock:1};S(o.value.product_id,t).then(n=>{y({message:n.message,type:"success"}),p.value=!1,c()}).catch(n=>{y({message:n,type:"error"})})};return(t,n)=>{const s=r("el-table-column"),f=r("el-image"),_=r("el-button"),h=r("el-table"),B=r("el-pagination"),D=r("el-input-number"),I=r("el-dialog"),E=T("loading");return $((w(),j("div",q,[e(h,{data:v.value,style:{width:"100%"}},{default:l(()=>[e(s,{prop:"product_id",label:"ID",width:"100"}),e(s,{prop:"image",label:"图片",width:"120"},{default:l(a=>[e(f,{loading:"lazy",style:{width:"60px",height:"60px"},src:a.row.image},null,8,["src"])]),_:1}),e(s,{prop:"store_name",label:"商品名称",width:"500"}),e(s,{prop:"price",label:"售价"}),e(s,{prop:"stock",label:"库存"}),e(s,{label:"操作",width:"120"},{default:l(a=>[e(_,{type:"primary",link:"",onClick:b=>U(a.row)},{default:l(()=>[m("编辑")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),e(B,{"page-size":u.value.limit,layout:"prev, pager, next",total:g.value,onPrevClick:C,onNextClick:x,onCurrentChange:N},null,8,["page-size","total"]),e(I,{modelValue:p.value,"onUpdate:modelValue":n[1]||(n[1]=a=>p.value=a),title:"编辑商品库存",width:"800"},{footer:l(()=>[k("div",G,[e(_,{onClick:n[0]||(n[0]=a=>p.value=!1)},{default:l(()=>[m("取消")]),_:1}),e(_,{type:"primary",onClick:z},{default:l(()=>[m(" 确定 ")]),_:1})])]),default:l(()=>[o.value.attrValue?(w(),M(h,{key:0,data:o.value.attrValue,stripe:"",style:{width:"100%"}},{default:l(()=>[e(s,{prop:"image",label:"图片",width:"180"},{default:l(a=>[e(f,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:a.row.image||o.value.image},null,8,["src"])]),_:1}),e(s,{prop:"sku",label:"名称",width:"180"},{default:l(a=>[k("span",null,O(a.row.sku||o.value.store_name),1)]),_:1}),e(s,{prop:"price",label:"价格"}),e(s,{prop:"stock",label:"库存"},{default:l(a=>[e(D,{modelValue:a.row.stock,"onUpdate:modelValue":b=>a.row.stock=b,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):P("",!0)]),_:1},8,["modelValue"])])),[[E,d.value]])}}},R=A(H,[["__scopeId","data-v-33636025"]]);export{R as default}; diff --git a/dist/assets/index-iRrk4g_r.js b/dist/assets/index-DDvDLgtg.js similarity index 84% rename from dist/assets/index-iRrk4g_r.js rename to dist/assets/index-DDvDLgtg.js index d499e7e..783dee7 100644 --- a/dist/assets/index-iRrk4g_r.js +++ b/dist/assets/index-DDvDLgtg.js @@ -1 +1 @@ -import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-3-ddzq9I.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; +import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-BpXYCW1n.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; diff --git a/dist/assets/index-Dwwi99ut.css b/dist/assets/index-Dwwi99ut.css new file mode 100644 index 0000000..dbcc1d1 --- /dev/null +++ b/dist/assets/index-Dwwi99ut.css @@ -0,0 +1 @@ +.body[data-v-59a7e82c]{width:100vw;height:100vh;box-sizing:border-box;background-image:url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b84ef202404101425077785.png);background-size:100% 100%;background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.body .login[data-v-59a7e82c]{width:18rem;background-color:#fff;border-radius:2rem;padding:2rem 3rem}.body .login .title[data-v-59a7e82c]{text-align:center;font-size:1.3rem;padding-bottom:2rem} diff --git a/dist/assets/index-hLlMBiY0.js b/dist/assets/index-hLlMBiY0.js new file mode 100644 index 0000000..7a93f09 --- /dev/null +++ b/dist/assets/index-hLlMBiY0.js @@ -0,0 +1,27 @@ +import{c as bg,a as Pg,b as Bo,p as Fg,d as Wg,o as Bg}from"./pay-EEWGeT4Q.js";import{_ as Er,r as J,o as Lt,m as En,a as Tt,b as sn,c as yn,d as Vi,w as Ln,e as A,f as X,g as dn,t as Kn,n as Qi,E as Sr,u as Do,h as Dn,F as ji,i as nu,j as Et,k as Dg,l as Mo,p as Mg,q as Rr,s as Uo,v as $o,x as Ji,y as No,z as Go,A as Ug,B as $g}from"./index-BpXYCW1n.js";import{p as Ng}from"./padding-CLyithQn.js";import{g as Gg,s as Hg}from"./shop-DouiAmok.js";const qg={class:"price"},Kg={class:"flex"},zg={style:{margin:"10px","padding-bottom":"40px"}},Zg={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Yg={class:"dialog-footer"},kg={__name:"price",emits:["changeAllPrice"],setup(vn,{expose:wn,emit:o}){const W=J(!1),z=J(null),S=J(0),P=(U=!0,q=0)=>{H.value.nowPrice="",H.value.percentage="",W.value=U,S.value=q,Qi(()=>{setTimeout(()=>{var an;(an=z.value)==null||an.focus()},150)})},H=J({nowPrice:"",percentage:""}),V=U=>{H.value.percentage=(U/S.value*100).toFixed(2)},mn=U=>{H.value.nowPrice=(S.value*U/100).toFixed(2)},_n=o,en=()=>{if(H.value.percentage>100)return H.value.nowPrice="",H.value.percentage="",Sr.error("改价金额不能大于当前订单金额");if(H.value.nowPrice<=0)return H.value.nowPrice="",H.value.percentage="",Sr.error("金额不能小于0");_n("changeAllPrice",H.value.nowPrice)};wn({show:P,dialogVisible:W});const In=()=>{W.value&&en()};return Lt(()=>{En.on("enter",In)}),Tt(()=>{En.off("enter",In)}),(U,q)=>{const an=sn("el-input"),tn=sn("el-button"),$=sn("el-dialog");return yn(),Vi($,{modelValue:W.value,"onUpdate:modelValue":q[2]||(q[2]=j=>W.value=j),title:"订单改价",width:"650"},{footer:Ln(()=>[A("div",Yg,[X(tn,{class:"ok-btn",type:"primary",onClick:en},{default:Ln(()=>[dn(" 确定 (Enter) ")]),_:1})])]),default:Ln(()=>[A("div",qg,[A("div",Kg,[X(an,{ref_key:"priceRef",ref:z,style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:H.value.nowPrice,"onUpdate:modelValue":q[0]||(q[0]=j=>H.value.nowPrice=j),type:"number",placeholder:"请输入改价后的价格",onInput:V},{suffix:Ln(()=>[dn("元")]),_:1},8,["modelValue"]),X(an,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:H.value.percentage,"onUpdate:modelValue":q[1]||(q[1]=j=>H.value.percentage=j),type:"number",placeholder:"请输入比例",onInput:mn},{suffix:Ln(()=>[dn("%")]),_:1},8,["modelValue"])]),A("div",zg,[dn(" 改价后金额: "),A("span",Zg,"¥"+Kn(H.value.nowPrice||S.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Xg=Er(kg,[["__scopeId","data-v-5c8bcd20"]]),Jg={class:"my-order"},Vg={class:"header-nav"},Qg={class:"nav-item"},jg={class:"order-list"},nd={class:"order-item-info"},ed={class:"order-item-title"},td={class:"title"},rd=["onClick"],id={class:"order-item-sku"},ud=["onClick"],fd={class:"order-item-price"},od={class:"order-footer"},ld={class:"order-total"},sd={class:"price"},ad={class:"total-item"},cd={style:{"font-size":"1.4rem"}},hd={class:"total-item"},_d={class:"update-price"},pd={class:"order-btn"},gd={__name:"order",emits:["goPay","editAttr"],setup(vn,{expose:wn,emit:o}){const W=J([]),z=J(0),S=J(0),P=J(0),H=Do(),V=()=>{let x=[];W.value.map(D=>{x.push(D.cart_id)}),x.length!=0&&_n(x)},mn=x=>{W.value=W.value.filter(D=>D.cart_id!=x),_n([x])},_n=x=>{bg({cart_id:x}).then(D=>{console.log(D),en()})},en=()=>{z.value=0,S.value=0,P.value=0,Pg({staff_id:H.userInfo.service.service_id}).then(x=>{var D,fn;((fn=(D=x.data)==null?void 0:D.list)==null?void 0:fn.length)>0?(W.value=x.data.list[0].list,W.value.forEach(pn=>{z.value+=pn.productAttr.price*pn.cart_num}),S.value=z.value):W.value=[]})};en();const In=o,U=()=>{In("goPay")},q=(x,D)=>{Bo(x.cart_id,{cart_num:x.cart_num}).then(fn=>{z.value=0,W.value.forEach(pn=>{z.value+=pn.productAttr.price*pn.cart_num}),S.value=z.value})},an=x=>{In("editPupop",x)},tn=(x,D)=>{Bo(x,D).then(fn=>{en()})},$=x=>{P.value=S.value-x,z.value=+x,Qi(()=>{setTimeout(()=>{Z(!1)},150)})};J(0);const j=J(null),Z=(x=!0)=>{j.value.show(x,S.value)};wn({getList:en,list:W,editItem:tn,discounts:P,allPrice:z});const Rn=()=>{j.value.dialogVisible?j.value.dialogVisible=!1:Z()},C=()=>{W.value.length>0&&V()};return Lt(()=>{En.on("insert",Rn),En.on("delete",C)}),Tt(()=>{En.off("insert",Rn),En.off("delete",C)}),(x,D)=>{const fn=sn("Delete"),pn=sn("el-icon"),ce=sn("el-empty"),ne=sn("el-image"),rt=sn("ArrowDown"),Ot=sn("el-input-number"),it=sn("el-button");return yn(),Dn("div",Jg,[A("div",Vg,[A("div",Qg,[dn(" 已选购 "),A("span",null,Kn(W.value.length),1),dn(" 件 ")]),A("div",{class:"nav-item-clear",onClick:V},[X(pn,null,{default:Ln(()=>[X(fn)]),_:1}),dn("清空 (Delete) ")])]),A("div",jg,[W.value.length==0?(yn(),Vi(ce,{key:0,description:"请点击右侧添加商品"})):(yn(!0),Dn(ji,{key:1},nu(W.value,(Mn,Lr)=>(yn(),Dn("div",{class:"order-item",key:Lr},[X(ne,{loading:"lazy",class:"order-item-img",src:Mn.productAttr&&Mn.productAttr.image||Mn.product.image},null,8,["src"]),A("div",nd,[A("div",ed,[A("div",td,Kn(Mn.spu.store_name),1),A("div",{class:"delete",onClick:zn=>mn(Mn.cart_id)},"删除",8,rd)]),A("div",id,[A("span",{style:{display:"flex","align-items":"center"},onClick:zn=>an(Mn)},[dn("商品规格: "+Kn(Mn.productAttr.sku||"默认规格"),1),X(pn,{size:"16",style:{"margin-left":"0.2rem"}},{default:Ln(()=>[X(rt)]),_:1})],8,ud)]),A("div",fd,[A("div",null,[dn(" ¥"),A("span",null,Kn(Mn.productAttr.price),1)]),A("div",null,[X(Ot,{modelValue:Mn.cart_num,"onUpdate:modelValue":zn=>Mn.cart_num=zn,"step-strictly":"",min:1,step:1,onChange:zn=>q(Mn)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),A("div",od,[A("div",ld,[A("div",sd,[A("div",ad,[dn(" 实付: "),A("span",null,[dn("¥"),A("span",cd,Kn(z.value.toFixed(2)),1)])]),A("div",hd,[dn(" 优惠: "),A("span",null,[dn("¥"),A("span",null,Kn(P.value.toFixed(2)),1)])])]),A("div",_d,[X(it,{class:"btn",type:"primary",onClick:Z},{default:Ln(()=>[dn("改价 (Insert)")]),_:1})])]),A("div",pd,[X(it,{class:"btn",type:"primary",onClick:U,disabled:W.value.length==0},{default:Ln(()=>[dn("立即结账 (F9)")]),_:1},8,["disabled"])])]),X(Xg,{ref_key:"priceRef",ref:j,onChangeAllPrice:$},null,512)])}}},dd=Er(gd,[["__scopeId","data-v-08d90ace"]]);var Cr={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 + */Cr.exports;(function(vn,wn){(function(){var o,W="4.17.21",z=200,S="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",P="Expected a function",H="Invalid `variable` option passed into `_.template`",V="__lodash_hash_undefined__",mn=500,_n="__lodash_placeholder__",en=1,In=2,U=4,q=1,an=2,tn=1,$=2,j=4,Z=8,Rn=16,C=32,x=64,D=128,fn=256,pn=512,ce=30,ne="...",rt=800,Ot=16,it=1,Mn=2,Lr=3,zn=1/0,ye=9007199254740991,Ho=17976931348623157e292,bt=NaN,oe=4294967295,qo=oe-1,Ko=oe>>>1,zo=[["ary",D],["bind",tn],["bindKey",$],["curry",Z],["curryRight",Rn],["flip",pn],["partial",C],["partialRight",x],["rearg",fn]],Ge="[object Arguments]",Pt="[object Array]",Zo="[object AsyncFunction]",ut="[object Boolean]",ft="[object Date]",Yo="[object DOMException]",Ft="[object Error]",Wt="[object Function]",tu="[object GeneratorFunction]",ee="[object Map]",ot="[object Number]",ko="[object Null]",he="[object Object]",ru="[object Promise]",Xo="[object Proxy]",lt="[object RegExp]",te="[object Set]",st="[object String]",Bt="[object Symbol]",Jo="[object Undefined]",at="[object WeakMap]",Vo="[object WeakSet]",ct="[object ArrayBuffer]",He="[object DataView]",Tr="[object Float32Array]",Or="[object Float64Array]",br="[object Int8Array]",Pr="[object Int16Array]",Fr="[object Int32Array]",Wr="[object Uint8Array]",Br="[object Uint8ClampedArray]",Dr="[object Uint16Array]",Mr="[object Uint32Array]",Qo=/\b__p \+= '';/g,jo=/\b(__p \+=) '' \+/g,nl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,iu=/&(?:amp|lt|gt|quot|#39);/g,uu=/[&<>"']/g,el=RegExp(iu.source),tl=RegExp(uu.source),rl=/<%-([\s\S]+?)%>/g,il=/<%([\s\S]+?)%>/g,fu=/<%=([\s\S]+?)%>/g,ul=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fl=/^\w*$/,ol=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ur=/[\\^$.*+?()[\]{}|]/g,ll=RegExp(Ur.source),$r=/^\s+/,sl=/\s/,al=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,cl=/\{\n\/\* \[wrapped with (.+)\] \*/,hl=/,? & /,_l=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pl=/[()=,{}\[\]\/\s]/,gl=/\\(\\)?/g,dl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ou=/\w*$/,vl=/^[-+]0x[0-9a-f]+$/i,wl=/^0b[01]+$/i,ml=/^\[object .+?Constructor\]$/,xl=/^0o[0-7]+$/i,Al=/^(?:0|[1-9]\d*)$/,yl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Dt=/($^)/,Il=/['\n\r\u2028\u2029\\]/g,Mt="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Sl="\\ufe20-\\ufe2f",Cl="\\u20d0-\\u20ff",lu=Rl+Sl+Cl,su="\\u2700-\\u27bf",au="a-z\\xdf-\\xf6\\xf8-\\xff",El="\\xac\\xb1\\xd7\\xf7",Ll="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Tl="\\u2000-\\u206f",Ol=" \\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",cu="A-Z\\xc0-\\xd6\\xd8-\\xde",hu="\\ufe0e\\ufe0f",_u=El+Ll+Tl+Ol,Nr="['’]",bl="["+Mt+"]",pu="["+_u+"]",Ut="["+lu+"]",gu="\\d+",Pl="["+su+"]",du="["+au+"]",vu="[^"+Mt+_u+gu+su+au+cu+"]",Gr="\\ud83c[\\udffb-\\udfff]",Fl="(?:"+Ut+"|"+Gr+")",wu="[^"+Mt+"]",Hr="(?:\\ud83c[\\udde6-\\uddff]){2}",qr="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+cu+"]",mu="\\u200d",xu="(?:"+du+"|"+vu+")",Wl="(?:"+qe+"|"+vu+")",Au="(?:"+Nr+"(?:d|ll|m|re|s|t|ve))?",yu="(?:"+Nr+"(?:D|LL|M|RE|S|T|VE))?",Iu=Fl+"?",Ru="["+hu+"]?",Bl="(?:"+mu+"(?:"+[wu,Hr,qr].join("|")+")"+Ru+Iu+")*",Dl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ml="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Su=Ru+Iu+Bl,Ul="(?:"+[Pl,Hr,qr].join("|")+")"+Su,$l="(?:"+[wu+Ut+"?",Ut,Hr,qr,bl].join("|")+")",Nl=RegExp(Nr,"g"),Gl=RegExp(Ut,"g"),Kr=RegExp(Gr+"(?="+Gr+")|"+$l+Su,"g"),Hl=RegExp([qe+"?"+du+"+"+Au+"(?="+[pu,qe,"$"].join("|")+")",Wl+"+"+yu+"(?="+[pu,qe+xu,"$"].join("|")+")",qe+"?"+xu+"+"+Au,qe+"+"+yu,Ml,Dl,gu,Ul].join("|"),"g"),ql=RegExp("["+mu+Mt+lu+hu+"]"),Kl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zl=["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"],Zl=-1,Q={};Q[Tr]=Q[Or]=Q[br]=Q[Pr]=Q[Fr]=Q[Wr]=Q[Br]=Q[Dr]=Q[Mr]=!0,Q[Ge]=Q[Pt]=Q[ct]=Q[ut]=Q[He]=Q[ft]=Q[Ft]=Q[Wt]=Q[ee]=Q[ot]=Q[he]=Q[lt]=Q[te]=Q[st]=Q[at]=!1;var k={};k[Ge]=k[Pt]=k[ct]=k[He]=k[ut]=k[ft]=k[Tr]=k[Or]=k[br]=k[Pr]=k[Fr]=k[ee]=k[ot]=k[he]=k[lt]=k[te]=k[st]=k[Bt]=k[Wr]=k[Br]=k[Dr]=k[Mr]=!0,k[Ft]=k[Wt]=k[at]=!1;var Yl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},kl={"&":"&","<":"<",">":">",'"':""","'":"'"},Xl={"&":"&","<":"<",">":">",""":'"',"'":"'"},Jl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vl=parseFloat,Ql=parseInt,Cu=typeof Et=="object"&&Et&&Et.Object===Object&&Et,jl=typeof self=="object"&&self&&self.Object===Object&&self,xn=Cu||jl||Function("return this")(),zr=wn&&!wn.nodeType&&wn,Pe=zr&&!0&&vn&&!vn.nodeType&&vn,Eu=Pe&&Pe.exports===zr,Zr=Eu&&Cu.process,Zn=function(){try{var a=Pe&&Pe.require&&Pe.require("util").types;return a||Zr&&Zr.binding&&Zr.binding("util")}catch{}}(),Lu=Zn&&Zn.isArrayBuffer,Tu=Zn&&Zn.isDate,Ou=Zn&&Zn.isMap,bu=Zn&&Zn.isRegExp,Pu=Zn&&Zn.isSet,Fu=Zn&&Zn.isTypedArray;function Un(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 ns(a,_,h,w){for(var E=-1,N=a==null?0:a.length;++E-1}function Yr(a,_,h){for(var w=-1,E=a==null?0:a.length;++w-1;);return h}function Gu(a,_){for(var h=a.length;h--&&Ke(_,a[h],0)>-1;);return h}function ss(a,_){for(var h=a.length,w=0;h--;)a[h]===_&&++w;return w}var as=Vr(Yl),cs=Vr(kl);function hs(a){return"\\"+Jl[a]}function _s(a,_){return a==null?o:a[_]}function ze(a){return ql.test(a)}function ps(a){return Kl.test(a)}function gs(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function ei(a){var _=-1,h=Array(a.size);return a.forEach(function(w,E){h[++_]=[E,w]}),h}function Hu(a,_){return function(h){return a(_(h))}}function Se(a,_){for(var h=-1,w=a.length,E=0,N=[];++h-1}function ta(n,e){var t=this.__data__,r=tr(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}_e.prototype.clear=Qs,_e.prototype.delete=js,_e.prototype.get=na,_e.prototype.has=ea,_e.prototype.set=ta;function pe(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,f){var l,s=e&en,c=e&In,p=e&U;if(t&&(l=i?t(n,r,i,f):t(n)),l!==o)return l;if(!rn(n))return n;var g=L(n);if(g){if(l=fc(n),!s)return Pn(n,l)}else{var d=Cn(n),v=d==Wt||d==tu;if(be(n))return Sf(n,s);if(d==he||d==Ge||v&&!i){if(l=c||v?{}:Kf(n),!s)return c?Xa(n,wa(l,n)):ka(n,nf(l,n))}else{if(!k[d])return i?n:{};l=oc(n,d,s)}}f||(f=new ie);var m=f.get(n);if(m)return m;f.set(n,l),xo(n)?n.forEach(function(R){l.add(Jn(R,e,t,R,n,f))}):wo(n)&&n.forEach(function(R,F){l.set(F,Jn(R,e,t,F,n,f))});var I=p?c?Ei:Ci:c?Wn:gn,O=g?o:I(n);return Yn(O||n,function(R,F){O&&(F=R,R=n[F]),wt(l,F,Jn(R,e,t,F,n,f))}),l}function ma(n){var e=gn(n);return function(t){return ef(t,n,e)}}function ef(n,e,t){var r=t.length;if(n==null)return!r;for(n=Y(n);r--;){var i=t[r],f=e[i],l=n[i];if(l===o&&!(i in n)||!f(l))return!1}return!0}function tf(n,e,t){if(typeof n!="function")throw new kn(P);return St(function(){n.apply(o,t)},e)}function mt(n,e,t,r){var i=-1,f=$t,l=!0,s=n.length,c=[],p=e.length;if(!s)return c;t&&(e=nn(e,$n(t))),r?(f=Yr,l=!1):e.length>=z&&(f=ht,l=!1,e=new Be(e));n:for(;++ii?0:i+t),r=r===o||r>i?i:T(r),r<0&&(r+=i),r=t>r?0:yo(r);t0&&t(s)?e>1?An(s,e-1,t,r,i):Re(i,s):r||(i[i.length]=s)}return i}var li=bf(),ff=bf(!0);function le(n,e){return n&&li(n,e,gn)}function si(n,e){return n&&ff(n,e,gn)}function ir(n,e){return Ie(e,function(t){return me(n[t])})}function Me(n,e){e=Te(e,n);for(var t=0,r=e.length;n!=null&&te}function ya(n,e){return n!=null&&K.call(n,e)}function Ia(n,e){return n!=null&&e in Y(n)}function Ra(n,e,t){return n>=Sn(e,t)&&n=120&&g.length>=120)?new Be(l&&g):o}g=n[0];var d=-1,v=s[0];n:for(;++d-1;)s!==n&&Xt.call(s,c,1),Xt.call(n,c,1);return n}function vf(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==f){var f=i;we(i)?Xt.call(n,i,1):mi(n,i)}}return n}function di(n,e){return n+Qt(Ju()*(e-n+1))}function Ma(n,e,t,r){for(var i=-1,f=hn(Vt((e-n)/(t||1)),0),l=h(f);f--;)l[r?f:++i]=n,n+=t;return l}function vi(n,e){var t="";if(!n||e<1||e>ye)return t;do e%2&&(t+=n),e=Qt(e/2),e&&(n+=n);while(e);return t}function b(n,e){return Wi(Yf(n,e,Bn),n+"")}function Ua(n){return ju(tt(n))}function $a(n,e){var t=tt(n);return gr(t,De(e,0,t.length))}function yt(n,e,t,r){if(!rn(n))return n;e=Te(e,n);for(var i=-1,f=e.length,l=f-1,s=n;s!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var f=h(i);++r>>1,l=n[f];l!==null&&!Gn(l)&&(t?l<=e:l=z){var p=e?null:ja(n);if(p)return Gt(p);l=!1,i=ht,c=new Be}else c=e?[]:s;n:for(;++r=r?n:Vn(n,e,t)}var Rf=Os||function(n){return xn.clearTimeout(n)};function Sf(n,e){if(e)return n.slice();var t=n.length,r=zu?zu(t):new n.constructor(t);return n.copy(r),r}function Ii(n){var e=new n.constructor(n.byteLength);return new Yt(e).set(new Yt(n)),e}function Ka(n,e){var t=e?Ii(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function za(n){var e=new n.constructor(n.source,ou.exec(n));return e.lastIndex=n.lastIndex,e}function Za(n){return vt?Y(vt.call(n)):{}}function Cf(n,e){var t=e?Ii(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function Ef(n,e){if(n!==e){var t=n!==o,r=n===null,i=n===n,f=Gn(n),l=e!==o,s=e===null,c=e===e,p=Gn(e);if(!s&&!p&&!f&&n>e||f&&l&&c&&!s&&!p||r&&l&&c||!t&&c||!i)return 1;if(!r&&!f&&!p&&n=s)return c;var p=t[r];return c*(p=="desc"?-1:1)}}return n.index-e.index}function Lf(n,e,t,r){for(var i=-1,f=n.length,l=t.length,s=-1,c=e.length,p=hn(f-l,0),g=h(c+p),d=!r;++s1?t[i-1]:o,l=i>2?t[2]:o;for(f=n.length>3&&typeof f=="function"?(i--,f):o,l&&On(t[0],t[1],l)&&(f=i<3?o:f,i=1),e=Y(e);++r-1?i[f?e[l]:l]:o}}function Wf(n){return ve(function(e){var t=e.length,r=t,i=Xn.prototype.thru;for(n&&e.reverse();r--;){var f=e[r];if(typeof f!="function")throw new kn(P);if(i&&!l&&_r(f)=="wrapper")var l=new Xn([],!0)}for(r=l?r:t;++r1&&M.reverse(),g&&cs))return!1;var p=f.get(n),g=f.get(e);if(p&&g)return p==e&&g==n;var d=-1,v=!0,m=t&an?new Be:o;for(f.set(n,e),f.set(e,n);++d1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(al,`{ +/* [wrapped with `+e+`] */ +`)}function sc(n){return L(n)||Ne(n)||!!(ku&&n&&n[ku])}function we(n,e){var t=typeof n;return e=e??ye,!!e&&(t=="number"||t!="symbol"&&Al.test(n))&&n>-1&&n%1==0&&n0){if(++e>=rt)return arguments[0]}else e=0;return n.apply(o,arguments)}}function gr(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,uo(n,t)});function fo(n){var e=u(n);return e.__chain__=!0,e}function xh(n,e){return e(n),n}function dr(n,e){return e(n)}var Ah=ve(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(f){return oi(f,n)};return e>1||this.__actions__.length||!(r instanceof B)||!we(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:dr,args:[i],thisArg:o}),new Xn(r,this.__chain__).thru(function(f){return e&&!f.length&&f.push(o),f}))});function yh(){return fo(this)}function Ih(){return new Xn(this.value(),this.__chain__)}function Rh(){this.__values__===o&&(this.__values__=Ao(this.value()));var n=this.__index__>=this.__values__.length,e=n?o:this.__values__[this.__index__++];return{done:n,value:e}}function Sh(){return this}function Ch(n){for(var e,t=this;t instanceof er;){var r=jf(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 Eh(){var n=this.__wrapped__;if(n instanceof B){var e=n;return this.__actions__.length&&(e=new B(this)),e=e.reverse(),e.__actions__.push({func:dr,args:[Bi],thisArg:o}),new Xn(e,this.__chain__)}return this.thru(Bi)}function Lh(){return yf(this.__wrapped__,this.__actions__)}var Th=lr(function(n,e,t){K.call(n,t)?++n[t]:ge(n,t,1)});function Oh(n,e,t){var r=L(n)?Wu:xa;return t&&On(n,e,t)&&(e=o),r(n,y(e,3))}function bh(n,e){var t=L(n)?Ie:uf;return t(n,y(e,3))}var Ph=Ff(no),Fh=Ff(eo);function Wh(n,e){return An(vr(n,e),1)}function Bh(n,e){return An(vr(n,e),zn)}function Dh(n,e,t){return t=t===o?1:T(t),An(vr(n,e),t)}function oo(n,e){var t=L(n)?Yn:Ee;return t(n,y(e,3))}function lo(n,e){var t=L(n)?es:rf;return t(n,y(e,3))}var Mh=lr(function(n,e,t){K.call(n,t)?n[t].push(e):ge(n,t,[e])});function Uh(n,e,t,r){n=Fn(n)?n:tt(n),t=t&&!r?T(t):0;var i=n.length;return t<0&&(t=hn(i+t,0)),yr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&Ke(n,e,t)>-1}var $h=b(function(n,e,t){var r=-1,i=typeof e=="function",f=Fn(n)?h(n.length):[];return Ee(n,function(l){f[++r]=i?Un(e,l,t):xt(l,e,t)}),f}),Nh=lr(function(n,e,t){ge(n,t,e)});function vr(n,e){var t=L(n)?nn:cf;return t(n,y(e,3))}function Gh(n,e,t,r){return n==null?[]:(L(e)||(e=e==null?[]:[e]),t=r?o:t,L(t)||(t=t==null?[]:[t]),gf(n,e,t))}var Hh=lr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function qh(n,e,t){var r=L(n)?kr:Uu,i=arguments.length<3;return r(n,y(e,4),t,i,Ee)}function Kh(n,e,t){var r=L(n)?ts:Uu,i=arguments.length<3;return r(n,y(e,4),t,i,rf)}function zh(n,e){var t=L(n)?Ie:uf;return t(n,xr(y(e,3)))}function Zh(n){var e=L(n)?ju:Ua;return e(n)}function Yh(n,e,t){(t?On(n,e,t):e===o)?e=1:e=T(e);var r=L(n)?ga:$a;return r(n,e)}function kh(n){var e=L(n)?da:Ga;return e(n)}function Xh(n){if(n==null)return 0;if(Fn(n))return yr(n)?Ze(n):n.length;var e=Cn(n);return e==ee||e==te?n.size:_i(n).length}function Jh(n,e,t){var r=L(n)?Xr:Ha;return t&&On(n,e,t)&&(e=o),r(n,y(e,3))}var Vh=b(function(n,e){if(n==null)return[];var t=e.length;return t>1&&On(n,e[0],e[1])?e=[]:t>2&&On(e[0],e[1],e[2])&&(e=[e[0]]),gf(n,An(e,1),[])}),wr=bs||function(){return xn.Date.now()};function Qh(n,e){if(typeof e!="function")throw new kn(P);return n=T(n),function(){if(--n<1)return e.apply(this,arguments)}}function so(n,e,t){return e=t?o:e,e=n&&e==null?n.length:e,de(n,D,o,o,o,o,e)}function ao(n,e){var t;if(typeof e!="function")throw new kn(P);return n=T(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Mi=b(function(n,e,t){var r=tn;if(t.length){var i=Se(t,nt(Mi));r|=C}return de(n,r,e,t,i)}),co=b(function(n,e,t){var r=tn|$;if(t.length){var i=Se(t,nt(co));r|=C}return de(e,r,n,t,i)});function ho(n,e,t){e=t?o:e;var r=de(n,Z,o,o,o,o,o,e);return r.placeholder=ho.placeholder,r}function _o(n,e,t){e=t?o:e;var r=de(n,Rn,o,o,o,o,o,e);return r.placeholder=_o.placeholder,r}function po(n,e,t){var r,i,f,l,s,c,p=0,g=!1,d=!1,v=!0;if(typeof n!="function")throw new kn(P);e=jn(e)||0,rn(t)&&(g=!!t.leading,d="maxWait"in t,f=d?hn(jn(t.maxWait)||0,e):f,v="trailing"in t?!!t.trailing:v);function m(ln){var fe=r,Ae=i;return r=i=o,p=ln,l=n.apply(Ae,fe),l}function I(ln){return p=ln,s=St(F,e),g?m(ln):l}function O(ln){var fe=ln-c,Ae=ln-p,Wo=e-fe;return d?Sn(Wo,f-Ae):Wo}function R(ln){var fe=ln-c,Ae=ln-p;return c===o||fe>=e||fe<0||d&&Ae>=f}function F(){var ln=wr();if(R(ln))return M(ln);s=St(F,O(ln))}function M(ln){return s=o,v&&r?m(ln):(r=i=o,l)}function Hn(){s!==o&&Rf(s),p=0,r=c=i=s=o}function bn(){return s===o?l:M(wr())}function qn(){var ln=wr(),fe=R(ln);if(r=arguments,i=this,c=ln,fe){if(s===o)return I(c);if(d)return Rf(s),s=St(F,e),m(c)}return s===o&&(s=St(F,e)),l}return qn.cancel=Hn,qn.flush=bn,qn}var jh=b(function(n,e){return tf(n,1,e)}),n_=b(function(n,e,t){return tf(n,jn(e)||0,t)});function e_(n){return de(n,pn)}function mr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new kn(P);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],f=t.cache;if(f.has(i))return f.get(i);var l=n.apply(this,r);return t.cache=f.set(i,l)||f,l};return t.cache=new(mr.Cache||pe),t}mr.Cache=pe;function xr(n){if(typeof n!="function")throw new kn(P);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function t_(n){return ao(2,n)}var r_=qa(function(n,e){e=e.length==1&&L(e[0])?nn(e[0],$n(y())):nn(An(e,1),$n(y()));var t=e.length;return b(function(r){for(var i=-1,f=Sn(r.length,t);++i=e}),Ne=lf(function(){return arguments}())?lf:function(n){return un(n)&&K.call(n,"callee")&&!Yu.call(n,"callee")},L=h.isArray,w_=Lu?$n(Lu):Ca;function Fn(n){return n!=null&&Ar(n.length)&&!me(n)}function on(n){return un(n)&&Fn(n)}function m_(n){return n===!0||n===!1||un(n)&&Tn(n)==ut}var be=Fs||Xi,x_=Tu?$n(Tu):Ea;function A_(n){return un(n)&&n.nodeType===1&&!Ct(n)}function y_(n){if(n==null)return!0;if(Fn(n)&&(L(n)||typeof n=="string"||typeof n.splice=="function"||be(n)||et(n)||Ne(n)))return!n.length;var e=Cn(n);if(e==ee||e==te)return!n.size;if(Rt(n))return!_i(n).length;for(var t in n)if(K.call(n,t))return!1;return!0}function I_(n,e){return At(n,e)}function R_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?At(n,e,o,t):!!r}function $i(n){if(!un(n))return!1;var e=Tn(n);return e==Ft||e==Yo||typeof n.message=="string"&&typeof n.name=="string"&&!Ct(n)}function S_(n){return typeof n=="number"&&Xu(n)}function me(n){if(!rn(n))return!1;var e=Tn(n);return e==Wt||e==tu||e==Zo||e==Xo}function vo(n){return typeof n=="number"&&n==T(n)}function Ar(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ye}function rn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function un(n){return n!=null&&typeof n=="object"}var wo=Ou?$n(Ou):Ta;function C_(n,e){return n===e||hi(n,e,Ti(e))}function E_(n,e,t){return t=typeof t=="function"?t:o,hi(n,e,Ti(e),t)}function L_(n){return mo(n)&&n!=+n}function T_(n){if(hc(n))throw new E(S);return sf(n)}function O_(n){return n===null}function b_(n){return n==null}function mo(n){return typeof n=="number"||un(n)&&Tn(n)==ot}function Ct(n){if(!un(n)||Tn(n)!=he)return!1;var e=kt(n);if(e===null)return!0;var t=K.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Kt.call(t)==Es}var Ni=bu?$n(bu):Oa;function P_(n){return vo(n)&&n>=-ye&&n<=ye}var xo=Pu?$n(Pu):ba;function yr(n){return typeof n=="string"||!L(n)&&un(n)&&Tn(n)==st}function Gn(n){return typeof n=="symbol"||un(n)&&Tn(n)==Bt}var et=Fu?$n(Fu):Pa;function F_(n){return n===o}function W_(n){return un(n)&&Cn(n)==at}function B_(n){return un(n)&&Tn(n)==Vo}var D_=hr(pi),M_=hr(function(n,e){return n<=e});function Ao(n){if(!n)return[];if(Fn(n))return yr(n)?re(n):Pn(n);if(_t&&n[_t])return gs(n[_t]());var e=Cn(n),t=e==ee?ei:e==te?Gt:tt;return t(n)}function xe(n){if(!n)return n===0?n:0;if(n=jn(n),n===zn||n===-zn){var e=n<0?-1:1;return e*Ho}return n===n?n:0}function T(n){var e=xe(n),t=e%1;return e===e?t?e-t:e:0}function yo(n){return n?De(T(n),0,oe):0}function jn(n){if(typeof n=="number")return n;if(Gn(n))return bt;if(rn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=rn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=$u(n);var t=wl.test(n);return t||xl.test(n)?Ql(n.slice(2),t?2:8):vl.test(n)?bt:+n}function Io(n){return se(n,Wn(n))}function U_(n){return n?De(T(n),-ye,ye):n===0?n:0}function G(n){return n==null?"":Nn(n)}var $_=Qe(function(n,e){if(Rt(e)||Fn(e)){se(e,gn(e),n);return}for(var t in e)K.call(e,t)&&wt(n,t,e[t])}),Ro=Qe(function(n,e){se(e,Wn(e),n)}),Ir=Qe(function(n,e,t,r){se(e,Wn(e),n,r)}),N_=Qe(function(n,e,t,r){se(e,gn(e),n,r)}),G_=ve(oi);function H_(n,e){var t=Ve(n);return e==null?t:nf(t,e)}var q_=b(function(n,e){n=Y(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&On(e[0],e[1],i)&&(r=1);++t1),f}),se(n,Ei(n),t),r&&(t=Jn(t,en|In|U,nc));for(var i=e.length;i--;)mi(t,e[i]);return t});function op(n,e){return Co(n,xr(y(e)))}var lp=ve(function(n,e){return n==null?{}:Ba(n,e)});function Co(n,e){if(n==null)return{};var t=nn(Ei(n),function(r){return[r]});return e=y(e),df(n,t,function(r,i){return e(r,i[0])})}function sp(n,e,t){e=Te(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=Ju();return Sn(n+i*(e-n+Vl("1e-"+((i+"").length-1))),e)}return di(n,e)}var xp=je(function(n,e,t){return e=e.toLowerCase(),n+(t?To(e):e)});function To(n){return qi(G(n).toLowerCase())}function Oo(n){return n=G(n),n&&n.replace(yl,as).replace(Gl,"")}function Ap(n,e,t){n=G(n),e=Nn(e);var r=n.length;t=t===o?r:De(T(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function yp(n){return n=G(n),n&&tl.test(n)?n.replace(uu,cs):n}function Ip(n){return n=G(n),n&&ll.test(n)?n.replace(Ur,"\\$&"):n}var Rp=je(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Sp=je(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),Cp=Pf("toLowerCase");function Ep(n,e,t){n=G(n),e=T(e);var r=e?Ze(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return cr(Qt(i),t)+n+cr(Vt(i),t)}function Lp(n,e,t){n=G(n),e=T(e);var r=e?Ze(n):0;return e&&r>>0,t?(n=G(n),n&&(typeof e=="string"||e!=null&&!Ni(e))&&(e=Nn(e),!e&&ze(n))?Oe(re(n),0,t):n.split(e,t)):[]}var Bp=je(function(n,e,t){return n+(t?" ":"")+qi(e)});function Dp(n,e,t){return n=G(n),t=t==null?0:De(T(t),0,n.length),e=Nn(e),n.slice(t,t+e.length)==e}function Mp(n,e,t){var r=u.templateSettings;t&&On(n,e,t)&&(e=o),n=G(n),e=Ir({},e,r,$f);var i=Ir({},e.imports,r.imports,$f),f=gn(i),l=ni(i,f),s,c,p=0,g=e.interpolate||Dt,d="__p += '",v=ti((e.escape||Dt).source+"|"+g.source+"|"+(g===fu?dl:Dt).source+"|"+(e.evaluate||Dt).source+"|$","g"),m="//# sourceURL="+(K.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zl+"]")+` +`;n.replace(v,function(R,F,M,Hn,bn,qn){return M||(M=Hn),d+=n.slice(p,qn).replace(Il,hs),F&&(s=!0,d+=`' + +__e(`+F+`) + +'`),bn&&(c=!0,d+=`'; +`+bn+`; +__p += '`),M&&(d+=`' + +((__t = (`+M+`)) == null ? '' : __t) + +'`),p=qn+R.length,R}),d+=`'; +`;var I=K.call(e,"variable")&&e.variable;if(!I)d=`with (obj) { +`+d+` +} +`;else if(pl.test(I))throw new E(H);d=(c?d.replace(Qo,""):d).replace(jo,"$1").replace(nl,"$1;"),d="function("+(I||"obj")+`) { +`+(I?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+d+`return __p +}`;var O=Po(function(){return N(f,m+"return "+d).apply(o,l)});if(O.source=d,$i(O))throw O;return O}function Up(n){return G(n).toLowerCase()}function $p(n){return G(n).toUpperCase()}function Np(n,e,t){if(n=G(n),n&&(t||e===o))return $u(n);if(!n||!(e=Nn(e)))return n;var r=re(n),i=re(e),f=Nu(r,i),l=Gu(r,i)+1;return Oe(r,f,l).join("")}function Gp(n,e,t){if(n=G(n),n&&(t||e===o))return n.slice(0,qu(n)+1);if(!n||!(e=Nn(e)))return n;var r=re(n),i=Gu(r,re(e))+1;return Oe(r,0,i).join("")}function Hp(n,e,t){if(n=G(n),n&&(t||e===o))return n.replace($r,"");if(!n||!(e=Nn(e)))return n;var r=re(n),i=Nu(r,re(e));return Oe(r,i).join("")}function qp(n,e){var t=ce,r=ne;if(rn(e)){var i="separator"in e?e.separator:i;t="length"in e?T(e.length):t,r="omission"in e?Nn(e.omission):r}n=G(n);var f=n.length;if(ze(n)){var l=re(n);f=l.length}if(t>=f)return n;var s=t-Ze(r);if(s<1)return r;var c=l?Oe(l,0,s).join(""):n.slice(0,s);if(i===o)return c+r;if(l&&(s+=c.length-s),Ni(i)){if(n.slice(s).search(i)){var p,g=c;for(i.global||(i=ti(i.source,G(ou.exec(i))+"g")),i.lastIndex=0;p=i.exec(g);)var d=p.index;c=c.slice(0,d===o?s:d)}}else if(n.indexOf(Nn(i),s)!=s){var v=c.lastIndexOf(i);v>-1&&(c=c.slice(0,v))}return c+r}function Kp(n){return n=G(n),n&&el.test(n)?n.replace(iu,ms):n}var zp=je(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),qi=Pf("toUpperCase");function bo(n,e,t){return n=G(n),e=t?o:e,e===o?ps(n)?ys(n):us(n):n.match(e)||[]}var Po=b(function(n,e){try{return Un(n,o,e)}catch(t){return $i(t)?t:new E(t)}}),Zp=ve(function(n,e){return Yn(e,function(t){t=ae(t),ge(n,t,Mi(n[t],n))}),n});function Yp(n){var e=n==null?0:n.length,t=y();return n=e?nn(n,function(r){if(typeof r[1]!="function")throw new kn(P);return[t(r[0]),r[1]]}):[],b(function(r){for(var i=-1;++iye)return[];var t=oe,r=Sn(n,oe);e=y(e),n-=oe;for(var i=jr(r,e);++t0||e<0)?new B(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=T(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},B.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},B.prototype.toArray=function(){return this.take(oe)},le(B.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],f=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,s=r?[1]:arguments,c=l instanceof B,p=s[0],g=c||L(l),d=function(F){var M=i.apply(u,Re([F],s));return r&&v?M[0]:M};g&&t&&typeof p=="function"&&p.length!=1&&(c=g=!1);var v=this.__chain__,m=!!this.__actions__.length,I=f&&!v,O=c&&!m;if(!f&&g){l=O?l:new B(this);var R=n.apply(l,s);return R.__actions__.push({func:dr,args:[d],thisArg:o}),new Xn(R,v)}return I&&O?n.apply(this,s):(R=this.thru(d),I?r?R.value()[0]:R.value():R)})}),Yn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Ht[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var f=this.value();return e.apply(L(f)?f:[],i)}return this[t](function(l){return e.apply(L(l)?l:[],i)})}}),le(B.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";K.call(Je,r)||(Je[r]=[]),Je[r].push({name:e,func:t})}}),Je[sr(o,$).name]=[{name:"wrapper",func:o}],B.prototype.clone=Ks,B.prototype.reverse=zs,B.prototype.value=Zs,u.prototype.at=Ah,u.prototype.chain=yh,u.prototype.commit=Ih,u.prototype.next=Rh,u.prototype.plant=Ch,u.prototype.reverse=Eh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Lh,u.prototype.first=u.prototype.head,_t&&(u.prototype[_t]=Sh),u},Ye=Is();Pe?((Pe.exports=Ye)._=Ye,zr._=Ye):xn._=Ye}).call(Et)})(Cr,Cr.exports);var vd=Cr.exports;const wd=Dg(vd),eu=vn=>(No("data-v-f63718c9"),vn=vn(),Go(),vn),md={class:"my-order"},xd=eu(()=>A("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Ad={class:"nav-item-input"},yd={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Id=["onClick"],Rd={class:"shop-name"},Sd={class:"shop-price"},Cd={key:0,class:"no-stock"},Ed=eu(()=>A("div",null,[A("span",null,"暂无"),A("span",null,"库存")],-1)),Ld=[Ed],Td={key:1,class:"no-stock"},Od=eu(()=>A("div",null,[A("span",null,"平台"),A("span",null,"关闭")],-1)),bd=[Od],Pd={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(vn,{expose:wn,emit:o}){const W=J(null),z=o,S=J(""),P=()=>{z("loadMore",{bar_code:S.value})},H=U=>{if(U.is_used==0)return Sr.error("该商品已被平台关闭");if(U.stock==0)return Sr.warning("该商品无库存");z("changeItem",U)},V=wd.throttle(()=>{z("getStoreList",{bar_code:S.value},!0)},300);wn({bar_code:S});const mn=J(!1),_n=()=>{mn.value=!0},en=()=>{mn.value=!1},In=()=>{var U;(U=W.value)==null||U.focus()};return Lt(()=>{Qi(()=>{var U;(U=W.value)==null||U.focus(),_n()}),En.on("shift",In)}),Tt(()=>{En.off("shift",In)}),(U,q)=>{const an=sn("el-input"),tn=sn("Search"),$=sn("el-icon"),j=sn("el-button"),Z=sn("el-image"),Rn=sn("el-space"),C=Mo("infinite-scroll");return yn(),Dn("div",md,[A("div",{class:Uo(["header-nav",{"input-focus":mn.value}])},[xd,A("div",Ad,[X(an,{modelValue:S.value,"onUpdate:modelValue":q[0]||(q[0]=x=>S.value=x),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:W,onFocus:_n,onBlur:en,onKeyup:Mg(Rr(V),["enter"]),onClear:Rr(V)},null,8,["modelValue","onKeyup","onClear"])]),A("div",{class:"nav-item-btn",onClick:q[1]||(q[1]=(...x)=>Rr(V)&&Rr(V)(...x))},[X(j,{class:"btn",type:"primary"},{default:Ln(()=>[X($,null,{default:Ln(()=>[X(tn)]),_:1})]),_:1})])],2),$o((yn(),Dn("div",yd,[X(Rn,{wrap:"",size:20},{default:Ln(()=>[(yn(!0),Dn(ji,null,nu(vn.storeList,(x,D)=>(yn(),Dn("div",{class:"shop-item",key:D,onClick:fn=>H(x)},[X(Z,{loading:"lazy",src:x.image},null,8,["src"]),A("div",Rd,Kn(x.store_name),1),A("div",Sd,[dn(" ¥"),A("span",null,Kn(x.price),1)]),x.stock==0?(yn(),Dn("div",Cd,Ld)):Ji("",!0),x.is_used==0?(yn(),Dn("div",Td,bd)):Ji("",!0)],8,Id))),128))]),_:1})])),[[C,P]])])}}},Fd=Er(Pd,[["__scopeId","data-v-f63718c9"]]),Wd=vn=>(No("data-v-52f45b9b"),vn=vn(),Go(),vn),Bd={class:"shop"},Dd={key:0,class:"shop-info"},Md={class:"shop-info-left"},Ud={class:"shop-info-right"},$d={class:"shop-info-right-top"},Nd={class:"shop-info-right-center"},Gd={class:"shop-info-right-price"},Hd={class:"shop-sku"},qd=Wd(()=>A("div",{class:"title"},"产品",-1)),Kd={class:"sku"},zd=["onClick"],Zd={class:"dialog-footer"},Yd={__name:"pupop",emits:["changeItem"],setup(vn,{expose:wn,emit:o}){const W=J(!1),z=$=>{W.value=$},S=J({}),P=J(null),H=J(!1),V=J("add"),mn=J({}),_n=($,j="add")=>{V.value=j,j=="add"?(S.value=$,P.value=$.attr[0]):(H.value=!0,mn.value=$,Gg($.product_id).then(Z=>{Z.data.attrValue=JSON.parse(JSON.stringify(Z.data.attr)),Z.data.attr=Object.keys(Z.data.sku),S.value=Z.data,P.value=Z.data.attr[0],H.value=!1}).catch(Z=>{H.value=!1}))},en=o,In=()=>{V.value=="add"?en("changeItem",S.value,P.value):en("editItem",mn.value.cart_id,{cart_num:mn.value.cart_num,product_attr_unique:S.value.sku[P.value].unique}),W.value=!1},U=$=>{P.value=$};wn({show:z,setForm:_n});const q=()=>{if(!W.value)return;let $=S.value.attr.indexOf(P.value);if($>0)return U(S.value.attr[$-1])},an=()=>{if(!W.value)return;let $=S.value.attr.indexOf(P.value);if(${W.value&&In()};return Lt(()=>{En.on("left",q),En.on("right",an),En.on("enter",tn)}),Tt(()=>{En.off("left",q),En.off("right",an),En.off("enter",tn)}),($,j)=>{const Z=sn("el-image"),Rn=sn("el-space"),C=sn("el-button"),x=sn("el-dialog"),D=Mo("loading");return yn(),Vi(x,{modelValue:W.value,"onUpdate:modelValue":j[0]||(j[0]=fn=>W.value=fn),title:"商品规格",width:"650"},Ug({default:Ln(()=>{var fn,pn,ce;return[$o((yn(),Dn("div",Bd,[S.value.sku?(yn(),Dn("div",Dd,[A("div",Md,[X(Z,{loading:"lazy",src:((fn=S.value.sku[P.value])==null?void 0:fn.image)||S.value.image},null,8,["src"])]),A("div",Ud,[A("div",$d,Kn(S.value.store_name),1),A("div",Nd,"库存"+Kn(((pn=S.value.sku[P.value])==null?void 0:pn.stock)||0),1),A("div",Gd,[dn("¥"),A("span",null,Kn(((ce=S.value.sku[P.value])==null?void 0:ce.price)||S.value.price),1)])])])):Ji("",!0),A("div",Hd,[qd,A("div",Kd,[X(Rn,{wrap:"",size:20},{default:Ln(()=>[(yn(!0),Dn(ji,null,nu(S.value.attr,(ne,rt)=>(yn(),Dn("div",{class:Uo(["sku-item",{"sku-item_active":P.value==ne}]),onClick:Ot=>U(ne),key:rt},Kn(ne||"默认规格"),11,zd))),128))]),_:1})])])])),[[D,H.value]])]}),_:2},[V.value!="add"&&S.value.attr&&S.value.attr.length==1?void 0:{name:"footer",fn:Ln(()=>[A("div",Zd,[X(C,{class:"ok-btn",type:"primary",onClick:In},{default:Ln(()=>[dn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},kd=Er(Yd,[["__scopeId","data-v-52f45b9b"]]),Xd={class:"my-card"},nv={__name:"index",setup(vn){const wn=J(null),o=J(null),W=J(null),z=J(null),S=J([]),P=Do(),H=$g(),V=J({page:0,limit:30}),mn=(C={},x=!1)=>{V.value={staff_id:P.userInfo.service.service_id,...V.value,...C},x&&(S.value=[],V.value.page=1,_n.value=!1),Hg(P.userInfo.service.mer_id,V.value).then(D=>{var pn,ce;((ce=(pn=D.data)==null?void 0:pn.list)==null?void 0:ce.length)(ne.attr=Object.keys(ne.sku),ne));S.value=S.value.concat(fn),C.bar_code&&S.value.length==1&&In(C.bar_code)&&(W.value.bar_code="",q(S.value[0],S.value[0].attr[0]))})},_n=J(!1),en=C=>{_n.value||(V.value.page++,mn(C))};function In(C){return/^\d+$/.test(C)}const U=(C,x="")=>{let D={is_new:0,product_id:C.product_id,cart_num:1,product_attr_unique:C.sku[x]!==void 0?C.sku[x].unique:"",staff_id:P.userInfo.service.service_id,product_type:0};Wg(D).then(fn=>{o.value.getList()})},q=(C,x)=>{if(!C.attr||C.attr.length==0||C.attr.length==1)return U(C,C.attr[0]?C.attr[0]:"");if(x)return U(C,x);wn.value.setForm(C,"add"),wn.value.show(!0)},an=(C,x)=>{o.value.editItem(C,x)},tn=C=>{wn.value.setForm(C,"edit"),wn.value.show(!0)},$=()=>{let C=o.value.list.map(D=>D.cart_id),x={takes:[],use_coupon:{},use_integral:!1,cart_id:C};o.value.discounts>0&&(x.deduction_price=o.value.discounts.toFixed(2),x.pay_type="micropay"),Bg(x).then(D=>{z.value.setForm({data:D.data,cart_id:C})})},j=()=>{$(),z.value.drawer=!0},Z=()=>{o.value.getList()},Rn=()=>{console.log("F9"),H.name=="home"&&(!z.value.drawer&&o.value.list.length>0?j():z.value.beforeClose())};return Lt(()=>{mn(),V.value.page++,En.on("F9",Rn)}),Tt(()=>{En.off("F9",Rn)}),(C,x)=>(yn(),Dn("div",Xd,[X(dd,{ref_key:"orderRef",ref:o,onGoPay:j,onEditPupop:tn},null,512),X(Ng),X(Fd,{ref_key:"shopRef",ref:W,style:{flex:"1"},storeList:S.value,onGetStoreList:mn,onChangeItem:q,onLoadMore:en},null,8,["storeList"]),X(kd,{ref_key:"pupopRef",ref:wn,onChangeItem:q,onEditItem:an},null,512),X(Fg,{ref_key:"payRef",ref:z,onPaySuccess:Z},null,512)]))}};export{nv as default}; diff --git a/dist/assets/indexList-DCxZB4jo.js b/dist/assets/indexList-XCr1z72_.js similarity index 84% rename from dist/assets/indexList-DCxZB4jo.js rename to dist/assets/indexList-XCr1z72_.js index d52f717..9e4bbb7 100644 --- a/dist/assets/indexList-DCxZB4jo.js +++ b/dist/assets/indexList-XCr1z72_.js @@ -1 +1 @@ -import{e as F,a as G,p as J,g as K,f as Q}from"./pay-DFmO-d88.js";import{_ as W,u as X,r as s,b as d,j as Y,p as Z,c as u,h as v,f as t,w as o,g as r,t as ee,e as P,d as I,z as te,E as h,s as ae,v as oe}from"./index-3-ddzq9I.js";const le=m=>(ae("data-v-80048b20"),m=m(),oe(),m),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ue=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ce={class:"dialog-footer"},pe={__name:"indexList",setup(m){const k=X(),C=s([]),b=te(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),w=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(k.userInfo.service.mer_id,n.value).then(e=>{C.value=e.data.list,w.value=e.data.count,y.value=!1})};i();const x=s(0);(()=>{G({staff_id:k.userInfo.service.service_id}).then(e=>{var a;x.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},z=e=>{K({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),E=()=>{_.value=!1,Q({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),U=e=>{L.value=e,_.value=!0},O=()=>{b.push({name:"home"})};return(e,a)=>{const S=d("el-radio-button"),T=d("el-radio-group"),c=d("el-table-column"),p=d("el-button"),j=d("el-table"),H=d("el-pagination"),M=d("el-dialog"),q=Y("loading");return Z((u(),v("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(S,{value:1},{default:o(()=>[r("全部")]),_:1}),t(S,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(c,{prop:"group_order_id",label:"ID",width:"100"}),t(c,{prop:"order_sn",label:"订单号",width:"260"}),t(c,{prop:"total_price",label:"订单金额"}),t(c,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(u(),v("span",ne,"已支付")):(u(),v("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),v("span",ie,ee(l.row.pay_time),1)):(u(),v("div",de,[t(p,{type:"primary",link:"",onClick:V=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>U(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(H,{"page-size":n.value.limit,layout:"prev, pager, next",total:w.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(J,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(M,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ce,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(u(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(u(),I(p,{key:1,type:"primary",onClick:E},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ue]),_:1},8,["modelValue"])])),[[q,y.value]])}}},ge=W(pe,[["__scopeId","data-v-80048b20"]]);export{ge as default}; +import{e as F,a as G,p as J,g as K,f as Q}from"./pay-EEWGeT4Q.js";import{_ as W,u as X,r as s,b as d,l as Y,v as Z,c as u,h as v,f as t,w as o,g as r,t as ee,e as P,d as I,C as te,E as h,y as ae,z as oe}from"./index-BpXYCW1n.js";const le=m=>(ae("data-v-80048b20"),m=m(),oe(),m),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ue=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ce={class:"dialog-footer"},pe={__name:"indexList",setup(m){const k=X(),C=s([]),b=te(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),w=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(k.userInfo.service.mer_id,n.value).then(e=>{C.value=e.data.list,w.value=e.data.count,y.value=!1})};i();const x=s(0);(()=>{G({staff_id:k.userInfo.service.service_id}).then(e=>{var a;x.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},z=e=>{K({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),E=()=>{_.value=!1,Q({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),U=e=>{L.value=e,_.value=!0},O=()=>{b.push({name:"home"})};return(e,a)=>{const S=d("el-radio-button"),T=d("el-radio-group"),c=d("el-table-column"),p=d("el-button"),H=d("el-table"),M=d("el-pagination"),j=d("el-dialog"),q=Y("loading");return Z((u(),v("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(S,{value:1},{default:o(()=>[r("全部")]),_:1}),t(S,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(H,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(c,{prop:"group_order_id",label:"ID",width:"100"}),t(c,{prop:"order_sn",label:"订单号",width:"260"}),t(c,{prop:"total_price",label:"订单金额"}),t(c,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(u(),v("span",ne,"已支付")):(u(),v("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),v("span",ie,ee(l.row.pay_time),1)):(u(),v("div",de,[t(p,{type:"primary",link:"",onClick:V=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>U(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(M,{"page-size":n.value.limit,layout:"prev, pager, next",total:w.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(J,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(j,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ce,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(u(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(u(),I(p,{key:1,type:"primary",onClick:E},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ue]),_:1},8,["modelValue"])])),[[q,y.value]])}}},ge=W(pe,[["__scopeId","data-v-80048b20"]]);export{ge as default}; diff --git a/dist/assets/padding-5Tza0aT3.js b/dist/assets/padding-CLyithQn.js similarity index 65% rename from dist/assets/padding-5Tza0aT3.js rename to dist/assets/padding-CLyithQn.js index b5f8e46..beda910 100644 --- a/dist/assets/padding-5Tza0aT3.js +++ b/dist/assets/padding-CLyithQn.js @@ -1 +1 @@ -import{_ as e,c as t,h as c}from"./index-3-ddzq9I.js";const n={},o={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",o)}const i=e(n,[["render",s]]);export{i as p}; +import{_ as e,c as t,h as c}from"./index-BpXYCW1n.js";const n={},o={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",o)}const i=e(n,[["render",s]]);export{i as p}; diff --git a/dist/assets/pay-DFmO-d88.js b/dist/assets/pay-EEWGeT4Q.js similarity index 54% rename from dist/assets/pay-DFmO-d88.js rename to dist/assets/pay-EEWGeT4Q.js index 8906eca..d5b7b76 100644 --- a/dist/assets/pay-DFmO-d88.js +++ b/dist/assets/pay-EEWGeT4Q.js @@ -1 +1 @@ -import{A as d,_ as de,r as n,u as ve,D as _e,o as pe,m as j,a as fe,b as I,j as me,c as k,d as Y,w as b,e as o,l as R,g as L,t as F,p as ge,h as A,f as S,k as ye,F as he,i as ke,n as V,E as m,s as be,v as we}from"./index-3-ddzq9I.js";function Ze(t){return d.post("user/cart/create",t)}function ea(t){return d.get("user/cart/lst",{params:t})}function aa(t,u){return d.post(`user/cart/change/${t}`,u)}function sa(t){return d.post("v2/order/check",t)}function ta(t){return d.post("user/cart/delete",t)}function Z(t){return d.post("v2/order/create",t)}function Ce(t,u){return d.post(`order/pay/${t}`,u)}function Ae(t){return d.get("micropay_query",{params:t})}function oa(t,u){return d.get(`admin/${t}/order_list`,{params:u})}function la(t,u){return d.get(`verifier/${t}/order/${u}`)}function ra(t){return d.get("order_lading",{params:t})}function na(t,u,U){return d.post(`verifier/${t}/${u}`,U)}const T=t=>{if(!t)return;let u=new window.SpeechSynthesisUtterance(t);window.speechSynthesis.speak(u)},D=t=>(be("data-v-f7abe660"),t=t(),we(),t),Se=D(()=>o("h4",null,"选择支付方式",-1)),xe={class:"dra-body"},$e={class:"header"},Le=D(()=>o("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Ve={style:{color:"#f5222d","padding-bottom":"2rem"}},De={style:{"font-size":"1.6rem"}},Ee={key:0,"element-loading-text":"支付中",class:"card1"},Be=D(()=>o("div",{class:"tips"},null,-1)),je={key:1,class:"card2"},Ie={class:"drawer-body"},Pe={class:"counter"},Fe={class:"received"},Te={key:0},Ue={key:1,style:{"font-size":"1rem",color:"#999"}},ze={key:0,class:"balance"},Ne={class:"money"},Oe=D(()=>o("div",{class:"tips"},"按回车(Enter)确认支付",-1)),qe={key:1,class:"balance"},Re=D(()=>o("div",null,"不够找零, 请支付更多金额",-1)),Ke=D(()=>o("div",{class:"tips"},"按下小键盘输入金额",-1)),Me=[Re,Ke],We={class:"keypad"},Ge={class:"left"},He={class:"right"},Je={style:{width:"100%",display:"flex","justify-content":"center"}},Qe={__name:"pay",emits:["paySuccess"],setup(t,{expose:u,emit:U}){const g=n(!1),y=n(1),l=n(""),v=n(""),K=ve(),ee=()=>{w()},ae=()=>{V(()=>{setTimeout(()=>{var e;c.value=!1,l.value="",N.value=!0,(e=v.value)==null||e.focus(),x(y.value)},300)})},x=e=>{y.value=e,y.value==2?window.addEventListener("keydown",q):(window.removeEventListener("keydown",q),V(()=>{var a;l.value="",(a=v.value)==null||a.focus()}))},h=n({}),z=n([]),se=e=>{h.value=e.data,z.value=e.cart_id},te=e=>{h.value.order_price=e.price,_.value=e.order_id},oe=U,N=n(!1),le=n(["1","2","3","4","5","6","7","8","9","0","00","."]);let $=0;const M=/^(10|11|12|13|14|15)\d{16}$/,W=/^(25|26|27|28|29|30)\d{14,22}$/,_=n(""),re=()=>{if(c.value=!0,v.value.blur(),_.value)G(_.value);else{let e;if(M.test(l.value))e="micropay";else if(W.test(l.value))e="alipayBar";else return c.value=!1,l.value="",v.value.focus(),m.error("请输入正确的支付码");Z({address_id:"",key:h.value.key,cart_id:z.value,pay_type:e,auth_code:l.value,staff_id:K.userInfo.service.service_id}).then(a=>{if(a.status==200&&(a.message=="支付成功"||a.message=="success"))g.value=!1,m({message:a.message=="success"?"支付成功":a.message,type:"success"}),T(a.data.message||a.data.result.message),w();else if(a.data.group_order_sn)_.value=a.data.group_order_id,E.value=0,$=0,P(a.data.group_order_sn);else return _.value=a.data.result.order_id,c.value=!1,m({message:a.message,type:"error"})}).catch(a=>{c.value=!1,V(()=>{var s;(s=v.value)==null||s.focus()})})}},G=e=>{let a;if(y.value==1){let s;if(M.test(l.value))s="micropay";else if(W.test(l.value))s="alipayBar";else return c.value=!1,l.value="",v.value.focus(),m.error("请输入正确的支付码");a={type:s,auth_code:l.value}}else a={type:"cash_payment"};Ce(e,a).then(s=>{s.status==200&&(s.message=="支付成功"||s.message=="success")?(g.value=!1,m({message:s.message=="success"?"支付成功":s.message,type:"success"}),T(s.data.message||s.data.result.message),w()):(_.value=s.data.group_order_id,E.value=0,$=0,P(s.data.group_order_sn))}).catch(s=>{l.value="",c.value=!1,V(()=>{var C;(C=v.value)==null||C.focus()})})},E=n(0),P=e=>{e&&(E.value++,$+=5e3,Ae({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(m({message:a.message,type:"success"}),T(a.data.message),w()):(m({message:a.message,type:"error"}),l.value="",c.value=!1,V(()=>{var s;(s=v.value)==null||s.focus()}))}).catch(a=>{N.value&&E.value<3?setTimeout(()=>{P(e)},15e3-$>0?15e3-$:0):(l.value="",c.value=!1,V(()=>{var s;(s=v.value)==null||s.focus()}))}))},w=()=>{var e;window.removeEventListener("keydown",q),N.value=!1,c.value=!1,l.value="",r.value="",p.value=[],(e=v.value)==null||e.blur(),oe("paySuccess"),g.value=!1},c=n(!1);u({drawer:g,setForm:se,setRePay:te,beforeClose:w});const p=n([]),r=n(""),B=_e(()=>+r.value>0?(r.value-h.value.order_price).toFixed(2):-1),H=n(!1),O=e=>{e===-1?p.value=[]:p.value.pop(),r.value=p.value.length?p.value.join(""):0},i=e=>{H.value===!1&&(r.value="",H.value=!0);let a=String(r.value).indexOf(".")+1,s=String(r.value).length-a;console.log(a,s),(a===0||s<2)&&(p.value.join("")<=9999999&&p.value.push(e),r.value=p.value.join("")>99999999?99999999:p.value.join(""))},J=()=>{if(B.value===""||B.value===null||B.value===void 0||+r.value<+h.value.order_price)return m.error("收款金额应该大于等于应收金额");_.value?G(_.value):Z({address_id:"",key:h.value.key,cart_id:z.value,pay_type:"cash_payment",staff_id:K.userInfo.service.service_id}).then(e=>{if(e.status==200&&e.message=="支付成功")g.value=!1,m({message:e.message,type:"success"}),T(e.data.message),w();else if(e.data.group_order_sn)_.value=e.data.group_order_id,E.value=0,$=0,P(e.data.group_order_sn);else return _.value=e.data.result.order_id,r.value="",p.value=[],c.value=!1,m({message:e.message,type:"error"})}).catch(e=>{c.value=!1})},q=e=>{let s=(e||window.event).keyCode;if(s==37)return x(2);if(s==120)return j.emit("F9");if(s==27)return w();switch(e.stopPropagation(),e.preventDefault(),s){case 96:case 48:i(0);break;case 97:case 49:i(1);break;case 98:case 50:i(2);break;case 99:case 51:i(3);break;case 100:case 52:i(4);break;case 101:case 53:i(5);break;case 102:case 54:i(6);break;case 103:case 55:i(7);break;case 104:case 56:i(8);break;case 105:case 57:i(9);break;case 110:i(".");break;case 190:i(".");break;case 8:O();break;case 13:J();break}},Q=()=>{if(g.value&&y.value==2)return x(1)},X=()=>{if(g.value&&y.value==1)return x(2)};return pe(()=>{j.on("left",Q),j.on("right",X)}),fe(()=>{j.off("left",Q),j.off("right",X)}),(e,a)=>{const s=I("el-input"),C=I("el-button"),ne=I("Delete"),ue=I("el-icon"),ce=I("el-drawer"),ie=me("loading");return k(),Y(ce,{size:800,modelValue:g.value,"onUpdate:modelValue":a[4]||(a[4]=f=>g.value=f),direction:"rtl",onOpen:ae,"before-close":w},{header:b(()=>[Se]),default:b(()=>[o("div",xe,[o("div",$e,[o("div",{class:R(["left",{active:y.value==1}]),onClick:a[0]||(a[0]=f=>x(1))}," 微信/支付宝 ",2),o("div",{class:R(["right",{active:y.value==2}]),onClick:a[1]||(a[1]=f=>x(2))}," 现金收款 ",2)]),Le,o("div",Ve,[L(" ¥"),o("span",De,F(h.value.order_price),1)]),y.value==1?ge((k(),A("div",Ee,[S(s,{ref_key:"codeRef",ref:v,modelValue:l.value,"onUpdate:modelValue":a[2]||(a[2]=f=>l.value=f),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ye(re,["enter"])},null,8,["modelValue"]),Be])),[[ie,c.value]]):(k(),A("div",je,[o("div",Ie,[o("div",Pe,[o("div",Fe,[r.value?(k(),A("span",Te,F(r.value),1)):(k(),A("span",Ue,"按下键盘输入客户支付金额"))]),B.value>=0?(k(),A("div",ze,[o("div",null,[L("需找零(元):"),o("span",Ne,"¥"+F(B.value),1)]),Oe])):(k(),A("div",qe,Me)),o("div",We,[o("div",Ge,[(k(!0),A(he,null,ke(le.value,f=>(k(),Y(C,{key:f,onClick:Xe=>i(f)},{default:b(()=>[L(F(f),1)]),_:2},1032,["onClick"]))),128))]),o("div",He,[S(C,{onClick:O},{default:b(()=>[S(ue,null,{default:b(()=>[S(ne)]),_:1})]),_:1}),S(C,{onClick:a[3]||(a[3]=f=>O(-1))},{default:b(()=>[L("C")]),_:1}),S(C,{class:R(["enter",{"enter-disable":+r.value<+h.value.order_price}]),disabled:+r.value<+h.value.order_price,onClick:J},{default:b(()=>[L(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:b(()=>[o("div",Je,[S(C,{class:"cancel-btn",onClick:ee},{default:b(()=>[L("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ua=de(Qe,[["__scopeId","data-v-f7abe660"]]);export{ea as a,aa as b,ta as c,Ze as d,oa as e,ra as f,Ae as g,na as h,sa as o,ua as p,la as v}; +import{D as d,_ as de,r as n,u as ve,I as _e,o as pe,m as I,a as fe,b as P,l as me,c as k,d as Y,w as b,e as o,s as R,g as L,t as z,v as ye,h as S,f as A,p as ge,F as he,i as ke,n as V,E as m,y as be,z as we}from"./index-BpXYCW1n.js";function Ze(t){return d.post("user/cart/create",t)}function ea(t){return d.get("user/cart/lst",{params:t})}function aa(t,u){return d.post(`user/cart/change/${t}`,u)}function sa(t){return d.post("v2/order/check",t)}function ta(t){return d.post("user/cart/delete",t)}function Z(t){return d.post("v2/order/create",t)}function Ce(t,u){return d.post(`order/pay/${t}`,u)}function Se(t){return d.get("micropay_query",{params:t})}function oa(t,u){return d.get(`admin/${t}/order_list`,{params:u})}function la(t,u){return d.get(`verifier/${t}/order/${u}`)}function ra(t){return d.get("order_lading",{params:t})}function na(t,u,T){return d.post(`verifier/${t}/${u}`,T)}const F=t=>{if(!t)return;let u=new window.SpeechSynthesisUtterance(t);window.speechSynthesis.speak(u)},D=t=>(be("data-v-f7abe660"),t=t(),we(),t),Ae=D(()=>o("h4",null,"选择支付方式",-1)),xe={class:"dra-body"},$e={class:"header"},Le=D(()=>o("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Ve={style:{color:"#f5222d","padding-bottom":"2rem"}},De={style:{"font-size":"1.6rem"}},Ee={key:0,"element-loading-text":"支付中",class:"card1"},Be=D(()=>o("div",{class:"tips"},null,-1)),Ie={key:1,class:"card2"},Pe={class:"drawer-body"},je={class:"counter"},ze={class:"received"},Fe={key:0},Te={key:1,style:{"font-size":"1rem",color:"#999"}},Ue={key:0,class:"balance"},Ne={class:"money"},Oe=D(()=>o("div",{class:"tips"},"按回车(Enter)确认支付",-1)),qe={key:1,class:"balance"},Re=D(()=>o("div",null,"不够找零, 请支付更多金额",-1)),Ke=D(()=>o("div",{class:"tips"},"按下小键盘输入金额",-1)),Me=[Re,Ke],We={class:"keypad"},Ge={class:"left"},He={class:"right"},Je={style:{width:"100%",display:"flex","justify-content":"center"}},Qe={__name:"pay",emits:["paySuccess"],setup(t,{expose:u,emit:T}){const y=n(!1),g=n(1),l=n(""),v=n(""),K=ve(),ee=()=>{w()},ae=()=>{V(()=>{setTimeout(()=>{var e;c.value=!1,l.value="",N.value=!0,(e=v.value)==null||e.focus(),x(g.value)},300)})},x=e=>{g.value=e,g.value==2?window.addEventListener("keydown",q):(window.removeEventListener("keydown",q),V(()=>{var a;l.value="",(a=v.value)==null||a.focus()}))},h=n({}),U=n([]),se=e=>{h.value=e.data,U.value=e.cart_id},te=e=>{h.value.order_price=e.price,_.value=e.order_id},oe=T,N=n(!1),le=n(["1","2","3","4","5","6","7","8","9","0","00","."]);let $=0;const M=/^(10|11|12|13|14|15)\d{16}$/,W=/^(25|26|27|28|29|30)\d{14,22}$/,_=n(""),re=()=>{if(c.value=!0,v.value.blur(),_.value)G(_.value);else{let e;if(M.test(l.value))e="micropay";else if(W.test(l.value))e="alipayBar";else return c.value=!1,l.value="",v.value.focus(),m.error("请输入正确的支付码");Z({address_id:"",key:h.value.key,cart_id:U.value,pay_type:e,auth_code:l.value,staff_id:K.userInfo.service.service_id}).then(a=>{if(a.status==200&&(a.message=="支付成功"||a.message=="success"))y.value=!1,m({message:a.message=="success"?"支付成功":a.message,type:"success"}),F(a.data.message||a.data.result.message),w();else if(a.data.group_order_sn)_.value=a.data.group_order_id,E.value=0,$=0,j(a.data.group_order_sn);else return _.value=a.data.result.order_id,c.value=!1,m({message:a.message,type:"error"})}).catch(a=>{c.value=!1,V(()=>{var s;(s=v.value)==null||s.focus()})})}},G=e=>{let a;if(g.value==1){let s;if(M.test(l.value))s="micropay";else if(W.test(l.value))s="alipayBar";else return c.value=!1,l.value="",v.value.focus(),m.error("请输入正确的支付码");a={type:s,auth_code:l.value}}else a={type:"cash_payment"};Ce(e,a).then(s=>{s.status==200&&(s.message=="支付成功"||s.message=="success")?(y.value=!1,m({message:s.message=="success"?"支付成功":s.message,type:"success"}),F(s.data.message||s.data.result.message),w()):(_.value=s.data.group_order_id,E.value=0,$=0,j(s.data.group_order_sn))}).catch(s=>{l.value="",c.value=!1,V(()=>{var C;(C=v.value)==null||C.focus()})})},E=n(0),j=e=>{e&&(E.value++,$+=5e3,Se({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(m({message:a.message,type:"success"}),F(a.data.message),w()):(m({message:a.message,type:"error"}),l.value="",c.value=!1,V(()=>{var s;(s=v.value)==null||s.focus()}))}).catch(a=>{N.value&&E.value<3?setTimeout(()=>{j(e)},15e3-$>0?15e3-$:0):(l.value="",c.value=!1,V(()=>{var s;(s=v.value)==null||s.focus()}))}))},w=()=>{var e;window.removeEventListener("keydown",q),N.value=!1,c.value=!1,l.value="",r.value="",p.value=[],(e=v.value)==null||e.blur(),oe("paySuccess"),y.value=!1},c=n(!1);u({drawer:y,setForm:se,setRePay:te,beforeClose:w});const p=n([]),r=n(""),B=_e(()=>+r.value>0?(r.value-h.value.order_price).toFixed(2):-1),H=n(!1),O=e=>{e===-1?p.value=[]:p.value.pop(),r.value=p.value.length?p.value.join(""):0},i=e=>{H.value===!1&&(r.value="",H.value=!0);let a=String(r.value).indexOf(".")+1,s=String(r.value).length-a;console.log(a,s),(a===0||s<2)&&(p.value.join("")<=9999999&&p.value.push(e),r.value=p.value.join("")>99999999?99999999:p.value.join(""))},J=()=>{if(B.value===""||B.value===null||B.value===void 0||+r.value<+h.value.order_price)return m.error("收款金额应该大于等于应收金额");_.value?G(_.value):Z({address_id:"",key:h.value.key,cart_id:U.value,pay_type:"cash_payment",staff_id:K.userInfo.service.service_id}).then(e=>{if(e.status==200&&e.message=="支付成功")y.value=!1,m({message:e.message,type:"success"}),F(e.data.message),w();else if(e.data.group_order_sn)_.value=e.data.group_order_id,E.value=0,$=0,j(e.data.group_order_sn);else return _.value=e.data.result.order_id,r.value="",p.value=[],c.value=!1,m({message:e.message,type:"error"})}).catch(e=>{c.value=!1})},q=e=>{let s=(e||window.event).keyCode;if(s==37)return x(2);if(s==120)return I.emit("F9");if(s==27)return w();switch(e.stopPropagation(),e.preventDefault(),s){case 96:case 48:i(0);break;case 97:case 49:i(1);break;case 98:case 50:i(2);break;case 99:case 51:i(3);break;case 100:case 52:i(4);break;case 101:case 53:i(5);break;case 102:case 54:i(6);break;case 103:case 55:i(7);break;case 104:case 56:i(8);break;case 105:case 57:i(9);break;case 110:i(".");break;case 190:i(".");break;case 8:O();break;case 13:J();break}},Q=()=>{if(y.value&&g.value==2)return x(1)},X=()=>{if(y.value&&g.value==1)return x(2)};return pe(()=>{I.on("left",Q),I.on("right",X)}),fe(()=>{I.off("left",Q),I.off("right",X)}),(e,a)=>{const s=P("el-input"),C=P("el-button"),ne=P("Delete"),ue=P("el-icon"),ce=P("el-drawer"),ie=me("loading");return k(),Y(ce,{size:800,modelValue:y.value,"onUpdate:modelValue":a[4]||(a[4]=f=>y.value=f),direction:"rtl",onOpen:ae,"before-close":w},{header:b(()=>[Ae]),default:b(()=>[o("div",xe,[o("div",$e,[o("div",{class:R(["left",{active:g.value==1}]),onClick:a[0]||(a[0]=f=>x(1))}," 微信/支付宝 ",2),o("div",{class:R(["right",{active:g.value==2}]),onClick:a[1]||(a[1]=f=>x(2))}," 现金收款 ",2)]),Le,o("div",Ve,[L(" ¥"),o("span",De,z(h.value.order_price),1)]),g.value==1?ye((k(),S("div",Ee,[A(s,{ref_key:"codeRef",ref:v,modelValue:l.value,"onUpdate:modelValue":a[2]||(a[2]=f=>l.value=f),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ge(re,["enter"])},null,8,["modelValue"]),Be])),[[ie,c.value]]):(k(),S("div",Ie,[o("div",Pe,[o("div",je,[o("div",ze,[r.value?(k(),S("span",Fe,z(r.value),1)):(k(),S("span",Te,"按下键盘输入客户支付金额"))]),B.value>=0?(k(),S("div",Ue,[o("div",null,[L("需找零(元):"),o("span",Ne,"¥"+z(B.value),1)]),Oe])):(k(),S("div",qe,Me)),o("div",We,[o("div",Ge,[(k(!0),S(he,null,ke(le.value,f=>(k(),Y(C,{key:f,onClick:Xe=>i(f)},{default:b(()=>[L(z(f),1)]),_:2},1032,["onClick"]))),128))]),o("div",He,[A(C,{onClick:O},{default:b(()=>[A(ue,null,{default:b(()=>[A(ne)]),_:1})]),_:1}),A(C,{onClick:a[3]||(a[3]=f=>O(-1))},{default:b(()=>[L("C")]),_:1}),A(C,{class:R(["enter",{"enter-disable":+r.value<+h.value.order_price}]),disabled:+r.value<+h.value.order_price,onClick:J},{default:b(()=>[L(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:b(()=>[o("div",Je,[A(C,{class:"cancel-btn",onClick:ee},{default:b(()=>[L("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ua=de(Qe,[["__scopeId","data-v-f7abe660"]]);export{ea as a,aa as b,ta as c,Ze as d,oa as e,ra as f,Se as g,na as h,sa as o,ua as p,la as v}; diff --git a/dist/assets/shop-BCVM-Dnd.js b/dist/assets/shop-DouiAmok.js similarity index 75% rename from dist/assets/shop-BCVM-Dnd.js rename to dist/assets/shop-DouiAmok.js index 267d618..24105ed 100644 --- a/dist/assets/shop-BCVM-Dnd.js +++ b/dist/assets/shop-DouiAmok.js @@ -1 +1 @@ -import{A as e}from"./index-3-ddzq9I.js";function u(r,t){return e.get(`server/${r}/product/lst`,{params:t})}function a(r,t){return e.get(`store/product/detail/${r}`,{params:t})}function o(r,t){return e.post(`user_free_trial/${r}`,t)}export{a as g,u as s,o as u}; +import{D as e}from"./index-BpXYCW1n.js";function u(r,t){return e.get(`server/${r}/product/lst`,{params:t})}function a(r,t){return e.get(`store/product/detail/${r}`,{params:t})}function o(r,t){return e.post(`user_free_trial/${r}`,t)}export{a as g,u as s,o as u}; diff --git a/dist/index.html b/dist/index.html index a7eafed..521b3d5 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,7 +5,7 @@ 里海收银系统 - + diff --git a/package-lock.json b/package-lock.json index 6ae3644..66b1399 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@element-plus/icons-vue": "^2.3.1", "axios": "^1.6.8", "element-plus": "^2.6.3", + "lodash": "^4.17.21", "mitt": "^3.0.1", "pinia": "^2.1.7", "sass": "^1.72.0", diff --git a/package.json b/package.json index efea3a6..f1a5ce0 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@element-plus/icons-vue": "^2.3.1", "axios": "^1.6.8", "element-plus": "^2.6.3", + "lodash": "^4.17.21", "mitt": "^3.0.1", "pinia": "^2.1.7", "sass": "^1.72.0", diff --git a/src/views/convert/component/detail.vue b/src/views/convert/component/detail.vue index 5fd3bfc..bb059f1 100644 --- a/src/views/convert/component/detail.vue +++ b/src/views/convert/component/detail.vue @@ -79,6 +79,7 @@ const getOrderStatus = (id) => { .catch((err) => {}); }; +const emit = defineEmits(['reInit']) const tableRef = ref(null); // 核销 const convert = ()=>{ @@ -95,7 +96,7 @@ const convert = ()=>{ }); verifierApi(userStore.userInfo.service.mer_id, formData.value.order_id, query).then(res=>{ ElMessage.success(res.message); - + emit('reInit'); }).catch(err=>{ ElMessage.error(err.message) }) diff --git a/src/views/convert/component/order.vue b/src/views/convert/component/order.vue index edb3708..aa582b4 100644 --- a/src/views/convert/component/order.vue +++ b/src/views/convert/component/order.vue @@ -76,6 +76,12 @@ const setCode = (code)=>{ getOrderList(true); } +const emit = defineEmits(["backOne"]); + +const backOne = ()=>{ + emit("backOne"); +} + defineExpose({ setCode, }) @@ -86,7 +92,7 @@ defineExpose({
diff --git a/src/views/convert/index.vue b/src/views/convert/index.vue index 22ad83f..001853b 100644 --- a/src/views/convert/index.vue +++ b/src/views/convert/index.vue @@ -6,7 +6,7 @@ import { ref, nextTick, onMounted } from "vue"; import { ElMessage } from "element-plus"; const type = ref(1); -const code = ref("7905655999175400"); +const code = ref(""); const inputRef = ref(null); const orderRef = ref(null); @@ -18,6 +18,10 @@ const handleEnterKey = () => { }); }; +const reInit = ()=>{ + handleEnterKey(); +} + onMounted(() => { nextTick(() => { inputRef.value.focus(); @@ -40,9 +44,9 @@ onMounted(() => {
查询
- + - + diff --git a/src/views/home/component/order.vue b/src/views/home/component/order.vue index 6d31562..80cd789 100644 --- a/src/views/home/component/order.vue +++ b/src/views/home/component/order.vue @@ -1,5 +1,5 @@