From 6de147a86cfc85ebe1592eb2960a7c054a4d4fe7 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 24 May 2024 10:24:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/assets/detail-B501BovZ.js | 2 +- build/assets/index-DyOBkluf.js | 2 +- build/assets/index-aor5IsC-.js | 2 +- dist/assets/detail-SSwoB7VG.js | 2 +- dist/assets/index-BcmmN2mF.js | 2 +- dist/assets/index-CaeMrXBn.js | 2 +- dist/assets/index-D5NVVZ9r.js | 2 +- dist/assets/index-Do69Dp-3.js | 2 +- src/views/convert/component/order.vue | 4 +- src/views/home/component/shop.vue | 4 +- src/views/order/component/detail.vue | 4 +- src/views/order/component/order.vue | 4 +- src/views/purchaseOrder/component/detail.vue | 4 +- src/views/purchaseOrder/component/order.vue | 4 +- src/views/purchaseOrder/component/sub.vue | 4 +- src/views/saleHome/component/shop.vue | 4 +- src/views/saleOrder/component/detail.vue | 4 +- src/views/saleOrder/component/order.vue | 4 +- src/views/wallet/component/detail.vue | 53 ++++++++++++-------- src/views/wallet/component/order.vue | 4 +- 20 files changed, 61 insertions(+), 52 deletions(-) diff --git a/build/assets/detail-B501BovZ.js b/build/assets/detail-B501BovZ.js index 15a1f66..cab253e 100644 --- a/build/assets/detail-B501BovZ.js +++ b/build/assets/detail-B501BovZ.js @@ -1 +1 @@ -import{_ as j,u as H,r,b as g,l as Y,c as t,h as s,e,t as d,f as c,w as u,g as m,p as Q,v as q,F,i as M,s as A,d as K,x as l,m as O,C as W,E as R,y as X,z as Z}from"./index-DUM_3Px5.js";import{e as ee,f as te,g as se}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-CPz3lDzO.js";import{p as oe}from"./pay-BIYaSPbP.js";const ae={class:"my-order"},ie={class:"header-nav"},le={class:"nav-item"},ne={class:"nav-item-btn"},de={class:"header-input"},ce={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},re=["onClick"],_e={class:"top"},ue={class:"create-time"},ve={class:"shop"},pe={key:0,class:"left"},fe={key:0,class:"shop-name"},me={class:"right"},he={class:"money"},ye={class:"count"},ge={class:"bottom"},ke={class:"pay"},$e={key:0},be={key:0},Ce={key:1},Ve={key:2},Se={key:3},we={key:4},Pe={key:5},Le={key:6},De={key:1,style:{color:"#ff4a00"}},Ie={key:0,class:"cashier"},Ae={key:1,class:"cashier"},xe={key:0,class:"load-end"},ze={key:1,class:"load-end"},Be={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup(V){const L=H(),o=V;r([]);const $=r(1),x=k=>{v.value.page=1,S.value=!1,p.value=!1,b.value=[],n(!0)};r(null);const y=r(""),D=()=>{v.value.date=y.value.join("-"),n(!0)},v=r({page:1,limit:20,search_info:"",date:""}),p=r(!1),z=r(0),P=r(0),S=r(!1),b=r([]),n=(k=!1)=>{if(k)v.value.page=1;else if(S.value||p.value)return;o.isSystem||(v.value.staff_id=L.userInfo.service.service_id),p.value=!0,$.value==1&&(v.value.paid=null),$.value==2&&(v.value.paid=0),ee(L.userInfo.service.mer_id,v.value).then(i=>{k?b.value=i.data.list:b.value=[...b.value,...i.data.list],i.data.list.length{S.value=!0,p.value=!1})},_=(k,i)=>{P.value=i,O.emit("set-order-detail",k)};return(k,i)=>{const I=g("el-radio-button"),C=g("el-radio-group"),B=g("el-date-picker"),U=g("el-button"),f=g("el-input"),w=g("el-image"),T=Y("loading"),G=Y("infinite-scroll");return t(),s("div",ae,[e("div",ie,[e("div",le,d(V.isSystem?"平台订单":"收银订单"),1),e("div",ne,[c(C,{modelValue:$.value,"onUpdate:modelValue":i[0]||(i[0]=a=>$.value=a),onChange:x,size:"small"},{default:u(()=>[c(I,{value:1},{default:u(()=>[m("全部")]),_:1}),c(I,{value:2},{default:u(()=>[m("未支付")]),_:1})]),_:1},8,["modelValue"]),c(B,{modelValue:y.value,"onUpdate:modelValue":i[1]||(i[1]=a=>y.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:D,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",de,[c(f,{modelValue:v.value.search_info,"onUpdate:modelValue":i[3]||(i[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=Q(a=>n(!0),["enter"])),onClear:i[5]||(i[5]=a=>n(!0)),clearable:""},{append:u(()=>[c(U,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:i[2]||(i[2]=a=>n(!0))},{default:u(()=>[m("搜索")]),_:1})]),_:1},8,["modelValue"])]),q((t(),s("div",ce,[(t(!0),s(F,null,M(b.value,(a,E)=>(t(),s("div",{class:A(["item",{"item-active":P.value==E}]),key:E,onClick:N=>_(a,E)},[e("div",_e,[e("div",{class:A(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+d(a.order_sn),3),e("div",ue,d(a.create_time),1)]),e("div",ve,[a.orderProduct?(t(),s("div",pe,[(t(!0),s(F,null,M(a.orderProduct.slice(0,5),(N,J)=>(t(),K(w,{key:J,src:N.cart_info.productAttr.image||N.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",fe,d(a.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",me,[e("div",he,"¥"+d(a.pay_price),1),e("div",ye,"共"+d(a.total_num)+"件商品",1)])]),e("div",ge,[e("div",ke,[a.paid?(t(),s("div",$e,[m(" 已支付 "),a.pay_type==13?(t(),s("span",be,"(支付宝收款)")):l("",!0),a.pay_type==12?(t(),s("span",Ce,"(现金支付)")):l("",!0),a.pay_type==11?(t(),s("span",Ve,"(微信收款)")):l("",!0),a.pay_type==0?(t(),s("span",Se,"(余额支付)")):l("",!0),a.pay_type==1?(t(),s("span",we,"(微信支付)")):l("",!0),a.pay_type==9?(t(),s("span",Pe,"(商户余额支付)")):l("",!0),a.pay_type==10?(t(),s("span",Le,"(对公转账)")):l("",!0)])):(t(),s("div",De,"未支付"))]),a.service_info?(t(),s("div",Ie," 收银员: "+d(a.service_info.nickname),1)):(t(),s("div",Ae,"平台订单"))])],10,re))),128)),S.value?(t(),s("div",xe,"没有更多了")):l("",!0),p.value?(t(),s("div",ze,"加载中...")):l("",!0)])),[[T,p.value],[G,n]])])}}},Tt=j(Be,[["__scopeId","data-v-1fde361d"]]),h=V=>(X("data-v-f0903720"),V=V(),Z(),V),Ue={class:"my-order"},Ee={class:"header-nav"},Ne=["onClick"],Re={class:"detail"},Ye={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},Me={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Oe={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},je=h(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},qe={class:"info-item"},Ge=h(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=h(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=h(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=h(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=h(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},ct=h(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),rt={class:"info-item-info"},_t={class:"info-item"},ut=h(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),vt={class:"info-item-info"},pt={key:0},ft={key:1},mt={key:2},ht={key:3},yt={key:4},gt={key:5},kt={key:6},$t={key:0,class:"table-title"},bt={key:1,class:"table-info",style:{"flex-direction":"column"}},Ct={class:"info-item"},Vt=h(()=>e("div",{class:"info-item-title"},"头像:",-1)),St={class:"info-item-info"},wt={class:"info-item"},Pt=h(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Lt={class:"info-item-info"},Dt={class:"info-item"},It=h(()=>e("div",{class:"info-item-title"},"账号:",-1)),At={class:"info-item-info"},xt={key:2,class:"footer"},zt={class:"info"},Bt={class:"ser"},Ut={class:"price"},Et={key:0,class:"handle"},Nt={key:1,class:"handle"},Rt=h(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Yt={class:"dialog-footer"},Ft={__name:"detail",setup(V){H();const L=W(),o=r({});O.on("set-order-detail",n=>{o.value=n}),r([]);const $=r(null),x=r(!1);r(0);const y=r(0),D=r(["商品信息","订单详情"]),v=r(""),p=r(!1),z=n=>{v.value=n,p.value=!0},P=()=>{p.value=!1,te({order_sn:v.value}).then(n=>{R({message:n.message,type:"success"}),L.push({name:"home"})})},S=n=>{$.value.setRePay({price:n.pay_price,order_id:n.group_order_id}),$.value.drawer=!0},b=n=>{se({order_sn:n}).then(_=>{_.data.paid==1||_.message=="支付成功"?R({message:_.message,type:"success"}):R({message:_.message,type:"error"})}).catch(_=>{})};return(n,_)=>{const k=g("el-image"),i=g("el-table-column"),I=g("el-table"),C=g("el-button"),B=g("el-dialog"),U=Y("loading");return t(),s("div",Ue,[e("div",Ee,[(t(!0),s(F,null,M(D.value,(f,w)=>(t(),s("div",{key:w,class:A(["nav-item",{"nav-item-active":y.value==w,"nav-item-radius1":y.value==w+1,"nav-item-radius2":y.value==w-1}]),onClick:T=>y.value=w},d(f),11,Ne))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":y.value==D.value.length-1}]),style:{flex:"1"}},null,2)]),q((t(),s("div",Re,[o.value.orderProduct&&y.value==0?(t(),s("div",Ye,[e("div",Fe,[m(" 共计 "),e("span",Me,d(o.value.total_num),1),m(" 件商品 ")]),c(I,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[c(i,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:f})=>[e("div",Ke,[c(k,{style:{height:"3rem",width:"3rem"},src:f.cart_info.productAttr.image||f.cart_info.product.image},null,8,["src"]),e("span",Oe,d(f.cart_info.product.store_name),1)])]),_:1}),c(i,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(i,{prop:"product_num",label:"数量",width:"150"}),c(i,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&y.value==1?(t(),s("div",Te,[je,e("div",He,[e("div",qe,[Ge,e("div",Je,d(o.value.create_time),1)]),e("div",Qe,[We,e("div",Xe,d(o.value.total_num),1)]),e("div",Ze,[et,e("div",tt,"¥"+d(o.value.total_price),1)]),e("div",st,[ot,e("div",at,d(o.value.pay_time),1)]),e("div",it,[lt,e("div",nt,"¥"+d(o.value.deduction_price),1)]),e("div",dt,[ct,e("div",rt,"¥"+d(o.value.pay_price),1)]),e("div",_t,[ut,e("div",vt,[o.value.pay_type==11?(t(),s("span",pt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",ft,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",mt,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",ht,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",yt,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",gt,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",kt,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",$t,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",bt,[e("div",Ct,[Vt,e("div",St,[c(k,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",wt,[Pt,e("div",Lt,d(o.value.service_info.nickname),1)]),e("div",Dt,[It,e("div",At,d(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),o.value.service_info?(t(),s("div",xt,[e("div",zt,[e("div",Bt,"收银员: "+d(o.value.service_info.nickname),1),e("div",Ut,[m(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.pay_time?(t(),s("div",Nt,"已支付")):(t(),s("div",Et,[c(C,{class:"btn",type:"primary",onClick:_[0]||(_[0]=f=>S(o.value))},{default:u(()=>[m("重新支付")]),_:1}),c(C,{class:"btn",type:"primary",onClick:_[1]||(_[1]=f=>b(o.value.order_sn))},{default:u(()=>[m("检测状态")]),_:1}),c(C,{class:"btn",type:"success",onClick:_[2]||(_[2]=f=>z(o.value.order_sn))},{default:u(()=>[m("提单")]),_:1})]))])):l("",!0)])),[[U,x.value]]),c(oe,{ref_key:"payRef",ref:$},null,512),c(B,{modelValue:p.value,"onUpdate:modelValue":_[4]||(_[4]=f=>p.value=f),title:"提示",width:"500"},{footer:u(()=>[e("div",Yt,[c(C,{onClick:_[3]||(_[3]=f=>p.value=!1)},{default:u(()=>[m("取消")]),_:1}),n.cartCount>0?(t(),K(C,{key:0,onClick:n.goHome},{default:u(()=>[m(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(C,{key:1,type:"primary",onClick:P},{default:u(()=>[m(" 确认提单 ")]),_:1}))])]),default:u(()=>[Rt]),_:1},8,["modelValue"])])}}},jt=j(Ft,[["__scopeId","data-v-f0903720"]]);export{jt as d,Tt as o}; +import{_ as j,u as H,r,b as g,l as Y,c as t,h as s,e,t as d,f as c,w as u,g as m,p as Q,v as q,F,i as M,s as A,d as K,x as l,m as O,C as W,E as R,y as X,z as Z}from"./index-DUM_3Px5.js";import{e as ee,f as te,g as se}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-CPz3lDzO.js";import{p as oe}from"./pay-BIYaSPbP.js";const ae={class:"my-order"},ie={class:"header-nav"},le={class:"nav-item"},ne={class:"nav-item-btn"},de={class:"header-input"},ce={class:"order-list",":infinite-scroll-distance":"300",":infinite-scroll-delay":"500",style:{overflow:"auto"}},re=["onClick"],_e={class:"top"},ue={class:"create-time"},ve={class:"shop"},pe={key:0,class:"left"},fe={key:0,class:"shop-name"},me={class:"right"},he={class:"money"},ye={class:"count"},ge={class:"bottom"},ke={class:"pay"},$e={key:0},be={key:0},Ce={key:1},Ve={key:2},Se={key:3},we={key:4},Pe={key:5},Le={key:6},De={key:1,style:{color:"#ff4a00"}},Ie={key:0,class:"cashier"},Ae={key:1,class:"cashier"},xe={key:0,class:"load-end"},ze={key:1,class:"load-end"},Be={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup(V){const L=H(),o=V;r([]);const $=r(1),x=k=>{v.value.page=1,S.value=!1,p.value=!1,b.value=[],n(!0)};r(null);const y=r(""),D=()=>{v.value.date=y.value.join("-"),n(!0)},v=r({page:1,limit:20,search_info:"",date:""}),p=r(!1),z=r(0),P=r(0),S=r(!1),b=r([]),n=(k=!1)=>{if(k)v.value.page=1;else if(S.value||p.value)return;o.isSystem||(v.value.staff_id=L.userInfo.service.service_id),p.value=!0,$.value==1&&(v.value.paid=null),$.value==2&&(v.value.paid=0),ee(L.userInfo.service.mer_id,v.value).then(i=>{k?b.value=i.data.list:b.value=[...b.value,...i.data.list],i.data.list.length{S.value=!0,p.value=!1})},_=(k,i)=>{P.value=i,O.emit("set-order-detail",k)};return(k,i)=>{const I=g("el-radio-button"),C=g("el-radio-group"),B=g("el-date-picker"),U=g("el-button"),f=g("el-input"),w=g("el-image"),T=Y("loading"),G=Y("infinite-scroll");return t(),s("div",ae,[e("div",ie,[e("div",le,d(V.isSystem?"平台订单":"收银订单"),1),e("div",ne,[c(C,{modelValue:$.value,"onUpdate:modelValue":i[0]||(i[0]=a=>$.value=a),onChange:x,size:"small"},{default:u(()=>[c(I,{value:1},{default:u(()=>[m("全部")]),_:1}),c(I,{value:2},{default:u(()=>[m("未支付")]),_:1})]),_:1},8,["modelValue"]),c(B,{modelValue:y.value,"onUpdate:modelValue":i[1]||(i[1]=a=>y.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:D,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",de,[c(f,{modelValue:v.value.search_info,"onUpdate:modelValue":i[3]||(i[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=Q(a=>n(!0),["enter"])),onClear:i[5]||(i[5]=a=>n(!0)),clearable:""},{append:u(()=>[c(U,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:i[2]||(i[2]=a=>n(!0))},{default:u(()=>[m("搜索")]),_:1})]),_:1},8,["modelValue"])]),q((t(),s("div",ce,[(t(!0),s(F,null,M(b.value,(a,E)=>(t(),s("div",{class:A(["item",{"item-active":P.value==E}]),key:E,onClick:N=>_(a,E)},[e("div",_e,[e("div",{class:A(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+d(a.order_sn),3),e("div",ue,d(a.create_time),1)]),e("div",ve,[a.orderProduct?(t(),s("div",pe,[(t(!0),s(F,null,M(a.orderProduct.slice(0,5),(N,J)=>(t(),K(w,{key:J,src:N.cart_info.productAttr.image||N.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",fe,d(a.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",me,[e("div",he,"¥"+d(a.pay_price),1),e("div",ye,"共"+d(a.total_num)+"件商品",1)])]),e("div",ge,[e("div",ke,[a.paid?(t(),s("div",$e,[m(" 已支付 "),a.pay_type==13?(t(),s("span",be,"(支付宝收款)")):l("",!0),a.pay_type==12?(t(),s("span",Ce,"(现金支付)")):l("",!0),a.pay_type==11?(t(),s("span",Ve,"(微信收款)")):l("",!0),a.pay_type==0?(t(),s("span",Se,"(余额支付)")):l("",!0),a.pay_type==1?(t(),s("span",we,"(微信支付)")):l("",!0),a.pay_type==9?(t(),s("span",Pe,"(商户余额支付)")):l("",!0),a.pay_type==10?(t(),s("span",Le,"(对公转账)")):l("",!0)])):(t(),s("div",De,"未支付"))]),a.service_info?(t(),s("div",Ie," 收银员: "+d(a.service_info.nickname),1)):(t(),s("div",Ae,"平台订单"))])],10,re))),128)),S.value?(t(),s("div",xe,"没有更多了")):l("",!0),p.value?(t(),s("div",ze,"加载中...")):l("",!0)])),[[T,p.value],[G,n]])])}}},Tt=j(Be,[["__scopeId","data-v-1fde361d"]]),h=V=>(X("data-v-f0903720"),V=V(),Z(),V),Ue={class:"my-order"},Ee={class:"header-nav"},Ne=["onClick"],Re={class:"detail"},Ye={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},Me={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Oe={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},je=h(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},qe={class:"info-item"},Ge=h(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=h(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=h(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=h(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=h(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},ct=h(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),rt={class:"info-item-info"},_t={class:"info-item"},ut=h(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),vt={class:"info-item-info"},pt={key:0},ft={key:1},mt={key:2},ht={key:3},yt={key:4},gt={key:5},kt={key:6},$t={key:0,class:"table-title"},bt={key:1,class:"table-info",style:{"flex-direction":"column"}},Ct={class:"info-item"},Vt=h(()=>e("div",{class:"info-item-title"},"头像:",-1)),St={class:"info-item-info"},wt={class:"info-item"},Pt=h(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Lt={class:"info-item-info"},Dt={class:"info-item"},It=h(()=>e("div",{class:"info-item-title"},"账号:",-1)),At={class:"info-item-info"},xt={key:2,class:"footer"},zt={class:"info"},Bt={class:"ser"},Ut={class:"price"},Et={key:0,class:"handle"},Nt={key:1,class:"handle"},Rt=h(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Yt={class:"dialog-footer"},Ft={__name:"detail",setup(V){H();const L=W(),o=r({});O.on("set-order-detail",n=>{o.value=n}),r([]);const $=r(null),x=r(!1);r(0);const y=r(0),D=r(["商品信息","订单详情"]),v=r(""),p=r(!1),z=n=>{v.value=n,p.value=!0},P=()=>{p.value=!1,te({order_sn:v.value}).then(n=>{R({message:n.message,type:"success"}),L.push({name:"home"})})},S=n=>{$.value.setRePay({price:n.pay_price,order_id:n.group_order_id}),$.value.drawer=!0},b=n=>{se({order_sn:n}).then(_=>{_.data.paid==1||_.message=="支付成功"?R({message:_.message,type:"success"}):R({message:_.message,type:"error"})}).catch(_=>{})};return(n,_)=>{const k=g("el-image"),i=g("el-table-column"),I=g("el-table"),C=g("el-button"),B=g("el-dialog"),U=Y("loading");return t(),s("div",Ue,[e("div",Ee,[(t(!0),s(F,null,M(D.value,(f,w)=>(t(),s("div",{key:w,class:A(["nav-item",{"nav-item-active":y.value==w,"nav-item-radius1":y.value==w+1,"nav-item-radius2":y.value==w-1}]),onClick:T=>y.value=w},d(f),11,Ne))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":y.value==D.value.length-1}]),style:{flex:"1"}},null,2)]),q((t(),s("div",Re,[o.value.orderProduct&&y.value==0?(t(),s("div",Ye,[e("div",Fe,[m(" 共计 "),e("span",Me,d(o.value.total_num),1),m(" 件商品 ")]),c(I,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[c(i,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:f})=>[e("div",Ke,[c(k,{style:{height:"3rem",width:"3rem"},src:f.cart_info.productAttr.image||f.cart_info.product.image},null,8,["src"]),e("span",Oe,d(f.cart_info.product.store_name),1)])]),_:1}),c(i,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(i,{prop:"product_num",label:"数量",width:"150"}),c(i,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&y.value==1?(t(),s("div",Te,[je,e("div",He,[e("div",qe,[Ge,e("div",Je,d(o.value.create_time),1)]),e("div",Qe,[We,e("div",Xe,d(o.value.total_num),1)]),e("div",Ze,[et,e("div",tt,"¥"+d(o.value.total_price),1)]),e("div",st,[ot,e("div",at,d(o.value.pay_time),1)]),e("div",it,[lt,e("div",nt,"¥"+d(o.value.deduction_price),1)]),e("div",dt,[ct,e("div",rt,"¥"+d(o.value.pay_price),1)]),e("div",_t,[ut,e("div",vt,[o.value.pay_type==11?(t(),s("span",pt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",ft,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",mt,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",ht,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",yt,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",gt,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",kt,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",$t,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",bt,[e("div",Ct,[Vt,e("div",St,[c(k,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",wt,[Pt,e("div",Lt,d(o.value.service_info.nickname),1)]),e("div",Dt,[It,e("div",At,d(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),o.value.service_info?(t(),s("div",xt,[e("div",zt,[e("div",Bt,"收银员: "+d(o.value.service_info.nickname),1),e("div",Ut,[m(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.pay_time?(t(),s("div",Nt,"已支付")):(t(),s("div",Et,[c(C,{class:"btn",type:"primary",onClick:_[0]||(_[0]=f=>S(o.value))},{default:u(()=>[m("重新支付")]),_:1}),c(C,{class:"btn",type:"primary",onClick:_[1]||(_[1]=f=>b(o.value.order_sn))},{default:u(()=>[m("检测状态")]),_:1}),c(C,{class:"btn",type:"success",onClick:_[2]||(_[2]=f=>z(o.value.order_sn))},{default:u(()=>[m("提单")]),_:1})]))])):l("",!0)])),[[U,x.value]]),c(oe,{ref_key:"payRef",ref:$},null,512),c(B,{modelValue:p.value,"onUpdate:modelValue":_[4]||(_[4]=f=>p.value=f),title:"提示",width:"500"},{footer:u(()=>[e("div",Yt,[c(C,{onClick:_[3]||(_[3]=f=>p.value=!1)},{default:u(()=>[m("取消")]),_:1}),n.cartCount>0?(t(),K(C,{key:0,onClick:n.goHome},{default:u(()=>[m(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(C,{key:1,type:"primary",onClick:P},{default:u(()=>[m(" 确认提单 ")]),_:1}))])]),default:u(()=>[Rt]),_:1},8,["modelValue"])])}}},jt=j(Ft,[["__scopeId","data-v-f0903720"]]);export{jt as d,Tt as o}; diff --git a/build/assets/index-DyOBkluf.js b/build/assets/index-DyOBkluf.js index 640390e..63dbfb8 100644 --- a/build/assets/index-DyOBkluf.js +++ b/build/assets/index-DyOBkluf.js @@ -1 +1 @@ -import{_ as G,u as J,r as a,b as w,l as M,c as t,h as s,e,f as c,w as p,g as $,p as Q,v as x,F as T,i as H,x as l,E as L,m as U,s as z,t as d,d as q,y as W,z as X,C as Y,n as j,o as Z,H as O,I as ee}from"./index-DUM_3Px5.js";import{v as te,f as se,i as oe}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-CPz3lDzO.js";import{p as ie}from"./pay-BIYaSPbP.js";import{p as ae}from"./padding-CwOzKUo2.js";const ne=y=>(W("data-v-aaa26790"),y=y(),X(),y),le={class:"my-order"},ce={class:"header-nav"},de=ne(()=>e("div",{class:"nav-item"},"核销订单",-1)),re={class:"nav-item-clear"},_e={class:"header-input"},ue={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500","infinite-scroll-immediate":"false",style:{overflow:"auto"}},ve=["onClick"],pe={class:"top"},fe={class:"create-time"},he={class:"shop"},me={key:0,class:"left"},ye={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},Ce={class:"pay"},Ve={key:0},we={key:0},Se={key:1},xe={key:2},Ie={key:3},Re={key:4},Le={key:5},Pe={key:6},Ae={key:1,style:{color:"#ff4a00"}},Ee={key:0,class:"cashier"},Oe={key:1,class:"cashier"},Ue={key:0,class:"load-end"},ze={key:1,class:"load-end"},Be={__name:"order",emits:["backOne"],setup(y,{expose:k,emit:S}){const I=J();a([]);const o=a(1);a(null);const v=a({page:1,limit:20,search_info:""}),g=a(!1);a(0);const h=a(0),m=a(!1),b=a([]),C=(r=!1)=>{if(!v.value.search_info)return L.error("请输入订单编号");if(r)v.value.page=1;else if(m.value||g.value)return;g.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),b.value=[],U.emit("set-order-detail",{}),te(I.userInfo.service.mer_id,v.value.search_info).then(n=>{b.value=[n.data],U.emit("set-order-detail",b.value[0]),g.value=!1}).catch(n=>{m.value=!0,g.value=!1})},B=(r,n)=>{h.value=n,U.emit("set-order-detail",r)},D=r=>{v.value.search_info=r,C(!0)},P=S,K=()=>{P("backOne")};return k({setCode:D}),(r,n)=>{const u=w("el-button"),E=w("el-input"),N=w("el-image"),F=M("loading"),R=M("infinite-scroll");return t(),s("div",le,[e("div",ce,[de,e("div",re,[c(u,{type:"primary",size:"small",onClick:K},{default:p(()=>[$("返回上一页")]),_:1})])]),e("div",_e,[c(E,{modelValue:v.value.search_info,"onUpdate:modelValue":n[1]||(n[1]=i=>v.value.search_info=i),placeholder:"请输入订单编号",onKeydown:n[2]||(n[2]=Q(i=>C(!0),["enter"])),clearable:""},{append:p(()=>[c(u,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:n[0]||(n[0]=i=>C(!0))},{default:p(()=>[$("搜索")]),_:1})]),_:1},8,["modelValue"])]),x((t(),s("div",ue,[(t(!0),s(T,null,H(b.value,(i,A)=>(t(),s("div",{class:z(["item",{"item-active":h.value==A}]),key:A,onClick:_=>B(i,A)},[e("div",pe,[e("div",{class:z(["sn",i.pay_type===11||i.pay_type===12||i.pay_type===13?"cahier":"cahier2"])},"单号: "+d(i.order_sn),3),e("div",fe,d(i.create_time),1)]),e("div",he,[i.orderProduct?(t(),s("div",me,[(t(!0),s(T,null,H(i.orderProduct.slice(0,5),(_,V)=>(t(),q(N,{key:V,src:_.cart_info.productAttr.image||_.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),i.orderProduct.length==1?(t(),s("div",ye,d(i.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",ke,[e("div",ge,"¥"+d(i.pay_price),1),e("div",$e,"共"+d(i.total_num)+"件商品",1)])]),e("div",be,[e("div",Ce,[i.paid?(t(),s("div",Ve,[$(" 已支付 "),i.pay_type==13?(t(),s("span",we,"(支付宝收款)")):l("",!0),i.pay_type==12?(t(),s("span",Se,"(现金支付)")):l("",!0),i.pay_type==11?(t(),s("span",xe,"(微信收款)")):l("",!0),i.pay_type==0?(t(),s("span",Ie,"(余额支付)")):l("",!0),i.pay_type==1?(t(),s("span",Re,"(微信支付)")):l("",!0),i.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):l("",!0),i.pay_type==10?(t(),s("span",Pe,"(对公转账)")):l("",!0)])):(t(),s("div",Ae,"未支付"))]),i.service_info?(t(),s("div",Ee,"收银员: "+d(i.service_info.nickname),1)):(t(),s("div",Oe,"平台订单"))])],10,ve))),128)),m.value?(t(),s("div",Ue,"没有更多了")):l("",!0),g.value?(t(),s("div",ze,"加载中...")):l("",!0)])),[[F,g.value],[R,C]])])}}},De=G(Be,[["__scopeId","data-v-aaa26790"]]),f=y=>(W("data-v-5d71f69a"),y=y(),X(),y),Ke={class:"my-order"},Ne={class:"header-nav"},Fe=["onClick"],Me={class:"detail"},Te={key:0,class:"table"},He={style:{"font-size":"0.9rem"}},qe={style:{color:"#ff4a00"}},je={style:{display:"flex","align-items":"center"}},Ge={style:{"margin-left":"0.5rem"}},Je={key:1,class:"table"},Qe=f(()=>e("div",{class:"table-title"},"订单信息",-1)),We={class:"table-info"},Xe={class:"info-item"},Ye=f(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=f(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=f(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),at={class:"info-item-info"},nt={class:"info-item"},lt=f(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},rt=f(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),_t={class:"info-item-info"},ut={class:"info-item"},vt=f(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),pt={class:"info-item-info"},ft={class:"info-item"},ht=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),mt={class:"info-item-info"},yt={key:0},kt={key:1},gt={key:2},$t={key:3},bt={key:4},Ct={key:5},Vt={key:6},wt={key:0,class:"table-title"},St={key:1,class:"table-info",style:{"flex-direction":"column"}},xt={class:"info-item"},It=f(()=>e("div",{class:"info-item-title"},"头像:",-1)),Rt={class:"info-item-info"},Lt={class:"info-item"},Pt=f(()=>e("div",{class:"info-item-title"},"昵称:",-1)),At={class:"info-item-info"},Et={class:"info-item"},Ot=f(()=>e("div",{class:"info-item-title"},"账号:",-1)),Ut={class:"info-item-info"},zt={class:"footer"},Bt={class:"info"},Dt={class:"price"},Kt={key:0,class:"handle"},Nt={key:1,class:"handle"},Ft=f(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Mt={class:"dialog-footer"},Tt={__name:"detail",emits:["reInit"],setup(y,{emit:k}){const S=J(),I=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r,j(()=>{var n;(n=P.value)==null||n.toggleAllSelection()})}),a([]);const v=a(null),g=a(!1);a(0);const h=a(0),m=a(["商品信息","订单详情"]),b=a(""),C=a(!1),B=()=>{C.value=!1,se({order_sn:b.value}).then(r=>{L({message:r.message,type:"success"}),I.push({name:"home"})})},D=k,P=a(null),K=()=>{let r=P.value.getSelectionRows();if(r.length==0)return L.error("请选择核销商品");let n={data:[],verify_code:o.value.verify_code};r.forEach(u=>{n.data.push({id:u.order_product_id,num:u.product_num})}),oe(S.userInfo.service.mer_id,o.value.order_id,n).then(u=>{L.success(u.message),D("reInit")}).catch(u=>{L.error(u.message)})};return(r,n)=>{const u=w("el-table-column"),E=w("el-image"),N=w("el-input-number"),F=w("el-table"),R=w("el-button"),i=w("el-dialog"),A=M("loading");return t(),s("div",Ke,[e("div",Ne,[(t(!0),s(T,null,H(m.value,(_,V)=>(t(),s("div",{key:V,class:z(["nav-item",{"nav-item-active":h.value==V,"nav-item-radius1":h.value==V+1,"nav-item-radius2":h.value==V-1}]),onClick:Qt=>h.value=V},d(_),11,Fe))),128)),e("div",{class:z(["nav-item",{"nav-item-radius2":h.value==m.value.length-1}]),style:{flex:"1"}},null,2)]),x((t(),s("div",Me,[o.value.orderProduct&&h.value==0?(t(),s("div",Te,[e("div",He,[$(" 共计 "),e("span",qe,d(o.value.total_num),1),$(" 件商品 ")]),c(F,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct,ref_key:"tableRef",ref:P},{default:p(()=>[c(u,{type:"selection",width:"55"}),c(u,{prop:"cart_info.product.store_name",label:"商品信息"},{default:p(({row:_})=>[e("div",je,[c(E,{style:{height:"3rem",width:"3rem"},src:_.cart_info.productAttr.image||_.cart_info.product.image},null,8,["src"]),e("span",Ge,d(_.cart_info.product.store_name),1)])]),_:1}),c(u,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(u,{prop:"product_num",label:"数量",width:"180"},{default:p(({row:_})=>[c(N,{modelValue:_.product_num,"onUpdate:modelValue":V=>_.product_num=V,"step-strictly":"",max:_.refund_num,min:1,step:1,size:"small"},null,8,["modelValue","onUpdate:modelValue","max"])]),_:1}),c(u,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&h.value==1?(t(),s("div",Je,[Qe,e("div",We,[e("div",Xe,[Ye,e("div",Ze,d(o.value.create_time),1)]),e("div",et,[tt,e("div",st,d(o.value.total_num),1)]),e("div",ot,[it,e("div",at,"¥"+d(o.value.total_price),1)]),e("div",nt,[lt,e("div",ct,d(o.value.pay_time),1)]),e("div",dt,[rt,e("div",_t,"¥"+d(o.value.deduction_price),1)]),e("div",ut,[vt,e("div",pt,"¥"+d(o.value.pay_price),1)]),e("div",ft,[ht,e("div",mt,[o.value.pay_type==11?(t(),s("span",yt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",kt,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",$t,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",bt,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",Ct,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",Vt,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",wt,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",St,[e("div",xt,[It,e("div",Rt,[c(E,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Lt,[Pt,e("div",At,d(o.value.service_info.nickname),1)]),e("div",Et,[Ot,e("div",Ut,d(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),e("div",zt,[e("div",Bt,[e("div",Dt,[$(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.verify_status==0?(t(),s("div",Kt,[c(R,{class:"btn",type:"warning",onClick:K},{default:p(()=>[$("核销")]),_:1})])):(t(),s("div",Nt,"已支付"))])])),[[A,g.value]]),c(ie,{ref_key:"payRef",ref:v},null,512),c(i,{modelValue:C.value,"onUpdate:modelValue":n[1]||(n[1]=_=>C.value=_),title:"提示",width:"500"},{footer:p(()=>[e("div",Mt,[c(R,{onClick:n[0]||(n[0]=_=>C.value=!1)},{default:p(()=>[$("取消")]),_:1}),r.cartCount>0?(t(),q(R,{key:0,onClick:r.goHome},{default:p(()=>[$(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),q(R,{key:1,type:"primary",onClick:B},{default:p(()=>[$(" 确认提单 ")]),_:1}))])]),default:p(()=>[Ft]),_:1},8,["modelValue"])])}}},Ht=G(Tt,[["__scopeId","data-v-5d71f69a"]]),qt={class:"my-card"},jt={class:"my-code"},Gt=e("h2",null,"订单核销",-1),Jt={class:"box"},es={__name:"index",setup(y){const k=a(1),S=a(""),I=a(null),o=a(null),v=()=>{if(S.value=="")return L.error("请输入订单编号");k.value=2,j(()=>{o.value.setCode(S.value)})},g=()=>{v()};return Z(()=>{j(()=>{I.value.focus()})}),(h,m)=>(t(),s("div",qt,[x(e("div",jt,[Gt,e("div",Jt,[x(e("input",{ref_key:"inputRef",ref:I,"onUpdate:modelValue":m[0]||(m[0]=b=>S.value=b),placeholder:"",class:"input",onKeyup:Q(v,["enter"])},null,544),[[ee,S.value]]),e("div",{class:"btn",onClick:v},"查询")])],512),[[O,k.value==1]]),x(c(De,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:o,onBackOne:m[1]||(m[1]=b=>k.value=1)},null,512),[[O,k.value==2]]),x(c(ae,null,null,512),[[O,k.value==2]]),x(c(Ht,{ref:"detailRef",onReInit:g},null,512),[[O,k.value==2]])]))}};export{es as default}; +import{_ as G,u as J,r as a,b as w,l as M,c as t,h as s,e,f as c,w as p,g as $,p as Q,v as x,F as T,i as H,x as l,E as L,m as U,s as z,t as d,d as q,y as W,z as X,C as Y,n as j,o as Z,H as O,I as ee}from"./index-DUM_3Px5.js";import{v as te,f as se,i as oe}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-CPz3lDzO.js";import{p as ie}from"./pay-BIYaSPbP.js";import{p as ae}from"./padding-CwOzKUo2.js";const ne=y=>(W("data-v-aaa26790"),y=y(),X(),y),le={class:"my-order"},ce={class:"header-nav"},de=ne(()=>e("div",{class:"nav-item"},"核销订单",-1)),re={class:"nav-item-clear"},_e={class:"header-input"},ue={class:"order-list",":infinite-scroll-distance":"300",":infinite-scroll-delay":"500","infinite-scroll-immediate":"false",style:{overflow:"auto"}},ve=["onClick"],pe={class:"top"},fe={class:"create-time"},he={class:"shop"},me={key:0,class:"left"},ye={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},Ce={class:"pay"},Ve={key:0},we={key:0},Se={key:1},xe={key:2},Ie={key:3},Re={key:4},Le={key:5},Pe={key:6},Ae={key:1,style:{color:"#ff4a00"}},Ee={key:0,class:"cashier"},Oe={key:1,class:"cashier"},Ue={key:0,class:"load-end"},ze={key:1,class:"load-end"},Be={__name:"order",emits:["backOne"],setup(y,{expose:k,emit:S}){const I=J();a([]);const o=a(1);a(null);const v=a({page:1,limit:20,search_info:""}),g=a(!1);a(0);const h=a(0),m=a(!1),b=a([]),C=(r=!1)=>{if(!v.value.search_info)return L.error("请输入订单编号");if(r)v.value.page=1;else if(m.value||g.value)return;g.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),b.value=[],U.emit("set-order-detail",{}),te(I.userInfo.service.mer_id,v.value.search_info).then(n=>{b.value=[n.data],U.emit("set-order-detail",b.value[0]),g.value=!1}).catch(n=>{m.value=!0,g.value=!1})},B=(r,n)=>{h.value=n,U.emit("set-order-detail",r)},D=r=>{v.value.search_info=r,C(!0)},P=S,K=()=>{P("backOne")};return k({setCode:D}),(r,n)=>{const u=w("el-button"),E=w("el-input"),N=w("el-image"),F=M("loading"),R=M("infinite-scroll");return t(),s("div",le,[e("div",ce,[de,e("div",re,[c(u,{type:"primary",size:"small",onClick:K},{default:p(()=>[$("返回上一页")]),_:1})])]),e("div",_e,[c(E,{modelValue:v.value.search_info,"onUpdate:modelValue":n[1]||(n[1]=i=>v.value.search_info=i),placeholder:"请输入订单编号",onKeydown:n[2]||(n[2]=Q(i=>C(!0),["enter"])),clearable:""},{append:p(()=>[c(u,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:n[0]||(n[0]=i=>C(!0))},{default:p(()=>[$("搜索")]),_:1})]),_:1},8,["modelValue"])]),x((t(),s("div",ue,[(t(!0),s(T,null,H(b.value,(i,A)=>(t(),s("div",{class:z(["item",{"item-active":h.value==A}]),key:A,onClick:_=>B(i,A)},[e("div",pe,[e("div",{class:z(["sn",i.pay_type===11||i.pay_type===12||i.pay_type===13?"cahier":"cahier2"])},"单号: "+d(i.order_sn),3),e("div",fe,d(i.create_time),1)]),e("div",he,[i.orderProduct?(t(),s("div",me,[(t(!0),s(T,null,H(i.orderProduct.slice(0,5),(_,V)=>(t(),q(N,{key:V,src:_.cart_info.productAttr.image||_.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),i.orderProduct.length==1?(t(),s("div",ye,d(i.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",ke,[e("div",ge,"¥"+d(i.pay_price),1),e("div",$e,"共"+d(i.total_num)+"件商品",1)])]),e("div",be,[e("div",Ce,[i.paid?(t(),s("div",Ve,[$(" 已支付 "),i.pay_type==13?(t(),s("span",we,"(支付宝收款)")):l("",!0),i.pay_type==12?(t(),s("span",Se,"(现金支付)")):l("",!0),i.pay_type==11?(t(),s("span",xe,"(微信收款)")):l("",!0),i.pay_type==0?(t(),s("span",Ie,"(余额支付)")):l("",!0),i.pay_type==1?(t(),s("span",Re,"(微信支付)")):l("",!0),i.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):l("",!0),i.pay_type==10?(t(),s("span",Pe,"(对公转账)")):l("",!0)])):(t(),s("div",Ae,"未支付"))]),i.service_info?(t(),s("div",Ee,"收银员: "+d(i.service_info.nickname),1)):(t(),s("div",Oe,"平台订单"))])],10,ve))),128)),m.value?(t(),s("div",Ue,"没有更多了")):l("",!0),g.value?(t(),s("div",ze,"加载中...")):l("",!0)])),[[F,g.value],[R,C]])])}}},De=G(Be,[["__scopeId","data-v-aaa26790"]]),f=y=>(W("data-v-5d71f69a"),y=y(),X(),y),Ke={class:"my-order"},Ne={class:"header-nav"},Fe=["onClick"],Me={class:"detail"},Te={key:0,class:"table"},He={style:{"font-size":"0.9rem"}},qe={style:{color:"#ff4a00"}},je={style:{display:"flex","align-items":"center"}},Ge={style:{"margin-left":"0.5rem"}},Je={key:1,class:"table"},Qe=f(()=>e("div",{class:"table-title"},"订单信息",-1)),We={class:"table-info"},Xe={class:"info-item"},Ye=f(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=f(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=f(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),at={class:"info-item-info"},nt={class:"info-item"},lt=f(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},rt=f(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),_t={class:"info-item-info"},ut={class:"info-item"},vt=f(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),pt={class:"info-item-info"},ft={class:"info-item"},ht=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),mt={class:"info-item-info"},yt={key:0},kt={key:1},gt={key:2},$t={key:3},bt={key:4},Ct={key:5},Vt={key:6},wt={key:0,class:"table-title"},St={key:1,class:"table-info",style:{"flex-direction":"column"}},xt={class:"info-item"},It=f(()=>e("div",{class:"info-item-title"},"头像:",-1)),Rt={class:"info-item-info"},Lt={class:"info-item"},Pt=f(()=>e("div",{class:"info-item-title"},"昵称:",-1)),At={class:"info-item-info"},Et={class:"info-item"},Ot=f(()=>e("div",{class:"info-item-title"},"账号:",-1)),Ut={class:"info-item-info"},zt={class:"footer"},Bt={class:"info"},Dt={class:"price"},Kt={key:0,class:"handle"},Nt={key:1,class:"handle"},Ft=f(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Mt={class:"dialog-footer"},Tt={__name:"detail",emits:["reInit"],setup(y,{emit:k}){const S=J(),I=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r,j(()=>{var n;(n=P.value)==null||n.toggleAllSelection()})}),a([]);const v=a(null),g=a(!1);a(0);const h=a(0),m=a(["商品信息","订单详情"]),b=a(""),C=a(!1),B=()=>{C.value=!1,se({order_sn:b.value}).then(r=>{L({message:r.message,type:"success"}),I.push({name:"home"})})},D=k,P=a(null),K=()=>{let r=P.value.getSelectionRows();if(r.length==0)return L.error("请选择核销商品");let n={data:[],verify_code:o.value.verify_code};r.forEach(u=>{n.data.push({id:u.order_product_id,num:u.product_num})}),oe(S.userInfo.service.mer_id,o.value.order_id,n).then(u=>{L.success(u.message),D("reInit")}).catch(u=>{L.error(u.message)})};return(r,n)=>{const u=w("el-table-column"),E=w("el-image"),N=w("el-input-number"),F=w("el-table"),R=w("el-button"),i=w("el-dialog"),A=M("loading");return t(),s("div",Ke,[e("div",Ne,[(t(!0),s(T,null,H(m.value,(_,V)=>(t(),s("div",{key:V,class:z(["nav-item",{"nav-item-active":h.value==V,"nav-item-radius1":h.value==V+1,"nav-item-radius2":h.value==V-1}]),onClick:Qt=>h.value=V},d(_),11,Fe))),128)),e("div",{class:z(["nav-item",{"nav-item-radius2":h.value==m.value.length-1}]),style:{flex:"1"}},null,2)]),x((t(),s("div",Me,[o.value.orderProduct&&h.value==0?(t(),s("div",Te,[e("div",He,[$(" 共计 "),e("span",qe,d(o.value.total_num),1),$(" 件商品 ")]),c(F,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct,ref_key:"tableRef",ref:P},{default:p(()=>[c(u,{type:"selection",width:"55"}),c(u,{prop:"cart_info.product.store_name",label:"商品信息"},{default:p(({row:_})=>[e("div",je,[c(E,{style:{height:"3rem",width:"3rem"},src:_.cart_info.productAttr.image||_.cart_info.product.image},null,8,["src"]),e("span",Ge,d(_.cart_info.product.store_name),1)])]),_:1}),c(u,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(u,{prop:"product_num",label:"数量",width:"180"},{default:p(({row:_})=>[c(N,{modelValue:_.product_num,"onUpdate:modelValue":V=>_.product_num=V,"step-strictly":"",max:_.refund_num,min:1,step:1,size:"small"},null,8,["modelValue","onUpdate:modelValue","max"])]),_:1}),c(u,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&h.value==1?(t(),s("div",Je,[Qe,e("div",We,[e("div",Xe,[Ye,e("div",Ze,d(o.value.create_time),1)]),e("div",et,[tt,e("div",st,d(o.value.total_num),1)]),e("div",ot,[it,e("div",at,"¥"+d(o.value.total_price),1)]),e("div",nt,[lt,e("div",ct,d(o.value.pay_time),1)]),e("div",dt,[rt,e("div",_t,"¥"+d(o.value.deduction_price),1)]),e("div",ut,[vt,e("div",pt,"¥"+d(o.value.pay_price),1)]),e("div",ft,[ht,e("div",mt,[o.value.pay_type==11?(t(),s("span",yt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",kt,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",$t,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",bt,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",Ct,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",Vt,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",wt,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",St,[e("div",xt,[It,e("div",Rt,[c(E,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Lt,[Pt,e("div",At,d(o.value.service_info.nickname),1)]),e("div",Et,[Ot,e("div",Ut,d(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),e("div",zt,[e("div",Bt,[e("div",Dt,[$(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.verify_status==0?(t(),s("div",Kt,[c(R,{class:"btn",type:"warning",onClick:K},{default:p(()=>[$("核销")]),_:1})])):(t(),s("div",Nt,"已支付"))])])),[[A,g.value]]),c(ie,{ref_key:"payRef",ref:v},null,512),c(i,{modelValue:C.value,"onUpdate:modelValue":n[1]||(n[1]=_=>C.value=_),title:"提示",width:"500"},{footer:p(()=>[e("div",Mt,[c(R,{onClick:n[0]||(n[0]=_=>C.value=!1)},{default:p(()=>[$("取消")]),_:1}),r.cartCount>0?(t(),q(R,{key:0,onClick:r.goHome},{default:p(()=>[$(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),q(R,{key:1,type:"primary",onClick:B},{default:p(()=>[$(" 确认提单 ")]),_:1}))])]),default:p(()=>[Ft]),_:1},8,["modelValue"])])}}},Ht=G(Tt,[["__scopeId","data-v-5d71f69a"]]),qt={class:"my-card"},jt={class:"my-code"},Gt=e("h2",null,"订单核销",-1),Jt={class:"box"},es={__name:"index",setup(y){const k=a(1),S=a(""),I=a(null),o=a(null),v=()=>{if(S.value=="")return L.error("请输入订单编号");k.value=2,j(()=>{o.value.setCode(S.value)})},g=()=>{v()};return Z(()=>{j(()=>{I.value.focus()})}),(h,m)=>(t(),s("div",qt,[x(e("div",jt,[Gt,e("div",Jt,[x(e("input",{ref_key:"inputRef",ref:I,"onUpdate:modelValue":m[0]||(m[0]=b=>S.value=b),placeholder:"",class:"input",onKeyup:Q(v,["enter"])},null,544),[[ee,S.value]]),e("div",{class:"btn",onClick:v},"查询")])],512),[[O,k.value==1]]),x(c(De,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:o,onBackOne:m[1]||(m[1]=b=>k.value=1)},null,512),[[O,k.value==2]]),x(c(ae,null,null,512),[[O,k.value==2]]),x(c(Ht,{ref:"detailRef",onReInit:g},null,512),[[O,k.value==2]])]))}};export{es as default}; diff --git a/build/assets/index-aor5IsC-.js b/build/assets/index-aor5IsC-.js index 2e069d8..175fa65 100644 --- a/build/assets/index-aor5IsC-.js +++ b/build/assets/index-aor5IsC-.js @@ -24,4 +24,4 @@ __p += '`),M&&(d+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+d+`return __p -}`;var O=Po(function(){return N(f,m+"return "+d).apply(o,l)});if(O.source=d,$i(O))throw O;return O}function Up(n){return G(n).toLowerCase()}function $p(n){return G(n).toUpperCase()}function Np(n,e,t){if(n=G(n),n&&(t||e===o))return $u(n);if(!n||!(e=Nn(e)))return n;var r=re(n),i=re(e),f=Nu(r,i),l=Gu(r,i)+1;return Oe(r,f,l).join("")}function Gp(n,e,t){if(n=G(n),n&&(t||e===o))return n.slice(0,qu(n)+1);if(!n||!(e=Nn(e)))return n;var r=re(n),i=Gu(r,re(e))+1;return Oe(r,0,i).join("")}function Hp(n,e,t){if(n=G(n),n&&(t||e===o))return n.replace($r,"");if(!n||!(e=Nn(e)))return n;var r=re(n),i=Nu(r,re(e));return Oe(r,i).join("")}function qp(n,e){var t=ce,r=ne;if(rn(e)){var i="separator"in e?e.separator:i;t="length"in e?T(e.length):t,r="omission"in e?Nn(e.omission):r}n=G(n);var f=n.length;if(ze(n)){var l=re(n);f=l.length}if(t>=f)return n;var s=t-Ze(r);if(s<1)return r;var c=l?Oe(l,0,s).join(""):n.slice(0,s);if(i===o)return c+r;if(l&&(s+=c.length-s),Ni(i)){if(n.slice(s).search(i)){var p,g=c;for(i.global||(i=ti(i.source,G(ou.exec(i))+"g")),i.lastIndex=0;p=i.exec(g);)var d=p.index;c=c.slice(0,d===o?s:d)}}else if(n.indexOf(Nn(i),s)!=s){var v=c.lastIndexOf(i);v>-1&&(c=c.slice(0,v))}return c+r}function Kp(n){return n=G(n),n&&el.test(n)?n.replace(iu,ms):n}var zp=je(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),qi=Pf("toUpperCase");function bo(n,e,t){return n=G(n),e=t?o:e,e===o?ps(n)?ys(n):us(n):n.match(e)||[]}var Po=b(function(n,e){try{return Un(n,o,e)}catch(t){return $i(t)?t:new E(t)}}),Zp=ve(function(n,e){return Yn(e,function(t){t=ae(t),ge(n,t,Mi(n[t],n))}),n});function Yp(n){var e=n==null?0:n.length,t=y();return n=e?nn(n,function(r){if(typeof r[1]!="function")throw new kn(P);return[t(r[0]),r[1]]}):[],b(function(r){for(var i=-1;++iye)return[];var t=oe,r=Sn(n,oe);e=y(e),n-=oe;for(var i=jr(r,e);++t0||e<0)?new B(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=T(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},B.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},B.prototype.toArray=function(){return this.take(oe)},le(B.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],f=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,s=r?[1]:arguments,c=l instanceof B,p=s[0],g=c||L(l),d=function(F){var M=i.apply(u,Re([F],s));return r&&v?M[0]:M};g&&t&&typeof p=="function"&&p.length!=1&&(c=g=!1);var v=this.__chain__,m=!!this.__actions__.length,I=f&&!v,O=c&&!m;if(!f&&g){l=O?l:new B(this);var R=n.apply(l,s);return R.__actions__.push({func:dr,args:[d],thisArg:o}),new Xn(R,v)}return I&&O?n.apply(this,s):(R=this.thru(d),I?r?R.value()[0]:R.value():R)})}),Yn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Ht[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var f=this.value();return e.apply(L(f)?f:[],i)}return this[t](function(l){return e.apply(L(l)?l:[],i)})}}),le(B.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";K.call(Je,r)||(Je[r]=[]),Je[r].push({name:e,func:t})}}),Je[sr(o,$).name]=[{name:"wrapper",func:o}],B.prototype.clone=Ks,B.prototype.reverse=zs,B.prototype.value=Zs,u.prototype.at=Ah,u.prototype.chain=yh,u.prototype.commit=Ih,u.prototype.next=Rh,u.prototype.plant=Ch,u.prototype.reverse=Eh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Lh,u.prototype.first=u.prototype.head,_t&&(u.prototype[_t]=Sh),u},Ye=Is();Pe?((Pe.exports=Ye)._=Ye,zr._=Ye):xn._=Ye}).call(Et)})(Cr,Cr.exports);var vd=Cr.exports;const wd=Bg(vd),eu=vn=>(No("data-v-f63718c9"),vn=vn(),Go(),vn),md={class:"my-order"},xd=eu(()=>A("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Ad={class:"nav-item-input"},yd={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Id=["onClick"],Rd={class:"shop-name"},Sd={class:"shop-price"},Cd={key:0,class:"no-stock"},Ed=eu(()=>A("div",null,[A("span",null,"暂无"),A("span",null,"库存")],-1)),Ld=[Ed],Td={key:1,class:"no-stock"},Od=eu(()=>A("div",null,[A("span",null,"平台"),A("span",null,"关闭")],-1)),bd=[Od],Pd={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(vn,{expose:wn,emit:o}){const W=J(null),z=o,S=J(""),P=()=>{z("loadMore",{bar_code:S.value})},H=U=>{if(U.is_used==0)return Sr.error("该商品已被平台关闭");if(U.stock==0)return Sr.warning("该商品无库存");z("changeItem",U)},V=wd.throttle(()=>{z("getStoreList",{bar_code:S.value},!0)},300);wn({bar_code:S});const mn=J(!1),_n=()=>{mn.value=!0},en=()=>{mn.value=!1},In=()=>{var U;(U=W.value)==null||U.focus()};return Lt(()=>{Qi(()=>{var U;(U=W.value)==null||U.focus(),_n()}),En.on("shift",In)}),Tt(()=>{En.off("shift",In)}),(U,q)=>{const an=sn("el-input"),tn=sn("Search"),$=sn("el-icon"),j=sn("el-button"),Z=sn("el-image"),Rn=sn("el-space"),C=Mo("infinite-scroll");return yn(),Dn("div",md,[A("div",{class:Uo(["header-nav",{"input-focus":mn.value}])},[xd,A("div",Ad,[X(an,{modelValue:S.value,"onUpdate:modelValue":q[0]||(q[0]=x=>S.value=x),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:W,onFocus:_n,onBlur:en,onKeyup:Dg(Rr(V),["enter"]),onClear:Rr(V)},null,8,["modelValue","onKeyup","onClear"])]),A("div",{class:"nav-item-btn",onClick:q[1]||(q[1]=(...x)=>Rr(V)&&Rr(V)(...x))},[X(j,{class:"btn",type:"primary"},{default:Ln(()=>[X($,null,{default:Ln(()=>[X(tn)]),_:1})]),_:1})])],2),$o((yn(),Dn("div",yd,[X(Rn,{wrap:"",size:20},{default:Ln(()=>[(yn(!0),Dn(ji,null,nu(vn.storeList,(x,D)=>(yn(),Dn("div",{class:"shop-item",key:D,onClick:fn=>H(x)},[X(Z,{loading:"lazy",src:x.image},null,8,["src"]),A("div",Rd,Kn(x.store_name),1),A("div",Sd,[dn(" ¥"),A("span",null,Kn(x.price),1)]),x.stock==0?(yn(),Dn("div",Cd,Ld)):Ji("",!0),x.is_used==0?(yn(),Dn("div",Td,bd)):Ji("",!0)],8,Id))),128))]),_:1})])),[[C,P]])])}}},Fd=Er(Pd,[["__scopeId","data-v-f63718c9"]]),Wd=vn=>(No("data-v-52f45b9b"),vn=vn(),Go(),vn),Bd={class:"shop"},Dd={key:0,class:"shop-info"},Md={class:"shop-info-left"},Ud={class:"shop-info-right"},$d={class:"shop-info-right-top"},Nd={class:"shop-info-right-center"},Gd={class:"shop-info-right-price"},Hd={class:"shop-sku"},qd=Wd(()=>A("div",{class:"title"},"产品",-1)),Kd={class:"sku"},zd=["onClick"],Zd={class:"dialog-footer"},Yd={__name:"pupop",emits:["changeItem"],setup(vn,{expose:wn,emit:o}){const W=J(!1),z=$=>{W.value=$},S=J({}),P=J(null),H=J(!1),V=J("add"),mn=J({}),_n=($,j="add")=>{V.value=j,j=="add"?(S.value=$,P.value=$.attr[0]):(H.value=!0,mn.value=$,Ng($.product_id).then(Z=>{Z.data.attrValue=JSON.parse(JSON.stringify(Z.data.attr)),Z.data.attr=Object.keys(Z.data.sku),S.value=Z.data,P.value=Z.data.attr[0],H.value=!1}).catch(Z=>{H.value=!1}))},en=o,In=()=>{V.value=="add"?en("changeItem",S.value,P.value):en("editItem",mn.value.cart_id,{cart_num:mn.value.cart_num,product_attr_unique:S.value.sku[P.value].unique}),W.value=!1},U=$=>{P.value=$};wn({show:z,setForm:_n});const q=()=>{if(!W.value)return;let $=S.value.attr.indexOf(P.value);if($>0)return U(S.value.attr[$-1])},an=()=>{if(!W.value)return;let $=S.value.attr.indexOf(P.value);if(${W.value&&In()};return Lt(()=>{En.on("left",q),En.on("right",an),En.on("enter",tn)}),Tt(()=>{En.off("left",q),En.off("right",an),En.off("enter",tn)}),($,j)=>{const Z=sn("el-image"),Rn=sn("el-space"),C=sn("el-button"),x=sn("el-dialog"),D=Mo("loading");return yn(),Vi(x,{modelValue:W.value,"onUpdate:modelValue":j[0]||(j[0]=fn=>W.value=fn),title:"商品规格",width:"650"},Mg({default:Ln(()=>{var fn,pn,ce;return[$o((yn(),Dn("div",Bd,[S.value.sku?(yn(),Dn("div",Dd,[A("div",Md,[X(Z,{loading:"lazy",src:((fn=S.value.sku[P.value])==null?void 0:fn.image)||S.value.image},null,8,["src"])]),A("div",Ud,[A("div",$d,Kn(S.value.store_name),1),A("div",Nd,"库存"+Kn(((pn=S.value.sku[P.value])==null?void 0:pn.stock)||0),1),A("div",Gd,[dn("¥"),A("span",null,Kn(((ce=S.value.sku[P.value])==null?void 0:ce.price)||S.value.price),1)])])])):Ji("",!0),A("div",Hd,[qd,A("div",Kd,[X(Rn,{wrap:"",size:20},{default:Ln(()=>[(yn(!0),Dn(ji,null,nu(S.value.attr,(ne,rt)=>(yn(),Dn("div",{class:Uo(["sku-item",{"sku-item_active":P.value==ne}]),onClick:Ot=>U(ne),key:rt},Kn(ne||"默认规格"),11,zd))),128))]),_:1})])])])),[[D,H.value]])]}),_:2},[V.value!="add"&&S.value.attr&&S.value.attr.length==1?void 0:{name:"footer",fn:Ln(()=>[A("div",Zd,[X(C,{class:"ok-btn",type:"primary",onClick:In},{default:Ln(()=>[dn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},kd=Er(Yd,[["__scopeId","data-v-52f45b9b"]]),Xd={class:"my-card"},ev={__name:"index",setup(vn){const wn=J(null),o=J(null),W=J(null),z=J(null),S=J([]),P=Do(),H=Ug(),V=J({page:0,limit:30}),mn=(C={},x=!1)=>{V.value={staff_id:P.userInfo.service.service_id,...V.value,...C},x&&(S.value=[],V.value.page=1,_n.value=!1),Gg(P.userInfo.service.mer_id,V.value).then(D=>{var pn,ce;((ce=(pn=D.data)==null?void 0:pn.list)==null?void 0:ce.length)(ne.attr=Object.keys(ne.sku),ne));S.value=S.value.concat(fn),C.bar_code&&S.value.length==1&&In(C.bar_code)&&(W.value.bar_code="",q(S.value[0],S.value[0].attr[0]))})},_n=J(!1),en=C=>{_n.value||(V.value.page++,mn(C))};function In(C){return/^\d+$/.test(C)}const U=(C,x="")=>{let D={is_new:0,product_id:C.product_id,cart_num:1,product_attr_unique:C.sku[x]!==void 0?C.sku[x].unique:"",staff_id:P.userInfo.service.service_id,product_type:0};Fg(D).then(fn=>{o.value.getList()})},q=(C,x)=>{if(!C.attr||C.attr.length==0||C.attr.length==1)return U(C,C.attr[0]?C.attr[0]:"");if(x)return U(C,x);wn.value.setForm(C,"add"),wn.value.show(!0)},an=(C,x)=>{o.value.editItem(C,x)},tn=C=>{wn.value.setForm(C,"edit"),wn.value.show(!0)},$=()=>{let C=o.value.list.map(D=>D.cart_id),x={takes:[],use_coupon:{},use_integral:!1,cart_id:C};o.value.discounts>0&&(x.deduction_price=o.value.discounts.toFixed(2),x.pay_type="micropay"),Wg(x).then(D=>{z.value.setForm({data:D.data,cart_id:C})})},j=()=>{$(),z.value.drawer=!0},Z=()=>{o.value.getList()},Rn=()=>{console.log("F9"),H.name=="home"&&(!z.value.drawer&&o.value.list.length>0?j():z.value.beforeClose())};return Lt(()=>{mn(),V.value.page++,En.on("F9",Rn)}),Tt(()=>{En.off("F9",Rn)}),(C,x)=>(yn(),Dn("div",Xd,[X(dd,{ref_key:"orderRef",ref:o,onGoPay:j,onEditPupop:tn},null,512),X($g),X(Fd,{ref_key:"shopRef",ref:W,style:{flex:"1"},storeList:S.value,onGetStoreList:mn,onChangeItem:q,onLoadMore:en},null,8,["storeList"]),X(kd,{ref_key:"pupopRef",ref:wn,onChangeItem:q,onEditItem:an},null,512),X(Hg,{ref_key:"payRef",ref:z,onPaySuccess:Z},null,512)]))}};export{ev as default}; +}`;var O=Po(function(){return N(f,m+"return "+d).apply(o,l)});if(O.source=d,$i(O))throw O;return O}function Up(n){return G(n).toLowerCase()}function $p(n){return G(n).toUpperCase()}function Np(n,e,t){if(n=G(n),n&&(t||e===o))return $u(n);if(!n||!(e=Nn(e)))return n;var r=re(n),i=re(e),f=Nu(r,i),l=Gu(r,i)+1;return Oe(r,f,l).join("")}function Gp(n,e,t){if(n=G(n),n&&(t||e===o))return n.slice(0,qu(n)+1);if(!n||!(e=Nn(e)))return n;var r=re(n),i=Gu(r,re(e))+1;return Oe(r,0,i).join("")}function Hp(n,e,t){if(n=G(n),n&&(t||e===o))return n.replace($r,"");if(!n||!(e=Nn(e)))return n;var r=re(n),i=Nu(r,re(e));return Oe(r,i).join("")}function qp(n,e){var t=ce,r=ne;if(rn(e)){var i="separator"in e?e.separator:i;t="length"in e?T(e.length):t,r="omission"in e?Nn(e.omission):r}n=G(n);var f=n.length;if(ze(n)){var l=re(n);f=l.length}if(t>=f)return n;var s=t-Ze(r);if(s<1)return r;var c=l?Oe(l,0,s).join(""):n.slice(0,s);if(i===o)return c+r;if(l&&(s+=c.length-s),Ni(i)){if(n.slice(s).search(i)){var p,g=c;for(i.global||(i=ti(i.source,G(ou.exec(i))+"g")),i.lastIndex=0;p=i.exec(g);)var d=p.index;c=c.slice(0,d===o?s:d)}}else if(n.indexOf(Nn(i),s)!=s){var v=c.lastIndexOf(i);v>-1&&(c=c.slice(0,v))}return c+r}function Kp(n){return n=G(n),n&&el.test(n)?n.replace(iu,ms):n}var zp=je(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),qi=Pf("toUpperCase");function bo(n,e,t){return n=G(n),e=t?o:e,e===o?ps(n)?ys(n):us(n):n.match(e)||[]}var Po=b(function(n,e){try{return Un(n,o,e)}catch(t){return $i(t)?t:new E(t)}}),Zp=ve(function(n,e){return Yn(e,function(t){t=ae(t),ge(n,t,Mi(n[t],n))}),n});function Yp(n){var e=n==null?0:n.length,t=y();return n=e?nn(n,function(r){if(typeof r[1]!="function")throw new kn(P);return[t(r[0]),r[1]]}):[],b(function(r){for(var i=-1;++iye)return[];var t=oe,r=Sn(n,oe);e=y(e),n-=oe;for(var i=jr(r,e);++t0||e<0)?new B(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=T(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},B.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},B.prototype.toArray=function(){return this.take(oe)},le(B.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],f=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,s=r?[1]:arguments,c=l instanceof B,p=s[0],g=c||L(l),d=function(F){var M=i.apply(u,Re([F],s));return r&&v?M[0]:M};g&&t&&typeof p=="function"&&p.length!=1&&(c=g=!1);var v=this.__chain__,m=!!this.__actions__.length,I=f&&!v,O=c&&!m;if(!f&&g){l=O?l:new B(this);var R=n.apply(l,s);return R.__actions__.push({func:dr,args:[d],thisArg:o}),new Xn(R,v)}return I&&O?n.apply(this,s):(R=this.thru(d),I?r?R.value()[0]:R.value():R)})}),Yn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Ht[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var f=this.value();return e.apply(L(f)?f:[],i)}return this[t](function(l){return e.apply(L(l)?l:[],i)})}}),le(B.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";K.call(Je,r)||(Je[r]=[]),Je[r].push({name:e,func:t})}}),Je[sr(o,$).name]=[{name:"wrapper",func:o}],B.prototype.clone=Ks,B.prototype.reverse=zs,B.prototype.value=Zs,u.prototype.at=Ah,u.prototype.chain=yh,u.prototype.commit=Ih,u.prototype.next=Rh,u.prototype.plant=Ch,u.prototype.reverse=Eh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Lh,u.prototype.first=u.prototype.head,_t&&(u.prototype[_t]=Sh),u},Ye=Is();Pe?((Pe.exports=Ye)._=Ye,zr._=Ye):xn._=Ye}).call(Et)})(Cr,Cr.exports);var vd=Cr.exports;const wd=Bg(vd),eu=vn=>(No("data-v-f63718c9"),vn=vn(),Go(),vn),md={class:"my-order"},xd=eu(()=>A("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Ad={class:"nav-item-input"},yd={class:"shop-list",":infinite-scroll-distance":"100",":infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Id=["onClick"],Rd={class:"shop-name"},Sd={class:"shop-price"},Cd={key:0,class:"no-stock"},Ed=eu(()=>A("div",null,[A("span",null,"暂无"),A("span",null,"库存")],-1)),Ld=[Ed],Td={key:1,class:"no-stock"},Od=eu(()=>A("div",null,[A("span",null,"平台"),A("span",null,"关闭")],-1)),bd=[Od],Pd={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(vn,{expose:wn,emit:o}){const W=J(null),z=o,S=J(""),P=()=>{z("loadMore",{bar_code:S.value})},H=U=>{if(U.is_used==0)return Sr.error("该商品已被平台关闭");if(U.stock==0)return Sr.warning("该商品无库存");z("changeItem",U)},V=wd.throttle(()=>{z("getStoreList",{bar_code:S.value},!0)},300);wn({bar_code:S});const mn=J(!1),_n=()=>{mn.value=!0},en=()=>{mn.value=!1},In=()=>{var U;(U=W.value)==null||U.focus()};return Lt(()=>{Qi(()=>{var U;(U=W.value)==null||U.focus(),_n()}),En.on("shift",In)}),Tt(()=>{En.off("shift",In)}),(U,q)=>{const an=sn("el-input"),tn=sn("Search"),$=sn("el-icon"),j=sn("el-button"),Z=sn("el-image"),Rn=sn("el-space"),C=Mo("infinite-scroll");return yn(),Dn("div",md,[A("div",{class:Uo(["header-nav",{"input-focus":mn.value}])},[xd,A("div",Ad,[X(an,{modelValue:S.value,"onUpdate:modelValue":q[0]||(q[0]=x=>S.value=x),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:W,onFocus:_n,onBlur:en,onKeyup:Dg(Rr(V),["enter"]),onClear:Rr(V)},null,8,["modelValue","onKeyup","onClear"])]),A("div",{class:"nav-item-btn",onClick:q[1]||(q[1]=(...x)=>Rr(V)&&Rr(V)(...x))},[X(j,{class:"btn",type:"primary"},{default:Ln(()=>[X($,null,{default:Ln(()=>[X(tn)]),_:1})]),_:1})])],2),$o((yn(),Dn("div",yd,[X(Rn,{wrap:"",size:20},{default:Ln(()=>[(yn(!0),Dn(ji,null,nu(vn.storeList,(x,D)=>(yn(),Dn("div",{class:"shop-item",key:D,onClick:fn=>H(x)},[X(Z,{loading:"lazy",src:x.image},null,8,["src"]),A("div",Rd,Kn(x.store_name),1),A("div",Sd,[dn(" ¥"),A("span",null,Kn(x.price),1)]),x.stock==0?(yn(),Dn("div",Cd,Ld)):Ji("",!0),x.is_used==0?(yn(),Dn("div",Td,bd)):Ji("",!0)],8,Id))),128))]),_:1})])),[[C,P]])])}}},Fd=Er(Pd,[["__scopeId","data-v-f63718c9"]]),Wd=vn=>(No("data-v-52f45b9b"),vn=vn(),Go(),vn),Bd={class:"shop"},Dd={key:0,class:"shop-info"},Md={class:"shop-info-left"},Ud={class:"shop-info-right"},$d={class:"shop-info-right-top"},Nd={class:"shop-info-right-center"},Gd={class:"shop-info-right-price"},Hd={class:"shop-sku"},qd=Wd(()=>A("div",{class:"title"},"产品",-1)),Kd={class:"sku"},zd=["onClick"],Zd={class:"dialog-footer"},Yd={__name:"pupop",emits:["changeItem"],setup(vn,{expose:wn,emit:o}){const W=J(!1),z=$=>{W.value=$},S=J({}),P=J(null),H=J(!1),V=J("add"),mn=J({}),_n=($,j="add")=>{V.value=j,j=="add"?(S.value=$,P.value=$.attr[0]):(H.value=!0,mn.value=$,Ng($.product_id).then(Z=>{Z.data.attrValue=JSON.parse(JSON.stringify(Z.data.attr)),Z.data.attr=Object.keys(Z.data.sku),S.value=Z.data,P.value=Z.data.attr[0],H.value=!1}).catch(Z=>{H.value=!1}))},en=o,In=()=>{V.value=="add"?en("changeItem",S.value,P.value):en("editItem",mn.value.cart_id,{cart_num:mn.value.cart_num,product_attr_unique:S.value.sku[P.value].unique}),W.value=!1},U=$=>{P.value=$};wn({show:z,setForm:_n});const q=()=>{if(!W.value)return;let $=S.value.attr.indexOf(P.value);if($>0)return U(S.value.attr[$-1])},an=()=>{if(!W.value)return;let $=S.value.attr.indexOf(P.value);if(${W.value&&In()};return Lt(()=>{En.on("left",q),En.on("right",an),En.on("enter",tn)}),Tt(()=>{En.off("left",q),En.off("right",an),En.off("enter",tn)}),($,j)=>{const Z=sn("el-image"),Rn=sn("el-space"),C=sn("el-button"),x=sn("el-dialog"),D=Mo("loading");return yn(),Vi(x,{modelValue:W.value,"onUpdate:modelValue":j[0]||(j[0]=fn=>W.value=fn),title:"商品规格",width:"650"},Mg({default:Ln(()=>{var fn,pn,ce;return[$o((yn(),Dn("div",Bd,[S.value.sku?(yn(),Dn("div",Dd,[A("div",Md,[X(Z,{loading:"lazy",src:((fn=S.value.sku[P.value])==null?void 0:fn.image)||S.value.image},null,8,["src"])]),A("div",Ud,[A("div",$d,Kn(S.value.store_name),1),A("div",Nd,"库存"+Kn(((pn=S.value.sku[P.value])==null?void 0:pn.stock)||0),1),A("div",Gd,[dn("¥"),A("span",null,Kn(((ce=S.value.sku[P.value])==null?void 0:ce.price)||S.value.price),1)])])])):Ji("",!0),A("div",Hd,[qd,A("div",Kd,[X(Rn,{wrap:"",size:20},{default:Ln(()=>[(yn(!0),Dn(ji,null,nu(S.value.attr,(ne,rt)=>(yn(),Dn("div",{class:Uo(["sku-item",{"sku-item_active":P.value==ne}]),onClick:Ot=>U(ne),key:rt},Kn(ne||"默认规格"),11,zd))),128))]),_:1})])])])),[[D,H.value]])]}),_:2},[V.value!="add"&&S.value.attr&&S.value.attr.length==1?void 0:{name:"footer",fn:Ln(()=>[A("div",Zd,[X(C,{class:"ok-btn",type:"primary",onClick:In},{default:Ln(()=>[dn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},kd=Er(Yd,[["__scopeId","data-v-52f45b9b"]]),Xd={class:"my-card"},ev={__name:"index",setup(vn){const wn=J(null),o=J(null),W=J(null),z=J(null),S=J([]),P=Do(),H=Ug(),V=J({page:0,limit:30}),mn=(C={},x=!1)=>{V.value={staff_id:P.userInfo.service.service_id,...V.value,...C},x&&(S.value=[],V.value.page=1,_n.value=!1),Gg(P.userInfo.service.mer_id,V.value).then(D=>{var pn,ce;((ce=(pn=D.data)==null?void 0:pn.list)==null?void 0:ce.length)(ne.attr=Object.keys(ne.sku),ne));S.value=S.value.concat(fn),C.bar_code&&S.value.length==1&&In(C.bar_code)&&(W.value.bar_code="",q(S.value[0],S.value[0].attr[0]))})},_n=J(!1),en=C=>{_n.value||(V.value.page++,mn(C))};function In(C){return/^\d+$/.test(C)}const U=(C,x="")=>{let D={is_new:0,product_id:C.product_id,cart_num:1,product_attr_unique:C.sku[x]!==void 0?C.sku[x].unique:"",staff_id:P.userInfo.service.service_id,product_type:0};Fg(D).then(fn=>{o.value.getList()})},q=(C,x)=>{if(!C.attr||C.attr.length==0||C.attr.length==1)return U(C,C.attr[0]?C.attr[0]:"");if(x)return U(C,x);wn.value.setForm(C,"add"),wn.value.show(!0)},an=(C,x)=>{o.value.editItem(C,x)},tn=C=>{wn.value.setForm(C,"edit"),wn.value.show(!0)},$=()=>{let C=o.value.list.map(D=>D.cart_id),x={takes:[],use_coupon:{},use_integral:!1,cart_id:C};o.value.discounts>0&&(x.deduction_price=o.value.discounts.toFixed(2),x.pay_type="micropay"),Wg(x).then(D=>{z.value.setForm({data:D.data,cart_id:C})})},j=()=>{$(),z.value.drawer=!0},Z=()=>{o.value.getList()},Rn=()=>{console.log("F9"),H.name=="home"&&(!z.value.drawer&&o.value.list.length>0?j():z.value.beforeClose())};return Lt(()=>{mn(),V.value.page++,En.on("F9",Rn)}),Tt(()=>{En.off("F9",Rn)}),(C,x)=>(yn(),Dn("div",Xd,[X(dd,{ref_key:"orderRef",ref:o,onGoPay:j,onEditPupop:tn},null,512),X($g),X(Fd,{ref_key:"shopRef",ref:W,style:{flex:"1"},storeList:S.value,onGetStoreList:mn,onChangeItem:q,onLoadMore:en},null,8,["storeList"]),X(kd,{ref_key:"pupopRef",ref:wn,onChangeItem:q,onEditItem:an},null,512),X(Hg,{ref_key:"payRef",ref:z,onPaySuccess:Z},null,512)]))}};export{ev as default}; diff --git a/dist/assets/detail-SSwoB7VG.js b/dist/assets/detail-SSwoB7VG.js index 7bc35ca..375b14e 100644 --- a/dist/assets/detail-SSwoB7VG.js +++ b/dist/assets/detail-SSwoB7VG.js @@ -1 +1 @@ -import{_ as H,z as Z,u as G,r as u,o as ee,m as L,b as g,j as N,c as t,h as s,e,t as _,f as d,w as v,g as p,s as l,k as te,q as J,F as j,i as x,p as I,d as F,A as se,E,v as oe,x as ae}from"./index-3-t8Fk7s.js";import{e as ie,f as le,g as ne}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{h as O}from"./moment-Cl4UOzQZ.js";import{p as de}from"./pay-Bt7FIL7i.js";const ce={class:"header-nav"},re={class:"nav-item"},_e={class:"nav-item-btn"},ue={key:0,class:"nav-item-btn"},ve={class:"header-input"},pe={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},fe=["onClick"],me={class:"top"},ye={class:"create-time"},he={class:"shop"},ge={key:0,class:"left"},ke={key:0,class:"shop-name"},$e={class:"right"},be={class:"money"},Ce={class:"count"},Ve={class:"bottom"},Se={class:"pay"},we={key:0},Ye={key:0},De={key:1},Pe={key:2},Le={key:3},Ie={key:4},Me={key:5},Ae={key:6},qe={key:1,style:{color:"#ff4a00"}},ze={key:0,class:"cashier"},Ue={key:1,class:"cashier"},Be={key:0,class:"load-end"},Re={key:1,class:"load-end"},Te={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup($){const S=Z(),M=G(),o=$;u([]);const C=u(1),w=u(0),k=m=>{r.value.page=1,Y.value=!1,b.value=!1,c.value=[],n(!0)};u(null);const V=u(""),A=()=>{r.value.date=V.value.join("-"),n(!0)},r=u({page:1,limit:20,search_info:"",date:"",staff_id:0});S.query.date&&(V.value=[O(S.query.date).format("YYYY/MM/DD"),O(S.query.date).format("YYYY/MM/DD")],r.value.date=V.value.join("-")),S.query.payType&&(w.value=S.query.payType);const b=u(!1),U=u(0),P=u(0),Y=u(!1),c=u([]),n=(m=!1)=>{if(m)r.value.page=1;else if(Y.value||b.value)return;o.isSystem||(r.value.staff_id=M.userInfo.service.service_id,w.value==1?r.value.pay_type="12":w.value==2?r.value.pay_type="11,13":r.value.pay_type=""),b.value=!0,C.value==1&&(r.value.paid=null),C.value==2&&(r.value.paid=0),ie(M.userInfo.service.mer_id,r.value).then(i=>{m?c.value=i.data.list:c.value=[...c.value,...i.data.list],i.data.list.length0&&L.emit("set-order-detail",c.value[0]),U.value=i.data.count,b.value=!1}).catch(i=>{Y.value=!0,b.value=!1})},q=(m,i)=>{P.value=i,L.emit("set-order-detail",m)};return ee(()=>{L.on("update-order-detail",m=>{console.log("==="),c.value[P.value].paid=1})}),(m,i)=>{const y=g("el-radio-button"),z=g("el-radio-group"),B=g("el-date-picker"),f=g("el-button"),D=g("el-input"),K=g("el-image"),Q=N("loading"),W=N("infinite-scroll");return t(),s("div",{class:I(["my-order",{"my-order-no-system":!$.isSystem}])},[e("div",ce,[e("div",re,_($.isSystem?"平台订单":"收银订单"),1),e("div",_e,[d(z,{modelValue:C.value,"onUpdate:modelValue":i[0]||(i[0]=a=>C.value=a),onChange:k,size:"small"},{default:v(()=>[d(y,{value:1},{default:v(()=>[p("全部")]),_:1}),d(y,{value:2},{default:v(()=>[p("未支付")]),_:1})]),_:1},8,["modelValue"]),d(B,{modelValue:V.value,"onUpdate:modelValue":i[1]||(i[1]=a=>V.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:A,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])]),$.isSystem?l("",!0):(t(),s("div",ue,[d(z,{modelValue:w.value,"onUpdate:modelValue":i[2]||(i[2]=a=>w.value=a),onChange:k,size:"small"},{default:v(()=>[d(y,{value:0},{default:v(()=>[p("全部")]),_:1}),d(y,{value:1},{default:v(()=>[p("现金收款")]),_:1}),d(y,{value:2},{default:v(()=>[p("线上收款")]),_:1})]),_:1},8,["modelValue"])]))]),e("div",ve,[d(D,{modelValue:r.value.search_info,"onUpdate:modelValue":i[4]||(i[4]=a=>r.value.search_info=a),placeholder:"请输入订单编号",onKeydown:i[5]||(i[5]=te(a=>n(!0),["enter"])),onClear:i[6]||(i[6]=a=>n(!0)),clearable:""},{append:v(()=>[d(f,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[3]||(i[3]=a=>n(!0))},{default:v(()=>[p("搜索")]),_:1})]),_:1},8,["modelValue"])]),J((t(),s("div",pe,[(t(!0),s(j,null,x(c.value,(a,R)=>(t(),s("div",{class:I(["item",{"item-active":P.value==R}]),key:R,onClick:T=>q(a,R)},[e("div",me,[e("div",{class:I(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+_(a.order_sn),3),e("div",ye,_(a.create_time),1)]),e("div",he,[a.orderProduct?(t(),s("div",ge,[(t(!0),s(j,null,x(a.orderProduct.slice(0,5),(T,X)=>(t(),F(K,{key:X,src:T.cart_info.productAttr.image||T.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",ke,_(a.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",$e,[e("div",be,"¥"+_(a.pay_price),1),e("div",Ce,"共"+_(a.total_num)+"件商品",1)])]),e("div",Ve,[e("div",Se,[a.paid?(t(),s("div",we,[p(" 已支付 "),a.pay_type==13?(t(),s("span",Ye,"(支付宝收款)")):l("",!0),a.pay_type==12?(t(),s("span",De,"(现金支付)")):l("",!0),a.pay_type==11?(t(),s("span",Pe,"(微信收款)")):l("",!0),a.pay_type==0?(t(),s("span",Le,"(余额支付)")):l("",!0),a.pay_type==1?(t(),s("span",Ie,"(微信支付)")):l("",!0),a.pay_type==9?(t(),s("span",Me,"(商户余额支付)")):l("",!0),a.pay_type==10?(t(),s("span",Ae,"(对公转账)")):l("",!0)])):(t(),s("div",qe,"未支付"))]),a.service_info?(t(),s("div",ze," 收银员: "+_(a.service_info.nickname),1)):(t(),s("div",Ue,"平台订单"))])],10,fe))),128)),Y.value?(t(),s("div",Be,"没有更多了")):l("",!0),b.value?(t(),s("div",Re,"加载中...")):l("",!0)])),[[Q,b.value],[W,n]])],2)}}},Qt=H(Te,[["__scopeId","data-v-afd5b49f"]]),h=$=>(oe("data-v-e6e9d4a9"),$=$(),ae(),$),Ee={class:"my-order"},Ne={class:"header-nav"},je=["onClick"],xe={class:"detail"},Fe={key:0,class:"table"},Ke={style:{"font-size":"0.9rem"}},Oe={style:{color:"#ff4a00"}},He={style:{display:"flex","align-items":"center"}},Ge={style:{"margin-left":"0.5rem"}},Je={key:1,class:"table"},Qe=h(()=>e("div",{class:"table-title"},"订单信息",-1)),We={class:"table-info"},Xe={class:"info-item"},Ze=h(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=h(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=h(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=h(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},rt={class:"info-item"},_t=h(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),ut={class:"info-item-info"},vt={class:"info-item"},pt=h(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),ft={class:"info-item-info"},mt={class:"info-item"},yt=h(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ht={class:"info-item-info"},gt={key:0},kt={key:1},$t={key:2},bt={key:3},Ct={key:4},Vt={key:5},St={key:6},wt={key:0,class:"table-title"},Yt={key:1,class:"table-info",style:{"flex-direction":"column"}},Dt={class:"info-item"},Pt=h(()=>e("div",{class:"info-item-title"},"头像:",-1)),Lt={class:"info-item-info"},It={class:"info-item"},Mt=h(()=>e("div",{class:"info-item-title"},"昵称:",-1)),At={class:"info-item-info"},qt={class:"info-item"},zt=h(()=>e("div",{class:"info-item-title"},"账号:",-1)),Ut={class:"info-item-info"},Bt={key:2,class:"footer"},Rt={class:"info"},Tt={class:"ser"},Et={class:"price"},Nt={key:0,class:"handle"},jt={key:1,class:"handle"},xt=h(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ft={class:"dialog-footer"},Kt={__name:"detail",setup($){const S=G(),M=se(),o=u({});L.on("set-order-detail",c=>{o.value=c}),u([]);const C=u(null),w=u(!1);u(0);const k=u(0),V=u(["商品信息","订单详情"]),A=u(""),r=u(!1),b=c=>{A.value=c,r.value=!0},U=()=>{r.value=!1,le({order_sn:A.value,staff_id:S.userInfo.service.service_id}).then(c=>{E({message:c.message,type:"success"}),M.push({name:"home"})})},P=c=>{C.value.setRePay({price:c.pay_price,order_id:c.group_order_id}),C.value.drawer=!0},Y=c=>{ne({order_sn:c}).then(n=>{n.data.paid==1||n.message=="支付成功"?(E({message:n.message,type:"success"}),L.emit("update-order-detail",{}),o.value.paid=1):E({message:n.message,type:"error"})}).catch(n=>{})};return(c,n)=>{const q=g("el-image"),m=g("el-table-column"),i=g("el-table"),y=g("el-button"),z=g("el-dialog"),B=N("loading");return t(),s("div",Ee,[e("div",Ne,[(t(!0),s(j,null,x(V.value,(f,D)=>(t(),s("div",{key:D,class:I(["nav-item",{"nav-item-active":k.value==D,"nav-item-radius1":k.value==D+1,"nav-item-radius2":k.value==D-1}]),onClick:K=>k.value=D},_(f),11,je))),128)),e("div",{class:I(["nav-item",{"nav-item-radius2":k.value==V.value.length-1}]),style:{flex:"1"}},null,2)]),J((t(),s("div",xe,[o.value.orderProduct&&k.value==0?(t(),s("div",Fe,[e("div",Ke,[p(" 共计 "),e("span",Oe,_(o.value.total_num),1),p(" 件商品 ")]),d(i,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:v(()=>[d(m,{prop:"cart_info.product.store_name",label:"商品信息"},{default:v(({row:f})=>[e("div",He,[d(q,{style:{height:"3rem",width:"3rem"},src:f.cart_info.productAttr.image||f.cart_info.product.image},null,8,["src"]),e("span",Ge,_(f.cart_info.product.store_name),1)])]),_:1}),d(m,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),d(m,{prop:"product_num",label:"数量",width:"150"}),d(m,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&k.value==1?(t(),s("div",Je,[Qe,e("div",We,[e("div",Xe,[Ze,e("div",et,_(o.value.create_time),1)]),e("div",tt,[st,e("div",ot,_(o.value.total_num),1)]),e("div",at,[it,e("div",lt,"¥"+_(o.value.total_price),1)]),e("div",nt,[dt,e("div",ct,_(o.value.pay_time),1)]),e("div",rt,[_t,e("div",ut,"¥"+_(o.value.deduction_price),1)]),e("div",vt,[pt,e("div",ft,"¥"+_(o.value.pay_price),1)]),e("div",mt,[yt,e("div",ht,[o.value.pay_type==11?(t(),s("span",gt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",kt,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",$t,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",bt,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",Ct,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",Vt,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",St,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",wt,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",Yt,[e("div",Dt,[Pt,e("div",Lt,[d(q,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",It,[Mt,e("div",At,_(o.value.service_info.nickname),1)]),e("div",qt,[zt,e("div",Ut,_(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),o.value.service_info?(t(),s("div",Bt,[e("div",Rt,[e("div",Tt,"收银员: "+_(o.value.service_info.nickname),1),e("div",Et,[p(" 实付: "),e("span",null,"¥"+_(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",jt,"已支付")):(t(),s("div",Nt,[d(y,{class:"btn",type:"primary",onClick:n[0]||(n[0]=f=>P(o.value))},{default:v(()=>[p("重新支付")]),_:1}),d(y,{class:"btn",type:"primary",onClick:n[1]||(n[1]=f=>Y(o.value.order_sn))},{default:v(()=>[p("检测状态")]),_:1}),d(y,{class:"btn",type:"success",onClick:n[2]||(n[2]=f=>b(o.value.order_sn))},{default:v(()=>[p("提单")]),_:1})]))])):l("",!0)])),[[B,w.value]]),d(de,{ref_key:"payRef",ref:C},null,512),d(z,{modelValue:r.value,"onUpdate:modelValue":n[4]||(n[4]=f=>r.value=f),title:"提示",width:"500"},{footer:v(()=>[e("div",Ft,[d(y,{onClick:n[3]||(n[3]=f=>r.value=!1)},{default:v(()=>[p("取消")]),_:1}),c.cartCount>0?(t(),F(y,{key:0,onClick:c.goHome},{default:v(()=>[p(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),F(y,{key:1,type:"primary",onClick:U},{default:v(()=>[p(" 确认提单 ")]),_:1}))])]),default:v(()=>[xt]),_:1},8,["modelValue"])])}}},Wt=H(Kt,[["__scopeId","data-v-e6e9d4a9"]]);export{Wt as d,Qt as o}; +import{_ as H,z as Z,u as G,r as u,o as ee,m as L,b as g,j as N,c as t,h as s,e,t as _,f as d,w as v,g as p,s as l,k as te,q as J,F as j,i as x,p as I,d as F,A as se,E,v as oe,x as ae}from"./index-3-t8Fk7s.js";import{e as ie,f as le,g as ne}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{h as O}from"./moment-Cl4UOzQZ.js";import{p as de}from"./pay-Bt7FIL7i.js";const ce={class:"header-nav"},re={class:"nav-item"},_e={class:"nav-item-btn"},ue={key:0,class:"nav-item-btn"},ve={class:"header-input"},pe={class:"order-list",":infinite-scroll-distance":"300",":infinite-scroll-delay":"500",style:{overflow:"auto"}},fe=["onClick"],me={class:"top"},ye={class:"create-time"},he={class:"shop"},ge={key:0,class:"left"},ke={key:0,class:"shop-name"},$e={class:"right"},be={class:"money"},Ce={class:"count"},Ve={class:"bottom"},Se={class:"pay"},we={key:0},Ye={key:0},De={key:1},Pe={key:2},Le={key:3},Ie={key:4},Me={key:5},Ae={key:6},qe={key:1,style:{color:"#ff4a00"}},ze={key:0,class:"cashier"},Ue={key:1,class:"cashier"},Be={key:0,class:"load-end"},Re={key:1,class:"load-end"},Te={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup($){const S=Z(),M=G(),o=$;u([]);const C=u(1),w=u(0),k=m=>{r.value.page=1,Y.value=!1,b.value=!1,c.value=[],n(!0)};u(null);const V=u(""),A=()=>{r.value.date=V.value.join("-"),n(!0)},r=u({page:1,limit:20,search_info:"",date:"",staff_id:0});S.query.date&&(V.value=[O(S.query.date).format("YYYY/MM/DD"),O(S.query.date).format("YYYY/MM/DD")],r.value.date=V.value.join("-")),S.query.payType&&(w.value=S.query.payType);const b=u(!1),U=u(0),P=u(0),Y=u(!1),c=u([]),n=(m=!1)=>{if(m)r.value.page=1;else if(Y.value||b.value)return;o.isSystem||(r.value.staff_id=M.userInfo.service.service_id,w.value==1?r.value.pay_type="12":w.value==2?r.value.pay_type="11,13":r.value.pay_type=""),b.value=!0,C.value==1&&(r.value.paid=null),C.value==2&&(r.value.paid=0),ie(M.userInfo.service.mer_id,r.value).then(i=>{m?c.value=i.data.list:c.value=[...c.value,...i.data.list],i.data.list.length0&&L.emit("set-order-detail",c.value[0]),U.value=i.data.count,b.value=!1}).catch(i=>{Y.value=!0,b.value=!1})},q=(m,i)=>{P.value=i,L.emit("set-order-detail",m)};return ee(()=>{L.on("update-order-detail",m=>{console.log("==="),c.value[P.value].paid=1})}),(m,i)=>{const y=g("el-radio-button"),z=g("el-radio-group"),B=g("el-date-picker"),f=g("el-button"),D=g("el-input"),K=g("el-image"),Q=N("loading"),W=N("infinite-scroll");return t(),s("div",{class:I(["my-order",{"my-order-no-system":!$.isSystem}])},[e("div",ce,[e("div",re,_($.isSystem?"平台订单":"收银订单"),1),e("div",_e,[d(z,{modelValue:C.value,"onUpdate:modelValue":i[0]||(i[0]=a=>C.value=a),onChange:k,size:"small"},{default:v(()=>[d(y,{value:1},{default:v(()=>[p("全部")]),_:1}),d(y,{value:2},{default:v(()=>[p("未支付")]),_:1})]),_:1},8,["modelValue"]),d(B,{modelValue:V.value,"onUpdate:modelValue":i[1]||(i[1]=a=>V.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:A,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])]),$.isSystem?l("",!0):(t(),s("div",ue,[d(z,{modelValue:w.value,"onUpdate:modelValue":i[2]||(i[2]=a=>w.value=a),onChange:k,size:"small"},{default:v(()=>[d(y,{value:0},{default:v(()=>[p("全部")]),_:1}),d(y,{value:1},{default:v(()=>[p("现金收款")]),_:1}),d(y,{value:2},{default:v(()=>[p("线上收款")]),_:1})]),_:1},8,["modelValue"])]))]),e("div",ve,[d(D,{modelValue:r.value.search_info,"onUpdate:modelValue":i[4]||(i[4]=a=>r.value.search_info=a),placeholder:"请输入订单编号",onKeydown:i[5]||(i[5]=te(a=>n(!0),["enter"])),onClear:i[6]||(i[6]=a=>n(!0)),clearable:""},{append:v(()=>[d(f,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[3]||(i[3]=a=>n(!0))},{default:v(()=>[p("搜索")]),_:1})]),_:1},8,["modelValue"])]),J((t(),s("div",pe,[(t(!0),s(j,null,x(c.value,(a,R)=>(t(),s("div",{class:I(["item",{"item-active":P.value==R}]),key:R,onClick:T=>q(a,R)},[e("div",me,[e("div",{class:I(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+_(a.order_sn),3),e("div",ye,_(a.create_time),1)]),e("div",he,[a.orderProduct?(t(),s("div",ge,[(t(!0),s(j,null,x(a.orderProduct.slice(0,5),(T,X)=>(t(),F(K,{key:X,src:T.cart_info.productAttr.image||T.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",ke,_(a.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",$e,[e("div",be,"¥"+_(a.pay_price),1),e("div",Ce,"共"+_(a.total_num)+"件商品",1)])]),e("div",Ve,[e("div",Se,[a.paid?(t(),s("div",we,[p(" 已支付 "),a.pay_type==13?(t(),s("span",Ye,"(支付宝收款)")):l("",!0),a.pay_type==12?(t(),s("span",De,"(现金支付)")):l("",!0),a.pay_type==11?(t(),s("span",Pe,"(微信收款)")):l("",!0),a.pay_type==0?(t(),s("span",Le,"(余额支付)")):l("",!0),a.pay_type==1?(t(),s("span",Ie,"(微信支付)")):l("",!0),a.pay_type==9?(t(),s("span",Me,"(商户余额支付)")):l("",!0),a.pay_type==10?(t(),s("span",Ae,"(对公转账)")):l("",!0)])):(t(),s("div",qe,"未支付"))]),a.service_info?(t(),s("div",ze," 收银员: "+_(a.service_info.nickname),1)):(t(),s("div",Ue,"平台订单"))])],10,fe))),128)),Y.value?(t(),s("div",Be,"没有更多了")):l("",!0),b.value?(t(),s("div",Re,"加载中...")):l("",!0)])),[[Q,b.value],[W,n]])],2)}}},Qt=H(Te,[["__scopeId","data-v-afd5b49f"]]),h=$=>(oe("data-v-e6e9d4a9"),$=$(),ae(),$),Ee={class:"my-order"},Ne={class:"header-nav"},je=["onClick"],xe={class:"detail"},Fe={key:0,class:"table"},Ke={style:{"font-size":"0.9rem"}},Oe={style:{color:"#ff4a00"}},He={style:{display:"flex","align-items":"center"}},Ge={style:{"margin-left":"0.5rem"}},Je={key:1,class:"table"},Qe=h(()=>e("div",{class:"table-title"},"订单信息",-1)),We={class:"table-info"},Xe={class:"info-item"},Ze=h(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=h(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=h(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=h(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},rt={class:"info-item"},_t=h(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),ut={class:"info-item-info"},vt={class:"info-item"},pt=h(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),ft={class:"info-item-info"},mt={class:"info-item"},yt=h(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ht={class:"info-item-info"},gt={key:0},kt={key:1},$t={key:2},bt={key:3},Ct={key:4},Vt={key:5},St={key:6},wt={key:0,class:"table-title"},Yt={key:1,class:"table-info",style:{"flex-direction":"column"}},Dt={class:"info-item"},Pt=h(()=>e("div",{class:"info-item-title"},"头像:",-1)),Lt={class:"info-item-info"},It={class:"info-item"},Mt=h(()=>e("div",{class:"info-item-title"},"昵称:",-1)),At={class:"info-item-info"},qt={class:"info-item"},zt=h(()=>e("div",{class:"info-item-title"},"账号:",-1)),Ut={class:"info-item-info"},Bt={key:2,class:"footer"},Rt={class:"info"},Tt={class:"ser"},Et={class:"price"},Nt={key:0,class:"handle"},jt={key:1,class:"handle"},xt=h(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ft={class:"dialog-footer"},Kt={__name:"detail",setup($){const S=G(),M=se(),o=u({});L.on("set-order-detail",c=>{o.value=c}),u([]);const C=u(null),w=u(!1);u(0);const k=u(0),V=u(["商品信息","订单详情"]),A=u(""),r=u(!1),b=c=>{A.value=c,r.value=!0},U=()=>{r.value=!1,le({order_sn:A.value,staff_id:S.userInfo.service.service_id}).then(c=>{E({message:c.message,type:"success"}),M.push({name:"home"})})},P=c=>{C.value.setRePay({price:c.pay_price,order_id:c.group_order_id}),C.value.drawer=!0},Y=c=>{ne({order_sn:c}).then(n=>{n.data.paid==1||n.message=="支付成功"?(E({message:n.message,type:"success"}),L.emit("update-order-detail",{}),o.value.paid=1):E({message:n.message,type:"error"})}).catch(n=>{})};return(c,n)=>{const q=g("el-image"),m=g("el-table-column"),i=g("el-table"),y=g("el-button"),z=g("el-dialog"),B=N("loading");return t(),s("div",Ee,[e("div",Ne,[(t(!0),s(j,null,x(V.value,(f,D)=>(t(),s("div",{key:D,class:I(["nav-item",{"nav-item-active":k.value==D,"nav-item-radius1":k.value==D+1,"nav-item-radius2":k.value==D-1}]),onClick:K=>k.value=D},_(f),11,je))),128)),e("div",{class:I(["nav-item",{"nav-item-radius2":k.value==V.value.length-1}]),style:{flex:"1"}},null,2)]),J((t(),s("div",xe,[o.value.orderProduct&&k.value==0?(t(),s("div",Fe,[e("div",Ke,[p(" 共计 "),e("span",Oe,_(o.value.total_num),1),p(" 件商品 ")]),d(i,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:v(()=>[d(m,{prop:"cart_info.product.store_name",label:"商品信息"},{default:v(({row:f})=>[e("div",He,[d(q,{style:{height:"3rem",width:"3rem"},src:f.cart_info.productAttr.image||f.cart_info.product.image},null,8,["src"]),e("span",Ge,_(f.cart_info.product.store_name),1)])]),_:1}),d(m,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),d(m,{prop:"product_num",label:"数量",width:"150"}),d(m,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&k.value==1?(t(),s("div",Je,[Qe,e("div",We,[e("div",Xe,[Ze,e("div",et,_(o.value.create_time),1)]),e("div",tt,[st,e("div",ot,_(o.value.total_num),1)]),e("div",at,[it,e("div",lt,"¥"+_(o.value.total_price),1)]),e("div",nt,[dt,e("div",ct,_(o.value.pay_time),1)]),e("div",rt,[_t,e("div",ut,"¥"+_(o.value.deduction_price),1)]),e("div",vt,[pt,e("div",ft,"¥"+_(o.value.pay_price),1)]),e("div",mt,[yt,e("div",ht,[o.value.pay_type==11?(t(),s("span",gt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",kt,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",$t,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",bt,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",Ct,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",Vt,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",St,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",wt,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",Yt,[e("div",Dt,[Pt,e("div",Lt,[d(q,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",It,[Mt,e("div",At,_(o.value.service_info.nickname),1)]),e("div",qt,[zt,e("div",Ut,_(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),o.value.service_info?(t(),s("div",Bt,[e("div",Rt,[e("div",Tt,"收银员: "+_(o.value.service_info.nickname),1),e("div",Et,[p(" 实付: "),e("span",null,"¥"+_(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",jt,"已支付")):(t(),s("div",Nt,[d(y,{class:"btn",type:"primary",onClick:n[0]||(n[0]=f=>P(o.value))},{default:v(()=>[p("重新支付")]),_:1}),d(y,{class:"btn",type:"primary",onClick:n[1]||(n[1]=f=>Y(o.value.order_sn))},{default:v(()=>[p("检测状态")]),_:1}),d(y,{class:"btn",type:"success",onClick:n[2]||(n[2]=f=>b(o.value.order_sn))},{default:v(()=>[p("提单")]),_:1})]))])):l("",!0)])),[[B,w.value]]),d(de,{ref_key:"payRef",ref:C},null,512),d(z,{modelValue:r.value,"onUpdate:modelValue":n[4]||(n[4]=f=>r.value=f),title:"提示",width:"500"},{footer:v(()=>[e("div",Ft,[d(y,{onClick:n[3]||(n[3]=f=>r.value=!1)},{default:v(()=>[p("取消")]),_:1}),c.cartCount>0?(t(),F(y,{key:0,onClick:c.goHome},{default:v(()=>[p(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),F(y,{key:1,type:"primary",onClick:U},{default:v(()=>[p(" 确认提单 ")]),_:1}))])]),default:v(()=>[xt]),_:1},8,["modelValue"])])}}},Wt=H(Kt,[["__scopeId","data-v-e6e9d4a9"]]);export{Wt as d,Qt as o}; diff --git a/dist/assets/index-BcmmN2mF.js b/dist/assets/index-BcmmN2mF.js index 1a70750..6414a8c 100644 --- a/dist/assets/index-BcmmN2mF.js +++ b/dist/assets/index-BcmmN2mF.js @@ -1 +1 @@ -import{c as ce,a as re,b as ee,d as ue,o as de}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{_ as K,r,o as M,m as $,a as N,b as m,c as h,d as G,w,e,f as c,g,t as R,n as H,E as j,u as te,h as P,F as Q,i as W,j as oe,k as _e,l as T,p as se,q as ae,s as q,v as le,x as ne,y as ve,z as pe}from"./index-3-t8Fk7s.js";import{_ as fe}from"./lodash-BiR1SJeZ.js";import{p as me}from"./padding-DTyMU7Be.js";import{g as he,s as ge}from"./shop-C3GBYBKO.js";import{p as ye}from"./pay-Bt7FIL7i.js";const ke={class:"price"},be={class:"flex"},$e={style:{margin:"0.625rem","padding-bottom":"40px"}},we={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},xe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(x,{expose:S,emit:k}){const a=r(!1),u=r(null),t=r(0),d=(i=!0,v=0)=>{n.value.nowPrice="",n.value.percentage="",a.value=i,t.value=v,H(()=>{setTimeout(()=>{var A;(A=u.value)==null||A.focus()},150)})},n=r({nowPrice:"",percentage:""}),p=i=>{n.value.percentage=(i/t.value*100).toFixed(2)},I=i=>{n.value.nowPrice=(t.value*i/100).toFixed(2)},F=k,V=()=>{if(n.value.percentage>100)return n.value.nowPrice="",n.value.percentage="",j.error("改价金额不能大于当前订单金额");if(n.value.nowPrice<=0)return n.value.nowPrice="",n.value.percentage="",j.error("金额不能小于0");F("changeAllPrice",n.value.nowPrice)};S({show:d,dialogVisible:a});const L=()=>{a.value&&V()};return M(()=>{$.on("enter",L)}),N(()=>{$.off("enter",L)}),(i,v)=>{const A=m("el-input"),z=m("el-button"),_=m("el-dialog");return h(),G(_,{modelValue:a.value,"onUpdate:modelValue":v[2]||(v[2]=f=>a.value=f),title:"订单改价",width:"650"},{footer:w(()=>[e("div",xe,[c(z,{class:"ok-btn",type:"primary",onClick:V},{default:w(()=>[g(" 确定 (Enter) ")]),_:1})])]),default:w(()=>[e("div",ke,[e("div",be,[c(A,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.nowPrice,"onUpdate:modelValue":v[0]||(v[0]=f=>n.value.nowPrice=f),type:"number",placeholder:"请输入改价后的价格",onInput:p},{suffix:w(()=>[g("元")]),_:1},8,["modelValue"]),c(A,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.percentage,"onUpdate:modelValue":v[1]||(v[1]=f=>n.value.percentage=f),type:"number",placeholder:"请输入比例",onInput:I},{suffix:w(()=>[g("%")]),_:1},8,["modelValue"])]),e("div",$e,[g(" 改价后金额: "),e("span",we,"¥"+R(n.value.nowPrice||t.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ce=K(Ie,[["__scopeId","data-v-dd4c26df"]]),Pe={class:"my-order"},Ve={class:"header-nav"},Ae={class:"nav-item"},Se={class:"order-list"},Fe={class:"order-item-info"},Le={class:"order-item-title"},Re={class:"title"},Ee=["onClick"],ze={class:"order-item-sku"},De=["onClick"],Ue={class:"order-item-price"},Oe={class:"order-footer"},qe={class:"order-total"},Me={class:"price"},Ne={class:"total-item"},Be={style:{"font-size":"1.4rem"}},Te={class:"total-item"},je={class:"update-price"},Ke={class:"order-btn"},Ge={__name:"order",emits:["goPay","editAttr"],setup(x,{expose:S,emit:k}){const a=r([]),u=r(0),t=r(0),d=r(0),n=te(),p=()=>{let o=[];a.value.map(l=>{o.push(l.cart_id)}),o.length!=0&&F(o)},I=o=>{a.value=a.value.filter(l=>l.cart_id!=o),F([o])},F=o=>{ce({cart_id:o}).then(l=>{console.log(l),V()})},V=()=>{u.value=0,t.value=0,d.value=0,re({staff_id:n.userInfo.service.service_id}).then(o=>{var l,b;((b=(l=o.data)==null?void 0:l.list)==null?void 0:b.length)>0?(a.value=o.data.list[0].list,a.value.forEach(C=>{u.value+=C.productAttr.price*C.cart_num}),t.value=u.value):a.value=[]})};V();const L=k,i=()=>{L("goPay")},v=(o,l)=>{ee(o.cart_id,{cart_num:o.cart_num}).then(b=>{u.value=0,a.value.forEach(C=>{u.value+=C.productAttr.price*C.cart_num}),t.value=u.value})},A=o=>{L("editPupop",o)},z=(o,l)=>{ee(o,l).then(b=>{V()})},_=o=>{d.value=t.value-o,u.value=+o,H(()=>{setTimeout(()=>{y(!1)},150)})};r(0);const f=r(null),y=(o=!0)=>{f.value.show(o,t.value)};S({getList:V,list:a,editItem:z,discounts:d,allPrice:u});const D=()=>{f.value.dialogVisible?f.value.dialogVisible=!1:y()},s=()=>{a.value.length>0&&p()};return M(()=>{$.on("insert",D),$.on("delete",s)}),N(()=>{$.off("insert",D),$.off("delete",s)}),(o,l)=>{const b=m("Delete"),C=m("el-icon"),O=m("el-empty"),U=m("el-image"),J=m("ArrowDown"),Y=m("el-input-number"),Z=m("el-button");return h(),P("div",Pe,[e("div",Ve,[e("div",Ae,[g(" 已选购 "),e("span",null,R(a.value.length),1),g(" 件 ")]),e("div",{class:"nav-item-clear",onClick:p},[c(C,null,{default:w(()=>[c(b)]),_:1}),g("清空 (Delete) ")])]),e("div",Se,[a.value.length==0?(h(),G(O,{key:0,description:"请点击右侧添加商品"})):(h(!0),P(Q,{key:1},W(a.value,(E,ie)=>(h(),P("div",{class:"order-item",key:ie},[c(U,{loading:"lazy",class:"order-item-img",src:E.productAttr&&E.productAttr.image||E.product.image},null,8,["src"]),e("div",Fe,[e("div",Le,[e("div",Re,R(E.spu.store_name),1),e("div",{class:"delete",onClick:B=>I(E.cart_id)},"删除",8,Ee)]),e("div",ze,[e("span",{style:{display:"flex","align-items":"center"},onClick:B=>A(E)},[g("商品规格: "+R(E.productAttr.sku||"默认规格"),1),c(C,{size:"16",style:{"margin-left":"0.2rem"}},{default:w(()=>[c(J)]),_:1})],8,De)]),e("div",Ue,[e("div",null,[g(" ¥"),e("span",null,R(E.productAttr.price),1)]),e("div",null,[c(Y,{modelValue:E.cart_num,"onUpdate:modelValue":B=>E.cart_num=B,"step-strictly":"",min:1,step:1,onChange:B=>v(E)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Oe,[e("div",qe,[e("div",Me,[e("div",Ne,[g(" 实付: "),e("span",null,[g("¥"),e("span",Be,R(u.value.toFixed(2)),1)])]),e("div",Te,[g(" 优惠: "),e("span",null,[g("¥"),e("span",null,R(d.value.toFixed(2)),1)])])]),e("div",je,[c(Z,{class:"btn",type:"primary",onClick:y,size:"small"},{default:w(()=>[g("改价 (Insert)")]),_:1})])]),e("div",Ke,[c(Z,{class:"btn",type:"primary",onClick:i,disabled:a.value.length==0},{default:w(()=>[g("立即结账 (F9)")]),_:1},8,["disabled"])])]),c(Ce,{ref_key:"priceRef",ref:f,onChangeAllPrice:_},null,512)])}}},Je=K(Ge,[["__scopeId","data-v-49a45541"]]),X=x=>(le("data-v-d44598fa"),x=x(),ne(),x),He={class:"my-order"},Qe=X(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},ot=X(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),st=[ot],at={key:1,class:"no-stock"},lt=X(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],it={key:1,class:"no-data"},ct={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(x,{expose:S,emit:k}){const a=r(null),u=k,t=r(""),d=()=>{u("loadMore",{bar_code:t.value})},n=i=>{if(i.is_used==0)return j.error("该商品已被平台关闭");if(i.stock==0)return j.warning("该商品无库存");u("changeItem",i)},p=fe.throttle(()=>{u("getStoreList",{bar_code:t.value},!0)},300);S({bar_code:t});const I=r(!1),F=()=>{I.value=!0},V=()=>{I.value=!1},L=()=>{var i;(i=a.value)==null||i.focus()};return M(()=>{H(()=>{var i;(i=a.value)==null||i.focus(),F()}),$.on("shift",L)}),N(()=>{$.off("shift",L)}),(i,v)=>{const A=m("el-input"),z=m("Search"),_=m("el-icon"),f=m("el-button"),y=m("el-image"),D=m("el-space"),s=m("el-empty"),o=oe("infinite-scroll");return h(),P("div",He,[e("div",{class:se(["header-nav",{"input-focus":I.value}])},[Qe,e("div",We,[c(A,{modelValue:t.value,"onUpdate:modelValue":v[0]||(v[0]=l=>t.value=l),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:a,onFocus:F,onBlur:V,onKeyup:_e(T(p),["enter"]),onClear:T(p)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:v[1]||(v[1]=(...l)=>T(p)&&T(p)(...l))},[c(f,{class:"btn",type:"primary"},{default:w(()=>[c(_,null,{default:w(()=>[c(z)]),_:1})]),_:1})])],2),ae((h(),P("div",Xe,[x.storeList.length?(h(),G(D,{key:0,wrap:""},{default:w(()=>[(h(!0),P(Q,null,W(x.storeList,(l,b)=>(h(),P("div",{class:"shop-item",key:b,onClick:C=>n(l)},[c(y,{loading:"lazy",src:l.image},null,8,["src"]),e("div",Ze,R(l.store_name),1),e("div",et,[g(" ¥"),e("span",null,R(l.price),1)]),l.stock==0?(h(),P("div",tt,st)):q("",!0),l.is_used==0?(h(),P("div",at,nt)):q("",!0)],8,Ye))),128))]),_:1})):q("",!0),x.storeList.length?q("",!0):(h(),P("div",it,[c(s,{"image-size":300,description:"没有找到对应商品"})]))])),[[o,d]])])}}},rt=K(ct,[["__scopeId","data-v-d44598fa"]]),ut=x=>(le("data-v-52f45b9b"),x=x(),ne(),x),dt={class:"shop"},_t={key:0,class:"shop-info"},vt={class:"shop-info-left"},pt={class:"shop-info-right"},ft={class:"shop-info-right-top"},mt={class:"shop-info-right-center"},ht={class:"shop-info-right-price"},gt={class:"shop-sku"},yt=ut(()=>e("div",{class:"title"},"产品",-1)),kt={class:"sku"},bt=["onClick"],$t={class:"dialog-footer"},wt={__name:"pupop",emits:["changeItem"],setup(x,{expose:S,emit:k}){const a=r(!1),u=_=>{a.value=_},t=r({}),d=r(null),n=r(!1),p=r("add"),I=r({}),F=(_,f="add")=>{p.value=f,f=="add"?(t.value=_,d.value=_.attr[0]):(n.value=!0,I.value=_,he(_.product_id).then(y=>{y.data.attrValue=JSON.parse(JSON.stringify(y.data.attr)),y.data.attr=Object.keys(y.data.sku),t.value=y.data,d.value=y.data.attr[0],n.value=!1}).catch(y=>{n.value=!1}))},V=k,L=()=>{p.value=="add"?V("changeItem",t.value,d.value):V("editItem",I.value.cart_id,{cart_num:I.value.cart_num,product_attr_unique:t.value.sku[d.value].unique}),a.value=!1},i=_=>{d.value=_};S({show:u,setForm:F});const v=()=>{if(!a.value)return;let _=t.value.attr.indexOf(d.value);if(_>0)return i(t.value.attr[_-1])},A=()=>{if(!a.value)return;let _=t.value.attr.indexOf(d.value);if(_{a.value&&L()};return M(()=>{$.on("left",v),$.on("right",A),$.on("enter",z)}),N(()=>{$.off("left",v),$.off("right",A),$.off("enter",z)}),(_,f)=>{const y=m("el-image"),D=m("el-space"),s=m("el-button"),o=m("el-dialog"),l=oe("loading");return h(),G(o,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=b=>a.value=b),title:"商品规格",width:"650"},ve({default:w(()=>{var b,C,O;return[ae((h(),P("div",dt,[t.value.sku?(h(),P("div",_t,[e("div",vt,[c(y,{loading:"lazy",src:((b=t.value.sku[d.value])==null?void 0:b.image)||t.value.image},null,8,["src"])]),e("div",pt,[e("div",ft,R(t.value.store_name),1),e("div",mt,"库存"+R(((C=t.value.sku[d.value])==null?void 0:C.stock)||0),1),e("div",ht,[g("¥"),e("span",null,R(((O=t.value.sku[d.value])==null?void 0:O.price)||t.value.price),1)])])])):q("",!0),e("div",gt,[yt,e("div",kt,[c(D,{wrap:"",size:20},{default:w(()=>[(h(!0),P(Q,null,W(t.value.attr,(U,J)=>(h(),P("div",{class:se(["sku-item",{"sku-item_active":d.value==U}]),onClick:Y=>i(U),key:J},R(U||"默认规格"),11,bt))),128))]),_:1})])])])),[[l,n.value]])]}),_:2},[p.value!="add"&&t.value.attr&&t.value.attr.length==1?void 0:{name:"footer",fn:w(()=>[e("div",$t,[c(s,{class:"ok-btn",type:"primary",onClick:L},{default:w(()=>[g(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},xt=K(wt,[["__scopeId","data-v-52f45b9b"]]),It={class:"my-card"},Lt={__name:"index",setup(x){const S=r(null),k=r(null),a=r(null),u=r(null),t=r([]),d=te(),n=pe(),p=r({page:0,limit:30}),I=(s={},o=!1)=>{p.value={staff_id:d.userInfo.service.service_id,...p.value,...s},o&&(t.value=[],p.value.page=1,F.value=!1),ge(d.userInfo.service.mer_id,p.value).then(l=>{var C,O;((O=(C=l.data)==null?void 0:C.list)==null?void 0:O.length)(U.attr=Object.keys(U.sku),U));t.value=t.value.concat(b),s.bar_code&&t.value.length==1&&L(s.bar_code)&&(a.value.bar_code="",v(t.value[0],t.value[0].attr[0]))})},F=r(!1),V=s=>{F.value||(p.value.page++,I(s))};function L(s){return/^\d+$/.test(s)}const i=(s,o="")=>{let l={is_new:0,product_id:s.product_id,cart_num:1,product_attr_unique:s.sku[o]!==void 0?s.sku[o].unique:"",staff_id:d.userInfo.service.service_id,product_type:0};ue(l).then(b=>{k.value.getList()})},v=(s,o)=>{if(!s.attr||s.attr.length==0||s.attr.length==1)return i(s,s.attr[0]?s.attr[0]:"");if(o)return i(s,o);S.value.setForm(s,"add"),S.value.show(!0)},A=(s,o)=>{k.value.editItem(s,o)},z=s=>{S.value.setForm(s,"edit"),S.value.show(!0)},_=()=>{let s=k.value.list.map(l=>l.cart_id),o={takes:[],use_coupon:{},use_integral:!1,cart_id:s};k.value.discounts>0&&(o.deduction_price=k.value.discounts.toFixed(2),o.pay_type="micropay"),de(o).then(l=>{u.value.setForm({data:l.data,cart_id:s})})},f=()=>{_(),u.value.drawer=!0},y=()=>{k.value.getList()},D=()=>{console.log("F9"),n.name=="home"&&(!u.value.drawer&&k.value.list.length>0?f():u.value.beforeClose())};return M(()=>{I(),p.value.page++,$.on("F9",D)}),N(()=>{$.off("F9",D)}),(s,o)=>(h(),P("div",It,[c(Je,{ref_key:"orderRef",ref:k,onGoPay:f,onEditPupop:z},null,512),c(me),c(rt,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:t.value,onGetStoreList:I,onChangeItem:v,onLoadMore:V},null,8,["storeList"]),c(xt,{ref_key:"pupopRef",ref:S,onChangeItem:v,onEditItem:A},null,512),c(ye,{ref_key:"payRef",ref:u,onPaySuccess:y},null,512)]))}};export{Lt as default}; +import{c as ce,a as re,b as ee,d as ue,o as de}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{_ as K,r,o as M,m as $,a as N,b as m,c as h,d as G,w,e,f as c,g,t as R,n as H,E as j,u as te,h as P,F as Q,i as W,j as oe,k as _e,l as T,p as se,q as ae,s as q,v as le,x as ne,y as ve,z as pe}from"./index-3-t8Fk7s.js";import{_ as fe}from"./lodash-BiR1SJeZ.js";import{p as me}from"./padding-DTyMU7Be.js";import{g as he,s as ge}from"./shop-C3GBYBKO.js";import{p as ye}from"./pay-Bt7FIL7i.js";const ke={class:"price"},be={class:"flex"},$e={style:{margin:"0.625rem","padding-bottom":"40px"}},we={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},xe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(x,{expose:S,emit:k}){const a=r(!1),u=r(null),t=r(0),d=(i=!0,v=0)=>{n.value.nowPrice="",n.value.percentage="",a.value=i,t.value=v,H(()=>{setTimeout(()=>{var A;(A=u.value)==null||A.focus()},150)})},n=r({nowPrice:"",percentage:""}),p=i=>{n.value.percentage=(i/t.value*100).toFixed(2)},I=i=>{n.value.nowPrice=(t.value*i/100).toFixed(2)},F=k,V=()=>{if(n.value.percentage>100)return n.value.nowPrice="",n.value.percentage="",j.error("改价金额不能大于当前订单金额");if(n.value.nowPrice<=0)return n.value.nowPrice="",n.value.percentage="",j.error("金额不能小于0");F("changeAllPrice",n.value.nowPrice)};S({show:d,dialogVisible:a});const L=()=>{a.value&&V()};return M(()=>{$.on("enter",L)}),N(()=>{$.off("enter",L)}),(i,v)=>{const A=m("el-input"),z=m("el-button"),_=m("el-dialog");return h(),G(_,{modelValue:a.value,"onUpdate:modelValue":v[2]||(v[2]=f=>a.value=f),title:"订单改价",width:"650"},{footer:w(()=>[e("div",xe,[c(z,{class:"ok-btn",type:"primary",onClick:V},{default:w(()=>[g(" 确定 (Enter) ")]),_:1})])]),default:w(()=>[e("div",ke,[e("div",be,[c(A,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.nowPrice,"onUpdate:modelValue":v[0]||(v[0]=f=>n.value.nowPrice=f),type:"number",placeholder:"请输入改价后的价格",onInput:p},{suffix:w(()=>[g("元")]),_:1},8,["modelValue"]),c(A,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.percentage,"onUpdate:modelValue":v[1]||(v[1]=f=>n.value.percentage=f),type:"number",placeholder:"请输入比例",onInput:I},{suffix:w(()=>[g("%")]),_:1},8,["modelValue"])]),e("div",$e,[g(" 改价后金额: "),e("span",we,"¥"+R(n.value.nowPrice||t.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ce=K(Ie,[["__scopeId","data-v-dd4c26df"]]),Pe={class:"my-order"},Ve={class:"header-nav"},Ae={class:"nav-item"},Se={class:"order-list"},Fe={class:"order-item-info"},Le={class:"order-item-title"},Re={class:"title"},Ee=["onClick"],ze={class:"order-item-sku"},De=["onClick"],Ue={class:"order-item-price"},Oe={class:"order-footer"},qe={class:"order-total"},Me={class:"price"},Ne={class:"total-item"},Be={style:{"font-size":"1.4rem"}},Te={class:"total-item"},je={class:"update-price"},Ke={class:"order-btn"},Ge={__name:"order",emits:["goPay","editAttr"],setup(x,{expose:S,emit:k}){const a=r([]),u=r(0),t=r(0),d=r(0),n=te(),p=()=>{let o=[];a.value.map(l=>{o.push(l.cart_id)}),o.length!=0&&F(o)},I=o=>{a.value=a.value.filter(l=>l.cart_id!=o),F([o])},F=o=>{ce({cart_id:o}).then(l=>{console.log(l),V()})},V=()=>{u.value=0,t.value=0,d.value=0,re({staff_id:n.userInfo.service.service_id}).then(o=>{var l,b;((b=(l=o.data)==null?void 0:l.list)==null?void 0:b.length)>0?(a.value=o.data.list[0].list,a.value.forEach(C=>{u.value+=C.productAttr.price*C.cart_num}),t.value=u.value):a.value=[]})};V();const L=k,i=()=>{L("goPay")},v=(o,l)=>{ee(o.cart_id,{cart_num:o.cart_num}).then(b=>{u.value=0,a.value.forEach(C=>{u.value+=C.productAttr.price*C.cart_num}),t.value=u.value})},A=o=>{L("editPupop",o)},z=(o,l)=>{ee(o,l).then(b=>{V()})},_=o=>{d.value=t.value-o,u.value=+o,H(()=>{setTimeout(()=>{y(!1)},150)})};r(0);const f=r(null),y=(o=!0)=>{f.value.show(o,t.value)};S({getList:V,list:a,editItem:z,discounts:d,allPrice:u});const D=()=>{f.value.dialogVisible?f.value.dialogVisible=!1:y()},s=()=>{a.value.length>0&&p()};return M(()=>{$.on("insert",D),$.on("delete",s)}),N(()=>{$.off("insert",D),$.off("delete",s)}),(o,l)=>{const b=m("Delete"),C=m("el-icon"),O=m("el-empty"),U=m("el-image"),J=m("ArrowDown"),Y=m("el-input-number"),Z=m("el-button");return h(),P("div",Pe,[e("div",Ve,[e("div",Ae,[g(" 已选购 "),e("span",null,R(a.value.length),1),g(" 件 ")]),e("div",{class:"nav-item-clear",onClick:p},[c(C,null,{default:w(()=>[c(b)]),_:1}),g("清空 (Delete) ")])]),e("div",Se,[a.value.length==0?(h(),G(O,{key:0,description:"请点击右侧添加商品"})):(h(!0),P(Q,{key:1},W(a.value,(E,ie)=>(h(),P("div",{class:"order-item",key:ie},[c(U,{loading:"lazy",class:"order-item-img",src:E.productAttr&&E.productAttr.image||E.product.image},null,8,["src"]),e("div",Fe,[e("div",Le,[e("div",Re,R(E.spu.store_name),1),e("div",{class:"delete",onClick:B=>I(E.cart_id)},"删除",8,Ee)]),e("div",ze,[e("span",{style:{display:"flex","align-items":"center"},onClick:B=>A(E)},[g("商品规格: "+R(E.productAttr.sku||"默认规格"),1),c(C,{size:"16",style:{"margin-left":"0.2rem"}},{default:w(()=>[c(J)]),_:1})],8,De)]),e("div",Ue,[e("div",null,[g(" ¥"),e("span",null,R(E.productAttr.price),1)]),e("div",null,[c(Y,{modelValue:E.cart_num,"onUpdate:modelValue":B=>E.cart_num=B,"step-strictly":"",min:1,step:1,onChange:B=>v(E)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Oe,[e("div",qe,[e("div",Me,[e("div",Ne,[g(" 实付: "),e("span",null,[g("¥"),e("span",Be,R(u.value.toFixed(2)),1)])]),e("div",Te,[g(" 优惠: "),e("span",null,[g("¥"),e("span",null,R(d.value.toFixed(2)),1)])])]),e("div",je,[c(Z,{class:"btn",type:"primary",onClick:y,size:"small"},{default:w(()=>[g("改价 (Insert)")]),_:1})])]),e("div",Ke,[c(Z,{class:"btn",type:"primary",onClick:i,disabled:a.value.length==0},{default:w(()=>[g("立即结账 (F9)")]),_:1},8,["disabled"])])]),c(Ce,{ref_key:"priceRef",ref:f,onChangeAllPrice:_},null,512)])}}},Je=K(Ge,[["__scopeId","data-v-49a45541"]]),X=x=>(le("data-v-d44598fa"),x=x(),ne(),x),He={class:"my-order"},Qe=X(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list",":infinite-scroll-distance":"100",":infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},ot=X(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),st=[ot],at={key:1,class:"no-stock"},lt=X(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],it={key:1,class:"no-data"},ct={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(x,{expose:S,emit:k}){const a=r(null),u=k,t=r(""),d=()=>{u("loadMore",{bar_code:t.value})},n=i=>{if(i.is_used==0)return j.error("该商品已被平台关闭");if(i.stock==0)return j.warning("该商品无库存");u("changeItem",i)},p=fe.throttle(()=>{u("getStoreList",{bar_code:t.value},!0)},300);S({bar_code:t});const I=r(!1),F=()=>{I.value=!0},V=()=>{I.value=!1},L=()=>{var i;(i=a.value)==null||i.focus()};return M(()=>{H(()=>{var i;(i=a.value)==null||i.focus(),F()}),$.on("shift",L)}),N(()=>{$.off("shift",L)}),(i,v)=>{const A=m("el-input"),z=m("Search"),_=m("el-icon"),f=m("el-button"),y=m("el-image"),D=m("el-space"),s=m("el-empty"),o=oe("infinite-scroll");return h(),P("div",He,[e("div",{class:se(["header-nav",{"input-focus":I.value}])},[Qe,e("div",We,[c(A,{modelValue:t.value,"onUpdate:modelValue":v[0]||(v[0]=l=>t.value=l),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:a,onFocus:F,onBlur:V,onKeyup:_e(T(p),["enter"]),onClear:T(p)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:v[1]||(v[1]=(...l)=>T(p)&&T(p)(...l))},[c(f,{class:"btn",type:"primary"},{default:w(()=>[c(_,null,{default:w(()=>[c(z)]),_:1})]),_:1})])],2),ae((h(),P("div",Xe,[x.storeList.length?(h(),G(D,{key:0,wrap:""},{default:w(()=>[(h(!0),P(Q,null,W(x.storeList,(l,b)=>(h(),P("div",{class:"shop-item",key:b,onClick:C=>n(l)},[c(y,{loading:"lazy",src:l.image},null,8,["src"]),e("div",Ze,R(l.store_name),1),e("div",et,[g(" ¥"),e("span",null,R(l.price),1)]),l.stock==0?(h(),P("div",tt,st)):q("",!0),l.is_used==0?(h(),P("div",at,nt)):q("",!0)],8,Ye))),128))]),_:1})):q("",!0),x.storeList.length?q("",!0):(h(),P("div",it,[c(s,{"image-size":300,description:"没有找到对应商品"})]))])),[[o,d]])])}}},rt=K(ct,[["__scopeId","data-v-d44598fa"]]),ut=x=>(le("data-v-52f45b9b"),x=x(),ne(),x),dt={class:"shop"},_t={key:0,class:"shop-info"},vt={class:"shop-info-left"},pt={class:"shop-info-right"},ft={class:"shop-info-right-top"},mt={class:"shop-info-right-center"},ht={class:"shop-info-right-price"},gt={class:"shop-sku"},yt=ut(()=>e("div",{class:"title"},"产品",-1)),kt={class:"sku"},bt=["onClick"],$t={class:"dialog-footer"},wt={__name:"pupop",emits:["changeItem"],setup(x,{expose:S,emit:k}){const a=r(!1),u=_=>{a.value=_},t=r({}),d=r(null),n=r(!1),p=r("add"),I=r({}),F=(_,f="add")=>{p.value=f,f=="add"?(t.value=_,d.value=_.attr[0]):(n.value=!0,I.value=_,he(_.product_id).then(y=>{y.data.attrValue=JSON.parse(JSON.stringify(y.data.attr)),y.data.attr=Object.keys(y.data.sku),t.value=y.data,d.value=y.data.attr[0],n.value=!1}).catch(y=>{n.value=!1}))},V=k,L=()=>{p.value=="add"?V("changeItem",t.value,d.value):V("editItem",I.value.cart_id,{cart_num:I.value.cart_num,product_attr_unique:t.value.sku[d.value].unique}),a.value=!1},i=_=>{d.value=_};S({show:u,setForm:F});const v=()=>{if(!a.value)return;let _=t.value.attr.indexOf(d.value);if(_>0)return i(t.value.attr[_-1])},A=()=>{if(!a.value)return;let _=t.value.attr.indexOf(d.value);if(_{a.value&&L()};return M(()=>{$.on("left",v),$.on("right",A),$.on("enter",z)}),N(()=>{$.off("left",v),$.off("right",A),$.off("enter",z)}),(_,f)=>{const y=m("el-image"),D=m("el-space"),s=m("el-button"),o=m("el-dialog"),l=oe("loading");return h(),G(o,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=b=>a.value=b),title:"商品规格",width:"650"},ve({default:w(()=>{var b,C,O;return[ae((h(),P("div",dt,[t.value.sku?(h(),P("div",_t,[e("div",vt,[c(y,{loading:"lazy",src:((b=t.value.sku[d.value])==null?void 0:b.image)||t.value.image},null,8,["src"])]),e("div",pt,[e("div",ft,R(t.value.store_name),1),e("div",mt,"库存"+R(((C=t.value.sku[d.value])==null?void 0:C.stock)||0),1),e("div",ht,[g("¥"),e("span",null,R(((O=t.value.sku[d.value])==null?void 0:O.price)||t.value.price),1)])])])):q("",!0),e("div",gt,[yt,e("div",kt,[c(D,{wrap:"",size:20},{default:w(()=>[(h(!0),P(Q,null,W(t.value.attr,(U,J)=>(h(),P("div",{class:se(["sku-item",{"sku-item_active":d.value==U}]),onClick:Y=>i(U),key:J},R(U||"默认规格"),11,bt))),128))]),_:1})])])])),[[l,n.value]])]}),_:2},[p.value!="add"&&t.value.attr&&t.value.attr.length==1?void 0:{name:"footer",fn:w(()=>[e("div",$t,[c(s,{class:"ok-btn",type:"primary",onClick:L},{default:w(()=>[g(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},xt=K(wt,[["__scopeId","data-v-52f45b9b"]]),It={class:"my-card"},Lt={__name:"index",setup(x){const S=r(null),k=r(null),a=r(null),u=r(null),t=r([]),d=te(),n=pe(),p=r({page:0,limit:30}),I=(s={},o=!1)=>{p.value={staff_id:d.userInfo.service.service_id,...p.value,...s},o&&(t.value=[],p.value.page=1,F.value=!1),ge(d.userInfo.service.mer_id,p.value).then(l=>{var C,O;((O=(C=l.data)==null?void 0:C.list)==null?void 0:O.length)(U.attr=Object.keys(U.sku),U));t.value=t.value.concat(b),s.bar_code&&t.value.length==1&&L(s.bar_code)&&(a.value.bar_code="",v(t.value[0],t.value[0].attr[0]))})},F=r(!1),V=s=>{F.value||(p.value.page++,I(s))};function L(s){return/^\d+$/.test(s)}const i=(s,o="")=>{let l={is_new:0,product_id:s.product_id,cart_num:1,product_attr_unique:s.sku[o]!==void 0?s.sku[o].unique:"",staff_id:d.userInfo.service.service_id,product_type:0};ue(l).then(b=>{k.value.getList()})},v=(s,o)=>{if(!s.attr||s.attr.length==0||s.attr.length==1)return i(s,s.attr[0]?s.attr[0]:"");if(o)return i(s,o);S.value.setForm(s,"add"),S.value.show(!0)},A=(s,o)=>{k.value.editItem(s,o)},z=s=>{S.value.setForm(s,"edit"),S.value.show(!0)},_=()=>{let s=k.value.list.map(l=>l.cart_id),o={takes:[],use_coupon:{},use_integral:!1,cart_id:s};k.value.discounts>0&&(o.deduction_price=k.value.discounts.toFixed(2),o.pay_type="micropay"),de(o).then(l=>{u.value.setForm({data:l.data,cart_id:s})})},f=()=>{_(),u.value.drawer=!0},y=()=>{k.value.getList()},D=()=>{console.log("F9"),n.name=="home"&&(!u.value.drawer&&k.value.list.length>0?f():u.value.beforeClose())};return M(()=>{I(),p.value.page++,$.on("F9",D)}),N(()=>{$.off("F9",D)}),(s,o)=>(h(),P("div",It,[c(Je,{ref_key:"orderRef",ref:k,onGoPay:f,onEditPupop:z},null,512),c(me),c(rt,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:t.value,onGetStoreList:I,onChangeItem:v,onLoadMore:V},null,8,["storeList"]),c(xt,{ref_key:"pupopRef",ref:S,onChangeItem:v,onEditItem:A},null,512),c(ye,{ref_key:"payRef",ref:u,onPaySuccess:y},null,512)]))}};export{Lt as default}; diff --git a/dist/assets/index-CaeMrXBn.js b/dist/assets/index-CaeMrXBn.js index c44436d..6de067b 100644 --- a/dist/assets/index-CaeMrXBn.js +++ b/dist/assets/index-CaeMrXBn.js @@ -1 +1 @@ -import{_ as G,u as J,r as a,b as w,j as M,c as t,h as s,e,f as c,w as p,g as $,k as Q,q as I,F as T,i as j,s as l,E as L,m as U,p as B,t as d,d as q,v as W,x as X,A as Y,n as H,o as Z,H as O,I as ee}from"./index-3-t8Fk7s.js";import{v as te,f as se,j as oe}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{p as ie}from"./pay-Bt7FIL7i.js";import{p as ae}from"./padding-DTyMU7Be.js";const ne=y=>(W("data-v-0f73b4d2"),y=y(),X(),y),le={class:"my-order"},ce={class:"header-nav"},de=ne(()=>e("div",{class:"nav-item"},"核销订单",-1)),re={class:"nav-item-clear"},_e={class:"header-input"},ue={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500","infinite-scroll-immediate":"false",style:{overflow:"auto"}},ve=["onClick"],pe={class:"top"},fe={class:"create-time"},me={class:"shop"},he={key:0,class:"left"},ye={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},Ce={class:"pay"},Ve={key:0},we={key:0},Se={key:1},Ie={key:2},xe={key:3},Re={key:4},Le={key:5},Ae={key:6},Pe={key:1,style:{color:"#ff4a00"}},Ee={key:0,class:"cashier"},Oe={key:1,class:"cashier"},Ue={key:0,class:"load-end"},Be={key:1,class:"load-end"},ze={__name:"order",emits:["backOne"],setup(y,{expose:k,emit:S}){const x=J();a([]);const o=a(1);a(null);const v=a({page:1,limit:20,search_info:""}),g=a(!1);a(0);const m=a(0),h=a(!1),b=a([]),C=(r=!1)=>{if(!v.value.search_info)return L.error("请输入订单编号");if(r)v.value.page=1;else if(h.value||g.value)return;g.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),b.value=[],U.emit("set-order-detail",{}),te(x.userInfo.service.mer_id,v.value.search_info).then(n=>{b.value=[n.data],U.emit("set-order-detail",b.value[0]),g.value=!1}).catch(n=>{h.value=!0,g.value=!1})},z=(r,n)=>{m.value=n,U.emit("set-order-detail",r)},D=r=>{v.value.search_info=r,C(!0)},A=S,K=()=>{A("backOne")};return k({setCode:D}),(r,n)=>{const u=w("el-button"),E=w("el-input"),N=w("el-image"),F=M("loading"),R=M("infinite-scroll");return t(),s("div",le,[e("div",ce,[de,e("div",re,[c(u,{type:"primary",size:"small",onClick:K},{default:p(()=>[$("返回上一页")]),_:1})])]),e("div",_e,[c(E,{modelValue:v.value.search_info,"onUpdate:modelValue":n[1]||(n[1]=i=>v.value.search_info=i),placeholder:"请输入订单编号",onKeydown:n[2]||(n[2]=Q(i=>C(!0),["enter"])),clearable:""},{append:p(()=>[c(u,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:n[0]||(n[0]=i=>C(!0))},{default:p(()=>[$("搜索")]),_:1})]),_:1},8,["modelValue"])]),I((t(),s("div",ue,[(t(!0),s(T,null,j(b.value,(i,P)=>(t(),s("div",{class:B(["item",{"item-active":m.value==P}]),key:P,onClick:_=>z(i,P)},[e("div",pe,[e("div",{class:B(["sn",i.pay_type===11||i.pay_type===12||i.pay_type===13?"cahier":"cahier2"])},"单号: "+d(i.order_sn),3),e("div",fe,d(i.create_time),1)]),e("div",me,[i.orderProduct?(t(),s("div",he,[(t(!0),s(T,null,j(i.orderProduct.slice(0,5),(_,V)=>(t(),q(N,{key:V,src:_.cart_info.productAttr.image||_.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),i.orderProduct.length==1?(t(),s("div",ye,d(i.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",ke,[e("div",ge,"¥"+d(i.pay_price),1),e("div",$e,"共"+d(i.total_num)+"件商品",1)])]),e("div",be,[e("div",Ce,[i.paid?(t(),s("div",Ve,[$(" 已支付 "),i.pay_type==13?(t(),s("span",we,"(支付宝收款)")):l("",!0),i.pay_type==12?(t(),s("span",Se,"(现金支付)")):l("",!0),i.pay_type==11?(t(),s("span",Ie,"(微信收款)")):l("",!0),i.pay_type==0?(t(),s("span",xe,"(余额支付)")):l("",!0),i.pay_type==1?(t(),s("span",Re,"(微信支付)")):l("",!0),i.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):l("",!0),i.pay_type==10?(t(),s("span",Ae,"(对公转账)")):l("",!0)])):(t(),s("div",Pe,"未支付"))]),i.service_info?(t(),s("div",Ee,"收银员: "+d(i.service_info.nickname),1)):(t(),s("div",Oe,"平台订单"))])],10,ve))),128)),h.value?(t(),s("div",Ue,"没有更多了")):l("",!0),g.value?(t(),s("div",Be,"加载中...")):l("",!0)])),[[F,g.value],[R,C]])])}}},De=G(ze,[["__scopeId","data-v-0f73b4d2"]]),f=y=>(W("data-v-5c9b212f"),y=y(),X(),y),Ke={class:"my-order"},Ne={class:"header-nav"},Fe=["onClick"],Me={class:"detail"},Te={key:0,class:"table"},je={style:{"font-size":"0.9rem"}},qe={style:{color:"#ff4a00"}},He={style:{display:"flex","align-items":"center"}},Ge={style:{"margin-left":"0.5rem"}},Je={key:1,class:"table"},Qe=f(()=>e("div",{class:"table-title"},"订单信息",-1)),We={class:"table-info"},Xe={class:"info-item"},Ye=f(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=f(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=f(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),at={class:"info-item-info"},nt={class:"info-item"},lt=f(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},rt=f(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),_t={class:"info-item-info"},ut={class:"info-item"},vt=f(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),pt={class:"info-item-info"},ft={class:"info-item"},mt=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ht={class:"info-item-info"},yt={key:0},kt={key:1},gt={key:2},$t={key:3},bt={key:4},Ct={key:5},Vt={key:6},wt={key:0,class:"table-title"},St={key:1,class:"table-info",style:{"flex-direction":"column"}},It={class:"info-item"},xt=f(()=>e("div",{class:"info-item-title"},"头像:",-1)),Rt={class:"info-item-info"},Lt={class:"info-item"},At=f(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Pt={class:"info-item-info"},Et={class:"info-item"},Ot=f(()=>e("div",{class:"info-item-title"},"账号:",-1)),Ut={class:"info-item-info"},Bt={class:"footer"},zt={class:"info"},Dt={class:"price"},Kt={key:0,class:"handle"},Nt={key:1,class:"handle"},Ft=f(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Mt={class:"dialog-footer"},Tt={__name:"detail",emits:["reInit"],setup(y,{emit:k}){const S=J(),x=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r,H(()=>{var n;(n=A.value)==null||n.toggleAllSelection()})}),a([]);const v=a(null),g=a(!1);a(0);const m=a(0),h=a(["商品信息","订单详情"]),b=a(""),C=a(!1),z=()=>{C.value=!1,se({order_sn:b.value}).then(r=>{L({message:r.message,type:"success"}),x.push({name:"home"})})},D=k,A=a(null),K=()=>{let r=A.value.getSelectionRows();if(r.length==0)return L.error("请选择核销商品");let n={data:[],verify_code:o.value.verify_code};r.forEach(u=>{n.data.push({id:u.order_product_id,num:u.product_num})}),oe(S.userInfo.service.mer_id,o.value.order_id,n).then(u=>{L.success(u.message),D("reInit")}).catch(u=>{L.error(u.message)})};return(r,n)=>{const u=w("el-table-column"),E=w("el-image"),N=w("el-input-number"),F=w("el-table"),R=w("el-button"),i=w("el-dialog"),P=M("loading");return t(),s("div",Ke,[e("div",Ne,[(t(!0),s(T,null,j(h.value,(_,V)=>(t(),s("div",{key:V,class:B(["nav-item",{"nav-item-active":m.value==V,"nav-item-radius1":m.value==V+1,"nav-item-radius2":m.value==V-1}]),onClick:Qt=>m.value=V},d(_),11,Fe))),128)),e("div",{class:B(["nav-item",{"nav-item-radius2":m.value==h.value.length-1}]),style:{flex:"1"}},null,2)]),I((t(),s("div",Me,[o.value.orderProduct&&m.value==0?(t(),s("div",Te,[e("div",je,[$(" 共计 "),e("span",qe,d(o.value.total_num),1),$(" 件商品 ")]),c(F,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct,ref_key:"tableRef",ref:A},{default:p(()=>[c(u,{type:"selection",width:"55"}),c(u,{prop:"cart_info.product.store_name",label:"商品信息"},{default:p(({row:_})=>[e("div",He,[c(E,{style:{height:"3rem",width:"3rem"},src:_.cart_info.productAttr.image||_.cart_info.product.image},null,8,["src"]),e("span",Ge,d(_.cart_info.product.store_name),1)])]),_:1}),c(u,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(u,{prop:"product_num",label:"数量",width:"180"},{default:p(({row:_})=>[c(N,{modelValue:_.product_num,"onUpdate:modelValue":V=>_.product_num=V,"step-strictly":"",max:_.refund_num,min:1,step:1,size:"small"},null,8,["modelValue","onUpdate:modelValue","max"])]),_:1}),c(u,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&m.value==1?(t(),s("div",Je,[Qe,e("div",We,[e("div",Xe,[Ye,e("div",Ze,d(o.value.create_time),1)]),e("div",et,[tt,e("div",st,d(o.value.total_num),1)]),e("div",ot,[it,e("div",at,"¥"+d(o.value.total_price),1)]),e("div",nt,[lt,e("div",ct,d(o.value.pay_time),1)]),e("div",dt,[rt,e("div",_t,"¥"+d(o.value.deduction_price),1)]),e("div",ut,[vt,e("div",pt,"¥"+d(o.value.pay_price),1)]),e("div",ft,[mt,e("div",ht,[o.value.pay_type==11?(t(),s("span",yt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",kt,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",$t,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",bt,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",Ct,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",Vt,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",wt,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",St,[e("div",It,[xt,e("div",Rt,[c(E,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Lt,[At,e("div",Pt,d(o.value.service_info.nickname),1)]),e("div",Et,[Ot,e("div",Ut,d(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),e("div",Bt,[e("div",zt,[e("div",Dt,[$(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.verify_status==0?(t(),s("div",Kt,[c(R,{class:"btn",type:"warning",onClick:K},{default:p(()=>[$("核销")]),_:1})])):(t(),s("div",Nt,"已支付"))])])),[[P,g.value]]),c(ie,{ref_key:"payRef",ref:v},null,512),c(i,{modelValue:C.value,"onUpdate:modelValue":n[1]||(n[1]=_=>C.value=_),title:"提示",width:"500"},{footer:p(()=>[e("div",Mt,[c(R,{onClick:n[0]||(n[0]=_=>C.value=!1)},{default:p(()=>[$("取消")]),_:1}),r.cartCount>0?(t(),q(R,{key:0,onClick:r.goHome},{default:p(()=>[$(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),q(R,{key:1,type:"primary",onClick:z},{default:p(()=>[$(" 确认提单 ")]),_:1}))])]),default:p(()=>[Ft]),_:1},8,["modelValue"])])}}},jt=G(Tt,[["__scopeId","data-v-5c9b212f"]]),qt={class:"my-card"},Ht={class:"my-code"},Gt=e("h2",null,"订单核销",-1),Jt={class:"box"},es={__name:"index",setup(y){const k=a(1),S=a(""),x=a(null),o=a(null),v=()=>{if(S.value=="")return L.error("请输入订单编号");k.value=2,H(()=>{o.value.setCode(S.value)})},g=()=>{v()};return Z(()=>{H(()=>{x.value.focus()})}),(m,h)=>(t(),s("div",qt,[I(e("div",Ht,[Gt,e("div",Jt,[I(e("input",{ref_key:"inputRef",ref:x,"onUpdate:modelValue":h[0]||(h[0]=b=>S.value=b),placeholder:"",class:"input",onKeyup:Q(v,["enter"])},null,544),[[ee,S.value]]),e("div",{class:"btn",onClick:v},"查询")])],512),[[O,k.value==1]]),I(c(De,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:o,onBackOne:h[1]||(h[1]=b=>k.value=1)},null,512),[[O,k.value==2]]),I(c(ae,null,null,512),[[O,k.value==2]]),I(c(jt,{ref:"detailRef",onReInit:g},null,512),[[O,k.value==2]])]))}};export{es as default}; +import{_ as G,u as J,r as a,b as w,j as M,c as t,h as s,e,f as c,w as p,g as $,k as Q,q as I,F as T,i as j,s as l,E as L,m as U,p as B,t as d,d as q,v as W,x as X,A as Y,n as H,o as Z,H as O,I as ee}from"./index-3-t8Fk7s.js";import{v as te,f as se,j as oe}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{p as ie}from"./pay-Bt7FIL7i.js";import{p as ae}from"./padding-DTyMU7Be.js";const ne=y=>(W("data-v-0f73b4d2"),y=y(),X(),y),le={class:"my-order"},ce={class:"header-nav"},de=ne(()=>e("div",{class:"nav-item"},"核销订单",-1)),re={class:"nav-item-clear"},_e={class:"header-input"},ue={class:"order-list",":infinite-scroll-distance":"300",":infinite-scroll-delay":"500","infinite-scroll-immediate":"false",style:{overflow:"auto"}},ve=["onClick"],pe={class:"top"},fe={class:"create-time"},me={class:"shop"},he={key:0,class:"left"},ye={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},Ce={class:"pay"},Ve={key:0},we={key:0},Se={key:1},Ie={key:2},xe={key:3},Re={key:4},Le={key:5},Ae={key:6},Pe={key:1,style:{color:"#ff4a00"}},Ee={key:0,class:"cashier"},Oe={key:1,class:"cashier"},Ue={key:0,class:"load-end"},Be={key:1,class:"load-end"},ze={__name:"order",emits:["backOne"],setup(y,{expose:k,emit:S}){const x=J();a([]);const o=a(1);a(null);const v=a({page:1,limit:20,search_info:""}),g=a(!1);a(0);const m=a(0),h=a(!1),b=a([]),C=(r=!1)=>{if(!v.value.search_info)return L.error("请输入订单编号");if(r)v.value.page=1;else if(h.value||g.value)return;g.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),b.value=[],U.emit("set-order-detail",{}),te(x.userInfo.service.mer_id,v.value.search_info).then(n=>{b.value=[n.data],U.emit("set-order-detail",b.value[0]),g.value=!1}).catch(n=>{h.value=!0,g.value=!1})},z=(r,n)=>{m.value=n,U.emit("set-order-detail",r)},D=r=>{v.value.search_info=r,C(!0)},A=S,K=()=>{A("backOne")};return k({setCode:D}),(r,n)=>{const u=w("el-button"),E=w("el-input"),N=w("el-image"),F=M("loading"),R=M("infinite-scroll");return t(),s("div",le,[e("div",ce,[de,e("div",re,[c(u,{type:"primary",size:"small",onClick:K},{default:p(()=>[$("返回上一页")]),_:1})])]),e("div",_e,[c(E,{modelValue:v.value.search_info,"onUpdate:modelValue":n[1]||(n[1]=i=>v.value.search_info=i),placeholder:"请输入订单编号",onKeydown:n[2]||(n[2]=Q(i=>C(!0),["enter"])),clearable:""},{append:p(()=>[c(u,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:n[0]||(n[0]=i=>C(!0))},{default:p(()=>[$("搜索")]),_:1})]),_:1},8,["modelValue"])]),I((t(),s("div",ue,[(t(!0),s(T,null,j(b.value,(i,P)=>(t(),s("div",{class:B(["item",{"item-active":m.value==P}]),key:P,onClick:_=>z(i,P)},[e("div",pe,[e("div",{class:B(["sn",i.pay_type===11||i.pay_type===12||i.pay_type===13?"cahier":"cahier2"])},"单号: "+d(i.order_sn),3),e("div",fe,d(i.create_time),1)]),e("div",me,[i.orderProduct?(t(),s("div",he,[(t(!0),s(T,null,j(i.orderProduct.slice(0,5),(_,V)=>(t(),q(N,{key:V,src:_.cart_info.productAttr.image||_.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),i.orderProduct.length==1?(t(),s("div",ye,d(i.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",ke,[e("div",ge,"¥"+d(i.pay_price),1),e("div",$e,"共"+d(i.total_num)+"件商品",1)])]),e("div",be,[e("div",Ce,[i.paid?(t(),s("div",Ve,[$(" 已支付 "),i.pay_type==13?(t(),s("span",we,"(支付宝收款)")):l("",!0),i.pay_type==12?(t(),s("span",Se,"(现金支付)")):l("",!0),i.pay_type==11?(t(),s("span",Ie,"(微信收款)")):l("",!0),i.pay_type==0?(t(),s("span",xe,"(余额支付)")):l("",!0),i.pay_type==1?(t(),s("span",Re,"(微信支付)")):l("",!0),i.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):l("",!0),i.pay_type==10?(t(),s("span",Ae,"(对公转账)")):l("",!0)])):(t(),s("div",Pe,"未支付"))]),i.service_info?(t(),s("div",Ee,"收银员: "+d(i.service_info.nickname),1)):(t(),s("div",Oe,"平台订单"))])],10,ve))),128)),h.value?(t(),s("div",Ue,"没有更多了")):l("",!0),g.value?(t(),s("div",Be,"加载中...")):l("",!0)])),[[F,g.value],[R,C]])])}}},De=G(ze,[["__scopeId","data-v-0f73b4d2"]]),f=y=>(W("data-v-5c9b212f"),y=y(),X(),y),Ke={class:"my-order"},Ne={class:"header-nav"},Fe=["onClick"],Me={class:"detail"},Te={key:0,class:"table"},je={style:{"font-size":"0.9rem"}},qe={style:{color:"#ff4a00"}},He={style:{display:"flex","align-items":"center"}},Ge={style:{"margin-left":"0.5rem"}},Je={key:1,class:"table"},Qe=f(()=>e("div",{class:"table-title"},"订单信息",-1)),We={class:"table-info"},Xe={class:"info-item"},Ye=f(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=f(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=f(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),at={class:"info-item-info"},nt={class:"info-item"},lt=f(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},rt=f(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),_t={class:"info-item-info"},ut={class:"info-item"},vt=f(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),pt={class:"info-item-info"},ft={class:"info-item"},mt=f(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ht={class:"info-item-info"},yt={key:0},kt={key:1},gt={key:2},$t={key:3},bt={key:4},Ct={key:5},Vt={key:6},wt={key:0,class:"table-title"},St={key:1,class:"table-info",style:{"flex-direction":"column"}},It={class:"info-item"},xt=f(()=>e("div",{class:"info-item-title"},"头像:",-1)),Rt={class:"info-item-info"},Lt={class:"info-item"},At=f(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Pt={class:"info-item-info"},Et={class:"info-item"},Ot=f(()=>e("div",{class:"info-item-title"},"账号:",-1)),Ut={class:"info-item-info"},Bt={class:"footer"},zt={class:"info"},Dt={class:"price"},Kt={key:0,class:"handle"},Nt={key:1,class:"handle"},Ft=f(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Mt={class:"dialog-footer"},Tt={__name:"detail",emits:["reInit"],setup(y,{emit:k}){const S=J(),x=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r,H(()=>{var n;(n=A.value)==null||n.toggleAllSelection()})}),a([]);const v=a(null),g=a(!1);a(0);const m=a(0),h=a(["商品信息","订单详情"]),b=a(""),C=a(!1),z=()=>{C.value=!1,se({order_sn:b.value}).then(r=>{L({message:r.message,type:"success"}),x.push({name:"home"})})},D=k,A=a(null),K=()=>{let r=A.value.getSelectionRows();if(r.length==0)return L.error("请选择核销商品");let n={data:[],verify_code:o.value.verify_code};r.forEach(u=>{n.data.push({id:u.order_product_id,num:u.product_num})}),oe(S.userInfo.service.mer_id,o.value.order_id,n).then(u=>{L.success(u.message),D("reInit")}).catch(u=>{L.error(u.message)})};return(r,n)=>{const u=w("el-table-column"),E=w("el-image"),N=w("el-input-number"),F=w("el-table"),R=w("el-button"),i=w("el-dialog"),P=M("loading");return t(),s("div",Ke,[e("div",Ne,[(t(!0),s(T,null,j(h.value,(_,V)=>(t(),s("div",{key:V,class:B(["nav-item",{"nav-item-active":m.value==V,"nav-item-radius1":m.value==V+1,"nav-item-radius2":m.value==V-1}]),onClick:Qt=>m.value=V},d(_),11,Fe))),128)),e("div",{class:B(["nav-item",{"nav-item-radius2":m.value==h.value.length-1}]),style:{flex:"1"}},null,2)]),I((t(),s("div",Me,[o.value.orderProduct&&m.value==0?(t(),s("div",Te,[e("div",je,[$(" 共计 "),e("span",qe,d(o.value.total_num),1),$(" 件商品 ")]),c(F,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct,ref_key:"tableRef",ref:A},{default:p(()=>[c(u,{type:"selection",width:"55"}),c(u,{prop:"cart_info.product.store_name",label:"商品信息"},{default:p(({row:_})=>[e("div",He,[c(E,{style:{height:"3rem",width:"3rem"},src:_.cart_info.productAttr.image||_.cart_info.product.image},null,8,["src"]),e("span",Ge,d(_.cart_info.product.store_name),1)])]),_:1}),c(u,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(u,{prop:"product_num",label:"数量",width:"180"},{default:p(({row:_})=>[c(N,{modelValue:_.product_num,"onUpdate:modelValue":V=>_.product_num=V,"step-strictly":"",max:_.refund_num,min:1,step:1,size:"small"},null,8,["modelValue","onUpdate:modelValue","max"])]),_:1}),c(u,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),o.value.orderProduct&&m.value==1?(t(),s("div",Je,[Qe,e("div",We,[e("div",Xe,[Ye,e("div",Ze,d(o.value.create_time),1)]),e("div",et,[tt,e("div",st,d(o.value.total_num),1)]),e("div",ot,[it,e("div",at,"¥"+d(o.value.total_price),1)]),e("div",nt,[lt,e("div",ct,d(o.value.pay_time),1)]),e("div",dt,[rt,e("div",_t,"¥"+d(o.value.deduction_price),1)]),e("div",ut,[vt,e("div",pt,"¥"+d(o.value.pay_price),1)]),e("div",ft,[mt,e("div",ht,[o.value.pay_type==11?(t(),s("span",yt,"微信收款")):l("",!0),o.value.pay_type==12?(t(),s("span",kt,"现金支付")):l("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):l("",!0),o.value.pay_type==0?(t(),s("span",$t,"余额支付")):l("",!0),o.value.pay_type==1?(t(),s("span",bt,"微信支付")):l("",!0),o.value.pay_type==9?(t(),s("span",Ct,"商户余额支付")):l("",!0),o.value.pay_type==10?(t(),s("span",Vt,"对公转账")):l("",!0)])])]),o.value.service_info?(t(),s("div",wt,"收银员信息")):l("",!0),o.value.service_info?(t(),s("div",St,[e("div",It,[xt,e("div",Rt,[c(E,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Lt,[At,e("div",Pt,d(o.value.service_info.nickname),1)]),e("div",Et,[Ot,e("div",Ut,d(o.value.service_info.account),1)])])):l("",!0)])):l("",!0),e("div",Bt,[e("div",zt,[e("div",Dt,[$(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.verify_status==0?(t(),s("div",Kt,[c(R,{class:"btn",type:"warning",onClick:K},{default:p(()=>[$("核销")]),_:1})])):(t(),s("div",Nt,"已支付"))])])),[[P,g.value]]),c(ie,{ref_key:"payRef",ref:v},null,512),c(i,{modelValue:C.value,"onUpdate:modelValue":n[1]||(n[1]=_=>C.value=_),title:"提示",width:"500"},{footer:p(()=>[e("div",Mt,[c(R,{onClick:n[0]||(n[0]=_=>C.value=!1)},{default:p(()=>[$("取消")]),_:1}),r.cartCount>0?(t(),q(R,{key:0,onClick:r.goHome},{default:p(()=>[$(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),q(R,{key:1,type:"primary",onClick:z},{default:p(()=>[$(" 确认提单 ")]),_:1}))])]),default:p(()=>[Ft]),_:1},8,["modelValue"])])}}},jt=G(Tt,[["__scopeId","data-v-5c9b212f"]]),qt={class:"my-card"},Ht={class:"my-code"},Gt=e("h2",null,"订单核销",-1),Jt={class:"box"},es={__name:"index",setup(y){const k=a(1),S=a(""),x=a(null),o=a(null),v=()=>{if(S.value=="")return L.error("请输入订单编号");k.value=2,H(()=>{o.value.setCode(S.value)})},g=()=>{v()};return Z(()=>{H(()=>{x.value.focus()})}),(m,h)=>(t(),s("div",qt,[I(e("div",Ht,[Gt,e("div",Jt,[I(e("input",{ref_key:"inputRef",ref:x,"onUpdate:modelValue":h[0]||(h[0]=b=>S.value=b),placeholder:"",class:"input",onKeyup:Q(v,["enter"])},null,544),[[ee,S.value]]),e("div",{class:"btn",onClick:v},"查询")])],512),[[O,k.value==1]]),I(c(De,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:o,onBackOne:h[1]||(h[1]=b=>k.value=1)},null,512),[[O,k.value==2]]),I(c(ae,null,null,512),[[O,k.value==2]]),I(c(jt,{ref:"detailRef",onReInit:g},null,512),[[O,k.value==2]])]))}};export{es as default}; diff --git a/dist/assets/index-D5NVVZ9r.js b/dist/assets/index-D5NVVZ9r.js index 4d0a4bc..33efb02 100644 --- a/dist/assets/index-D5NVVZ9r.js +++ b/dist/assets/index-D5NVVZ9r.js @@ -1 +1 @@ -import{_ as q,u as H,r,o as Q,m as x,b as h,j as F,c as t,h as s,e,t as c,f as d,w as u,g as f,k as W,q as G,F as O,i as j,p as B,d as K,s as n,A as X,E as Y,v as Z,x as ee}from"./index-3-t8Fk7s.js";import{s as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{p as ae}from"./pay-Bt7FIL7i.js";import{p as ie}from"./padding-DTyMU7Be.js";const le={class:"my-order"},ne={class:"header-nav"},de={class:"nav-item"},ce={class:"nav-item-btn"},re={class:"header-input"},_e={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},ue=["onClick"],ve={class:"top"},pe={class:"create-time"},fe={class:"shop"},me={key:0,class:"left"},he={key:0,class:"shop-name"},ye={class:"right"},ge={class:"money"},ke={class:"count"},$e={class:"bottom"},be={class:"pay"},Ce={key:0},Ve={key:0},Se={key:1},we={key:2},Pe={key:3},Le={key:4},Ie={key:5},Ae={key:6},De={key:1,style:{color:"#ff4a00"}},xe={key:0,class:"cashier"},Re={key:1,class:"cashier"},Be={key:0,class:"load-end"},Ue={key:1,class:"load-end"},ze={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup($){const I=H(),R=$;r([]);const o=r(1),A=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],b(!0)};r(null);const D=r(""),g=()=>{v.value.date=D.value.join("-"),b(!0)},v=r({page:1,limit:20,store_name:"",date:"",staff_id:0,sale_type:2}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),b=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;R.isSystem||(v.value.staff_id=I.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(I.userInfo.service.mer_id,v.value).then(l=>{i?k.value=l.data.list:k.value=[...k.value,...l.data.list],l.data.list.length{S.value=!0,y.value=!1})},_=(i,l)=>{L.value=l,x.emit("set-order-detail",i)};return Q(()=>{x.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),U=h("el-radio-group"),C=h("el-date-picker"),z=h("el-button"),E=h("el-input"),p=h("el-image"),P=F("loading"),T=F("infinite-scroll");return t(),s("div",le,[e("div",ne,[e("div",de,c($.isSystem?"平台订单":"收银订单"),1),e("div",ce,[d(U,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),onChange:A,size:"small"},{default:u(()=>[d(w,{value:1},{default:u(()=>[f("已支付")]),_:1}),d(w,{value:2},{default:u(()=>[f("未支付")]),_:1})]),_:1},8,["modelValue"]),d(C,{modelValue:D.value,"onUpdate:modelValue":l[1]||(l[1]=a=>D.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:g,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",re,[d(E,{modelValue:v.value.store_name,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.store_name=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>b(!0),["enter"])),onClear:l[5]||(l[5]=a=>b(!0)),clearable:""},{append:u(()=>[d(z,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:l[2]||(l[2]=a=>b(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",_e,[(t(!0),s(O,null,j(k.value,(a,M)=>(t(),s("div",{class:B(["item",{"item-active":L.value==M}]),key:M,onClick:N=>_(a,M)},[e("div",ve,[e("div",{class:B(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+c(a.order_sn),3),e("div",pe,c(a.create_time),1)]),e("div",fe,[a.orderProduct?(t(),s("div",me,[(t(!0),s(O,null,j(a.orderProduct.slice(0,5),(N,J)=>(t(),K(p,{key:J,src:N.cart_info.productAttr.image||N.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",he,c(a.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",ye,[e("div",ge,"¥"+c(a.pay_price),1),e("div",ke,"共"+c(a.total_num)+"件商品",1)])]),e("div",$e,[e("div",be,[a.paid?(t(),s("div",Ce,[f(" 已支付 "),a.pay_type==13?(t(),s("span",Ve,"(支付宝收款)")):n("",!0),a.pay_type==12?(t(),s("span",Se,"(现金支付)")):n("",!0),a.pay_type==11?(t(),s("span",we,"(微信收款)")):n("",!0),a.pay_type==0?(t(),s("span",Pe,"(余额支付)")):n("",!0),a.pay_type==1?(t(),s("span",Le,"(微信支付)")):n("",!0),a.pay_type==9?(t(),s("span",Ie,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Ae,"(对公转账)")):n("",!0)])):(t(),s("div",De,"未支付"))]),a.service_info?(t(),s("div",xe," 收银员: "+c(a.service_info.nickname),1)):(t(),s("div",Re,"平台订单"))])],10,ue))),128)),S.value?(t(),s("div",Be,"没有更多了")):n("",!0),y.value?(t(),s("div",Ue,"加载中...")):n("",!0)])),[[P,y.value],[T,b]])])}}},Ee=q(ze,[["__scopeId","data-v-bafd87fa"]]),m=$=>(Z("data-v-cbee3552"),$=$(),ee(),$),Me={class:"my-order"},Ne={class:"header-nav"},Ye=["onClick"],Fe={class:"detail"},Oe={key:0,class:"table"},je={style:{"font-size":"0.9rem"}},Ke={style:{color:"#ff4a00"}},Te={style:{display:"flex","align-items":"center"}},qe={style:{"margin-left":"0.5rem"}},He={key:1,class:"table"},Ge=m(()=>e("div",{class:"table-title"},"订单信息",-1)),Je={class:"table-info"},Qe={class:"info-item"},We=m(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=m(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=m(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=m(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},ct=m(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),rt={class:"info-item-info"},_t={class:"info-item"},ut=m(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),vt={class:"info-item-info"},pt={class:"info-item"},ft=m(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),mt={class:"info-item-info"},ht={key:0},yt={key:1},gt={key:2},kt={key:3},$t={key:4},bt={key:5},Ct={key:6},Vt={key:0,class:"table-title"},St={key:1,class:"table-info",style:{"flex-direction":"column"}},wt={class:"info-item"},Pt=m(()=>e("div",{class:"info-item-title"},"头像:",-1)),Lt={class:"info-item-info"},It={class:"info-item"},At=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Dt={class:"info-item-info"},xt={class:"info-item"},Rt=m(()=>e("div",{class:"info-item-title"},"账号:",-1)),Bt={class:"info-item-info"},Ut={key:2,class:"footer"},zt={class:"info"},Et={class:"ser"},Mt={class:"price"},Nt={key:0,class:"handle"},Yt={key:1,class:"handle"},Ft=m(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ot={class:"dialog-footer"},jt={__name:"detail",setup($){const I=H(),R=X(),o=r({});x.on("set-order-detail",_=>{o.value=_}),r([]);const A=r(null),D=r(!1);r(0);const g=r(0),v=r(["商品信息","订单详情"]),y=r(""),V=r(!1),L=_=>{y.value=_,V.value=!0},S=()=>{V.value=!1,se({order_sn:y.value,staff_id:I.userInfo.service.service_id}).then(_=>{Y({message:_.message,type:"success"}),R.push({name:"home"})})},k=_=>{A.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),A.value.drawer=!0},b=_=>{oe({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?(Y({message:i.message,type:"success"}),x.emit("update-order-detail",{}),o.value.paid=1):Y({message:i.message,type:"error"})}).catch(i=>{})};return(_,i)=>{const l=h("el-image"),w=h("el-table-column"),U=h("el-table"),C=h("el-button"),z=h("el-dialog"),E=F("loading");return t(),s("div",Me,[e("div",Ne,[(t(!0),s(O,null,j(v.value,(p,P)=>(t(),s("div",{key:P,class:B(["nav-item",{"nav-item-active":g.value==P,"nav-item-radius1":g.value==P+1,"nav-item-radius2":g.value==P-1}]),onClick:T=>g.value=P},c(p),11,Ye))),128)),e("div",{class:B(["nav-item",{"nav-item-radius2":g.value==v.value.length-1}]),style:{flex:"1"}},null,2)]),G((t(),s("div",Fe,[o.value.orderProduct&&g.value==0?(t(),s("div",Oe,[e("div",je,[f(" 共计 "),e("span",Ke,c(o.value.total_num),1),f(" 件商品 ")]),d(U,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[d(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:p})=>[e("div",Te,[d(l,{style:{height:"3rem",width:"3rem"},src:p.cart_info.productAttr.image||p.cart_info.product.image},null,8,["src"]),e("span",qe,c(p.cart_info.product.store_name),1)])]),_:1}),d(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),d(w,{prop:"product_num",label:"数量",width:"150"}),d(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&g.value==1?(t(),s("div",He,[Ge,e("div",Je,[e("div",Qe,[We,e("div",Xe,c(o.value.create_time),1)]),e("div",Ze,[et,e("div",tt,c(o.value.total_num),1)]),e("div",st,[ot,e("div",at,"¥"+c(o.value.total_price),1)]),e("div",it,[lt,e("div",nt,c(o.value.pay_time),1)]),e("div",dt,[ct,e("div",rt,"¥"+c(o.value.deduction_price),1)]),e("div",_t,[ut,e("div",vt,"¥"+c(o.value.pay_price),1)]),e("div",pt,[ft,e("div",mt,[o.value.pay_type==11?(t(),s("span",ht,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",yt,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",kt,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",$t,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",bt,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",Ct,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",Vt,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",St,[e("div",wt,[Pt,e("div",Lt,[d(l,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",It,[At,e("div",Dt,c(o.value.service_info.nickname),1)]),e("div",xt,[Rt,e("div",Bt,c(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),o.value.service_info?(t(),s("div",Ut,[e("div",zt,[e("div",Et,"收银员: "+c(o.value.service_info.nickname),1),e("div",Mt,[f(" 实付: "),e("span",null,"¥"+c(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",Yt,"已支付")):(t(),s("div",Nt,[d(C,{class:"btn",type:"primary",onClick:i[0]||(i[0]=p=>k(o.value))},{default:u(()=>[f("重新支付")]),_:1}),d(C,{class:"btn",type:"primary",onClick:i[1]||(i[1]=p=>b(o.value.order_sn))},{default:u(()=>[f("检测状态")]),_:1}),d(C,{class:"btn",type:"success",onClick:i[2]||(i[2]=p=>L(o.value.order_sn))},{default:u(()=>[f("提单")]),_:1})]))])):n("",!0)])),[[E,D.value]]),d(ae,{ref_key:"payRef",ref:A},null,512),d(z,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",Ot,[d(C,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),K(C,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(C,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Ft]),_:1},8,["modelValue"])])}}},Kt=q(jt,[["__scopeId","data-v-cbee3552"]]),Tt={class:"my-card"},Qt={__name:"index",setup($){return(I,R)=>(t(),s("div",Tt,[d(Ee,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(ie),d(Kt,{ref:"detailRef"},null,512)]))}};export{Qt as default}; +import{_ as q,u as H,r,o as Q,m as x,b as h,j as F,c as t,h as s,e,t as c,f as d,w as u,g as f,k as W,q as G,F as O,i as j,p as B,d as K,s as n,A as X,E as Y,v as Z,x as ee}from"./index-3-t8Fk7s.js";import{s as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{p as ae}from"./pay-Bt7FIL7i.js";import{p as ie}from"./padding-DTyMU7Be.js";const le={class:"my-order"},ne={class:"header-nav"},de={class:"nav-item"},ce={class:"nav-item-btn"},re={class:"header-input"},_e={class:"order-list",":infinite-scroll-distance":"300",":infinite-scroll-delay":"500",style:{overflow:"auto"}},ue=["onClick"],ve={class:"top"},pe={class:"create-time"},fe={class:"shop"},me={key:0,class:"left"},he={key:0,class:"shop-name"},ye={class:"right"},ge={class:"money"},ke={class:"count"},$e={class:"bottom"},be={class:"pay"},Ce={key:0},Ve={key:0},Se={key:1},we={key:2},Pe={key:3},Le={key:4},Ie={key:5},Ae={key:6},De={key:1,style:{color:"#ff4a00"}},xe={key:0,class:"cashier"},Re={key:1,class:"cashier"},Be={key:0,class:"load-end"},Ue={key:1,class:"load-end"},ze={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup($){const I=H(),R=$;r([]);const o=r(1),A=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],b(!0)};r(null);const D=r(""),g=()=>{v.value.date=D.value.join("-"),b(!0)},v=r({page:1,limit:20,store_name:"",date:"",staff_id:0,sale_type:2}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),b=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;R.isSystem||(v.value.staff_id=I.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(I.userInfo.service.mer_id,v.value).then(l=>{i?k.value=l.data.list:k.value=[...k.value,...l.data.list],l.data.list.length{S.value=!0,y.value=!1})},_=(i,l)=>{L.value=l,x.emit("set-order-detail",i)};return Q(()=>{x.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),U=h("el-radio-group"),C=h("el-date-picker"),z=h("el-button"),E=h("el-input"),p=h("el-image"),P=F("loading"),T=F("infinite-scroll");return t(),s("div",le,[e("div",ne,[e("div",de,c($.isSystem?"平台订单":"收银订单"),1),e("div",ce,[d(U,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),onChange:A,size:"small"},{default:u(()=>[d(w,{value:1},{default:u(()=>[f("已支付")]),_:1}),d(w,{value:2},{default:u(()=>[f("未支付")]),_:1})]),_:1},8,["modelValue"]),d(C,{modelValue:D.value,"onUpdate:modelValue":l[1]||(l[1]=a=>D.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:g,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",re,[d(E,{modelValue:v.value.store_name,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.store_name=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>b(!0),["enter"])),onClear:l[5]||(l[5]=a=>b(!0)),clearable:""},{append:u(()=>[d(z,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:l[2]||(l[2]=a=>b(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",_e,[(t(!0),s(O,null,j(k.value,(a,M)=>(t(),s("div",{class:B(["item",{"item-active":L.value==M}]),key:M,onClick:N=>_(a,M)},[e("div",ve,[e("div",{class:B(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+c(a.order_sn),3),e("div",pe,c(a.create_time),1)]),e("div",fe,[a.orderProduct?(t(),s("div",me,[(t(!0),s(O,null,j(a.orderProduct.slice(0,5),(N,J)=>(t(),K(p,{key:J,src:N.cart_info.productAttr.image||N.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",he,c(a.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",ye,[e("div",ge,"¥"+c(a.pay_price),1),e("div",ke,"共"+c(a.total_num)+"件商品",1)])]),e("div",$e,[e("div",be,[a.paid?(t(),s("div",Ce,[f(" 已支付 "),a.pay_type==13?(t(),s("span",Ve,"(支付宝收款)")):n("",!0),a.pay_type==12?(t(),s("span",Se,"(现金支付)")):n("",!0),a.pay_type==11?(t(),s("span",we,"(微信收款)")):n("",!0),a.pay_type==0?(t(),s("span",Pe,"(余额支付)")):n("",!0),a.pay_type==1?(t(),s("span",Le,"(微信支付)")):n("",!0),a.pay_type==9?(t(),s("span",Ie,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Ae,"(对公转账)")):n("",!0)])):(t(),s("div",De,"未支付"))]),a.service_info?(t(),s("div",xe," 收银员: "+c(a.service_info.nickname),1)):(t(),s("div",Re,"平台订单"))])],10,ue))),128)),S.value?(t(),s("div",Be,"没有更多了")):n("",!0),y.value?(t(),s("div",Ue,"加载中...")):n("",!0)])),[[P,y.value],[T,b]])])}}},Ee=q(ze,[["__scopeId","data-v-bafd87fa"]]),m=$=>(Z("data-v-cbee3552"),$=$(),ee(),$),Me={class:"my-order"},Ne={class:"header-nav"},Ye=["onClick"],Fe={class:"detail"},Oe={key:0,class:"table"},je={style:{"font-size":"0.9rem"}},Ke={style:{color:"#ff4a00"}},Te={style:{display:"flex","align-items":"center"}},qe={style:{"margin-left":"0.5rem"}},He={key:1,class:"table"},Ge=m(()=>e("div",{class:"table-title"},"订单信息",-1)),Je={class:"table-info"},Qe={class:"info-item"},We=m(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=m(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=m(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=m(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},ct=m(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),rt={class:"info-item-info"},_t={class:"info-item"},ut=m(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),vt={class:"info-item-info"},pt={class:"info-item"},ft=m(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),mt={class:"info-item-info"},ht={key:0},yt={key:1},gt={key:2},kt={key:3},$t={key:4},bt={key:5},Ct={key:6},Vt={key:0,class:"table-title"},St={key:1,class:"table-info",style:{"flex-direction":"column"}},wt={class:"info-item"},Pt=m(()=>e("div",{class:"info-item-title"},"头像:",-1)),Lt={class:"info-item-info"},It={class:"info-item"},At=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Dt={class:"info-item-info"},xt={class:"info-item"},Rt=m(()=>e("div",{class:"info-item-title"},"账号:",-1)),Bt={class:"info-item-info"},Ut={key:2,class:"footer"},zt={class:"info"},Et={class:"ser"},Mt={class:"price"},Nt={key:0,class:"handle"},Yt={key:1,class:"handle"},Ft=m(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ot={class:"dialog-footer"},jt={__name:"detail",setup($){const I=H(),R=X(),o=r({});x.on("set-order-detail",_=>{o.value=_}),r([]);const A=r(null),D=r(!1);r(0);const g=r(0),v=r(["商品信息","订单详情"]),y=r(""),V=r(!1),L=_=>{y.value=_,V.value=!0},S=()=>{V.value=!1,se({order_sn:y.value,staff_id:I.userInfo.service.service_id}).then(_=>{Y({message:_.message,type:"success"}),R.push({name:"home"})})},k=_=>{A.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),A.value.drawer=!0},b=_=>{oe({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?(Y({message:i.message,type:"success"}),x.emit("update-order-detail",{}),o.value.paid=1):Y({message:i.message,type:"error"})}).catch(i=>{})};return(_,i)=>{const l=h("el-image"),w=h("el-table-column"),U=h("el-table"),C=h("el-button"),z=h("el-dialog"),E=F("loading");return t(),s("div",Me,[e("div",Ne,[(t(!0),s(O,null,j(v.value,(p,P)=>(t(),s("div",{key:P,class:B(["nav-item",{"nav-item-active":g.value==P,"nav-item-radius1":g.value==P+1,"nav-item-radius2":g.value==P-1}]),onClick:T=>g.value=P},c(p),11,Ye))),128)),e("div",{class:B(["nav-item",{"nav-item-radius2":g.value==v.value.length-1}]),style:{flex:"1"}},null,2)]),G((t(),s("div",Fe,[o.value.orderProduct&&g.value==0?(t(),s("div",Oe,[e("div",je,[f(" 共计 "),e("span",Ke,c(o.value.total_num),1),f(" 件商品 ")]),d(U,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[d(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:p})=>[e("div",Te,[d(l,{style:{height:"3rem",width:"3rem"},src:p.cart_info.productAttr.image||p.cart_info.product.image},null,8,["src"]),e("span",qe,c(p.cart_info.product.store_name),1)])]),_:1}),d(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),d(w,{prop:"product_num",label:"数量",width:"150"}),d(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&g.value==1?(t(),s("div",He,[Ge,e("div",Je,[e("div",Qe,[We,e("div",Xe,c(o.value.create_time),1)]),e("div",Ze,[et,e("div",tt,c(o.value.total_num),1)]),e("div",st,[ot,e("div",at,"¥"+c(o.value.total_price),1)]),e("div",it,[lt,e("div",nt,c(o.value.pay_time),1)]),e("div",dt,[ct,e("div",rt,"¥"+c(o.value.deduction_price),1)]),e("div",_t,[ut,e("div",vt,"¥"+c(o.value.pay_price),1)]),e("div",pt,[ft,e("div",mt,[o.value.pay_type==11?(t(),s("span",ht,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",yt,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",gt,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",kt,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",$t,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",bt,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",Ct,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",Vt,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",St,[e("div",wt,[Pt,e("div",Lt,[d(l,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",It,[At,e("div",Dt,c(o.value.service_info.nickname),1)]),e("div",xt,[Rt,e("div",Bt,c(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),o.value.service_info?(t(),s("div",Ut,[e("div",zt,[e("div",Et,"收银员: "+c(o.value.service_info.nickname),1),e("div",Mt,[f(" 实付: "),e("span",null,"¥"+c(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",Yt,"已支付")):(t(),s("div",Nt,[d(C,{class:"btn",type:"primary",onClick:i[0]||(i[0]=p=>k(o.value))},{default:u(()=>[f("重新支付")]),_:1}),d(C,{class:"btn",type:"primary",onClick:i[1]||(i[1]=p=>b(o.value.order_sn))},{default:u(()=>[f("检测状态")]),_:1}),d(C,{class:"btn",type:"success",onClick:i[2]||(i[2]=p=>L(o.value.order_sn))},{default:u(()=>[f("提单")]),_:1})]))])):n("",!0)])),[[E,D.value]]),d(ae,{ref_key:"payRef",ref:A},null,512),d(z,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",Ot,[d(C,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),K(C,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(C,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Ft]),_:1},8,["modelValue"])])}}},Kt=q(jt,[["__scopeId","data-v-cbee3552"]]),Tt={class:"my-card"},Qt={__name:"index",setup($){return(I,R)=>(t(),s("div",Tt,[d(Ee,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(ie),d(Kt,{ref:"detailRef"},null,512)]))}};export{Qt as default}; diff --git a/dist/assets/index-Do69Dp-3.js b/dist/assets/index-Do69Dp-3.js index 756dbe1..ac51a98 100644 --- a/dist/assets/index-Do69Dp-3.js +++ b/dist/assets/index-Do69Dp-3.js @@ -1 +1 @@ -import{c as re,a as ue,b as ee,d as de,o as _e}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{_ as T,r,o as G,m as F,a as K,b as g,c as m,d as J,w as V,e,f as _,g as P,t as I,n as X,E as W,u as se,h as w,F as B,i as j,j as oe,k as ve,l as Q,p as N,q as ae,s as q,v as le,x as ne,y as pe,z as fe}from"./index-3-t8Fk7s.js";import{_ as me}from"./lodash-BiR1SJeZ.js";import{p as te}from"./padding-DTyMU7Be.js";import{g as he,m as ge,a as ye}from"./shop-C3GBYBKO.js";import{p as ke}from"./pay-Bt7FIL7i.js";const $e={class:"price"},be={class:"flex"},we={style:{margin:"0.625rem","padding-bottom":"40px"}},Ce={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Pe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(A,{expose:x,emit:C}){const o=r(!1),u=r(null),t=r(0),d=(c=!0,i=0)=>{n.value.nowPrice="",n.value.percentage="",o.value=c,t.value=i,X(()=>{setTimeout(()=>{var $;($=u.value)==null||$.focus()},150)})},n=r({nowPrice:"",percentage:""}),h=c=>{n.value.percentage=(c/t.value*100).toFixed(2)},k=c=>{n.value.nowPrice=(t.value*c/100).toFixed(2)},p=C,v=()=>{if(n.value.percentage>100)return n.value.nowPrice="",n.value.percentage="",W.error("改价金额不能大于当前订单金额");if(n.value.nowPrice<=0)return n.value.nowPrice="",n.value.percentage="",W.error("金额不能小于0");p("changeAllPrice",n.value.nowPrice)};x({show:d,dialogVisible:o});const b=()=>{o.value&&v()};return G(()=>{F.on("enter",b)}),K(()=>{F.off("enter",b)}),(c,i)=>{const $=g("el-input"),E=g("el-button"),f=g("el-dialog");return m(),J(f,{modelValue:o.value,"onUpdate:modelValue":i[2]||(i[2]=y=>o.value=y),title:"订单改价",width:"650"},{footer:V(()=>[e("div",Pe,[_(E,{class:"ok-btn",type:"primary",onClick:v},{default:V(()=>[P(" 确定 (Enter) ")]),_:1})])]),default:V(()=>[e("div",$e,[e("div",be,[_($,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.nowPrice,"onUpdate:modelValue":i[0]||(i[0]=y=>n.value.nowPrice=y),type:"number",placeholder:"请输入改价后的价格",onInput:h},{suffix:V(()=>[P("元")]),_:1},8,["modelValue"]),_($,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.percentage,"onUpdate:modelValue":i[1]||(i[1]=y=>n.value.percentage=y),type:"number",placeholder:"请输入比例",onInput:k},{suffix:V(()=>[P("%")]),_:1},8,["modelValue"])]),e("div",we,[P(" 改价后金额: "),e("span",Ce,"¥"+I(n.value.nowPrice||t.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ve=T(Ie,[["__scopeId","data-v-924edcc0"]]),Ae={class:"my-order"},Le={class:"header-nav"},Se={class:"nav-item"},Fe={class:"order-list"},xe={class:"order-item-info"},Re={class:"order-item-title"},Ee={class:"title"},Me=["onClick"],De={class:"order-item-sku"},ze=["onClick"],Oe={class:"order-item-price"},Ue={class:"order-footer"},qe={class:"order-total"},Ne={class:"price"},Be={class:"total-item"},je={style:{"font-size":"1.4rem"}},Te={class:"total-item"},Ge={class:"order-btn"},Ke={__name:"order",emits:["goPay","editAttr"],setup(A,{expose:x,emit:C}){const o=r([]),u=r(0),t=r(0),d=r(0),n=se(),h=()=>{let s=[];o.value.map(l=>{s.push(l.cart_id)}),s.length!=0&&p(s)},k=s=>{o.value=o.value.filter(l=>l.cart_id!=s),p([s])},p=s=>{re({cart_id:s}).then(l=>{console.log(l),v()})},v=()=>{u.value=0,t.value=0,d.value=0,ue({staff_id:n.userInfo.service.service_id,sale_type:2}).then(s=>{var l,S;((S=(l=s.data)==null?void 0:l.list)==null?void 0:S.length)>0?(o.value=s.data.list[0].list,o.value.forEach(R=>{u.value+=R.productAttr.price*R.cart_num}),t.value=u.value):o.value=[]})};v();const b=C,c=()=>{b("goPay")},i=(s,l)=>{ee(s.cart_id,{cart_num:s.cart_num}).then(S=>{u.value=0,o.value.forEach(R=>{u.value+=R.productAttr.price*R.cart_num}),t.value=u.value})},$=s=>{b("editPupop",s)},E=(s,l)=>{ee(s,l).then(S=>{v()})},f=s=>{d.value=t.value-s,u.value=+s,X(()=>{setTimeout(()=>{L(!1)},150)})};r(0);const y=r(null),L=(s=!0)=>{y.value.show(s,t.value)};x({getList:v,list:o,editItem:E,discounts:d,allPrice:u});const O=()=>{y.value.dialogVisible?y.value.dialogVisible=!1:L()},a=()=>{o.value.length>0&&h()};return G(()=>{F.on("insert",O),F.on("delete",a)}),K(()=>{F.off("insert",O),F.off("delete",a)}),(s,l)=>{const S=g("Delete"),R=g("el-icon"),U=g("el-empty"),M=g("el-image"),D=g("ArrowDown"),Z=g("el-input-number"),ce=g("el-button");return m(),w("div",Ae,[e("div",Le,[e("div",Se,[P(" 已选购 "),e("span",null,I(o.value.length),1),P(" 件 ")]),e("div",{class:"nav-item-clear",onClick:h},[_(R,null,{default:V(()=>[_(S)]),_:1}),P("清空 (Delete) ")])]),e("div",Fe,[o.value.length==0?(m(),J(U,{key:0,description:"请点击右侧添加商品"})):(m(!0),w(B,{key:1},j(o.value,(z,ie)=>(m(),w("div",{class:"order-item",key:ie},[_(M,{loading:"lazy",class:"order-item-img",src:z.productAttr&&z.productAttr.image||z.product.image},null,8,["src"]),e("div",xe,[e("div",Re,[e("div",Ee,I(z.spu.store_name),1),e("div",{class:"delete",onClick:H=>k(z.cart_id)},"删除",8,Me)]),e("div",De,[e("span",{style:{display:"flex","align-items":"center"},onClick:H=>$(z)},[P("商品规格: "+I(z.productAttr.sku||"默认规格"),1),_(R,{size:"16",style:{"margin-left":"0.2rem"}},{default:V(()=>[_(D)]),_:1})],8,ze)]),e("div",Oe,[e("div",null,[P(" ¥"),e("span",null,I(z.productAttr.price),1)]),e("div",null,[_(Z,{modelValue:z.cart_num,"onUpdate:modelValue":H=>z.cart_num=H,"step-strictly":"",min:1,step:1,onChange:H=>i(z)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Ue,[e("div",qe,[e("div",Ne,[e("div",Be,[P(" 实付: "),e("span",null,[P("¥"),e("span",je,I(u.value.toFixed(2)),1)])]),e("div",Te,[P(" 优惠: "),e("span",null,[P("¥"),e("span",null,I(d.value.toFixed(2)),1)])])])]),e("div",Ge,[_(ce,{class:"btn",type:"primary",onClick:c,disabled:o.value.length==0},{default:V(()=>[P("立即结账 (F9)")]),_:1},8,["disabled"])])]),_(Ve,{ref_key:"priceRef",ref:y,onChangeAllPrice:f},null,512)])}}},Je=T(Ke,[["__scopeId","data-v-c5266ed8"]]),Y=A=>(le("data-v-41370656"),A=A(),ne(),A),He={class:"my-order"},Qe=Y(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},st=Y(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),ot=[st],at={key:1,class:"no-stock"},lt=Y(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],ct={key:1,class:"no-data"},it={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(A,{expose:x,emit:C}){const o=r(null),u=C,t=r(""),d=()=>{u("loadMore",{bar_code:t.value})},n=c=>{if(c.is_used==0)return W.error("该商品已被平台关闭");if(c.stock==0)return W.warning("该商品无库存");u("changeItem",c)},h=me.throttle(()=>{u("getStoreList",{bar_code:t.value},!0)},300);x({bar_code:t});const k=r(!1),p=()=>{k.value=!0},v=()=>{k.value=!1},b=()=>{var c;(c=o.value)==null||c.focus()};return G(()=>{X(()=>{var c;(c=o.value)==null||c.focus(),p()}),F.on("shift",b)}),K(()=>{F.off("shift",b)}),(c,i)=>{const $=g("el-input"),E=g("Search"),f=g("el-icon"),y=g("el-button"),L=g("el-image"),O=g("el-space"),a=g("el-empty"),s=oe("infinite-scroll");return m(),w("div",He,[e("div",{class:N(["header-nav",{"input-focus":k.value}])},[Qe,e("div",We,[_($,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=l=>t.value=l),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:o,onFocus:p,onBlur:v,onKeyup:ve(Q(h),["enter"]),onClear:Q(h)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:i[1]||(i[1]=(...l)=>Q(h)&&Q(h)(...l))},[_(y,{class:"btn",type:"primary"},{default:V(()=>[_(f,null,{default:V(()=>[_(E)]),_:1})]),_:1})])],2),ae((m(),w("div",Xe,[A.storeList.length?(m(),J(O,{key:0,wrap:""},{default:V(()=>[(m(!0),w(B,null,j(A.storeList,(l,S)=>(m(),w("div",{class:"shop-item",key:S,onClick:R=>n(l)},[_(L,{loading:"lazy",src:l.image},null,8,["src"]),e("div",Ze,I(l.store_name),1),e("div",et,[P(" ¥"),e("span",null,I(l.price),1)]),l.stock==0?(m(),w("div",tt,ot)):q("",!0),l.is_used==0?(m(),w("div",at,nt)):q("",!0)],8,Ye))),128))]),_:1})):q("",!0),A.storeList.length?q("",!0):(m(),w("div",ct,[_(a,{"image-size":200,description:"没有找到对应商品"})]))])),[[s,d]])])}}},rt=T(it,[["__scopeId","data-v-41370656"]]),ut=A=>(le("data-v-29f08ea1"),A=A(),ne(),A),dt={class:"shop"},_t={key:0,class:"shop-info"},vt={class:"shop-info-left"},pt={class:"shop-info-right"},ft={class:"shop-info-right-top"},mt={class:"shop-info-right-center"},ht={class:"shop-info-right-price"},gt={class:"shop-sku"},yt=ut(()=>e("div",{class:"title"},"产品",-1)),kt={class:"sku"},$t=["onClick"],bt={class:"dialog-footer"},wt={__name:"pupop",emits:["changeItem"],setup(A,{expose:x,emit:C}){const o=r(!1),u=f=>{o.value=f},t=r({}),d=r(null),n=r(!1),h=r("add"),k=r({}),p=(f,y="add")=>{h.value=y,y=="add"?(t.value=f,d.value=f.attr[0]):(n.value=!0,k.value=f,he(f.product_id).then(L=>{L.data.attrValue=JSON.parse(JSON.stringify(L.data.attr)),L.data.attr=Object.keys(L.data.sku),t.value=L.data,d.value=L.data.attr[0],n.value=!1}).catch(L=>{n.value=!1}))},v=C,b=()=>{h.value=="add"?v("changeItem",t.value,d.value):v("editItem",k.value.cart_id,{cart_num:k.value.cart_num,product_attr_unique:t.value.sku[d.value].unique}),o.value=!1},c=f=>{d.value=f};x({show:u,setForm:p});const i=()=>{if(!o.value)return;let f=t.value.attr.indexOf(d.value);if(f>0)return c(t.value.attr[f-1])},$=()=>{if(!o.value)return;let f=t.value.attr.indexOf(d.value);if(f{o.value&&b()};return G(()=>{F.on("left",i),F.on("right",$),F.on("enter",E)}),K(()=>{F.off("left",i),F.off("right",$),F.off("enter",E)}),(f,y)=>{const L=g("el-image"),O=g("el-space"),a=g("el-button"),s=g("el-dialog"),l=oe("loading");return m(),J(s,{modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=S=>o.value=S),title:"商品规格",width:"650"},pe({default:V(()=>{var S,R,U;return[ae((m(),w("div",dt,[t.value.sku?(m(),w("div",_t,[e("div",vt,[_(L,{loading:"lazy",src:((S=t.value.sku[d.value])==null?void 0:S.image)||t.value.image},null,8,["src"])]),e("div",pt,[e("div",ft,I(t.value.store_name),1),e("div",mt,"库存"+I(((R=t.value.sku[d.value])==null?void 0:R.stock)||0),1),e("div",ht,[P("¥"),e("span",null,I(((U=t.value.sku[d.value])==null?void 0:U.price)||t.value.price),1)])])])):q("",!0),e("div",gt,[yt,e("div",kt,[_(O,{wrap:"",size:20},{default:V(()=>[(m(!0),w(B,null,j(t.value.attr,(M,D)=>(m(),w("div",{class:N(["sku-item",{"sku-item_active":d.value==M}]),onClick:Z=>c(M),key:D},I(M||"默认规格"),11,$t))),128))]),_:1})])])])),[[l,n.value]])]}),_:2},[h.value!="add"&&t.value.attr&&t.value.attr.length==1?void 0:{name:"footer",fn:V(()=>[e("div",bt,[_(a,{class:"ok-btn",type:"primary",onClick:b},{default:V(()=>[P(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},Ct=T(wt,[["__scopeId","data-v-29f08ea1"]]),Pt=["onClick","onMousemove"],It=["onMousemove"],Vt={class:"title"},At={class:"list"},Lt=["onClick"],St={__name:"classify",emits:["getStoreList"],setup(A,{emit:x}){const C=x,o=r([]),u=r(-1),t=r(-1),d=r(-1),n=r(!1);(()=>{ge(259).then(p=>{o.value=p.data,u.value=-1})})();const k=(p=-1,v=-1)=>{d.value=p,u.value=p,t.value=v,console.log(p,v),n.value=!0;let b="";p>=0&&v>=0?b=o.value[p].children[v].store_category_id:p>=0&&(b=o.value[p].store_category_id),C("getStoreList",{mer_cate_id:b},!0)};return(p,v)=>{const b=g("el-popover");return m(),w("div",{class:"classify",onMouseout:v[2]||(v[2]=c=>n.value?n.value=!1:n.value=!0)},[e("div",{class:N(["itemP",{"itemP-active":u.value==-1}]),onClick:v[0]||(v[0]=c=>k(-1))},I("全部"),2),(m(!0),w(B,null,j(o.value,(c,i)=>(m(),J(b,{placement:"left",width:"20rem",trigger:"click",key:i,visible:i==u.value&&d.value==i},{reference:V(()=>[e("div",{class:N(["itemP",{"itemP-active":i==u.value}]),onClick:$=>k(i),onMousemove:$=>d.value=i},I(c.cate_name),43,Pt)]),default:V(()=>[e("div",{class:"active-card",onMouseout:v[1]||(v[1]=$=>d.value=-1),onMousemove:$=>d.value=i},[e("div",Vt,I(c.cate_name),1),e("div",At,[(m(!0),w(B,null,j(c.children,($,E)=>(m(),w("div",{class:N({"list-active":E==t.value}),link:"",type:"primary",key:E,onClick:f=>k(i,E)},I($.cate_name),11,Lt))),128))])],40,It)]),_:2},1032,["visible"]))),128))],32)}}},Ft=T(St,[["__scopeId","data-v-4630842b"]]),xt={class:"my-card"},Ut={__name:"index",setup(A){const x=r(null),C=r(null),o=r(null),u=r(null),t=r([]),d=se(),n=fe(),h=r({page:1,limit:30}),k=(a={},s=!1)=>{h.value={staff_id:d.userInfo.service.service_id,sale_type:2,mer_type:1,...h.value,...a},s&&(t.value=[],h.value.page=1,p.value=!1),ye(h.value).then(l=>{var R,U;((U=(R=l.data)==null?void 0:R.list)==null?void 0:U.length)(Object.keys(M.sku).forEach(D=>{M.sku[D].wholesale_price&&(M.sku[D].price=M.sku[D].wholesale_price)}),M.attrValue.forEach(D=>{D.wholesale_price&&(D.price=D.wholesale_price)}),M.attr=Object.keys(M.sku),M));t.value=t.value.concat(S),a.bar_code&&t.value.length==1&&b(a.bar_code)&&(o.value.bar_code="",i(t.value[0],t.value[0].attr[0])),h.value.page++})},p=r(!1),v=a=>{p.value||k(a)};function b(a){return/^\d+$/.test(a)}const c=(a,s="")=>{let l={is_new:0,product_id:a.product_id,cart_num:1,product_attr_unique:a.sku[s]!==void 0?a.sku[s].unique:"",staff_id:d.userInfo.service.service_id,product_type:0,sale_type:2};de(l).then(S=>{C.value.getList()})},i=(a,s)=>{if(!a.attr||a.attr.length==0||a.attr.length==1)return c(a,a.attr[0]?a.attr[0]:"");if(s)return c(a,s);x.value.setForm(a,"add"),x.value.show(!0)},$=(a,s)=>{C.value.editItem(a,s)},E=a=>{x.value.setForm(a,"edit"),x.value.show(!0)},f=()=>{let a=C.value.list.map(l=>l.cart_id),s={takes:[],use_coupon:{},use_integral:!1,cart_id:a};C.value.discounts>0&&(s.deduction_price=C.value.discounts.toFixed(2),s.pay_type="micropay"),_e(s).then(l=>{u.value.setForm({data:l.data,cart_id:a})})},y=()=>{f(),u.value.drawer=!0},L=()=>{C.value.getList()},O=()=>{n.name=="saleHome"&&(!u.value.drawer&&C.value.list.length>0?y():u.value.beforeClose())};return G(()=>{k(),h.value.page++,F.on("F9",O)}),K(()=>{F.off("F9",O)}),(a,s)=>(m(),w("div",xt,[_(Je,{ref_key:"orderRef",ref:C,onGoPay:y,onEditPupop:E},null,512),_(te),_(rt,{ref_key:"shopRef",ref:o,style:{flex:"1"},storeList:t.value,onGetStoreList:k,onChangeItem:i,onLoadMore:v},null,8,["storeList"]),_(Ct,{ref_key:"pupopRef",ref:x,onChangeItem:i,onEditItem:$},null,512),_(te),_(Ft,{ref:"classifyRef",onGetStoreList:k},null,512),_(ke,{ref_key:"payRef",ref:u,onPaySuccess:L},null,512)]))}};export{Ut as default}; +import{c as re,a as ue,b as ee,d as de,o as _e}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{_ as T,r,o as G,m as F,a as K,b as g,c as m,d as J,w as V,e,f as _,g as P,t as I,n as X,E as W,u as se,h as w,F as B,i as j,j as oe,k as ve,l as Q,p as N,q as ae,s as q,v as le,x as ne,y as pe,z as fe}from"./index-3-t8Fk7s.js";import{_ as me}from"./lodash-BiR1SJeZ.js";import{p as te}from"./padding-DTyMU7Be.js";import{g as he,m as ge,a as ye}from"./shop-C3GBYBKO.js";import{p as ke}from"./pay-Bt7FIL7i.js";const $e={class:"price"},be={class:"flex"},we={style:{margin:"0.625rem","padding-bottom":"40px"}},Ce={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Pe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(A,{expose:x,emit:C}){const o=r(!1),u=r(null),t=r(0),d=(c=!0,i=0)=>{n.value.nowPrice="",n.value.percentage="",o.value=c,t.value=i,X(()=>{setTimeout(()=>{var $;($=u.value)==null||$.focus()},150)})},n=r({nowPrice:"",percentage:""}),h=c=>{n.value.percentage=(c/t.value*100).toFixed(2)},k=c=>{n.value.nowPrice=(t.value*c/100).toFixed(2)},p=C,v=()=>{if(n.value.percentage>100)return n.value.nowPrice="",n.value.percentage="",W.error("改价金额不能大于当前订单金额");if(n.value.nowPrice<=0)return n.value.nowPrice="",n.value.percentage="",W.error("金额不能小于0");p("changeAllPrice",n.value.nowPrice)};x({show:d,dialogVisible:o});const b=()=>{o.value&&v()};return G(()=>{F.on("enter",b)}),K(()=>{F.off("enter",b)}),(c,i)=>{const $=g("el-input"),E=g("el-button"),f=g("el-dialog");return m(),J(f,{modelValue:o.value,"onUpdate:modelValue":i[2]||(i[2]=y=>o.value=y),title:"订单改价",width:"650"},{footer:V(()=>[e("div",Pe,[_(E,{class:"ok-btn",type:"primary",onClick:v},{default:V(()=>[P(" 确定 (Enter) ")]),_:1})])]),default:V(()=>[e("div",$e,[e("div",be,[_($,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.nowPrice,"onUpdate:modelValue":i[0]||(i[0]=y=>n.value.nowPrice=y),type:"number",placeholder:"请输入改价后的价格",onInput:h},{suffix:V(()=>[P("元")]),_:1},8,["modelValue"]),_($,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:n.value.percentage,"onUpdate:modelValue":i[1]||(i[1]=y=>n.value.percentage=y),type:"number",placeholder:"请输入比例",onInput:k},{suffix:V(()=>[P("%")]),_:1},8,["modelValue"])]),e("div",we,[P(" 改价后金额: "),e("span",Ce,"¥"+I(n.value.nowPrice||t.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ve=T(Ie,[["__scopeId","data-v-924edcc0"]]),Ae={class:"my-order"},Le={class:"header-nav"},Se={class:"nav-item"},Fe={class:"order-list"},xe={class:"order-item-info"},Re={class:"order-item-title"},Ee={class:"title"},Me=["onClick"],De={class:"order-item-sku"},ze=["onClick"],Oe={class:"order-item-price"},Ue={class:"order-footer"},qe={class:"order-total"},Ne={class:"price"},Be={class:"total-item"},je={style:{"font-size":"1.4rem"}},Te={class:"total-item"},Ge={class:"order-btn"},Ke={__name:"order",emits:["goPay","editAttr"],setup(A,{expose:x,emit:C}){const o=r([]),u=r(0),t=r(0),d=r(0),n=se(),h=()=>{let s=[];o.value.map(l=>{s.push(l.cart_id)}),s.length!=0&&p(s)},k=s=>{o.value=o.value.filter(l=>l.cart_id!=s),p([s])},p=s=>{re({cart_id:s}).then(l=>{console.log(l),v()})},v=()=>{u.value=0,t.value=0,d.value=0,ue({staff_id:n.userInfo.service.service_id,sale_type:2}).then(s=>{var l,S;((S=(l=s.data)==null?void 0:l.list)==null?void 0:S.length)>0?(o.value=s.data.list[0].list,o.value.forEach(R=>{u.value+=R.productAttr.price*R.cart_num}),t.value=u.value):o.value=[]})};v();const b=C,c=()=>{b("goPay")},i=(s,l)=>{ee(s.cart_id,{cart_num:s.cart_num}).then(S=>{u.value=0,o.value.forEach(R=>{u.value+=R.productAttr.price*R.cart_num}),t.value=u.value})},$=s=>{b("editPupop",s)},E=(s,l)=>{ee(s,l).then(S=>{v()})},f=s=>{d.value=t.value-s,u.value=+s,X(()=>{setTimeout(()=>{L(!1)},150)})};r(0);const y=r(null),L=(s=!0)=>{y.value.show(s,t.value)};x({getList:v,list:o,editItem:E,discounts:d,allPrice:u});const O=()=>{y.value.dialogVisible?y.value.dialogVisible=!1:L()},a=()=>{o.value.length>0&&h()};return G(()=>{F.on("insert",O),F.on("delete",a)}),K(()=>{F.off("insert",O),F.off("delete",a)}),(s,l)=>{const S=g("Delete"),R=g("el-icon"),U=g("el-empty"),M=g("el-image"),D=g("ArrowDown"),Z=g("el-input-number"),ce=g("el-button");return m(),w("div",Ae,[e("div",Le,[e("div",Se,[P(" 已选购 "),e("span",null,I(o.value.length),1),P(" 件 ")]),e("div",{class:"nav-item-clear",onClick:h},[_(R,null,{default:V(()=>[_(S)]),_:1}),P("清空 (Delete) ")])]),e("div",Fe,[o.value.length==0?(m(),J(U,{key:0,description:"请点击右侧添加商品"})):(m(!0),w(B,{key:1},j(o.value,(z,ie)=>(m(),w("div",{class:"order-item",key:ie},[_(M,{loading:"lazy",class:"order-item-img",src:z.productAttr&&z.productAttr.image||z.product.image},null,8,["src"]),e("div",xe,[e("div",Re,[e("div",Ee,I(z.spu.store_name),1),e("div",{class:"delete",onClick:H=>k(z.cart_id)},"删除",8,Me)]),e("div",De,[e("span",{style:{display:"flex","align-items":"center"},onClick:H=>$(z)},[P("商品规格: "+I(z.productAttr.sku||"默认规格"),1),_(R,{size:"16",style:{"margin-left":"0.2rem"}},{default:V(()=>[_(D)]),_:1})],8,ze)]),e("div",Oe,[e("div",null,[P(" ¥"),e("span",null,I(z.productAttr.price),1)]),e("div",null,[_(Z,{modelValue:z.cart_num,"onUpdate:modelValue":H=>z.cart_num=H,"step-strictly":"",min:1,step:1,onChange:H=>i(z)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Ue,[e("div",qe,[e("div",Ne,[e("div",Be,[P(" 实付: "),e("span",null,[P("¥"),e("span",je,I(u.value.toFixed(2)),1)])]),e("div",Te,[P(" 优惠: "),e("span",null,[P("¥"),e("span",null,I(d.value.toFixed(2)),1)])])])]),e("div",Ge,[_(ce,{class:"btn",type:"primary",onClick:c,disabled:o.value.length==0},{default:V(()=>[P("立即结账 (F9)")]),_:1},8,["disabled"])])]),_(Ve,{ref_key:"priceRef",ref:y,onChangeAllPrice:f},null,512)])}}},Je=T(Ke,[["__scopeId","data-v-c5266ed8"]]),Y=A=>(le("data-v-41370656"),A=A(),ne(),A),He={class:"my-order"},Qe=Y(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list",":infinite-scroll-distance":"100",":infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},st=Y(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),ot=[st],at={key:1,class:"no-stock"},lt=Y(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],ct={key:1,class:"no-data"},it={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(A,{expose:x,emit:C}){const o=r(null),u=C,t=r(""),d=()=>{u("loadMore",{bar_code:t.value})},n=c=>{if(c.is_used==0)return W.error("该商品已被平台关闭");if(c.stock==0)return W.warning("该商品无库存");u("changeItem",c)},h=me.throttle(()=>{u("getStoreList",{bar_code:t.value},!0)},300);x({bar_code:t});const k=r(!1),p=()=>{k.value=!0},v=()=>{k.value=!1},b=()=>{var c;(c=o.value)==null||c.focus()};return G(()=>{X(()=>{var c;(c=o.value)==null||c.focus(),p()}),F.on("shift",b)}),K(()=>{F.off("shift",b)}),(c,i)=>{const $=g("el-input"),E=g("Search"),f=g("el-icon"),y=g("el-button"),L=g("el-image"),O=g("el-space"),a=g("el-empty"),s=oe("infinite-scroll");return m(),w("div",He,[e("div",{class:N(["header-nav",{"input-focus":k.value}])},[Qe,e("div",We,[_($,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=l=>t.value=l),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:o,onFocus:p,onBlur:v,onKeyup:ve(Q(h),["enter"]),onClear:Q(h)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:i[1]||(i[1]=(...l)=>Q(h)&&Q(h)(...l))},[_(y,{class:"btn",type:"primary"},{default:V(()=>[_(f,null,{default:V(()=>[_(E)]),_:1})]),_:1})])],2),ae((m(),w("div",Xe,[A.storeList.length?(m(),J(O,{key:0,wrap:""},{default:V(()=>[(m(!0),w(B,null,j(A.storeList,(l,S)=>(m(),w("div",{class:"shop-item",key:S,onClick:R=>n(l)},[_(L,{loading:"lazy",src:l.image},null,8,["src"]),e("div",Ze,I(l.store_name),1),e("div",et,[P(" ¥"),e("span",null,I(l.price),1)]),l.stock==0?(m(),w("div",tt,ot)):q("",!0),l.is_used==0?(m(),w("div",at,nt)):q("",!0)],8,Ye))),128))]),_:1})):q("",!0),A.storeList.length?q("",!0):(m(),w("div",ct,[_(a,{"image-size":200,description:"没有找到对应商品"})]))])),[[s,d]])])}}},rt=T(it,[["__scopeId","data-v-41370656"]]),ut=A=>(le("data-v-29f08ea1"),A=A(),ne(),A),dt={class:"shop"},_t={key:0,class:"shop-info"},vt={class:"shop-info-left"},pt={class:"shop-info-right"},ft={class:"shop-info-right-top"},mt={class:"shop-info-right-center"},ht={class:"shop-info-right-price"},gt={class:"shop-sku"},yt=ut(()=>e("div",{class:"title"},"产品",-1)),kt={class:"sku"},$t=["onClick"],bt={class:"dialog-footer"},wt={__name:"pupop",emits:["changeItem"],setup(A,{expose:x,emit:C}){const o=r(!1),u=f=>{o.value=f},t=r({}),d=r(null),n=r(!1),h=r("add"),k=r({}),p=(f,y="add")=>{h.value=y,y=="add"?(t.value=f,d.value=f.attr[0]):(n.value=!0,k.value=f,he(f.product_id).then(L=>{L.data.attrValue=JSON.parse(JSON.stringify(L.data.attr)),L.data.attr=Object.keys(L.data.sku),t.value=L.data,d.value=L.data.attr[0],n.value=!1}).catch(L=>{n.value=!1}))},v=C,b=()=>{h.value=="add"?v("changeItem",t.value,d.value):v("editItem",k.value.cart_id,{cart_num:k.value.cart_num,product_attr_unique:t.value.sku[d.value].unique}),o.value=!1},c=f=>{d.value=f};x({show:u,setForm:p});const i=()=>{if(!o.value)return;let f=t.value.attr.indexOf(d.value);if(f>0)return c(t.value.attr[f-1])},$=()=>{if(!o.value)return;let f=t.value.attr.indexOf(d.value);if(f{o.value&&b()};return G(()=>{F.on("left",i),F.on("right",$),F.on("enter",E)}),K(()=>{F.off("left",i),F.off("right",$),F.off("enter",E)}),(f,y)=>{const L=g("el-image"),O=g("el-space"),a=g("el-button"),s=g("el-dialog"),l=oe("loading");return m(),J(s,{modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=S=>o.value=S),title:"商品规格",width:"650"},pe({default:V(()=>{var S,R,U;return[ae((m(),w("div",dt,[t.value.sku?(m(),w("div",_t,[e("div",vt,[_(L,{loading:"lazy",src:((S=t.value.sku[d.value])==null?void 0:S.image)||t.value.image},null,8,["src"])]),e("div",pt,[e("div",ft,I(t.value.store_name),1),e("div",mt,"库存"+I(((R=t.value.sku[d.value])==null?void 0:R.stock)||0),1),e("div",ht,[P("¥"),e("span",null,I(((U=t.value.sku[d.value])==null?void 0:U.price)||t.value.price),1)])])])):q("",!0),e("div",gt,[yt,e("div",kt,[_(O,{wrap:"",size:20},{default:V(()=>[(m(!0),w(B,null,j(t.value.attr,(M,D)=>(m(),w("div",{class:N(["sku-item",{"sku-item_active":d.value==M}]),onClick:Z=>c(M),key:D},I(M||"默认规格"),11,$t))),128))]),_:1})])])])),[[l,n.value]])]}),_:2},[h.value!="add"&&t.value.attr&&t.value.attr.length==1?void 0:{name:"footer",fn:V(()=>[e("div",bt,[_(a,{class:"ok-btn",type:"primary",onClick:b},{default:V(()=>[P(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},Ct=T(wt,[["__scopeId","data-v-29f08ea1"]]),Pt=["onClick","onMousemove"],It=["onMousemove"],Vt={class:"title"},At={class:"list"},Lt=["onClick"],St={__name:"classify",emits:["getStoreList"],setup(A,{emit:x}){const C=x,o=r([]),u=r(-1),t=r(-1),d=r(-1),n=r(!1);(()=>{ge(259).then(p=>{o.value=p.data,u.value=-1})})();const k=(p=-1,v=-1)=>{d.value=p,u.value=p,t.value=v,console.log(p,v),n.value=!0;let b="";p>=0&&v>=0?b=o.value[p].children[v].store_category_id:p>=0&&(b=o.value[p].store_category_id),C("getStoreList",{mer_cate_id:b},!0)};return(p,v)=>{const b=g("el-popover");return m(),w("div",{class:"classify",onMouseout:v[2]||(v[2]=c=>n.value?n.value=!1:n.value=!0)},[e("div",{class:N(["itemP",{"itemP-active":u.value==-1}]),onClick:v[0]||(v[0]=c=>k(-1))},I("全部"),2),(m(!0),w(B,null,j(o.value,(c,i)=>(m(),J(b,{placement:"left",width:"20rem",trigger:"click",key:i,visible:i==u.value&&d.value==i},{reference:V(()=>[e("div",{class:N(["itemP",{"itemP-active":i==u.value}]),onClick:$=>k(i),onMousemove:$=>d.value=i},I(c.cate_name),43,Pt)]),default:V(()=>[e("div",{class:"active-card",onMouseout:v[1]||(v[1]=$=>d.value=-1),onMousemove:$=>d.value=i},[e("div",Vt,I(c.cate_name),1),e("div",At,[(m(!0),w(B,null,j(c.children,($,E)=>(m(),w("div",{class:N({"list-active":E==t.value}),link:"",type:"primary",key:E,onClick:f=>k(i,E)},I($.cate_name),11,Lt))),128))])],40,It)]),_:2},1032,["visible"]))),128))],32)}}},Ft=T(St,[["__scopeId","data-v-4630842b"]]),xt={class:"my-card"},Ut={__name:"index",setup(A){const x=r(null),C=r(null),o=r(null),u=r(null),t=r([]),d=se(),n=fe(),h=r({page:1,limit:30}),k=(a={},s=!1)=>{h.value={staff_id:d.userInfo.service.service_id,sale_type:2,mer_type:1,...h.value,...a},s&&(t.value=[],h.value.page=1,p.value=!1),ye(h.value).then(l=>{var R,U;((U=(R=l.data)==null?void 0:R.list)==null?void 0:U.length)(Object.keys(M.sku).forEach(D=>{M.sku[D].wholesale_price&&(M.sku[D].price=M.sku[D].wholesale_price)}),M.attrValue.forEach(D=>{D.wholesale_price&&(D.price=D.wholesale_price)}),M.attr=Object.keys(M.sku),M));t.value=t.value.concat(S),a.bar_code&&t.value.length==1&&b(a.bar_code)&&(o.value.bar_code="",i(t.value[0],t.value[0].attr[0])),h.value.page++})},p=r(!1),v=a=>{p.value||k(a)};function b(a){return/^\d+$/.test(a)}const c=(a,s="")=>{let l={is_new:0,product_id:a.product_id,cart_num:1,product_attr_unique:a.sku[s]!==void 0?a.sku[s].unique:"",staff_id:d.userInfo.service.service_id,product_type:0,sale_type:2};de(l).then(S=>{C.value.getList()})},i=(a,s)=>{if(!a.attr||a.attr.length==0||a.attr.length==1)return c(a,a.attr[0]?a.attr[0]:"");if(s)return c(a,s);x.value.setForm(a,"add"),x.value.show(!0)},$=(a,s)=>{C.value.editItem(a,s)},E=a=>{x.value.setForm(a,"edit"),x.value.show(!0)},f=()=>{let a=C.value.list.map(l=>l.cart_id),s={takes:[],use_coupon:{},use_integral:!1,cart_id:a};C.value.discounts>0&&(s.deduction_price=C.value.discounts.toFixed(2),s.pay_type="micropay"),_e(s).then(l=>{u.value.setForm({data:l.data,cart_id:a})})},y=()=>{f(),u.value.drawer=!0},L=()=>{C.value.getList()},O=()=>{n.name=="saleHome"&&(!u.value.drawer&&C.value.list.length>0?y():u.value.beforeClose())};return G(()=>{k(),h.value.page++,F.on("F9",O)}),K(()=>{F.off("F9",O)}),(a,s)=>(m(),w("div",xt,[_(Je,{ref_key:"orderRef",ref:C,onGoPay:y,onEditPupop:E},null,512),_(te),_(rt,{ref_key:"shopRef",ref:o,style:{flex:"1"},storeList:t.value,onGetStoreList:k,onChangeItem:i,onLoadMore:v},null,8,["storeList"]),_(Ct,{ref_key:"pupopRef",ref:x,onChangeItem:i,onEditItem:$},null,512),_(te),_(Ft,{ref:"classifyRef",onGetStoreList:k},null,512),_(ke,{ref_key:"payRef",ref:u,onPaySuccess:L},null,512)]))}};export{Ut as default}; diff --git a/src/views/convert/component/order.vue b/src/views/convert/component/order.vue index 4695900..df6c580 100644 --- a/src/views/convert/component/order.vue +++ b/src/views/convert/component/order.vue @@ -112,8 +112,8 @@ defineExpose({
diff --git a/src/views/home/component/shop.vue b/src/views/home/component/shop.vue index 7a0fc1f..3050ae5 100644 --- a/src/views/home/component/shop.vue +++ b/src/views/home/component/shop.vue @@ -89,8 +89,8 @@ onUnmounted(() => {
diff --git a/src/views/order/component/detail.vue b/src/views/order/component/detail.vue index 740a19f..598e28f 100644 --- a/src/views/order/component/detail.vue +++ b/src/views/order/component/detail.vue @@ -135,8 +135,8 @@ onUnmounted(() => { class="table" v-loading="loading" v-infinite-scroll="getOrderList" - infinite-scroll-distance="300" - infinite-scroll-delay="300" + :infinite-scroll-distance="300" + :infinite-scroll-delay="300" style="overflow: auto" v-if="formData?.id" :infinite-scroll-immediate="false" diff --git a/src/views/order/component/order.vue b/src/views/order/component/order.vue index 19211db..acf8c1a 100644 --- a/src/views/order/component/order.vue +++ b/src/views/order/component/order.vue @@ -180,8 +180,8 @@ onUnmounted(()=>{ class="order-lists" v-loading="loading" v-infinite-scroll="getOrderList" - infinite-scroll-distance="300" - infinite-scroll-delay="500" + :infinite-scroll-distance="300" + :infinite-scroll-delay="500" style="overflow: auto" >
{ class="table" v-loading="loading" v-infinite-scroll="getOrderList" - infinite-scroll-distance="300" - infinite-scroll-delay="300" + :infinite-scroll-distance="300" + :infinite-scroll-delay="300" style="overflow: auto" :infinite-scroll-immediate="false" > diff --git a/src/views/purchaseOrder/component/order.vue b/src/views/purchaseOrder/component/order.vue index b6722e7..fad13f2 100644 --- a/src/views/purchaseOrder/component/order.vue +++ b/src/views/purchaseOrder/component/order.vue @@ -162,8 +162,8 @@ onUnmounted(()=>{ class="order-lists" v-loading="loading" v-infinite-scroll="getOrderList" - infinite-scroll-distance="300" - infinite-scroll-delay="500" + :infinite-scroll-distance="300" + :infinite-scroll-delay="500" style="overflow: auto" >
diff --git a/src/views/saleHome/component/shop.vue b/src/views/saleHome/component/shop.vue index 9a422f5..e46fe39 100644 --- a/src/views/saleHome/component/shop.vue +++ b/src/views/saleHome/component/shop.vue @@ -89,8 +89,8 @@ onUnmounted(() => {
diff --git a/src/views/saleOrder/component/detail.vue b/src/views/saleOrder/component/detail.vue index fd5daef..a748704 100644 --- a/src/views/saleOrder/component/detail.vue +++ b/src/views/saleOrder/component/detail.vue @@ -130,8 +130,8 @@ onUnmounted(() => { class="table" v-loading="loading" v-infinite-scroll="getOrderList" - infinite-scroll-distance="300" - infinite-scroll-delay="300" + :infinite-scroll-distance="300" + :infinite-scroll-delay="300" style="overflow: auto" :infinite-scroll-immediate="false" > diff --git a/src/views/saleOrder/component/order.vue b/src/views/saleOrder/component/order.vue index 19480a7..0cc59b4 100644 --- a/src/views/saleOrder/component/order.vue +++ b/src/views/saleOrder/component/order.vue @@ -155,8 +155,8 @@ onUnmounted(()=>{ class="order-lists" v-loading="loading" v-infinite-scroll="getOrderList" - infinite-scroll-distance="300" - infinite-scroll-delay="500" + :infinite-scroll-distance="300" + :infinite-scroll-delay="500" style="overflow: auto" >
import { onMounted, onUnmounted, ref } from "vue"; -import { amountTakingListsApi, financialRecordListsApi } from "@/api/merchant.js"; +import { + amountTakingListsApi, + financialRecordListsApi, +} from "@/api/merchant.js"; import { ElMessage } from "element-plus"; import mitt from "@/utils/mitt.js"; import moment from "moment"; @@ -11,7 +14,7 @@ const where = ref({ loadend: false, loading: false, create_time: "", - start_time: "" + start_time: "", }); const changeDate = () => { where.value.page_no = 1; @@ -24,7 +27,7 @@ const changeDate = () => { const listType = ref(1); const goods_list = ref([]); const getOrderList = () => { - console.log("触底", !where.value.loadend , !where.value.loading); + console.log("触底", !where.value.loadend, !where.value.loading); if (!where.value.loadend && !where.value.loading) { console.log("加载"); where.value.loading = true; @@ -40,12 +43,22 @@ const getOrderList = () => { where.value.loading = false; where.value.page_no++; }); - if (listType.value == 2) + if (listType.value == 2) { + if(where.value.start_time[0] >= where.value.start_time[1]) { + where.value.loading = false; + return ElMessage.error('开始时间不能大于等于结束时间'); + } + let start_time = where.value.start_time[0] + ? moment(where.value.start_time[0]).format("YYYY-MM-DD") + : ""; + let end_time = where.value.start_time[1] + ? moment(where.value.start_time[1]).format("YYYY-MM-DD") + : ""; financialRecordListsApi({ page_no: where.value.page_no, page_size: where.value.page_size, - start_time: moment(where.value.start_time || new Date()).format('YYYY-MM-DD'), - // end_time: moment('2024-05-16').format('YYYY-MM-DD'), + start_time: start_time, + end_time: end_time, }).then((res) => { goods_list.value = [...goods_list.value, ...res.data.lists]; if (res.data.lists.length < where.value.page_size) @@ -53,6 +66,7 @@ const getOrderList = () => { where.value.loading = false; where.value.page_no++; }); + } } }; getOrderList(); @@ -85,16 +99,16 @@ onUnmounted(() => {
{ class="table" v-loading="where.loading" v-infinite-scroll="getOrderList" - infinite-scroll-distance="300" - infinite-scroll-delay="300" + ::infinite-scroll-delay="500" + :infinite-scroll-distance="300" style="overflow: auto" :infinite-scroll-immediate="false" - v-if="listType==1" + v-if="listType == 1" > { class="table" v-loading="where.loading" v-infinite-scroll="getOrderList" - infinite-scroll-distance="500" - infinite-scroll-delay="500" + ::infinite-scroll-delay="500" + :infinite-scroll-distance="300" style="overflow: auto" :infinite-scroll-immediate="false" - v-if="listType==2" + v-if="listType == 2" > - - + +
-
diff --git a/src/views/wallet/component/order.vue b/src/views/wallet/component/order.vue index 77c81ea..3b7566d 100644 --- a/src/views/wallet/component/order.vue +++ b/src/views/wallet/component/order.vue @@ -80,8 +80,8 @@ const submit = ()=>{