diff --git a/dist/assets/detail-BQfBDwgx.css b/dist/assets/detail-BQfBDwgx.css deleted file mode 100644 index e769d2f..0000000 --- a/dist/assets/detail-BQfBDwgx.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.my-order[data-v-6dea798c]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-6dea798c]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-6dea798c]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-6dea798c]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-6dea798c]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-6dea798c]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-list[data-v-6dea798c]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-list .item[data-v-6dea798c]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .item .top[data-v-6dea798c]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-6dea798c]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-6dea798c]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #2ec479;color:#2ec479;border-radius:.187rem}.my-order .order-list .item .top .cahier2[data-v-6dea798c]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #ff4a00;color:#ff4a00;border-radius:.187rem}.my-order .order-list .item .top .create-time[data-v-6dea798c]{font-size:.8rem}.my-order .order-list .item .shop[data-v-6dea798c]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-6dea798c]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-6dea798c]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-6dea798c]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-6dea798c]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-6dea798c]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-6dea798c]{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-6dea798c]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-6dea798c]{background-color:#efefef}.my-order .load-end[data-v-6dea798c]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-e6e9d4a9]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-e6e9d4a9]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-e6e9d4a9]{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-e6e9d4a9]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-e6e9d4a9]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-e6e9d4a9]{border-radius:0 0 0 1rem}.my-order .detail[data-v-e6e9d4a9]{height:calc(100vh - 10.25rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-e6e9d4a9]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-e6e9d4a9]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-e6e9d4a9]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:2rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-e6e9d4a9]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-e6e9d4a9]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-e6e9d4a9]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-e6e9d4a9]{height:6rem;box-sizing:border-box;padding:0 1.5rem;position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -.0625rem .625rem #eee;display:flex;justify-content:space-between;align-items:center;background-color:#fff}.my-order .detail .footer .info[data-v-e6e9d4a9]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-e6e9d4a9]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-e6e9d4a9]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-e6e9d4a9]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-e6e9d4a9]{border-radius:4rem;padding:1.2rem} diff --git a/dist/assets/detail-CNaDiLm4.js b/dist/assets/detail-CNaDiLm4.js deleted file mode 100644 index 6230bd1..0000000 --- a/dist/assets/detail-CNaDiLm4.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as H,z as X,u as G,r,o as Z,m as P,b as g,j,c as t,h as s,e,t as d,f as c,w as v,g as h,k as ee,q as J,F as x,i as F,p as A,d as K,s as l,A as te,E as N,v as se,x as oe}from"./index-Db3iIaOe.js";import{e as ae,f as ie,g as le}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js";import{h as T}from"./moment-Cl4UOzQZ.js";import{p as ne}from"./pay-CEmj54N0.js";const de={class:"my-order"},ce={class:"header-nav"},re={class:"nav-item"},_e={class:"nav-item-btn"},ue={class:"header-input"},ve={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},pe=["onClick"],fe={class:"top"},me={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},ge={key:0,class:"shop-name"},ke={class:"right"},$e={class:"money"},be={class:"count"},Ce={class:"bottom"},Ve={class:"pay"},Se={key:0},we={key:0},Ye={key:1},De={key:2},Pe={key:3},Le={key:4},Ie={key:5},Me={key:6},Ae={key:1,style:{color:"#ff4a00"}},ze={key:0,class:"cashier"},Be={key:1,class:"cashier"},Re={key:0,class:"load-end"},Ue={key:1,class:"load-end"},qe={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup(V){const D=X(),L=G(),o=V;r([]);const b=r(1),z=$=>{u.value.page=1,S.value=!1,f.value=!1,k.value=[],n(!0)};r(null);const p=r(""),I=()=>{u.value.date=p.value.join("-"),n(!0)},u=r({page:1,limit:20,search_info:"",date:"",staff_id:0});D.query.date&&(p.value=[T(D.query.date).format("YYYY/MM/DD"),T(D.query.date).format("YYYY/MM/DD")],u.value.date=p.value.join("-"));const f=r(!1),B=r(0),Y=r(0),S=r(!1),k=r([]),n=($=!1)=>{if($)u.value.page=1;else if(S.value||f.value)return;o.isSystem||(u.value.staff_id=L.userInfo.service.service_id),f.value=!0,b.value==1&&(u.value.paid=null),b.value==2&&(u.value.paid=0),ae(L.userInfo.service.mer_id,u.value).then(i=>{$?k.value=i.data.list:k.value=[...k.value,...i.data.list],i.data.list.length0&&P.emit("set-order-detail",k.value[0]),B.value=i.data.count,f.value=!1}).catch(i=>{S.value=!0,f.value=!1})},_=($,i)=>{Y.value=i,P.emit("set-order-detail",$)};return Z(()=>{P.on("update-order-detail",$=>{console.log("==="),k.value[Y.value].paid=1})}),($,i)=>{const M=g("el-radio-button"),C=g("el-radio-group"),R=g("el-date-picker"),U=g("el-button"),m=g("el-input"),w=g("el-image"),O=j("loading"),Q=j("infinite-scroll");return t(),s("div",de,[e("div",ce,[e("div",re,d(V.isSystem?"平台订单":"收银订单"),1),e("div",_e,[c(C,{modelValue:b.value,"onUpdate:modelValue":i[0]||(i[0]=a=>b.value=a),onChange:z,size:"small"},{default:v(()=>[c(M,{value:1},{default:v(()=>[h("全部")]),_:1}),c(M,{value:2},{default:v(()=>[h("未支付")]),_:1})]),_:1},8,["modelValue"]),c(R,{modelValue:p.value,"onUpdate:modelValue":i[1]||(i[1]=a=>p.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:I,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ue,[c(m,{modelValue:u.value.search_info,"onUpdate:modelValue":i[3]||(i[3]=a=>u.value.search_info=a),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=ee(a=>n(!0),["enter"])),onClear:i[5]||(i[5]=a=>n(!0)),clearable:""},{append:v(()=>[c(U,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[2]||(i[2]=a=>n(!0))},{default:v(()=>[h("搜索")]),_:1})]),_:1},8,["modelValue"])]),J((t(),s("div",ve,[(t(!0),s(x,null,F(k.value,(a,q)=>(t(),s("div",{class:A(["item",{"item-active":Y.value==q}]),key:q,onClick:E=>_(a,q)},[e("div",fe,[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",me,d(a.create_time),1)]),e("div",he,[a.orderProduct?(t(),s("div",ye,[(t(!0),s(x,null,F(a.orderProduct.slice(0,5),(E,W)=>(t(),K(w,{key:W,src:E.cart_info.productAttr.image||E.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",ge,d(a.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",ke,[e("div",$e,"¥"+d(a.pay_price),1),e("div",be,"共"+d(a.total_num)+"件商品",1)])]),e("div",Ce,[e("div",Ve,[a.paid?(t(),s("div",Se,[h(" 已支付 "),a.pay_type==13?(t(),s("span",we,"(支付宝收款)")):l("",!0),a.pay_type==12?(t(),s("span",Ye,"(现金支付)")):l("",!0),a.pay_type==11?(t(),s("span",De,"(微信收款)")):l("",!0),a.pay_type==0?(t(),s("span",Pe,"(余额支付)")):l("",!0),a.pay_type==1?(t(),s("span",Le,"(微信支付)")):l("",!0),a.pay_type==9?(t(),s("span",Ie,"(商户余额支付)")):l("",!0),a.pay_type==10?(t(),s("span",Me,"(对公转账)")):l("",!0)])):(t(),s("div",Ae,"未支付"))]),a.service_info?(t(),s("div",ze," 收银员: "+d(a.service_info.nickname),1)):(t(),s("div",Be,"平台订单"))])],10,pe))),128)),S.value?(t(),s("div",Re,"没有更多了")):l("",!0),f.value?(t(),s("div",Ue,"加载中...")):l("",!0)])),[[O,f.value],[Q,n]])])}}},Jt=H(qe,[["__scopeId","data-v-6dea798c"]]),y=V=>(se("data-v-e6e9d4a9"),V=V(),oe(),V),Ee={class:"my-order"},Ne={class:"header-nav"},je=["onClick"],xe={class:"detail"},Fe={key:0,class:"table"},Ke={style:{"font-size":"0.9rem"}},Oe={style:{color:"#ff4a00"}},Te={style:{display:"flex","align-items":"center"}},He={style:{"margin-left":"0.5rem"}},Ge={key:1,class:"table"},Je=y(()=>e("div",{class:"table-title"},"订单信息",-1)),Qe={class:"table-info"},We={class:"info-item"},Xe=y(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=y(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=y(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=y(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),dt={class:"info-item-info"},ct={class:"info-item"},rt=y(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),_t={class:"info-item-info"},ut={class:"info-item"},vt=y(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),pt={class:"info-item-info"},ft={class:"info-item"},mt=y(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ht={class:"info-item-info"},yt={key:0},gt={key:1},kt={key:2},$t={key:3},bt={key:4},Ct={key:5},Vt={key:6},St={key:0,class:"table-title"},wt={key:1,class:"table-info",style:{"flex-direction":"column"}},Yt={class:"info-item"},Dt=y(()=>e("div",{class:"info-item-title"},"头像:",-1)),Pt={class:"info-item-info"},Lt={class:"info-item"},It=y(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Mt={class:"info-item-info"},At={class:"info-item"},zt=y(()=>e("div",{class:"info-item-title"},"账号:",-1)),Bt={class:"info-item-info"},Rt={key:2,class:"footer"},Ut={class:"info"},qt={class:"ser"},Et={class:"price"},Nt={key:0,class:"handle"},jt={key:1,class:"handle"},xt=y(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ft={class:"dialog-footer"},Kt={__name:"detail",setup(V){const D=G(),L=te(),o=r({});P.on("set-order-detail",n=>{o.value=n}),r([]);const b=r(null),z=r(!1);r(0);const p=r(0),I=r(["商品信息","订单详情"]),u=r(""),f=r(!1),B=n=>{u.value=n,f.value=!0},Y=()=>{f.value=!1,ie({order_sn:u.value,staff_id:D.userInfo.service.service_id}).then(n=>{N({message:n.message,type:"success"}),L.push({name:"home"})})},S=n=>{b.value.setRePay({price:n.pay_price,order_id:n.group_order_id}),b.value.drawer=!0},k=n=>{le({order_sn:n}).then(_=>{_.data.paid==1||_.message=="支付成功"?(N({message:_.message,type:"success"}),P.emit("update-order-detail",{}),o.value.paid=1):N({message:_.message,type:"error"})}).catch(_=>{})};return(n,_)=>{const $=g("el-image"),i=g("el-table-column"),M=g("el-table"),C=g("el-button"),R=g("el-dialog"),U=j("loading");return t(),s("div",Ee,[e("div",Ne,[(t(!0),s(x,null,F(I.value,(m,w)=>(t(),s("div",{key:w,class:A(["nav-item",{"nav-item-active":p.value==w,"nav-item-radius1":p.value==w+1,"nav-item-radius2":p.value==w-1}]),onClick:O=>p.value=w},d(m),11,je))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":p.value==I.value.length-1}]),style:{flex:"1"}},null,2)]),J((t(),s("div",xe,[o.value.orderProduct&&p.value==0?(t(),s("div",Fe,[e("div",Ke,[h(" 共计 "),e("span",Oe,d(o.value.total_num),1),h(" 件商品 ")]),c(M,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:v(()=>[c(i,{prop:"cart_info.product.store_name",label:"商品信息"},{default:v(({row:m})=>[e("div",Te,[c($,{style:{height:"3rem",width:"3rem"},src:m.cart_info.productAttr.image||m.cart_info.product.image},null,8,["src"]),e("span",He,d(m.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&&p.value==1?(t(),s("div",Ge,[Je,e("div",Qe,[e("div",We,[Xe,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,[at,e("div",it,"¥"+d(o.value.total_price),1)]),e("div",lt,[nt,e("div",dt,d(o.value.pay_time),1)]),e("div",ct,[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,[mt,e("div",ht,[o.value.pay_type==11?(t(),s("span",yt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",gt,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",kt,"支付宝收款")):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",St,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",wt,[e("div",Yt,[Dt,e("div",Pt,[c($,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Lt,[It,e("div",Mt,d(o.value.service_info.nickname),1)]),e("div",At,[zt,e("div",Bt,d(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),o.value.service_info?(t(),s("div",Rt,[e("div",Ut,[e("div",qt,"收银员: "+d(o.value.service_info.nickname),1),e("div",Et,[h(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",jt,"已支付")):(t(),s("div",Nt,[c(C,{class:"btn",type:"primary",onClick:_[0]||(_[0]=m=>S(o.value))},{default:v(()=>[h("重新支付")]),_:1}),c(C,{class:"btn",type:"primary",onClick:_[1]||(_[1]=m=>k(o.value.order_sn))},{default:v(()=>[h("检测状态")]),_:1}),c(C,{class:"btn",type:"success",onClick:_[2]||(_[2]=m=>B(o.value.order_sn))},{default:v(()=>[h("提单")]),_:1})]))])):l("",!0)])),[[U,z.value]]),c(ne,{ref_key:"payRef",ref:b},null,512),c(R,{modelValue:f.value,"onUpdate:modelValue":_[4]||(_[4]=m=>f.value=m),title:"提示",width:"500"},{footer:v(()=>[e("div",Ft,[c(C,{onClick:_[3]||(_[3]=m=>f.value=!1)},{default:v(()=>[h("取消")]),_:1}),n.cartCount>0?(t(),K(C,{key:0,onClick:n.goHome},{default:v(()=>[h(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(C,{key:1,type:"primary",onClick:Y},{default:v(()=>[h(" 确认提单 ")]),_:1}))])]),default:v(()=>[xt]),_:1},8,["modelValue"])])}}},Qt=H(Kt,[["__scopeId","data-v-e6e9d4a9"]]);export{Qt as d,Jt as o}; diff --git a/dist/assets/detail-DUG65m9D.css b/dist/assets/detail-DUG65m9D.css new file mode 100644 index 0000000..66d594e --- /dev/null +++ b/dist/assets/detail-DUG65m9D.css @@ -0,0 +1 @@ +@charset "UTF-8";.my-order[data-v-afd5b49f]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-afd5b49f]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-afd5b49f]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-afd5b49f]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-afd5b49f]{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.my-order .header-input[data-v-afd5b49f]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-list[data-v-afd5b49f]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-list .item[data-v-afd5b49f]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .item .top[data-v-afd5b49f]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-afd5b49f]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-afd5b49f]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #2ec479;color:#2ec479;border-radius:.187rem}.my-order .order-list .item .top .cahier2[data-v-afd5b49f]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #ff4a00;color:#ff4a00;border-radius:.187rem}.my-order .order-list .item .top .create-time[data-v-afd5b49f]{font-size:.8rem}.my-order .order-list .item .shop[data-v-afd5b49f]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-afd5b49f]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-afd5b49f]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-afd5b49f]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-afd5b49f]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-afd5b49f]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-afd5b49f]{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-afd5b49f]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-afd5b49f]{background-color:#efefef}.my-order .load-end[data-v-afd5b49f]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order-no-system .header-nav[data-v-afd5b49f]{height:5.5rem}.my-order-no-system .order-list[data-v-afd5b49f]{height:calc(100vh - 18.45rem)}.my-order[data-v-e6e9d4a9]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-e6e9d4a9]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-e6e9d4a9]{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-e6e9d4a9]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-e6e9d4a9]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-e6e9d4a9]{border-radius:0 0 0 1rem}.my-order .detail[data-v-e6e9d4a9]{height:calc(100vh - 10.25rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-e6e9d4a9]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-e6e9d4a9]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-e6e9d4a9]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:2rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-e6e9d4a9]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-e6e9d4a9]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-e6e9d4a9]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-e6e9d4a9]{height:6rem;box-sizing:border-box;padding:0 1.5rem;position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -.0625rem .625rem #eee;display:flex;justify-content:space-between;align-items:center;background-color:#fff}.my-order .detail .footer .info[data-v-e6e9d4a9]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-e6e9d4a9]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-e6e9d4a9]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-e6e9d4a9]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-e6e9d4a9]{border-radius:4rem;padding:1.2rem} diff --git a/dist/assets/detail-SSwoB7VG.js b/dist/assets/detail-SSwoB7VG.js new file mode 100644 index 0000000..7bc35ca --- /dev/null +++ b/dist/assets/detail-SSwoB7VG.js @@ -0,0 +1 @@ +import{_ as H,z as Z,u as G,r as u,o as ee,m as L,b as g,j as N,c as t,h as s,e,t as _,f as d,w as v,g as p,s as l,k as te,q as J,F as j,i as x,p as I,d as F,A as se,E,v as oe,x as ae}from"./index-3-t8Fk7s.js";import{e as ie,f as le,g as ne}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{h as O}from"./moment-Cl4UOzQZ.js";import{p as de}from"./pay-Bt7FIL7i.js";const ce={class:"header-nav"},re={class:"nav-item"},_e={class:"nav-item-btn"},ue={key:0,class:"nav-item-btn"},ve={class:"header-input"},pe={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},fe=["onClick"],me={class:"top"},ye={class:"create-time"},he={class:"shop"},ge={key:0,class:"left"},ke={key:0,class:"shop-name"},$e={class:"right"},be={class:"money"},Ce={class:"count"},Ve={class:"bottom"},Se={class:"pay"},we={key:0},Ye={key:0},De={key:1},Pe={key:2},Le={key:3},Ie={key:4},Me={key:5},Ae={key:6},qe={key:1,style:{color:"#ff4a00"}},ze={key:0,class:"cashier"},Ue={key:1,class:"cashier"},Be={key:0,class:"load-end"},Re={key:1,class:"load-end"},Te={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup($){const S=Z(),M=G(),o=$;u([]);const C=u(1),w=u(0),k=m=>{r.value.page=1,Y.value=!1,b.value=!1,c.value=[],n(!0)};u(null);const V=u(""),A=()=>{r.value.date=V.value.join("-"),n(!0)},r=u({page:1,limit:20,search_info:"",date:"",staff_id:0});S.query.date&&(V.value=[O(S.query.date).format("YYYY/MM/DD"),O(S.query.date).format("YYYY/MM/DD")],r.value.date=V.value.join("-")),S.query.payType&&(w.value=S.query.payType);const b=u(!1),U=u(0),P=u(0),Y=u(!1),c=u([]),n=(m=!1)=>{if(m)r.value.page=1;else if(Y.value||b.value)return;o.isSystem||(r.value.staff_id=M.userInfo.service.service_id,w.value==1?r.value.pay_type="12":w.value==2?r.value.pay_type="11,13":r.value.pay_type=""),b.value=!0,C.value==1&&(r.value.paid=null),C.value==2&&(r.value.paid=0),ie(M.userInfo.service.mer_id,r.value).then(i=>{m?c.value=i.data.list:c.value=[...c.value,...i.data.list],i.data.list.length0&&L.emit("set-order-detail",c.value[0]),U.value=i.data.count,b.value=!1}).catch(i=>{Y.value=!0,b.value=!1})},q=(m,i)=>{P.value=i,L.emit("set-order-detail",m)};return ee(()=>{L.on("update-order-detail",m=>{console.log("==="),c.value[P.value].paid=1})}),(m,i)=>{const y=g("el-radio-button"),z=g("el-radio-group"),B=g("el-date-picker"),f=g("el-button"),D=g("el-input"),K=g("el-image"),Q=N("loading"),W=N("infinite-scroll");return t(),s("div",{class:I(["my-order",{"my-order-no-system":!$.isSystem}])},[e("div",ce,[e("div",re,_($.isSystem?"平台订单":"收银订单"),1),e("div",_e,[d(z,{modelValue:C.value,"onUpdate:modelValue":i[0]||(i[0]=a=>C.value=a),onChange:k,size:"small"},{default:v(()=>[d(y,{value:1},{default:v(()=>[p("全部")]),_:1}),d(y,{value:2},{default:v(()=>[p("未支付")]),_:1})]),_:1},8,["modelValue"]),d(B,{modelValue:V.value,"onUpdate:modelValue":i[1]||(i[1]=a=>V.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:A,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])]),$.isSystem?l("",!0):(t(),s("div",ue,[d(z,{modelValue:w.value,"onUpdate:modelValue":i[2]||(i[2]=a=>w.value=a),onChange:k,size:"small"},{default:v(()=>[d(y,{value:0},{default:v(()=>[p("全部")]),_:1}),d(y,{value:1},{default:v(()=>[p("现金收款")]),_:1}),d(y,{value:2},{default:v(()=>[p("线上收款")]),_:1})]),_:1},8,["modelValue"])]))]),e("div",ve,[d(D,{modelValue:r.value.search_info,"onUpdate:modelValue":i[4]||(i[4]=a=>r.value.search_info=a),placeholder:"请输入订单编号",onKeydown:i[5]||(i[5]=te(a=>n(!0),["enter"])),onClear:i[6]||(i[6]=a=>n(!0)),clearable:""},{append:v(()=>[d(f,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[3]||(i[3]=a=>n(!0))},{default:v(()=>[p("搜索")]),_:1})]),_:1},8,["modelValue"])]),J((t(),s("div",pe,[(t(!0),s(j,null,x(c.value,(a,R)=>(t(),s("div",{class:I(["item",{"item-active":P.value==R}]),key:R,onClick:T=>q(a,R)},[e("div",me,[e("div",{class:I(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+_(a.order_sn),3),e("div",ye,_(a.create_time),1)]),e("div",he,[a.orderProduct?(t(),s("div",ge,[(t(!0),s(j,null,x(a.orderProduct.slice(0,5),(T,X)=>(t(),F(K,{key:X,src:T.cart_info.productAttr.image||T.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",ke,_(a.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",$e,[e("div",be,"¥"+_(a.pay_price),1),e("div",Ce,"共"+_(a.total_num)+"件商品",1)])]),e("div",Ve,[e("div",Se,[a.paid?(t(),s("div",we,[p(" 已支付 "),a.pay_type==13?(t(),s("span",Ye,"(支付宝收款)")):l("",!0),a.pay_type==12?(t(),s("span",De,"(现金支付)")):l("",!0),a.pay_type==11?(t(),s("span",Pe,"(微信收款)")):l("",!0),a.pay_type==0?(t(),s("span",Le,"(余额支付)")):l("",!0),a.pay_type==1?(t(),s("span",Ie,"(微信支付)")):l("",!0),a.pay_type==9?(t(),s("span",Me,"(商户余额支付)")):l("",!0),a.pay_type==10?(t(),s("span",Ae,"(对公转账)")):l("",!0)])):(t(),s("div",qe,"未支付"))]),a.service_info?(t(),s("div",ze," 收银员: "+_(a.service_info.nickname),1)):(t(),s("div",Ue,"平台订单"))])],10,fe))),128)),Y.value?(t(),s("div",Be,"没有更多了")):l("",!0),b.value?(t(),s("div",Re,"加载中...")):l("",!0)])),[[Q,b.value],[W,n]])],2)}}},Qt=H(Te,[["__scopeId","data-v-afd5b49f"]]),h=$=>(oe("data-v-e6e9d4a9"),$=$(),ae(),$),Ee={class:"my-order"},Ne={class:"header-nav"},je=["onClick"],xe={class:"detail"},Fe={key:0,class:"table"},Ke={style:{"font-size":"0.9rem"}},Oe={style:{color:"#ff4a00"}},He={style:{display:"flex","align-items":"center"}},Ge={style:{"margin-left":"0.5rem"}},Je={key:1,class:"table"},Qe=h(()=>e("div",{class:"table-title"},"订单信息",-1)),We={class:"table-info"},Xe={class:"info-item"},Ze=h(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=h(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=h(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=h(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},rt={class:"info-item"},_t=h(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),ut={class:"info-item-info"},vt={class:"info-item"},pt=h(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),ft={class:"info-item-info"},mt={class:"info-item"},yt=h(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ht={class:"info-item-info"},gt={key:0},kt={key:1},$t={key:2},bt={key:3},Ct={key:4},Vt={key:5},St={key:6},wt={key:0,class:"table-title"},Yt={key:1,class:"table-info",style:{"flex-direction":"column"}},Dt={class:"info-item"},Pt=h(()=>e("div",{class:"info-item-title"},"头像:",-1)),Lt={class:"info-item-info"},It={class:"info-item"},Mt=h(()=>e("div",{class:"info-item-title"},"昵称:",-1)),At={class:"info-item-info"},qt={class:"info-item"},zt=h(()=>e("div",{class:"info-item-title"},"账号:",-1)),Ut={class:"info-item-info"},Bt={key:2,class:"footer"},Rt={class:"info"},Tt={class:"ser"},Et={class:"price"},Nt={key:0,class:"handle"},jt={key:1,class:"handle"},xt=h(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ft={class:"dialog-footer"},Kt={__name:"detail",setup($){const S=G(),M=se(),o=u({});L.on("set-order-detail",c=>{o.value=c}),u([]);const C=u(null),w=u(!1);u(0);const k=u(0),V=u(["商品信息","订单详情"]),A=u(""),r=u(!1),b=c=>{A.value=c,r.value=!0},U=()=>{r.value=!1,le({order_sn:A.value,staff_id:S.userInfo.service.service_id}).then(c=>{E({message:c.message,type:"success"}),M.push({name:"home"})})},P=c=>{C.value.setRePay({price:c.pay_price,order_id:c.group_order_id}),C.value.drawer=!0},Y=c=>{ne({order_sn:c}).then(n=>{n.data.paid==1||n.message=="支付成功"?(E({message:n.message,type:"success"}),L.emit("update-order-detail",{}),o.value.paid=1):E({message:n.message,type:"error"})}).catch(n=>{})};return(c,n)=>{const q=g("el-image"),m=g("el-table-column"),i=g("el-table"),y=g("el-button"),z=g("el-dialog"),B=N("loading");return t(),s("div",Ee,[e("div",Ne,[(t(!0),s(j,null,x(V.value,(f,D)=>(t(),s("div",{key:D,class:I(["nav-item",{"nav-item-active":k.value==D,"nav-item-radius1":k.value==D+1,"nav-item-radius2":k.value==D-1}]),onClick:K=>k.value=D},_(f),11,je))),128)),e("div",{class:I(["nav-item",{"nav-item-radius2":k.value==V.value.length-1}]),style:{flex:"1"}},null,2)]),J((t(),s("div",xe,[o.value.orderProduct&&k.value==0?(t(),s("div",Fe,[e("div",Ke,[p(" 共计 "),e("span",Oe,_(o.value.total_num),1),p(" 件商品 ")]),d(i,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:v(()=>[d(m,{prop:"cart_info.product.store_name",label:"商品信息"},{default:v(({row:f})=>[e("div",He,[d(q,{style:{height:"3rem",width:"3rem"},src:f.cart_info.productAttr.image||f.cart_info.product.image},null,8,["src"]),e("span",Ge,_(f.cart_info.product.store_name),1)])]),_:1}),d(m,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),d(m,{prop:"product_num",label:"数量",width:"150"}),d(m,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&k.value==1?(t(),s("div",Je,[Qe,e("div",We,[e("div",Xe,[Ze,e("div",et,_(o.value.create_time),1)]),e("div",tt,[st,e("div",ot,_(o.value.total_num),1)]),e("div",at,[it,e("div",lt,"¥"+_(o.value.total_price),1)]),e("div",nt,[dt,e("div",ct,_(o.value.pay_time),1)]),e("div",rt,[_t,e("div",ut,"¥"+_(o.value.deduction_price),1)]),e("div",vt,[pt,e("div",ft,"¥"+_(o.value.pay_price),1)]),e("div",mt,[yt,e("div",ht,[o.value.pay_type==11?(t(),s("span",gt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",kt,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",$t,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",bt,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",Ct,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",Vt,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",St,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",wt,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",Yt,[e("div",Dt,[Pt,e("div",Lt,[d(q,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",It,[Mt,e("div",At,_(o.value.service_info.nickname),1)]),e("div",qt,[zt,e("div",Ut,_(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),o.value.service_info?(t(),s("div",Bt,[e("div",Rt,[e("div",Tt,"收银员: "+_(o.value.service_info.nickname),1),e("div",Et,[p(" 实付: "),e("span",null,"¥"+_(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",jt,"已支付")):(t(),s("div",Nt,[d(y,{class:"btn",type:"primary",onClick:n[0]||(n[0]=f=>P(o.value))},{default:v(()=>[p("重新支付")]),_:1}),d(y,{class:"btn",type:"primary",onClick:n[1]||(n[1]=f=>Y(o.value.order_sn))},{default:v(()=>[p("检测状态")]),_:1}),d(y,{class:"btn",type:"success",onClick:n[2]||(n[2]=f=>b(o.value.order_sn))},{default:v(()=>[p("提单")]),_:1})]))])):l("",!0)])),[[B,w.value]]),d(de,{ref_key:"payRef",ref:C},null,512),d(z,{modelValue:r.value,"onUpdate:modelValue":n[4]||(n[4]=f=>r.value=f),title:"提示",width:"500"},{footer:v(()=>[e("div",Ft,[d(y,{onClick:n[3]||(n[3]=f=>r.value=!1)},{default:v(()=>[p("取消")]),_:1}),c.cartCount>0?(t(),F(y,{key:0,onClick:c.goHome},{default:v(()=>[p(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),F(y,{key:1,type:"primary",onClick:U},{default:v(()=>[p(" 确认提单 ")]),_:1}))])]),default:v(()=>[xt]),_:1},8,["modelValue"])])}}},Wt=H(Kt,[["__scopeId","data-v-e6e9d4a9"]]);export{Wt as d,Qt as o}; diff --git a/dist/assets/index-Db3iIaOe.js b/dist/assets/index-3-t8Fk7s.js similarity index 99% rename from dist/assets/index-Db3iIaOe.js rename to dist/assets/index-3-t8Fk7s.js index 33c93c8..2bbad47 100644 --- a/dist/assets/index-Db3iIaOe.js +++ b/dist/assets/index-3-t8Fk7s.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-qYqZx8N-.js","./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js","./pay-DQcBwkHz.css","./lodash-BgJbRuYL.js","./padding-Ch9Ano5D.js","./shop-BJxq9Fz-.js","./pay-CEmj54N0.js","./index-C0jnRWFS.css","./index-Ekaohlhc.js","./detail-CNaDiLm4.js","./moment-Cl4UOzQZ.js","./detail-BQfBDwgx.css","./index-9c4jfjwr.css","./indexSystem-BcKTr545.js","./index-DqG3Pl6p.js","./index-DF5hR_MB.css","./index-DuWvnZXq.js","./index-D2egBYmS.css","./indexList-C22m_nTv.js","./indexList-BAcoCK-_.css","./indexCount-BfTXghlq.js","./indexCount-DOVRNxk8.css","./index-FC_JluGa.js","./index-gk2PQwpZ.css","./index-9aqTqxZl.js","./index-BcbUEz5i.css","./index-Bv9eB42o.js","./index-Dwwi99ut.css"] + __vite__mapDeps.viteFileDeps = ["./index-BcmmN2mF.js","./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js","./pay-DQcBwkHz.css","./lodash-BiR1SJeZ.js","./padding-DTyMU7Be.js","./shop-C3GBYBKO.js","./pay-Bt7FIL7i.js","./index-DJbuehmj.css","./index-DXOp6UXZ.js","./detail-SSwoB7VG.js","./moment-Cl4UOzQZ.js","./detail-DUG65m9D.css","./index-9c4jfjwr.css","./indexSystem-8MfCoV-4.js","./index-Do69Dp-3.js","./index-Clnyb8oe.css","./index-D5NVVZ9r.js","./index-D2egBYmS.css","./indexList-DNHhtO8X.js","./indexList-BAcoCK-_.css","./indexCount-Dekjp8EX.js","./indexCount-GP0Crquz.css","./index-DFDQ9JgE.js","./index-gk2PQwpZ.css","./index-CaeMrXBn.js","./index-BcbUEz5i.css","./index-B7M4Tium.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[u4]=this[u4]={accessors:{}}).accessors,r=this.prototype;function a(l){const s=us(l);o[s]||(uce(r,l),o[s]=!0)}return Ve.isArray(t)?t.forEach(a):a(t),this}}hd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ve.reduceDescriptors(hd.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Ve.freezeMethods(hd);const lr=hd;function ff(e,t){const n=this||sv,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 wb(e){return!!(e&&e.__CANCEL__)}function Ti(e,t,n){Rt.call(this,e??"canceled",Rt.ERR_CANCELED,t,n),this.name="CanceledError"}Ve.inherits(Ti,Rt,{__CANCEL__:!0});function cce(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 dce=Io.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 fce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function pce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Cb(e,t){return e&&!fce(t)?pce(e,t):t}const vce=Io.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 hce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function mce(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 gce=typeof XMLHttpRequest<"u",yce=gce&&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(Io.hasStandardBrowserEnv||Io.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=Cb(e.baseURL,e.url);d.open(e.method.toUpperCase(),gb(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};cce(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||yb;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),o(new Rt(y,g.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,e,d)),d=null},Io.hasStandardBrowserEnv&&(s&&Ve.isFunction(s)&&(s=s(e)),s||s!==!1&&vce(p))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&dce.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",c4(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",c4(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=v=>{d&&(o(!v||v.type?new Ti(null,e,d):v),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const m=hce(p);if(m&&Io.protocols.indexOf(m)===-1){o(new Rt("Unsupported protocol "+m+":",Rt.ERR_BAD_REQUEST,e));return}d.send(r||null)})},K0={http:Kue,xhr:yce};Ve.forEach(K0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const d4=e=>`- ${e}`,_ce=e=>Ve.isFunction(e)||e===null||e===!1,Sb={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(d4).join(` `):" "+d4(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:K0};function pf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ti(null,e)}function f4(e){return pf(e),e.headers=lr.from(e.headers),e.data=ff.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Sb.getAdapter(e.adapter||sv.adapter)(e).then(function(o){return pf(e),o.data=ff.call(e,e.transformResponse,o),o.headers=lr.from(o.headers),o},function(o){return wb(o)||(pf(e),o&&o.response&&(o.response.data=ff.call(e,e.transformResponse,o.response),o.response.headers=lr.from(o.response.headers))),Promise.reject(o)})}const p4=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(p4(c),p4(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 kb="1.6.8",iv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{iv[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const v4={};iv.transitional=function(t,n,o){function r(a,l){return"[Axios v"+kb+"] 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&&!v4[l]&&(v4[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 bce(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 W0={assertOptions:bce,validators:iv},Mr=W0.validators;class gc{constructor(t){this.defaults=t,this.interceptors={request:new i4,response:new i4}}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&&W0.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}:W0.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=[f4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Ti(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new uv(function(r){t=r}),cancel:t}}}const wce=uv;function Cce(e){return function(n){return e.apply(null,n)}}function Sce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const j0={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(j0).forEach(([e,t])=>{j0[t]=e});const kce=j0;function Eb(e){const t=new zu(e),n=ab(zu.prototype.request,t);return Ve.extend(n,zu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Eb(Dl(e,r))},n}const sn=Eb(sv);sn.Axios=zu;sn.CanceledError=Ti;sn.CancelToken=wce;sn.isCancel=wb;sn.VERSION=kb;sn.toFormData=vd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Cce;sn.isAxiosError=Sce;sn.mergeConfig=Dl;sn.AxiosHeaders=lr;sn.formToJSON=e=>bb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=Sb.getAdapter;sn.HttpStatusCode=kce;sn.default=sn;const Ece={url:"https://crmeb-test.shop.lihaink.cn/api",upload:"https://crmeb-test.shop.lihaink.cn/api/upload/image/field"},Oi=sn.create({baseURL:Ece.url,timeout:1e4});Oi.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Oi.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&($s({message:e.data.message,type:"error"}),setTimeout(()=>{const t=ov();t.setUserInfo({}),t.setToken(""),Mb.push("/login")},700)),e.data.status===400)throw $s({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),$s({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Zce(e){return Oi.post("auth/login",e)}function Qce(e){return Oi.get("user",e)}function xce(){return Oi.post("logout")}const cv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Mce=e=>(gw("data-v-24e72736"),e=e(),yw(),e),$ce={class:"my-card"},Tce={class:"card-header"},Oce={style:{width:"4.5rem"}},Ace=Mce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Nce={class:"card-body"},Rce={class:"el-dropdown-link"},Ice={class:"info"},Pce={style:{"margin-left":"0.3rem"}},Lce={__name:"myHeader",setup(e){const t=ov(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=eb(),a=()=>{xce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{$s({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Qe("el-image"),c=Qe("el-avatar"),f=Qe("arrow-down"),d=Qe("el-icon"),p=Qe("el-dropdown-item"),h=Qe("el-dropdown-menu"),m=Qe("el-dropdown");return _(),M("div",$ce,[k("div",Tce,[k("div",Oce,[j(u,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),Ace]),k("div",Nce,[j(m,{trigger:"hover"},{dropdown:J(()=>[j(h,null,{default:J(()=>[j(p,{onClick:a},{default:J(()=>[gt("退出登录")]),_:1})]),_:1})]),default:J(()=>[k("div",Rce,[j(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Ice,[k("div",null,[gt($e(o.value.nickname)+" ",1),k("span",Pce,"("+$e(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,$e(i(t).userInfo.account),1)]),j(d,{class:"el-icon--right"},{default:J(()=>[j(f)]),_:1})])]),_:1})])])}}},Vce=cv(Lce,[["__scopeId","data-v-24e72736"]]);function Bce(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=Bce(),zce={class:"my-card"},Hce=["onClick"],Dce={key:0,class:"badge"},Fce={__name:"myAside",setup(e){const t=eb(),n=eue(),o=s=>{t.push({name:s})},r=P([{name:"home",title:"收银",ico:"Sell",count:0},{name:"order",title:"收银订单",ico:"DataLine",count:0},{name:"orderSystem",title:"平台订单",ico:"DataAnalysis",count:0},{name:"saleHome",title:"批发",ico:"Van",count:0},{name:"saleOrder",title:"批发订单",ico:"Tickets",count:0},{name:"convert",title:"核销",ico:"FullScreen",count:0},{name:"shop",title:"商品",ico:"ShoppingBag",count:0},{name:"orderCount",title:"订单统计",ico:"PieChart",count:0}]),a=()=>{let s=r.value.findIndex(u=>u.name==n.name);s==0&&(s=r.value.length),s>0&&o(r.value[s-1].name)},l=()=>{let s=r.value.findIndex(u=>u.name==n.name);s==r.value.length-1&&(s=-1),s{qn.on("up",a),qn.on("down",l)}),Ho(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Qe("el-icon");return _(),M("div",zce,[(_(!0),M(Fe,null,ht(r.value,f=>(_(),M("div",{key:f.name,class:T(["list-item",{active:i(n).name==f.name}]),onClick:d=>o(f.name)},[j(c,{size:"2rem"},{default:J(()=>[(_(),le(st(f.ico)))]),_:2},1024),k("div",null,$e(f.title),1),f.count?(_(),M("div",Dce,$e(f.count),1)):ne("",!0)],10,Hce))),128))])}}},Kce=cv(Fce,[["__scopeId","data-v-fb99433d"]]),Wce={class:"common-layout"},jce={__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("开启键盘监听")}),Ho(()=>{window.removeEventListener("keydown",t),console.log("关闭键盘监听")}),(n,o)=>{const r=Qe("el-header"),a=Qe("el-aside"),l=Qe("router-view"),s=Qe("el-main"),u=Qe("el-container");return _(),M("div",Wce,[j(u,null,{default:J(()=>[j(r,null,{default:J(()=>[j(Vce)]),_:1}),j(u,null,{default:J(()=>[j(a,{width:"6.25rem"},{default:J(()=>[j(Kce)]),_:1}),j(s,{style:{color:"#333"}},{default:J(()=>[j(l,{class:"my-main"},{default:J(({Component:c})=>[j(tn,{name:"el-zoom-in-top"},{default:J(()=>[(_(),le(st(c)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},qce=cv(jce,[["__scopeId","data-v-4838f8ab"]]),Uce=[{path:"/",name:"layout",component:qce,redirect:"/home",meta:{title:"里海收银系统"},children:[{path:"/home",name:"home",meta:{title:"收银"},component:()=>go(()=>import("./index-qYqZx8N-.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)},{path:"/order",name:"order",meta:{title:"收银订单"},component:()=>go(()=>import("./index-Ekaohlhc.js"),__vite__mapDeps([8,9,1,2,10,6,11,4,12]),import.meta.url)},{path:"/orderSystem",name:"orderSystem",meta:{title:"平台订单"},component:()=>go(()=>import("./indexSystem-BcKTr545.js"),__vite__mapDeps([13,9,1,2,10,6,11,4,12]),import.meta.url)},{path:"/saleHome",name:"saleHome",meta:{title:"批发"},component:()=>go(()=>import("./index-DqG3Pl6p.js"),__vite__mapDeps([14,1,2,3,4,5,6,15]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"批发订单"},component:()=>go(()=>import("./index-DuWvnZXq.js"),__vite__mapDeps([16,1,2,6,4,17]),import.meta.url)},{path:"/orderList",name:"orderList",meta:{title:"统计"},component:()=>go(()=>import("./indexList-C22m_nTv.js"),__vite__mapDeps([18,1,2,6,19]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"统计"},component:()=>go(()=>import("./indexCount-BfTXghlq.js"),__vite__mapDeps([20,1,2,10,21]),import.meta.url)},{path:"/shop",name:"shop",component:()=>go(()=>import("./index-FC_JluGa.js"),__vite__mapDeps([22,5,23]),import.meta.url)},{path:"/convert",name:"convert",component:()=>go(()=>import("./index-9aqTqxZl.js"),__vite__mapDeps([24,1,2,6,4,25]),import.meta.url)}]},{path:"/login",name:"login",component:()=>go(()=>import("./index-Bv9eB42o.js"),__vite__mapDeps([26,27]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>go(()=>import("./index-wJI7wNCe.js"),__vite__mapDeps([]),import.meta.url)}],xb=Zie({history:Mie(),routes:Uce});xb.beforeEach((e,t,n)=>{const o=ov();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Mb=xb,Ai=Mg(J5);for(const[e,t]of Object.entries(xL))Ai.component(e,t);const Yce=nue();Ai.use(Mb);Ai.use(Yce);Ai.use(qse,{locale:Use});Ai.mount("#app");export{eb as A,wr as B,Cr as C,Ece as D,$s as E,Fe as F,Oi as G,bt as H,g2 as I,S as J,Zce as K,Qce as L,cv as _,Ho as a,Qe as b,_ as c,le as d,k as e,j as f,gt as g,M as h,ht as i,Ec as j,Mt as k,i as l,qn as m,We as n,et as o,T as p,tt as q,P as r,ne as s,$e as t,ov as u,gw as v,J as w,yw as x,sr as y,eue 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&&W0.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}:W0.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=[f4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Ti(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new uv(function(r){t=r}),cancel:t}}}const wce=uv;function Cce(e){return function(n){return e.apply(null,n)}}function Sce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const j0={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(j0).forEach(([e,t])=>{j0[t]=e});const kce=j0;function Eb(e){const t=new zu(e),n=ab(zu.prototype.request,t);return Ve.extend(n,zu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Eb(Dl(e,r))},n}const sn=Eb(sv);sn.Axios=zu;sn.CanceledError=Ti;sn.CancelToken=wce;sn.isCancel=wb;sn.VERSION=kb;sn.toFormData=vd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Cce;sn.isAxiosError=Sce;sn.mergeConfig=Dl;sn.AxiosHeaders=lr;sn.formToJSON=e=>bb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=Sb.getAdapter;sn.HttpStatusCode=kce;sn.default=sn;const Ece={url:"https://crmeb-test.shop.lihaink.cn/api",upload:"https://crmeb-test.shop.lihaink.cn/api/upload/image/field"},Oi=sn.create({baseURL:Ece.url,timeout:1e4});Oi.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Oi.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&($s({message:e.data.message,type:"error"}),setTimeout(()=>{const t=ov();t.setUserInfo({}),t.setToken(""),Mb.push("/login")},700)),e.data.status===400)throw $s({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),$s({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Zce(e){return Oi.post("auth/login",e)}function Qce(e){return Oi.get("user",e)}function xce(){return Oi.post("logout")}const cv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Mce=e=>(gw("data-v-24e72736"),e=e(),yw(),e),$ce={class:"my-card"},Tce={class:"card-header"},Oce={style:{width:"4.5rem"}},Ace=Mce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Nce={class:"card-body"},Rce={class:"el-dropdown-link"},Ice={class:"info"},Pce={style:{"margin-left":"0.3rem"}},Lce={__name:"myHeader",setup(e){const t=ov(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=eb(),a=()=>{xce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{$s({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Qe("el-image"),c=Qe("el-avatar"),f=Qe("arrow-down"),d=Qe("el-icon"),p=Qe("el-dropdown-item"),h=Qe("el-dropdown-menu"),m=Qe("el-dropdown");return _(),M("div",$ce,[k("div",Tce,[k("div",Oce,[j(u,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),Ace]),k("div",Nce,[j(m,{trigger:"hover"},{dropdown:J(()=>[j(h,null,{default:J(()=>[j(p,{onClick:a},{default:J(()=>[gt("退出登录")]),_:1})]),_:1})]),default:J(()=>[k("div",Rce,[j(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Ice,[k("div",null,[gt($e(o.value.nickname)+" ",1),k("span",Pce,"("+$e(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,$e(i(t).userInfo.account),1)]),j(d,{class:"el-icon--right"},{default:J(()=>[j(f)]),_:1})])]),_:1})])])}}},Vce=cv(Lce,[["__scopeId","data-v-24e72736"]]);function Bce(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=Bce(),zce={class:"my-card"},Hce=["onClick"],Dce={key:0,class:"badge"},Fce={__name:"myAside",setup(e){const t=eb(),n=eue(),o=s=>{t.push({name:s})},r=P([{name:"home",title:"收银",ico:"Sell",count:0},{name:"order",title:"收银订单",ico:"DataLine",count:0},{name:"orderSystem",title:"平台订单",ico:"DataAnalysis",count:0},{name:"saleHome",title:"批发",ico:"Van",count:0},{name:"saleOrder",title:"批发订单",ico:"Tickets",count:0},{name:"convert",title:"核销",ico:"FullScreen",count:0},{name:"shop",title:"商品",ico:"ShoppingBag",count:0},{name:"orderCount",title:"订单统计",ico:"PieChart",count:0}]),a=()=>{let s=r.value.findIndex(u=>u.name==n.name);s==0&&(s=r.value.length),s>0&&o(r.value[s-1].name)},l=()=>{let s=r.value.findIndex(u=>u.name==n.name);s==r.value.length-1&&(s=-1),s{qn.on("up",a),qn.on("down",l)}),Ho(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Qe("el-icon");return _(),M("div",zce,[(_(!0),M(Fe,null,ht(r.value,f=>(_(),M("div",{key:f.name,class:T(["list-item",{active:i(n).name==f.name}]),onClick:d=>o(f.name)},[j(c,{size:"2rem"},{default:J(()=>[(_(),le(st(f.ico)))]),_:2},1024),k("div",null,$e(f.title),1),f.count?(_(),M("div",Dce,$e(f.count),1)):ne("",!0)],10,Hce))),128))])}}},Kce=cv(Fce,[["__scopeId","data-v-fb99433d"]]),Wce={class:"common-layout"},jce={__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("开启键盘监听")}),Ho(()=>{window.removeEventListener("keydown",t),console.log("关闭键盘监听")}),(n,o)=>{const r=Qe("el-header"),a=Qe("el-aside"),l=Qe("router-view"),s=Qe("el-main"),u=Qe("el-container");return _(),M("div",Wce,[j(u,null,{default:J(()=>[j(r,null,{default:J(()=>[j(Vce)]),_:1}),j(u,null,{default:J(()=>[j(a,{width:"6.25rem"},{default:J(()=>[j(Kce)]),_:1}),j(s,{style:{color:"#333"}},{default:J(()=>[j(l,{class:"my-main"},{default:J(({Component:c})=>[j(tn,{name:"el-zoom-in-top"},{default:J(()=>[(_(),le(st(c)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},qce=cv(jce,[["__scopeId","data-v-4838f8ab"]]),Uce=[{path:"/",name:"layout",component:qce,redirect:"/home",meta:{title:"里海收银系统"},children:[{path:"/home",name:"home",meta:{title:"收银"},component:()=>go(()=>import("./index-BcmmN2mF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)},{path:"/order",name:"order",meta:{title:"收银订单"},component:()=>go(()=>import("./index-DXOp6UXZ.js"),__vite__mapDeps([8,9,1,2,10,6,11,4,12]),import.meta.url)},{path:"/orderSystem",name:"orderSystem",meta:{title:"平台订单"},component:()=>go(()=>import("./indexSystem-8MfCoV-4.js"),__vite__mapDeps([13,9,1,2,10,6,11,4,12]),import.meta.url)},{path:"/saleHome",name:"saleHome",meta:{title:"批发"},component:()=>go(()=>import("./index-Do69Dp-3.js"),__vite__mapDeps([14,1,2,3,4,5,6,15]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"批发订单"},component:()=>go(()=>import("./index-D5NVVZ9r.js"),__vite__mapDeps([16,1,2,6,4,17]),import.meta.url)},{path:"/orderList",name:"orderList",meta:{title:"统计"},component:()=>go(()=>import("./indexList-DNHhtO8X.js"),__vite__mapDeps([18,1,2,6,19]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"统计"},component:()=>go(()=>import("./indexCount-Dekjp8EX.js"),__vite__mapDeps([20,1,2,10,21]),import.meta.url)},{path:"/shop",name:"shop",component:()=>go(()=>import("./index-DFDQ9JgE.js"),__vite__mapDeps([22,5,23]),import.meta.url)},{path:"/convert",name:"convert",component:()=>go(()=>import("./index-CaeMrXBn.js"),__vite__mapDeps([24,1,2,6,4,25]),import.meta.url)}]},{path:"/login",name:"login",component:()=>go(()=>import("./index-B7M4Tium.js"),__vite__mapDeps([26,27]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>go(()=>import("./index-RLZYGyTj.js"),__vite__mapDeps([]),import.meta.url)}],xb=Zie({history:Mie(),routes:Uce});xb.beforeEach((e,t,n)=>{const o=ov();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Mb=xb,Ai=Mg(J5);for(const[e,t]of Object.entries(xL))Ai.component(e,t);const Yce=nue();Ai.use(Mb);Ai.use(Yce);Ai.use(qse,{locale:Use});Ai.mount("#app");export{eb as A,wr as B,Cr as C,Ece as D,$s as E,Fe as F,Oi as G,bt as H,g2 as I,S as J,Zce as K,Qce as L,cv as _,Ho as a,Qe as b,_ as c,le as d,k as e,j as f,gt as g,M as h,ht as i,Ec as j,Mt as k,i as l,qn as m,We as n,et as o,T as p,tt as q,P as r,ne as s,$e as t,ov as u,gw as v,J as w,yw as x,sr as y,eue as z}; diff --git a/dist/assets/index-Bv9eB42o.js b/dist/assets/index-B7M4Tium.js similarity index 96% rename from dist/assets/index-Bv9eB42o.js rename to dist/assets/index-B7M4Tium.js index 85ea788..4c2f287 100644 --- a/dist/assets/index-Bv9eB42o.js +++ b/dist/assets/index-B7M4Tium.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,k as v,g as b,v as K,x as B,A as C,E as d,K as E,L as N}from"./index-Db3iIaOe.js";const M=l=>(K("data-v-59a7e82c"),l=l(),B(),l),T={class:"body"},A={class:"login"},$=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),j={__name:"index",setup(l){const p=I(),y=C(),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 k=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),g=n("Lock"),x=n("el-button"),V=n("el-form");return R(),S("div",T,[w("div",A,[$,e(V,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(x,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},z=U(j,[["__scopeId","data-v-59a7e82c"]]);export{z 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,k as v,g as b,v as K,x as B,A as C,E as d,K as E,L as N}from"./index-3-t8Fk7s.js";const M=l=>(K("data-v-59a7e82c"),l=l(),B(),l),T={class:"body"},A={class:"login"},$=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),j={__name:"index",setup(l){const p=I(),y=C(),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 k=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),g=n("Lock"),x=n("el-button"),V=n("el-form");return R(),S("div",T,[w("div",A,[$,e(V,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(x,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},z=U(j,[["__scopeId","data-v-59a7e82c"]]);export{z as default}; diff --git a/dist/assets/index-BcmmN2mF.js b/dist/assets/index-BcmmN2mF.js new file mode 100644 index 0000000..1a70750 --- /dev/null +++ b/dist/assets/index-BcmmN2mF.js @@ -0,0 +1 @@ +import{c as ce,a as re,b as ee,d as ue,o as de}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{_ as K,r,o as M,m as $,a as N,b as m,c as h,d as G,w,e,f as c,g,t as R,n as H,E as j,u as te,h as P,F as Q,i as W,j as oe,k as _e,l as T,p as se,q as ae,s as q,v as le,x as ne,y as ve,z as pe}from"./index-3-t8Fk7s.js";import{_ as fe}from"./lodash-BiR1SJeZ.js";import{p as me}from"./padding-DTyMU7Be.js";import{g as he,s as ge}from"./shop-C3GBYBKO.js";import{p as ye}from"./pay-Bt7FIL7i.js";const ke={class:"price"},be={class:"flex"},$e={style:{margin:"0.625rem","padding-bottom":"40px"}},we={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},xe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(x,{expose:S,emit:k}){const a=r(!1),u=r(null),t=r(0),d=(i=!0,v=0)=>{n.value.nowPrice="",n.value.percentage="",a.value=i,t.value=v,H(()=>{setTimeout(()=>{var A;(A=u.value)==null||A.focus()},150)})},n=r({nowPrice:"",percentage:""}),p=i=>{n.value.percentage=(i/t.value*100).toFixed(2)},I=i=>{n.value.nowPrice=(t.value*i/100).toFixed(2)},F=k,V=()=>{if(n.value.percentage>100)return n.value.nowPrice="",n.value.percentage="",j.error("改价金额不能大于当前订单金额");if(n.value.nowPrice<=0)return n.value.nowPrice="",n.value.percentage="",j.error("金额不能小于0");F("changeAllPrice",n.value.nowPrice)};S({show:d,dialogVisible:a});const L=()=>{a.value&&V()};return M(()=>{$.on("enter",L)}),N(()=>{$.off("enter",L)}),(i,v)=>{const A=m("el-input"),z=m("el-button"),_=m("el-dialog");return h(),G(_,{modelValue:a.value,"onUpdate:modelValue":v[2]||(v[2]=f=>a.value=f),title:"订单改价",width:"650"},{footer:w(()=>[e("div",xe,[c(z,{class:"ok-btn",type:"primary",onClick:V},{default:w(()=>[g(" 确定 (Enter) ")]),_:1})])]),default:w(()=>[e("div",ke,[e("div",be,[c(A,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.nowPrice,"onUpdate:modelValue":v[0]||(v[0]=f=>n.value.nowPrice=f),type:"number",placeholder:"请输入改价后的价格",onInput:p},{suffix:w(()=>[g("元")]),_:1},8,["modelValue"]),c(A,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.percentage,"onUpdate:modelValue":v[1]||(v[1]=f=>n.value.percentage=f),type:"number",placeholder:"请输入比例",onInput:I},{suffix:w(()=>[g("%")]),_:1},8,["modelValue"])]),e("div",$e,[g(" 改价后金额: "),e("span",we,"¥"+R(n.value.nowPrice||t.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ce=K(Ie,[["__scopeId","data-v-dd4c26df"]]),Pe={class:"my-order"},Ve={class:"header-nav"},Ae={class:"nav-item"},Se={class:"order-list"},Fe={class:"order-item-info"},Le={class:"order-item-title"},Re={class:"title"},Ee=["onClick"],ze={class:"order-item-sku"},De=["onClick"],Ue={class:"order-item-price"},Oe={class:"order-footer"},qe={class:"order-total"},Me={class:"price"},Ne={class:"total-item"},Be={style:{"font-size":"1.4rem"}},Te={class:"total-item"},je={class:"update-price"},Ke={class:"order-btn"},Ge={__name:"order",emits:["goPay","editAttr"],setup(x,{expose:S,emit:k}){const a=r([]),u=r(0),t=r(0),d=r(0),n=te(),p=()=>{let o=[];a.value.map(l=>{o.push(l.cart_id)}),o.length!=0&&F(o)},I=o=>{a.value=a.value.filter(l=>l.cart_id!=o),F([o])},F=o=>{ce({cart_id:o}).then(l=>{console.log(l),V()})},V=()=>{u.value=0,t.value=0,d.value=0,re({staff_id:n.userInfo.service.service_id}).then(o=>{var l,b;((b=(l=o.data)==null?void 0:l.list)==null?void 0:b.length)>0?(a.value=o.data.list[0].list,a.value.forEach(C=>{u.value+=C.productAttr.price*C.cart_num}),t.value=u.value):a.value=[]})};V();const L=k,i=()=>{L("goPay")},v=(o,l)=>{ee(o.cart_id,{cart_num:o.cart_num}).then(b=>{u.value=0,a.value.forEach(C=>{u.value+=C.productAttr.price*C.cart_num}),t.value=u.value})},A=o=>{L("editPupop",o)},z=(o,l)=>{ee(o,l).then(b=>{V()})},_=o=>{d.value=t.value-o,u.value=+o,H(()=>{setTimeout(()=>{y(!1)},150)})};r(0);const f=r(null),y=(o=!0)=>{f.value.show(o,t.value)};S({getList:V,list:a,editItem:z,discounts:d,allPrice:u});const D=()=>{f.value.dialogVisible?f.value.dialogVisible=!1:y()},s=()=>{a.value.length>0&&p()};return M(()=>{$.on("insert",D),$.on("delete",s)}),N(()=>{$.off("insert",D),$.off("delete",s)}),(o,l)=>{const b=m("Delete"),C=m("el-icon"),O=m("el-empty"),U=m("el-image"),J=m("ArrowDown"),Y=m("el-input-number"),Z=m("el-button");return h(),P("div",Pe,[e("div",Ve,[e("div",Ae,[g(" 已选购 "),e("span",null,R(a.value.length),1),g(" 件 ")]),e("div",{class:"nav-item-clear",onClick:p},[c(C,null,{default:w(()=>[c(b)]),_:1}),g("清空 (Delete) ")])]),e("div",Se,[a.value.length==0?(h(),G(O,{key:0,description:"请点击右侧添加商品"})):(h(!0),P(Q,{key:1},W(a.value,(E,ie)=>(h(),P("div",{class:"order-item",key:ie},[c(U,{loading:"lazy",class:"order-item-img",src:E.productAttr&&E.productAttr.image||E.product.image},null,8,["src"]),e("div",Fe,[e("div",Le,[e("div",Re,R(E.spu.store_name),1),e("div",{class:"delete",onClick:B=>I(E.cart_id)},"删除",8,Ee)]),e("div",ze,[e("span",{style:{display:"flex","align-items":"center"},onClick:B=>A(E)},[g("商品规格: "+R(E.productAttr.sku||"默认规格"),1),c(C,{size:"16",style:{"margin-left":"0.2rem"}},{default:w(()=>[c(J)]),_:1})],8,De)]),e("div",Ue,[e("div",null,[g(" ¥"),e("span",null,R(E.productAttr.price),1)]),e("div",null,[c(Y,{modelValue:E.cart_num,"onUpdate:modelValue":B=>E.cart_num=B,"step-strictly":"",min:1,step:1,onChange:B=>v(E)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Oe,[e("div",qe,[e("div",Me,[e("div",Ne,[g(" 实付: "),e("span",null,[g("¥"),e("span",Be,R(u.value.toFixed(2)),1)])]),e("div",Te,[g(" 优惠: "),e("span",null,[g("¥"),e("span",null,R(d.value.toFixed(2)),1)])])]),e("div",je,[c(Z,{class:"btn",type:"primary",onClick:y,size:"small"},{default:w(()=>[g("改价 (Insert)")]),_:1})])]),e("div",Ke,[c(Z,{class:"btn",type:"primary",onClick:i,disabled:a.value.length==0},{default:w(()=>[g("立即结账 (F9)")]),_:1},8,["disabled"])])]),c(Ce,{ref_key:"priceRef",ref:f,onChangeAllPrice:_},null,512)])}}},Je=K(Ge,[["__scopeId","data-v-49a45541"]]),X=x=>(le("data-v-d44598fa"),x=x(),ne(),x),He={class:"my-order"},Qe=X(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},ot=X(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),st=[ot],at={key:1,class:"no-stock"},lt=X(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],it={key:1,class:"no-data"},ct={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(x,{expose:S,emit:k}){const a=r(null),u=k,t=r(""),d=()=>{u("loadMore",{bar_code:t.value})},n=i=>{if(i.is_used==0)return j.error("该商品已被平台关闭");if(i.stock==0)return j.warning("该商品无库存");u("changeItem",i)},p=fe.throttle(()=>{u("getStoreList",{bar_code:t.value},!0)},300);S({bar_code:t});const I=r(!1),F=()=>{I.value=!0},V=()=>{I.value=!1},L=()=>{var i;(i=a.value)==null||i.focus()};return M(()=>{H(()=>{var i;(i=a.value)==null||i.focus(),F()}),$.on("shift",L)}),N(()=>{$.off("shift",L)}),(i,v)=>{const A=m("el-input"),z=m("Search"),_=m("el-icon"),f=m("el-button"),y=m("el-image"),D=m("el-space"),s=m("el-empty"),o=oe("infinite-scroll");return h(),P("div",He,[e("div",{class:se(["header-nav",{"input-focus":I.value}])},[Qe,e("div",We,[c(A,{modelValue:t.value,"onUpdate:modelValue":v[0]||(v[0]=l=>t.value=l),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:a,onFocus:F,onBlur:V,onKeyup:_e(T(p),["enter"]),onClear:T(p)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:v[1]||(v[1]=(...l)=>T(p)&&T(p)(...l))},[c(f,{class:"btn",type:"primary"},{default:w(()=>[c(_,null,{default:w(()=>[c(z)]),_:1})]),_:1})])],2),ae((h(),P("div",Xe,[x.storeList.length?(h(),G(D,{key:0,wrap:""},{default:w(()=>[(h(!0),P(Q,null,W(x.storeList,(l,b)=>(h(),P("div",{class:"shop-item",key:b,onClick:C=>n(l)},[c(y,{loading:"lazy",src:l.image},null,8,["src"]),e("div",Ze,R(l.store_name),1),e("div",et,[g(" ¥"),e("span",null,R(l.price),1)]),l.stock==0?(h(),P("div",tt,st)):q("",!0),l.is_used==0?(h(),P("div",at,nt)):q("",!0)],8,Ye))),128))]),_:1})):q("",!0),x.storeList.length?q("",!0):(h(),P("div",it,[c(s,{"image-size":300,description:"没有找到对应商品"})]))])),[[o,d]])])}}},rt=K(ct,[["__scopeId","data-v-d44598fa"]]),ut=x=>(le("data-v-52f45b9b"),x=x(),ne(),x),dt={class:"shop"},_t={key:0,class:"shop-info"},vt={class:"shop-info-left"},pt={class:"shop-info-right"},ft={class:"shop-info-right-top"},mt={class:"shop-info-right-center"},ht={class:"shop-info-right-price"},gt={class:"shop-sku"},yt=ut(()=>e("div",{class:"title"},"产品",-1)),kt={class:"sku"},bt=["onClick"],$t={class:"dialog-footer"},wt={__name:"pupop",emits:["changeItem"],setup(x,{expose:S,emit:k}){const a=r(!1),u=_=>{a.value=_},t=r({}),d=r(null),n=r(!1),p=r("add"),I=r({}),F=(_,f="add")=>{p.value=f,f=="add"?(t.value=_,d.value=_.attr[0]):(n.value=!0,I.value=_,he(_.product_id).then(y=>{y.data.attrValue=JSON.parse(JSON.stringify(y.data.attr)),y.data.attr=Object.keys(y.data.sku),t.value=y.data,d.value=y.data.attr[0],n.value=!1}).catch(y=>{n.value=!1}))},V=k,L=()=>{p.value=="add"?V("changeItem",t.value,d.value):V("editItem",I.value.cart_id,{cart_num:I.value.cart_num,product_attr_unique:t.value.sku[d.value].unique}),a.value=!1},i=_=>{d.value=_};S({show:u,setForm:F});const v=()=>{if(!a.value)return;let _=t.value.attr.indexOf(d.value);if(_>0)return i(t.value.attr[_-1])},A=()=>{if(!a.value)return;let _=t.value.attr.indexOf(d.value);if(_{a.value&&L()};return M(()=>{$.on("left",v),$.on("right",A),$.on("enter",z)}),N(()=>{$.off("left",v),$.off("right",A),$.off("enter",z)}),(_,f)=>{const y=m("el-image"),D=m("el-space"),s=m("el-button"),o=m("el-dialog"),l=oe("loading");return h(),G(o,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=b=>a.value=b),title:"商品规格",width:"650"},ve({default:w(()=>{var b,C,O;return[ae((h(),P("div",dt,[t.value.sku?(h(),P("div",_t,[e("div",vt,[c(y,{loading:"lazy",src:((b=t.value.sku[d.value])==null?void 0:b.image)||t.value.image},null,8,["src"])]),e("div",pt,[e("div",ft,R(t.value.store_name),1),e("div",mt,"库存"+R(((C=t.value.sku[d.value])==null?void 0:C.stock)||0),1),e("div",ht,[g("¥"),e("span",null,R(((O=t.value.sku[d.value])==null?void 0:O.price)||t.value.price),1)])])])):q("",!0),e("div",gt,[yt,e("div",kt,[c(D,{wrap:"",size:20},{default:w(()=>[(h(!0),P(Q,null,W(t.value.attr,(U,J)=>(h(),P("div",{class:se(["sku-item",{"sku-item_active":d.value==U}]),onClick:Y=>i(U),key:J},R(U||"默认规格"),11,bt))),128))]),_:1})])])])),[[l,n.value]])]}),_:2},[p.value!="add"&&t.value.attr&&t.value.attr.length==1?void 0:{name:"footer",fn:w(()=>[e("div",$t,[c(s,{class:"ok-btn",type:"primary",onClick:L},{default:w(()=>[g(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},xt=K(wt,[["__scopeId","data-v-52f45b9b"]]),It={class:"my-card"},Lt={__name:"index",setup(x){const S=r(null),k=r(null),a=r(null),u=r(null),t=r([]),d=te(),n=pe(),p=r({page:0,limit:30}),I=(s={},o=!1)=>{p.value={staff_id:d.userInfo.service.service_id,...p.value,...s},o&&(t.value=[],p.value.page=1,F.value=!1),ge(d.userInfo.service.mer_id,p.value).then(l=>{var C,O;((O=(C=l.data)==null?void 0:C.list)==null?void 0:O.length)(U.attr=Object.keys(U.sku),U));t.value=t.value.concat(b),s.bar_code&&t.value.length==1&&L(s.bar_code)&&(a.value.bar_code="",v(t.value[0],t.value[0].attr[0]))})},F=r(!1),V=s=>{F.value||(p.value.page++,I(s))};function L(s){return/^\d+$/.test(s)}const i=(s,o="")=>{let l={is_new:0,product_id:s.product_id,cart_num:1,product_attr_unique:s.sku[o]!==void 0?s.sku[o].unique:"",staff_id:d.userInfo.service.service_id,product_type:0};ue(l).then(b=>{k.value.getList()})},v=(s,o)=>{if(!s.attr||s.attr.length==0||s.attr.length==1)return i(s,s.attr[0]?s.attr[0]:"");if(o)return i(s,o);S.value.setForm(s,"add"),S.value.show(!0)},A=(s,o)=>{k.value.editItem(s,o)},z=s=>{S.value.setForm(s,"edit"),S.value.show(!0)},_=()=>{let s=k.value.list.map(l=>l.cart_id),o={takes:[],use_coupon:{},use_integral:!1,cart_id:s};k.value.discounts>0&&(o.deduction_price=k.value.discounts.toFixed(2),o.pay_type="micropay"),de(o).then(l=>{u.value.setForm({data:l.data,cart_id:s})})},f=()=>{_(),u.value.drawer=!0},y=()=>{k.value.getList()},D=()=>{console.log("F9"),n.name=="home"&&(!u.value.drawer&&k.value.list.length>0?f():u.value.beforeClose())};return M(()=>{I(),p.value.page++,$.on("F9",D)}),N(()=>{$.off("F9",D)}),(s,o)=>(h(),P("div",It,[c(Je,{ref_key:"orderRef",ref:k,onGoPay:f,onEditPupop:z},null,512),c(me),c(rt,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:t.value,onGetStoreList:I,onChangeItem:v,onLoadMore:V},null,8,["storeList"]),c(xt,{ref_key:"pupopRef",ref:S,onChangeItem:v,onEditItem:A},null,512),c(ye,{ref_key:"payRef",ref:u,onPaySuccess:y},null,512)]))}};export{Lt as default}; diff --git a/dist/assets/index-9aqTqxZl.js b/dist/assets/index-CaeMrXBn.js similarity index 97% rename from dist/assets/index-9aqTqxZl.js rename to dist/assets/index-CaeMrXBn.js index 8faeff8..c44436d 100644 --- a/dist/assets/index-9aqTqxZl.js +++ b/dist/assets/index-CaeMrXBn.js @@ -1 +1 @@ -import{_ as G,u as J,r as a,b as w,j as M,c as t,h as s,e,f as c,w as p,g as $,k as Q,q as I,F as T,i as j,s as l,E as L,m as U,p as B,t as d,d as q,v as W,x as X,A as Y,n as H,o as Z,H as O,I as ee}from"./index-Db3iIaOe.js";import{v as te,f as se,j as oe}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js";import{p as ie}from"./pay-CEmj54N0.js";import{p as ae}from"./padding-Ch9Ano5D.js";const ne=y=>(W("data-v-0f73b4d2"),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"},me={class:"shop"},he={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},Ie={key:2},xe={key:3},Re={key:4},Le={key:5},Ae={key:6},Pe={key:1,style:{color:"#ff4a00"}},Ee={key:0,class:"cashier"},Oe={key:1,class:"cashier"},Ue={key:0,class:"load-end"},Be={key:1,class:"load-end"},ze={__name:"order",emits:["backOne"],setup(y,{expose:k,emit:S}){const x=J();a([]);const o=a(1);a(null);const v=a({page:1,limit:20,search_info:""}),g=a(!1);a(0);const m=a(0),h=a(!1),b=a([]),C=(r=!1)=>{if(!v.value.search_info)return L.error("请输入订单编号");if(r)v.value.page=1;else if(h.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(x.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=>{h.value=!0,g.value=!1})},z=(r,n)=>{m.value=n,U.emit("set-order-detail",r)},D=r=>{v.value.search_info=r,C(!0)},A=S,K=()=>{A("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 0.315rem 0.315rem 0"},onClick:n[0]||(n[0]=i=>C(!0))},{default:p(()=>[$("搜索")]),_:1})]),_:1},8,["modelValue"])]),I((t(),s("div",ue,[(t(!0),s(T,null,j(b.value,(i,P)=>(t(),s("div",{class:B(["item",{"item-active":m.value==P}]),key:P,onClick:_=>z(i,P)},[e("div",pe,[e("div",{class:B(["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",me,[i.orderProduct?(t(),s("div",he,[(t(!0),s(T,null,j(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",Ie,"(微信收款)")):l("",!0),i.pay_type==0?(t(),s("span",xe,"(余额支付)")):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",Ae,"(对公转账)")):l("",!0)])):(t(),s("div",Pe,"未支付"))]),i.service_info?(t(),s("div",Ee,"收银员: "+d(i.service_info.nickname),1)):(t(),s("div",Oe,"平台订单"))])],10,ve))),128)),h.value?(t(),s("div",Ue,"没有更多了")):l("",!0),g.value?(t(),s("div",Be,"加载中...")):l("",!0)])),[[F,g.value],[R,C]])])}}},De=G(ze,[["__scopeId","data-v-0f73b4d2"]]),f=y=>(W("data-v-5c9b212f"),y=y(),X(),y),Ke={class:"my-order"},Ne={class:"header-nav"},Fe=["onClick"],Me={class:"detail"},Te={key:0,class:"table"},je={style:{"font-size":"0.9rem"}},qe={style:{color:"#ff4a00"}},He={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"},mt=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ht={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"}},It={class:"info-item"},xt=f(()=>e("div",{class:"info-item-title"},"头像:",-1)),Rt={class:"info-item-info"},Lt={class:"info-item"},At=f(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Pt={class:"info-item-info"},Et={class:"info-item"},Ot=f(()=>e("div",{class:"info-item-title"},"账号:",-1)),Ut={class:"info-item-info"},Bt={class:"footer"},zt={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(),x=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r,H(()=>{var n;(n=A.value)==null||n.toggleAllSelection()})}),a([]);const v=a(null),g=a(!1);a(0);const m=a(0),h=a(["商品信息","订单详情"]),b=a(""),C=a(!1),z=()=>{C.value=!1,se({order_sn:b.value}).then(r=>{L({message:r.message,type:"success"}),x.push({name:"home"})})},D=k,A=a(null),K=()=>{let r=A.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"),P=M("loading");return t(),s("div",Ke,[e("div",Ne,[(t(!0),s(T,null,j(h.value,(_,V)=>(t(),s("div",{key:V,class:B(["nav-item",{"nav-item-active":m.value==V,"nav-item-radius1":m.value==V+1,"nav-item-radius2":m.value==V-1}]),onClick:Qt=>m.value=V},d(_),11,Fe))),128)),e("div",{class:B(["nav-item",{"nav-item-radius2":m.value==h.value.length-1}]),style:{flex:"1"}},null,2)]),I((t(),s("div",Me,[o.value.orderProduct&&m.value==0?(t(),s("div",Te,[e("div",je,[$(" 共计 "),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:A},{default:p(()=>[c(u,{type:"selection",width:"55"}),c(u,{prop:"cart_info.product.store_name",label:"商品信息"},{default:p(({row:_})=>[e("div",He,[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&&m.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,[mt,e("div",ht,[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",It,[xt,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,[At,e("div",Pt,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",Bt,[e("div",zt,[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,"已支付"))])])),[[P,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:z},{default:p(()=>[$(" 确认提单 ")]),_:1}))])]),default:p(()=>[Ft]),_:1},8,["modelValue"])])}}},jt=G(Tt,[["__scopeId","data-v-5c9b212f"]]),qt={class:"my-card"},Ht={class:"my-code"},Gt=e("h2",null,"订单核销",-1),Jt={class:"box"},es={__name:"index",setup(y){const k=a(1),S=a(""),x=a(null),o=a(null),v=()=>{if(S.value=="")return L.error("请输入订单编号");k.value=2,H(()=>{o.value.setCode(S.value)})},g=()=>{v()};return Z(()=>{H(()=>{x.value.focus()})}),(m,h)=>(t(),s("div",qt,[I(e("div",Ht,[Gt,e("div",Jt,[I(e("input",{ref_key:"inputRef",ref:x,"onUpdate:modelValue":h[0]||(h[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]]),I(c(De,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:o,onBackOne:h[1]||(h[1]=b=>k.value=1)},null,512),[[O,k.value==2]]),I(c(ae,null,null,512),[[O,k.value==2]]),I(c(jt,{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,j as M,c as t,h as s,e,f as c,w as p,g as $,k as Q,q as I,F as T,i as j,s as l,E as L,m as U,p as B,t as d,d as q,v as W,x as X,A as Y,n as H,o as Z,H as O,I as ee}from"./index-3-t8Fk7s.js";import{v as te,f as se,j as oe}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{p as ie}from"./pay-Bt7FIL7i.js";import{p as ae}from"./padding-DTyMU7Be.js";const ne=y=>(W("data-v-0f73b4d2"),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"},me={class:"shop"},he={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},Ie={key:2},xe={key:3},Re={key:4},Le={key:5},Ae={key:6},Pe={key:1,style:{color:"#ff4a00"}},Ee={key:0,class:"cashier"},Oe={key:1,class:"cashier"},Ue={key:0,class:"load-end"},Be={key:1,class:"load-end"},ze={__name:"order",emits:["backOne"],setup(y,{expose:k,emit:S}){const x=J();a([]);const o=a(1);a(null);const v=a({page:1,limit:20,search_info:""}),g=a(!1);a(0);const m=a(0),h=a(!1),b=a([]),C=(r=!1)=>{if(!v.value.search_info)return L.error("请输入订单编号");if(r)v.value.page=1;else if(h.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(x.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=>{h.value=!0,g.value=!1})},z=(r,n)=>{m.value=n,U.emit("set-order-detail",r)},D=r=>{v.value.search_info=r,C(!0)},A=S,K=()=>{A("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 0.315rem 0.315rem 0"},onClick:n[0]||(n[0]=i=>C(!0))},{default:p(()=>[$("搜索")]),_:1})]),_:1},8,["modelValue"])]),I((t(),s("div",ue,[(t(!0),s(T,null,j(b.value,(i,P)=>(t(),s("div",{class:B(["item",{"item-active":m.value==P}]),key:P,onClick:_=>z(i,P)},[e("div",pe,[e("div",{class:B(["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",me,[i.orderProduct?(t(),s("div",he,[(t(!0),s(T,null,j(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",Ie,"(微信收款)")):l("",!0),i.pay_type==0?(t(),s("span",xe,"(余额支付)")):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",Ae,"(对公转账)")):l("",!0)])):(t(),s("div",Pe,"未支付"))]),i.service_info?(t(),s("div",Ee,"收银员: "+d(i.service_info.nickname),1)):(t(),s("div",Oe,"平台订单"))])],10,ve))),128)),h.value?(t(),s("div",Ue,"没有更多了")):l("",!0),g.value?(t(),s("div",Be,"加载中...")):l("",!0)])),[[F,g.value],[R,C]])])}}},De=G(ze,[["__scopeId","data-v-0f73b4d2"]]),f=y=>(W("data-v-5c9b212f"),y=y(),X(),y),Ke={class:"my-order"},Ne={class:"header-nav"},Fe=["onClick"],Me={class:"detail"},Te={key:0,class:"table"},je={style:{"font-size":"0.9rem"}},qe={style:{color:"#ff4a00"}},He={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"},mt=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ht={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"}},It={class:"info-item"},xt=f(()=>e("div",{class:"info-item-title"},"头像:",-1)),Rt={class:"info-item-info"},Lt={class:"info-item"},At=f(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Pt={class:"info-item-info"},Et={class:"info-item"},Ot=f(()=>e("div",{class:"info-item-title"},"账号:",-1)),Ut={class:"info-item-info"},Bt={class:"footer"},zt={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(),x=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r,H(()=>{var n;(n=A.value)==null||n.toggleAllSelection()})}),a([]);const v=a(null),g=a(!1);a(0);const m=a(0),h=a(["商品信息","订单详情"]),b=a(""),C=a(!1),z=()=>{C.value=!1,se({order_sn:b.value}).then(r=>{L({message:r.message,type:"success"}),x.push({name:"home"})})},D=k,A=a(null),K=()=>{let r=A.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"),P=M("loading");return t(),s("div",Ke,[e("div",Ne,[(t(!0),s(T,null,j(h.value,(_,V)=>(t(),s("div",{key:V,class:B(["nav-item",{"nav-item-active":m.value==V,"nav-item-radius1":m.value==V+1,"nav-item-radius2":m.value==V-1}]),onClick:Qt=>m.value=V},d(_),11,Fe))),128)),e("div",{class:B(["nav-item",{"nav-item-radius2":m.value==h.value.length-1}]),style:{flex:"1"}},null,2)]),I((t(),s("div",Me,[o.value.orderProduct&&m.value==0?(t(),s("div",Te,[e("div",je,[$(" 共计 "),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:A},{default:p(()=>[c(u,{type:"selection",width:"55"}),c(u,{prop:"cart_info.product.store_name",label:"商品信息"},{default:p(({row:_})=>[e("div",He,[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&&m.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,[mt,e("div",ht,[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",It,[xt,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,[At,e("div",Pt,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",Bt,[e("div",zt,[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,"已支付"))])])),[[P,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:z},{default:p(()=>[$(" 确认提单 ")]),_:1}))])]),default:p(()=>[Ft]),_:1},8,["modelValue"])])}}},jt=G(Tt,[["__scopeId","data-v-5c9b212f"]]),qt={class:"my-card"},Ht={class:"my-code"},Gt=e("h2",null,"订单核销",-1),Jt={class:"box"},es={__name:"index",setup(y){const k=a(1),S=a(""),x=a(null),o=a(null),v=()=>{if(S.value=="")return L.error("请输入订单编号");k.value=2,H(()=>{o.value.setCode(S.value)})},g=()=>{v()};return Z(()=>{H(()=>{x.value.focus()})}),(m,h)=>(t(),s("div",qt,[I(e("div",Ht,[Gt,e("div",Jt,[I(e("input",{ref_key:"inputRef",ref:x,"onUpdate:modelValue":h[0]||(h[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]]),I(c(De,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:o,onBackOne:h[1]||(h[1]=b=>k.value=1)},null,512),[[O,k.value==2]]),I(c(ae,null,null,512),[[O,k.value==2]]),I(c(jt,{ref:"detailRef",onReInit:g},null,512),[[O,k.value==2]])]))}};export{es as default}; diff --git a/dist/assets/index-DF5hR_MB.css b/dist/assets/index-Clnyb8oe.css similarity index 80% rename from dist/assets/index-DF5hR_MB.css rename to dist/assets/index-Clnyb8oe.css index a4b3adf..2792039 100644 --- a/dist/assets/index-DF5hR_MB.css +++ b/dist/assets/index-Clnyb8oe.css @@ -1 +1 @@ -@charset "UTF-8";.dialog-footer .ok-btn[data-v-924edcc0]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-924edcc0]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.my-order[data-v-c5266ed8]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-c5266ed8]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-c5266ed8]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-c5266ed8]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-c5266ed8]{height:calc(100vh - 20.25rem);overflow-y:auto}.my-order .order-list .order-item[data-v-c5266ed8]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-c5266ed8]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-c5266ed8]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-c5266ed8]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-c5266ed8]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-c5266ed8]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-c5266ed8]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-c5266ed8]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -.0625rem .625rem #eee}.my-order .order-footer .order-total[data-v-c5266ed8]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-c5266ed8]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-c5266ed8]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-c5266ed8]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-c5266ed8]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-c5266ed8]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-c5266ed8]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-5ddbb518]{height:100%;box-sizing:border-box;position:relative;overflow:hidden}.my-order .header-nav[data-v-5ddbb518]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-5ddbb518]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-5ddbb518]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-5ddbb518]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-5ddbb518] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-5ddbb518]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-5ddbb518]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-5ddbb518]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-5ddbb518]{height:calc(100vh - 9.75rem);width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-5ddbb518]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-5ddbb518]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-5ddbb518]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-5ddbb518]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-5ddbb518]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item[data-v-5ddbb518]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-5ddbb518]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-5ddbb518]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-5ddbb518]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-29f08ea1]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-29f08ea1]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-29f08ea1]{display:flex}.shop .shop-info .shop-info-left[data-v-29f08ea1]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-29f08ea1]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-29f08ea1]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-29f08ea1]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-29f08ea1]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-29f08ea1]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-29f08ea1]{min-height:20rem}.shop .shop-sku .title[data-v-29f08ea1]{font-size:1.1rem;font-weight:700;padding:1rem 0 .5rem}.shop .shop-sku .sku .sku-item[data-v-29f08ea1]{cursor:pointer;padding:.5rem 1rem;background-color:#f5f5f5;border-radius:3rem}.shop .shop-sku .sku .sku-item_active[data-v-29f08ea1]{background-color:#1890ff;color:#fff}.classify[data-v-4630842b]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-4630842b]{width:4rem;margin:1rem;padding:.5rem 1rem;text-align:center;border-radius:3rem;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classify .itemP-active[data-v-4630842b]{background-color:#1890ff;color:#fff}.active-card .title[data-v-4630842b]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-4630842b]{display:flex}.active-card .list div[data-v-4630842b]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-4630842b]{color:#1890ff}[data-v-4630842b]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.dialog-footer .ok-btn[data-v-924edcc0]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-924edcc0]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.my-order[data-v-c5266ed8]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-c5266ed8]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-c5266ed8]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-c5266ed8]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-c5266ed8]{height:calc(100vh - 20.25rem);overflow-y:auto}.my-order .order-list .order-item[data-v-c5266ed8]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-c5266ed8]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-c5266ed8]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-c5266ed8]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-c5266ed8]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-c5266ed8]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-c5266ed8]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-c5266ed8]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -.0625rem .625rem #eee}.my-order .order-footer .order-total[data-v-c5266ed8]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-c5266ed8]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-c5266ed8]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-c5266ed8]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-c5266ed8]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-c5266ed8]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-c5266ed8]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-41370656]{height:100%;box-sizing:border-box;position:relative;overflow:hidden}.my-order .header-nav[data-v-41370656]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-41370656]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-41370656]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-41370656]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-41370656] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-41370656]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-41370656]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-41370656]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-41370656]{height:calc(100vh - 9.75rem);width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-41370656]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-41370656]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-41370656]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-41370656]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-41370656]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item[data-v-41370656]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-41370656]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-41370656]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-41370656]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-29f08ea1]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-29f08ea1]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-29f08ea1]{display:flex}.shop .shop-info .shop-info-left[data-v-29f08ea1]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-29f08ea1]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-29f08ea1]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-29f08ea1]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-29f08ea1]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-29f08ea1]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-29f08ea1]{min-height:20rem}.shop .shop-sku .title[data-v-29f08ea1]{font-size:1.1rem;font-weight:700;padding:1rem 0 .5rem}.shop .shop-sku .sku .sku-item[data-v-29f08ea1]{cursor:pointer;padding:.5rem 1rem;background-color:#f5f5f5;border-radius:3rem}.shop .shop-sku .sku .sku-item_active[data-v-29f08ea1]{background-color:#1890ff;color:#fff}.classify[data-v-4630842b]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-4630842b]{width:4rem;margin:1rem;padding:.5rem 1rem;text-align:center;border-radius:3rem;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classify .itemP-active[data-v-4630842b]{background-color:#1890ff;color:#fff}.active-card .title[data-v-4630842b]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-4630842b]{display:flex}.active-card .list div[data-v-4630842b]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-4630842b]{color:#1890ff}[data-v-4630842b]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/index-DuWvnZXq.js b/dist/assets/index-D5NVVZ9r.js similarity index 97% rename from dist/assets/index-DuWvnZXq.js rename to dist/assets/index-D5NVVZ9r.js index 094a163..4d0a4bc 100644 --- a/dist/assets/index-DuWvnZXq.js +++ b/dist/assets/index-D5NVVZ9r.js @@ -1 +1 @@ -import{_ as q,u as H,r,o as Q,m as x,b as h,j as F,c as t,h as s,e,t as c,f as d,w as u,g as f,k as W,q as G,F as O,i as j,p as B,d as K,s as n,A as X,E as Y,v as Z,x as ee}from"./index-Db3iIaOe.js";import{s as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js";import{p as ae}from"./pay-CEmj54N0.js";import{p as ie}from"./padding-Ch9Ano5D.js";const le={class:"my-order"},ne={class:"header-nav"},de={class:"nav-item"},ce={class:"nav-item-btn"},re={class:"header-input"},_e={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},ue=["onClick"],ve={class:"top"},pe={class:"create-time"},fe={class:"shop"},me={key:0,class:"left"},he={key:0,class:"shop-name"},ye={class:"right"},ge={class:"money"},ke={class:"count"},$e={class:"bottom"},be={class:"pay"},Ce={key:0},Ve={key:0},Se={key:1},we={key:2},Pe={key:3},Le={key:4},Ie={key:5},Ae={key:6},De={key:1,style:{color:"#ff4a00"}},xe={key:0,class:"cashier"},Re={key:1,class:"cashier"},Be={key:0,class:"load-end"},Ue={key:1,class:"load-end"},ze={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup($){const I=H(),R=$;r([]);const o=r(1),A=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],b(!0)};r(null);const D=r(""),g=()=>{v.value.date=D.value.join("-"),b(!0)},v=r({page:1,limit:20,store_name:"",date:"",staff_id:0,sale_type:2}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),b=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;R.isSystem||(v.value.staff_id=I.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(I.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)=>{L.value=l,x.emit("set-order-detail",i)};return Q(()=>{x.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),U=h("el-radio-group"),C=h("el-date-picker"),z=h("el-button"),E=h("el-input"),p=h("el-image"),P=F("loading"),T=F("infinite-scroll");return t(),s("div",le,[e("div",ne,[e("div",de,c($.isSystem?"平台订单":"收银订单"),1),e("div",ce,[d(U,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),onChange:A,size:"small"},{default:u(()=>[d(w,{value:1},{default:u(()=>[f("已支付")]),_:1}),d(w,{value:2},{default:u(()=>[f("未支付")]),_:1})]),_:1},8,["modelValue"]),d(C,{modelValue:D.value,"onUpdate:modelValue":l[1]||(l[1]=a=>D.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",re,[d(E,{modelValue:v.value.store_name,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.store_name=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>b(!0),["enter"])),onClear:l[5]||(l[5]=a=>b(!0)),clearable:""},{append:u(()=>[d(z,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:l[2]||(l[2]=a=>b(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",_e,[(t(!0),s(O,null,j(k.value,(a,M)=>(t(),s("div",{class:B(["item",{"item-active":L.value==M}]),key:M,onClick:N=>_(a,M)},[e("div",ve,[e("div",{class:B(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+c(a.order_sn),3),e("div",pe,c(a.create_time),1)]),e("div",fe,[a.orderProduct?(t(),s("div",me,[(t(!0),s(O,null,j(a.orderProduct.slice(0,5),(N,J)=>(t(),K(p,{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",he,c(a.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",ye,[e("div",ge,"¥"+c(a.pay_price),1),e("div",ke,"共"+c(a.total_num)+"件商品",1)])]),e("div",$e,[e("div",be,[a.paid?(t(),s("div",Ce,[f(" 已支付 "),a.pay_type==13?(t(),s("span",Ve,"(支付宝收款)")):n("",!0),a.pay_type==12?(t(),s("span",Se,"(现金支付)")):n("",!0),a.pay_type==11?(t(),s("span",we,"(微信收款)")):n("",!0),a.pay_type==0?(t(),s("span",Pe,"(余额支付)")):n("",!0),a.pay_type==1?(t(),s("span",Le,"(微信支付)")):n("",!0),a.pay_type==9?(t(),s("span",Ie,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Ae,"(对公转账)")):n("",!0)])):(t(),s("div",De,"未支付"))]),a.service_info?(t(),s("div",xe," 收银员: "+c(a.service_info.nickname),1)):(t(),s("div",Re,"平台订单"))])],10,ue))),128)),S.value?(t(),s("div",Be,"没有更多了")):n("",!0),y.value?(t(),s("div",Ue,"加载中...")):n("",!0)])),[[P,y.value],[T,b]])])}}},Ee=q(ze,[["__scopeId","data-v-bafd87fa"]]),m=$=>(Z("data-v-cbee3552"),$=$(),ee(),$),Me={class:"my-order"},Ne={class:"header-nav"},Ye=["onClick"],Fe={class:"detail"},Oe={key:0,class:"table"},je={style:{"font-size":"0.9rem"}},Ke={style:{color:"#ff4a00"}},Te={style:{display:"flex","align-items":"center"}},qe={style:{"margin-left":"0.5rem"}},He={key:1,class:"table"},Ge=m(()=>e("div",{class:"table-title"},"订单信息",-1)),Je={class:"table-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={class:"info-item"},ft=m(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),mt={class:"info-item-info"},ht={key:0},yt={key:1},gt={key:2},kt={key:3},$t={key:4},bt={key:5},Ct={key:6},Vt={key:0,class:"table-title"},St={key:1,class:"table-info",style:{"flex-direction":"column"}},wt={class:"info-item"},Pt=m(()=>e("div",{class:"info-item-title"},"头像:",-1)),Lt={class:"info-item-info"},It={class:"info-item"},At=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Dt={class:"info-item-info"},xt={class:"info-item"},Rt=m(()=>e("div",{class:"info-item-title"},"账号:",-1)),Bt={class:"info-item-info"},Ut={key:2,class:"footer"},zt={class:"info"},Et={class:"ser"},Mt={class:"price"},Nt={key:0,class:"handle"},Yt={key:1,class:"handle"},Ft=m(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ot={class:"dialog-footer"},jt={__name:"detail",setup($){const I=H(),R=X(),o=r({});x.on("set-order-detail",_=>{o.value=_}),r([]);const A=r(null),D=r(!1);r(0);const g=r(0),v=r(["商品信息","订单详情"]),y=r(""),V=r(!1),L=_=>{y.value=_,V.value=!0},S=()=>{V.value=!1,se({order_sn:y.value,staff_id:I.userInfo.service.service_id}).then(_=>{Y({message:_.message,type:"success"}),R.push({name:"home"})})},k=_=>{A.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),A.value.drawer=!0},b=_=>{oe({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?(Y({message:i.message,type:"success"}),x.emit("update-order-detail",{}),o.value.paid=1):Y({message:i.message,type:"error"})}).catch(i=>{})};return(_,i)=>{const l=h("el-image"),w=h("el-table-column"),U=h("el-table"),C=h("el-button"),z=h("el-dialog"),E=F("loading");return t(),s("div",Me,[e("div",Ne,[(t(!0),s(O,null,j(v.value,(p,P)=>(t(),s("div",{key:P,class:B(["nav-item",{"nav-item-active":g.value==P,"nav-item-radius1":g.value==P+1,"nav-item-radius2":g.value==P-1}]),onClick:T=>g.value=P},c(p),11,Ye))),128)),e("div",{class:B(["nav-item",{"nav-item-radius2":g.value==v.value.length-1}]),style:{flex:"1"}},null,2)]),G((t(),s("div",Fe,[o.value.orderProduct&&g.value==0?(t(),s("div",Oe,[e("div",je,[f(" 共计 "),e("span",Ke,c(o.value.total_num),1),f(" 件商品 ")]),d(U,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[d(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:p})=>[e("div",Te,[d(l,{style:{height:"3rem",width:"3rem"},src:p.cart_info.productAttr.image||p.cart_info.product.image},null,8,["src"]),e("span",qe,c(p.cart_info.product.store_name),1)])]),_:1}),d(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),d(w,{prop:"product_num",label:"数量",width:"150"}),d(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&g.value==1?(t(),s("div",He,[Ge,e("div",Je,[e("div",Qe,[We,e("div",Xe,c(o.value.create_time),1)]),e("div",Ze,[et,e("div",tt,c(o.value.total_num),1)]),e("div",st,[ot,e("div",at,"¥"+c(o.value.total_price),1)]),e("div",it,[lt,e("div",nt,c(o.value.pay_time),1)]),e("div",dt,[ct,e("div",rt,"¥"+c(o.value.deduction_price),1)]),e("div",_t,[ut,e("div",vt,"¥"+c(o.value.pay_price),1)]),e("div",pt,[ft,e("div",mt,[o.value.pay_type==11?(t(),s("span",ht,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",yt,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",kt,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",$t,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",bt,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",Ct,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",Vt,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",St,[e("div",wt,[Pt,e("div",Lt,[d(l,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",It,[At,e("div",Dt,c(o.value.service_info.nickname),1)]),e("div",xt,[Rt,e("div",Bt,c(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),o.value.service_info?(t(),s("div",Ut,[e("div",zt,[e("div",Et,"收银员: "+c(o.value.service_info.nickname),1),e("div",Mt,[f(" 实付: "),e("span",null,"¥"+c(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",Yt,"已支付")):(t(),s("div",Nt,[d(C,{class:"btn",type:"primary",onClick:i[0]||(i[0]=p=>k(o.value))},{default:u(()=>[f("重新支付")]),_:1}),d(C,{class:"btn",type:"primary",onClick:i[1]||(i[1]=p=>b(o.value.order_sn))},{default:u(()=>[f("检测状态")]),_:1}),d(C,{class:"btn",type:"success",onClick:i[2]||(i[2]=p=>L(o.value.order_sn))},{default:u(()=>[f("提单")]),_:1})]))])):n("",!0)])),[[E,D.value]]),d(ae,{ref_key:"payRef",ref:A},null,512),d(z,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",Ot,[d(C,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),K(C,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(C,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Ft]),_:1},8,["modelValue"])])}}},Kt=q(jt,[["__scopeId","data-v-cbee3552"]]),Tt={class:"my-card"},Qt={__name:"index",setup($){return(I,R)=>(t(),s("div",Tt,[d(Ee,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(ie),d(Kt,{ref:"detailRef"},null,512)]))}};export{Qt as default}; +import{_ as q,u as H,r,o as Q,m as x,b as h,j as F,c as t,h as s,e,t as c,f as d,w as u,g as f,k as W,q as G,F as O,i as j,p as B,d as K,s as n,A as X,E as Y,v as Z,x as ee}from"./index-3-t8Fk7s.js";import{s as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{p as ae}from"./pay-Bt7FIL7i.js";import{p as ie}from"./padding-DTyMU7Be.js";const le={class:"my-order"},ne={class:"header-nav"},de={class:"nav-item"},ce={class:"nav-item-btn"},re={class:"header-input"},_e={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},ue=["onClick"],ve={class:"top"},pe={class:"create-time"},fe={class:"shop"},me={key:0,class:"left"},he={key:0,class:"shop-name"},ye={class:"right"},ge={class:"money"},ke={class:"count"},$e={class:"bottom"},be={class:"pay"},Ce={key:0},Ve={key:0},Se={key:1},we={key:2},Pe={key:3},Le={key:4},Ie={key:5},Ae={key:6},De={key:1,style:{color:"#ff4a00"}},xe={key:0,class:"cashier"},Re={key:1,class:"cashier"},Be={key:0,class:"load-end"},Ue={key:1,class:"load-end"},ze={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup($){const I=H(),R=$;r([]);const o=r(1),A=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],b(!0)};r(null);const D=r(""),g=()=>{v.value.date=D.value.join("-"),b(!0)},v=r({page:1,limit:20,store_name:"",date:"",staff_id:0,sale_type:2}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),b=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;R.isSystem||(v.value.staff_id=I.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(I.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)=>{L.value=l,x.emit("set-order-detail",i)};return Q(()=>{x.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),U=h("el-radio-group"),C=h("el-date-picker"),z=h("el-button"),E=h("el-input"),p=h("el-image"),P=F("loading"),T=F("infinite-scroll");return t(),s("div",le,[e("div",ne,[e("div",de,c($.isSystem?"平台订单":"收银订单"),1),e("div",ce,[d(U,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),onChange:A,size:"small"},{default:u(()=>[d(w,{value:1},{default:u(()=>[f("已支付")]),_:1}),d(w,{value:2},{default:u(()=>[f("未支付")]),_:1})]),_:1},8,["modelValue"]),d(C,{modelValue:D.value,"onUpdate:modelValue":l[1]||(l[1]=a=>D.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",re,[d(E,{modelValue:v.value.store_name,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.store_name=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>b(!0),["enter"])),onClear:l[5]||(l[5]=a=>b(!0)),clearable:""},{append:u(()=>[d(z,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:l[2]||(l[2]=a=>b(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",_e,[(t(!0),s(O,null,j(k.value,(a,M)=>(t(),s("div",{class:B(["item",{"item-active":L.value==M}]),key:M,onClick:N=>_(a,M)},[e("div",ve,[e("div",{class:B(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+c(a.order_sn),3),e("div",pe,c(a.create_time),1)]),e("div",fe,[a.orderProduct?(t(),s("div",me,[(t(!0),s(O,null,j(a.orderProduct.slice(0,5),(N,J)=>(t(),K(p,{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",he,c(a.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",ye,[e("div",ge,"¥"+c(a.pay_price),1),e("div",ke,"共"+c(a.total_num)+"件商品",1)])]),e("div",$e,[e("div",be,[a.paid?(t(),s("div",Ce,[f(" 已支付 "),a.pay_type==13?(t(),s("span",Ve,"(支付宝收款)")):n("",!0),a.pay_type==12?(t(),s("span",Se,"(现金支付)")):n("",!0),a.pay_type==11?(t(),s("span",we,"(微信收款)")):n("",!0),a.pay_type==0?(t(),s("span",Pe,"(余额支付)")):n("",!0),a.pay_type==1?(t(),s("span",Le,"(微信支付)")):n("",!0),a.pay_type==9?(t(),s("span",Ie,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Ae,"(对公转账)")):n("",!0)])):(t(),s("div",De,"未支付"))]),a.service_info?(t(),s("div",xe," 收银员: "+c(a.service_info.nickname),1)):(t(),s("div",Re,"平台订单"))])],10,ue))),128)),S.value?(t(),s("div",Be,"没有更多了")):n("",!0),y.value?(t(),s("div",Ue,"加载中...")):n("",!0)])),[[P,y.value],[T,b]])])}}},Ee=q(ze,[["__scopeId","data-v-bafd87fa"]]),m=$=>(Z("data-v-cbee3552"),$=$(),ee(),$),Me={class:"my-order"},Ne={class:"header-nav"},Ye=["onClick"],Fe={class:"detail"},Oe={key:0,class:"table"},je={style:{"font-size":"0.9rem"}},Ke={style:{color:"#ff4a00"}},Te={style:{display:"flex","align-items":"center"}},qe={style:{"margin-left":"0.5rem"}},He={key:1,class:"table"},Ge=m(()=>e("div",{class:"table-title"},"订单信息",-1)),Je={class:"table-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={class:"info-item"},ft=m(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),mt={class:"info-item-info"},ht={key:0},yt={key:1},gt={key:2},kt={key:3},$t={key:4},bt={key:5},Ct={key:6},Vt={key:0,class:"table-title"},St={key:1,class:"table-info",style:{"flex-direction":"column"}},wt={class:"info-item"},Pt=m(()=>e("div",{class:"info-item-title"},"头像:",-1)),Lt={class:"info-item-info"},It={class:"info-item"},At=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Dt={class:"info-item-info"},xt={class:"info-item"},Rt=m(()=>e("div",{class:"info-item-title"},"账号:",-1)),Bt={class:"info-item-info"},Ut={key:2,class:"footer"},zt={class:"info"},Et={class:"ser"},Mt={class:"price"},Nt={key:0,class:"handle"},Yt={key:1,class:"handle"},Ft=m(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ot={class:"dialog-footer"},jt={__name:"detail",setup($){const I=H(),R=X(),o=r({});x.on("set-order-detail",_=>{o.value=_}),r([]);const A=r(null),D=r(!1);r(0);const g=r(0),v=r(["商品信息","订单详情"]),y=r(""),V=r(!1),L=_=>{y.value=_,V.value=!0},S=()=>{V.value=!1,se({order_sn:y.value,staff_id:I.userInfo.service.service_id}).then(_=>{Y({message:_.message,type:"success"}),R.push({name:"home"})})},k=_=>{A.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),A.value.drawer=!0},b=_=>{oe({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?(Y({message:i.message,type:"success"}),x.emit("update-order-detail",{}),o.value.paid=1):Y({message:i.message,type:"error"})}).catch(i=>{})};return(_,i)=>{const l=h("el-image"),w=h("el-table-column"),U=h("el-table"),C=h("el-button"),z=h("el-dialog"),E=F("loading");return t(),s("div",Me,[e("div",Ne,[(t(!0),s(O,null,j(v.value,(p,P)=>(t(),s("div",{key:P,class:B(["nav-item",{"nav-item-active":g.value==P,"nav-item-radius1":g.value==P+1,"nav-item-radius2":g.value==P-1}]),onClick:T=>g.value=P},c(p),11,Ye))),128)),e("div",{class:B(["nav-item",{"nav-item-radius2":g.value==v.value.length-1}]),style:{flex:"1"}},null,2)]),G((t(),s("div",Fe,[o.value.orderProduct&&g.value==0?(t(),s("div",Oe,[e("div",je,[f(" 共计 "),e("span",Ke,c(o.value.total_num),1),f(" 件商品 ")]),d(U,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[d(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:p})=>[e("div",Te,[d(l,{style:{height:"3rem",width:"3rem"},src:p.cart_info.productAttr.image||p.cart_info.product.image},null,8,["src"]),e("span",qe,c(p.cart_info.product.store_name),1)])]),_:1}),d(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),d(w,{prop:"product_num",label:"数量",width:"150"}),d(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&g.value==1?(t(),s("div",He,[Ge,e("div",Je,[e("div",Qe,[We,e("div",Xe,c(o.value.create_time),1)]),e("div",Ze,[et,e("div",tt,c(o.value.total_num),1)]),e("div",st,[ot,e("div",at,"¥"+c(o.value.total_price),1)]),e("div",it,[lt,e("div",nt,c(o.value.pay_time),1)]),e("div",dt,[ct,e("div",rt,"¥"+c(o.value.deduction_price),1)]),e("div",_t,[ut,e("div",vt,"¥"+c(o.value.pay_price),1)]),e("div",pt,[ft,e("div",mt,[o.value.pay_type==11?(t(),s("span",ht,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",yt,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",kt,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",$t,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",bt,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",Ct,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",Vt,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",St,[e("div",wt,[Pt,e("div",Lt,[d(l,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",It,[At,e("div",Dt,c(o.value.service_info.nickname),1)]),e("div",xt,[Rt,e("div",Bt,c(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),o.value.service_info?(t(),s("div",Ut,[e("div",zt,[e("div",Et,"收银员: "+c(o.value.service_info.nickname),1),e("div",Mt,[f(" 实付: "),e("span",null,"¥"+c(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",Yt,"已支付")):(t(),s("div",Nt,[d(C,{class:"btn",type:"primary",onClick:i[0]||(i[0]=p=>k(o.value))},{default:u(()=>[f("重新支付")]),_:1}),d(C,{class:"btn",type:"primary",onClick:i[1]||(i[1]=p=>b(o.value.order_sn))},{default:u(()=>[f("检测状态")]),_:1}),d(C,{class:"btn",type:"success",onClick:i[2]||(i[2]=p=>L(o.value.order_sn))},{default:u(()=>[f("提单")]),_:1})]))])):n("",!0)])),[[E,D.value]]),d(ae,{ref_key:"payRef",ref:A},null,512),d(z,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",Ot,[d(C,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),K(C,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(C,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Ft]),_:1},8,["modelValue"])])}}},Kt=q(jt,[["__scopeId","data-v-cbee3552"]]),Tt={class:"my-card"},Qt={__name:"index",setup($){return(I,R)=>(t(),s("div",Tt,[d(Ee,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(ie),d(Kt,{ref:"detailRef"},null,512)]))}};export{Qt as default}; diff --git a/dist/assets/index-FC_JluGa.js b/dist/assets/index-DFDQ9JgE.js similarity index 98% rename from dist/assets/index-FC_JluGa.js rename to dist/assets/index-DFDQ9JgE.js index 586ce40..3ed5218 100644 --- a/dist/assets/index-FC_JluGa.js +++ b/dist/assets/index-DFDQ9JgE.js @@ -1 +1 @@ -import{_ as H,r as p,u as Q,b as d,c as m,d as L,w as a,h as S,t as W,e as j,f as l,l as K,D as M,g as k,E as g,j as te,q as le,k as ae,F as oe,i as ne,s as z}from"./index-Db3iIaOe.js";import{p as re,c as ue,b as de,d as ie,e as se,s as ce,u as pe,f as _e}from"./shop-BJxq9Fz-.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=p(!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=p(q),U=Q(),D=A,_=p(!1),R=p(""),P=t=>{R.value=t.url,_.value=!0},N=p("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=>{var f;e.data.image=[{url:e.data.image,uid:e.data.image}],(f=e.data.content)!=null&&f.image?e.data.content.image=e.data.content.image.map(s=>({url:s,uid:e.data.image})):e.data.content={image:[]},e.data.slider_image=e.data.slider_image.map(s=>({url:s,uid:e.data.image})),n.value=e.data,console.log(n.value)})},B=p([]);(()=>{ue(U.userInfo.service.mer_id).then(t=>{B.value=t.data})})();const E=p(null),O=()=>{var e,f,s,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 c,w,V,b;return(w=(c=r==null?void 0:r.response)==null?void 0:c.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=(s=(f=(e=t.image[0])==null?void 0:e.response)==null?void 0:f.data)!=null&&s.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 c,w,V,b;return(w=(c=r==null?void 0:r.response)==null?void 0:c.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",!0),$()}):ie(U.userInfo.service.mer_id,t.product_id,t).then(r=>{g.success(r.message),D("reload",!0),$()})},J=()=>{$()},$=()=>{i.value=!1},F=()=>{};return T({drawer:i,show:I}),(t,e)=>{const f=d("el-input"),s=d("el-form-item"),y=d("el-cascader"),h=d("Plus"),C=d("el-icon"),r=d("el-upload"),c=d("el-form"),w=d("el-dialog"),V=d("el-button"),b=d("el-drawer");return m(),L(b,{size:"60rem",modelValue:i.value,"onUpdate:modelValue":e[10]||(e[10]=u=>i.value=u),direction:"rtl",onOpen:F,"before-close":$},{header:a(()=>[N.value=="add"?(m(),S("h4",me,"添加商品")):(m(),S("h4",fe,"编辑商品 ["+W(n.value.product_id)+"]",1))]),default:a(()=>[j("div",ve,[l(c,{ref_key:"formRef",ref:E,model:n.value,"label-width":"150px"},{default:a(()=>[l(s,{label:"商品条码",required:""},{default:a(()=>[l(f,{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(s,{label:"商品名称",required:""},{default:a(()=>[l(f,{modelValue:n.value.store_name,"onUpdate:modelValue":e[1]||(e[1]=u=>n.value.store_name=u),placeholder:"请输入商品名称"},null,8,["modelValue"])]),_:1}),l(s,{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(s,{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(s,{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(s,{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(s,{label:"商品单位",required:""},{default:a(()=>[l(f,{modelValue:n.value.unit_name,"onUpdate:modelValue":e[6]||(e[6]=u=>n.value.unit_name=u),placeholder:"请输入商品单位"},null,8,["modelValue"])]),_:1}),l(s,{label:"零售价",required:""},{default:a(()=>[l(f,{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(s,{label:"库存",required:""},{default:a(()=>[l(f,{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(()=>[j("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:O},{default:a(()=>[k("确认")]),_:1})]),_:1},8,["modelValue"])}}},we=H(ye,[["__scopeId","data-v-4a30c70d"]]),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=p([]),A=Q(),i=p({page:1,limit:15,type:1,keyword:"",staff_id:A.userInfo.service.service_id}),q=p(!1),n=p(0),U=p([]),D=()=>{se(A.userInfo.service.mer_id).then(t=>{U.value=t.data})};D();const _=(t=!1)=>{q.value=!0,D(),ce(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=p(!1),v=p({}),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};pe(v.value.product_id,t).then(e=>{g({message:e.message,type:"success"}),I.value=!1,_()}).catch(e=>{g({message:e,type:"error"})})},E=p("1"),O=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)})},$=p(null),F=(t="add",e)=>{$.value.show(t,e)};return(t,e)=>{const f=d("el-input"),s=d("el-form-item"),y=d("el-button"),h=d("el-form"),C=d("el-menu-item"),r=d("el-menu"),c=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((m(),S("div",Ve,[l(h,{inline:!0},{default:a(()=>[l(s,{label:"关键字:"},{default:a(()=>[l(f,{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(s,null,{default:a(()=>[l(y,{type:"primary",onClick:e[3]||(e[3]=o=>_(!0))},{default:a(()=>[k("搜索")]),_:1})]),_:1}),l(s,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":E.value,class:"el-menu-top",mode:"horizontal",onSelect:O},{default:a(()=>[(m(!0),S(oe,null,ne(U.value,(o,x)=>(m(),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(c,{prop:"product_id",label:"ID",width:"100"}),l(c,{prop:"image",label:"图片",width:"120"},{default:a(o=>[l(w,{loading:"lazy",style:{width:"3.75rem",height:"3.75rem"},src:o.row.image},null,8,["src"])]),_:1}),l(c,{prop:"store_name",label:"商品名称",width:"500"}),l(c,{prop:"price",label:"售价"}),l(c,{prop:"stock",label:"库存"}),i.value.type<=2?(m(),L(c,{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?(m(),L(c,{key:1,label:"商品状态",width:"100"},{default:a(o=>[o.row.is_used?o.row.is_show?(m(),S("span",ke,"上架显示")):(m(),S("span",he,"下架")):(m(),S("span",be,"平台关闭"))]),_:1})):z("",!0),l(c,{label:"操作",width:"120"},{default:a(o=>[i.value.type!=5?(m(),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?(m(),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(()=>[j("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?(m(),L(b,{key:0,data:v.value.attrValue,stripe:"",style:{width:"100%"}},{default:a(()=>[l(c,{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(c,{prop:"sku",label:"名称",width:"180"},{default:a(o=>[j("span",null,W(o.row.sku||v.value.store_name),1)]),_:1}),l(c,{prop:"price",label:"价格"}),l(c,{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:_},null,512)])),[[ee,q.value]])}}},$e=H(xe,[["__scopeId","data-v-22d63487"]]);export{$e as default}; +import{_ as H,r as p,u as Q,b as d,c as m,d as L,w as a,h as S,t as W,e as j,f as l,l as K,D as M,g as k,E as g,j as te,q as le,k as ae,F as oe,i as ne,s as z}from"./index-3-t8Fk7s.js";import{p as re,c as ue,b as de,d as ie,e as se,s as ce,u as pe,f as _e}from"./shop-C3GBYBKO.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=p(!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=p(q),U=Q(),D=A,_=p(!1),R=p(""),P=t=>{R.value=t.url,_.value=!0},N=p("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=>{var f;e.data.image=[{url:e.data.image,uid:e.data.image}],(f=e.data.content)!=null&&f.image?e.data.content.image=e.data.content.image.map(s=>({url:s,uid:e.data.image})):e.data.content={image:[]},e.data.slider_image=e.data.slider_image.map(s=>({url:s,uid:e.data.image})),n.value=e.data,console.log(n.value)})},B=p([]);(()=>{ue(U.userInfo.service.mer_id).then(t=>{B.value=t.data})})();const E=p(null),O=()=>{var e,f,s,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 c,w,V,b;return(w=(c=r==null?void 0:r.response)==null?void 0:c.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=(s=(f=(e=t.image[0])==null?void 0:e.response)==null?void 0:f.data)!=null&&s.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 c,w,V,b;return(w=(c=r==null?void 0:r.response)==null?void 0:c.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",!0),$()}):ie(U.userInfo.service.mer_id,t.product_id,t).then(r=>{g.success(r.message),D("reload",!0),$()})},J=()=>{$()},$=()=>{i.value=!1},F=()=>{};return T({drawer:i,show:I}),(t,e)=>{const f=d("el-input"),s=d("el-form-item"),y=d("el-cascader"),h=d("Plus"),C=d("el-icon"),r=d("el-upload"),c=d("el-form"),w=d("el-dialog"),V=d("el-button"),b=d("el-drawer");return m(),L(b,{size:"60rem",modelValue:i.value,"onUpdate:modelValue":e[10]||(e[10]=u=>i.value=u),direction:"rtl",onOpen:F,"before-close":$},{header:a(()=>[N.value=="add"?(m(),S("h4",me,"添加商品")):(m(),S("h4",fe,"编辑商品 ["+W(n.value.product_id)+"]",1))]),default:a(()=>[j("div",ve,[l(c,{ref_key:"formRef",ref:E,model:n.value,"label-width":"150px"},{default:a(()=>[l(s,{label:"商品条码",required:""},{default:a(()=>[l(f,{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(s,{label:"商品名称",required:""},{default:a(()=>[l(f,{modelValue:n.value.store_name,"onUpdate:modelValue":e[1]||(e[1]=u=>n.value.store_name=u),placeholder:"请输入商品名称"},null,8,["modelValue"])]),_:1}),l(s,{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(s,{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(s,{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(s,{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(s,{label:"商品单位",required:""},{default:a(()=>[l(f,{modelValue:n.value.unit_name,"onUpdate:modelValue":e[6]||(e[6]=u=>n.value.unit_name=u),placeholder:"请输入商品单位"},null,8,["modelValue"])]),_:1}),l(s,{label:"零售价",required:""},{default:a(()=>[l(f,{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(s,{label:"库存",required:""},{default:a(()=>[l(f,{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(()=>[j("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:O},{default:a(()=>[k("确认")]),_:1})]),_:1},8,["modelValue"])}}},we=H(ye,[["__scopeId","data-v-4a30c70d"]]),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=p([]),A=Q(),i=p({page:1,limit:15,type:1,keyword:"",staff_id:A.userInfo.service.service_id}),q=p(!1),n=p(0),U=p([]),D=()=>{se(A.userInfo.service.mer_id).then(t=>{U.value=t.data})};D();const _=(t=!1)=>{q.value=!0,D(),ce(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=p(!1),v=p({}),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};pe(v.value.product_id,t).then(e=>{g({message:e.message,type:"success"}),I.value=!1,_()}).catch(e=>{g({message:e,type:"error"})})},E=p("1"),O=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)})},$=p(null),F=(t="add",e)=>{$.value.show(t,e)};return(t,e)=>{const f=d("el-input"),s=d("el-form-item"),y=d("el-button"),h=d("el-form"),C=d("el-menu-item"),r=d("el-menu"),c=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((m(),S("div",Ve,[l(h,{inline:!0},{default:a(()=>[l(s,{label:"关键字:"},{default:a(()=>[l(f,{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(s,null,{default:a(()=>[l(y,{type:"primary",onClick:e[3]||(e[3]=o=>_(!0))},{default:a(()=>[k("搜索")]),_:1})]),_:1}),l(s,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":E.value,class:"el-menu-top",mode:"horizontal",onSelect:O},{default:a(()=>[(m(!0),S(oe,null,ne(U.value,(o,x)=>(m(),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(c,{prop:"product_id",label:"ID",width:"100"}),l(c,{prop:"image",label:"图片",width:"120"},{default:a(o=>[l(w,{loading:"lazy",style:{width:"3.75rem",height:"3.75rem"},src:o.row.image},null,8,["src"])]),_:1}),l(c,{prop:"store_name",label:"商品名称",width:"500"}),l(c,{prop:"price",label:"售价"}),l(c,{prop:"stock",label:"库存"}),i.value.type<=2?(m(),L(c,{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?(m(),L(c,{key:1,label:"商品状态",width:"100"},{default:a(o=>[o.row.is_used?o.row.is_show?(m(),S("span",ke,"上架显示")):(m(),S("span",he,"下架")):(m(),S("span",be,"平台关闭"))]),_:1})):z("",!0),l(c,{label:"操作",width:"120"},{default:a(o=>[i.value.type!=5?(m(),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?(m(),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(()=>[j("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?(m(),L(b,{key:0,data:v.value.attrValue,stripe:"",style:{width:"100%"}},{default:a(()=>[l(c,{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(c,{prop:"sku",label:"名称",width:"180"},{default:a(o=>[j("span",null,W(o.row.sku||v.value.store_name),1)]),_:1}),l(c,{prop:"price",label:"价格"}),l(c,{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:_},null,512)])),[[ee,q.value]])}}},$e=H(xe,[["__scopeId","data-v-22d63487"]]);export{$e as default}; diff --git a/dist/assets/index-C0jnRWFS.css b/dist/assets/index-DJbuehmj.css similarity index 80% rename from dist/assets/index-C0jnRWFS.css rename to dist/assets/index-DJbuehmj.css index 2860ff8..2d272b4 100644 --- a/dist/assets/index-C0jnRWFS.css +++ b/dist/assets/index-DJbuehmj.css @@ -1 +1 @@ -@charset "UTF-8";.dialog-footer .ok-btn[data-v-dd4c26df]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-dd4c26df]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-dd4c26df]{display:flex}.my-order[data-v-49a45541]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-49a45541]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-49a45541]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-49a45541]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-49a45541]{height:calc(100vh - 20.25rem);overflow-y:auto}.my-order .order-list .order-item[data-v-49a45541]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-49a45541]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-49a45541]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-49a45541]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-49a45541]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-49a45541]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-49a45541]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-49a45541]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -.0625rem .625rem #eee}.my-order .order-footer .order-total[data-v-49a45541]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-49a45541]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-49a45541]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-49a45541]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-49a45541]{border-radius:3rem;font-size:1rem}.my-order .order-footer .order-btn[data-v-49a45541]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-49a45541]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-687bd78b]{height:100%;box-sizing:border-box;position:relative;overflow:hidden}.my-order .header-nav[data-v-687bd78b]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-687bd78b]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-687bd78b]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-687bd78b]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-687bd78b] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-687bd78b]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-687bd78b]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-687bd78b]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-687bd78b]{height:calc(100vh - 9.75rem);width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1rem}.my-order .shop-list .shop-item[data-v-687bd78b]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-687bd78b]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-687bd78b]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-687bd78b]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-687bd78b]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item[data-v-687bd78b]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-687bd78b]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-687bd78b]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-687bd78b]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-52f45b9b]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-52f45b9b]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-52f45b9b]{display:flex}.shop .shop-info .shop-info-left[data-v-52f45b9b]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-52f45b9b]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-52f45b9b]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-52f45b9b]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-52f45b9b]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-52f45b9b]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-52f45b9b]{min-height:20rem}.shop .shop-sku .title[data-v-52f45b9b]{font-size:1.1rem;font-weight:700;padding:1rem 0 .5rem}.shop .shop-sku .sku .sku-item[data-v-52f45b9b]{cursor:pointer;padding:.5rem 1rem;background-color:#f5f5f5;border-radius:3rem}.shop .shop-sku .sku .sku-item_active[data-v-52f45b9b]{background-color:#1890ff;color:#fff}.my-card{display:flex}::-webkit-scrollbar{width:.3125rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.3125rem}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.dialog-footer .ok-btn[data-v-dd4c26df]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-dd4c26df]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-dd4c26df]{display:flex}.my-order[data-v-49a45541]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-49a45541]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-49a45541]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-49a45541]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-49a45541]{height:calc(100vh - 20.25rem);overflow-y:auto}.my-order .order-list .order-item[data-v-49a45541]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-49a45541]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-49a45541]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-49a45541]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-49a45541]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-49a45541]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-49a45541]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-49a45541]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -.0625rem .625rem #eee}.my-order .order-footer .order-total[data-v-49a45541]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-49a45541]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-49a45541]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-49a45541]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-49a45541]{border-radius:3rem;font-size:1rem}.my-order .order-footer .order-btn[data-v-49a45541]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-49a45541]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-d44598fa]{height:100%;box-sizing:border-box;position:relative;overflow:hidden}.my-order .header-nav[data-v-d44598fa]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-d44598fa]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-d44598fa]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-d44598fa]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-d44598fa] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-d44598fa]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-d44598fa]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-d44598fa]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-d44598fa]{height:calc(100vh - 9.75rem);width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1rem}.my-order .shop-list .shop-item[data-v-d44598fa]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-d44598fa]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-d44598fa]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-d44598fa]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-d44598fa]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item[data-v-d44598fa]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-d44598fa]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-d44598fa]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-d44598fa]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-52f45b9b]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-52f45b9b]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-52f45b9b]{display:flex}.shop .shop-info .shop-info-left[data-v-52f45b9b]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-52f45b9b]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-52f45b9b]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-52f45b9b]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-52f45b9b]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-52f45b9b]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-52f45b9b]{min-height:20rem}.shop .shop-sku .title[data-v-52f45b9b]{font-size:1.1rem;font-weight:700;padding:1rem 0 .5rem}.shop .shop-sku .sku .sku-item[data-v-52f45b9b]{cursor:pointer;padding:.5rem 1rem;background-color:#f5f5f5;border-radius:3rem}.shop .shop-sku .sku .sku-item_active[data-v-52f45b9b]{background-color:#1890ff;color:#fff}.my-card{display:flex}::-webkit-scrollbar{width:.3125rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.3125rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/index-DXOp6UXZ.js b/dist/assets/index-DXOp6UXZ.js new file mode 100644 index 0000000..a1f8d51 --- /dev/null +++ b/dist/assets/index-DXOp6UXZ.js @@ -0,0 +1 @@ +import{o as r,d as o}from"./detail-SSwoB7VG.js";import{p as t}from"./padding-DTyMU7Be.js";import{c as a,h as s,f as e}from"./index-3-t8Fk7s.js";import"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import"./moment-Cl4UOzQZ.js";import"./pay-Bt7FIL7i.js";const i={class:"my-card"},h={__name:"index",setup(c){return(d,l)=>(a(),s("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{h as default}; diff --git a/dist/assets/index-Do69Dp-3.js b/dist/assets/index-Do69Dp-3.js new file mode 100644 index 0000000..756dbe1 --- /dev/null +++ b/dist/assets/index-Do69Dp-3.js @@ -0,0 +1 @@ +import{c as re,a as ue,b as ee,d as de,o as _e}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{_ as T,r,o as G,m as F,a as K,b as g,c as m,d as J,w as V,e,f as _,g as P,t as I,n as X,E as W,u as se,h as w,F as B,i as j,j as oe,k as ve,l as Q,p as N,q as ae,s as q,v as le,x as ne,y as pe,z as fe}from"./index-3-t8Fk7s.js";import{_ as me}from"./lodash-BiR1SJeZ.js";import{p as te}from"./padding-DTyMU7Be.js";import{g as he,m as ge,a as ye}from"./shop-C3GBYBKO.js";import{p as ke}from"./pay-Bt7FIL7i.js";const $e={class:"price"},be={class:"flex"},we={style:{margin:"0.625rem","padding-bottom":"40px"}},Ce={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Pe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(A,{expose:x,emit:C}){const o=r(!1),u=r(null),t=r(0),d=(c=!0,i=0)=>{n.value.nowPrice="",n.value.percentage="",o.value=c,t.value=i,X(()=>{setTimeout(()=>{var $;($=u.value)==null||$.focus()},150)})},n=r({nowPrice:"",percentage:""}),h=c=>{n.value.percentage=(c/t.value*100).toFixed(2)},k=c=>{n.value.nowPrice=(t.value*c/100).toFixed(2)},p=C,v=()=>{if(n.value.percentage>100)return n.value.nowPrice="",n.value.percentage="",W.error("改价金额不能大于当前订单金额");if(n.value.nowPrice<=0)return n.value.nowPrice="",n.value.percentage="",W.error("金额不能小于0");p("changeAllPrice",n.value.nowPrice)};x({show:d,dialogVisible:o});const b=()=>{o.value&&v()};return G(()=>{F.on("enter",b)}),K(()=>{F.off("enter",b)}),(c,i)=>{const $=g("el-input"),E=g("el-button"),f=g("el-dialog");return m(),J(f,{modelValue:o.value,"onUpdate:modelValue":i[2]||(i[2]=y=>o.value=y),title:"订单改价",width:"650"},{footer:V(()=>[e("div",Pe,[_(E,{class:"ok-btn",type:"primary",onClick:v},{default:V(()=>[P(" 确定 (Enter) ")]),_:1})])]),default:V(()=>[e("div",$e,[e("div",be,[_($,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.nowPrice,"onUpdate:modelValue":i[0]||(i[0]=y=>n.value.nowPrice=y),type:"number",placeholder:"请输入改价后的价格",onInput:h},{suffix:V(()=>[P("元")]),_:1},8,["modelValue"]),_($,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.percentage,"onUpdate:modelValue":i[1]||(i[1]=y=>n.value.percentage=y),type:"number",placeholder:"请输入比例",onInput:k},{suffix:V(()=>[P("%")]),_:1},8,["modelValue"])]),e("div",we,[P(" 改价后金额: "),e("span",Ce,"¥"+I(n.value.nowPrice||t.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ve=T(Ie,[["__scopeId","data-v-924edcc0"]]),Ae={class:"my-order"},Le={class:"header-nav"},Se={class:"nav-item"},Fe={class:"order-list"},xe={class:"order-item-info"},Re={class:"order-item-title"},Ee={class:"title"},Me=["onClick"],De={class:"order-item-sku"},ze=["onClick"],Oe={class:"order-item-price"},Ue={class:"order-footer"},qe={class:"order-total"},Ne={class:"price"},Be={class:"total-item"},je={style:{"font-size":"1.4rem"}},Te={class:"total-item"},Ge={class:"order-btn"},Ke={__name:"order",emits:["goPay","editAttr"],setup(A,{expose:x,emit:C}){const o=r([]),u=r(0),t=r(0),d=r(0),n=se(),h=()=>{let s=[];o.value.map(l=>{s.push(l.cart_id)}),s.length!=0&&p(s)},k=s=>{o.value=o.value.filter(l=>l.cart_id!=s),p([s])},p=s=>{re({cart_id:s}).then(l=>{console.log(l),v()})},v=()=>{u.value=0,t.value=0,d.value=0,ue({staff_id:n.userInfo.service.service_id,sale_type:2}).then(s=>{var l,S;((S=(l=s.data)==null?void 0:l.list)==null?void 0:S.length)>0?(o.value=s.data.list[0].list,o.value.forEach(R=>{u.value+=R.productAttr.price*R.cart_num}),t.value=u.value):o.value=[]})};v();const b=C,c=()=>{b("goPay")},i=(s,l)=>{ee(s.cart_id,{cart_num:s.cart_num}).then(S=>{u.value=0,o.value.forEach(R=>{u.value+=R.productAttr.price*R.cart_num}),t.value=u.value})},$=s=>{b("editPupop",s)},E=(s,l)=>{ee(s,l).then(S=>{v()})},f=s=>{d.value=t.value-s,u.value=+s,X(()=>{setTimeout(()=>{L(!1)},150)})};r(0);const y=r(null),L=(s=!0)=>{y.value.show(s,t.value)};x({getList:v,list:o,editItem:E,discounts:d,allPrice:u});const O=()=>{y.value.dialogVisible?y.value.dialogVisible=!1:L()},a=()=>{o.value.length>0&&h()};return G(()=>{F.on("insert",O),F.on("delete",a)}),K(()=>{F.off("insert",O),F.off("delete",a)}),(s,l)=>{const S=g("Delete"),R=g("el-icon"),U=g("el-empty"),M=g("el-image"),D=g("ArrowDown"),Z=g("el-input-number"),ce=g("el-button");return m(),w("div",Ae,[e("div",Le,[e("div",Se,[P(" 已选购 "),e("span",null,I(o.value.length),1),P(" 件 ")]),e("div",{class:"nav-item-clear",onClick:h},[_(R,null,{default:V(()=>[_(S)]),_:1}),P("清空 (Delete) ")])]),e("div",Fe,[o.value.length==0?(m(),J(U,{key:0,description:"请点击右侧添加商品"})):(m(!0),w(B,{key:1},j(o.value,(z,ie)=>(m(),w("div",{class:"order-item",key:ie},[_(M,{loading:"lazy",class:"order-item-img",src:z.productAttr&&z.productAttr.image||z.product.image},null,8,["src"]),e("div",xe,[e("div",Re,[e("div",Ee,I(z.spu.store_name),1),e("div",{class:"delete",onClick:H=>k(z.cart_id)},"删除",8,Me)]),e("div",De,[e("span",{style:{display:"flex","align-items":"center"},onClick:H=>$(z)},[P("商品规格: "+I(z.productAttr.sku||"默认规格"),1),_(R,{size:"16",style:{"margin-left":"0.2rem"}},{default:V(()=>[_(D)]),_:1})],8,ze)]),e("div",Oe,[e("div",null,[P(" ¥"),e("span",null,I(z.productAttr.price),1)]),e("div",null,[_(Z,{modelValue:z.cart_num,"onUpdate:modelValue":H=>z.cart_num=H,"step-strictly":"",min:1,step:1,onChange:H=>i(z)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Ue,[e("div",qe,[e("div",Ne,[e("div",Be,[P(" 实付: "),e("span",null,[P("¥"),e("span",je,I(u.value.toFixed(2)),1)])]),e("div",Te,[P(" 优惠: "),e("span",null,[P("¥"),e("span",null,I(d.value.toFixed(2)),1)])])])]),e("div",Ge,[_(ce,{class:"btn",type:"primary",onClick:c,disabled:o.value.length==0},{default:V(()=>[P("立即结账 (F9)")]),_:1},8,["disabled"])])]),_(Ve,{ref_key:"priceRef",ref:y,onChangeAllPrice:f},null,512)])}}},Je=T(Ke,[["__scopeId","data-v-c5266ed8"]]),Y=A=>(le("data-v-41370656"),A=A(),ne(),A),He={class:"my-order"},Qe=Y(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},st=Y(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),ot=[st],at={key:1,class:"no-stock"},lt=Y(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],ct={key:1,class:"no-data"},it={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(A,{expose:x,emit:C}){const o=r(null),u=C,t=r(""),d=()=>{u("loadMore",{bar_code:t.value})},n=c=>{if(c.is_used==0)return W.error("该商品已被平台关闭");if(c.stock==0)return W.warning("该商品无库存");u("changeItem",c)},h=me.throttle(()=>{u("getStoreList",{bar_code:t.value},!0)},300);x({bar_code:t});const k=r(!1),p=()=>{k.value=!0},v=()=>{k.value=!1},b=()=>{var c;(c=o.value)==null||c.focus()};return G(()=>{X(()=>{var c;(c=o.value)==null||c.focus(),p()}),F.on("shift",b)}),K(()=>{F.off("shift",b)}),(c,i)=>{const $=g("el-input"),E=g("Search"),f=g("el-icon"),y=g("el-button"),L=g("el-image"),O=g("el-space"),a=g("el-empty"),s=oe("infinite-scroll");return m(),w("div",He,[e("div",{class:N(["header-nav",{"input-focus":k.value}])},[Qe,e("div",We,[_($,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=l=>t.value=l),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:o,onFocus:p,onBlur:v,onKeyup:ve(Q(h),["enter"]),onClear:Q(h)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:i[1]||(i[1]=(...l)=>Q(h)&&Q(h)(...l))},[_(y,{class:"btn",type:"primary"},{default:V(()=>[_(f,null,{default:V(()=>[_(E)]),_:1})]),_:1})])],2),ae((m(),w("div",Xe,[A.storeList.length?(m(),J(O,{key:0,wrap:""},{default:V(()=>[(m(!0),w(B,null,j(A.storeList,(l,S)=>(m(),w("div",{class:"shop-item",key:S,onClick:R=>n(l)},[_(L,{loading:"lazy",src:l.image},null,8,["src"]),e("div",Ze,I(l.store_name),1),e("div",et,[P(" ¥"),e("span",null,I(l.price),1)]),l.stock==0?(m(),w("div",tt,ot)):q("",!0),l.is_used==0?(m(),w("div",at,nt)):q("",!0)],8,Ye))),128))]),_:1})):q("",!0),A.storeList.length?q("",!0):(m(),w("div",ct,[_(a,{"image-size":200,description:"没有找到对应商品"})]))])),[[s,d]])])}}},rt=T(it,[["__scopeId","data-v-41370656"]]),ut=A=>(le("data-v-29f08ea1"),A=A(),ne(),A),dt={class:"shop"},_t={key:0,class:"shop-info"},vt={class:"shop-info-left"},pt={class:"shop-info-right"},ft={class:"shop-info-right-top"},mt={class:"shop-info-right-center"},ht={class:"shop-info-right-price"},gt={class:"shop-sku"},yt=ut(()=>e("div",{class:"title"},"产品",-1)),kt={class:"sku"},$t=["onClick"],bt={class:"dialog-footer"},wt={__name:"pupop",emits:["changeItem"],setup(A,{expose:x,emit:C}){const o=r(!1),u=f=>{o.value=f},t=r({}),d=r(null),n=r(!1),h=r("add"),k=r({}),p=(f,y="add")=>{h.value=y,y=="add"?(t.value=f,d.value=f.attr[0]):(n.value=!0,k.value=f,he(f.product_id).then(L=>{L.data.attrValue=JSON.parse(JSON.stringify(L.data.attr)),L.data.attr=Object.keys(L.data.sku),t.value=L.data,d.value=L.data.attr[0],n.value=!1}).catch(L=>{n.value=!1}))},v=C,b=()=>{h.value=="add"?v("changeItem",t.value,d.value):v("editItem",k.value.cart_id,{cart_num:k.value.cart_num,product_attr_unique:t.value.sku[d.value].unique}),o.value=!1},c=f=>{d.value=f};x({show:u,setForm:p});const i=()=>{if(!o.value)return;let f=t.value.attr.indexOf(d.value);if(f>0)return c(t.value.attr[f-1])},$=()=>{if(!o.value)return;let f=t.value.attr.indexOf(d.value);if(f{o.value&&b()};return G(()=>{F.on("left",i),F.on("right",$),F.on("enter",E)}),K(()=>{F.off("left",i),F.off("right",$),F.off("enter",E)}),(f,y)=>{const L=g("el-image"),O=g("el-space"),a=g("el-button"),s=g("el-dialog"),l=oe("loading");return m(),J(s,{modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=S=>o.value=S),title:"商品规格",width:"650"},pe({default:V(()=>{var S,R,U;return[ae((m(),w("div",dt,[t.value.sku?(m(),w("div",_t,[e("div",vt,[_(L,{loading:"lazy",src:((S=t.value.sku[d.value])==null?void 0:S.image)||t.value.image},null,8,["src"])]),e("div",pt,[e("div",ft,I(t.value.store_name),1),e("div",mt,"库存"+I(((R=t.value.sku[d.value])==null?void 0:R.stock)||0),1),e("div",ht,[P("¥"),e("span",null,I(((U=t.value.sku[d.value])==null?void 0:U.price)||t.value.price),1)])])])):q("",!0),e("div",gt,[yt,e("div",kt,[_(O,{wrap:"",size:20},{default:V(()=>[(m(!0),w(B,null,j(t.value.attr,(M,D)=>(m(),w("div",{class:N(["sku-item",{"sku-item_active":d.value==M}]),onClick:Z=>c(M),key:D},I(M||"默认规格"),11,$t))),128))]),_:1})])])])),[[l,n.value]])]}),_:2},[h.value!="add"&&t.value.attr&&t.value.attr.length==1?void 0:{name:"footer",fn:V(()=>[e("div",bt,[_(a,{class:"ok-btn",type:"primary",onClick:b},{default:V(()=>[P(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},Ct=T(wt,[["__scopeId","data-v-29f08ea1"]]),Pt=["onClick","onMousemove"],It=["onMousemove"],Vt={class:"title"},At={class:"list"},Lt=["onClick"],St={__name:"classify",emits:["getStoreList"],setup(A,{emit:x}){const C=x,o=r([]),u=r(-1),t=r(-1),d=r(-1),n=r(!1);(()=>{ge(259).then(p=>{o.value=p.data,u.value=-1})})();const k=(p=-1,v=-1)=>{d.value=p,u.value=p,t.value=v,console.log(p,v),n.value=!0;let b="";p>=0&&v>=0?b=o.value[p].children[v].store_category_id:p>=0&&(b=o.value[p].store_category_id),C("getStoreList",{mer_cate_id:b},!0)};return(p,v)=>{const b=g("el-popover");return m(),w("div",{class:"classify",onMouseout:v[2]||(v[2]=c=>n.value?n.value=!1:n.value=!0)},[e("div",{class:N(["itemP",{"itemP-active":u.value==-1}]),onClick:v[0]||(v[0]=c=>k(-1))},I("全部"),2),(m(!0),w(B,null,j(o.value,(c,i)=>(m(),J(b,{placement:"left",width:"20rem",trigger:"click",key:i,visible:i==u.value&&d.value==i},{reference:V(()=>[e("div",{class:N(["itemP",{"itemP-active":i==u.value}]),onClick:$=>k(i),onMousemove:$=>d.value=i},I(c.cate_name),43,Pt)]),default:V(()=>[e("div",{class:"active-card",onMouseout:v[1]||(v[1]=$=>d.value=-1),onMousemove:$=>d.value=i},[e("div",Vt,I(c.cate_name),1),e("div",At,[(m(!0),w(B,null,j(c.children,($,E)=>(m(),w("div",{class:N({"list-active":E==t.value}),link:"",type:"primary",key:E,onClick:f=>k(i,E)},I($.cate_name),11,Lt))),128))])],40,It)]),_:2},1032,["visible"]))),128))],32)}}},Ft=T(St,[["__scopeId","data-v-4630842b"]]),xt={class:"my-card"},Ut={__name:"index",setup(A){const x=r(null),C=r(null),o=r(null),u=r(null),t=r([]),d=se(),n=fe(),h=r({page:1,limit:30}),k=(a={},s=!1)=>{h.value={staff_id:d.userInfo.service.service_id,sale_type:2,mer_type:1,...h.value,...a},s&&(t.value=[],h.value.page=1,p.value=!1),ye(h.value).then(l=>{var R,U;((U=(R=l.data)==null?void 0:R.list)==null?void 0:U.length)(Object.keys(M.sku).forEach(D=>{M.sku[D].wholesale_price&&(M.sku[D].price=M.sku[D].wholesale_price)}),M.attrValue.forEach(D=>{D.wholesale_price&&(D.price=D.wholesale_price)}),M.attr=Object.keys(M.sku),M));t.value=t.value.concat(S),a.bar_code&&t.value.length==1&&b(a.bar_code)&&(o.value.bar_code="",i(t.value[0],t.value[0].attr[0])),h.value.page++})},p=r(!1),v=a=>{p.value||k(a)};function b(a){return/^\d+$/.test(a)}const c=(a,s="")=>{let l={is_new:0,product_id:a.product_id,cart_num:1,product_attr_unique:a.sku[s]!==void 0?a.sku[s].unique:"",staff_id:d.userInfo.service.service_id,product_type:0,sale_type:2};de(l).then(S=>{C.value.getList()})},i=(a,s)=>{if(!a.attr||a.attr.length==0||a.attr.length==1)return c(a,a.attr[0]?a.attr[0]:"");if(s)return c(a,s);x.value.setForm(a,"add"),x.value.show(!0)},$=(a,s)=>{C.value.editItem(a,s)},E=a=>{x.value.setForm(a,"edit"),x.value.show(!0)},f=()=>{let a=C.value.list.map(l=>l.cart_id),s={takes:[],use_coupon:{},use_integral:!1,cart_id:a};C.value.discounts>0&&(s.deduction_price=C.value.discounts.toFixed(2),s.pay_type="micropay"),_e(s).then(l=>{u.value.setForm({data:l.data,cart_id:a})})},y=()=>{f(),u.value.drawer=!0},L=()=>{C.value.getList()},O=()=>{n.name=="saleHome"&&(!u.value.drawer&&C.value.list.length>0?y():u.value.beforeClose())};return G(()=>{k(),h.value.page++,F.on("F9",O)}),K(()=>{F.off("F9",O)}),(a,s)=>(m(),w("div",xt,[_(Je,{ref_key:"orderRef",ref:C,onGoPay:y,onEditPupop:E},null,512),_(te),_(rt,{ref_key:"shopRef",ref:o,style:{flex:"1"},storeList:t.value,onGetStoreList:k,onChangeItem:i,onLoadMore:v},null,8,["storeList"]),_(Ct,{ref_key:"pupopRef",ref:x,onChangeItem:i,onEditItem:$},null,512),_(te),_(Ft,{ref:"classifyRef",onGetStoreList:k},null,512),_(ke,{ref_key:"payRef",ref:u,onPaySuccess:L},null,512)]))}};export{Ut as default}; diff --git a/dist/assets/index-DqG3Pl6p.js b/dist/assets/index-DqG3Pl6p.js deleted file mode 100644 index 5a75d07..0000000 --- a/dist/assets/index-DqG3Pl6p.js +++ /dev/null @@ -1 +0,0 @@ -import{c as ie,a as ue,b as ee,d as de,o as _e}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js";import{_ as j,r,o as T,m as S,a as G,b as y,c as h,d as Q,w as V,e,f as d,g as P,t as I,n as X,E as H,u as se,h as C,F as N,i as B,j as oe,k as ve,l as J,p as q,q as ae,s as W,v as le,x as ne,y as pe,z as fe}from"./index-Db3iIaOe.js";import{_ as me}from"./lodash-BgJbRuYL.js";import{p as te}from"./padding-Ch9Ano5D.js";import{g as he,m as ge,a as ye}from"./shop-BJxq9Fz-.js";import{p as ke}from"./pay-CEmj54N0.js";const $e={class:"price"},be={class:"flex"},we={style:{margin:"0.625rem","padding-bottom":"40px"}},Ce={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Pe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(x,{expose:L,emit:w}){const o=r(!1),i=r(null),s=r(0),u=(n=!0,c=0)=>{l.value.nowPrice="",l.value.percentage="",o.value=n,s.value=c,X(()=>{setTimeout(()=>{var $;($=i.value)==null||$.focus()},150)})},l=r({nowPrice:"",percentage:""}),m=n=>{l.value.percentage=(n/s.value*100).toFixed(2)},k=n=>{l.value.nowPrice=(s.value*n/100).toFixed(2)},p=w,_=()=>{if(l.value.percentage>100)return l.value.nowPrice="",l.value.percentage="",H.error("改价金额不能大于当前订单金额");if(l.value.nowPrice<=0)return l.value.nowPrice="",l.value.percentage="",H.error("金额不能小于0");p("changeAllPrice",l.value.nowPrice)};L({show:u,dialogVisible:o});const b=()=>{o.value&&_()};return T(()=>{S.on("enter",b)}),G(()=>{S.off("enter",b)}),(n,c)=>{const $=y("el-input"),R=y("el-button"),f=y("el-dialog");return h(),Q(f,{modelValue:o.value,"onUpdate:modelValue":c[2]||(c[2]=g=>o.value=g),title:"订单改价",width:"650"},{footer:V(()=>[e("div",Pe,[d(R,{class:"ok-btn",type:"primary",onClick:_},{default:V(()=>[P(" 确定 (Enter) ")]),_:1})])]),default:V(()=>[e("div",$e,[e("div",be,[d($,{ref_key:"priceRef",ref:i,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:l.value.nowPrice,"onUpdate:modelValue":c[0]||(c[0]=g=>l.value.nowPrice=g),type:"number",placeholder:"请输入改价后的价格",onInput:m},{suffix:V(()=>[P("元")]),_:1},8,["modelValue"]),d($,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:l.value.percentage,"onUpdate:modelValue":c[1]||(c[1]=g=>l.value.percentage=g),type:"number",placeholder:"请输入比例",onInput:k},{suffix:V(()=>[P("%")]),_:1},8,["modelValue"])]),e("div",we,[P(" 改价后金额: "),e("span",Ce,"¥"+I(l.value.nowPrice||s.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ve=j(Ie,[["__scopeId","data-v-924edcc0"]]),Ae={class:"my-order"},Se={class:"header-nav"},Le={class:"nav-item"},Fe={class:"order-list"},xe={class:"order-item-info"},Re={class:"order-item-title"},Ee={class:"title"},Me=["onClick"],De={class:"order-item-sku"},Oe=["onClick"],Ue={class:"order-item-price"},ze={class:"order-footer"},qe={class:"order-total"},Ne={class:"price"},Be={class:"total-item"},je={style:{"font-size":"1.4rem"}},Te={class:"total-item"},Ge={class:"order-btn"},Ke={__name:"order",emits:["goPay","editAttr"],setup(x,{expose:L,emit:w}){const o=r([]),i=r(0),s=r(0),u=r(0),l=se(),m=()=>{let t=[];o.value.map(v=>{t.push(v.cart_id)}),t.length!=0&&p(t)},k=t=>{o.value=o.value.filter(v=>v.cart_id!=t),p([t])},p=t=>{ie({cart_id:t}).then(v=>{console.log(v),_()})},_=()=>{i.value=0,s.value=0,u.value=0,ue({staff_id:l.userInfo.service.service_id,sale_type:2}).then(t=>{var v,F;((F=(v=t.data)==null?void 0:v.list)==null?void 0:F.length)>0?(o.value=t.data.list[0].list,o.value.forEach(E=>{i.value+=E.productAttr.price*E.cart_num}),s.value=i.value):o.value=[]})};_();const b=w,n=()=>{b("goPay")},c=(t,v)=>{ee(t.cart_id,{cart_num:t.cart_num}).then(F=>{i.value=0,o.value.forEach(E=>{i.value+=E.productAttr.price*E.cart_num}),s.value=i.value})},$=t=>{b("editPupop",t)},R=(t,v)=>{ee(t,v).then(F=>{_()})},f=t=>{u.value=s.value-t,i.value=+t,X(()=>{setTimeout(()=>{A(!1)},150)})};r(0);const g=r(null),A=(t=!0)=>{g.value.show(t,s.value)};L({getList:_,list:o,editItem:R,discounts:u,allPrice:i});const U=()=>{g.value.dialogVisible?g.value.dialogVisible=!1:A()},a=()=>{o.value.length>0&&m()};return T(()=>{S.on("insert",U),S.on("delete",a)}),G(()=>{S.off("insert",U),S.off("delete",a)}),(t,v)=>{const F=y("Delete"),E=y("el-icon"),z=y("el-empty"),M=y("el-image"),D=y("ArrowDown"),Z=y("el-input-number"),ce=y("el-button");return h(),C("div",Ae,[e("div",Se,[e("div",Le,[P(" 已选购 "),e("span",null,I(o.value.length),1),P(" 件 ")]),e("div",{class:"nav-item-clear",onClick:m},[d(E,null,{default:V(()=>[d(F)]),_:1}),P("清空 (Delete) ")])]),e("div",Fe,[o.value.length==0?(h(),Q(z,{key:0,description:"请点击右侧添加商品"})):(h(!0),C(N,{key:1},B(o.value,(O,re)=>(h(),C("div",{class:"order-item",key:re},[d(M,{loading:"lazy",class:"order-item-img",src:O.productAttr&&O.productAttr.image||O.product.image},null,8,["src"]),e("div",xe,[e("div",Re,[e("div",Ee,I(O.spu.store_name),1),e("div",{class:"delete",onClick:K=>k(O.cart_id)},"删除",8,Me)]),e("div",De,[e("span",{style:{display:"flex","align-items":"center"},onClick:K=>$(O)},[P("商品规格: "+I(O.productAttr.sku||"默认规格"),1),d(E,{size:"16",style:{"margin-left":"0.2rem"}},{default:V(()=>[d(D)]),_:1})],8,Oe)]),e("div",Ue,[e("div",null,[P(" ¥"),e("span",null,I(O.productAttr.price),1)]),e("div",null,[d(Z,{modelValue:O.cart_num,"onUpdate:modelValue":K=>O.cart_num=K,"step-strictly":"",min:1,step:1,onChange:K=>c(O)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",ze,[e("div",qe,[e("div",Ne,[e("div",Be,[P(" 实付: "),e("span",null,[P("¥"),e("span",je,I(i.value.toFixed(2)),1)])]),e("div",Te,[P(" 优惠: "),e("span",null,[P("¥"),e("span",null,I(u.value.toFixed(2)),1)])])])]),e("div",Ge,[d(ce,{class:"btn",type:"primary",onClick:n,disabled:o.value.length==0},{default:V(()=>[P("立即结账 (F9)")]),_:1},8,["disabled"])])]),d(Ve,{ref_key:"priceRef",ref:g,onChangeAllPrice:f},null,512)])}}},Je=j(Ke,[["__scopeId","data-v-c5266ed8"]]),Y=x=>(le("data-v-5ddbb518"),x=x(),ne(),x),He={class:"my-order"},Qe=Y(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},st=Y(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),ot=[st],at={key:1,class:"no-stock"},lt=Y(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],ct={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(x,{expose:L,emit:w}){const o=r(null),i=w,s=r(""),u=()=>{i("loadMore",{bar_code:s.value})},l=n=>{if(n.is_used==0)return H.error("该商品已被平台关闭");if(n.stock==0)return H.warning("该商品无库存");i("changeItem",n)},m=me.throttle(()=>{i("getStoreList",{bar_code:s.value},!0)},300);L({bar_code:s});const k=r(!1),p=()=>{k.value=!0},_=()=>{k.value=!1},b=()=>{var n;(n=o.value)==null||n.focus()};return T(()=>{X(()=>{var n;(n=o.value)==null||n.focus(),p()}),S.on("shift",b)}),G(()=>{S.off("shift",b)}),(n,c)=>{const $=y("el-input"),R=y("Search"),f=y("el-icon"),g=y("el-button"),A=y("el-image"),U=y("el-space"),a=oe("infinite-scroll");return h(),C("div",He,[e("div",{class:q(["header-nav",{"input-focus":k.value}])},[Qe,e("div",We,[d($,{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=t=>s.value=t),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:o,onFocus:p,onBlur:_,onKeyup:ve(J(m),["enter"]),onClear:J(m)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:c[1]||(c[1]=(...t)=>J(m)&&J(m)(...t))},[d(g,{class:"btn",type:"primary"},{default:V(()=>[d(f,null,{default:V(()=>[d(R)]),_:1})]),_:1})])],2),ae((h(),C("div",Xe,[d(U,{wrap:""},{default:V(()=>[(h(!0),C(N,null,B(x.storeList,(t,v)=>(h(),C("div",{class:"shop-item",key:v,onClick:F=>l(t)},[d(A,{loading:"lazy",src:t.image},null,8,["src"]),e("div",Ze,I(t.store_name),1),e("div",et,[P(" ¥"),e("span",null,I(t.price),1)]),t.stock==0?(h(),C("div",tt,ot)):W("",!0),t.is_used==0?(h(),C("div",at,nt)):W("",!0)],8,Ye))),128))]),_:1})])),[[a,u]])])}}},rt=j(ct,[["__scopeId","data-v-5ddbb518"]]),it=x=>(le("data-v-29f08ea1"),x=x(),ne(),x),ut={class:"shop"},dt={key:0,class:"shop-info"},_t={class:"shop-info-left"},vt={class:"shop-info-right"},pt={class:"shop-info-right-top"},ft={class:"shop-info-right-center"},mt={class:"shop-info-right-price"},ht={class:"shop-sku"},gt=it(()=>e("div",{class:"title"},"产品",-1)),yt={class:"sku"},kt=["onClick"],$t={class:"dialog-footer"},bt={__name:"pupop",emits:["changeItem"],setup(x,{expose:L,emit:w}){const o=r(!1),i=f=>{o.value=f},s=r({}),u=r(null),l=r(!1),m=r("add"),k=r({}),p=(f,g="add")=>{m.value=g,g=="add"?(s.value=f,u.value=f.attr[0]):(l.value=!0,k.value=f,he(f.product_id).then(A=>{A.data.attrValue=JSON.parse(JSON.stringify(A.data.attr)),A.data.attr=Object.keys(A.data.sku),s.value=A.data,u.value=A.data.attr[0],l.value=!1}).catch(A=>{l.value=!1}))},_=w,b=()=>{m.value=="add"?_("changeItem",s.value,u.value):_("editItem",k.value.cart_id,{cart_num:k.value.cart_num,product_attr_unique:s.value.sku[u.value].unique}),o.value=!1},n=f=>{u.value=f};L({show:i,setForm:p});const c=()=>{if(!o.value)return;let f=s.value.attr.indexOf(u.value);if(f>0)return n(s.value.attr[f-1])},$=()=>{if(!o.value)return;let f=s.value.attr.indexOf(u.value);if(f{o.value&&b()};return T(()=>{S.on("left",c),S.on("right",$),S.on("enter",R)}),G(()=>{S.off("left",c),S.off("right",$),S.off("enter",R)}),(f,g)=>{const A=y("el-image"),U=y("el-space"),a=y("el-button"),t=y("el-dialog"),v=oe("loading");return h(),Q(t,{modelValue:o.value,"onUpdate:modelValue":g[0]||(g[0]=F=>o.value=F),title:"商品规格",width:"650"},pe({default:V(()=>{var F,E,z;return[ae((h(),C("div",ut,[s.value.sku?(h(),C("div",dt,[e("div",_t,[d(A,{loading:"lazy",src:((F=s.value.sku[u.value])==null?void 0:F.image)||s.value.image},null,8,["src"])]),e("div",vt,[e("div",pt,I(s.value.store_name),1),e("div",ft,"库存"+I(((E=s.value.sku[u.value])==null?void 0:E.stock)||0),1),e("div",mt,[P("¥"),e("span",null,I(((z=s.value.sku[u.value])==null?void 0:z.price)||s.value.price),1)])])])):W("",!0),e("div",ht,[gt,e("div",yt,[d(U,{wrap:"",size:20},{default:V(()=>[(h(!0),C(N,null,B(s.value.attr,(M,D)=>(h(),C("div",{class:q(["sku-item",{"sku-item_active":u.value==M}]),onClick:Z=>n(M),key:D},I(M||"默认规格"),11,kt))),128))]),_:1})])])])),[[v,l.value]])]}),_:2},[m.value!="add"&&s.value.attr&&s.value.attr.length==1?void 0:{name:"footer",fn:V(()=>[e("div",$t,[d(a,{class:"ok-btn",type:"primary",onClick:b},{default:V(()=>[P(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},wt=j(bt,[["__scopeId","data-v-29f08ea1"]]),Ct=["onClick","onMousemove"],Pt=["onMousemove"],It={class:"title"},Vt={class:"list"},At=["onClick"],St={__name:"classify",emits:["getStoreList"],setup(x,{emit:L}){const w=L,o=r([]),i=r(-1),s=r(-1),u=r(-1),l=r(!1);(()=>{ge(259).then(p=>{o.value=p.data,i.value=-1})})();const k=(p=-1,_=-1)=>{u.value=p,i.value=p,s.value=_,console.log(p,_),l.value=!0;let b="";p>=0&&_>=0?b=o.value[p].children[_].store_category_id:p>=0&&(b=o.value[p].store_category_id),w("getStoreList",{mer_cate_id:b},!0)};return(p,_)=>{const b=y("el-popover");return h(),C("div",{class:"classify",onMouseout:_[2]||(_[2]=n=>l.value?l.value=!1:l.value=!0)},[e("div",{class:q(["itemP",{"itemP-active":i.value==-1}]),onClick:_[0]||(_[0]=n=>k(-1))},I("全部"),2),(h(!0),C(N,null,B(o.value,(n,c)=>(h(),Q(b,{placement:"left",width:"20rem",trigger:"click",key:c,visible:c==i.value&&u.value==c},{reference:V(()=>[e("div",{class:q(["itemP",{"itemP-active":c==i.value}]),onClick:$=>k(c),onMousemove:$=>u.value=c},I(n.cate_name),43,Ct)]),default:V(()=>[e("div",{class:"active-card",onMouseout:_[1]||(_[1]=$=>u.value=-1),onMousemove:$=>u.value=c},[e("div",It,I(n.cate_name),1),e("div",Vt,[(h(!0),C(N,null,B(n.children,($,R)=>(h(),C("div",{class:q({"list-active":R==s.value}),link:"",type:"primary",key:R,onClick:f=>k(c,R)},I($.cate_name),11,At))),128))])],40,Pt)]),_:2},1032,["visible"]))),128))],32)}}},Lt=j(St,[["__scopeId","data-v-4630842b"]]),Ft={class:"my-card"},Ut={__name:"index",setup(x){const L=r(null),w=r(null),o=r(null),i=r(null),s=r([]),u=se(),l=fe(),m=r({page:1,limit:30}),k=(a={},t=!1)=>{m.value={staff_id:u.userInfo.service.service_id,sale_type:2,mer_type:1,...m.value,...a},t&&(s.value=[],m.value.page=1,p.value=!1),ye(m.value).then(v=>{var E,z;((z=(E=v.data)==null?void 0:E.list)==null?void 0:z.length)(Object.keys(M.sku).forEach(D=>{M.sku[D].wholesale_price&&(M.sku[D].price=M.sku[D].wholesale_price)}),M.attrValue.forEach(D=>{D.wholesale_price&&(D.price=D.wholesale_price)}),M.attr=Object.keys(M.sku),M));s.value=s.value.concat(F),a.bar_code&&s.value.length==1&&b(a.bar_code)&&(o.value.bar_code="",c(s.value[0],s.value[0].attr[0])),m.value.page++})},p=r(!1),_=a=>{p.value||k(a)};function b(a){return/^\d+$/.test(a)}const n=(a,t="")=>{let v={is_new:0,product_id:a.product_id,cart_num:1,product_attr_unique:a.sku[t]!==void 0?a.sku[t].unique:"",staff_id:u.userInfo.service.service_id,product_type:0,sale_type:2};de(v).then(F=>{w.value.getList()})},c=(a,t)=>{if(!a.attr||a.attr.length==0||a.attr.length==1)return n(a,a.attr[0]?a.attr[0]:"");if(t)return n(a,t);L.value.setForm(a,"add"),L.value.show(!0)},$=(a,t)=>{w.value.editItem(a,t)},R=a=>{L.value.setForm(a,"edit"),L.value.show(!0)},f=()=>{let a=w.value.list.map(v=>v.cart_id),t={takes:[],use_coupon:{},use_integral:!1,cart_id:a};w.value.discounts>0&&(t.deduction_price=w.value.discounts.toFixed(2),t.pay_type="micropay"),_e(t).then(v=>{i.value.setForm({data:v.data,cart_id:a})})},g=()=>{f(),i.value.drawer=!0},A=()=>{w.value.getList()},U=()=>{l.name=="saleHome"&&(!i.value.drawer&&w.value.list.length>0?g():i.value.beforeClose())};return T(()=>{k(),m.value.page++,S.on("F9",U)}),G(()=>{S.off("F9",U)}),(a,t)=>(h(),C("div",Ft,[d(Je,{ref_key:"orderRef",ref:w,onGoPay:g,onEditPupop:R},null,512),d(te),d(rt,{ref_key:"shopRef",ref:o,style:{flex:"1"},storeList:s.value,onGetStoreList:k,onChangeItem:c,onLoadMore:_},null,8,["storeList"]),d(wt,{ref_key:"pupopRef",ref:L,onChangeItem:c,onEditItem:$},null,512),d(te),d(Lt,{ref:"classifyRef",onGetStoreList:k},null,512),d(ke,{ref_key:"payRef",ref:i,onPaySuccess:A},null,512)]))}};export{Ut as default}; diff --git a/dist/assets/index-Ekaohlhc.js b/dist/assets/index-Ekaohlhc.js deleted file mode 100644 index 3e38827..0000000 --- a/dist/assets/index-Ekaohlhc.js +++ /dev/null @@ -1 +0,0 @@ -import{o as r,d as o}from"./detail-CNaDiLm4.js";import{p as t}from"./padding-Ch9Ano5D.js";import{c as a,h as s,f as e}from"./index-Db3iIaOe.js";import"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js";import"./moment-Cl4UOzQZ.js";import"./pay-CEmj54N0.js";const i={class:"my-card"},h={__name:"index",setup(c){return(d,l)=>(a(),s("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{h as default}; diff --git a/dist/assets/index-wJI7wNCe.js b/dist/assets/index-RLZYGyTj.js similarity index 84% rename from dist/assets/index-wJI7wNCe.js rename to dist/assets/index-RLZYGyTj.js index 4193f2b..3adf4fa 100644 --- a/dist/assets/index-wJI7wNCe.js +++ b/dist/assets/index-RLZYGyTj.js @@ -1 +1 @@ -import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-Db3iIaOe.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-3-t8Fk7s.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-qYqZx8N-.js b/dist/assets/index-qYqZx8N-.js deleted file mode 100644 index 443d2f7..0000000 --- a/dist/assets/index-qYqZx8N-.js +++ /dev/null @@ -1 +0,0 @@ -import{c as ie,a as re,b as ee,d as ue,o as de}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js";import{_ as j,r as i,o as q,m as b,a as M,b as m,c as y,d as J,w as $,e,f as c,g as h,t as R,n as H,E as T,u as te,h as V,F as Q,i as W,j as oe,k as _e,l as B,p as se,q as ae,s as G,v as le,x as ne,y as pe,z as ve}from"./index-Db3iIaOe.js";import{_ as fe}from"./lodash-BgJbRuYL.js";import{p as me}from"./padding-Ch9Ano5D.js";import{g as he,s as ge}from"./shop-BJxq9Fz-.js";import{p as ye}from"./pay-CEmj54N0.js";const ke={class:"price"},be={class:"flex"},$e={style:{margin:"0.625rem","padding-bottom":"40px"}},we={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},xe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(A,{expose:S,emit:k}){const a=i(!1),u=i(null),o=i(0),d=(n=!0,p=0)=>{l.value.nowPrice="",l.value.percentage="",a.value=n,o.value=p,H(()=>{setTimeout(()=>{var C;(C=u.value)==null||C.focus()},150)})},l=i({nowPrice:"",percentage:""}),v=n=>{l.value.percentage=(n/o.value*100).toFixed(2)},w=n=>{l.value.nowPrice=(o.value*n/100).toFixed(2)},F=k,I=()=>{if(l.value.percentage>100)return l.value.nowPrice="",l.value.percentage="",T.error("改价金额不能大于当前订单金额");if(l.value.nowPrice<=0)return l.value.nowPrice="",l.value.percentage="",T.error("金额不能小于0");F("changeAllPrice",l.value.nowPrice)};S({show:d,dialogVisible:a});const L=()=>{a.value&&I()};return q(()=>{b.on("enter",L)}),M(()=>{b.off("enter",L)}),(n,p)=>{const C=m("el-input"),D=m("el-button"),_=m("el-dialog");return y(),J(_,{modelValue:a.value,"onUpdate:modelValue":p[2]||(p[2]=f=>a.value=f),title:"订单改价",width:"650"},{footer:$(()=>[e("div",xe,[c(D,{class:"ok-btn",type:"primary",onClick:I},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),default:$(()=>[e("div",ke,[e("div",be,[c(C,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:l.value.nowPrice,"onUpdate:modelValue":p[0]||(p[0]=f=>l.value.nowPrice=f),type:"number",placeholder:"请输入改价后的价格",onInput:v},{suffix:$(()=>[h("元")]),_:1},8,["modelValue"]),c(C,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:l.value.percentage,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value.percentage=f),type:"number",placeholder:"请输入比例",onInput:w},{suffix:$(()=>[h("%")]),_:1},8,["modelValue"])]),e("div",$e,[h(" 改价后金额: "),e("span",we,"¥"+R(l.value.nowPrice||o.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ce=j(Ie,[["__scopeId","data-v-dd4c26df"]]),Pe={class:"my-order"},Ve={class:"header-nav"},Ae={class:"nav-item"},Se={class:"order-list"},Fe={class:"order-item-info"},Le={class:"order-item-title"},Re={class:"title"},Ee=["onClick"],De={class:"order-item-sku"},ze=["onClick"],Ue={class:"order-item-price"},Oe={class:"order-footer"},qe={class:"order-total"},Me={class:"price"},Ne={class:"total-item"},Be={style:{"font-size":"1.4rem"}},Te={class:"total-item"},je={class:"update-price"},Ke={class:"order-btn"},Ge={__name:"order",emits:["goPay","editAttr"],setup(A,{expose:S,emit:k}){const a=i([]),u=i(0),o=i(0),d=i(0),l=te(),v=()=>{let t=[];a.value.map(r=>{t.push(r.cart_id)}),t.length!=0&&F(t)},w=t=>{a.value=a.value.filter(r=>r.cart_id!=t),F([t])},F=t=>{ie({cart_id:t}).then(r=>{console.log(r),I()})},I=()=>{u.value=0,o.value=0,d.value=0,re({staff_id:l.userInfo.service.service_id}).then(t=>{var r,x;((x=(r=t.data)==null?void 0:r.list)==null?void 0:x.length)>0?(a.value=t.data.list[0].list,a.value.forEach(P=>{u.value+=P.productAttr.price*P.cart_num}),o.value=u.value):a.value=[]})};I();const L=k,n=()=>{L("goPay")},p=(t,r)=>{ee(t.cart_id,{cart_num:t.cart_num}).then(x=>{u.value=0,a.value.forEach(P=>{u.value+=P.productAttr.price*P.cart_num}),o.value=u.value})},C=t=>{L("editPupop",t)},D=(t,r)=>{ee(t,r).then(x=>{I()})},_=t=>{d.value=o.value-t,u.value=+t,H(()=>{setTimeout(()=>{g(!1)},150)})};i(0);const f=i(null),g=(t=!0)=>{f.value.show(t,o.value)};S({getList:I,list:a,editItem:D,discounts:d,allPrice:u});const z=()=>{f.value.dialogVisible?f.value.dialogVisible=!1:g()},s=()=>{a.value.length>0&&v()};return q(()=>{b.on("insert",z),b.on("delete",s)}),M(()=>{b.off("insert",z),b.off("delete",s)}),(t,r)=>{const x=m("Delete"),P=m("el-icon"),O=m("el-empty"),U=m("el-image"),K=m("ArrowDown"),Y=m("el-input-number"),Z=m("el-button");return y(),V("div",Pe,[e("div",Ve,[e("div",Ae,[h(" 已选购 "),e("span",null,R(a.value.length),1),h(" 件 ")]),e("div",{class:"nav-item-clear",onClick:v},[c(P,null,{default:$(()=>[c(x)]),_:1}),h("清空 (Delete) ")])]),e("div",Se,[a.value.length==0?(y(),J(O,{key:0,description:"请点击右侧添加商品"})):(y(!0),V(Q,{key:1},W(a.value,(E,ce)=>(y(),V("div",{class:"order-item",key:ce},[c(U,{loading:"lazy",class:"order-item-img",src:E.productAttr&&E.productAttr.image||E.product.image},null,8,["src"]),e("div",Fe,[e("div",Le,[e("div",Re,R(E.spu.store_name),1),e("div",{class:"delete",onClick:N=>w(E.cart_id)},"删除",8,Ee)]),e("div",De,[e("span",{style:{display:"flex","align-items":"center"},onClick:N=>C(E)},[h("商品规格: "+R(E.productAttr.sku||"默认规格"),1),c(P,{size:"16",style:{"margin-left":"0.2rem"}},{default:$(()=>[c(K)]),_:1})],8,ze)]),e("div",Ue,[e("div",null,[h(" ¥"),e("span",null,R(E.productAttr.price),1)]),e("div",null,[c(Y,{modelValue:E.cart_num,"onUpdate:modelValue":N=>E.cart_num=N,"step-strictly":"",min:1,step:1,onChange:N=>p(E)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Oe,[e("div",qe,[e("div",Me,[e("div",Ne,[h(" 实付: "),e("span",null,[h("¥"),e("span",Be,R(u.value.toFixed(2)),1)])]),e("div",Te,[h(" 优惠: "),e("span",null,[h("¥"),e("span",null,R(d.value.toFixed(2)),1)])])]),e("div",je,[c(Z,{class:"btn",type:"primary",onClick:g,size:"small"},{default:$(()=>[h("改价 (Insert)")]),_:1})])]),e("div",Ke,[c(Z,{class:"btn",type:"primary",onClick:n,disabled:a.value.length==0},{default:$(()=>[h("立即结账 (F9)")]),_:1},8,["disabled"])])]),c(Ce,{ref_key:"priceRef",ref:f,onChangeAllPrice:_},null,512)])}}},Je=j(Ge,[["__scopeId","data-v-49a45541"]]),X=A=>(le("data-v-687bd78b"),A=A(),ne(),A),He={class:"my-order"},Qe=X(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},ot=X(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),st=[ot],at={key:1,class:"no-stock"},lt=X(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],ct={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(A,{expose:S,emit:k}){const a=i(null),u=k,o=i(""),d=()=>{u("loadMore",{bar_code:o.value})},l=n=>{if(n.is_used==0)return T.error("该商品已被平台关闭");if(n.stock==0)return T.warning("该商品无库存");u("changeItem",n)},v=fe.throttle(()=>{u("getStoreList",{bar_code:o.value},!0)},300);S({bar_code:o});const w=i(!1),F=()=>{w.value=!0},I=()=>{w.value=!1},L=()=>{var n;(n=a.value)==null||n.focus()};return q(()=>{H(()=>{var n;(n=a.value)==null||n.focus(),F()}),b.on("shift",L)}),M(()=>{b.off("shift",L)}),(n,p)=>{const C=m("el-input"),D=m("Search"),_=m("el-icon"),f=m("el-button"),g=m("el-image"),z=m("el-space"),s=oe("infinite-scroll");return y(),V("div",He,[e("div",{class:se(["header-nav",{"input-focus":w.value}])},[Qe,e("div",We,[c(C,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=t=>o.value=t),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:a,onFocus:F,onBlur:I,onKeyup:_e(B(v),["enter"]),onClear:B(v)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:p[1]||(p[1]=(...t)=>B(v)&&B(v)(...t))},[c(f,{class:"btn",type:"primary"},{default:$(()=>[c(_,null,{default:$(()=>[c(D)]),_:1})]),_:1})])],2),ae((y(),V("div",Xe,[c(z,{wrap:""},{default:$(()=>[(y(!0),V(Q,null,W(A.storeList,(t,r)=>(y(),V("div",{class:"shop-item",key:r,onClick:x=>l(t)},[c(g,{loading:"lazy",src:t.image},null,8,["src"]),e("div",Ze,R(t.store_name),1),e("div",et,[h(" ¥"),e("span",null,R(t.price),1)]),t.stock==0?(y(),V("div",tt,st)):G("",!0),t.is_used==0?(y(),V("div",at,nt)):G("",!0)],8,Ye))),128))]),_:1})])),[[s,d]])])}}},it=j(ct,[["__scopeId","data-v-687bd78b"]]),rt=A=>(le("data-v-52f45b9b"),A=A(),ne(),A),ut={class:"shop"},dt={key:0,class:"shop-info"},_t={class:"shop-info-left"},pt={class:"shop-info-right"},vt={class:"shop-info-right-top"},ft={class:"shop-info-right-center"},mt={class:"shop-info-right-price"},ht={class:"shop-sku"},gt=rt(()=>e("div",{class:"title"},"产品",-1)),yt={class:"sku"},kt=["onClick"],bt={class:"dialog-footer"},$t={__name:"pupop",emits:["changeItem"],setup(A,{expose:S,emit:k}){const a=i(!1),u=_=>{a.value=_},o=i({}),d=i(null),l=i(!1),v=i("add"),w=i({}),F=(_,f="add")=>{v.value=f,f=="add"?(o.value=_,d.value=_.attr[0]):(l.value=!0,w.value=_,he(_.product_id).then(g=>{g.data.attrValue=JSON.parse(JSON.stringify(g.data.attr)),g.data.attr=Object.keys(g.data.sku),o.value=g.data,d.value=g.data.attr[0],l.value=!1}).catch(g=>{l.value=!1}))},I=k,L=()=>{v.value=="add"?I("changeItem",o.value,d.value):I("editItem",w.value.cart_id,{cart_num:w.value.cart_num,product_attr_unique:o.value.sku[d.value].unique}),a.value=!1},n=_=>{d.value=_};S({show:u,setForm:F});const p=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_>0)return n(o.value.attr[_-1])},C=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_{a.value&&L()};return q(()=>{b.on("left",p),b.on("right",C),b.on("enter",D)}),M(()=>{b.off("left",p),b.off("right",C),b.off("enter",D)}),(_,f)=>{const g=m("el-image"),z=m("el-space"),s=m("el-button"),t=m("el-dialog"),r=oe("loading");return y(),J(t,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),title:"商品规格",width:"650"},pe({default:$(()=>{var x,P,O;return[ae((y(),V("div",ut,[o.value.sku?(y(),V("div",dt,[e("div",_t,[c(g,{loading:"lazy",src:((x=o.value.sku[d.value])==null?void 0:x.image)||o.value.image},null,8,["src"])]),e("div",pt,[e("div",vt,R(o.value.store_name),1),e("div",ft,"库存"+R(((P=o.value.sku[d.value])==null?void 0:P.stock)||0),1),e("div",mt,[h("¥"),e("span",null,R(((O=o.value.sku[d.value])==null?void 0:O.price)||o.value.price),1)])])])):G("",!0),e("div",ht,[gt,e("div",yt,[c(z,{wrap:"",size:20},{default:$(()=>[(y(!0),V(Q,null,W(o.value.attr,(U,K)=>(y(),V("div",{class:se(["sku-item",{"sku-item_active":d.value==U}]),onClick:Y=>n(U),key:K},R(U||"默认规格"),11,kt))),128))]),_:1})])])])),[[r,l.value]])]}),_:2},[v.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:$(()=>[e("div",bt,[c(s,{class:"ok-btn",type:"primary",onClick:L},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},wt=j($t,[["__scopeId","data-v-52f45b9b"]]),xt={class:"my-card"},Ft={__name:"index",setup(A){const S=i(null),k=i(null),a=i(null),u=i(null),o=i([]),d=te(),l=ve(),v=i({page:0,limit:30}),w=(s={},t=!1)=>{v.value={staff_id:d.userInfo.service.service_id,...v.value,...s},t&&(o.value=[],v.value.page=1,F.value=!1),ge(d.userInfo.service.mer_id,v.value).then(r=>{var P,O;((O=(P=r.data)==null?void 0:P.list)==null?void 0:O.length)(U.attr=Object.keys(U.sku),U));o.value=o.value.concat(x),s.bar_code&&o.value.length==1&&L(s.bar_code)&&(a.value.bar_code="",p(o.value[0],o.value[0].attr[0]))})},F=i(!1),I=s=>{F.value||(v.value.page++,w(s))};function L(s){return/^\d+$/.test(s)}const n=(s,t="")=>{let r={is_new:0,product_id:s.product_id,cart_num:1,product_attr_unique:s.sku[t]!==void 0?s.sku[t].unique:"",staff_id:d.userInfo.service.service_id,product_type:0};ue(r).then(x=>{k.value.getList()})},p=(s,t)=>{if(!s.attr||s.attr.length==0||s.attr.length==1)return n(s,s.attr[0]?s.attr[0]:"");if(t)return n(s,t);S.value.setForm(s,"add"),S.value.show(!0)},C=(s,t)=>{k.value.editItem(s,t)},D=s=>{S.value.setForm(s,"edit"),S.value.show(!0)},_=()=>{let s=k.value.list.map(r=>r.cart_id),t={takes:[],use_coupon:{},use_integral:!1,cart_id:s};k.value.discounts>0&&(t.deduction_price=k.value.discounts.toFixed(2),t.pay_type="micropay"),de(t).then(r=>{u.value.setForm({data:r.data,cart_id:s})})},f=()=>{_(),u.value.drawer=!0},g=()=>{k.value.getList()},z=()=>{console.log("F9"),l.name=="home"&&(!u.value.drawer&&k.value.list.length>0?f():u.value.beforeClose())};return q(()=>{w(),v.value.page++,b.on("F9",z)}),M(()=>{b.off("F9",z)}),(s,t)=>(y(),V("div",xt,[c(Je,{ref_key:"orderRef",ref:k,onGoPay:f,onEditPupop:D},null,512),c(me),c(it,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:o.value,onGetStoreList:w,onChangeItem:p,onLoadMore:I},null,8,["storeList"]),c(wt,{ref_key:"pupopRef",ref:S,onChangeItem:p,onEditItem:C},null,512),c(ye,{ref_key:"payRef",ref:u,onPaySuccess:g},null,512)]))}};export{Ft as default}; diff --git a/dist/assets/indexCount-BfTXghlq.js b/dist/assets/indexCount-BfTXghlq.js deleted file mode 100644 index 9d9913c..0000000 --- a/dist/assets/indexCount-BfTXghlq.js +++ /dev/null @@ -1 +0,0 @@ -import{h as S,i as Y}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js";import{_ as w,u as P,r as o,b as v,j as k,q as N,c as h,h as f,e as t,t as c,s as D,f as r,w as y,g as F,v as M,x as V,A as j}from"./index-Db3iIaOe.js";import{h as d}from"./moment-Cl4UOzQZ.js";const p=i=>(M("data-v-85d892d5"),i=i(),V(),i),A={"element-loading-text":"加载中",class:"my-order"},B={key:0,class:"from"},L={class:"form-card"},q=p(()=>t("div",{class:"tips"},"今日收银 平台+线上+现金 总金额",-1)),O={class:"form-card"},E=p(()=>t("div",{class:"tips"},"昨日收银 平台+线上+现金 总金额",-1)),R={class:"form-card"},T=p(()=>t("div",{class:"tips"},"本月收银 平台+线上+现金 总金额",-1)),U={class:"table"},z={__name:"indexCount",setup(i){const l=P(),u=o([]),b=j();o(1),o(null);const x=o({page:1,limit:15,staff_id:l.userInfo.service.service_id}),n=o(!1);o(0),(()=>{S(l.userInfo.service.mer_id,x.value).then(s=>{u.value=s.data})})();const a=o({});(()=>{n.value=!0,Y(l.userInfo.service.mer_id,{staff_id:l.userInfo.service.service_id}).then(s=>{a.value=s.data.data,n.value=!1})})();const g=(s,C)=>{let e="";Number(d(s.day).format("MM"))>Number(d().format("MM"))?e=d().format("YYYY")-1+"-"+s.day.split("-").join("-"):e=d().format("YYYY")+"-"+s.day.split("-").join("-"),b.push({path:"order",query:{date:e}})};return(s,C)=>{const e=v("el-table-column"),_=v("el-table"),I=k("loading");return N((h(),f("div",A,[a.value.today?(h(),f("div",B,[t("div",L,[t("div",null,c((a.value.today.cashPayment+a.value.today.payPrice).toFixed(2)),1),q]),t("div",O,[t("div",null,c((a.value.yesterday.cashPayment+a.value.yesterday.payPrice).toFixed(2)),1),E]),t("div",R,[t("div",null,c((a.value.month.cashPayment+a.value.month.payPrice).toFixed(2)),1),T])])):D("",!0),t("div",U,[r(_,{data:u.value,style:{width:"100%"},onCellClick:g},{default:y(()=>[r(e,{prop:"day",label:"日期",width:"260"}),r(e,{prop:"total",label:"订单数量"}),r(e,{prop:"cash_payment",label:"现金收银金额"}),r(e,{prop:"cash_registe",label:"线上收银金额"}),r(e,{prop:"pay_price",label:"平台交易额"}),r(e,{label:"总金额"},{default:y(m=>[F(c(((+m.row.pay_price||0)+(+m.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[I,n.value]])}}},W=w(z,[["__scopeId","data-v-85d892d5"]]);export{W as default}; diff --git a/dist/assets/indexCount-DOVRNxk8.css b/dist/assets/indexCount-DOVRNxk8.css deleted file mode 100644 index 5560596..0000000 --- a/dist/assets/indexCount-DOVRNxk8.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.my-order[data-v-85d892d5]{box-sizing:border-box}.my-order .from[data-v-85d892d5]{width:100%;padding-bottom:1.25rem;display:grid;grid-template-columns:repeat(5,1fr);gap:1.25rem}.my-order .from .form-card[data-v-85d892d5]{border-radius:.8rem;height:5rem;background-color:#fff;font-size:1.3rem;font-weight:700;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-order .from .form-card .tips[data-v-85d892d5]{font-size:.9rem;color:#999;font-weight:400}.my-order .from .red[data-v-85d892d5]{color:#ff4a00}.my-order .from .green[data-v-85d892d5]{color:#01c86f}.my-order .table[data-v-85d892d5]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll}[data-v-85d892d5]::-webkit-scrollbar{width:.315rem}[data-v-85d892d5]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}[data-v-85d892d5]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}[data-v-85d892d5]::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/indexCount-Dekjp8EX.js b/dist/assets/indexCount-Dekjp8EX.js new file mode 100644 index 0000000..81dab46 --- /dev/null +++ b/dist/assets/indexCount-Dekjp8EX.js @@ -0,0 +1 @@ +import{h as S,i as Y}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{_ as w,u as P,r as o,b as h,j as k,q as N,c as f,h as b,e as t,t as d,s as D,f as r,w as x,g as F,v as M,x as V,A as j}from"./index-3-t8Fk7s.js";import{h as n}from"./moment-Cl4UOzQZ.js";const v=l=>(M("data-v-266c9d86"),l=l(),V(),l),q={"element-loading-text":"加载中",class:"my-order"},A={key:0,class:"from"},B={class:"form-card"},L=v(()=>t("div",{class:"tips"},"今日收银 平台+线上+现金 总金额",-1)),T={class:"form-card"},O=v(()=>t("div",{class:"tips"},"昨日收银 平台+线上+现金 总金额",-1)),E={class:"form-card"},R=v(()=>t("div",{class:"tips"},"本月收银 平台+线上+现金 总金额",-1)),U={class:"table"},z={__name:"indexCount",setup(l){const c=P(),m=o([]),g=j();o(1),o(null);const C=o({page:1,limit:15,staff_id:c.userInfo.service.service_id}),_=o(!1);o(0),(()=>{S(c.userInfo.service.mer_id,C.value).then(s=>{m.value=s.data})})();const a=o({});(()=>{_.value=!0,Y(c.userInfo.service.mer_id,{staff_id:c.userInfo.service.service_id}).then(s=>{a.value=s.data.data,_.value=!1})})();const I=(s,p)=>{let e="",i={};Number(n(s.day).format("MM"))>Number(n().format("MM"))?e=n().format("YYYY")-1+"-"+s.day.split("-").join("-"):e=n().format("YYYY")+"-"+s.day.split("-").join("-"),i.date=e,p.no==2&&(i.payType=1),p.no==3&&(i.payType=2),g.push({path:"order",query:i})};return(s,p)=>{const e=h("el-table-column"),i=h("el-table"),u=k("loading");return N((f(),b("div",q,[a.value.today?(f(),b("div",A,[t("div",B,[t("div",null,d((a.value.today.cashPayment+a.value.today.payPrice).toFixed(2)),1),L]),t("div",T,[t("div",null,d((a.value.yesterday.cashPayment+a.value.yesterday.payPrice).toFixed(2)),1),O]),t("div",E,[t("div",null,d((a.value.month.cashPayment+a.value.month.payPrice).toFixed(2)),1),R])])):D("",!0),t("div",U,[r(i,{data:m.value,style:{width:"100%"},onCellClick:I},{default:x(()=>[r(e,{prop:"day",label:"日期",width:"260"}),r(e,{prop:"total",label:"订单数量"}),r(e,{prop:"cash_payment",label:"现金收银金额"}),r(e,{prop:"cash_registe",label:"线上收银金额"}),r(e,{prop:"pay_price",label:"平台交易额"}),r(e,{label:"总金额"},{default:x(y=>[F(d(((+y.row.pay_price||0)+(+y.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[u,_.value]])}}},W=w(z,[["__scopeId","data-v-266c9d86"]]);export{W as default}; diff --git a/dist/assets/indexCount-GP0Crquz.css b/dist/assets/indexCount-GP0Crquz.css new file mode 100644 index 0000000..a53cbc1 --- /dev/null +++ b/dist/assets/indexCount-GP0Crquz.css @@ -0,0 +1 @@ +@charset "UTF-8";.my-order[data-v-266c9d86]{box-sizing:border-box}.my-order .from[data-v-266c9d86]{width:100%;padding-bottom:1.25rem;display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem}.my-order .from .form-card[data-v-266c9d86]{border-radius:.8rem;height:5rem;background-color:#fff;font-size:1.3rem;font-weight:700;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-order .from .form-card .tips[data-v-266c9d86]{font-size:.9rem;color:#999;font-weight:400}.my-order .from .red[data-v-266c9d86]{color:#ff4a00}.my-order .from .green[data-v-266c9d86]{color:#01c86f}.my-order .table[data-v-266c9d86]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll;cursor:pointer}[data-v-266c9d86]::-webkit-scrollbar{width:.315rem}[data-v-266c9d86]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}[data-v-266c9d86]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}[data-v-266c9d86]::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/indexList-C22m_nTv.js b/dist/assets/indexList-DNHhtO8X.js similarity index 94% rename from dist/assets/indexList-C22m_nTv.js rename to dist/assets/indexList-DNHhtO8X.js index 1de7518..1931933 100644 --- a/dist/assets/indexList-C22m_nTv.js +++ b/dist/assets/indexList-DNHhtO8X.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_7f298acd_lang-B6ZqZT0L.js";import{_ as Q,u as W,r as s,b as d,j as X,q as Y,c,h as m,f as t,w as o,g as r,t as Z,e as P,d as I,A as ee,E as h,v as te,x as ae}from"./index-Db3iIaOe.js";import{p as oe}from"./pay-CEmj54N0.js";const le=v=>(te("data-v-3c901223"),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"},ce=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ue={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},E=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(""),U=()=>{_.value=!1,K({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),z=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"),u=d("el-table-column"),p=d("el-button"),j=d("el-table"),q=d("el-pagination"),H=d("el-dialog"),M=X("loading");return Y((c(),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(j,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(u,{prop:"group_order_id",label:"ID",width:"100"}),t(u,{prop:"order_sn",label:"订单号",width:"260"}),t(u,{prop:"total_price",label:"订单金额"}),t(u,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(c(),m("span",ne,"已支付")):(c(),m("span",re,"未支付"))]),_:1}),t(u,{prop:"create_time",label:"订单创建时间"}),t(u,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(c(),m("span",ie,Z(l.row.pay_time),1)):(c(),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=>E(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(q,{"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(H,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ue,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(c(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(c(),I(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ce]),_:1},8,["modelValue"])])),[[M,y.value]])}}},fe=Q(pe,[["__scopeId","data-v-3c901223"]]);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_7f298acd_lang-BaAcCNPN.js";import{_ as Q,u as W,r as s,b as d,j as X,q as Y,c,h as m,f as t,w as o,g as r,t as Z,e as P,d as I,A as ee,E as h,v as te,x as ae}from"./index-3-t8Fk7s.js";import{p as oe}from"./pay-Bt7FIL7i.js";const le=v=>(te("data-v-3c901223"),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"},ce=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ue={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},E=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(""),U=()=>{_.value=!1,K({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),z=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"),u=d("el-table-column"),p=d("el-button"),j=d("el-table"),q=d("el-pagination"),H=d("el-dialog"),M=X("loading");return Y((c(),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(j,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(u,{prop:"group_order_id",label:"ID",width:"100"}),t(u,{prop:"order_sn",label:"订单号",width:"260"}),t(u,{prop:"total_price",label:"订单金额"}),t(u,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(c(),m("span",ne,"已支付")):(c(),m("span",re,"未支付"))]),_:1}),t(u,{prop:"create_time",label:"订单创建时间"}),t(u,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(c(),m("span",ie,Z(l.row.pay_time),1)):(c(),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=>E(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(q,{"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(H,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ue,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(c(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(c(),I(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ce]),_:1},8,["modelValue"])])),[[M,y.value]])}}},fe=Q(pe,[["__scopeId","data-v-3c901223"]]);export{fe as default}; diff --git a/dist/assets/indexSystem-8MfCoV-4.js b/dist/assets/indexSystem-8MfCoV-4.js new file mode 100644 index 0000000..076b613 --- /dev/null +++ b/dist/assets/indexSystem-8MfCoV-4.js @@ -0,0 +1 @@ +import{o as r,d as t}from"./detail-SSwoB7VG.js";import{p as o}from"./padding-DTyMU7Be.js";import{c as s,h as a,f as e}from"./index-3-t8Fk7s.js";import"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import"./moment-Cl4UOzQZ.js";import"./pay-Bt7FIL7i.js";const i={class:"my-card"},h={__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{h as default}; diff --git a/dist/assets/indexSystem-BcKTr545.js b/dist/assets/indexSystem-BcKTr545.js deleted file mode 100644 index 5da4088..0000000 --- a/dist/assets/indexSystem-BcKTr545.js +++ /dev/null @@ -1 +0,0 @@ -import{o as r,d as t}from"./detail-CNaDiLm4.js";import{p as o}from"./padding-Ch9Ano5D.js";import{c as s,h as a,f as e}from"./index-Db3iIaOe.js";import"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js";import"./moment-Cl4UOzQZ.js";import"./pay-CEmj54N0.js";const i={class:"my-card"},h={__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{h as default}; diff --git a/dist/assets/lodash-BgJbRuYL.js b/dist/assets/lodash-BiR1SJeZ.js similarity index 99% rename from dist/assets/lodash-BgJbRuYL.js rename to dist/assets/lodash-BiR1SJeZ.js index ee21c6a..b3985e0 100644 --- a/dist/assets/lodash-BgJbRuYL.js +++ b/dist/assets/lodash-BiR1SJeZ.js @@ -1,4 +1,4 @@ -import{B as jt,C as rp}from"./index-Db3iIaOe.js";var Je={exports:{}};/** +import{B as jt,C as rp}from"./index-3-t8Fk7s.js";var Je={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors diff --git a/dist/assets/padding-Ch9Ano5D.js b/dist/assets/padding-DTyMU7Be.js similarity index 65% rename from dist/assets/padding-Ch9Ano5D.js rename to dist/assets/padding-DTyMU7Be.js index 90e6dfc..168e439 100644 --- a/dist/assets/padding-Ch9Ano5D.js +++ b/dist/assets/padding-DTyMU7Be.js @@ -1 +1 @@ -import{_ as e,c as t,h as c}from"./index-Db3iIaOe.js";const n={},o={style:{width:"1rem",height:"100%"}};function r(s,_){return t(),c("div",o)}const i=e(n,[["render",r]]);export{i as p}; +import{_ as e,c as t,h as c}from"./index-3-t8Fk7s.js";const n={},o={style:{width:"1rem",height:"100%"}};function r(s,_){return t(),c("div",o)}const i=e(n,[["render",r]]);export{i as p}; diff --git a/dist/assets/pay-CEmj54N0.js b/dist/assets/pay-Bt7FIL7i.js similarity index 97% rename from dist/assets/pay-CEmj54N0.js rename to dist/assets/pay-Bt7FIL7i.js index 31cf921..9d73c66 100644 --- a/dist/assets/pay-CEmj54N0.js +++ b/dist/assets/pay-Bt7FIL7i.js @@ -1 +1 @@ -import{_ as de,r as o,u as ve,J as _e,o as fe,m as j,a as pe,b as D,j as me,c as y,d as X,w as g,e as t,p as R,g as V,t as P,q as ye,h as C,f as S,k as ge,F as he,i as ke,n as B,E as _,v as be,x as we}from"./index-Db3iIaOe.js";import{k as Y,l as Ce,g as Se}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js";const A=b=>{if(!b)return;let T=new window.SpeechSynthesisUtterance(b);window.speechSynthesis.speak(T)},E=b=>(be("data-v-7f298acd"),b=b(),we(),b),xe=E(()=>t("h4",null,"选择支付方式",-1)),Ve={class:"dra-body"},Be={class:"header"},Ee=E(()=>t("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),$e={style:{color:"#f5222d","padding-bottom":"2rem"}},Fe={style:{"font-size":"1.6rem"}},je={key:0,"element-loading-text":"支付中",class:"card1"},De=E(()=>t("div",{class:"tips"},null,-1)),Ie={key:1,class:"card2"},Le={class:"drawer-body"},Pe={class:"counter"},Ae={class:"received"},Te={key:0},Ue={key:1,style:{"font-size":"1rem",color:"#999"}},ze={key:0,class:"balance"},Ne={class:"money"},Oe=E(()=>t("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Re={key:1,class:"balance"},qe=E(()=>t("div",null,"不够找零, 请支付更多金额",-1)),Ke=E(()=>t("div",{class:"tips"},"按下小键盘输入金额",-1)),Me=[qe,Ke],Je={class:"keypad"},We={class:"left"},Ge={class:"right"},He={style:{width:"100%",display:"flex","justify-content":"center"}},Qe={__name:"pay",emits:["paySuccess"],setup(b,{expose:T,emit:Z}){const f=o(!1),p=o(1),l=o(""),i=o(""),q=ve(),ee=()=>{h()},ae=()=>{B(()=>{setTimeout(()=>{var a;n.value=!1,l.value="",z.value=!0,(a=i.value)==null||a.focus(),w(p.value)},300)})},w=a=>{p.value=a,p.value==2?window.addEventListener("keydown",O):(window.removeEventListener("keydown",O),B(()=>{var e;l.value="",(e=i.value)==null||e.focus()}))},m=o({}),U=o([]),se=a=>{m.value=a.data,U.value=a.cart_id},te=a=>{m.value.order_price=a.price,d.value=a.order_id},le=Z,z=o(!1),oe=o(["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}$/,d=o(""),ue=()=>{if(n.value=!0,i.value.blur(),d.value)J(d.value);else{let a;if(K.test(l.value))a="micropay";else if(M.test(l.value))a="alipayBar";else return n.value=!1,l.value="",i.value.focus(),_.error("请输入正确的支付码");Y({address_id:"",key:m.value.key,cart_id:U.value,pay_type:a,auth_code:l.value,staff_id:q.userInfo.service.service_id}).then(e=>{if(e.status==200&&(e.message=="支付成功"||e.message=="success"))f.value=!1,_({message:e.message=="success"?"支付成功":e.message,type:"success"}),A(e.data.message||e.data.result.message),h();else if(e.data.group_order_sn)d.value=e.data.group_order_id,$.value=0,x=0,I(e.data.group_order_sn);else return d.value=e.data.result.order_id,n.value=!1,_({message:e.message,type:"error"})}).catch(e=>{n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()})})}},J=a=>{let e;if(p.value==1){let s;if(K.test(l.value))s="micropay";else if(M.test(l.value))s="alipayBar";else return n.value=!1,l.value="",i.value.focus(),_.error("请输入正确的支付码");e={type:s,auth_code:l.value}}else e={type:"cash_payment"};Ce(a,e).then(s=>{s.status==200&&(s.message=="支付成功"||s.message=="success")?(f.value=!1,_({message:s.message=="success"?"支付成功":s.message,type:"success"}),A(s.data.message||s.data.result.message),h()):(d.value=s.data.group_order_id,$.value=0,x=0,I(s.data.group_order_sn))}).catch(s=>{l.value="",n.value=!1,B(()=>{var k;(k=i.value)==null||k.focus()})})},$=o(0),I=a=>{a&&($.value++,x+=5e3,Se({order_sn:a}).then(e=>{e.data.paid==1||e.message=="支付成功"?(_({message:e.message,type:"success"}),A(e.data.message),h()):(_({message:e.message,type:"error"}),l.value="",n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()}))}).catch(e=>{z.value&&$.value<3?setTimeout(()=>{I(a)},15e3-x>0?15e3-x:0):(l.value="",n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()}))}))},h=()=>{var a;window.removeEventListener("keydown",O),z.value=!1,n.value=!1,l.value="",u.value="",v.value=[],(a=i.value)==null||a.blur(),le("paySuccess"),f.value=!1},n=o(!1);T({drawer:f,setForm:se,setRePay:te,beforeClose:h});const v=o([]),u=o(""),F=_e(()=>+u.value>0?(u.value-m.value.order_price).toFixed(2):-1),W=o(!1),N=a=>{a===-1?v.value=[]:v.value.pop(),u.value=v.value.length?v.value.join(""):0},c=a=>{W.value===!1&&(u.value="",W.value=!0);let e=String(u.value).indexOf(".")+1,s=String(u.value).length-e;console.log(e,s),(e===0||s<2)&&(v.value.join("")<=9999999&&v.value.push(a),u.value=v.value.join("")>99999999?99999999:v.value.join(""))},G=()=>{if(F.value===""||F.value===null||F.value===void 0||+u.value<+m.value.order_price)return _.error("收款金额应该大于等于应收金额");d.value?J(d.value):Y({address_id:"",key:m.value.key,cart_id:U.value,pay_type:"cash_payment",staff_id:q.userInfo.service.service_id}).then(a=>{if(a.status==200&&a.message=="支付成功")f.value=!1,_({message:a.message,type:"success"}),w(1),A(a.data.message),h();else if(a.data.group_order_sn)d.value=a.data.group_order_id,$.value=0,x=0,I(a.data.group_order_sn);else return d.value=a.data.result.order_id,u.value="",v.value=[],n.value=!1,_({message:a.message,type:"error"})}).catch(a=>{n.value=!1})},O=a=>{let s=(a||window.event).keyCode;if(s==37)return w(2);if(s==120)return j.emit("F9");if(s==27)return h();switch(a.stopPropagation(),a.preventDefault(),s){case 96:case 48:c(0);break;case 97:case 49:c(1);break;case 98:case 50:c(2);break;case 99:case 51:c(3);break;case 100:case 52:c(4);break;case 101:case 53:c(5);break;case 102:case 54:c(6);break;case 103:case 55:c(7);break;case 104:case 56:c(8);break;case 105:case 57:c(9);break;case 110:c(".");break;case 190:c(".");break;case 8:N();break;case 13:G();break}},L=o(!1),H=()=>{if(!(!f.value||L.value&&l.value.length>0)&&p.value==2)return w(1)},Q=()=>{if(!(!f.value||L.value&&l.value.length>0)&&p.value==1)return w(2)};return fe(()=>{j.on("left",H),j.on("right",Q)}),pe(()=>{j.off("left",H),j.off("right",Q)}),(a,e)=>{const s=D("el-input"),k=D("el-button"),ne=D("Delete"),ce=D("el-icon"),re=D("el-drawer"),ie=me("loading");return y(),X(re,{size:"60rem",modelValue:f.value,"onUpdate:modelValue":e[6]||(e[6]=r=>f.value=r),direction:"rtl",onOpen:ae,"before-close":h},{header:g(()=>[xe]),default:g(()=>[t("div",Ve,[t("div",Be,[t("div",{class:R(["left",{active:p.value==1}]),onClick:e[0]||(e[0]=r=>w(1))}," 微信/支付宝 ",2),t("div",{class:R(["right",{active:p.value==2}]),onClick:e[1]||(e[1]=r=>w(2))}," 现金收款 ",2)]),Ee,t("div",$e,[V(" ¥"),t("span",Fe,P(m.value.order_price),1)]),p.value==1?ye((y(),C("div",je,[S(s,{ref_key:"codeRef",ref:i,modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=r=>l.value=r),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ge(ue,["enter"]),onFocus:e[3]||(e[3]=r=>{L.value=!0}),onBlur:e[4]||(e[4]=r=>{L.value=!1})},null,8,["modelValue"]),De])),[[ie,n.value]]):(y(),C("div",Ie,[t("div",Le,[t("div",Pe,[t("div",Ae,[u.value?(y(),C("span",Te,P(u.value),1)):(y(),C("span",Ue,"按下键盘输入客户支付金额"))]),F.value>=0?(y(),C("div",ze,[t("div",null,[V("需找零(元):"),t("span",Ne,"¥"+P(F.value),1)]),Oe])):(y(),C("div",Re,Me)),t("div",Je,[t("div",We,[(y(!0),C(he,null,ke(oe.value,r=>(y(),X(k,{key:r,onClick:Xe=>c(r)},{default:g(()=>[V(P(r),1)]),_:2},1032,["onClick"]))),128))]),t("div",Ge,[S(k,{onClick:N},{default:g(()=>[S(ce,null,{default:g(()=>[S(ne)]),_:1})]),_:1}),S(k,{onClick:e[5]||(e[5]=r=>N(-1))},{default:g(()=>[V("C")]),_:1}),S(k,{class:R(["enter",{"enter-disable":+u.value<+m.value.order_price}]),disabled:+u.value<+m.value.order_price,onClick:G},{default:g(()=>[V(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:g(()=>[t("div",He,[S(k,{class:"cancel-btn",onClick:ee},{default:g(()=>[V("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ea=de(Qe,[["__scopeId","data-v-7f298acd"]]);export{ea as p}; +import{_ as de,r as o,u as ve,J as _e,o as fe,m as j,a as pe,b as D,j as me,c as y,d as X,w as g,e as t,p as R,g as V,t as P,q as ye,h as C,f as S,k as ge,F as he,i as ke,n as B,E as _,v as be,x as we}from"./index-3-t8Fk7s.js";import{k as Y,l as Ce,g as Se}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";const A=b=>{if(!b)return;let T=new window.SpeechSynthesisUtterance(b);window.speechSynthesis.speak(T)},E=b=>(be("data-v-7f298acd"),b=b(),we(),b),xe=E(()=>t("h4",null,"选择支付方式",-1)),Ve={class:"dra-body"},Be={class:"header"},Ee=E(()=>t("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),$e={style:{color:"#f5222d","padding-bottom":"2rem"}},Fe={style:{"font-size":"1.6rem"}},je={key:0,"element-loading-text":"支付中",class:"card1"},De=E(()=>t("div",{class:"tips"},null,-1)),Ie={key:1,class:"card2"},Le={class:"drawer-body"},Pe={class:"counter"},Ae={class:"received"},Te={key:0},Ue={key:1,style:{"font-size":"1rem",color:"#999"}},ze={key:0,class:"balance"},Ne={class:"money"},Oe=E(()=>t("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Re={key:1,class:"balance"},qe=E(()=>t("div",null,"不够找零, 请支付更多金额",-1)),Ke=E(()=>t("div",{class:"tips"},"按下小键盘输入金额",-1)),Me=[qe,Ke],Je={class:"keypad"},We={class:"left"},Ge={class:"right"},He={style:{width:"100%",display:"flex","justify-content":"center"}},Qe={__name:"pay",emits:["paySuccess"],setup(b,{expose:T,emit:Z}){const f=o(!1),p=o(1),l=o(""),i=o(""),q=ve(),ee=()=>{h()},ae=()=>{B(()=>{setTimeout(()=>{var a;n.value=!1,l.value="",z.value=!0,(a=i.value)==null||a.focus(),w(p.value)},300)})},w=a=>{p.value=a,p.value==2?window.addEventListener("keydown",O):(window.removeEventListener("keydown",O),B(()=>{var e;l.value="",(e=i.value)==null||e.focus()}))},m=o({}),U=o([]),se=a=>{m.value=a.data,U.value=a.cart_id},te=a=>{m.value.order_price=a.price,d.value=a.order_id},le=Z,z=o(!1),oe=o(["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}$/,d=o(""),ue=()=>{if(n.value=!0,i.value.blur(),d.value)J(d.value);else{let a;if(K.test(l.value))a="micropay";else if(M.test(l.value))a="alipayBar";else return n.value=!1,l.value="",i.value.focus(),_.error("请输入正确的支付码");Y({address_id:"",key:m.value.key,cart_id:U.value,pay_type:a,auth_code:l.value,staff_id:q.userInfo.service.service_id}).then(e=>{if(e.status==200&&(e.message=="支付成功"||e.message=="success"))f.value=!1,_({message:e.message=="success"?"支付成功":e.message,type:"success"}),A(e.data.message||e.data.result.message),h();else if(e.data.group_order_sn)d.value=e.data.group_order_id,$.value=0,x=0,I(e.data.group_order_sn);else return d.value=e.data.result.order_id,n.value=!1,_({message:e.message,type:"error"})}).catch(e=>{n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()})})}},J=a=>{let e;if(p.value==1){let s;if(K.test(l.value))s="micropay";else if(M.test(l.value))s="alipayBar";else return n.value=!1,l.value="",i.value.focus(),_.error("请输入正确的支付码");e={type:s,auth_code:l.value}}else e={type:"cash_payment"};Ce(a,e).then(s=>{s.status==200&&(s.message=="支付成功"||s.message=="success")?(f.value=!1,_({message:s.message=="success"?"支付成功":s.message,type:"success"}),A(s.data.message||s.data.result.message),h()):(d.value=s.data.group_order_id,$.value=0,x=0,I(s.data.group_order_sn))}).catch(s=>{l.value="",n.value=!1,B(()=>{var k;(k=i.value)==null||k.focus()})})},$=o(0),I=a=>{a&&($.value++,x+=5e3,Se({order_sn:a}).then(e=>{e.data.paid==1||e.message=="支付成功"?(_({message:e.message,type:"success"}),A(e.data.message),h()):(_({message:e.message,type:"error"}),l.value="",n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()}))}).catch(e=>{z.value&&$.value<3?setTimeout(()=>{I(a)},15e3-x>0?15e3-x:0):(l.value="",n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()}))}))},h=()=>{var a;window.removeEventListener("keydown",O),z.value=!1,n.value=!1,l.value="",u.value="",v.value=[],(a=i.value)==null||a.blur(),le("paySuccess"),f.value=!1},n=o(!1);T({drawer:f,setForm:se,setRePay:te,beforeClose:h});const v=o([]),u=o(""),F=_e(()=>+u.value>0?(u.value-m.value.order_price).toFixed(2):-1),W=o(!1),N=a=>{a===-1?v.value=[]:v.value.pop(),u.value=v.value.length?v.value.join(""):0},c=a=>{W.value===!1&&(u.value="",W.value=!0);let e=String(u.value).indexOf(".")+1,s=String(u.value).length-e;console.log(e,s),(e===0||s<2)&&(v.value.join("")<=9999999&&v.value.push(a),u.value=v.value.join("")>99999999?99999999:v.value.join(""))},G=()=>{if(F.value===""||F.value===null||F.value===void 0||+u.value<+m.value.order_price)return _.error("收款金额应该大于等于应收金额");d.value?J(d.value):Y({address_id:"",key:m.value.key,cart_id:U.value,pay_type:"cash_payment",staff_id:q.userInfo.service.service_id}).then(a=>{if(a.status==200&&a.message=="支付成功")f.value=!1,_({message:a.message,type:"success"}),w(1),A(a.data.message),h();else if(a.data.group_order_sn)d.value=a.data.group_order_id,$.value=0,x=0,I(a.data.group_order_sn);else return d.value=a.data.result.order_id,u.value="",v.value=[],n.value=!1,_({message:a.message,type:"error"})}).catch(a=>{n.value=!1})},O=a=>{let s=(a||window.event).keyCode;if(s==37)return w(2);if(s==120)return j.emit("F9");if(s==27)return h();switch(a.stopPropagation(),a.preventDefault(),s){case 96:case 48:c(0);break;case 97:case 49:c(1);break;case 98:case 50:c(2);break;case 99:case 51:c(3);break;case 100:case 52:c(4);break;case 101:case 53:c(5);break;case 102:case 54:c(6);break;case 103:case 55:c(7);break;case 104:case 56:c(8);break;case 105:case 57:c(9);break;case 110:c(".");break;case 190:c(".");break;case 8:N();break;case 13:G();break}},L=o(!1),H=()=>{if(!(!f.value||L.value&&l.value.length>0)&&p.value==2)return w(1)},Q=()=>{if(!(!f.value||L.value&&l.value.length>0)&&p.value==1)return w(2)};return fe(()=>{j.on("left",H),j.on("right",Q)}),pe(()=>{j.off("left",H),j.off("right",Q)}),(a,e)=>{const s=D("el-input"),k=D("el-button"),ne=D("Delete"),ce=D("el-icon"),re=D("el-drawer"),ie=me("loading");return y(),X(re,{size:"60rem",modelValue:f.value,"onUpdate:modelValue":e[6]||(e[6]=r=>f.value=r),direction:"rtl",onOpen:ae,"before-close":h},{header:g(()=>[xe]),default:g(()=>[t("div",Ve,[t("div",Be,[t("div",{class:R(["left",{active:p.value==1}]),onClick:e[0]||(e[0]=r=>w(1))}," 微信/支付宝 ",2),t("div",{class:R(["right",{active:p.value==2}]),onClick:e[1]||(e[1]=r=>w(2))}," 现金收款 ",2)]),Ee,t("div",$e,[V(" ¥"),t("span",Fe,P(m.value.order_price),1)]),p.value==1?ye((y(),C("div",je,[S(s,{ref_key:"codeRef",ref:i,modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=r=>l.value=r),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ge(ue,["enter"]),onFocus:e[3]||(e[3]=r=>{L.value=!0}),onBlur:e[4]||(e[4]=r=>{L.value=!1})},null,8,["modelValue"]),De])),[[ie,n.value]]):(y(),C("div",Ie,[t("div",Le,[t("div",Pe,[t("div",Ae,[u.value?(y(),C("span",Te,P(u.value),1)):(y(),C("span",Ue,"按下键盘输入客户支付金额"))]),F.value>=0?(y(),C("div",ze,[t("div",null,[V("需找零(元):"),t("span",Ne,"¥"+P(F.value),1)]),Oe])):(y(),C("div",Re,Me)),t("div",Je,[t("div",We,[(y(!0),C(he,null,ke(oe.value,r=>(y(),X(k,{key:r,onClick:Xe=>c(r)},{default:g(()=>[V(P(r),1)]),_:2},1032,["onClick"]))),128))]),t("div",Ge,[S(k,{onClick:N},{default:g(()=>[S(ce,null,{default:g(()=>[S(ne)]),_:1})]),_:1}),S(k,{onClick:e[5]||(e[5]=r=>N(-1))},{default:g(()=>[V("C")]),_:1}),S(k,{class:R(["enter",{"enter-disable":+u.value<+m.value.order_price}]),disabled:+u.value<+m.value.order_price,onClick:G},{default:g(()=>[V(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:g(()=>[t("div",He,[S(k,{class:"cancel-btn",onClick:ee},{default:g(()=>[V("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ea=de(Qe,[["__scopeId","data-v-7f298acd"]]);export{ea as p}; diff --git a/dist/assets/pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js b/dist/assets/pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js similarity index 93% rename from dist/assets/pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js rename to dist/assets/pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js index a006020..2a2a2bd 100644 --- a/dist/assets/pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-B6ZqZT0L.js +++ b/dist/assets/pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js @@ -1 +1 @@ -import{G as t}from"./index-Db3iIaOe.js";function n(r){return t.post("user/cart/create",r)}function s(r){return t.get("user/cart/lst",{params:r})}function o(r,e){return t.post(`user/cart/change/${r}`,e)}function u(r){return t.post("v2/order/check",r)}function c(r){return t.post("user/cart/delete",r)}function p(r){return t.post("v2/order/create",r)}function d(r,e){return t.post(`order/pay/${r}`,e)}function f(r){return t.get("micropay_query",{params:r})}function A(r,e){return t.get(`admin/${r}/order_list`,{params:e})}function m(r,e){return t.get(`verifier/${r}/order/${e}`)}function g(r){return t.get("order_lading",{params:r})}function $(r,e,i){return t.post(`verifier/${r}/${e}`,i)}function l(r,e){return t.get(`admin/${r}/statistics`,{params:e})}function v(r,e){return t.get(`admin/${r}/order_price`,{params:e})}function h(r,e){return t.get("order/list",{params:e})}export{s as a,o as b,c,n as d,A as e,g as f,f as g,v as h,l as i,$ as j,p as k,d as l,u as o,h as s,m as v}; +import{G as t}from"./index-3-t8Fk7s.js";function n(r){return t.post("user/cart/create",r)}function s(r){return t.get("user/cart/lst",{params:r})}function o(r,e){return t.post(`user/cart/change/${r}`,e)}function u(r){return t.post("v2/order/check",r)}function c(r){return t.post("user/cart/delete",r)}function p(r){return t.post("v2/order/create",r)}function d(r,e){return t.post(`order/pay/${r}`,e)}function f(r){return t.get("micropay_query",{params:r})}function A(r,e){return t.get(`admin/${r}/order_list`,{params:e})}function m(r,e){return t.get(`verifier/${r}/order/${e}`)}function g(r){return t.get("order_lading",{params:r})}function $(r,e,i){return t.post(`verifier/${r}/${e}`,i)}function l(r,e){return t.get(`admin/${r}/statistics`,{params:e})}function v(r,e){return t.get(`admin/${r}/order_price`,{params:e})}function h(r,e){return t.get("order/list",{params:e})}export{s as a,o as b,c,n as d,A as e,g as f,f as g,v as h,l as i,$ as j,p as k,d as l,u as o,h as s,m as v}; diff --git a/dist/assets/shop-BJxq9Fz-.js b/dist/assets/shop-C3GBYBKO.js similarity index 92% rename from dist/assets/shop-BJxq9Fz-.js rename to dist/assets/shop-C3GBYBKO.js index 6236fcb..05edfce 100644 --- a/dist/assets/shop-BJxq9Fz-.js +++ b/dist/assets/shop-C3GBYBKO.js @@ -1 +1 @@ -import{G as e}from"./index-Db3iIaOe.js";function u(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 n(t,r){return e.get(`server/${t}/product/title`,{params:r})}function i(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 f(t,r,s){return e.post(`server/${t}/product/update/${r}`,s)}function g(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}function l(t){return e.get("product/spu/lst",{params:t})}function $(t,r){return e.get(`store/merchant/category/lst/${t}`,{params:r})}export{l as a,d as b,c,f as d,n as e,i as f,p as g,$ as m,g as p,u as s,o as u}; +import{G as e}from"./index-3-t8Fk7s.js";function u(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 n(t,r){return e.get(`server/${t}/product/title`,{params:r})}function i(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 f(t,r,s){return e.post(`server/${t}/product/update/${r}`,s)}function g(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}function l(t){return e.get("product/spu/lst",{params:t})}function $(t,r){return e.get(`store/merchant/category/lst/${t}`,{params:r})}export{l as a,d as b,c,f as d,n as e,i as f,p as g,$ as m,g as p,u as s,o as u}; diff --git a/dist/index.html b/dist/index.html index ee295db..1bb7217 100644 --- a/dist/index.html +++ b/dist/index.html @@ -40,7 +40,7 @@ } } - + diff --git a/src/views/home/component/shop.vue b/src/views/home/component/shop.vue index e8e273c..7a0fc1f 100644 --- a/src/views/home/component/shop.vue +++ b/src/views/home/component/shop.vue @@ -94,7 +94,7 @@ onUnmounted(() => { :infinite-scroll-immediate="false" style="overflow: auto" > - +
{
+
+ +
diff --git a/src/views/order/component/order.vue b/src/views/order/component/order.vue index 258e95f..7c7f683 100644 --- a/src/views/order/component/order.vue +++ b/src/views/order/component/order.vue @@ -15,15 +15,16 @@ import moment from "moment"; const route = useRoute(); const userStore = useUserStore(); const props = defineProps({ - isSystem:{ - type:Boolean, - default:false - } -}) + isSystem: { + type: Boolean, + default: false, + }, +}); const list = ref([]); const tabPosition = ref(1); // 1-全部, 2-未支付 +const payType = ref(0); //支付方式 const changeTabPosition = (e) => { where.value.page = 1; loadEnd.value = false; @@ -34,22 +35,28 @@ const changeTabPosition = (e) => { const payRef = ref(null); -const date = ref(''); -const changeDate = ()=>{ - where.value.date = date.value.join('-'); +const date = ref(""); +const changeDate = () => { + where.value.date = date.value.join("-"); getOrderList(true); -} +}; const where = ref({ page: 1, limit: 20, search_info: "", date: "", - staff_id: 0 + staff_id: 0, }); -if(route.query.date){ - date.value = [moment(route.query.date).format('YYYY/MM/DD'),moment(route.query.date).format('YYYY/MM/DD')] - where.value.date = date.value.join('-'); +if (route.query.date) { + date.value = [ + moment(route.query.date).format("YYYY/MM/DD"), + moment(route.query.date).format("YYYY/MM/DD"), + ]; + where.value.date = date.value.join("-"); +} +if(route.query.payType){ + payType.value = route.query.payType; } const loading = ref(false); @@ -61,7 +68,12 @@ const orderList = ref([]); const getOrderList = (reload = false) => { if (reload) where.value.page = 1; else if (loadEnd.value || loading.value) return; - if(!props.isSystem) where.value.staff_id = userStore.userInfo.service.service_id; + if (!props.isSystem) { + where.value.staff_id = userStore.userInfo.service.service_id; + if (payType.value == 1) where.value.pay_type = "12"; + else if (payType.value == 2) where.value.pay_type = "11,13"; + else where.value.pay_type = ""; + } loading.value = true; if (tabPosition.value == 1) where.value.paid = null; if (tabPosition.value == 2) where.value.paid = 0; @@ -72,7 +84,8 @@ const getOrderList = (reload = false) => { if (res.data.list.length < where.value.limit) loadEnd.value = true; else where.value.page++; activeStore.value = 0; - if(orderList.value.length>0) mitt.emit("set-order-detail", orderList.value[0]); + if (orderList.value.length > 0) + mitt.emit("set-order-detail", orderList.value[0]); total.value = res.data.count; loading.value = false; }) @@ -87,19 +100,19 @@ const setForm = (item, index) => { mitt.emit("set-order-detail", item); }; -onMounted(()=>{ +onMounted(() => { mitt.on("update-order-detail", (item) => { - console.log('==='); + console.log("==="); orderList.value[activeStore.value].paid = 1; - }) -}) + }); +});