diff --git a/.env.development b/.env.development index b09cdb7..8dd7aef 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ VITE_NOW_TYPE = 'dist' -VITE_BASE_URL = 'http://192.168.1.7:8324' -# VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn' \ No newline at end of file +# VITE_BASE_URL = 'http://192.168.1.7:8324' +VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn' \ No newline at end of file diff --git a/dist/assets/detail-ttCarTU-.js b/dist/assets/detail-CAr0jMyU.js similarity index 97% rename from dist/assets/detail-ttCarTU-.js rename to dist/assets/detail-CAr0jMyU.js index 1ea8efc..baf9582 100644 --- a/dist/assets/detail-ttCarTU-.js +++ b/dist/assets/detail-CAr0jMyU.js @@ -1 +1 @@ -import{_ as q,u as H,r,o as Q,m as D,b as h,j as F,c as t,h as s,e,t as d,f as c,w as u,g as f,k as W,q as G,F as j,i as K,p as U,d as O,s as n,A as X,E as x,v as Z,x as ee}from"./index-BK45VPeO.js";import{e as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js";import{p as ae}from"./pay-jKmmbq3P.js";const ie={class:"my-order"},le={class:"header-nav"},ne={class:"nav-item"},de={class:"nav-item-btn"},ce={class:"header-input"},re={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},_e=["onClick"],ue={class:"top"},ve={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},me={key:0,class:"shop-name"},he={class:"right"},ye={class:"money"},ge={class:"count"},ke={class:"bottom"},$e={class:"pay"},be={key:0},Ce={key:0},Ve={key:1},Se={key:2},we={key:3},Pe={key:4},Le={key:5},Ie={key:6},Ae={key:1,style:{color:"#ff4a00"}},De={key:0,class:"cashier"},Be={key:1,class:"cashier"},Ue={key:0,class:"load-end"},ze={key:1,class:"load-end"},Ee={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup(C){const B=H(),z=C;r([]);const o=r(1),I=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],$(!0)};r(null);const A=r(""),g=()=>{v.value.date=A.value.join("-"),$(!0)},v=r({page:1,limit:20,search_info:"",date:"",staff_id:0}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),$=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;z.isSystem||(v.value.staff_id=B.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(B.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,D.emit("set-order-detail",i)};return Q(()=>{D.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),E=h("el-radio-group"),b=h("el-date-picker"),M=h("el-button"),N=h("el-input"),p=h("el-image"),P=F("loading"),T=F("infinite-scroll");return t(),s("div",ie,[e("div",le,[e("div",ne,d(C.isSystem?"平台订单":"收银订单"),1),e("div",de,[c(E,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),onChange:I,size:"small"},{default:u(()=>[c(w,{value:1},{default:u(()=>[f("全部")]),_:1}),c(w,{value:2},{default:u(()=>[f("未支付")]),_:1})]),_:1},8,["modelValue"]),c(b,{modelValue:A.value,"onUpdate:modelValue":l[1]||(l[1]=a=>A.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",ce,[c(N,{modelValue:v.value.search_info,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>$(!0),["enter"])),onClear:l[5]||(l[5]=a=>$(!0)),clearable:""},{append:u(()=>[c(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:l[2]||(l[2]=a=>$(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",re,[(t(!0),s(j,null,K(k.value,(a,R)=>(t(),s("div",{class:U(["item",{"item-active":L.value==R}]),key:R,onClick:Y=>_(a,R)},[e("div",ue,[e("div",{class:U(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+d(a.order_sn),3),e("div",ve,d(a.create_time),1)]),e("div",pe,[a.orderProduct?(t(),s("div",fe,[(t(!0),s(j,null,K(a.orderProduct.slice(0,5),(Y,J)=>(t(),O(p,{key:J,src:Y.cart_info.productAttr.image||Y.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",me,d(a.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",he,[e("div",ye,"¥"+d(a.pay_price),1),e("div",ge,"共"+d(a.total_num)+"件商品",1)])]),e("div",ke,[e("div",$e,[a.paid?(t(),s("div",be,[f(" 已支付 "),a.pay_type==13?(t(),s("span",Ce,"(支付宝收款)")):n("",!0),a.pay_type==12?(t(),s("span",Ve,"(现金支付)")):n("",!0),a.pay_type==11?(t(),s("span",Se,"(微信收款)")):n("",!0),a.pay_type==0?(t(),s("span",we,"(余额支付)")):n("",!0),a.pay_type==1?(t(),s("span",Pe,"(微信支付)")):n("",!0),a.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Ie,"(对公转账)")):n("",!0)])):(t(),s("div",Ae,"未支付"))]),a.service_info?(t(),s("div",De," 收银员: "+d(a.service_info.nickname),1)):(t(),s("div",Be,"平台订单"))])],10,_e))),128)),S.value?(t(),s("div",Ue,"没有更多了")):n("",!0),y.value?(t(),s("div",ze,"加载中...")):n("",!0)])),[[P,y.value],[T,$]])])}}},Tt=q(Ee,[["__scopeId","data-v-531d3551"]]),m=C=>(Z("data-v-e6e9d4a9"),C=C(),ee(),C),Me={class:"my-order"},Ne={class:"header-nav"},Re=["onClick"],Ye={class:"detail"},xe={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},je={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Oe={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},qe=m(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},Ge={class:"info-item"},Je=m(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=m(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=m(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=m(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=m(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),dt={class:"info-item-info"},ct={class:"info-item"},rt=m(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),_t={class:"info-item-info"},ut={class:"info-item"},vt=m(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),pt={class:"info-item-info"},ft={key:0},mt={key:1},ht={key:2},yt={key:3},gt={key:4},kt={key:5},$t={key:6},bt={key:0,class:"table-title"},Ct={key:1,class:"table-info",style:{"flex-direction":"column"}},Vt={class:"info-item"},St=m(()=>e("div",{class:"info-item-title"},"头像:",-1)),wt={class:"info-item-info"},Pt={class:"info-item"},Lt=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),It={class:"info-item-info"},At={class:"info-item"},Dt=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"},Rt={key:1,class:"handle"},Yt=m(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),xt={class:"dialog-footer"},Ft={__name:"detail",setup(C){const B=H(),z=X(),o=r({});D.on("set-order-detail",_=>{o.value=_}),r([]);const I=r(null),A=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:B.userInfo.service.service_id}).then(_=>{x({message:_.message,type:"success"}),z.push({name:"home"})})},k=_=>{I.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),I.value.drawer=!0},$=_=>{oe({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?(x({message:i.message,type:"success"}),D.emit("update-order-detail",{}),o.value.paid=1):x({message:i.message,type:"error"})}).catch(i=>{})};return(_,i)=>{const l=h("el-image"),w=h("el-table-column"),E=h("el-table"),b=h("el-button"),M=h("el-dialog"),N=F("loading");return t(),s("div",Me,[e("div",Ne,[(t(!0),s(j,null,K(v.value,(p,P)=>(t(),s("div",{key:P,class:U(["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},d(p),11,Re))),128)),e("div",{class:U(["nav-item",{"nav-item-radius2":g.value==v.value.length-1}]),style:{flex:"1"}},null,2)]),G((t(),s("div",Ye,[o.value.orderProduct&&g.value==0?(t(),s("div",xe,[e("div",Fe,[f(" 共计 "),e("span",je,d(o.value.total_num),1),f(" 件商品 ")]),c(E,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[c(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:p})=>[e("div",Ke,[c(l,{style:{height:"3rem",width:"3rem"},src:p.cart_info.productAttr.image||p.cart_info.product.image},null,8,["src"]),e("span",Oe,d(p.cart_info.product.store_name),1)])]),_:1}),c(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(w,{prop:"product_num",label:"数量",width:"150"}),c(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&g.value==1?(t(),s("div",Te,[qe,e("div",He,[e("div",Ge,[Je,e("div",Qe,d(o.value.create_time),1)]),e("div",We,[Xe,e("div",Ze,d(o.value.total_num),1)]),e("div",et,[tt,e("div",st,"¥"+d(o.value.total_price),1)]),e("div",ot,[at,e("div",it,d(o.value.pay_time),1)]),e("div",lt,[nt,e("div",dt,"¥"+d(o.value.deduction_price),1)]),e("div",ct,[rt,e("div",_t,"¥"+d(o.value.pay_price),1)]),e("div",ut,[vt,e("div",pt,[o.value.pay_type==11?(t(),s("span",ft,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",mt,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",ht,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",yt,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",gt,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",kt,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",$t,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",bt,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",Ct,[e("div",Vt,[St,e("div",wt,[c(l,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Pt,[Lt,e("div",It,d(o.value.service_info.nickname),1)]),e("div",At,[Dt,e("div",Bt,d(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),o.value.service_info?(t(),s("div",Ut,[e("div",zt,[e("div",Et,"收银员: "+d(o.value.service_info.nickname),1),e("div",Mt,[f(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",Rt,"已支付")):(t(),s("div",Nt,[c(b,{class:"btn",type:"primary",onClick:i[0]||(i[0]=p=>k(o.value))},{default:u(()=>[f("重新支付")]),_:1}),c(b,{class:"btn",type:"primary",onClick:i[1]||(i[1]=p=>$(o.value.order_sn))},{default:u(()=>[f("检测状态")]),_:1}),c(b,{class:"btn",type:"success",onClick:i[2]||(i[2]=p=>L(o.value.order_sn))},{default:u(()=>[f("提单")]),_:1})]))])):n("",!0)])),[[N,A.value]]),c(ae,{ref_key:"payRef",ref:I},null,512),c(M,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",xt,[c(b,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),O(b,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),O(b,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Yt]),_:1},8,["modelValue"])])}}},qt=q(Ft,[["__scopeId","data-v-e6e9d4a9"]]);export{qt as d,Tt as o}; +import{_ as q,u as H,r,o as Q,m as D,b as h,j as F,c as t,h as s,e,t as d,f as c,w as u,g as f,k as W,q as G,F as j,i as K,p as U,d as O,s as n,A as X,E as x,v as Z,x as ee}from"./index-CcL11pmG.js";import{e as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js";import{p as ae}from"./pay-DyWgnXLl.js";const ie={class:"my-order"},le={class:"header-nav"},ne={class:"nav-item"},de={class:"nav-item-btn"},ce={class:"header-input"},re={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},_e=["onClick"],ue={class:"top"},ve={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},me={key:0,class:"shop-name"},he={class:"right"},ye={class:"money"},ge={class:"count"},ke={class:"bottom"},$e={class:"pay"},be={key:0},Ce={key:0},Ve={key:1},Se={key:2},we={key:3},Pe={key:4},Le={key:5},Ie={key:6},Ae={key:1,style:{color:"#ff4a00"}},De={key:0,class:"cashier"},Be={key:1,class:"cashier"},Ue={key:0,class:"load-end"},ze={key:1,class:"load-end"},Ee={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup(C){const B=H(),z=C;r([]);const o=r(1),I=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],$(!0)};r(null);const A=r(""),g=()=>{v.value.date=A.value.join("-"),$(!0)},v=r({page:1,limit:20,search_info:"",date:"",staff_id:0}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),$=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;z.isSystem||(v.value.staff_id=B.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(B.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,D.emit("set-order-detail",i)};return Q(()=>{D.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),E=h("el-radio-group"),b=h("el-date-picker"),M=h("el-button"),N=h("el-input"),p=h("el-image"),P=F("loading"),T=F("infinite-scroll");return t(),s("div",ie,[e("div",le,[e("div",ne,d(C.isSystem?"平台订单":"收银订单"),1),e("div",de,[c(E,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),onChange:I,size:"small"},{default:u(()=>[c(w,{value:1},{default:u(()=>[f("全部")]),_:1}),c(w,{value:2},{default:u(()=>[f("未支付")]),_:1})]),_:1},8,["modelValue"]),c(b,{modelValue:A.value,"onUpdate:modelValue":l[1]||(l[1]=a=>A.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",ce,[c(N,{modelValue:v.value.search_info,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>$(!0),["enter"])),onClear:l[5]||(l[5]=a=>$(!0)),clearable:""},{append:u(()=>[c(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:l[2]||(l[2]=a=>$(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",re,[(t(!0),s(j,null,K(k.value,(a,R)=>(t(),s("div",{class:U(["item",{"item-active":L.value==R}]),key:R,onClick:Y=>_(a,R)},[e("div",ue,[e("div",{class:U(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+d(a.order_sn),3),e("div",ve,d(a.create_time),1)]),e("div",pe,[a.orderProduct?(t(),s("div",fe,[(t(!0),s(j,null,K(a.orderProduct.slice(0,5),(Y,J)=>(t(),O(p,{key:J,src:Y.cart_info.productAttr.image||Y.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",me,d(a.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",he,[e("div",ye,"¥"+d(a.pay_price),1),e("div",ge,"共"+d(a.total_num)+"件商品",1)])]),e("div",ke,[e("div",$e,[a.paid?(t(),s("div",be,[f(" 已支付 "),a.pay_type==13?(t(),s("span",Ce,"(支付宝收款)")):n("",!0),a.pay_type==12?(t(),s("span",Ve,"(现金支付)")):n("",!0),a.pay_type==11?(t(),s("span",Se,"(微信收款)")):n("",!0),a.pay_type==0?(t(),s("span",we,"(余额支付)")):n("",!0),a.pay_type==1?(t(),s("span",Pe,"(微信支付)")):n("",!0),a.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Ie,"(对公转账)")):n("",!0)])):(t(),s("div",Ae,"未支付"))]),a.service_info?(t(),s("div",De," 收银员: "+d(a.service_info.nickname),1)):(t(),s("div",Be,"平台订单"))])],10,_e))),128)),S.value?(t(),s("div",Ue,"没有更多了")):n("",!0),y.value?(t(),s("div",ze,"加载中...")):n("",!0)])),[[P,y.value],[T,$]])])}}},Tt=q(Ee,[["__scopeId","data-v-531d3551"]]),m=C=>(Z("data-v-e6e9d4a9"),C=C(),ee(),C),Me={class:"my-order"},Ne={class:"header-nav"},Re=["onClick"],Ye={class:"detail"},xe={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},je={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Oe={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},qe=m(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},Ge={class:"info-item"},Je=m(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=m(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=m(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=m(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=m(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),dt={class:"info-item-info"},ct={class:"info-item"},rt=m(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),_t={class:"info-item-info"},ut={class:"info-item"},vt=m(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),pt={class:"info-item-info"},ft={key:0},mt={key:1},ht={key:2},yt={key:3},gt={key:4},kt={key:5},$t={key:6},bt={key:0,class:"table-title"},Ct={key:1,class:"table-info",style:{"flex-direction":"column"}},Vt={class:"info-item"},St=m(()=>e("div",{class:"info-item-title"},"头像:",-1)),wt={class:"info-item-info"},Pt={class:"info-item"},Lt=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),It={class:"info-item-info"},At={class:"info-item"},Dt=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"},Rt={key:1,class:"handle"},Yt=m(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),xt={class:"dialog-footer"},Ft={__name:"detail",setup(C){const B=H(),z=X(),o=r({});D.on("set-order-detail",_=>{o.value=_}),r([]);const I=r(null),A=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:B.userInfo.service.service_id}).then(_=>{x({message:_.message,type:"success"}),z.push({name:"home"})})},k=_=>{I.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),I.value.drawer=!0},$=_=>{oe({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?(x({message:i.message,type:"success"}),D.emit("update-order-detail",{}),o.value.paid=1):x({message:i.message,type:"error"})}).catch(i=>{})};return(_,i)=>{const l=h("el-image"),w=h("el-table-column"),E=h("el-table"),b=h("el-button"),M=h("el-dialog"),N=F("loading");return t(),s("div",Me,[e("div",Ne,[(t(!0),s(j,null,K(v.value,(p,P)=>(t(),s("div",{key:P,class:U(["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},d(p),11,Re))),128)),e("div",{class:U(["nav-item",{"nav-item-radius2":g.value==v.value.length-1}]),style:{flex:"1"}},null,2)]),G((t(),s("div",Ye,[o.value.orderProduct&&g.value==0?(t(),s("div",xe,[e("div",Fe,[f(" 共计 "),e("span",je,d(o.value.total_num),1),f(" 件商品 ")]),c(E,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[c(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:p})=>[e("div",Ke,[c(l,{style:{height:"3rem",width:"3rem"},src:p.cart_info.productAttr.image||p.cart_info.product.image},null,8,["src"]),e("span",Oe,d(p.cart_info.product.store_name),1)])]),_:1}),c(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(w,{prop:"product_num",label:"数量",width:"150"}),c(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&g.value==1?(t(),s("div",Te,[qe,e("div",He,[e("div",Ge,[Je,e("div",Qe,d(o.value.create_time),1)]),e("div",We,[Xe,e("div",Ze,d(o.value.total_num),1)]),e("div",et,[tt,e("div",st,"¥"+d(o.value.total_price),1)]),e("div",ot,[at,e("div",it,d(o.value.pay_time),1)]),e("div",lt,[nt,e("div",dt,"¥"+d(o.value.deduction_price),1)]),e("div",ct,[rt,e("div",_t,"¥"+d(o.value.pay_price),1)]),e("div",ut,[vt,e("div",pt,[o.value.pay_type==11?(t(),s("span",ft,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",mt,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",ht,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",yt,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",gt,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",kt,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",$t,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",bt,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",Ct,[e("div",Vt,[St,e("div",wt,[c(l,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Pt,[Lt,e("div",It,d(o.value.service_info.nickname),1)]),e("div",At,[Dt,e("div",Bt,d(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),o.value.service_info?(t(),s("div",Ut,[e("div",zt,[e("div",Et,"收银员: "+d(o.value.service_info.nickname),1),e("div",Mt,[f(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",Rt,"已支付")):(t(),s("div",Nt,[c(b,{class:"btn",type:"primary",onClick:i[0]||(i[0]=p=>k(o.value))},{default:u(()=>[f("重新支付")]),_:1}),c(b,{class:"btn",type:"primary",onClick:i[1]||(i[1]=p=>$(o.value.order_sn))},{default:u(()=>[f("检测状态")]),_:1}),c(b,{class:"btn",type:"success",onClick:i[2]||(i[2]=p=>L(o.value.order_sn))},{default:u(()=>[f("提单")]),_:1})]))])):n("",!0)])),[[N,A.value]]),c(ae,{ref_key:"payRef",ref:I},null,512),c(M,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",xt,[c(b,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),O(b,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),O(b,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Yt]),_:1},8,["modelValue"])])}}},qt=q(Ft,[["__scopeId","data-v-e6e9d4a9"]]);export{qt as d,Tt as o}; diff --git a/dist/assets/index-BKSdxJHX.js b/dist/assets/index-4FXhzo2S.js similarity index 98% rename from dist/assets/index-BKSdxJHX.js rename to dist/assets/index-4FXhzo2S.js index 7e44632..282452a 100644 --- a/dist/assets/index-BKSdxJHX.js +++ b/dist/assets/index-4FXhzo2S.js @@ -1 +1 @@ -import{_ as H,r as p,u as Q,b as i,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-BK45VPeO.js";import{p as re,c as ue,b as ie,d as de,e as se,s as ce,u as pe,f as _e}from"./shop-DFQI72f9.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 d=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"?d.value=!0:t=="edit"&&(d.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"?ie(U.userInfo.service.mer_id,t).then(r=>{g.success(r.message),D("reload",!0),$()}):de(U.userInfo.service.mer_id,t.product_id,t).then(r=>{g.success(r.message),D("reload",!0),$()})},J=()=>{$()},$=()=>{d.value=!1},F=()=>{};return T({drawer:d,show:I}),(t,e)=>{const f=i("el-input"),s=i("el-form-item"),y=i("el-cascader"),h=i("Plus"),C=i("el-icon"),r=i("el-upload"),c=i("el-form"),w=i("el-dialog"),V=i("el-button"),b=i("el-drawer");return m(),L(b,{size:800,modelValue:d.value,"onUpdate:modelValue":e[10]||(e[10]=u=>d.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-6f8320c3"]]),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(),d=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,d.value).then(e=>{T.value=e.data.list,n.value=e.data.count,q.value=!1})};_();const R=t=>{d.value.page=t,_()},P=t=>{d.value.page=t,_()},N=t=>{d.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=>{d.value.type=t,d.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=i("el-input"),s=i("el-form-item"),y=i("el-button"),h=i("el-form"),C=i("el-menu-item"),r=i("el-menu"),c=i("el-table-column"),w=i("el-image"),V=i("el-switch"),b=i("el-table"),u=i("el-pagination"),Y=i("el-input-number"),Z=i("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:d.value.keyword,"onUpdate:modelValue":e[0]||(e[0]=o=>d.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:"库存"}),d.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),d.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=>[d.value.type!=5?(m(),L(y,{key:0,type:"primary",link:"",onClick:x=>B(o.row)},{default:a(()=>[k("修改库存")]),_:2},1032,["onClick"])):z("",!0),d.value.type!=1&&d.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":d.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 i,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-CcL11pmG.js";import{p as re,c as ue,b as ie,d as de,e as se,s as ce,u as pe,f as _e}from"./shop-2NnNJ0bO.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 d=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"?d.value=!0:t=="edit"&&(d.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"?ie(U.userInfo.service.mer_id,t).then(r=>{g.success(r.message),D("reload",!0),$()}):de(U.userInfo.service.mer_id,t.product_id,t).then(r=>{g.success(r.message),D("reload",!0),$()})},J=()=>{$()},$=()=>{d.value=!1},F=()=>{};return T({drawer:d,show:I}),(t,e)=>{const f=i("el-input"),s=i("el-form-item"),y=i("el-cascader"),h=i("Plus"),C=i("el-icon"),r=i("el-upload"),c=i("el-form"),w=i("el-dialog"),V=i("el-button"),b=i("el-drawer");return m(),L(b,{size:800,modelValue:d.value,"onUpdate:modelValue":e[10]||(e[10]=u=>d.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-6f8320c3"]]),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(),d=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,d.value).then(e=>{T.value=e.data.list,n.value=e.data.count,q.value=!1})};_();const R=t=>{d.value.page=t,_()},P=t=>{d.value.page=t,_()},N=t=>{d.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=>{d.value.type=t,d.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=i("el-input"),s=i("el-form-item"),y=i("el-button"),h=i("el-form"),C=i("el-menu-item"),r=i("el-menu"),c=i("el-table-column"),w=i("el-image"),V=i("el-switch"),b=i("el-table"),u=i("el-pagination"),Y=i("el-input-number"),Z=i("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:d.value.keyword,"onUpdate:modelValue":e[0]||(e[0]=o=>d.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:"库存"}),d.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),d.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=>[d.value.type!=5?(m(),L(y,{key:0,type:"primary",link:"",onClick:x=>B(o.row)},{default:a(()=>[k("修改库存")]),_:2},1032,["onClick"])):z("",!0),d.value.type!=1&&d.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":d.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-C-uGLwDp.js b/dist/assets/index-7h6j3_TZ.js similarity index 97% rename from dist/assets/index-C-uGLwDp.js rename to dist/assets/index-7h6j3_TZ.js index 93a8971..f5dd11e 100644 --- a/dist/assets/index-C-uGLwDp.js +++ b/dist/assets/index-7h6j3_TZ.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-BK45VPeO.js";import{v as te,f as se,j as oe}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js";import{p as ie}from"./pay-jKmmbq3P.js";import{p as ae}from"./padding-C_XosNLD.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-CcL11pmG.js";import{v as te,f as se,j as oe}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js";import{p as ie}from"./pay-DyWgnXLl.js";import{p as ae}from"./padding-DMrFdNq8.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-B9xI11ZK.js b/dist/assets/index-B9xI11ZK.js deleted file mode 100644 index e99c18f..0000000 --- a/dist/assets/index-B9xI11ZK.js +++ /dev/null @@ -1 +0,0 @@ -import{c as re,a as ie,b as Z,d as ue,o as de}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js";import{_ as K,r as c,o as M,m as b,a as N,b as m,c as g,d as J,w as x,e,f as i,g as h,t as E,n as H,E as T,u as ee,h as A,F as Q,i as W,j as te,k as _e,l as j,p as oe,q as se,s as G,v as ae,x as le,y as pe,z as ve}from"./index-BK45VPeO.js";import{_ as fe}from"./lodash-BI5zS7wc.js";import{p as me}from"./padding-C_XosNLD.js";import{g as he,a as ge}from"./shop-DFQI72f9.js";import{p as ye}from"./pay-jKmmbq3P.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"},Pe={__name:"price",emits:["changeAllPrice"],setup(S,{expose:F,emit:y}){const a=c(!1),u=c(null),o=c(0),d=(n=!0,p=0)=>{l.value.nowPrice="",l.value.percentage="",a.value=n,o.value=p,H(()=>{setTimeout(()=>{var V;(V=u.value)==null||V.focus()},150)})},l=c({nowPrice:"",percentage:""}),v=n=>{l.value.percentage=(n/o.value*100).toFixed(2)},$=n=>{l.value.nowPrice=(o.value*n/100).toFixed(2)},L=y,P=()=>{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");L("changeAllPrice",l.value.nowPrice)};F({show:d,dialogVisible:a});const R=()=>{a.value&&P()};return M(()=>{b.on("enter",R)}),N(()=>{b.off("enter",R)}),(n,p)=>{const V=m("el-input"),U=m("el-button"),_=m("el-dialog");return g(),J(_,{modelValue:a.value,"onUpdate:modelValue":p[2]||(p[2]=f=>a.value=f),title:"订单改价",width:"650"},{footer:x(()=>[e("div",xe,[i(U,{class:"ok-btn",type:"primary",onClick:P},{default:x(()=>[h(" 确定 (Enter) ")]),_:1})])]),default:x(()=>[e("div",ke,[e("div",be,[i(V,{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:x(()=>[h("元")]),_:1},8,["modelValue"]),i(V,{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:$},{suffix:x(()=>[h("%")]),_:1},8,["modelValue"])]),e("div",$e,[h(" 改价后金额: "),e("span",we,"¥"+E(l.value.nowPrice||o.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ve=K(Pe,[["__scopeId","data-v-924edcc0"]]),Ce={class:"my-order"},Ie={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"},Oe=["onClick"],Ue={class:"order-item-price"},ze={class:"order-footer"},qe={class:"order-total"},Me={class:"price"},Ne={class:"total-item"},Be={style:{"font-size":"1.4rem"}},je={class:"total-item"},Te={class:"order-btn"},Ke={__name:"order",emits:["goPay","editAttr"],setup(S,{expose:F,emit:y}){const a=c([]),u=c(0),o=c(0),d=c(0),l=ee(),v=()=>{let t=[];a.value.map(r=>{t.push(r.cart_id)}),t.length!=0&&L(t)},$=t=>{a.value=a.value.filter(r=>r.cart_id!=t),L([t])},L=t=>{re({cart_id:t}).then(r=>{console.log(r),P()})},P=()=>{u.value=0,o.value=0,d.value=0,ie({staff_id:l.userInfo.service.service_id,sale_type:2}).then(t=>{var r,w;((w=(r=t.data)==null?void 0:r.list)==null?void 0:w.length)>0?(a.value=t.data.list[0].list,a.value.forEach(C=>{u.value+=C.productAttr.price*C.cart_num}),o.value=u.value):a.value=[]})};P();const R=y,n=()=>{R("goPay")},p=(t,r)=>{Z(t.cart_id,{cart_num:t.cart_num}).then(w=>{u.value=0,a.value.forEach(C=>{u.value+=C.productAttr.price*C.cart_num}),o.value=u.value})},V=t=>{R("editPupop",t)},U=(t,r)=>{Z(t,r).then(w=>{P()})},_=t=>{d.value=o.value-t,u.value=+t,H(()=>{setTimeout(()=>{k(!1)},150)})};c(0);const f=c(null),k=(t=!0)=>{f.value.show(t,o.value)};F({getList:P,list:a,editItem:U,discounts:d,allPrice:u});const z=()=>{f.value.dialogVisible?f.value.dialogVisible=!1:k()},s=()=>{a.value.length>0&&v()};return M(()=>{b.on("insert",z),b.on("delete",s)}),N(()=>{b.off("insert",z),b.off("delete",s)}),(t,r)=>{const w=m("Delete"),C=m("el-icon"),q=m("el-empty"),I=m("el-image"),D=m("ArrowDown"),Y=m("el-input-number"),ne=m("el-button");return g(),A("div",Ce,[e("div",Ie,[e("div",Ae,[h(" 已选购 "),e("span",null,E(a.value.length),1),h(" 件 ")]),e("div",{class:"nav-item-clear",onClick:v},[i(C,null,{default:x(()=>[i(w)]),_:1}),h("清空 (Delete) ")])]),e("div",Se,[a.value.length==0?(g(),J(q,{key:0,description:"请点击右侧添加商品"})):(g(!0),A(Q,{key:1},W(a.value,(O,ce)=>(g(),A("div",{class:"order-item",key:ce},[i(I,{loading:"lazy",class:"order-item-img",src:O.productAttr&&O.productAttr.image||O.product.image},null,8,["src"]),e("div",Fe,[e("div",Le,[e("div",Re,E(O.spu.store_name),1),e("div",{class:"delete",onClick:B=>$(O.cart_id)},"删除",8,Ee)]),e("div",De,[e("span",{style:{display:"flex","align-items":"center"},onClick:B=>V(O)},[h("商品规格: "+E(O.productAttr.sku||"默认规格"),1),i(C,{size:"16",style:{"margin-left":"0.2rem"}},{default:x(()=>[i(D)]),_:1})],8,Oe)]),e("div",Ue,[e("div",null,[h(" ¥"),e("span",null,E(O.productAttr.price),1)]),e("div",null,[i(Y,{modelValue:O.cart_num,"onUpdate:modelValue":B=>O.cart_num=B,"step-strictly":"",min:1,step:1,onChange:B=>p(O)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",ze,[e("div",qe,[e("div",Me,[e("div",Ne,[h(" 实付: "),e("span",null,[h("¥"),e("span",Be,E(u.value.toFixed(2)),1)])]),e("div",je,[h(" 优惠: "),e("span",null,[h("¥"),e("span",null,E(d.value.toFixed(2)),1)])])])]),e("div",Te,[i(ne,{class:"btn",type:"primary",onClick:n,disabled:a.value.length==0},{default:x(()=>[h("立即结账 (F9)")]),_:1},8,["disabled"])])]),i(Ve,{ref_key:"priceRef",ref:f,onChangeAllPrice:_},null,512)])}}},Ge=K(Ke,[["__scopeId","data-v-d5f59937"]]),X=S=>(ae("data-v-5ddbb518"),S=S(),le(),S),Je={class:"my-order"},He=X(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Qe={class:"nav-item-input"},We={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Xe=["onClick"],Ye={class:"shop-name"},Ze={class:"shop-price"},et={key:0,class:"no-stock"},tt=X(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),ot=[tt],st={key:1,class:"no-stock"},at=X(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),lt=[at],nt={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(S,{expose:F,emit:y}){const a=c(null),u=y,o=c(""),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);F({bar_code:o});const $=c(!1),L=()=>{$.value=!0},P=()=>{$.value=!1},R=()=>{var n;(n=a.value)==null||n.focus()};return M(()=>{H(()=>{var n;(n=a.value)==null||n.focus(),L()}),b.on("shift",R)}),N(()=>{b.off("shift",R)}),(n,p)=>{const V=m("el-input"),U=m("Search"),_=m("el-icon"),f=m("el-button"),k=m("el-image"),z=m("el-space"),s=te("infinite-scroll");return g(),A("div",Je,[e("div",{class:oe(["header-nav",{"input-focus":$.value}])},[He,e("div",Qe,[i(V,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=t=>o.value=t),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:a,onFocus:L,onBlur:P,onKeyup:_e(j(v),["enter"]),onClear:j(v)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:p[1]||(p[1]=(...t)=>j(v)&&j(v)(...t))},[i(f,{class:"btn",type:"primary"},{default:x(()=>[i(_,null,{default:x(()=>[i(U)]),_:1})]),_:1})])],2),se((g(),A("div",We,[i(z,{wrap:""},{default:x(()=>[(g(!0),A(Q,null,W(S.storeList,(t,r)=>(g(),A("div",{class:"shop-item",key:r,onClick:w=>l(t)},[i(k,{loading:"lazy",src:t.image},null,8,["src"]),e("div",Ye,E(t.store_name),1),e("div",Ze,[h(" ¥"),e("span",null,E(t.price),1)]),t.stock==0?(g(),A("div",et,ot)):G("",!0),t.is_used==0?(g(),A("div",st,lt)):G("",!0)],8,Xe))),128))]),_:1})])),[[s,d]])])}}},ct=K(nt,[["__scopeId","data-v-5ddbb518"]]),rt=S=>(ae("data-v-29f08ea1"),S=S(),le(),S),it={class:"shop"},ut={key:0,class:"shop-info"},dt={class:"shop-info-left"},_t={class:"shop-info-right"},pt={class:"shop-info-right-top"},vt={class:"shop-info-right-center"},ft={class:"shop-info-right-price"},mt={class:"shop-sku"},ht=rt(()=>e("div",{class:"title"},"产品",-1)),gt={class:"sku"},yt=["onClick"],kt={class:"dialog-footer"},bt={__name:"pupop",emits:["changeItem"],setup(S,{expose:F,emit:y}){const a=c(!1),u=_=>{a.value=_},o=c({}),d=c(null),l=c(!1),v=c("add"),$=c({}),L=(_,f="add")=>{v.value=f,f=="add"?(o.value=_,d.value=_.attr[0]):(l.value=!0,$.value=_,he(_.product_id).then(k=>{k.data.attrValue=JSON.parse(JSON.stringify(k.data.attr)),k.data.attr=Object.keys(k.data.sku),o.value=k.data,d.value=k.data.attr[0],l.value=!1}).catch(k=>{l.value=!1}))},P=y,R=()=>{v.value=="add"?P("changeItem",o.value,d.value):P("editItem",$.value.cart_id,{cart_num:$.value.cart_num,product_attr_unique:o.value.sku[d.value].unique}),a.value=!1},n=_=>{d.value=_};F({show:u,setForm:L});const p=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_>0)return n(o.value.attr[_-1])},V=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_{a.value&&R()};return M(()=>{b.on("left",p),b.on("right",V),b.on("enter",U)}),N(()=>{b.off("left",p),b.off("right",V),b.off("enter",U)}),(_,f)=>{const k=m("el-image"),z=m("el-space"),s=m("el-button"),t=m("el-dialog"),r=te("loading");return g(),J(t,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=w=>a.value=w),title:"商品规格",width:"650"},pe({default:x(()=>{var w,C,q;return[se((g(),A("div",it,[o.value.sku?(g(),A("div",ut,[e("div",dt,[i(k,{loading:"lazy",src:((w=o.value.sku[d.value])==null?void 0:w.image)||o.value.image},null,8,["src"])]),e("div",_t,[e("div",pt,E(o.value.store_name),1),e("div",vt,"库存"+E(((C=o.value.sku[d.value])==null?void 0:C.stock)||0),1),e("div",ft,[h("¥"),e("span",null,E(((q=o.value.sku[d.value])==null?void 0:q.price)||o.value.price),1)])])])):G("",!0),e("div",mt,[ht,e("div",gt,[i(z,{wrap:"",size:20},{default:x(()=>[(g(!0),A(Q,null,W(o.value.attr,(I,D)=>(g(),A("div",{class:oe(["sku-item",{"sku-item_active":d.value==I}]),onClick:Y=>n(I),key:D},E(I||"默认规格"),11,yt))),128))]),_:1})])])])),[[r,l.value]])]}),_:2},[v.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:x(()=>[e("div",kt,[i(s,{class:"ok-btn",type:"primary",onClick:R},{default:x(()=>[h(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},$t=K(bt,[["__scopeId","data-v-29f08ea1"]]),wt={class:"my-card"},St={__name:"index",setup(S){const F=c(null),y=c(null),a=c(null),u=c(null),o=c([]),d=ee(),l=ve(),v=c({page:1,limit:30}),$=(s={},t=!1)=>{v.value={staff_id:d.userInfo.service.service_id,sale_type:2,mer_type:1,...v.value,...s},t&&(o.value=[],v.value.page=1,L.value=!1),ge(v.value).then(r=>{var C,q;((q=(C=r.data)==null?void 0:C.list)==null?void 0:q.length)(Object.keys(I.sku).forEach(D=>{I.sku[D].wholesale_price&&(I.sku[D].price=I.sku[D].wholesale_price)}),I.attrValue.forEach(D=>{D.wholesale_price&&(D.price=D.wholesale_price)}),I.attr=Object.keys(I.sku),I));o.value=o.value.concat(w),s.bar_code&&o.value.length==1&&R(s.bar_code)&&(a.value.bar_code="",p(o.value[0],o.value[0].attr[0])),v.value.page++})},L=c(!1),P=s=>{L.value||$(s)};function R(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,sale_type:2};ue(r).then(w=>{y.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);F.value.setForm(s,"add"),F.value.show(!0)},V=(s,t)=>{y.value.editItem(s,t)},U=s=>{F.value.setForm(s,"edit"),F.value.show(!0)},_=()=>{let s=y.value.list.map(r=>r.cart_id),t={takes:[],use_coupon:{},use_integral:!1,cart_id:s};y.value.discounts>0&&(t.deduction_price=y.value.discounts.toFixed(2),t.pay_type="micropay"),de(t).then(r=>{u.value.setForm({data:r.data,cart_id:s})})},f=()=>{_(),u.value.drawer=!0},k=()=>{y.value.getList()},z=()=>{l.name=="saleHome"&&(!u.value.drawer&&y.value.list.length>0?f():u.value.beforeClose())};return M(()=>{$(),v.value.page++,b.on("F9",z)}),N(()=>{b.off("F9",z)}),(s,t)=>(g(),A("div",wt,[i(Ge,{ref_key:"orderRef",ref:y,onGoPay:f,onEditPupop:U},null,512),i(me),i(ct,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:o.value,onGetStoreList:$,onChangeItem:p,onLoadMore:P},null,8,["storeList"]),i($t,{ref_key:"pupopRef",ref:F,onChangeItem:p,onEditItem:V},null,512),i(ye,{ref_key:"payRef",ref:u,onPaySuccess:k},null,512)]))}};export{St as default}; diff --git a/dist/assets/index-BDXt3eD9.js b/dist/assets/index-BDXt3eD9.js new file mode 100644 index 0000000..c66f3c2 --- /dev/null +++ b/dist/assets/index-BDXt3eD9.js @@ -0,0 +1 @@ +import{o as r,d as o}from"./detail-CAr0jMyU.js";import{p as t}from"./padding-DMrFdNq8.js";import{c as a,h as s,f as e}from"./index-CcL11pmG.js";import"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js";import"./pay-DyWgnXLl.js";const c={class:"my-card"},u={__name:"index",setup(d){return(i,l)=>(a(),s("div",c,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/index-BgRu0AKO.js b/dist/assets/index-BgRu0AKO.js new file mode 100644 index 0000000..789b904 --- /dev/null +++ b/dist/assets/index-BgRu0AKO.js @@ -0,0 +1 @@ +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_43f405bf_lang-C8kjmal_.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-CcL11pmG.js";import{_ as me}from"./lodash-dOU8z0Ic.js";import{p as te}from"./padding-DMrFdNq8.js";import{g as he,m as ge,a as ye}from"./shop-2NnNJ0bO.js";import{p as ke}from"./pay-DyWgnXLl.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:400,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-b5353384"]]),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-lSReYcyi.js b/dist/assets/index-Bt0WA8xE.js similarity index 97% rename from dist/assets/index-lSReYcyi.js rename to dist/assets/index-Bt0WA8xE.js index f39a132..7f691aa 100644 --- a/dist/assets/index-lSReYcyi.js +++ b/dist/assets/index-Bt0WA8xE.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-BK45VPeO.js";import{s as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js";import{p as ae}from"./pay-jKmmbq3P.js";import{p as ie}from"./padding-C_XosNLD.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-bd636d48"]]),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-CcL11pmG.js";import{s as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js";import{p as ae}from"./pay-DyWgnXLl.js";import{p as ie}from"./padding-DMrFdNq8.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-bd636d48"]]),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-CxXluHEO.js b/dist/assets/index-CExmDAMs.js similarity index 84% rename from dist/assets/index-CxXluHEO.js rename to dist/assets/index-CExmDAMs.js index feed056..f261e9b 100644 --- a/dist/assets/index-CxXluHEO.js +++ b/dist/assets/index-CExmDAMs.js @@ -1 +1 @@ -import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-BK45VPeO.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-CcL11pmG.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-BK45VPeO.js b/dist/assets/index-CcL11pmG.js similarity index 99% rename from dist/assets/index-BK45VPeO.js rename to dist/assets/index-CcL11pmG.js index 989c145..ed00415 100644 --- a/dist/assets/index-BK45VPeO.js +++ b/dist/assets/index-CcL11pmG.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-CtqT8OOG.js","./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js","./pay-Cy98h3fA.css","./lodash-BI5zS7wc.js","./padding-C_XosNLD.js","./shop-DFQI72f9.js","./pay-jKmmbq3P.js","./index-QScG8zz8.css","./index-CkJgicje.js","./detail-ttCarTU-.js","./detail-DXtWSvNw.css","./index-9c4jfjwr.css","./indexSystem-BjRZnOOI.js","./index-B9xI11ZK.js","./index-DrtYBigd.css","./index-lSReYcyi.js","./index-BmfGhfDo.css","./indexList-dE38YFMr.js","./indexList-BAcoCK-_.css","./indexCount-B1uCmjon.js","./indexCount-DUOmQ5a6.css","./index-BKSdxJHX.js","./index-EzbQm7xN.css","./index-C-uGLwDp.js","./index-Cal_7aRo.css","./index-yyXTBNDo.js","./index-Dwwi99ut.css"] + __vite__mapDeps.viteFileDeps = ["./index-CrQrxznr.js","./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js","./pay-Cy98h3fA.css","./lodash-dOU8z0Ic.js","./padding-DMrFdNq8.js","./shop-2NnNJ0bO.js","./pay-DyWgnXLl.js","./index-QScG8zz8.css","./index-BDXt3eD9.js","./detail-CAr0jMyU.js","./detail-DXtWSvNw.css","./index-9c4jfjwr.css","./indexSystem-1JAJF7pd.js","./index-BgRu0AKO.js","./index-D47b-Quu.css","./index-Bt0WA8xE.js","./index-BmfGhfDo.css","./indexList-DjuP9zSZ.js","./indexList-BAcoCK-_.css","./indexCount-CyhOCMNk.js","./indexCount-DUOmQ5a6.css","./index-4FXhzo2S.js","./index-EzbQm7xN.css","./index-7h6j3_TZ.js","./index-Cal_7aRo.css","./index-CpiT-n_t.js","./index-Dwwi99ut.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -76,4 +76,4 @@ function __vite__mapDeps(indexes) { `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[c4]=this[c4]={accessors:{}}).accessors,r=this.prototype;function a(l){const s=cs(l);o[s]||(cce(r,l),o[s]=!0)}return Ve.isArray(t)?t.forEach(a):a(t),this}}md.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ve.reduceDescriptors(md.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Ve.freezeMethods(md);const lr=md;function pf(e,t){const n=this||iv,o=t||n,r=lr.from(o.headers);let a=o.data;return Ve.forEach(e,function(s){a=s.call(n,a,r.normalize(),t?t.status:void 0)}),r.normalize(),a}function kb(e){return!!(e&&e.__CANCEL__)}function Oi(e,t,n){Rt.call(this,e??"canceled",Rt.ERR_CANCELED,t,n),this.name="CanceledError"}Ve.inherits(Oi,Rt,{__CANCEL__:!0});function dce(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const fce=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 pce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Eb(e,t){return e&&!pce(t)?vce(e,t):t}const hce=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 mce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gce(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,a=0,l;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),f=o[a];l||(l=c),n[r]=u,o[r]=c;let d=a,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===a&&(a=(a+1)%e),c-l{const a=r.loaded,l=r.lengthComputable?r.total:void 0,s=a-n,u=o(s),c=a<=l;n=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&c?(l-a)/u:void 0,event:r};f[t?"download":"upload"]=!0,e(f)}}const yce=typeof XMLHttpRequest<"u",_ce=yce&&function(e){return new Promise(function(n,o){let r=e.data;const a=lr.from(e.headers).normalize();let{responseType:l,withXSRFToken:s}=e,u;function c(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}let f;if(Ve.isFormData(r)){if(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=Eb(e.baseURL,e.url);d.open(e.method.toUpperCase(),bb(p,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function h(){if(!d)return;const v=lr.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),g={data:!l||l==="text"||l==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:v,config:e,request:d};dce(function(b){n(b),c()},function(b){o(b),c()},g),d=null}if("onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(h)},d.onabort=function(){d&&(o(new Rt("Request aborted",Rt.ECONNABORTED,e,d)),d=null)},d.onerror=function(){o(new Rt("Network Error",Rt.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||wb;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),o(new Rt(y,g.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,e,d)),d=null},Io.hasStandardBrowserEnv&&(s&&Ve.isFunction(s)&&(s=s(e)),s||s!==!1&&hce(p))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&fce.read(e.xsrfCookieName);v&&a.set(e.xsrfHeaderName,v)}r===void 0&&a.setContentType(null),"setRequestHeader"in d&&Ve.forEach(a.toJSON(),function(y,g){d.setRequestHeader(g,y)}),Ve.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),l&&l!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",d4(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",d4(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=v=>{d&&(o(!v||v.type?new Oi(null,e,d):v),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const m=mce(p);if(m&&Io.protocols.indexOf(m)===-1){o(new Rt("Unsupported protocol "+m+":",Rt.ERR_BAD_REQUEST,e));return}d.send(r||null)})},W0={http:Wue,xhr:_ce};Ve.forEach(W0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const f4=e=>`- ${e}`,bce=e=>Ve.isFunction(e)||e===null||e===!1,xb={getAdapter:e=>{e=Ve.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let a=0;a`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=t?a.length>1?`since : `+a.map(f4).join(` `):" "+f4(a[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o},adapters:W0};function vf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Oi(null,e)}function p4(e){return vf(e),e.headers=lr.from(e.headers),e.data=pf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xb.getAdapter(e.adapter||iv.adapter)(e).then(function(o){return vf(e),o.data=pf.call(e,e.transformResponse,o),o.headers=lr.from(o.headers),o},function(o){return kb(o)||(vf(e),o&&o.response&&(o.response.data=pf.call(e,e.transformResponse,o.response),o.response.headers=lr.from(o.response.headers))),Promise.reject(o)})}const v4=e=>e instanceof lr?{...e}:e;function Fl(e,t){t=t||{};const n={};function o(c,f,d){return Ve.isPlainObject(c)&&Ve.isPlainObject(f)?Ve.merge.call({caseless:d},c,f):Ve.isPlainObject(f)?Ve.merge({},f):Ve.isArray(f)?f.slice():f}function r(c,f,d){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c,d)}else return o(c,f,d)}function a(c,f){if(!Ve.isUndefined(f))return o(void 0,f)}function l(c,f){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c)}else return o(void 0,f)}function s(c,f,d){if(d in t)return o(c,f);if(d in e)return o(void 0,c)}const u={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(c,f)=>r(v4(c),v4(f),!0)};return Ve.forEach(Object.keys(Object.assign({},e,t)),function(f){const d=u[f]||r,p=d(e[f],t[f],f);Ve.isUndefined(p)&&d!==s||(n[f]=p)}),n}const Mb="1.6.8",uv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{uv[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const h4={};uv.transitional=function(t,n,o){function r(a,l){return"[Axios v"+Mb+"] Transitional option '"+a+"'"+l+(o?". "+o:"")}return(a,l,s)=>{if(t===!1)throw new Rt(r(l," has been removed"+(n?" in "+n:"")),Rt.ERR_DEPRECATED);return n&&!h4[l]&&(h4[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,s):!0}};function wce(e,t,n){if(typeof e!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const a=o[r],l=t[a];if(l){const s=e[a],u=s===void 0||l(s,a,e);if(u!==!0)throw new Rt("option "+a+" must be "+u,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+a,Rt.ERR_BAD_OPTION)}}const j0={assertOptions:wce,validators:uv},Mr=j0.validators;class yc{constructor(t){this.defaults=t,this.interceptors={request:new u4,response:new u4}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const a=r.stack?r.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=` -`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&j0.assertOptions(o,{silentJSONParsing:Mr.transitional(Mr.boolean),forcedJSONParsing:Mr.transitional(Mr.boolean),clarifyTimeoutError:Mr.transitional(Mr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:j0.assertOptions(r,{encode:Mr.function,serialize:Mr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&Ve.merge(a.common,a[n.method]);a&&Ve.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=lr.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[p4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Oi(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new cv(function(r){t=r}),cancel:t}}}const Cce=cv;function Sce(e){return function(n){return e.apply(null,n)}}function kce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const q0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(q0).forEach(([e,t])=>{q0[t]=e});const Ece=q0;function $b(e){const t=new Hu(e),n=ib(Hu.prototype.request,t);return Ve.extend(n,Hu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return $b(Fl(e,r))},n}const sn=$b(iv);sn.Axios=Hu;sn.CanceledError=Oi;sn.CancelToken=Cce;sn.isCancel=kb;sn.VERSION=Mb;sn.toFormData=hd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Sce;sn.isAxiosError=kce;sn.mergeConfig=Fl;sn.AxiosHeaders=lr;sn.formToJSON=e=>Sb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=xb.getAdapter;sn.HttpStatusCode=Ece;sn.default=sn;const xce={url:"http://192.168.1.7:8324/api",upload:"http://192.168.1.7:8324/api/upload/image/field"},Ai=sn.create({baseURL:xce.url,timeout:1e4});Ai.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Ai.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ts({message:e.data.message,type:"error"}),setTimeout(()=>{const t=rv();t.setUserInfo({}),t.setToken(""),Ob.push("/login")},700)),e.data.status===400)throw Ts({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ts({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function ade(e){return Ai.post("auth/login",e)}function lde(e){return Ai.get("user",e)}function Mce(){return Ai.post("logout")}const dv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},$ce=e=>(j4("data-v-24e72736"),e=e(),q4(),e),Tce={class:"my-card"},Oce={class:"card-header"},Ace={style:{width:"4.5rem"}},Nce=$ce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Rce={class:"card-body"},Ice={class:"el-dropdown-link"},Pce={class:"info"},Lce={style:{"margin-left":"0.3rem"}},Vce={__name:"myHeader",setup(e){const t=rv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=ob(),a=()=>{Mce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ts({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ge("el-image"),c=Ge("el-avatar"),f=Ge("arrow-down"),d=Ge("el-icon"),p=Ge("el-dropdown-item"),h=Ge("el-dropdown-menu"),m=Ge("el-dropdown");return _(),M("div",Tce,[k("div",Oce,[k("div",Ace,[W(u,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),Nce]),k("div",Rce,[W(m,{trigger:"hover"},{dropdown:X(()=>[W(h,null,{default:X(()=>[W(p,{onClick:a},{default:X(()=>[gt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",Ice,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Pce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Lce,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:X(()=>[W(f)]),_:1})])]),_:1})])])}}},Bce=dv(Vce,[["__scopeId","data-v-24e72736"]]);function zce(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(r){r(n)}),(o=e.get("*"))&&o.slice().map(function(r){r(t,n)})}}}const qn=zce(),oa=e=>(j4("data-v-fb29f1d7"),e=e(),q4(),e),Hce={class:"my-card"},Dce=oa(()=>k("div",null,"收银",-1)),Fce=oa(()=>k("div",null,"收银订单",-1)),Kce=oa(()=>k("div",null,"平台订单",-1)),Wce=oa(()=>k("div",null,"批发",-1)),jce=oa(()=>k("div",null,"批发订单",-1)),qce=oa(()=>k("div",null,"核销",-1)),Uce=oa(()=>k("div",null,"商品",-1)),Yce=oa(()=>k("div",null,"统计",-1)),Gce={__name:"myAside",setup(e){const t=ob(),n=tue(),o=s=>{t.push({name:s})},r=P(["home","order","orderSystem","saleHome","saleOrder","convert","shop","orderCount"]),a=()=>{let s=r.value.indexOf(n.name);s==0&&(s=r.value.length),s>0&&o(r.value[s-1])},l=()=>{let s=r.value.indexOf(n.name);s==r.value.length-1&&(s=-1),s{qn.on("up",a),qn.on("down",l)}),Ho(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Ge("Sell"),f=Ge("el-icon"),d=Ge("DataLine"),p=Ge("DataAnalysis"),h=Ge("Van"),m=Ge("Tickets"),v=Ge("FullScreen"),y=Ge("ShoppingBag"),g=Ge("Coin");return _(),M("div",Hce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:u[0]||(u[0]=w=>o("home"))},[W(f,{size:"2rem"},{default:X(()=>[W(c)]),_:1}),Dce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:u[1]||(u[1]=w=>o("order"))},[W(f,{size:"2rem"},{default:X(()=>[W(d)]),_:1}),Fce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderSystem"}]),onClick:u[2]||(u[2]=w=>o("orderSystem"))},[W(f,{size:"2rem"},{default:X(()=>[W(p)]),_:1}),Kce],2),k("div",{class:T(["list-item",{active:i(n).name=="saleHome"}]),onClick:u[3]||(u[3]=w=>o("saleHome"))},[W(f,{size:"2rem"},{default:X(()=>[W(h)]),_:1}),Wce],2),k("div",{class:T(["list-item",{active:i(n).name=="saleOrder"}]),onClick:u[4]||(u[4]=w=>o("saleOrder"))},[W(f,{size:"2rem"},{default:X(()=>[W(m)]),_:1}),jce],2),k("div",{class:T(["list-item",{active:i(n).name=="convert"}]),onClick:u[5]||(u[5]=w=>o("convert"))},[W(f,{size:"2rem"},{default:X(()=>[W(v)]),_:1}),qce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:u[6]||(u[6]=w=>o("shop"))},[W(f,{size:"2rem"},{default:X(()=>[W(y)]),_:1}),Uce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderCount"}]),onClick:u[7]||(u[7]=w=>o("orderCount"))},[W(f,{size:"2rem"},{default:X(()=>[W(g)]),_:1}),Yce],2)])}}},Xce=dv(Gce,[["__scopeId","data-v-fb29f1d7"]]),Jce={class:"common-layout"},Zce={__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=Ge("el-header"),a=Ge("el-aside"),l=Ge("router-view"),s=Ge("el-main"),u=Ge("el-container");return _(),M("div",Jce,[W(u,null,{default:X(()=>[W(r,null,{default:X(()=>[W(Bce)]),_:1}),W(u,null,{default:X(()=>[W(a,{width:"6.25rem"},{default:X(()=>[W(Xce)]),_:1}),W(s,{style:{color:"#333"}},{default:X(()=>[W(l,{class:"my-main"},{default:X(({Component:c})=>[W(tn,{name:"el-zoom-in-top"},{default:X(()=>[(_(),le(it(c)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Qce=dv(Zce,[["__scopeId","data-v-4838f8ab"]]),ede=[{path:"/",name:"layout",component:Qce,redirect:"/home",meta:{title:"里海收银系统"},children:[{path:"/home",name:"home",meta:{title:"收银"},component:()=>go(()=>import("./index-CtqT8OOG.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)},{path:"/order",name:"order",meta:{title:"收银订单"},component:()=>go(()=>import("./index-CkJgicje.js"),__vite__mapDeps([8,9,1,2,6,10,4,11]),import.meta.url)},{path:"/orderSystem",name:"orderSystem",meta:{title:"平台订单"},component:()=>go(()=>import("./indexSystem-BjRZnOOI.js"),__vite__mapDeps([12,9,1,2,6,10,4,11]),import.meta.url)},{path:"/saleHome",name:"saleHome",meta:{title:"批发"},component:()=>go(()=>import("./index-B9xI11ZK.js"),__vite__mapDeps([13,1,2,3,4,5,6,14]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"批发订单"},component:()=>go(()=>import("./index-lSReYcyi.js"),__vite__mapDeps([15,1,2,6,4,16]),import.meta.url)},{path:"/orderList",name:"orderList",meta:{title:"统计"},component:()=>go(()=>import("./indexList-dE38YFMr.js"),__vite__mapDeps([17,1,2,6,18]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"统计"},component:()=>go(()=>import("./indexCount-B1uCmjon.js"),__vite__mapDeps([19,1,2,20]),import.meta.url)},{path:"/shop",name:"shop",component:()=>go(()=>import("./index-BKSdxJHX.js"),__vite__mapDeps([21,5,22]),import.meta.url)},{path:"/convert",name:"convert",component:()=>go(()=>import("./index-C-uGLwDp.js"),__vite__mapDeps([23,1,2,6,4,24]),import.meta.url)}]},{path:"/login",name:"login",component:()=>go(()=>import("./index-yyXTBNDo.js"),__vite__mapDeps([25,26]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>go(()=>import("./index-CxXluHEO.js"),__vite__mapDeps([]),import.meta.url)}],Tb=Qie({history:$ie(),routes:ede});Tb.beforeEach((e,t,n)=>{const o=rv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ob=Tb,Ni=Og(Z5);for(const[e,t]of Object.entries(ML))Ni.component(e,t);const tde=oue();Ni.use(Ob);Ni.use(tde);Ni.use(Use,{locale:Yse});Ni.mount("#app");export{ob as A,wr as B,Cr as C,xce as D,Ts as E,Ke as F,Ai as G,bt as H,y2 as I,S as J,ade as K,lde as L,dv as _,Ho as a,Ge as b,_ as c,le as d,k as e,W as f,gt as g,M as h,ht as i,xc 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,Te as t,rv as u,j4 as v,X as w,q4 as x,sr as y,tue as z}; +`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&j0.assertOptions(o,{silentJSONParsing:Mr.transitional(Mr.boolean),forcedJSONParsing:Mr.transitional(Mr.boolean),clarifyTimeoutError:Mr.transitional(Mr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:j0.assertOptions(r,{encode:Mr.function,serialize:Mr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&Ve.merge(a.common,a[n.method]);a&&Ve.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=lr.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[p4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Oi(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new cv(function(r){t=r}),cancel:t}}}const Cce=cv;function Sce(e){return function(n){return e.apply(null,n)}}function kce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const q0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(q0).forEach(([e,t])=>{q0[t]=e});const Ece=q0;function $b(e){const t=new Hu(e),n=ib(Hu.prototype.request,t);return Ve.extend(n,Hu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return $b(Fl(e,r))},n}const sn=$b(iv);sn.Axios=Hu;sn.CanceledError=Oi;sn.CancelToken=Cce;sn.isCancel=kb;sn.VERSION=Mb;sn.toFormData=hd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Sce;sn.isAxiosError=kce;sn.mergeConfig=Fl;sn.AxiosHeaders=lr;sn.formToJSON=e=>Sb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=xb.getAdapter;sn.HttpStatusCode=Ece;sn.default=sn;const xce={url:"https://crmeb-test.shop.lihaink.cn/api",upload:"https://crmeb-test.shop.lihaink.cn/api/upload/image/field"},Ai=sn.create({baseURL:xce.url,timeout:1e4});Ai.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Ai.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ts({message:e.data.message,type:"error"}),setTimeout(()=>{const t=rv();t.setUserInfo({}),t.setToken(""),Ob.push("/login")},700)),e.data.status===400)throw Ts({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ts({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function ade(e){return Ai.post("auth/login",e)}function lde(e){return Ai.get("user",e)}function Mce(){return Ai.post("logout")}const dv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},$ce=e=>(j4("data-v-24e72736"),e=e(),q4(),e),Tce={class:"my-card"},Oce={class:"card-header"},Ace={style:{width:"4.5rem"}},Nce=$ce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Rce={class:"card-body"},Ice={class:"el-dropdown-link"},Pce={class:"info"},Lce={style:{"margin-left":"0.3rem"}},Vce={__name:"myHeader",setup(e){const t=rv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=ob(),a=()=>{Mce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ts({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ge("el-image"),c=Ge("el-avatar"),f=Ge("arrow-down"),d=Ge("el-icon"),p=Ge("el-dropdown-item"),h=Ge("el-dropdown-menu"),m=Ge("el-dropdown");return _(),M("div",Tce,[k("div",Oce,[k("div",Ace,[W(u,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),Nce]),k("div",Rce,[W(m,{trigger:"hover"},{dropdown:X(()=>[W(h,null,{default:X(()=>[W(p,{onClick:a},{default:X(()=>[gt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",Ice,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Pce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Lce,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:X(()=>[W(f)]),_:1})])]),_:1})])])}}},Bce=dv(Vce,[["__scopeId","data-v-24e72736"]]);function zce(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(r){r(n)}),(o=e.get("*"))&&o.slice().map(function(r){r(t,n)})}}}const qn=zce(),oa=e=>(j4("data-v-fb29f1d7"),e=e(),q4(),e),Hce={class:"my-card"},Dce=oa(()=>k("div",null,"收银",-1)),Fce=oa(()=>k("div",null,"收银订单",-1)),Kce=oa(()=>k("div",null,"平台订单",-1)),Wce=oa(()=>k("div",null,"批发",-1)),jce=oa(()=>k("div",null,"批发订单",-1)),qce=oa(()=>k("div",null,"核销",-1)),Uce=oa(()=>k("div",null,"商品",-1)),Yce=oa(()=>k("div",null,"统计",-1)),Gce={__name:"myAside",setup(e){const t=ob(),n=tue(),o=s=>{t.push({name:s})},r=P(["home","order","orderSystem","saleHome","saleOrder","convert","shop","orderCount"]),a=()=>{let s=r.value.indexOf(n.name);s==0&&(s=r.value.length),s>0&&o(r.value[s-1])},l=()=>{let s=r.value.indexOf(n.name);s==r.value.length-1&&(s=-1),s{qn.on("up",a),qn.on("down",l)}),Ho(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Ge("Sell"),f=Ge("el-icon"),d=Ge("DataLine"),p=Ge("DataAnalysis"),h=Ge("Van"),m=Ge("Tickets"),v=Ge("FullScreen"),y=Ge("ShoppingBag"),g=Ge("Coin");return _(),M("div",Hce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:u[0]||(u[0]=w=>o("home"))},[W(f,{size:"2rem"},{default:X(()=>[W(c)]),_:1}),Dce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:u[1]||(u[1]=w=>o("order"))},[W(f,{size:"2rem"},{default:X(()=>[W(d)]),_:1}),Fce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderSystem"}]),onClick:u[2]||(u[2]=w=>o("orderSystem"))},[W(f,{size:"2rem"},{default:X(()=>[W(p)]),_:1}),Kce],2),k("div",{class:T(["list-item",{active:i(n).name=="saleHome"}]),onClick:u[3]||(u[3]=w=>o("saleHome"))},[W(f,{size:"2rem"},{default:X(()=>[W(h)]),_:1}),Wce],2),k("div",{class:T(["list-item",{active:i(n).name=="saleOrder"}]),onClick:u[4]||(u[4]=w=>o("saleOrder"))},[W(f,{size:"2rem"},{default:X(()=>[W(m)]),_:1}),jce],2),k("div",{class:T(["list-item",{active:i(n).name=="convert"}]),onClick:u[5]||(u[5]=w=>o("convert"))},[W(f,{size:"2rem"},{default:X(()=>[W(v)]),_:1}),qce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:u[6]||(u[6]=w=>o("shop"))},[W(f,{size:"2rem"},{default:X(()=>[W(y)]),_:1}),Uce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderCount"}]),onClick:u[7]||(u[7]=w=>o("orderCount"))},[W(f,{size:"2rem"},{default:X(()=>[W(g)]),_:1}),Yce],2)])}}},Xce=dv(Gce,[["__scopeId","data-v-fb29f1d7"]]),Jce={class:"common-layout"},Zce={__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=Ge("el-header"),a=Ge("el-aside"),l=Ge("router-view"),s=Ge("el-main"),u=Ge("el-container");return _(),M("div",Jce,[W(u,null,{default:X(()=>[W(r,null,{default:X(()=>[W(Bce)]),_:1}),W(u,null,{default:X(()=>[W(a,{width:"6.25rem"},{default:X(()=>[W(Xce)]),_:1}),W(s,{style:{color:"#333"}},{default:X(()=>[W(l,{class:"my-main"},{default:X(({Component:c})=>[W(tn,{name:"el-zoom-in-top"},{default:X(()=>[(_(),le(it(c)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Qce=dv(Zce,[["__scopeId","data-v-4838f8ab"]]),ede=[{path:"/",name:"layout",component:Qce,redirect:"/home",meta:{title:"里海收银系统"},children:[{path:"/home",name:"home",meta:{title:"收银"},component:()=>go(()=>import("./index-CrQrxznr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)},{path:"/order",name:"order",meta:{title:"收银订单"},component:()=>go(()=>import("./index-BDXt3eD9.js"),__vite__mapDeps([8,9,1,2,6,10,4,11]),import.meta.url)},{path:"/orderSystem",name:"orderSystem",meta:{title:"平台订单"},component:()=>go(()=>import("./indexSystem-1JAJF7pd.js"),__vite__mapDeps([12,9,1,2,6,10,4,11]),import.meta.url)},{path:"/saleHome",name:"saleHome",meta:{title:"批发"},component:()=>go(()=>import("./index-BgRu0AKO.js"),__vite__mapDeps([13,1,2,3,4,5,6,14]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"批发订单"},component:()=>go(()=>import("./index-Bt0WA8xE.js"),__vite__mapDeps([15,1,2,6,4,16]),import.meta.url)},{path:"/orderList",name:"orderList",meta:{title:"统计"},component:()=>go(()=>import("./indexList-DjuP9zSZ.js"),__vite__mapDeps([17,1,2,6,18]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"统计"},component:()=>go(()=>import("./indexCount-CyhOCMNk.js"),__vite__mapDeps([19,1,2,20]),import.meta.url)},{path:"/shop",name:"shop",component:()=>go(()=>import("./index-4FXhzo2S.js"),__vite__mapDeps([21,5,22]),import.meta.url)},{path:"/convert",name:"convert",component:()=>go(()=>import("./index-7h6j3_TZ.js"),__vite__mapDeps([23,1,2,6,4,24]),import.meta.url)}]},{path:"/login",name:"login",component:()=>go(()=>import("./index-CpiT-n_t.js"),__vite__mapDeps([25,26]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>go(()=>import("./index-CExmDAMs.js"),__vite__mapDeps([]),import.meta.url)}],Tb=Qie({history:$ie(),routes:ede});Tb.beforeEach((e,t,n)=>{const o=rv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ob=Tb,Ni=Og(Z5);for(const[e,t]of Object.entries(ML))Ni.component(e,t);const tde=oue();Ni.use(Ob);Ni.use(tde);Ni.use(Use,{locale:Yse});Ni.mount("#app");export{ob as A,wr as B,Cr as C,xce as D,Ts as E,Ke as F,Ai as G,bt as H,y2 as I,S as J,ade as K,lde as L,dv as _,Ho as a,Ge as b,_ as c,le as d,k as e,W as f,gt as g,M as h,ht as i,xc 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,Te as t,rv as u,j4 as v,X as w,q4 as x,sr as y,tue as z}; diff --git a/dist/assets/index-CkJgicje.js b/dist/assets/index-CkJgicje.js deleted file mode 100644 index efbd0f6..0000000 --- a/dist/assets/index-CkJgicje.js +++ /dev/null @@ -1 +0,0 @@ -import{o as r,d as o}from"./detail-ttCarTU-.js";import{p as t}from"./padding-C_XosNLD.js";import{c as a,h as s,f as e}from"./index-BK45VPeO.js";import"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js";import"./pay-jKmmbq3P.js";const c={class:"my-card"},u={__name:"index",setup(d){return(i,l)=>(a(),s("div",c,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/index-yyXTBNDo.js b/dist/assets/index-CpiT-n_t.js similarity index 96% rename from dist/assets/index-yyXTBNDo.js rename to dist/assets/index-CpiT-n_t.js index 888ebec..f93472d 100644 --- a/dist/assets/index-yyXTBNDo.js +++ b/dist/assets/index-CpiT-n_t.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-BK45VPeO.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-CcL11pmG.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-CtqT8OOG.js b/dist/assets/index-CrQrxznr.js similarity index 97% rename from dist/assets/index-CtqT8OOG.js rename to dist/assets/index-CrQrxznr.js index 34d7a30..3e14d68 100644 --- a/dist/assets/index-CtqT8OOG.js +++ b/dist/assets/index-CrQrxznr.js @@ -1 +1 @@ -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_43f405bf_lang-UtIhw1Q5.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-BK45VPeO.js";import{_ as fe}from"./lodash-BI5zS7wc.js";import{p as me}from"./padding-C_XosNLD.js";import{g as he,s as ge}from"./shop-DFQI72f9.js";import{p as ye}from"./pay-jKmmbq3P.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}; +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_43f405bf_lang-C8kjmal_.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-CcL11pmG.js";import{_ as fe}from"./lodash-dOU8z0Ic.js";import{p as me}from"./padding-DMrFdNq8.js";import{g as he,s as ge}from"./shop-2NnNJ0bO.js";import{p as ye}from"./pay-DyWgnXLl.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/index-D47b-Quu.css b/dist/assets/index-D47b-Quu.css new file mode 100644 index 0000000..78a1f86 --- /dev/null +++ b/dist/assets/index-D47b-Quu.css @@ -0,0 +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:1px 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:1px 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 - 100px - 14rem);overflow-y:auto}.my-order .order-list .order-item[data-v-c5266ed8]{display:flex;padding:1rem;border-bottom:1px 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 -1px .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:1px 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:1px 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:1px 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:1px 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-b5353384]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-b5353384]{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-b5353384]{background-color:#1890ff;color:#fff}.active-card .title[data-v-b5353384]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-b5353384]{display:flex}.active-card .list div[data-v-b5353384]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-b5353384]{color:#1890ff}[data-v-b5353384]::-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-DrtYBigd.css b/dist/assets/index-DrtYBigd.css deleted file mode 100644 index fc01138..0000000 --- a/dist/assets/index-DrtYBigd.css +++ /dev/null @@ -1 +0,0 @@ -@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:1px solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.my-order[data-v-d5f59937]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-d5f59937]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:1px solid #eee}.my-order .header-nav span[data-v-d5f59937]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-d5f59937]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-d5f59937]{height:calc(100vh - 100px - 14rem);overflow-y:auto}.my-order .order-list .order-item[data-v-d5f59937]{display:flex;padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .order-item .order-item-img[data-v-d5f59937]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-d5f59937]{flex:1;box-sizing:border-box;padding-left:12px;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-d5f59937]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-d5f59937]{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-d5f59937]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-d5f59937]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-d5f59937]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px .625rem #eee}.my-order .order-footer .order-total[data-v-d5f59937]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:1px solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-d5f59937]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-d5f59937]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-d5f59937]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-d5f59937]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-d5f59937]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-d5f59937]{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:1px 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:1px 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:1px 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}.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/indexCount-B1uCmjon.js b/dist/assets/indexCount-CyhOCMNk.js similarity index 95% rename from dist/assets/indexCount-B1uCmjon.js rename to dist/assets/indexCount-CyhOCMNk.js index e2a9129..01ce462 100644 --- a/dist/assets/indexCount-B1uCmjon.js +++ b/dist/assets/indexCount-CyhOCMNk.js @@ -1 +1 @@ -import{h as x,i as P}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js";import{_ as b,u as w,r as o,b as u,j as I,q as S,c as p,h,e,t,s as C,f as i,w as m,g as D,v as F,x as N,A as V}from"./index-BK45VPeO.js";const a=c=>(F("data-v-ec016dae"),c=c(),N(),c),k={"element-loading-text":"加载中",class:"my-order"},A={key:0,class:"from"},B={class:"form-card green"},L=a(()=>e("div",{class:"tips"},"今日线上收银金额",-1)),O={class:"form-card green"},j=a(()=>e("div",{class:"tips"},"昨日线上收银金额",-1)),q={class:"form-card green"},E=a(()=>e("div",{class:"tips"},"本月线上收银金额",-1)),R={class:"form-card"},T=a(()=>e("div",{class:"tips"},"今日收银 线上+现金 总金额",-1)),U={class:"form-card"},z=a(()=>e("div",{class:"tips"},"本月收银 线上+现金 总金额",-1)),G={class:"form-card red"},H=a(()=>e("div",{class:"tips"},"今日现金收银金额",-1)),J={class:"form-card red"},K=a(()=>e("div",{class:"tips"},"昨日现金收银金额",-1)),M={class:"form-card red"},Q=a(()=>e("div",{class:"tips"},"本月现金收银金额",-1)),W={class:"form-card"},X=a(()=>e("div",{class:"tips"},"昨日收银 线上+现金 总金额",-1)),Y={class:"table"},Z={__name:"indexCount",setup(c){const l=w(),_=o([]);V(),o(1),o(null);const y=o({page:1,limit:15,staff_id:l.userInfo.service.service_id}),n=o(!1);o(0),(()=>{x(l.userInfo.service.mer_id,y.value).then(r=>{_.value=r.data})})();const s=o({});return(()=>{n.value=!0,P(l.userInfo.service.mer_id,{staff_id:l.userInfo.service.service_id}).then(r=>{s.value=r.data.data,n.value=!1})})(),(r,se)=>{const d=u("el-table-column"),f=u("el-table"),g=I("loading");return S((p(),h("div",k,[s.value.today?(p(),h("div",A,[e("div",B,[e("div",null,t(s.value.today.payPrice),1),L]),e("div",O,[e("div",null,t(s.value.yesterday.payPrice),1),j]),e("div",q,[e("div",null,t(s.value.month.payPrice),1),E]),e("div",R,[e("div",null,t((s.value.today.cashPayment+s.value.today.payPrice).toFixed(2)),1),T]),e("div",U,[e("div",null,t((s.value.month.cashPayment+s.value.month.payPrice).toFixed(2)),1),z]),e("div",G,[e("div",null,t(s.value.today.cashPayment),1),H]),e("div",J,[e("div",null,t(s.value.yesterday.cashPayment),1),K]),e("div",M,[e("div",null,t(s.value.month.cashPayment),1),Q]),e("div",W,[e("div",null,t((s.value.yesterday.cashPayment+s.value.yesterday.payPrice).toFixed(2)),1),X])])):C("",!0),e("div",Y,[i(f,{data:_.value,style:{width:"100%"}},{default:m(()=>[i(d,{prop:"day",label:"日期",width:"260"}),i(d,{prop:"total",label:"订单数量"}),i(d,{prop:"cash_payment",label:"现金收银金额"}),i(d,{prop:"pay_price",label:"线上收银金额"}),i(d,{label:"总金额"},{default:m(v=>[D(t(((+v.row.pay_price||0)+(+v.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[g,n.value]])}}},oe=b(Z,[["__scopeId","data-v-ec016dae"]]);export{oe as default}; +import{h as x,i as P}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js";import{_ as b,u as w,r as o,b as u,j as I,q as S,c as p,h,e,t,s as C,f as i,w as m,g as D,v as F,x as N,A as V}from"./index-CcL11pmG.js";const a=c=>(F("data-v-ec016dae"),c=c(),N(),c),k={"element-loading-text":"加载中",class:"my-order"},A={key:0,class:"from"},B={class:"form-card green"},L=a(()=>e("div",{class:"tips"},"今日线上收银金额",-1)),O={class:"form-card green"},j=a(()=>e("div",{class:"tips"},"昨日线上收银金额",-1)),q={class:"form-card green"},E=a(()=>e("div",{class:"tips"},"本月线上收银金额",-1)),R={class:"form-card"},T=a(()=>e("div",{class:"tips"},"今日收银 线上+现金 总金额",-1)),U={class:"form-card"},z=a(()=>e("div",{class:"tips"},"本月收银 线上+现金 总金额",-1)),G={class:"form-card red"},H=a(()=>e("div",{class:"tips"},"今日现金收银金额",-1)),J={class:"form-card red"},K=a(()=>e("div",{class:"tips"},"昨日现金收银金额",-1)),M={class:"form-card red"},Q=a(()=>e("div",{class:"tips"},"本月现金收银金额",-1)),W={class:"form-card"},X=a(()=>e("div",{class:"tips"},"昨日收银 线上+现金 总金额",-1)),Y={class:"table"},Z={__name:"indexCount",setup(c){const l=w(),_=o([]);V(),o(1),o(null);const y=o({page:1,limit:15,staff_id:l.userInfo.service.service_id}),n=o(!1);o(0),(()=>{x(l.userInfo.service.mer_id,y.value).then(r=>{_.value=r.data})})();const s=o({});return(()=>{n.value=!0,P(l.userInfo.service.mer_id,{staff_id:l.userInfo.service.service_id}).then(r=>{s.value=r.data.data,n.value=!1})})(),(r,se)=>{const d=u("el-table-column"),f=u("el-table"),g=I("loading");return S((p(),h("div",k,[s.value.today?(p(),h("div",A,[e("div",B,[e("div",null,t(s.value.today.payPrice),1),L]),e("div",O,[e("div",null,t(s.value.yesterday.payPrice),1),j]),e("div",q,[e("div",null,t(s.value.month.payPrice),1),E]),e("div",R,[e("div",null,t((s.value.today.cashPayment+s.value.today.payPrice).toFixed(2)),1),T]),e("div",U,[e("div",null,t((s.value.month.cashPayment+s.value.month.payPrice).toFixed(2)),1),z]),e("div",G,[e("div",null,t(s.value.today.cashPayment),1),H]),e("div",J,[e("div",null,t(s.value.yesterday.cashPayment),1),K]),e("div",M,[e("div",null,t(s.value.month.cashPayment),1),Q]),e("div",W,[e("div",null,t((s.value.yesterday.cashPayment+s.value.yesterday.payPrice).toFixed(2)),1),X])])):C("",!0),e("div",Y,[i(f,{data:_.value,style:{width:"100%"}},{default:m(()=>[i(d,{prop:"day",label:"日期",width:"260"}),i(d,{prop:"total",label:"订单数量"}),i(d,{prop:"cash_payment",label:"现金收银金额"}),i(d,{prop:"pay_price",label:"线上收银金额"}),i(d,{label:"总金额"},{default:m(v=>[D(t(((+v.row.pay_price||0)+(+v.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[g,n.value]])}}},oe=b(Z,[["__scopeId","data-v-ec016dae"]]);export{oe as default}; diff --git a/dist/assets/indexList-dE38YFMr.js b/dist/assets/indexList-DjuP9zSZ.js similarity index 94% rename from dist/assets/indexList-dE38YFMr.js rename to dist/assets/indexList-DjuP9zSZ.js index 6c116e0..adb0a87 100644 --- a/dist/assets/indexList-dE38YFMr.js +++ b/dist/assets/indexList-DjuP9zSZ.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_43f405bf_lang-UtIhw1Q5.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-BK45VPeO.js";import{p as oe}from"./pay-jKmmbq3P.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_43f405bf_lang-C8kjmal_.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-CcL11pmG.js";import{p as oe}from"./pay-DyWgnXLl.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-1JAJF7pd.js b/dist/assets/indexSystem-1JAJF7pd.js new file mode 100644 index 0000000..68de201 --- /dev/null +++ b/dist/assets/indexSystem-1JAJF7pd.js @@ -0,0 +1 @@ +import{o as r,d as t}from"./detail-CAr0jMyU.js";import{p as o}from"./padding-DMrFdNq8.js";import{c as s,h as a,f as e}from"./index-CcL11pmG.js";import"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js";import"./pay-DyWgnXLl.js";const i={class:"my-card"},u={__name:"indexSystem",setup(m){return(c,d)=>(s(),a("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef",isSystem:""},null,512),e(o),e(t,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/indexSystem-BjRZnOOI.js b/dist/assets/indexSystem-BjRZnOOI.js deleted file mode 100644 index cd6615a..0000000 --- a/dist/assets/indexSystem-BjRZnOOI.js +++ /dev/null @@ -1 +0,0 @@ -import{o as r,d as t}from"./detail-ttCarTU-.js";import{p as o}from"./padding-C_XosNLD.js";import{c as s,h as a,f as e}from"./index-BK45VPeO.js";import"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js";import"./pay-jKmmbq3P.js";const i={class:"my-card"},u={__name:"indexSystem",setup(m){return(c,d)=>(s(),a("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef",isSystem:""},null,512),e(o),e(t,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/lodash-BI5zS7wc.js b/dist/assets/lodash-dOU8z0Ic.js similarity index 99% rename from dist/assets/lodash-BI5zS7wc.js rename to dist/assets/lodash-dOU8z0Ic.js index 84aa661..6180d7b 100644 --- a/dist/assets/lodash-BI5zS7wc.js +++ b/dist/assets/lodash-dOU8z0Ic.js @@ -1,4 +1,4 @@ -import{B as jt,C as rp}from"./index-BK45VPeO.js";var Je={exports:{}};/** +import{B as jt,C as rp}from"./index-CcL11pmG.js";var Je={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors diff --git a/dist/assets/padding-C_XosNLD.js b/dist/assets/padding-DMrFdNq8.js similarity index 65% rename from dist/assets/padding-C_XosNLD.js rename to dist/assets/padding-DMrFdNq8.js index a5a67ef..51acf93 100644 --- a/dist/assets/padding-C_XosNLD.js +++ b/dist/assets/padding-DMrFdNq8.js @@ -1 +1 @@ -import{_ as e,c as t,h as c}from"./index-BK45VPeO.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-CcL11pmG.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-jKmmbq3P.js b/dist/assets/pay-DyWgnXLl.js similarity index 97% rename from dist/assets/pay-jKmmbq3P.js rename to dist/assets/pay-DyWgnXLl.js index 341ce23..02cc14a 100644 --- a/dist/assets/pay-jKmmbq3P.js +++ b/dist/assets/pay-DyWgnXLl.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-BK45VPeO.js";import{k as Y,l as Ce,g as Se}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js";const A=b=>{if(!b)return;let T=new window.SpeechSynthesisUtterance(b);window.speechSynthesis.speak(T)},E=b=>(be("data-v-43f405bf"),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:800,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-43f405bf"]]);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-CcL11pmG.js";import{k as Y,l as Ce,g as Se}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js";const A=b=>{if(!b)return;let T=new window.SpeechSynthesisUtterance(b);window.speechSynthesis.speak(T)},E=b=>(be("data-v-43f405bf"),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:800,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-43f405bf"]]);export{ea as p}; diff --git a/dist/assets/pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js b/dist/assets/pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js similarity index 93% rename from dist/assets/pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js rename to dist/assets/pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js index 234ee1d..cb0e1bc 100644 --- a/dist/assets/pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js +++ b/dist/assets/pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-C8kjmal_.js @@ -1 +1 @@ -import{G as t}from"./index-BK45VPeO.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-CcL11pmG.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-2NnNJ0bO.js b/dist/assets/shop-2NnNJ0bO.js new file mode 100644 index 0000000..647ecb9 --- /dev/null +++ b/dist/assets/shop-2NnNJ0bO.js @@ -0,0 +1 @@ +import{G as e}from"./index-CcL11pmG.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/assets/shop-DFQI72f9.js b/dist/assets/shop-DFQI72f9.js deleted file mode 100644 index 1dde85a..0000000 --- a/dist/assets/shop-DFQI72f9.js +++ /dev/null @@ -1 +0,0 @@ -import{G as e}from"./index-BK45VPeO.js";function a(t,r){return e.get(`server/${t}/product/lst`,{params:r})}function p(t,r){return e.get(`store/product/detail/${t}`,{params:r})}function o(t,r){return e.post(`user_free_trial/${t}`,r)}function i(t,r){return e.get(`server/${t}/product/title`,{params:r})}function n(t,r,s){return e.post(`server/${t}/product/status/${r}`,s)}function c(t,r){return e.get(`server/${t}/category/list`,{params:r})}function d(t,r){return e.post(`server/${t}/product/create`,r)}function f(t,r,s){return e.post(`server/${t}/product/update/${r}`,s)}function l(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}function $(t){return e.get("product/spu/lst",{params:t})}export{$ as a,d as b,c,f as d,i as e,n as f,p as g,l as p,a as s,o as u}; diff --git a/dist/index.html b/dist/index.html index c04c92e..0ef228e 100644 --- a/dist/index.html +++ b/dist/index.html @@ -40,7 +40,7 @@ } } - + diff --git a/src/api/shop.js b/src/api/shop.js index 294eb2d..ee703a2 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -68,4 +68,11 @@ export function productDetailApi(mer_id, id, data) { */ export function saleStoreListApi(data) { return request.get(`product/spu/lst`, { params: data }) +} + +/** + * @description 店铺商品分类 + */ +export function merchantCategoryListApi(id, data) { + return request.get(`store/merchant/category/lst/${id}`, { params: data }) } \ No newline at end of file diff --git a/src/views/saleHome/component/classify.vue b/src/views/saleHome/component/classify.vue new file mode 100644 index 0000000..9105a16 --- /dev/null +++ b/src/views/saleHome/component/classify.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/views/saleHome/index.vue b/src/views/saleHome/index.vue index 46aab9c..da9aff3 100644 --- a/src/views/saleHome/index.vue +++ b/src/views/saleHome/index.vue @@ -3,6 +3,7 @@ import order from "./component/order.vue"; import shop from "./component/shop.vue"; import padding from "@/components/padding.vue"; import pupop from "./component/pupop.vue"; +import classify from "./component/classify.vue"; import pay from "@/components/pay.vue"; import { ref, nextTick, onMounted, onUnmounted } from "vue"; import { cartCreateApi, orderCheckApi } from "@/api/store.js"; @@ -170,6 +171,8 @@ onUnmounted(() => { @loadMore="loadMore" /> + +