diff --git a/dist/assets/detail-CEWzHPJj.js b/dist/assets/detail-CEWzHPJj.js deleted file mode 100644 index cd67983..0000000 --- a/dist/assets/detail-CEWzHPJj.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as j,u as H,r,b as g,l as Y,c as t,h as s,e,t as d,f as c,w as u,g as m,p as Q,v as q,F,i as M,s as A,d as K,x as l,m as O,C as W,E as R,y as X,z as Z}from"./index-BSSh7Jos.js";import{e as ee,f as te,g as se}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js";import{p as oe}from"./pay-BcBBz6sQ.js";const ae={class:"my-order"},ie={class:"header-nav"},le={class:"nav-item"},ne={class:"nav-item-btn"},de={class:"header-input"},ce={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},re=["onClick"],_e={class:"top"},ue={class:"create-time"},ve={class:"shop"},pe={key:0,class:"left"},fe={key:0,class:"shop-name"},me={class:"right"},he={class:"money"},ye={class:"count"},ge={class:"bottom"},ke={class:"pay"},$e={key:0},be={key:0},Ce={key:1},Ve={key:2},Se={key:3},we={key:4},Pe={key:5},Le={key:6},De={key:1,style:{color:"#ff4a00"}},Ie={key:0,class:"cashier"},Ae={key:1,class:"cashier"},xe={key:0,class:"load-end"},ze={key:1,class:"load-end"},Be={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup(V){const L=H(),o=V;r([]);const $=r(1),x=k=>{v.value.page=1,S.value=!1,p.value=!1,b.value=[],n(!0)};r(null);const y=r(""),D=()=>{v.value.date=y.value.join("-"),n(!0)},v=r({page:1,limit:20,search_info:"",date:"",staff_id:0}),p=r(!1),z=r(0),P=r(0),S=r(!1),b=r([]),n=(k=!1)=>{if(k)v.value.page=1;else if(S.value||p.value)return;o.isSystem||(v.value.staff_id=L.userInfo.service.service_id),p.value=!0,$.value==1&&(v.value.paid=null),$.value==2&&(v.value.paid=0),ee(L.userInfo.service.mer_id,v.value).then(i=>{k?b.value=i.data.list:b.value=[...b.value,...i.data.list],i.data.list.length{S.value=!0,p.value=!1})},_=(k,i)=>{P.value=i,O.emit("set-order-detail",k)};return(k,i)=>{const I=g("el-radio-button"),C=g("el-radio-group"),B=g("el-date-picker"),U=g("el-button"),f=g("el-input"),w=g("el-image"),T=Y("loading"),G=Y("infinite-scroll");return t(),s("div",ae,[e("div",ie,[e("div",le,d(V.isSystem?"平台订单":"收银订单"),1),e("div",ne,[c(C,{modelValue:$.value,"onUpdate:modelValue":i[0]||(i[0]=a=>$.value=a),onChange:x,size:"small"},{default:u(()=>[c(I,{value:1},{default:u(()=>[m("全部")]),_:1}),c(I,{value:2},{default:u(()=>[m("未支付")]),_:1})]),_:1},8,["modelValue"]),c(B,{modelValue:y.value,"onUpdate:modelValue":i[1]||(i[1]=a=>y.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:D,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",de,[c(f,{modelValue:v.value.search_info,"onUpdate:modelValue":i[3]||(i[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=Q(a=>n(!0),["enter"])),onClear:i[5]||(i[5]=a=>n(!0)),clearable:""},{append:u(()=>[c(U,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:i[2]||(i[2]=a=>n(!0))},{default:u(()=>[m("搜索")]),_:1})]),_:1},8,["modelValue"])]),q((t(),s("div",ce,[(t(!0),s(F,null,M(b.value,(a,E)=>(t(),s("div",{class:A(["item",{"item-active":P.value==E}]),key:E,onClick:N=>_(a,E)},[e("div",_e,[e("div",{class:A(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+d(a.order_sn),3),e("div",ue,d(a.create_time),1)]),e("div",ve,[a.orderProduct?(t(),s("div",pe,[(t(!0),s(F,null,M(a.orderProduct.slice(0,5),(N,J)=>(t(),K(w,{key:J,src:N.cart_info.productAttr.image||N.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",fe,d(a.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",me,[e("div",he,"¥"+d(a.pay_price),1),e("div",ye,"共"+d(a.total_num)+"件商品",1)])]),e("div",ge,[e("div",ke,[a.paid?(t(),s("div",$e,[m(" 已支付 "),a.pay_type==13?(t(),s("span",be,"(支付宝收款)")):l("",!0),a.pay_type==12?(t(),s("span",Ce,"(现金支付)")):l("",!0),a.pay_type==11?(t(),s("span",Ve,"(微信收款)")):l("",!0),a.pay_type==0?(t(),s("span",Se,"(余额支付)")):l("",!0),a.pay_type==1?(t(),s("span",we,"(微信支付)")):l("",!0),a.pay_type==9?(t(),s("span",Pe,"(商户余额支付)")):l("",!0),a.pay_type==10?(t(),s("span",Le,"(对公转账)")):l("",!0)])):(t(),s("div",De,"未支付"))]),a.service_info?(t(),s("div",Ie," 收银员: "+d(a.service_info.nickname),1)):(t(),s("div",Ae,"平台订单"))])],10,re))),128)),S.value?(t(),s("div",xe,"没有更多了")):l("",!0),p.value?(t(),s("div",ze,"加载中...")):l("",!0)])),[[T,p.value],[G,n]])])}}},Tt=j(Be,[["__scopeId","data-v-b99dc933"]]),h=V=>(X("data-v-f0903720"),V=V(),Z(),V),Ue={class:"my-order"},Ee={class:"header-nav"},Ne=["onClick"],Re={class:"detail"},Ye={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},Me={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Oe={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},je=h(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},qe={class:"info-item"},Ge=h(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=h(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=h(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=h(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=h(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},ct=h(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),rt={class:"info-item-info"},_t={class:"info-item"},ut=h(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),vt={class:"info-item-info"},pt={key:0},ft={key:1},mt={key:2},ht={key:3},yt={key:4},gt={key:5},kt={key:6},$t={key:0,class:"table-title"},bt={key:1,class:"table-info",style:{"flex-direction":"column"}},Ct={class:"info-item"},Vt=h(()=>e("div",{class:"info-item-title"},"头像:",-1)),St={class:"info-item-info"},wt={class:"info-item"},Pt=h(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Lt={class:"info-item-info"},Dt={class:"info-item"},It=h(()=>e("div",{class:"info-item-title"},"账号:",-1)),At={class:"info-item-info"},xt={key:2,class:"footer"},zt={class:"info"},Bt={class:"ser"},Ut={class:"price"},Et={key:0,class:"handle"},Nt={key:1,class:"handle"},Rt=h(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Yt={class:"dialog-footer"},Ft={__name:"detail",setup(V){H();const L=W(),o=r({});O.on("set-order-detail",n=>{o.value=n}),r([]);const $=r(null),x=r(!1);r(0);const y=r(0),D=r(["商品信息","订单详情"]),v=r(""),p=r(!1),z=n=>{v.value=n,p.value=!0},P=()=>{p.value=!1,te({order_sn:v.value}).then(n=>{R({message:n.message,type:"success"}),L.push({name:"home"})})},S=n=>{$.value.setRePay({price:n.pay_price,order_id:n.group_order_id}),$.value.drawer=!0},b=n=>{se({order_sn:n}).then(_=>{_.data.paid==1||_.message=="支付成功"?R({message:_.message,type:"success"}):R({message:_.message,type:"error"})}).catch(_=>{})};return(n,_)=>{const k=g("el-image"),i=g("el-table-column"),I=g("el-table"),C=g("el-button"),B=g("el-dialog"),U=Y("loading");return t(),s("div",Ue,[e("div",Ee,[(t(!0),s(F,null,M(D.value,(f,w)=>(t(),s("div",{key:w,class:A(["nav-item",{"nav-item-active":y.value==w,"nav-item-radius1":y.value==w+1,"nav-item-radius2":y.value==w-1}]),onClick:T=>y.value=w},d(f),11,Ne))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":y.value==D.value.length-1}]),style:{flex:"1"}},null,2)]),q((t(),s("div",Re,[o.value.orderProduct&&y.value==0?(t(),s("div",Ye,[e("div",Fe,[m(" 共计 "),e("span",Me,d(o.value.total_num),1),m(" 件商品 ")]),c(I,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[c(i,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:f})=>[e("div",Ke,[c(k,{style:{height:"3rem",width:"3rem"},src:f.cart_info.productAttr.image||f.cart_info.product.image},null,8,["src"]),e("span",Oe,d(f.cart_info.product.store_name),1)])]),_:1}),c(i,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(i,{prop:"product_num",label:"数量",width:"150"}),c(i,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&y.value==1?(t(),s("div",Te,[je,e("div",He,[e("div",qe,[Ge,e("div",Je,d(o.value.create_time),1)]),e("div",Qe,[We,e("div",Xe,d(o.value.total_num),1)]),e("div",Ze,[et,e("div",tt,"¥"+d(o.value.total_price),1)]),e("div",st,[ot,e("div",at,d(o.value.pay_time),1)]),e("div",it,[lt,e("div",nt,"¥"+d(o.value.deduction_price),1)]),e("div",dt,[ct,e("div",rt,"¥"+d(o.value.pay_price),1)]),e("div",_t,[ut,e("div",vt,[o.value.pay_type==11?(t(),s("span",pt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",ft,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",mt,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",ht,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",yt,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",gt,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",kt,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",$t,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",bt,[e("div",Ct,[Vt,e("div",St,[c(k,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",wt,[Pt,e("div",Lt,d(o.value.service_info.nickname),1)]),e("div",Dt,[It,e("div",At,d(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),o.value.service_info?(t(),s("div",xt,[e("div",zt,[e("div",Bt,"收银员: "+d(o.value.service_info.nickname),1),e("div",Ut,[m(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.pay_time?(t(),s("div",Nt,"已支付")):(t(),s("div",Et,[c(C,{class:"btn",type:"primary",onClick:_[0]||(_[0]=f=>S(o.value))},{default:u(()=>[m("重新支付")]),_:1}),c(C,{class:"btn",type:"primary",onClick:_[1]||(_[1]=f=>b(o.value.order_sn))},{default:u(()=>[m("检测状态")]),_:1}),c(C,{class:"btn",type:"success",onClick:_[2]||(_[2]=f=>z(o.value.order_sn))},{default:u(()=>[m("提单")]),_:1})]))])):l("",!0)])),[[U,x.value]]),c(oe,{ref_key:"payRef",ref:$},null,512),c(B,{modelValue:p.value,"onUpdate:modelValue":_[4]||(_[4]=f=>p.value=f),title:"提示",width:"500"},{footer:u(()=>[e("div",Yt,[c(C,{onClick:_[3]||(_[3]=f=>p.value=!1)},{default:u(()=>[m("取消")]),_:1}),n.cartCount>0?(t(),K(C,{key:0,onClick:n.goHome},{default:u(()=>[m(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(C,{key:1,type:"primary",onClick:P},{default:u(()=>[m(" 确认提单 ")]),_:1}))])]),default:u(()=>[Rt]),_:1},8,["modelValue"])])}}},jt=j(Ft,[["__scopeId","data-v-f0903720"]]);export{jt as d,Tt as o}; diff --git a/dist/assets/detail-CWvVuxiN.js b/dist/assets/detail-CWvVuxiN.js new file mode 100644 index 0000000..b35ff9a --- /dev/null +++ b/dist/assets/detail-CWvVuxiN.js @@ -0,0 +1 @@ +import{_ as H,u as q,r,b as h,l as F,c as t,h as s,e,t as d,f as c,w as u,g as f,p as Q,v as G,F as M,i as K,s as x,d as O,x as n,m as T,C as W,E as Y,y as X,z as Z}from"./index-Bk2tV8p_.js";import{e as ee,f as te,g as se}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js";import{p as oe}from"./pay-CYK_Zo7-.js";const ae={class:"my-order"},ie={class:"header-nav"},le={class:"nav-item"},ne={class:"nav-item-btn"},de={class:"header-input"},ce={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},re=["onClick"],_e={class:"top"},ue={class:"create-time"},ve={class:"shop"},pe={key:0,class:"left"},fe={key:0,class:"shop-name"},me={class:"right"},he={class:"money"},ye={class:"count"},ge={class:"bottom"},ke={class:"pay"},$e={key:0},be={key:0},Ce={key:1},Ve={key:2},Se={key:3},we={key:4},Pe={key:5},Le={key:6},Ie={key:1,style:{color:"#ff4a00"}},De={key:0,class:"cashier"},Ae={key:1,class:"cashier"},xe={key:0,class:"load-end"},ze={key:1,class:"load-end"},Be={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup(C){const A=q(),z=C;r([]);const o=r(1),L=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],$(!0)};r(null);const I=r(""),g=()=>{v.value.date=I.value.join("-"),$(!0)},v=r({page:1,limit:20,search_info:"",date:"",staff_id:0}),y=r(!1),V=r(0),D=r(0),S=r(!1),k=r([]),$=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;z.isSystem||(v.value.staff_id=A.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),ee(A.userInfo.service.mer_id,v.value).then(l=>{i?k.value=l.data.list:k.value=[...k.value,...l.data.list],l.data.list.length{S.value=!0,y.value=!1})},_=(i,l)=>{D.value=l,T.emit("set-order-detail",i)};return(i,l)=>{const w=h("el-radio-button"),B=h("el-radio-group"),b=h("el-date-picker"),U=h("el-button"),E=h("el-input"),p=h("el-image"),P=F("loading"),j=F("infinite-scroll");return t(),s("div",ae,[e("div",ie,[e("div",le,d(C.isSystem?"平台订单":"收银订单"),1),e("div",ne,[c(B,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),onChange:L,size:"small"},{default:u(()=>[c(w,{value:1},{default:u(()=>[f("全部")]),_:1}),c(w,{value:2},{default:u(()=>[f("未支付")]),_:1})]),_:1},8,["modelValue"]),c(b,{modelValue:I.value,"onUpdate:modelValue":l[1]||(l[1]=a=>I.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:g,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",de,[c(E,{modelValue:v.value.search_info,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=Q(a=>$(!0),["enter"])),onClear:l[5]||(l[5]=a=>$(!0)),clearable:""},{append:u(()=>[c(U,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:l[2]||(l[2]=a=>$(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",ce,[(t(!0),s(M,null,K(k.value,(a,N)=>(t(),s("div",{class:x(["item",{"item-active":D.value==N}]),key:N,onClick:R=>_(a,N)},[e("div",_e,[e("div",{class:x(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+d(a.order_sn),3),e("div",ue,d(a.create_time),1)]),e("div",ve,[a.orderProduct?(t(),s("div",pe,[(t(!0),s(M,null,K(a.orderProduct.slice(0,5),(R,J)=>(t(),O(p,{key:J,src:R.cart_info.productAttr.image||R.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",fe,d(a.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",me,[e("div",he,"¥"+d(a.pay_price),1),e("div",ye,"共"+d(a.total_num)+"件商品",1)])]),e("div",ge,[e("div",ke,[a.paid?(t(),s("div",$e,[f(" 已支付 "),a.pay_type==13?(t(),s("span",be,"(支付宝收款)")):n("",!0),a.pay_type==12?(t(),s("span",Ce,"(现金支付)")):n("",!0),a.pay_type==11?(t(),s("span",Ve,"(微信收款)")):n("",!0),a.pay_type==0?(t(),s("span",Se,"(余额支付)")):n("",!0),a.pay_type==1?(t(),s("span",we,"(微信支付)")):n("",!0),a.pay_type==9?(t(),s("span",Pe,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Le,"(对公转账)")):n("",!0)])):(t(),s("div",Ie,"未支付"))]),a.service_info?(t(),s("div",De," 收银员: "+d(a.service_info.nickname),1)):(t(),s("div",Ae,"平台订单"))])],10,re))),128)),S.value?(t(),s("div",xe,"没有更多了")):n("",!0),y.value?(t(),s("div",ze,"加载中...")):n("",!0)])),[[P,y.value],[j,$]])])}}},Tt=H(Be,[["__scopeId","data-v-b99dc933"]]),m=C=>(X("data-v-b71eab04"),C=C(),Z(),C),Ue={class:"my-order"},Ee={class:"header-nav"},Ne=["onClick"],Re={class:"detail"},Ye={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},Me={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Oe={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},je=m(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},qe={class:"info-item"},Ge=m(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=m(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=m(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=m(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=m(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},ct=m(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),rt={class:"info-item-info"},_t={class:"info-item"},ut=m(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),vt={class:"info-item-info"},pt={key:0},ft={key:1},mt={key:2},ht={key:3},yt={key:4},gt={key:5},kt={key:6},$t={key:0,class:"table-title"},bt={key:1,class:"table-info",style:{"flex-direction":"column"}},Ct={class:"info-item"},Vt=m(()=>e("div",{class:"info-item-title"},"头像:",-1)),St={class:"info-item-info"},wt={class:"info-item"},Pt=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Lt={class:"info-item-info"},It={class:"info-item"},Dt=m(()=>e("div",{class:"info-item-title"},"账号:",-1)),At={class:"info-item-info"},xt={key:2,class:"footer"},zt={class:"info"},Bt={class:"ser"},Ut={class:"price"},Et={key:0,class:"handle"},Nt={key:1,class:"handle"},Rt=m(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Yt={class:"dialog-footer"},Ft={__name:"detail",setup(C){const A=q(),z=W(),o=r({});T.on("set-order-detail",_=>{o.value=_}),r([]);const L=r(null),I=r(!1);r(0);const g=r(0),v=r(["商品信息","订单详情"]),y=r(""),V=r(!1),D=_=>{y.value=_,V.value=!0},S=()=>{V.value=!1,te({order_sn:y.value,staff_id:A.userInfo.service.service_id}).then(_=>{Y({message:_.message,type:"success"}),z.push({name:"home"})})},k=_=>{L.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),L.value.drawer=!0},$=_=>{se({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?Y({message:i.message,type:"success"}):Y({message:i.message,type:"error"})}).catch(i=>{})};return(_,i)=>{const l=h("el-image"),w=h("el-table-column"),B=h("el-table"),b=h("el-button"),U=h("el-dialog"),E=F("loading");return t(),s("div",Ue,[e("div",Ee,[(t(!0),s(M,null,K(v.value,(p,P)=>(t(),s("div",{key:P,class:x(["nav-item",{"nav-item-active":g.value==P,"nav-item-radius1":g.value==P+1,"nav-item-radius2":g.value==P-1}]),onClick:j=>g.value=P},d(p),11,Ne))),128)),e("div",{class:x(["nav-item",{"nav-item-radius2":g.value==v.value.length-1}]),style:{flex:"1"}},null,2)]),G((t(),s("div",Re,[o.value.orderProduct&&g.value==0?(t(),s("div",Ye,[e("div",Fe,[f(" 共计 "),e("span",Me,d(o.value.total_num),1),f(" 件商品 ")]),c(B,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[c(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:p})=>[e("div",Ke,[c(l,{style:{height:"3rem",width:"3rem"},src:p.cart_info.productAttr.image||p.cart_info.product.image},null,8,["src"]),e("span",Oe,d(p.cart_info.product.store_name),1)])]),_:1}),c(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(w,{prop:"product_num",label:"数量",width:"150"}),c(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&g.value==1?(t(),s("div",Te,[je,e("div",He,[e("div",qe,[Ge,e("div",Je,d(o.value.create_time),1)]),e("div",Qe,[We,e("div",Xe,d(o.value.total_num),1)]),e("div",Ze,[et,e("div",tt,"¥"+d(o.value.total_price),1)]),e("div",st,[ot,e("div",at,d(o.value.pay_time),1)]),e("div",it,[lt,e("div",nt,"¥"+d(o.value.deduction_price),1)]),e("div",dt,[ct,e("div",rt,"¥"+d(o.value.pay_price),1)]),e("div",_t,[ut,e("div",vt,[o.value.pay_type==11?(t(),s("span",pt,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",ft,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",mt,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",ht,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",yt,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",gt,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",kt,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",$t,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",bt,[e("div",Ct,[Vt,e("div",St,[c(l,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",wt,[Pt,e("div",Lt,d(o.value.service_info.nickname),1)]),e("div",It,[Dt,e("div",At,d(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),o.value.service_info?(t(),s("div",xt,[e("div",zt,[e("div",Bt,"收银员: "+d(o.value.service_info.nickname),1),e("div",Ut,[f(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.pay_time?(t(),s("div",Nt,"已支付")):(t(),s("div",Et,[c(b,{class:"btn",type:"primary",onClick:i[0]||(i[0]=p=>k(o.value))},{default:u(()=>[f("重新支付")]),_:1}),c(b,{class:"btn",type:"primary",onClick:i[1]||(i[1]=p=>$(o.value.order_sn))},{default:u(()=>[f("检测状态")]),_:1}),c(b,{class:"btn",type:"success",onClick:i[2]||(i[2]=p=>D(o.value.order_sn))},{default:u(()=>[f("提单")]),_:1})]))])):n("",!0)])),[[E,I.value]]),c(oe,{ref_key:"payRef",ref:L},null,512),c(U,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",Yt,[c(b,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),O(b,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),O(b,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Rt]),_:1},8,["modelValue"])])}}},jt=H(Ft,[["__scopeId","data-v-b71eab04"]]);export{jt as d,Tt as o}; diff --git a/dist/assets/detail-D98EDYeD.css b/dist/assets/detail-DghupyxF.css similarity index 71% rename from dist/assets/detail-D98EDYeD.css rename to dist/assets/detail-DghupyxF.css index e742593..b0978fc 100644 --- a/dist/assets/detail-D98EDYeD.css +++ b/dist/assets/detail-DghupyxF.css @@ -1 +1 @@ -@charset "UTF-8";.my-order[data-v-b99dc933]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-b99dc933]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-b99dc933]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-b99dc933]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-b99dc933]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-b99dc933]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-b99dc933]{height:calc(100vh - 100px - 10.2rem);overflow-y:auto}.my-order .order-list .item[data-v-b99dc933]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-b99dc933]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-b99dc933]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-b99dc933]: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-b99dc933]: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-b99dc933]{font-size:.8rem}.my-order .order-list .item .shop[data-v-b99dc933]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-b99dc933]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-b99dc933]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-b99dc933]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-b99dc933]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-b99dc933]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-b99dc933]{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-b99dc933]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-b99dc933]{background-color:#efefef}.my-order .load-end[data-v-b99dc933]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-f0903720]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-f0903720]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-f0903720]{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-f0903720]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-f0903720]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-f0903720]{border-radius:0 0 0 1rem}.my-order .detail[data-v-f0903720]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-f0903720]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-f0903720]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-f0903720]{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-f0903720]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-f0903720]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-f0903720]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-f0903720]{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-f0903720]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-f0903720]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-f0903720]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-f0903720]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-f0903720]{border-radius:4rem;padding:1.2rem} +@charset "UTF-8";.my-order[data-v-b99dc933]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-b99dc933]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-b99dc933]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-b99dc933]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-b99dc933]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-b99dc933]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-b99dc933]{height:calc(100vh - 100px - 10.2rem);overflow-y:auto}.my-order .order-list .item[data-v-b99dc933]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-b99dc933]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-b99dc933]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-b99dc933]: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-b99dc933]: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-b99dc933]{font-size:.8rem}.my-order .order-list .item .shop[data-v-b99dc933]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-b99dc933]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-b99dc933]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-b99dc933]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-b99dc933]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-b99dc933]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-b99dc933]{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-b99dc933]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-b99dc933]{background-color:#efefef}.my-order .load-end[data-v-b99dc933]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-b71eab04]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-b71eab04]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-b71eab04]{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-b71eab04]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-b71eab04]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-b71eab04]{border-radius:0 0 0 1rem}.my-order .detail[data-v-b71eab04]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-b71eab04]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-b71eab04]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-b71eab04]{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-b71eab04]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-b71eab04]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-b71eab04]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-b71eab04]{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-b71eab04]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-b71eab04]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-b71eab04]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-b71eab04]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-b71eab04]{border-radius:4rem;padding:1.2rem} diff --git a/dist/assets/index-CyseqjFM.js b/dist/assets/index--7Ct5JJN.js similarity index 99% rename from dist/assets/index-CyseqjFM.js rename to dist/assets/index--7Ct5JJN.js index 8cced6c..c79de04 100644 --- a/dist/assets/index-CyseqjFM.js +++ b/dist/assets/index--7Ct5JJN.js @@ -1,4 +1,4 @@ -import{c as bg,a as Pg,b as Bo,d as Fg,o as Wg}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.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 Bg,l as Mo,p as Dg,q as Rr,s as Uo,v as $o,x as Ji,y as No,z as Go,A as Mg,B as Ug}from"./index-BSSh7Jos.js";import{p as $g}from"./padding-o_E7jGNN.js";import{g as Ng,s as Gg}from"./shop-CDXMAFiz.js";import{p as Hg}from"./pay-BcBBz6sQ.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:{}};/** +import{c as bg,a as Pg,b as Bo,d as Fg,o as Wg}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.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 Bg,l as Mo,p as Dg,q as Rr,s as Uo,v as $o,x as Ji,y as No,z as Go,A as Mg,B as Ug}from"./index-Bk2tV8p_.js";import{p as $g}from"./padding-uJoj-HCO.js";import{g as Ng,s as Gg}from"./shop-ClJViHUh.js";import{p as Hg}from"./pay-CYK_Zo7-.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 diff --git a/dist/assets/index-BSSh7Jos.js b/dist/assets/index-Bk2tV8p_.js similarity index 99% rename from dist/assets/index-BSSh7Jos.js rename to dist/assets/index-Bk2tV8p_.js index 18ce029..d9b6b39 100644 --- a/dist/assets/index-BSSh7Jos.js +++ b/dist/assets/index-Bk2tV8p_.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-CyseqjFM.js","./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js","./pay-zrxcLHot.css","./padding-o_E7jGNN.js","./shop-CDXMAFiz.js","./pay-BcBBz6sQ.js","./index-CUMIE358.css","./index-NzoYMkoT.js","./detail-CEWzHPJj.js","./detail-D98EDYeD.css","./index-DmS05-EY.css","./indexSystem-DjM2GFw6.js","./indexList-DNUk1zhW.js","./indexList-Cdt8gTOX.css","./indexCount-BkoYwO8l.js","./indexCount-BUWO-6iT.css","./index-D-DW9UWz.js","./index-Cc3yFQvQ.css","./index-B6Hf3Med.js","./index-DV9hG0ly.css","./index-CaSlH6Gp.js","./index-Dwwi99ut.css"] + __vite__mapDeps.viteFileDeps = ["./index--7Ct5JJN.js","./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js","./pay-zrxcLHot.css","./padding-uJoj-HCO.js","./shop-ClJViHUh.js","./pay-CYK_Zo7-.js","./index-CUMIE358.css","./index-CPPpv-Op.js","./detail-CWvVuxiN.js","./detail-DghupyxF.css","./index-DmS05-EY.css","./indexSystem-BJUePvAn.js","./indexList-DUeZ21QJ.js","./indexList-Cdt8gTOX.css","./indexCount-DOq_q61f.js","./indexCount-BUWO-6iT.css","./index-BycvSE9C.js","./index-Cc3yFQvQ.css","./index-CdYLFw_W.js","./index-DV9hG0ly.css","./index-ChNrleam.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=cs(l);o[s]||(cce(r,l),o[s]=!0)}return Ve.isArray(t)?t.forEach(a):a(t),this}}md.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ve.reduceDescriptors(md.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Ve.freezeMethods(md);const lr=md;function pf(e,t){const n=this||iv,o=t||n,r=lr.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 Oi(e,t,n){Rt.call(this,e??"canceled",Rt.ERR_CANCELED,t,n),this.name="CanceledError"}Ve.inherits(Oi,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=lr.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=lr.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 Oi(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 Oi(null,e)}function p4(e){return vf(e),e.headers=lr.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=lr.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=lr.from(o.response.headers))),Promise.reject(o)})}const v4=e=>e instanceof lr?{...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},Mr=j0.validators;class yc{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:Mr.transitional(Mr.boolean),forcedJSONParsing:Mr.transitional(Mr.boolean),clarifyTimeoutError:Mr.transitional(Mr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:j0.assertOptions(r,{encode:Mr.function,serialize:Mr.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=lr.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 Oi(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 Hu(e),n=ib(Hu.prototype.request,t);return Ve.extend(n,Hu.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=Hu;sn.CanceledError=Oi;sn.CancelToken=Cce;sn.isCancel=kb;sn.VERSION=Mb;sn.toFormData=hd;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=lr;sn.formToJSON=e=>Sb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=xb.getAdapter;sn.HttpStatusCode=Ece;sn.default=sn;const xce={url:"https://crmeb-test.shop.lihaink.cn/api",upload:"https://crmeb-test.shop.lihaink.cn/api/upload/image/field"},Ai=sn.create({baseURL:xce.url,timeout:1e4});Ai.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)));Ai.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ts({message:e.data.message,type:"error"}),setTimeout(()=>{const t=rv();t.setUserInfo({}),t.setToken(""),Ob.push("/login")},700)),e.data.status===400)throw Ts({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ts({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function ode(e){return Ai.post("auth/login",e)}function rde(e){return Ai.get("user",e)}function Mce(){return Ai.post("logout")}const dv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},$ce=e=>(j4("data-v-24e72736"),e=e(),q4(),e),Tce={class:"my-card"},Oce={class:"card-header"},Ace={style:{width:"4.5rem"}},Nce=$ce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Rce={class:"card-body"},Ice={class:"el-dropdown-link"},Pce={class:"info"},Lce={style:{"margin-left":"0.3rem"}},Vce={__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=()=>{Mce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ts({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Xe("el-image"),c=Xe("el-avatar"),f=Xe("arrow-down"),d=Xe("el-icon"),p=Xe("el-dropdown-item"),h=Xe("el-dropdown-menu"),m=Xe("el-dropdown");return _(),M("div",Tce,[k("div",Oce,[k("div",Ace,[W(u,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),Nce]),k("div",Rce,[W(m,{trigger:"hover"},{dropdown:X(()=>[W(h,null,{default:X(()=>[W(p,{onClick:a},{default:X(()=>[gt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",Ice,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Pce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Lce,"("+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})])])}}},Bce=dv(Vce,[["__scopeId","data-v-24e72736"]]);function zce(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=zce(),es=e=>(j4("data-v-891b15b5"),e=e(),q4(),e),Hce={class:"my-card"},Dce=es(()=>k("div",null,"收银",-1)),Fce=es(()=>k("div",null,"收银订单",-1)),Kce=es(()=>k("div",null,"平台订单",-1)),Wce=es(()=>k("div",null,"核销",-1)),jce=es(()=>k("div",null,"商品",-1)),qce=es(()=>k("div",null,"统计",-1)),Uce={__name:"myAside",setup(e){const t=ob(),n=tue(),o=s=>{t.push({name:s})},r=P(["home","order","orderSystem","convert","shop","orderCount"]),a=()=>{let s=r.value.indexOf(n.name);s==0&&(s=r.value.length),s>0&&o(r.value[s-1])},l=()=>{let s=r.value.indexOf(n.name);s==r.value.length-1&&(s=-1),s{qn.on("up",a),qn.on("down",l)}),zo(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Xe("Sell"),f=Xe("el-icon"),d=Xe("DataLine"),p=Xe("DataAnalysis"),h=Xe("FullScreen"),m=Xe("ShoppingBag"),v=Xe("Coin");return _(),M("div",Hce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:u[0]||(u[0]=y=>o("home"))},[W(f,{size:"30"},{default:X(()=>[W(c)]),_:1}),Dce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:u[1]||(u[1]=y=>o("order"))},[W(f,{size:"30"},{default:X(()=>[W(d)]),_:1}),Fce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderSystem"}]),onClick:u[2]||(u[2]=y=>o("orderSystem"))},[W(f,{size:"30"},{default:X(()=>[W(p)]),_:1}),Kce],2),k("div",{class:T(["list-item",{active:i(n).name=="convert"}]),onClick:u[3]||(u[3]=y=>o("convert"))},[W(f,{size:"30"},{default:X(()=>[W(h)]),_:1}),Wce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:u[4]||(u[4]=y=>o("shop"))},[W(f,{size:"30"},{default:X(()=>[W(m)]),_:1}),jce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderCount"}]),onClick:u[5]||(u[5]=y=>o("orderCount"))},[W(f,{size:"30"},{default:X(()=>[W(v)]),_:1}),qce],2)])}}},Yce=dv(Uce,[["__scopeId","data-v-891b15b5"]]),Gce={class:"common-layout"},Xce={__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=Xe("el-header"),a=Xe("el-aside"),l=Xe("router-view"),s=Xe("el-main"),u=Xe("el-container");return _(),M("div",Gce,[W(u,null,{default:X(()=>[W(r,null,{default:X(()=>[W(Bce)]),_:1}),W(u,null,{default:X(()=>[W(a,{width:"100px"},{default:X(()=>[W(Yce)]),_: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})])}}},Jce=dv(Xce,[["__scopeId","data-v-64ddf17e"]]),Zce=[{path:"/",name:"layout",component:Jce,redirect:"/home",meta:{title:"里海收银系统"},children:[{path:"/home",name:"home",meta:{title:"收银"},component:()=>Xo(()=>import("./index-CyseqjFM.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)},{path:"/order",name:"order",meta:{title:"收银订单"},component:()=>Xo(()=>import("./index-NzoYMkoT.js"),__vite__mapDeps([7,8,1,2,5,9,3,10]),import.meta.url)},{path:"/orderSystem",name:"orderSystem",meta:{title:"平台订单"},component:()=>Xo(()=>import("./indexSystem-DjM2GFw6.js"),__vite__mapDeps([11,8,1,2,5,9,3,10]),import.meta.url)},{path:"/orderList",name:"orderList",meta:{title:"统计"},component:()=>Xo(()=>import("./indexList-DNUk1zhW.js"),__vite__mapDeps([12,1,2,5,13]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"统计"},component:()=>Xo(()=>import("./indexCount-BkoYwO8l.js"),__vite__mapDeps([14,1,2,15]),import.meta.url)},{path:"/shop",name:"shop",component:()=>Xo(()=>import("./index-D-DW9UWz.js"),__vite__mapDeps([16,4,17]),import.meta.url)},{path:"/convert",name:"convert",component:()=>Xo(()=>import("./index-B6Hf3Med.js"),__vite__mapDeps([18,1,2,5,3,19]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Xo(()=>import("./index-CaSlH6Gp.js"),__vite__mapDeps([20,21]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Xo(()=>import("./index-CmYc66-P.js"),__vite__mapDeps([]),import.meta.url)}],Tb=Qie({history:$ie(),routes:Zce});Tb.beforeEach((e,t,n)=>{const o=rv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ob=Tb,Ni=Og(Z5);for(const[e,t]of Object.entries(ML))Ni.component(e,t);const Qce=oue();Ni.use(Ob);Ni.use(Qce);Ni.use(Use,{locale:Yse});Ni.mount("#app");export{sr as A,tue as B,ob as C,xce as D,Ts as E,Ke as F,Ai as G,bt as H,y2 as I,S as J,ode as K,rde as L,dv as _,zo as a,Xe as b,_ as c,le as d,k as e,W as f,gt as g,M as h,ht as i,wr as j,Cr as k,xc 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}; +`+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:Mr.transitional(Mr.boolean),forcedJSONParsing:Mr.transitional(Mr.boolean),clarifyTimeoutError:Mr.transitional(Mr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:j0.assertOptions(r,{encode:Mr.function,serialize:Mr.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=lr.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 Oi(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 Hu(e),n=ib(Hu.prototype.request,t);return Ve.extend(n,Hu.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=Hu;sn.CanceledError=Oi;sn.CancelToken=Cce;sn.isCancel=kb;sn.VERSION=Mb;sn.toFormData=hd;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=lr;sn.formToJSON=e=>Sb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=xb.getAdapter;sn.HttpStatusCode=Ece;sn.default=sn;const xce={url:"https://crmeb-test.shop.lihaink.cn/api",upload:"https://crmeb-test.shop.lihaink.cn/api/upload/image/field"},Ai=sn.create({baseURL:xce.url,timeout:1e4});Ai.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)));Ai.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ts({message:e.data.message,type:"error"}),setTimeout(()=>{const t=rv();t.setUserInfo({}),t.setToken(""),Ob.push("/login")},700)),e.data.status===400)throw Ts({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ts({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function ode(e){return Ai.post("auth/login",e)}function rde(e){return Ai.get("user",e)}function Mce(){return Ai.post("logout")}const dv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},$ce=e=>(j4("data-v-24e72736"),e=e(),q4(),e),Tce={class:"my-card"},Oce={class:"card-header"},Ace={style:{width:"4.5rem"}},Nce=$ce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Rce={class:"card-body"},Ice={class:"el-dropdown-link"},Pce={class:"info"},Lce={style:{"margin-left":"0.3rem"}},Vce={__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=()=>{Mce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ts({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Xe("el-image"),c=Xe("el-avatar"),f=Xe("arrow-down"),d=Xe("el-icon"),p=Xe("el-dropdown-item"),h=Xe("el-dropdown-menu"),m=Xe("el-dropdown");return _(),M("div",Tce,[k("div",Oce,[k("div",Ace,[W(u,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),Nce]),k("div",Rce,[W(m,{trigger:"hover"},{dropdown:X(()=>[W(h,null,{default:X(()=>[W(p,{onClick:a},{default:X(()=>[gt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",Ice,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Pce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Lce,"("+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})])])}}},Bce=dv(Vce,[["__scopeId","data-v-24e72736"]]);function zce(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=zce(),es=e=>(j4("data-v-891b15b5"),e=e(),q4(),e),Hce={class:"my-card"},Dce=es(()=>k("div",null,"收银",-1)),Fce=es(()=>k("div",null,"收银订单",-1)),Kce=es(()=>k("div",null,"平台订单",-1)),Wce=es(()=>k("div",null,"核销",-1)),jce=es(()=>k("div",null,"商品",-1)),qce=es(()=>k("div",null,"统计",-1)),Uce={__name:"myAside",setup(e){const t=ob(),n=tue(),o=s=>{t.push({name:s})},r=P(["home","order","orderSystem","convert","shop","orderCount"]),a=()=>{let s=r.value.indexOf(n.name);s==0&&(s=r.value.length),s>0&&o(r.value[s-1])},l=()=>{let s=r.value.indexOf(n.name);s==r.value.length-1&&(s=-1),s{qn.on("up",a),qn.on("down",l)}),zo(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Xe("Sell"),f=Xe("el-icon"),d=Xe("DataLine"),p=Xe("DataAnalysis"),h=Xe("FullScreen"),m=Xe("ShoppingBag"),v=Xe("Coin");return _(),M("div",Hce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:u[0]||(u[0]=y=>o("home"))},[W(f,{size:"30"},{default:X(()=>[W(c)]),_:1}),Dce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:u[1]||(u[1]=y=>o("order"))},[W(f,{size:"30"},{default:X(()=>[W(d)]),_:1}),Fce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderSystem"}]),onClick:u[2]||(u[2]=y=>o("orderSystem"))},[W(f,{size:"30"},{default:X(()=>[W(p)]),_:1}),Kce],2),k("div",{class:T(["list-item",{active:i(n).name=="convert"}]),onClick:u[3]||(u[3]=y=>o("convert"))},[W(f,{size:"30"},{default:X(()=>[W(h)]),_:1}),Wce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:u[4]||(u[4]=y=>o("shop"))},[W(f,{size:"30"},{default:X(()=>[W(m)]),_:1}),jce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderCount"}]),onClick:u[5]||(u[5]=y=>o("orderCount"))},[W(f,{size:"30"},{default:X(()=>[W(v)]),_:1}),qce],2)])}}},Yce=dv(Uce,[["__scopeId","data-v-891b15b5"]]),Gce={class:"common-layout"},Xce={__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=Xe("el-header"),a=Xe("el-aside"),l=Xe("router-view"),s=Xe("el-main"),u=Xe("el-container");return _(),M("div",Gce,[W(u,null,{default:X(()=>[W(r,null,{default:X(()=>[W(Bce)]),_:1}),W(u,null,{default:X(()=>[W(a,{width:"100px"},{default:X(()=>[W(Yce)]),_: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})])}}},Jce=dv(Xce,[["__scopeId","data-v-64ddf17e"]]),Zce=[{path:"/",name:"layout",component:Jce,redirect:"/home",meta:{title:"里海收银系统"},children:[{path:"/home",name:"home",meta:{title:"收银"},component:()=>Xo(()=>import("./index--7Ct5JJN.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)},{path:"/order",name:"order",meta:{title:"收银订单"},component:()=>Xo(()=>import("./index-CPPpv-Op.js"),__vite__mapDeps([7,8,1,2,5,9,3,10]),import.meta.url)},{path:"/orderSystem",name:"orderSystem",meta:{title:"平台订单"},component:()=>Xo(()=>import("./indexSystem-BJUePvAn.js"),__vite__mapDeps([11,8,1,2,5,9,3,10]),import.meta.url)},{path:"/orderList",name:"orderList",meta:{title:"统计"},component:()=>Xo(()=>import("./indexList-DUeZ21QJ.js"),__vite__mapDeps([12,1,2,5,13]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"统计"},component:()=>Xo(()=>import("./indexCount-DOq_q61f.js"),__vite__mapDeps([14,1,2,15]),import.meta.url)},{path:"/shop",name:"shop",component:()=>Xo(()=>import("./index-BycvSE9C.js"),__vite__mapDeps([16,4,17]),import.meta.url)},{path:"/convert",name:"convert",component:()=>Xo(()=>import("./index-CdYLFw_W.js"),__vite__mapDeps([18,1,2,5,3,19]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Xo(()=>import("./index-ChNrleam.js"),__vite__mapDeps([20,21]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Xo(()=>import("./index-BvJIV-vN.js"),__vite__mapDeps([]),import.meta.url)}],Tb=Qie({history:$ie(),routes:Zce});Tb.beforeEach((e,t,n)=>{const o=rv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ob=Tb,Ni=Og(Z5);for(const[e,t]of Object.entries(ML))Ni.component(e,t);const Qce=oue();Ni.use(Ob);Ni.use(Qce);Ni.use(Use,{locale:Yse});Ni.mount("#app");export{sr as A,tue as B,ob as C,xce as D,Ts as E,Ke as F,Ai as G,bt as H,y2 as I,S as J,ode as K,rde as L,dv as _,zo as a,Xe as b,_ as c,le as d,k as e,W as f,gt as g,M as h,ht as i,wr as j,Cr as k,xc 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-CmYc66-P.js b/dist/assets/index-BvJIV-vN.js similarity index 84% rename from dist/assets/index-CmYc66-P.js rename to dist/assets/index-BvJIV-vN.js index cd93f97..c100718 100644 --- a/dist/assets/index-CmYc66-P.js +++ b/dist/assets/index-BvJIV-vN.js @@ -1 +1 @@ -import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-BSSh7Jos.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-Bk2tV8p_.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-D-DW9UWz.js b/dist/assets/index-BycvSE9C.js similarity index 98% rename from dist/assets/index-D-DW9UWz.js rename to dist/assets/index-BycvSE9C.js index efb2d61..20bc609 100644 --- a/dist/assets/index-D-DW9UWz.js +++ b/dist/assets/index-BycvSE9C.js @@ -1 +1 @@ -import{_ as H,r as c,u as Q,b as d,c as f,d as L,w as a,h as S,t as W,e as E,f as l,q as K,g as k,E as g,D as M,l as te,v as le,p as ae,F as oe,i as ne,x as z}from"./index-BSSh7Jos.js";import{p as re,c as ue,a as de,b as ie,d as se,s as pe,u as ce,e as _e}from"./shop-CDXMAFiz.js";const me={key:0},fe={key:1},ve={class:"dra-body"},ge=["src"],ye={__name:"add",emits:["reload"],setup(X,{expose:T,emit:A}){const i=c(!1),q={store_name:"",image:[],slider_image:[],attrValue:[{bar_code:"",price:"",stock:"",cost:"",ot_price:"",wholesale_price:"0",extension_one:"",extension_two:""}],content:{image:[]},unit_name:"",delivery_way:["1"]},n=c(q),U=Q(),D=A,_=c(!1),R=c(""),P=t=>{R.value=t.url,_.value=!0},N=c("add"),I=(t,e)=>{n.value=q,N.value=t,t=="add"?i.value=!0:t=="edit"&&(i.value=!0,v(e.product_id))},v=t=>{re(U.userInfo.service.mer_id,t).then(e=>{e.data.image=[{url:e.data.image,uid:e.data.image}],e.data.content.image=e.data.content.image.map(m=>({url:m,uid:e.data.image})),e.data.slider_image=e.data.slider_image.map(m=>({url:m,uid:e.data.image})),n.value=e.data,console.log(n.value)})},B=c([]);(()=>{ue(U.userInfo.service.mer_id).then(t=>{B.value=t.data})})();const O=c(null),j=()=>{var e,m,p,y,h,C;let t=JSON.parse(JSON.stringify(n.value));if(console.log(t.cate_id),t.cate_id&&typeof t.cate_id=="object"&&t.cate_id.length>0?t.cate_id=t.cate_id[t.cate_id.length-1]||"":t.cate_id=t.cate_id||"",t.image=="")return g.error("请上传商品封面图");if(t.slider_image.length==0)return g.error("请上传商品轮播图");if(t.content.image=t.content.image.map(r=>{var s,w,V,b;return(w=(s=r==null?void 0:r.response)==null?void 0:s.data)!=null&&w.path?(b=(V=r==null?void 0:r.response)==null?void 0:V.data)==null?void 0:b.path:r.url}),t.image=(p=(m=(e=t.image[0])==null?void 0:e.response)==null?void 0:m.data)!=null&&p.path?(C=(h=(y=t.image[0])==null?void 0:y.response)==null?void 0:h.data)==null?void 0:C.path:t.image[0].url,t.slider_image=t.slider_image.map(r=>{var s,w,V,b;return(w=(s=r==null?void 0:r.response)==null?void 0:s.data)!=null&&w.path?(b=(V=r==null?void 0:r.response)==null?void 0:V.data)==null?void 0:b.path:r.url}),t.store_name=="")return g.error("请输入商品名称");if(t.cate_id=="")return g.error("请选择平台分类");if(t.attrValue[0].bar_code=="")return g.error("请输入商品条码");if(t.attrValue[0].stock<=0)return g.error("请输入商品库存");if(t.attrValue[0].price<=0)return g.error("请输入商品价格");N.value=="add"?de(U.userInfo.service.mer_id,t).then(r=>{g.success(r.message),D("reload"),$()}):ie(U.userInfo.service.mer_id,t.product_id,t).then(r=>{g.success(r.message),D("reload"),$()})},J=()=>{$()},$=()=>{i.value=!1},F=()=>{};return T({drawer:i,show:I}),(t,e)=>{const m=d("el-input"),p=d("el-form-item"),y=d("el-cascader"),h=d("Plus"),C=d("el-icon"),r=d("el-upload"),s=d("el-form"),w=d("el-dialog"),V=d("el-button"),b=d("el-drawer");return f(),L(b,{size:800,modelValue:i.value,"onUpdate:modelValue":e[10]||(e[10]=u=>i.value=u),direction:"rtl",onOpen:F,"before-close":$},{header:a(()=>[N.value=="add"?(f(),S("h4",me,"添加商品")):(f(),S("h4",fe,"编辑商品 ["+W(n.value.product_id)+"]",1))]),default:a(()=>[E("div",ve,[l(s,{ref_key:"formRef",ref:O,model:n.value,"label-width":"150px"},{default:a(()=>[l(p,{label:"商品条码",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].bar_code,"onUpdate:modelValue":e[0]||(e[0]=u=>n.value.attrValue[0].bar_code=u),type:"number",placeholder:"请输入商品条码"},null,8,["modelValue"])]),_:1}),l(p,{label:"商品名称",required:""},{default:a(()=>[l(m,{modelValue:n.value.store_name,"onUpdate:modelValue":e[1]||(e[1]=u=>n.value.store_name=u),placeholder:"请输入商品名称"},null,8,["modelValue"])]),_:1}),l(p,{label:"平台分类",required:""},{default:a(()=>[l(y,{modelValue:n.value.cate_id,"onUpdate:modelValue":e[2]||(e[2]=u=>n.value.cate_id=u),class:"pageWidth",options:B.value,filterable:"",clearable:""},null,8,["modelValue","options"])]),_:1}),l(p,{label:"商品封面图",required:""},{default:a(()=>[l(r,{"file-list":n.value.image,"onUpdate:fileList":e[3]||(e[3]=u=>n.value.image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:1},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(p,{label:"商品轮播图",required:""},{default:a(()=>[l(r,{"file-list":n.value.slider_image,"onUpdate:fileList":e[4]||(e[4]=u=>n.value.slider_image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:9},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(p,{label:"商品详情"},{default:a(()=>[l(r,{"file-list":n.value.content.image,"onUpdate:fileList":e[5]||(e[5]=u=>n.value.content.image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:9},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(p,{label:"商品单位",required:""},{default:a(()=>[l(m,{modelValue:n.value.unit_name,"onUpdate:modelValue":e[6]||(e[6]=u=>n.value.unit_name=u),placeholder:"请输入商品单位"},null,8,["modelValue"])]),_:1}),l(p,{label:"零售价",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].price,"onUpdate:modelValue":e[7]||(e[7]=u=>n.value.attrValue[0].price=u),type:"number",placeholder:"请输入零售价"},null,8,["modelValue"])]),_:1}),l(p,{label:"库存",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].stock,"onUpdate:modelValue":e[8]||(e[8]=u=>n.value.attrValue[0].stock=u),type:"number",placeholder:"请输入库存"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),l(w,{modelValue:_.value,"onUpdate:modelValue":e[9]||(e[9]=u=>_.value=u)},{default:a(()=>[E("img",{style:{width:"100%",height:"100%"},"w-full":"",src:R.value,alt:"Preview Image"},null,8,ge)]),_:1},8,["modelValue"])]),footer:a(()=>[l(V,{onClick:J},{default:a(()=>[k("取消")]),_:1}),l(V,{type:"primary",onClick:j},{default:a(()=>[k("确认")]),_:1})]),_:1},8,["modelValue"])}}},we=H(ye,[["__scopeId","data-v-2d33ceca"]]),Ve={"element-loading-text":"加载中",class:"my-shop"},be={key:0,style:{color:"#ff4a00"}},ke={key:1},he={key:2},Ce={class:"dialog-footer"},xe={__name:"index",setup(X){const T=c([]),A=Q(),i=c({page:1,limit:15,type:1,keyword:"",staff_id:A.userInfo.service.service_id}),q=c(!1),n=c(0),U=c([]),D=()=>{se(A.userInfo.service.mer_id).then(t=>{U.value=t.data})};D();const _=(t=!1)=>{q.value=!0,t&&D(),pe(A.userInfo.service.mer_id,i.value).then(e=>{T.value=e.data.list,n.value=e.data.count,q.value=!1})};_();const R=t=>{i.value.page=t,_()},P=t=>{i.value.page=t,_()},N=t=>{i.value.page=t,_()},I=c(!1),v=c({}),B=t=>{v.value=t,I.value=!0},G=()=>{let t={attr:v.value.attr||[],attrValue:v.value.attrValue,mer_cate_id:v.value.merCateId||[],spec_type:v.value.spec_type,is_stock:1};ce(v.value.product_id,t).then(e=>{g({message:e.message,type:"success"}),I.value=!1,_()}).catch(e=>{g({message:e,type:"error"})})},O=c("1"),j=t=>{i.value.type=t,i.value.page=1,_()},J=t=>{_e(A.userInfo.service.mer_id,t.product_id,{status:t.is_show?1:0}).then(e=>{g.success(e.message),_(!0)})},$=c(null),F=(t="add",e)=>{$.value.show(t,e)};return(t,e)=>{const m=d("el-input"),p=d("el-form-item"),y=d("el-button"),h=d("el-form"),C=d("el-menu-item"),r=d("el-menu"),s=d("el-table-column"),w=d("el-image"),V=d("el-switch"),b=d("el-table"),u=d("el-pagination"),Y=d("el-input-number"),Z=d("el-dialog"),ee=te("loading");return le((f(),S("div",Ve,[l(h,{inline:!0},{default:a(()=>[l(p,{label:"关键字:"},{default:a(()=>[l(m,{modelValue:i.value.keyword,"onUpdate:modelValue":e[0]||(e[0]=o=>i.value.keyword=o),placeholder:"请输入关键字搜索",style:{width:"20rem"},clearable:"",onClear:e[1]||(e[1]=o=>_(!0)),onKeydown:e[2]||(e[2]=ae(o=>_(!0),["enter"]))},null,8,["modelValue"])]),_:1}),l(p,null,{default:a(()=>[l(y,{type:"primary",onClick:e[3]||(e[3]=o=>_(!0))},{default:a(()=>[k("搜索")]),_:1})]),_:1}),l(p,null,{default:a(()=>[l(y,{type:"primary",onClick:e[4]||(e[4]=o=>F("add"))},{default:a(()=>[k("新增")]),_:1})]),_:1})]),_:1}),l(r,{"default-active":O.value,class:"el-menu-top",mode:"horizontal",onSelect:j},{default:a(()=>[(f(!0),S(oe,null,ne(U.value,(o,x)=>(f(),L(C,{index:o.type+"",key:x},{default:a(()=>[k(W(`${o.name}(${o.count})`),1)]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"]),l(b,{data:T.value,style:{width:"100%"}},{default:a(()=>[l(s,{prop:"product_id",label:"ID",width:"100"}),l(s,{prop:"image",label:"图片",width:"120"},{default:a(o=>[l(w,{loading:"lazy",style:{width:"60px",height:"60px"},src:o.row.image},null,8,["src"])]),_:1}),l(s,{prop:"store_name",label:"商品名称",width:"500"}),l(s,{prop:"price",label:"售价"}),l(s,{prop:"stock",label:"库存"}),i.value.type<=2?(f(),L(s,{key:0,label:"上/下架",width:"100"},{default:a(o=>[l(V,{modelValue:o.row.is_show,"onUpdate:modelValue":x=>o.row.is_show=x,"active-value":1,"inline-prompt":"","active-text":"上架","inactive-text":"下架",onClick:x=>J(o.row)},null,8,["modelValue","onUpdate:modelValue","onClick"])]),_:1})):z("",!0),i.value.type<=4?(f(),L(s,{key:1,label:"商品状态",width:"100"},{default:a(o=>[o.row.is_used?o.row.is_show?(f(),S("span",ke,"上架显示")):(f(),S("span",he,"下架")):(f(),S("span",be,"平台关闭"))]),_:1})):z("",!0),l(s,{label:"操作",width:"120"},{default:a(o=>[i.value.type!=5?(f(),L(y,{key:0,type:"primary",link:"",onClick:x=>B(o.row)},{default:a(()=>[k("修改库存")]),_:2},1032,["onClick"])):z("",!0),i.value.type!=1&&i.value.type!=5?(f(),L(y,{key:1,type:"primary",link:"",onClick:x=>F("edit",o.row)},{default:a(()=>[k("编辑")]),_:2},1032,["onClick"])):z("",!0)]),_:1})]),_:1},8,["data"]),l(u,{"page-size":i.value.limit,layout:"prev, pager, next",total:n.value,onPrevClick:R,onNextClick:P,onCurrentChange:N},null,8,["page-size","total"]),l(Z,{modelValue:I.value,"onUpdate:modelValue":e[6]||(e[6]=o=>I.value=o),title:"编辑商品库存",width:"800"},{footer:a(()=>[E("div",Ce,[l(y,{onClick:e[5]||(e[5]=o=>I.value=!1)},{default:a(()=>[k("取消")]),_:1}),l(y,{type:"primary",onClick:G},{default:a(()=>[k(" 确定 ")]),_:1})])]),default:a(()=>[v.value.attrValue?(f(),L(b,{key:0,data:v.value.attrValue,stripe:"",style:{width:"100%"}},{default:a(()=>[l(s,{prop:"image",label:"图片",width:"180"},{default:a(o=>[l(w,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:o.row.image||v.value.image},null,8,["src"])]),_:1}),l(s,{prop:"sku",label:"名称",width:"180"},{default:a(o=>[E("span",null,W(o.row.sku||v.value.store_name),1)]),_:1}),l(s,{prop:"price",label:"价格"}),l(s,{prop:"stock",label:"库存"},{default:a(o=>[l(Y,{modelValue:o.row.stock,"onUpdate:modelValue":x=>o.row.stock=x,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):z("",!0)]),_:1},8,["modelValue"]),l(we,{ref_key:"addRef",ref:$,onReload:e[7]||(e[7]=o=>_(!0))},null,512)])),[[ee,q.value]])}}},$e=H(xe,[["__scopeId","data-v-e8828dd9"]]);export{$e as default}; +import{_ as H,r as c,u as Q,b as d,c as f,d as L,w as a,h as S,t as W,e as E,f as l,q as K,g as k,E as g,D as M,l as te,v as le,p as ae,F as oe,i as ne,x as z}from"./index-Bk2tV8p_.js";import{p as re,c as ue,a as de,b as ie,d as se,s as pe,u as ce,e as _e}from"./shop-ClJViHUh.js";const me={key:0},fe={key:1},ve={class:"dra-body"},ge=["src"],ye={__name:"add",emits:["reload"],setup(X,{expose:T,emit:A}){const i=c(!1),q={store_name:"",image:[],slider_image:[],attrValue:[{bar_code:"",price:"",stock:"",cost:"",ot_price:"",wholesale_price:"0",extension_one:"",extension_two:""}],content:{image:[]},unit_name:"",delivery_way:["1"]},n=c(q),U=Q(),D=A,_=c(!1),R=c(""),P=t=>{R.value=t.url,_.value=!0},N=c("add"),I=(t,e)=>{n.value=q,N.value=t,t=="add"?i.value=!0:t=="edit"&&(i.value=!0,v(e.product_id))},v=t=>{re(U.userInfo.service.mer_id,t).then(e=>{e.data.image=[{url:e.data.image,uid:e.data.image}],e.data.content.image=e.data.content.image.map(m=>({url:m,uid:e.data.image})),e.data.slider_image=e.data.slider_image.map(m=>({url:m,uid:e.data.image})),n.value=e.data,console.log(n.value)})},B=c([]);(()=>{ue(U.userInfo.service.mer_id).then(t=>{B.value=t.data})})();const O=c(null),j=()=>{var e,m,p,y,h,C;let t=JSON.parse(JSON.stringify(n.value));if(console.log(t.cate_id),t.cate_id&&typeof t.cate_id=="object"&&t.cate_id.length>0?t.cate_id=t.cate_id[t.cate_id.length-1]||"":t.cate_id=t.cate_id||"",t.image=="")return g.error("请上传商品封面图");if(t.slider_image.length==0)return g.error("请上传商品轮播图");if(t.content.image=t.content.image.map(r=>{var s,w,V,b;return(w=(s=r==null?void 0:r.response)==null?void 0:s.data)!=null&&w.path?(b=(V=r==null?void 0:r.response)==null?void 0:V.data)==null?void 0:b.path:r.url}),t.image=(p=(m=(e=t.image[0])==null?void 0:e.response)==null?void 0:m.data)!=null&&p.path?(C=(h=(y=t.image[0])==null?void 0:y.response)==null?void 0:h.data)==null?void 0:C.path:t.image[0].url,t.slider_image=t.slider_image.map(r=>{var s,w,V,b;return(w=(s=r==null?void 0:r.response)==null?void 0:s.data)!=null&&w.path?(b=(V=r==null?void 0:r.response)==null?void 0:V.data)==null?void 0:b.path:r.url}),t.store_name=="")return g.error("请输入商品名称");if(t.cate_id=="")return g.error("请选择平台分类");if(t.attrValue[0].bar_code=="")return g.error("请输入商品条码");if(t.attrValue[0].stock<=0)return g.error("请输入商品库存");if(t.attrValue[0].price<=0)return g.error("请输入商品价格");N.value=="add"?de(U.userInfo.service.mer_id,t).then(r=>{g.success(r.message),D("reload"),$()}):ie(U.userInfo.service.mer_id,t.product_id,t).then(r=>{g.success(r.message),D("reload"),$()})},J=()=>{$()},$=()=>{i.value=!1},F=()=>{};return T({drawer:i,show:I}),(t,e)=>{const m=d("el-input"),p=d("el-form-item"),y=d("el-cascader"),h=d("Plus"),C=d("el-icon"),r=d("el-upload"),s=d("el-form"),w=d("el-dialog"),V=d("el-button"),b=d("el-drawer");return f(),L(b,{size:800,modelValue:i.value,"onUpdate:modelValue":e[10]||(e[10]=u=>i.value=u),direction:"rtl",onOpen:F,"before-close":$},{header:a(()=>[N.value=="add"?(f(),S("h4",me,"添加商品")):(f(),S("h4",fe,"编辑商品 ["+W(n.value.product_id)+"]",1))]),default:a(()=>[E("div",ve,[l(s,{ref_key:"formRef",ref:O,model:n.value,"label-width":"150px"},{default:a(()=>[l(p,{label:"商品条码",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].bar_code,"onUpdate:modelValue":e[0]||(e[0]=u=>n.value.attrValue[0].bar_code=u),type:"number",placeholder:"请输入商品条码"},null,8,["modelValue"])]),_:1}),l(p,{label:"商品名称",required:""},{default:a(()=>[l(m,{modelValue:n.value.store_name,"onUpdate:modelValue":e[1]||(e[1]=u=>n.value.store_name=u),placeholder:"请输入商品名称"},null,8,["modelValue"])]),_:1}),l(p,{label:"平台分类",required:""},{default:a(()=>[l(y,{modelValue:n.value.cate_id,"onUpdate:modelValue":e[2]||(e[2]=u=>n.value.cate_id=u),class:"pageWidth",options:B.value,filterable:"",clearable:""},null,8,["modelValue","options"])]),_:1}),l(p,{label:"商品封面图",required:""},{default:a(()=>[l(r,{"file-list":n.value.image,"onUpdate:fileList":e[3]||(e[3]=u=>n.value.image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:1},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(p,{label:"商品轮播图",required:""},{default:a(()=>[l(r,{"file-list":n.value.slider_image,"onUpdate:fileList":e[4]||(e[4]=u=>n.value.slider_image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:9},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(p,{label:"商品详情"},{default:a(()=>[l(r,{"file-list":n.value.content.image,"onUpdate:fileList":e[5]||(e[5]=u=>n.value.content.image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:9},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(p,{label:"商品单位",required:""},{default:a(()=>[l(m,{modelValue:n.value.unit_name,"onUpdate:modelValue":e[6]||(e[6]=u=>n.value.unit_name=u),placeholder:"请输入商品单位"},null,8,["modelValue"])]),_:1}),l(p,{label:"零售价",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].price,"onUpdate:modelValue":e[7]||(e[7]=u=>n.value.attrValue[0].price=u),type:"number",placeholder:"请输入零售价"},null,8,["modelValue"])]),_:1}),l(p,{label:"库存",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].stock,"onUpdate:modelValue":e[8]||(e[8]=u=>n.value.attrValue[0].stock=u),type:"number",placeholder:"请输入库存"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),l(w,{modelValue:_.value,"onUpdate:modelValue":e[9]||(e[9]=u=>_.value=u)},{default:a(()=>[E("img",{style:{width:"100%",height:"100%"},"w-full":"",src:R.value,alt:"Preview Image"},null,8,ge)]),_:1},8,["modelValue"])]),footer:a(()=>[l(V,{onClick:J},{default:a(()=>[k("取消")]),_:1}),l(V,{type:"primary",onClick:j},{default:a(()=>[k("确认")]),_:1})]),_:1},8,["modelValue"])}}},we=H(ye,[["__scopeId","data-v-2d33ceca"]]),Ve={"element-loading-text":"加载中",class:"my-shop"},be={key:0,style:{color:"#ff4a00"}},ke={key:1},he={key:2},Ce={class:"dialog-footer"},xe={__name:"index",setup(X){const T=c([]),A=Q(),i=c({page:1,limit:15,type:1,keyword:"",staff_id:A.userInfo.service.service_id}),q=c(!1),n=c(0),U=c([]),D=()=>{se(A.userInfo.service.mer_id).then(t=>{U.value=t.data})};D();const _=(t=!1)=>{q.value=!0,t&&D(),pe(A.userInfo.service.mer_id,i.value).then(e=>{T.value=e.data.list,n.value=e.data.count,q.value=!1})};_();const R=t=>{i.value.page=t,_()},P=t=>{i.value.page=t,_()},N=t=>{i.value.page=t,_()},I=c(!1),v=c({}),B=t=>{v.value=t,I.value=!0},G=()=>{let t={attr:v.value.attr||[],attrValue:v.value.attrValue,mer_cate_id:v.value.merCateId||[],spec_type:v.value.spec_type,is_stock:1};ce(v.value.product_id,t).then(e=>{g({message:e.message,type:"success"}),I.value=!1,_()}).catch(e=>{g({message:e,type:"error"})})},O=c("1"),j=t=>{i.value.type=t,i.value.page=1,_()},J=t=>{_e(A.userInfo.service.mer_id,t.product_id,{status:t.is_show?1:0}).then(e=>{g.success(e.message),_(!0)})},$=c(null),F=(t="add",e)=>{$.value.show(t,e)};return(t,e)=>{const m=d("el-input"),p=d("el-form-item"),y=d("el-button"),h=d("el-form"),C=d("el-menu-item"),r=d("el-menu"),s=d("el-table-column"),w=d("el-image"),V=d("el-switch"),b=d("el-table"),u=d("el-pagination"),Y=d("el-input-number"),Z=d("el-dialog"),ee=te("loading");return le((f(),S("div",Ve,[l(h,{inline:!0},{default:a(()=>[l(p,{label:"关键字:"},{default:a(()=>[l(m,{modelValue:i.value.keyword,"onUpdate:modelValue":e[0]||(e[0]=o=>i.value.keyword=o),placeholder:"请输入关键字搜索",style:{width:"20rem"},clearable:"",onClear:e[1]||(e[1]=o=>_(!0)),onKeydown:e[2]||(e[2]=ae(o=>_(!0),["enter"]))},null,8,["modelValue"])]),_:1}),l(p,null,{default:a(()=>[l(y,{type:"primary",onClick:e[3]||(e[3]=o=>_(!0))},{default:a(()=>[k("搜索")]),_:1})]),_:1}),l(p,null,{default:a(()=>[l(y,{type:"primary",onClick:e[4]||(e[4]=o=>F("add"))},{default:a(()=>[k("新增")]),_:1})]),_:1})]),_:1}),l(r,{"default-active":O.value,class:"el-menu-top",mode:"horizontal",onSelect:j},{default:a(()=>[(f(!0),S(oe,null,ne(U.value,(o,x)=>(f(),L(C,{index:o.type+"",key:x},{default:a(()=>[k(W(`${o.name}(${o.count})`),1)]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"]),l(b,{data:T.value,style:{width:"100%"}},{default:a(()=>[l(s,{prop:"product_id",label:"ID",width:"100"}),l(s,{prop:"image",label:"图片",width:"120"},{default:a(o=>[l(w,{loading:"lazy",style:{width:"60px",height:"60px"},src:o.row.image},null,8,["src"])]),_:1}),l(s,{prop:"store_name",label:"商品名称",width:"500"}),l(s,{prop:"price",label:"售价"}),l(s,{prop:"stock",label:"库存"}),i.value.type<=2?(f(),L(s,{key:0,label:"上/下架",width:"100"},{default:a(o=>[l(V,{modelValue:o.row.is_show,"onUpdate:modelValue":x=>o.row.is_show=x,"active-value":1,"inline-prompt":"","active-text":"上架","inactive-text":"下架",onClick:x=>J(o.row)},null,8,["modelValue","onUpdate:modelValue","onClick"])]),_:1})):z("",!0),i.value.type<=4?(f(),L(s,{key:1,label:"商品状态",width:"100"},{default:a(o=>[o.row.is_used?o.row.is_show?(f(),S("span",ke,"上架显示")):(f(),S("span",he,"下架")):(f(),S("span",be,"平台关闭"))]),_:1})):z("",!0),l(s,{label:"操作",width:"120"},{default:a(o=>[i.value.type!=5?(f(),L(y,{key:0,type:"primary",link:"",onClick:x=>B(o.row)},{default:a(()=>[k("修改库存")]),_:2},1032,["onClick"])):z("",!0),i.value.type!=1&&i.value.type!=5?(f(),L(y,{key:1,type:"primary",link:"",onClick:x=>F("edit",o.row)},{default:a(()=>[k("编辑")]),_:2},1032,["onClick"])):z("",!0)]),_:1})]),_:1},8,["data"]),l(u,{"page-size":i.value.limit,layout:"prev, pager, next",total:n.value,onPrevClick:R,onNextClick:P,onCurrentChange:N},null,8,["page-size","total"]),l(Z,{modelValue:I.value,"onUpdate:modelValue":e[6]||(e[6]=o=>I.value=o),title:"编辑商品库存",width:"800"},{footer:a(()=>[E("div",Ce,[l(y,{onClick:e[5]||(e[5]=o=>I.value=!1)},{default:a(()=>[k("取消")]),_:1}),l(y,{type:"primary",onClick:G},{default:a(()=>[k(" 确定 ")]),_:1})])]),default:a(()=>[v.value.attrValue?(f(),L(b,{key:0,data:v.value.attrValue,stripe:"",style:{width:"100%"}},{default:a(()=>[l(s,{prop:"image",label:"图片",width:"180"},{default:a(o=>[l(w,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:o.row.image||v.value.image},null,8,["src"])]),_:1}),l(s,{prop:"sku",label:"名称",width:"180"},{default:a(o=>[E("span",null,W(o.row.sku||v.value.store_name),1)]),_:1}),l(s,{prop:"price",label:"价格"}),l(s,{prop:"stock",label:"库存"},{default:a(o=>[l(Y,{modelValue:o.row.stock,"onUpdate:modelValue":x=>o.row.stock=x,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):z("",!0)]),_:1},8,["modelValue"]),l(we,{ref_key:"addRef",ref:$,onReload:e[7]||(e[7]=o=>_(!0))},null,512)])),[[ee,q.value]])}}},$e=H(xe,[["__scopeId","data-v-e8828dd9"]]);export{$e as default}; diff --git a/dist/assets/index-CPPpv-Op.js b/dist/assets/index-CPPpv-Op.js new file mode 100644 index 0000000..a7545bb --- /dev/null +++ b/dist/assets/index-CPPpv-Op.js @@ -0,0 +1 @@ +import{o as r,d as o}from"./detail-CWvVuxiN.js";import{p as t}from"./padding-uJoj-HCO.js";import{c as a,h as s,f as e}from"./index-Bk2tV8p_.js";import"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js";import"./pay-CYK_Zo7-.js";const c={class:"my-card"},u={__name:"index",setup(d){return(i,l)=>(a(),s("div",c,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/index-B6Hf3Med.js b/dist/assets/index-CdYLFw_W.js similarity index 97% rename from dist/assets/index-B6Hf3Med.js rename to dist/assets/index-CdYLFw_W.js index 5587dc0..cb99263 100644 --- a/dist/assets/index-B6Hf3Med.js +++ b/dist/assets/index-CdYLFw_W.js @@ -1 +1 @@ -import{_ as G,u as J,r as a,b as w,l as M,c as t,h as s,e,f as c,w as p,g as $,p as Q,v as x,F as T,i as H,x as l,E as L,m as U,s as z,t as d,d as q,y as W,z as X,C as Y,n as j,o as Z,H as O,I as ee}from"./index-BSSh7Jos.js";import{v as te,f as se,i as oe}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js";import{p as ie}from"./pay-BcBBz6sQ.js";import{p as ae}from"./padding-o_E7jGNN.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},Se={key:1},xe={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:S}){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 L.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(n=>{b.value=[n.data],U.emit("set-order-detail",b.value[0]),g.value=!1}).catch(n=>{m.value=!0,g.value=!1})},B=(r,n)=>{h.value=n,U.emit("set-order-detail",r)},D=r=>{v.value.search_info=r,C(!0)},P=S,K=()=>{P("backOne")};return k({setCode:D}),(r,n)=>{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,[c(u,{type:"primary",size:"small",onClick:K},{default:p(()=>[$("返回上一页")]),_:1})])]),e("div",_e,[c(E,{modelValue:v.value.search_info,"onUpdate:modelValue":n[1]||(n[1]=i=>v.value.search_info=i),placeholder:"请输入订单编号",onKeydown:n[2]||(n[2]=Q(i=>C(!0),["enter"])),clearable:""},{append:p(()=>[c(u,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:n[0]||(n[0]=i=>C(!0))},{default:p(()=>[$("搜索")]),_:1})]),_:1},8,["modelValue"])]),x((t(),s("div",ue,[(t(!0),s(T,null,H(b.value,(i,A)=>(t(),s("div",{class:z(["item",{"item-active":h.value==A}]),key:A,onClick:_=>B(i,A)},[e("div",pe,[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",fe,d(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,d(i.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",ke,[e("div",ge,"¥"+d(i.pay_price),1),e("div",$e,"共"+d(i.total_num)+"件商品",1)])]),e("div",be,[e("div",Ce,[i.paid?(t(),s("div",Ve,[$(" 已支付 "),i.pay_type==13?(t(),s("span",we,"(支付宝收款)")):l("",!0),i.pay_type==12?(t(),s("span",Se,"(现金支付)")):l("",!0),i.pay_type==11?(t(),s("span",xe,"(微信收款)")):l("",!0),i.pay_type==0?(t(),s("span",Ie,"(余额支付)")):l("",!0),i.pay_type==1?(t(),s("span",Re,"(微信支付)")):l("",!0),i.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):l("",!0),i.pay_type==10?(t(),s("span",Pe,"(对公转账)")):l("",!0)])):(t(),s("div",Ae,"未支付"))]),i.service_info?(t(),s("div",Ee,"收银员: "+d(i.service_info.nickname),1)):(t(),s("div",Oe,"平台订单"))])],10,ve))),128)),m.value?(t(),s("div",Ue,"没有更多了")):l("",!0),g.value?(t(),s("div",ze,"加载中...")):l("",!0)])),[[F,g.value],[R,C]])])}}},De=G(Be,[["__scopeId","data-v-aaa26790"]]),f=y=>(W("data-v-5d71f69a"),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"}},je={style:{display:"flex","align-items":"center"}},Ge={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"},St={key:1,class:"table-info",style:{"flex-direction":"column"}},xt={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 S=J(),I=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r,j(()=>{var n;(n=P.value)==null||n.toggleAllSelection()})}),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,se({order_sn:b.value}).then(r=>{L({message:r.message,type:"success"}),I.push({name:"home"})})},D=k,P=a(null),K=()=>{let r=P.value.getSelectionRows();if(r.length==0)return L.error("请选择核销商品");let n={data:[],verify_code:o.value.verify_code};r.forEach(u=>{n.data.push({id:u.order_product_id,num:u.product_num})}),oe(S.userInfo.service.mer_id,o.value.order_id,n).then(u=>{L.success(u.message),D("reInit")}).catch(u=>{L.error(u.message)})};return(r,n)=>{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"),A=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},d(_),11,Fe))),128)),e("div",{class:z(["nav-item",{"nav-item-radius2":h.value==m.value.length-1}]),style:{flex:"1"}},null,2)]),x((t(),s("div",Me,[o.value.orderProduct&&h.value==0?(t(),s("div",Te,[e("div",He,[$(" 共计 "),e("span",qe,d(o.value.total_num),1),$(" 件商品 ")]),c(F,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct,ref_key:"tableRef",ref:P},{default:p(()=>[c(u,{type:"selection",width:"55"}),c(u,{prop:"cart_info.product.store_name",label:"商品信息"},{default:p(({row:_})=>[e("div",je,[c(E,{style:{height:"3rem",width:"3rem"},src:_.cart_info.productAttr.image||_.cart_info.product.image},null,8,["src"]),e("span",Ge,d(_.cart_info.product.store_name),1)])]),_:1}),c(u,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(u,{prop:"product_num",label:"数量",width:"180"},{default:p(({row:_})=>[c(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}),c(u,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&h.value==1?(t(),s("div",Je,[Qe,e("div",We,[e("div",Xe,[Ye,e("div",Ze,d(o.value.create_time),1)]),e("div",et,[tt,e("div",st,d(o.value.total_num),1)]),e("div",ot,[it,e("div",at,"¥"+d(o.value.total_price),1)]),e("div",nt,[lt,e("div",ct,d(o.value.pay_time),1)]),e("div",dt,[rt,e("div",_t,"¥"+d(o.value.deduction_price),1)]),e("div",ut,[vt,e("div",pt,"¥"+d(o.value.pay_price),1)]),e("div",ft,[ht,e("div",mt,[o.value.pay_type==11?(t(),s("span",yt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",kt,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",$t,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",bt,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",Ct,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",Vt,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",wt,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",St,[e("div",xt,[It,e("div",Rt,[c(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,d(o.value.service_info.nickname),1)]),e("div",Et,[Ot,e("div",Ut,d(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),e("div",zt,[e("div",Bt,[e("div",Dt,[$(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.verify_status==0?(t(),s("div",Kt,[c(R,{class:"btn",type:"warning",onClick:K},{default:p(()=>[$("核销")]),_:1})])):(t(),s("div",Nt,"已支付"))])])),[[A,g.value]]),c(ie,{ref_key:"payRef",ref:v},null,512),c(i,{modelValue:C.value,"onUpdate:modelValue":n[1]||(n[1]=_=>C.value=_),title:"提示",width:"500"},{footer:p(()=>[e("div",Mt,[c(R,{onClick:n[0]||(n[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=G(Tt,[["__scopeId","data-v-5d71f69a"]]),qt={class:"my-card"},jt={class:"my-code"},Gt=e("h2",null,"订单核销",-1),Jt={class:"box"},es={__name:"index",setup(y){const k=a(1),S=a(""),I=a(null),o=a(null),v=()=>{if(S.value=="")return L.error("请输入订单编号");k.value=2,j(()=>{o.value.setCode(S.value)})},g=()=>{v()};return Z(()=>{j(()=>{I.value.focus()})}),(h,m)=>(t(),s("div",qt,[x(e("div",jt,[Gt,e("div",Jt,[x(e("input",{ref_key:"inputRef",ref:I,"onUpdate:modelValue":m[0]||(m[0]=b=>S.value=b),placeholder:"",class:"input",onKeyup:Q(v,["enter"])},null,544),[[ee,S.value]]),e("div",{class:"btn",onClick:v},"查询")])],512),[[O,k.value==1]]),x(c(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]]),x(c(ae,null,null,512),[[O,k.value==2]]),x(c(Ht,{ref:"detailRef",onReInit:g},null,512),[[O,k.value==2]])]))}};export{es as default}; +import{_ as G,u as J,r as a,b as w,l as M,c as t,h as s,e,f as c,w as p,g as $,p as Q,v as x,F as T,i as H,x as l,E as L,m as U,s as z,t as d,d as q,y as W,z as X,C as Y,n as j,o as Z,H as O,I as ee}from"./index-Bk2tV8p_.js";import{v as te,f as se,i as oe}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js";import{p as ie}from"./pay-CYK_Zo7-.js";import{p as ae}from"./padding-uJoj-HCO.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},Se={key:1},xe={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:S}){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 L.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(n=>{b.value=[n.data],U.emit("set-order-detail",b.value[0]),g.value=!1}).catch(n=>{m.value=!0,g.value=!1})},B=(r,n)=>{h.value=n,U.emit("set-order-detail",r)},D=r=>{v.value.search_info=r,C(!0)},P=S,K=()=>{P("backOne")};return k({setCode:D}),(r,n)=>{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,[c(u,{type:"primary",size:"small",onClick:K},{default:p(()=>[$("返回上一页")]),_:1})])]),e("div",_e,[c(E,{modelValue:v.value.search_info,"onUpdate:modelValue":n[1]||(n[1]=i=>v.value.search_info=i),placeholder:"请输入订单编号",onKeydown:n[2]||(n[2]=Q(i=>C(!0),["enter"])),clearable:""},{append:p(()=>[c(u,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:n[0]||(n[0]=i=>C(!0))},{default:p(()=>[$("搜索")]),_:1})]),_:1},8,["modelValue"])]),x((t(),s("div",ue,[(t(!0),s(T,null,H(b.value,(i,A)=>(t(),s("div",{class:z(["item",{"item-active":h.value==A}]),key:A,onClick:_=>B(i,A)},[e("div",pe,[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",fe,d(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,d(i.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",ke,[e("div",ge,"¥"+d(i.pay_price),1),e("div",$e,"共"+d(i.total_num)+"件商品",1)])]),e("div",be,[e("div",Ce,[i.paid?(t(),s("div",Ve,[$(" 已支付 "),i.pay_type==13?(t(),s("span",we,"(支付宝收款)")):l("",!0),i.pay_type==12?(t(),s("span",Se,"(现金支付)")):l("",!0),i.pay_type==11?(t(),s("span",xe,"(微信收款)")):l("",!0),i.pay_type==0?(t(),s("span",Ie,"(余额支付)")):l("",!0),i.pay_type==1?(t(),s("span",Re,"(微信支付)")):l("",!0),i.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):l("",!0),i.pay_type==10?(t(),s("span",Pe,"(对公转账)")):l("",!0)])):(t(),s("div",Ae,"未支付"))]),i.service_info?(t(),s("div",Ee,"收银员: "+d(i.service_info.nickname),1)):(t(),s("div",Oe,"平台订单"))])],10,ve))),128)),m.value?(t(),s("div",Ue,"没有更多了")):l("",!0),g.value?(t(),s("div",ze,"加载中...")):l("",!0)])),[[F,g.value],[R,C]])])}}},De=G(Be,[["__scopeId","data-v-aaa26790"]]),f=y=>(W("data-v-5d71f69a"),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"}},je={style:{display:"flex","align-items":"center"}},Ge={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"},St={key:1,class:"table-info",style:{"flex-direction":"column"}},xt={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 S=J(),I=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r,j(()=>{var n;(n=P.value)==null||n.toggleAllSelection()})}),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,se({order_sn:b.value}).then(r=>{L({message:r.message,type:"success"}),I.push({name:"home"})})},D=k,P=a(null),K=()=>{let r=P.value.getSelectionRows();if(r.length==0)return L.error("请选择核销商品");let n={data:[],verify_code:o.value.verify_code};r.forEach(u=>{n.data.push({id:u.order_product_id,num:u.product_num})}),oe(S.userInfo.service.mer_id,o.value.order_id,n).then(u=>{L.success(u.message),D("reInit")}).catch(u=>{L.error(u.message)})};return(r,n)=>{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"),A=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},d(_),11,Fe))),128)),e("div",{class:z(["nav-item",{"nav-item-radius2":h.value==m.value.length-1}]),style:{flex:"1"}},null,2)]),x((t(),s("div",Me,[o.value.orderProduct&&h.value==0?(t(),s("div",Te,[e("div",He,[$(" 共计 "),e("span",qe,d(o.value.total_num),1),$(" 件商品 ")]),c(F,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct,ref_key:"tableRef",ref:P},{default:p(()=>[c(u,{type:"selection",width:"55"}),c(u,{prop:"cart_info.product.store_name",label:"商品信息"},{default:p(({row:_})=>[e("div",je,[c(E,{style:{height:"3rem",width:"3rem"},src:_.cart_info.productAttr.image||_.cart_info.product.image},null,8,["src"]),e("span",Ge,d(_.cart_info.product.store_name),1)])]),_:1}),c(u,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(u,{prop:"product_num",label:"数量",width:"180"},{default:p(({row:_})=>[c(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}),c(u,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&h.value==1?(t(),s("div",Je,[Qe,e("div",We,[e("div",Xe,[Ye,e("div",Ze,d(o.value.create_time),1)]),e("div",et,[tt,e("div",st,d(o.value.total_num),1)]),e("div",ot,[it,e("div",at,"¥"+d(o.value.total_price),1)]),e("div",nt,[lt,e("div",ct,d(o.value.pay_time),1)]),e("div",dt,[rt,e("div",_t,"¥"+d(o.value.deduction_price),1)]),e("div",ut,[vt,e("div",pt,"¥"+d(o.value.pay_price),1)]),e("div",ft,[ht,e("div",mt,[o.value.pay_type==11?(t(),s("span",yt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",kt,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",$t,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",bt,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",Ct,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",Vt,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",wt,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",St,[e("div",xt,[It,e("div",Rt,[c(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,d(o.value.service_info.nickname),1)]),e("div",Et,[Ot,e("div",Ut,d(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),e("div",zt,[e("div",Bt,[e("div",Dt,[$(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.verify_status==0?(t(),s("div",Kt,[c(R,{class:"btn",type:"warning",onClick:K},{default:p(()=>[$("核销")]),_:1})])):(t(),s("div",Nt,"已支付"))])])),[[A,g.value]]),c(ie,{ref_key:"payRef",ref:v},null,512),c(i,{modelValue:C.value,"onUpdate:modelValue":n[1]||(n[1]=_=>C.value=_),title:"提示",width:"500"},{footer:p(()=>[e("div",Mt,[c(R,{onClick:n[0]||(n[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=G(Tt,[["__scopeId","data-v-5d71f69a"]]),qt={class:"my-card"},jt={class:"my-code"},Gt=e("h2",null,"订单核销",-1),Jt={class:"box"},es={__name:"index",setup(y){const k=a(1),S=a(""),I=a(null),o=a(null),v=()=>{if(S.value=="")return L.error("请输入订单编号");k.value=2,j(()=>{o.value.setCode(S.value)})},g=()=>{v()};return Z(()=>{j(()=>{I.value.focus()})}),(h,m)=>(t(),s("div",qt,[x(e("div",jt,[Gt,e("div",Jt,[x(e("input",{ref_key:"inputRef",ref:I,"onUpdate:modelValue":m[0]||(m[0]=b=>S.value=b),placeholder:"",class:"input",onKeyup:Q(v,["enter"])},null,544),[[ee,S.value]]),e("div",{class:"btn",onClick:v},"查询")])],512),[[O,k.value==1]]),x(c(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]]),x(c(ae,null,null,512),[[O,k.value==2]]),x(c(Ht,{ref:"detailRef",onReInit:g},null,512),[[O,k.value==2]])]))}};export{es as default}; diff --git a/dist/assets/index-CaSlH6Gp.js b/dist/assets/index-ChNrleam.js similarity index 96% rename from dist/assets/index-CaSlH6Gp.js rename to dist/assets/index-ChNrleam.js index f7971ee..7992585 100644 --- a/dist/assets/index-CaSlH6Gp.js +++ b/dist/assets/index-ChNrleam.js @@ -1 +1 @@ -import{_ as U,u as I,r as u,o as L,b as n,c as R,h as S,e as w,f as e,w as t,p as v,g as b,y as C,z as K,C as B,E as d,K as E,L as N}from"./index-BSSh7Jos.js";const M=l=>(C("data-v-59a7e82c"),l=l(),K(),l),T={class:"body"},z={class:"login"},$=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),j={__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 L(()=>{}),(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 R(),S("div",T,[w("div",z,[$,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(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},A=U(j,[["__scopeId","data-v-59a7e82c"]]);export{A as default}; +import{_ as U,u as I,r as u,o as L,b as n,c as R,h as S,e as w,f as e,w as t,p as v,g as b,y as C,z as K,C as B,E as d,K as E,L as N}from"./index-Bk2tV8p_.js";const M=l=>(C("data-v-59a7e82c"),l=l(),K(),l),T={class:"body"},z={class:"login"},$=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),j={__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 L(()=>{}),(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 R(),S("div",T,[w("div",z,[$,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(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},A=U(j,[["__scopeId","data-v-59a7e82c"]]);export{A as default}; diff --git a/dist/assets/index-NzoYMkoT.js b/dist/assets/index-NzoYMkoT.js deleted file mode 100644 index d5a2b82..0000000 --- a/dist/assets/index-NzoYMkoT.js +++ /dev/null @@ -1 +0,0 @@ -import{o as r,d as o}from"./detail-CEWzHPJj.js";import{p as t}from"./padding-o_E7jGNN.js";import{c as a,h as s,f as e}from"./index-BSSh7Jos.js";import"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js";import"./pay-BcBBz6sQ.js";const c={class:"my-card"},u={__name:"index",setup(d){return(i,l)=>(a(),s("div",c,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/indexCount-BkoYwO8l.js b/dist/assets/indexCount-DOq_q61f.js similarity index 95% rename from dist/assets/indexCount-BkoYwO8l.js rename to dist/assets/indexCount-DOq_q61f.js index 509a00d..357eb5c 100644 --- a/dist/assets/indexCount-BkoYwO8l.js +++ b/dist/assets/indexCount-DOq_q61f.js @@ -1 +1 @@ -import{h as x,s as P}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js";import{_ as b,u as w,r as o,b as u,l as I,v as S,c as p,h,e,t,x as C,f as i,w as m,g as D,y as F,z as N,C as V}from"./index-BSSh7Jos.js";const a=c=>(F("data-v-891907f0"),c=c(),N(),c),k={"element-loading-text":"加载中",class:"my-order"},B={key:0,class:"from"},L={class:"form-card green"},A=a(()=>e("div",{class:"tips"},"今日线上收银金额",-1)),O={class:"form-card green"},z=a(()=>e("div",{class:"tips"},"昨日线上收银金额",-1)),E={class:"form-card green"},R=a(()=>e("div",{class:"tips"},"本月线上收银金额",-1)),T={class:"form-card"},U=a(()=>e("div",{class:"tips"},"今日收银 线上+现金 总金额",-1)),j={class:"form-card"},q=a(()=>e("div",{class:"tips"},"本月收银 线上+现金 总金额",-1)),G={class:"form-card red"},H=a(()=>e("div",{class:"tips"},"今日现金收银金额",-1)),J={class:"form-card red"},K=a(()=>e("div",{class:"tips"},"昨日现金收银金额",-1)),M={class:"form-card red"},Q=a(()=>e("div",{class:"tips"},"本月现金收银金额",-1)),W={class:"form-card"},X=a(()=>e("div",{class:"tips"},"昨日收银 线上+现金 总金额",-1)),Y={class:"table"},Z={__name:"indexCount",setup(c){const l=w(),_=o([]);V(),o(1),o(null);const y=o({page:1,limit:15,staff_id:l.userInfo.service.service_id}),n=o(!1);o(0),(()=>{x(l.userInfo.service.mer_id,y.value).then(r=>{_.value=r.data})})();const s=o({});return(()=>{n.value=!0,P(l.userInfo.service.mer_id,{staff_id:l.userInfo.service.service_id}).then(r=>{s.value=r.data.data,n.value=!1})})(),(r,se)=>{const d=u("el-table-column"),f=u("el-table"),g=I("loading");return S((p(),h("div",k,[s.value.today?(p(),h("div",B,[e("div",L,[e("div",null,t(s.value.today.payPrice),1),A]),e("div",O,[e("div",null,t(s.value.yesterday.payPrice),1),z]),e("div",E,[e("div",null,t(s.value.month.payPrice),1),R]),e("div",T,[e("div",null,t((s.value.today.cashPayment+s.value.today.payPrice).toFixed(2)),1),U]),e("div",j,[e("div",null,t((s.value.month.cashPayment+s.value.month.payPrice).toFixed(2)),1),q]),e("div",G,[e("div",null,t(s.value.today.cashPayment),1),H]),e("div",J,[e("div",null,t(s.value.yesterday.cashPayment),1),K]),e("div",M,[e("div",null,t(s.value.month.cashPayment),1),Q]),e("div",W,[e("div",null,t((s.value.yesterday.cashPayment+s.value.yesterday.payPrice).toFixed(2)),1),X])])):C("",!0),e("div",Y,[i(f,{data:_.value,style:{width:"100%"}},{default:m(()=>[i(d,{prop:"day",label:"日期",width:"260"}),i(d,{prop:"total",label:"订单数量"}),i(d,{prop:"cash_payment",label:"现金收银金额"}),i(d,{prop:"pay_price",label:"线上收银金额"}),i(d,{label:"总金额"},{default:m(v=>[D(t(((+v.row.pay_price||0)+(+v.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[g,n.value]])}}},oe=b(Z,[["__scopeId","data-v-891907f0"]]);export{oe as default}; +import{h as x,s as P}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js";import{_ as b,u as w,r as o,b as u,l as I,v as S,c as p,h,e,t,x as C,f as i,w as m,g as D,y as F,z as N,C as V}from"./index-Bk2tV8p_.js";const a=c=>(F("data-v-891907f0"),c=c(),N(),c),k={"element-loading-text":"加载中",class:"my-order"},B={key:0,class:"from"},L={class:"form-card green"},A=a(()=>e("div",{class:"tips"},"今日线上收银金额",-1)),O={class:"form-card green"},z=a(()=>e("div",{class:"tips"},"昨日线上收银金额",-1)),E={class:"form-card green"},R=a(()=>e("div",{class:"tips"},"本月线上收银金额",-1)),T={class:"form-card"},U=a(()=>e("div",{class:"tips"},"今日收银 线上+现金 总金额",-1)),j={class:"form-card"},q=a(()=>e("div",{class:"tips"},"本月收银 线上+现金 总金额",-1)),G={class:"form-card red"},H=a(()=>e("div",{class:"tips"},"今日现金收银金额",-1)),J={class:"form-card red"},K=a(()=>e("div",{class:"tips"},"昨日现金收银金额",-1)),M={class:"form-card red"},Q=a(()=>e("div",{class:"tips"},"本月现金收银金额",-1)),W={class:"form-card"},X=a(()=>e("div",{class:"tips"},"昨日收银 线上+现金 总金额",-1)),Y={class:"table"},Z={__name:"indexCount",setup(c){const l=w(),_=o([]);V(),o(1),o(null);const y=o({page:1,limit:15,staff_id:l.userInfo.service.service_id}),n=o(!1);o(0),(()=>{x(l.userInfo.service.mer_id,y.value).then(r=>{_.value=r.data})})();const s=o({});return(()=>{n.value=!0,P(l.userInfo.service.mer_id,{staff_id:l.userInfo.service.service_id}).then(r=>{s.value=r.data.data,n.value=!1})})(),(r,se)=>{const d=u("el-table-column"),f=u("el-table"),g=I("loading");return S((p(),h("div",k,[s.value.today?(p(),h("div",B,[e("div",L,[e("div",null,t(s.value.today.payPrice),1),A]),e("div",O,[e("div",null,t(s.value.yesterday.payPrice),1),z]),e("div",E,[e("div",null,t(s.value.month.payPrice),1),R]),e("div",T,[e("div",null,t((s.value.today.cashPayment+s.value.today.payPrice).toFixed(2)),1),U]),e("div",j,[e("div",null,t((s.value.month.cashPayment+s.value.month.payPrice).toFixed(2)),1),q]),e("div",G,[e("div",null,t(s.value.today.cashPayment),1),H]),e("div",J,[e("div",null,t(s.value.yesterday.cashPayment),1),K]),e("div",M,[e("div",null,t(s.value.month.cashPayment),1),Q]),e("div",W,[e("div",null,t((s.value.yesterday.cashPayment+s.value.yesterday.payPrice).toFixed(2)),1),X])])):C("",!0),e("div",Y,[i(f,{data:_.value,style:{width:"100%"}},{default:m(()=>[i(d,{prop:"day",label:"日期",width:"260"}),i(d,{prop:"total",label:"订单数量"}),i(d,{prop:"cash_payment",label:"现金收银金额"}),i(d,{prop:"pay_price",label:"线上收银金额"}),i(d,{label:"总金额"},{default:m(v=>[D(t(((+v.row.pay_price||0)+(+v.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[g,n.value]])}}},oe=b(Z,[["__scopeId","data-v-891907f0"]]);export{oe as default}; diff --git a/dist/assets/indexList-DNUk1zhW.js b/dist/assets/indexList-DUeZ21QJ.js similarity index 96% rename from dist/assets/indexList-DNUk1zhW.js rename to dist/assets/indexList-DUeZ21QJ.js index 97a4a9f..0bf9499 100644 --- a/dist/assets/indexList-DNUk1zhW.js +++ b/dist/assets/indexList-DUeZ21QJ.js @@ -1 +1 @@ -import{e as F,a as G,g as J,f as K}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js";import{_ as Q,u as W,r as s,b as d,l as X,v as Y,c as u,h as m,f as t,w as o,g as r,t as Z,e as P,d as I,C as ee,E as h,y as te,z as ae}from"./index-BSSh7Jos.js";import{p as oe}from"./pay-BcBBz6sQ.js";const le=v=>(te("data-v-80048b20"),v=v(),ae(),v),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(v){const k=W(),C=s([]),b=ee(),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=>{J({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,K({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=X("loading");return Y((u(),m("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(),m("span",ne,"已支付")):(u(),m("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),m("span",ie,Z(l.row.pay_time),1)):(u(),m("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(oe,{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]])}}},fe=Q(pe,[["__scopeId","data-v-80048b20"]]);export{fe as default}; +import{e as F,a as G,g as J,f as K}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js";import{_ as Q,u as W,r as s,b as d,l as X,v as Y,c as u,h as m,f as t,w as o,g as r,t as Z,e as P,d as I,C as ee,E as h,y as te,z as ae}from"./index-Bk2tV8p_.js";import{p as oe}from"./pay-CYK_Zo7-.js";const le=v=>(te("data-v-80048b20"),v=v(),ae(),v),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(v){const k=W(),C=s([]),b=ee(),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=>{J({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,K({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=X("loading");return Y((u(),m("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(),m("span",ne,"已支付")):(u(),m("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),m("span",ie,Z(l.row.pay_time),1)):(u(),m("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(oe,{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]])}}},fe=Q(pe,[["__scopeId","data-v-80048b20"]]);export{fe as default}; diff --git a/dist/assets/indexSystem-BJUePvAn.js b/dist/assets/indexSystem-BJUePvAn.js new file mode 100644 index 0000000..8c6cf36 --- /dev/null +++ b/dist/assets/indexSystem-BJUePvAn.js @@ -0,0 +1 @@ +import{o as r,d as t}from"./detail-CWvVuxiN.js";import{p as o}from"./padding-uJoj-HCO.js";import{c as s,h as a,f as e}from"./index-Bk2tV8p_.js";import"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js";import"./pay-CYK_Zo7-.js";const i={class:"my-card"},u={__name:"indexSystem",setup(m){return(c,d)=>(s(),a("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef",isSystem:""},null,512),e(o),e(t,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/indexSystem-DjM2GFw6.js b/dist/assets/indexSystem-DjM2GFw6.js deleted file mode 100644 index 8813c5f..0000000 --- a/dist/assets/indexSystem-DjM2GFw6.js +++ /dev/null @@ -1 +0,0 @@ -import{o as r,d as t}from"./detail-CEWzHPJj.js";import{p as o}from"./padding-o_E7jGNN.js";import{c as s,h as a,f as e}from"./index-BSSh7Jos.js";import"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js";import"./pay-BcBBz6sQ.js";const i={class:"my-card"},u={__name:"indexSystem",setup(m){return(c,d)=>(s(),a("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef",isSystem:""},null,512),e(o),e(t,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/padding-o_E7jGNN.js b/dist/assets/padding-uJoj-HCO.js similarity index 65% rename from dist/assets/padding-o_E7jGNN.js rename to dist/assets/padding-uJoj-HCO.js index d65152c..b40d215 100644 --- a/dist/assets/padding-o_E7jGNN.js +++ b/dist/assets/padding-uJoj-HCO.js @@ -1 +1 @@ -import{_ as e,c as t,h as c}from"./index-BSSh7Jos.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-Bk2tV8p_.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-BcBBz6sQ.js b/dist/assets/pay-CYK_Zo7-.js similarity index 97% rename from dist/assets/pay-BcBBz6sQ.js rename to dist/assets/pay-CYK_Zo7-.js index a4460b9..06b85a9 100644 --- a/dist/assets/pay-BcBBz6sQ.js +++ b/dist/assets/pay-CYK_Zo7-.js @@ -1 +1 @@ -import{_ as ie,r as c,u as de,J as ve,o as _e,m as I,a as fe,b as L,l as pe,c as y,d as Q,w as g,e as t,s as O,g as V,t as $,v as me,h as C,f as S,p as ye,F as ge,i as he,n as E,E as _,y as ke,z as be}from"./index-BSSh7Jos.js";import{j as X,k as we,g as Ce}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js";const z=b=>{if(!b)return;let A=new window.SpeechSynthesisUtterance(b);window.speechSynthesis.speak(A)},B=b=>(ke("data-v-d2507c03"),b=b(),be(),b),Se=B(()=>t("h4",null,"选择支付方式",-1)),xe={class:"dra-body"},Ve={class:"header"},Ee=B(()=>t("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Be={style:{color:"#f5222d","padding-bottom":"2rem"}},je={style:{"font-size":"1.6rem"}},De={key:0,"element-loading-text":"支付中",class:"card1"},Ie=B(()=>t("div",{class:"tips"},null,-1)),Le={key:1,class:"card2"},Pe={class:"drawer-body"},$e={class:"counter"},ze={class:"received"},Ae={key:0},Fe={key:1,style:{"font-size":"1rem",color:"#999"}},Te={key:0,class:"balance"},Ue={class:"money"},Ne=B(()=>t("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Oe={key:1,class:"balance"},Re=B(()=>t("div",null,"不够找零, 请支付更多金额",-1)),Ke=B(()=>t("div",{class:"tips"},"按下小键盘输入金额",-1)),Me=[Re,Ke],qe={class:"keypad"},Je={class:"left"},We={class:"right"},Ge={style:{width:"100%",display:"flex","justify-content":"center"}},He={__name:"pay",emits:["paySuccess"],setup(b,{expose:A,emit:Y}){const f=c(!1),p=c(1),l=c(""),r=c(""),R=de(),Z=()=>{h()},ee=()=>{E(()=>{setTimeout(()=>{var e;u.value=!1,l.value="",T.value=!0,(e=r.value)==null||e.focus(),w(p.value)},300)})},w=e=>{p.value=e,p.value==2?window.addEventListener("keydown",N):(window.removeEventListener("keydown",N),E(()=>{var a;l.value="",(a=r.value)==null||a.focus()}))},m=c({}),F=c([]),ae=e=>{m.value=e.data,F.value=e.cart_id},se=e=>{m.value.order_price=e.price,i.value=e.order_id},te=Y,T=c(!1),le=c(["1","2","3","4","5","6","7","8","9","0","00","."]);let x=0;const K=/^(10|11|12|13|14|15)\d{16}$/,M=/^(25|26|27|28|29|30)\d{14,22}$/,i=c(""),oe=()=>{if(u.value=!0,r.value.blur(),i.value)q(i.value);else{let e;if(K.test(l.value))e="micropay";else if(M.test(l.value))e="alipayBar";else return u.value=!1,l.value="",r.value.focus(),_.error("请输入正确的支付码");X({address_id:"",key:m.value.key,cart_id:F.value,pay_type:e,auth_code:l.value,staff_id:R.userInfo.service.service_id}).then(a=>{if(a.status==200&&(a.message=="支付成功"||a.message=="success"))f.value=!1,_({message:a.message=="success"?"支付成功":a.message,type:"success"}),z(a.data.message||a.data.result.message),h();else if(a.data.group_order_sn)i.value=a.data.group_order_id,j.value=0,x=0,P(a.data.group_order_sn);else return i.value=a.data.result.order_id,u.value=!1,_({message:a.message,type:"error"})}).catch(a=>{u.value=!1,E(()=>{var s;(s=r.value)==null||s.focus()})})}},q=e=>{let a;if(p.value==1){let s;if(K.test(l.value))s="micropay";else if(M.test(l.value))s="alipayBar";else return u.value=!1,l.value="",r.value.focus(),_.error("请输入正确的支付码");a={type:s,auth_code:l.value}}else a={type:"cash_payment"};we(e,a).then(s=>{s.status==200&&(s.message=="支付成功"||s.message=="success")?(f.value=!1,_({message:s.message=="success"?"支付成功":s.message,type:"success"}),z(s.data.message||s.data.result.message),h()):(i.value=s.data.group_order_id,j.value=0,x=0,P(s.data.group_order_sn))}).catch(s=>{l.value="",u.value=!1,E(()=>{var k;(k=r.value)==null||k.focus()})})},j=c(0),P=e=>{e&&(j.value++,x+=5e3,Ce({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(_({message:a.message,type:"success"}),z(a.data.message),h()):(_({message:a.message,type:"error"}),l.value="",u.value=!1,E(()=>{var s;(s=r.value)==null||s.focus()}))}).catch(a=>{T.value&&j.value<3?setTimeout(()=>{P(e)},15e3-x>0?15e3-x:0):(l.value="",u.value=!1,E(()=>{var s;(s=r.value)==null||s.focus()}))}))},h=()=>{var e;window.removeEventListener("keydown",N),T.value=!1,u.value=!1,l.value="",o.value="",d.value=[],(e=r.value)==null||e.blur(),te("paySuccess"),f.value=!1},u=c(!1);A({drawer:f,setForm:ae,setRePay:se,beforeClose:h});const d=c([]),o=c(""),D=ve(()=>+o.value>0?(o.value-m.value.order_price).toFixed(2):-1),J=c(!1),U=e=>{e===-1?d.value=[]:d.value.pop(),o.value=d.value.length?d.value.join(""):0},n=e=>{J.value===!1&&(o.value="",J.value=!0);let a=String(o.value).indexOf(".")+1,s=String(o.value).length-a;console.log(a,s),(a===0||s<2)&&(d.value.join("")<=9999999&&d.value.push(e),o.value=d.value.join("")>99999999?99999999:d.value.join(""))},W=()=>{if(D.value===""||D.value===null||D.value===void 0||+o.value<+m.value.order_price)return _.error("收款金额应该大于等于应收金额");i.value?q(i.value):X({address_id:"",key:m.value.key,cart_id:F.value,pay_type:"cash_payment",staff_id:R.userInfo.service.service_id}).then(e=>{if(e.status==200&&e.message=="支付成功")f.value=!1,_({message:e.message,type:"success"}),w(1),z(e.data.message),h();else if(e.data.group_order_sn)i.value=e.data.group_order_id,j.value=0,x=0,P(e.data.group_order_sn);else return i.value=e.data.result.order_id,o.value="",d.value=[],u.value=!1,_({message:e.message,type:"error"})}).catch(e=>{u.value=!1})},N=e=>{let s=(e||window.event).keyCode;if(s==37)return w(2);if(s==120)return I.emit("F9");if(s==27)return h();switch(e.stopPropagation(),e.preventDefault(),s){case 96:case 48:n(0);break;case 97:case 49:n(1);break;case 98:case 50:n(2);break;case 99:case 51:n(3);break;case 100:case 52:n(4);break;case 101:case 53:n(5);break;case 102:case 54:n(6);break;case 103:case 55:n(7);break;case 104:case 56:n(8);break;case 105:case 57:n(9);break;case 110:n(".");break;case 190:n(".");break;case 8:U();break;case 13:W();break}},G=()=>{if(f.value&&p.value==2)return w(1)},H=()=>{if(f.value&&p.value==1)return w(2)};return _e(()=>{I.on("left",G),I.on("right",H)}),fe(()=>{I.off("left",G),I.off("right",H)}),(e,a)=>{const s=L("el-input"),k=L("el-button"),ce=L("Delete"),ue=L("el-icon"),ne=L("el-drawer"),re=pe("loading");return y(),Q(ne,{size:800,modelValue:f.value,"onUpdate:modelValue":a[4]||(a[4]=v=>f.value=v),direction:"rtl",onOpen:ee,"before-close":h},{header:g(()=>[Se]),default:g(()=>[t("div",xe,[t("div",Ve,[t("div",{class:O(["left",{active:p.value==1}]),onClick:a[0]||(a[0]=v=>w(1))}," 微信/支付宝 ",2),t("div",{class:O(["right",{active:p.value==2}]),onClick:a[1]||(a[1]=v=>w(2))}," 现金收款 ",2)]),Ee,t("div",Be,[V(" ¥"),t("span",je,$(m.value.order_price),1)]),p.value==1?me((y(),C("div",De,[S(s,{ref_key:"codeRef",ref:r,modelValue:l.value,"onUpdate:modelValue":a[2]||(a[2]=v=>l.value=v),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ye(oe,["enter"])},null,8,["modelValue"]),Ie])),[[re,u.value]]):(y(),C("div",Le,[t("div",Pe,[t("div",$e,[t("div",ze,[o.value?(y(),C("span",Ae,$(o.value),1)):(y(),C("span",Fe,"按下键盘输入客户支付金额"))]),D.value>=0?(y(),C("div",Te,[t("div",null,[V("需找零(元):"),t("span",Ue,"¥"+$(D.value),1)]),Ne])):(y(),C("div",Oe,Me)),t("div",qe,[t("div",Je,[(y(!0),C(ge,null,he(le.value,v=>(y(),Q(k,{key:v,onClick:Qe=>n(v)},{default:g(()=>[V($(v),1)]),_:2},1032,["onClick"]))),128))]),t("div",We,[S(k,{onClick:U},{default:g(()=>[S(ue,null,{default:g(()=>[S(ce)]),_:1})]),_:1}),S(k,{onClick:a[3]||(a[3]=v=>U(-1))},{default:g(()=>[V("C")]),_:1}),S(k,{class:O(["enter",{"enter-disable":+o.value<+m.value.order_price}]),disabled:+o.value<+m.value.order_price,onClick:W},{default:g(()=>[V(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:g(()=>[t("div",Ge,[S(k,{class:"cancel-btn",onClick:Z},{default:g(()=>[V("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},Ze=ie(He,[["__scopeId","data-v-d2507c03"]]);export{Ze as p}; +import{_ as ie,r as c,u as de,J as ve,o as _e,m as I,a as fe,b as L,l as pe,c as y,d as Q,w as g,e as t,s as O,g as V,t as $,v as me,h as C,f as S,p as ye,F as ge,i as he,n as E,E as _,y as ke,z as be}from"./index-Bk2tV8p_.js";import{j as X,k as we,g as Ce}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js";const z=b=>{if(!b)return;let A=new window.SpeechSynthesisUtterance(b);window.speechSynthesis.speak(A)},B=b=>(ke("data-v-d2507c03"),b=b(),be(),b),Se=B(()=>t("h4",null,"选择支付方式",-1)),xe={class:"dra-body"},Ve={class:"header"},Ee=B(()=>t("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Be={style:{color:"#f5222d","padding-bottom":"2rem"}},je={style:{"font-size":"1.6rem"}},De={key:0,"element-loading-text":"支付中",class:"card1"},Ie=B(()=>t("div",{class:"tips"},null,-1)),Le={key:1,class:"card2"},Pe={class:"drawer-body"},$e={class:"counter"},ze={class:"received"},Ae={key:0},Fe={key:1,style:{"font-size":"1rem",color:"#999"}},Te={key:0,class:"balance"},Ue={class:"money"},Ne=B(()=>t("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Oe={key:1,class:"balance"},Re=B(()=>t("div",null,"不够找零, 请支付更多金额",-1)),Ke=B(()=>t("div",{class:"tips"},"按下小键盘输入金额",-1)),Me=[Re,Ke],qe={class:"keypad"},Je={class:"left"},We={class:"right"},Ge={style:{width:"100%",display:"flex","justify-content":"center"}},He={__name:"pay",emits:["paySuccess"],setup(b,{expose:A,emit:Y}){const f=c(!1),p=c(1),l=c(""),r=c(""),R=de(),Z=()=>{h()},ee=()=>{E(()=>{setTimeout(()=>{var e;u.value=!1,l.value="",T.value=!0,(e=r.value)==null||e.focus(),w(p.value)},300)})},w=e=>{p.value=e,p.value==2?window.addEventListener("keydown",N):(window.removeEventListener("keydown",N),E(()=>{var a;l.value="",(a=r.value)==null||a.focus()}))},m=c({}),F=c([]),ae=e=>{m.value=e.data,F.value=e.cart_id},se=e=>{m.value.order_price=e.price,i.value=e.order_id},te=Y,T=c(!1),le=c(["1","2","3","4","5","6","7","8","9","0","00","."]);let x=0;const K=/^(10|11|12|13|14|15)\d{16}$/,M=/^(25|26|27|28|29|30)\d{14,22}$/,i=c(""),oe=()=>{if(u.value=!0,r.value.blur(),i.value)q(i.value);else{let e;if(K.test(l.value))e="micropay";else if(M.test(l.value))e="alipayBar";else return u.value=!1,l.value="",r.value.focus(),_.error("请输入正确的支付码");X({address_id:"",key:m.value.key,cart_id:F.value,pay_type:e,auth_code:l.value,staff_id:R.userInfo.service.service_id}).then(a=>{if(a.status==200&&(a.message=="支付成功"||a.message=="success"))f.value=!1,_({message:a.message=="success"?"支付成功":a.message,type:"success"}),z(a.data.message||a.data.result.message),h();else if(a.data.group_order_sn)i.value=a.data.group_order_id,j.value=0,x=0,P(a.data.group_order_sn);else return i.value=a.data.result.order_id,u.value=!1,_({message:a.message,type:"error"})}).catch(a=>{u.value=!1,E(()=>{var s;(s=r.value)==null||s.focus()})})}},q=e=>{let a;if(p.value==1){let s;if(K.test(l.value))s="micropay";else if(M.test(l.value))s="alipayBar";else return u.value=!1,l.value="",r.value.focus(),_.error("请输入正确的支付码");a={type:s,auth_code:l.value}}else a={type:"cash_payment"};we(e,a).then(s=>{s.status==200&&(s.message=="支付成功"||s.message=="success")?(f.value=!1,_({message:s.message=="success"?"支付成功":s.message,type:"success"}),z(s.data.message||s.data.result.message),h()):(i.value=s.data.group_order_id,j.value=0,x=0,P(s.data.group_order_sn))}).catch(s=>{l.value="",u.value=!1,E(()=>{var k;(k=r.value)==null||k.focus()})})},j=c(0),P=e=>{e&&(j.value++,x+=5e3,Ce({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(_({message:a.message,type:"success"}),z(a.data.message),h()):(_({message:a.message,type:"error"}),l.value="",u.value=!1,E(()=>{var s;(s=r.value)==null||s.focus()}))}).catch(a=>{T.value&&j.value<3?setTimeout(()=>{P(e)},15e3-x>0?15e3-x:0):(l.value="",u.value=!1,E(()=>{var s;(s=r.value)==null||s.focus()}))}))},h=()=>{var e;window.removeEventListener("keydown",N),T.value=!1,u.value=!1,l.value="",o.value="",d.value=[],(e=r.value)==null||e.blur(),te("paySuccess"),f.value=!1},u=c(!1);A({drawer:f,setForm:ae,setRePay:se,beforeClose:h});const d=c([]),o=c(""),D=ve(()=>+o.value>0?(o.value-m.value.order_price).toFixed(2):-1),J=c(!1),U=e=>{e===-1?d.value=[]:d.value.pop(),o.value=d.value.length?d.value.join(""):0},n=e=>{J.value===!1&&(o.value="",J.value=!0);let a=String(o.value).indexOf(".")+1,s=String(o.value).length-a;console.log(a,s),(a===0||s<2)&&(d.value.join("")<=9999999&&d.value.push(e),o.value=d.value.join("")>99999999?99999999:d.value.join(""))},W=()=>{if(D.value===""||D.value===null||D.value===void 0||+o.value<+m.value.order_price)return _.error("收款金额应该大于等于应收金额");i.value?q(i.value):X({address_id:"",key:m.value.key,cart_id:F.value,pay_type:"cash_payment",staff_id:R.userInfo.service.service_id}).then(e=>{if(e.status==200&&e.message=="支付成功")f.value=!1,_({message:e.message,type:"success"}),w(1),z(e.data.message),h();else if(e.data.group_order_sn)i.value=e.data.group_order_id,j.value=0,x=0,P(e.data.group_order_sn);else return i.value=e.data.result.order_id,o.value="",d.value=[],u.value=!1,_({message:e.message,type:"error"})}).catch(e=>{u.value=!1})},N=e=>{let s=(e||window.event).keyCode;if(s==37)return w(2);if(s==120)return I.emit("F9");if(s==27)return h();switch(e.stopPropagation(),e.preventDefault(),s){case 96:case 48:n(0);break;case 97:case 49:n(1);break;case 98:case 50:n(2);break;case 99:case 51:n(3);break;case 100:case 52:n(4);break;case 101:case 53:n(5);break;case 102:case 54:n(6);break;case 103:case 55:n(7);break;case 104:case 56:n(8);break;case 105:case 57:n(9);break;case 110:n(".");break;case 190:n(".");break;case 8:U();break;case 13:W();break}},G=()=>{if(f.value&&p.value==2)return w(1)},H=()=>{if(f.value&&p.value==1)return w(2)};return _e(()=>{I.on("left",G),I.on("right",H)}),fe(()=>{I.off("left",G),I.off("right",H)}),(e,a)=>{const s=L("el-input"),k=L("el-button"),ce=L("Delete"),ue=L("el-icon"),ne=L("el-drawer"),re=pe("loading");return y(),Q(ne,{size:800,modelValue:f.value,"onUpdate:modelValue":a[4]||(a[4]=v=>f.value=v),direction:"rtl",onOpen:ee,"before-close":h},{header:g(()=>[Se]),default:g(()=>[t("div",xe,[t("div",Ve,[t("div",{class:O(["left",{active:p.value==1}]),onClick:a[0]||(a[0]=v=>w(1))}," 微信/支付宝 ",2),t("div",{class:O(["right",{active:p.value==2}]),onClick:a[1]||(a[1]=v=>w(2))}," 现金收款 ",2)]),Ee,t("div",Be,[V(" ¥"),t("span",je,$(m.value.order_price),1)]),p.value==1?me((y(),C("div",De,[S(s,{ref_key:"codeRef",ref:r,modelValue:l.value,"onUpdate:modelValue":a[2]||(a[2]=v=>l.value=v),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ye(oe,["enter"])},null,8,["modelValue"]),Ie])),[[re,u.value]]):(y(),C("div",Le,[t("div",Pe,[t("div",$e,[t("div",ze,[o.value?(y(),C("span",Ae,$(o.value),1)):(y(),C("span",Fe,"按下键盘输入客户支付金额"))]),D.value>=0?(y(),C("div",Te,[t("div",null,[V("需找零(元):"),t("span",Ue,"¥"+$(D.value),1)]),Ne])):(y(),C("div",Oe,Me)),t("div",qe,[t("div",Je,[(y(!0),C(ge,null,he(le.value,v=>(y(),Q(k,{key:v,onClick:Qe=>n(v)},{default:g(()=>[V($(v),1)]),_:2},1032,["onClick"]))),128))]),t("div",We,[S(k,{onClick:U},{default:g(()=>[S(ue,null,{default:g(()=>[S(ce)]),_:1})]),_:1}),S(k,{onClick:a[3]||(a[3]=v=>U(-1))},{default:g(()=>[V("C")]),_:1}),S(k,{class:O(["enter",{"enter-disable":+o.value<+m.value.order_price}]),disabled:+o.value<+m.value.order_price,onClick:W},{default:g(()=>[V(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:g(()=>[t("div",Ge,[S(k,{class:"cancel-btn",onClick:Z},{default:g(()=>[V("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},Ze=ie(He,[["__scopeId","data-v-d2507c03"]]);export{Ze as p}; diff --git a/dist/assets/pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js b/dist/assets/pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js similarity index 93% rename from dist/assets/pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js rename to dist/assets/pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js index 100ab18..4f9fe2a 100644 --- a/dist/assets/pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-BHT5Hrl2.js +++ b/dist/assets/pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-DxVOSXvW.js @@ -1 +1 @@ -import{G as e}from"./index-BSSh7Jos.js";function n(r){return e.post("user/cart/create",r)}function s(r){return e.get("user/cart/lst",{params:r})}function o(r,t){return e.post(`user/cart/change/${r}`,t)}function u(r){return e.post("v2/order/check",r)}function c(r){return e.post("user/cart/delete",r)}function p(r){return e.post("v2/order/create",r)}function d(r,t){return e.post(`order/pay/${r}`,t)}function f(r){return e.get("micropay_query",{params:r})}function A(r,t){return e.get(`admin/${r}/order_list`,{params:t})}function g(r,t){return e.get(`verifier/${r}/order/${t}`)}function m(r){return e.get("order_lading",{params:r})}function $(r,t,i){return e.post(`verifier/${r}/${t}`,i)}function v(r,t){return e.get(`admin/${r}/statistics`,{params:t})}function h(r,t){return e.get(`admin/${r}/order_price`,{params:t})}export{s as a,o as b,c,n as d,A as e,m as f,f as g,h,$ as i,p as j,d as k,u as o,v as s,g as v}; +import{G as e}from"./index-Bk2tV8p_.js";function n(r){return e.post("user/cart/create",r)}function s(r){return e.get("user/cart/lst",{params:r})}function o(r,t){return e.post(`user/cart/change/${r}`,t)}function u(r){return e.post("v2/order/check",r)}function c(r){return e.post("user/cart/delete",r)}function p(r){return e.post("v2/order/create",r)}function d(r,t){return e.post(`order/pay/${r}`,t)}function f(r){return e.get("micropay_query",{params:r})}function A(r,t){return e.get(`admin/${r}/order_list`,{params:t})}function g(r,t){return e.get(`verifier/${r}/order/${t}`)}function m(r){return e.get("order_lading",{params:r})}function $(r,t,i){return e.post(`verifier/${r}/${t}`,i)}function v(r,t){return e.get(`admin/${r}/statistics`,{params:t})}function h(r,t){return e.get(`admin/${r}/order_price`,{params:t})}export{s as a,o as b,c,n as d,A as e,m as f,f as g,h,$ as i,p as j,d as k,u as o,v as s,g as v}; diff --git a/dist/assets/shop-CDXMAFiz.js b/dist/assets/shop-ClJViHUh.js similarity index 91% rename from dist/assets/shop-CDXMAFiz.js rename to dist/assets/shop-ClJViHUh.js index cc70df8..f82d0e6 100644 --- a/dist/assets/shop-CDXMAFiz.js +++ b/dist/assets/shop-ClJViHUh.js @@ -1 +1 @@ -import{G as e}from"./index-BSSh7Jos.js";function a(t,r){return e.get(`server/${t}/product/lst`,{params:r})}function p(t,r){return e.get(`store/product/detail/${t}`,{params:r})}function o(t,r){return e.post(`user_free_trial/${t}`,r)}function i(t,r){return e.get(`server/${t}/product/title`,{params:r})}function n(t,r,s){return e.post(`server/${t}/product/status/${r}`,s)}function c(t,r){return e.get(`server/${t}/category/list`,{params:r})}function d(t,r){return e.post(`server/${t}/product/create`,r)}function $(t,r,s){return e.post(`server/${t}/product/update/${r}`,s)}function f(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}export{d as a,$ as b,c,i as d,n as e,p as g,f as p,a as s,o as u}; +import{G as e}from"./index-Bk2tV8p_.js";function a(t,r){return e.get(`server/${t}/product/lst`,{params:r})}function p(t,r){return e.get(`store/product/detail/${t}`,{params:r})}function o(t,r){return e.post(`user_free_trial/${t}`,r)}function i(t,r){return e.get(`server/${t}/product/title`,{params:r})}function n(t,r,s){return e.post(`server/${t}/product/status/${r}`,s)}function c(t,r){return e.get(`server/${t}/category/list`,{params:r})}function d(t,r){return e.post(`server/${t}/product/create`,r)}function $(t,r,s){return e.post(`server/${t}/product/update/${r}`,s)}function f(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}export{d as a,$ as b,c,i as d,n as e,p as g,f as p,a as s,o as u}; diff --git a/dist/index.html b/dist/index.html index 4c964bf..ad2d2ad 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,7 +5,7 @@ 里海收银系统 - +