From 9ef82da4bda43bb345094185f23f7411a0e3a8e1 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Wed, 17 Apr 2024 15:22:53 +0800 Subject: [PATCH] 1 --- dist/assets/{detail-RFFCHX7F.js => detail-v5kbvKzr.js} | 2 +- dist/assets/{index-x9vBVpAd.js => index-5epx37BL.js} | 2 +- dist/assets/{index-DRBBEO3s.js => index-BLjHE6Rj.js} | 2 +- dist/assets/{index-CR9FqBWJ.js => index-C8N4ffo0.js} | 2 +- dist/assets/{index-BVCrvs59.js => index-CYsZgCwo.js} | 2 +- dist/assets/{index-Dd0QzaAA.js => index-CeB6n1Pj.js} | 2 +- dist/assets/index-DC-gKzEm.js | 1 + dist/assets/{index-CEZ1QYTt.js => index-DCKl20sY.js} | 4 ++-- dist/assets/index-DNTUc2C9.js | 1 - dist/assets/{index-BtVtGQsy.js => index-DSZ_WMrL.js} | 2 +- dist/assets/{index-DInWDOK8.js => index-RAiQ8ZiL.js} | 2 +- .../assets/{indexCount-Tj_lyoEF.js => indexCount-DTZECtBi.js} | 2 +- dist/assets/{indexList-Bbfw8qYS.js => indexList-B7wC4WB5.js} | 2 +- dist/assets/indexSystem-BRT8g_VH.js | 1 - dist/assets/indexSystem-RkjNE_Xi.js | 1 + dist/assets/{lodash-BH6ba4wg.js => lodash-sOK8yL6t.js} | 2 +- dist/assets/{padding-IWJ9EQ5v.js => padding-CiGjC__s.js} | 2 +- dist/assets/{pay-DjmOAiUp.js => pay-T7Krcb2W.js} | 2 +- ...e_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js} | 2 +- dist/assets/{shop-Co_PTsDS.js => shop-CAkzXRhR.js} | 2 +- dist/index.html | 2 +- 21 files changed, 20 insertions(+), 20 deletions(-) rename dist/assets/{detail-RFFCHX7F.js => detail-v5kbvKzr.js} (97%) rename dist/assets/{index-x9vBVpAd.js => index-5epx37BL.js} (97%) rename dist/assets/{index-DRBBEO3s.js => index-BLjHE6Rj.js} (97%) rename dist/assets/{index-CR9FqBWJ.js => index-C8N4ffo0.js} (98%) rename dist/assets/{index-BVCrvs59.js => index-CYsZgCwo.js} (96%) rename dist/assets/{index-Dd0QzaAA.js => index-CeB6n1Pj.js} (97%) create mode 100644 dist/assets/index-DC-gKzEm.js rename dist/assets/{index-CEZ1QYTt.js => index-DCKl20sY.js} (99%) delete mode 100644 dist/assets/index-DNTUc2C9.js rename dist/assets/{index-BtVtGQsy.js => index-DSZ_WMrL.js} (84%) rename dist/assets/{index-DInWDOK8.js => index-RAiQ8ZiL.js} (97%) rename dist/assets/{indexCount-Tj_lyoEF.js => indexCount-DTZECtBi.js} (95%) rename dist/assets/{indexList-Bbfw8qYS.js => indexList-B7wC4WB5.js} (96%) delete mode 100644 dist/assets/indexSystem-BRT8g_VH.js create mode 100644 dist/assets/indexSystem-RkjNE_Xi.js rename dist/assets/{lodash-BH6ba4wg.js => lodash-sOK8yL6t.js} (99%) rename dist/assets/{padding-IWJ9EQ5v.js => padding-CiGjC__s.js} (65%) rename dist/assets/{pay-DjmOAiUp.js => pay-T7Krcb2W.js} (97%) rename dist/assets/{pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js => pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js} (93%) rename dist/assets/{shop-Co_PTsDS.js => shop-CAkzXRhR.js} (91%) diff --git a/dist/assets/detail-RFFCHX7F.js b/dist/assets/detail-v5kbvKzr.js similarity index 97% rename from dist/assets/detail-RFFCHX7F.js rename to dist/assets/detail-v5kbvKzr.js index 71f165b..277331b 100644 --- a/dist/assets/detail-RFFCHX7F.js +++ b/dist/assets/detail-v5kbvKzr.js @@ -1 +1 @@ -import{_ as q,u as H,r,o as Q,m as D,b as h,j as F,c as t,h as s,e,t as d,f as c,w as u,g as f,k as W,q as G,F as j,i as K,p as B,d as O,s as n,A as X,E as Y,v as Z,x as ee}from"./index-CEZ1QYTt.js";import{e as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import{p as ae}from"./pay-DjmOAiUp.js";const ie={class:"my-order"},le={class:"header-nav"},ne={class:"nav-item"},de={class:"nav-item-btn"},ce={class:"header-input"},re={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},_e=["onClick"],ue={class:"top"},ve={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},me={key:0,class:"shop-name"},he={class:"right"},ye={class:"money"},ge={class:"count"},ke={class:"bottom"},$e={class:"pay"},be={key:0},Ce={key:0},Ve={key:1},Se={key:2},we={key:3},Pe={key:4},Le={key:5},Ie={key:6},Ae={key:1,style:{color:"#ff4a00"}},De={key:0,class:"cashier"},xe={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(C){const x=H(),U=C;r([]);const o=r(1),I=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],$(!0)};r(null);const A=r(""),g=()=>{v.value.date=A.value.join("-"),$(!0)},v=r({page:1,limit:20,search_info:"",date:"",staff_id:0}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),$=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;U.isSystem||(v.value.staff_id=x.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(x.userInfo.service.mer_id,v.value).then(l=>{i?k.value=l.data.list:k.value=[...k.value,...l.data.list],l.data.list.length{S.value=!0,y.value=!1})},_=(i,l)=>{L.value=l,D.emit("set-order-detail",i)};return Q(()=>{D.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),z=h("el-radio-group"),b=h("el-date-picker"),E=h("el-button"),M=h("el-input"),p=h("el-image"),P=F("loading"),T=F("infinite-scroll");return t(),s("div",ie,[e("div",le,[e("div",ne,d(C.isSystem?"平台订单":"收银订单"),1),e("div",de,[c(z,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),onChange:I,size:"small"},{default:u(()=>[c(w,{value:1},{default:u(()=>[f("全部")]),_:1}),c(w,{value:2},{default:u(()=>[f("未支付")]),_:1})]),_:1},8,["modelValue"]),c(b,{modelValue:A.value,"onUpdate:modelValue":l[1]||(l[1]=a=>A.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:g,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ce,[c(M,{modelValue:v.value.search_info,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>$(!0),["enter"])),onClear:l[5]||(l[5]=a=>$(!0)),clearable:""},{append:u(()=>[c(E,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:l[2]||(l[2]=a=>$(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",re,[(t(!0),s(j,null,K(k.value,(a,N)=>(t(),s("div",{class:B(["item",{"item-active":L.value==N}]),key:N,onClick:R=>_(a,N)},[e("div",ue,[e("div",{class:B(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+d(a.order_sn),3),e("div",ve,d(a.create_time),1)]),e("div",pe,[a.orderProduct?(t(),s("div",fe,[(t(!0),s(j,null,K(a.orderProduct.slice(0,5),(R,J)=>(t(),O(p,{key:J,src:R.cart_info.productAttr.image||R.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",me,d(a.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",he,[e("div",ye,"¥"+d(a.pay_price),1),e("div",ge,"共"+d(a.total_num)+"件商品",1)])]),e("div",ke,[e("div",$e,[a.paid?(t(),s("div",be,[f(" 已支付 "),a.pay_type==13?(t(),s("span",Ce,"(支付宝收款)")):n("",!0),a.pay_type==12?(t(),s("span",Ve,"(现金支付)")):n("",!0),a.pay_type==11?(t(),s("span",Se,"(微信收款)")):n("",!0),a.pay_type==0?(t(),s("span",we,"(余额支付)")):n("",!0),a.pay_type==1?(t(),s("span",Pe,"(微信支付)")):n("",!0),a.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Ie,"(对公转账)")):n("",!0)])):(t(),s("div",Ae,"未支付"))]),a.service_info?(t(),s("div",De," 收银员: "+d(a.service_info.nickname),1)):(t(),s("div",xe,"平台订单"))])],10,_e))),128)),S.value?(t(),s("div",Be,"没有更多了")):n("",!0),y.value?(t(),s("div",Ue,"加载中...")):n("",!0)])),[[P,y.value],[T,$]])])}}},Tt=q(ze,[["__scopeId","data-v-de2f4dca"]]),m=C=>(Z("data-v-b4c5a30d"),C=C(),ee(),C),Ee={class:"my-order"},Me={class:"header-nav"},Ne=["onClick"],Re={class:"detail"},Ye={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},je={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Oe={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},qe=m(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},Ge={class:"info-item"},Je=m(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=m(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=m(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=m(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=m(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),dt={class:"info-item-info"},ct={class:"info-item"},rt=m(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),_t={class:"info-item-info"},ut={class:"info-item"},vt=m(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),pt={class:"info-item-info"},ft={key:0},mt={key:1},ht={key:2},yt={key:3},gt={key:4},kt={key:5},$t={key:6},bt={key:0,class:"table-title"},Ct={key:1,class:"table-info",style:{"flex-direction":"column"}},Vt={class:"info-item"},St=m(()=>e("div",{class:"info-item-title"},"头像:",-1)),wt={class:"info-item-info"},Pt={class:"info-item"},Lt=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),It={class:"info-item-info"},At={class:"info-item"},Dt=m(()=>e("div",{class:"info-item-title"},"账号:",-1)),xt={class:"info-item-info"},Bt={key:2,class:"footer"},Ut={class:"info"},zt={class:"ser"},Et={class:"price"},Mt={key:0,class:"handle"},Nt={key:1,class:"handle"},Rt=m(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Yt={class:"dialog-footer"},Ft={__name:"detail",setup(C){const x=H(),U=X(),o=r({});D.on("set-order-detail",_=>{o.value=_}),r([]);const I=r(null),A=r(!1);r(0);const g=r(0),v=r(["商品信息","订单详情"]),y=r(""),V=r(!1),L=_=>{y.value=_,V.value=!0},S=()=>{V.value=!1,se({order_sn:y.value,staff_id:x.userInfo.service.service_id}).then(_=>{Y({message:_.message,type:"success"}),U.push({name:"home"})})},k=_=>{I.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),I.value.drawer=!0},$=_=>{oe({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?(Y({message:i.message,type:"success"}),D.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"),z=h("el-table"),b=h("el-button"),E=h("el-dialog"),M=F("loading");return t(),s("div",Ee,[e("div",Me,[(t(!0),s(j,null,K(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},d(p),11,Ne))),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",Re,[o.value.orderProduct&&g.value==0?(t(),s("div",Ye,[e("div",Fe,[f(" 共计 "),e("span",je,d(o.value.total_num),1),f(" 件商品 ")]),c(z,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[c(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:p})=>[e("div",Ke,[c(l,{style:{height:"3rem",width:"3rem"},src:p.cart_info.productAttr.image||p.cart_info.product.image},null,8,["src"]),e("span",Oe,d(p.cart_info.product.store_name),1)])]),_:1}),c(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(w,{prop:"product_num",label:"数量",width:"150"}),c(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&g.value==1?(t(),s("div",Te,[qe,e("div",He,[e("div",Ge,[Je,e("div",Qe,d(o.value.create_time),1)]),e("div",We,[Xe,e("div",Ze,d(o.value.total_num),1)]),e("div",et,[tt,e("div",st,"¥"+d(o.value.total_price),1)]),e("div",ot,[at,e("div",it,d(o.value.pay_time),1)]),e("div",lt,[nt,e("div",dt,"¥"+d(o.value.deduction_price),1)]),e("div",ct,[rt,e("div",_t,"¥"+d(o.value.pay_price),1)]),e("div",ut,[vt,e("div",pt,[o.value.pay_type==11?(t(),s("span",ft,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",mt,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",ht,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",yt,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",gt,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",kt,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",$t,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",bt,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",Ct,[e("div",Vt,[St,e("div",wt,[c(l,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Pt,[Lt,e("div",It,d(o.value.service_info.nickname),1)]),e("div",At,[Dt,e("div",xt,d(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),o.value.service_info?(t(),s("div",Bt,[e("div",Ut,[e("div",zt,"收银员: "+d(o.value.service_info.nickname),1),e("div",Et,[f(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",Nt,"已支付")):(t(),s("div",Mt,[c(b,{class:"btn",type:"primary",onClick:i[0]||(i[0]=p=>k(o.value))},{default:u(()=>[f("重新支付")]),_:1}),c(b,{class:"btn",type:"primary",onClick:i[1]||(i[1]=p=>$(o.value.order_sn))},{default:u(()=>[f("检测状态")]),_:1}),c(b,{class:"btn",type:"success",onClick:i[2]||(i[2]=p=>L(o.value.order_sn))},{default:u(()=>[f("提单")]),_:1})]))])):n("",!0)])),[[M,A.value]]),c(ae,{ref_key:"payRef",ref:I},null,512),c(E,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",Yt,[c(b,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),O(b,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),O(b,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Rt]),_:1},8,["modelValue"])])}}},qt=q(Ft,[["__scopeId","data-v-b4c5a30d"]]);export{qt as d,Tt as o}; +import{_ as q,u as H,r,o as Q,m as D,b as h,j as F,c as t,h as s,e,t as d,f as c,w as u,g as f,k as W,q as G,F as j,i as K,p as B,d as O,s as n,A as X,E as Y,v as Z,x as ee}from"./index-DCKl20sY.js";import{e as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js";import{p as ae}from"./pay-T7Krcb2W.js";const ie={class:"my-order"},le={class:"header-nav"},ne={class:"nav-item"},de={class:"nav-item-btn"},ce={class:"header-input"},re={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},_e=["onClick"],ue={class:"top"},ve={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},me={key:0,class:"shop-name"},he={class:"right"},ye={class:"money"},ge={class:"count"},ke={class:"bottom"},$e={class:"pay"},be={key:0},Ce={key:0},Ve={key:1},Se={key:2},we={key:3},Pe={key:4},Le={key:5},Ie={key:6},Ae={key:1,style:{color:"#ff4a00"}},De={key:0,class:"cashier"},xe={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(C){const x=H(),U=C;r([]);const o=r(1),I=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],$(!0)};r(null);const A=r(""),g=()=>{v.value.date=A.value.join("-"),$(!0)},v=r({page:1,limit:20,search_info:"",date:"",staff_id:0}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),$=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;U.isSystem||(v.value.staff_id=x.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(x.userInfo.service.mer_id,v.value).then(l=>{i?k.value=l.data.list:k.value=[...k.value,...l.data.list],l.data.list.length{S.value=!0,y.value=!1})},_=(i,l)=>{L.value=l,D.emit("set-order-detail",i)};return Q(()=>{D.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),z=h("el-radio-group"),b=h("el-date-picker"),E=h("el-button"),M=h("el-input"),p=h("el-image"),P=F("loading"),T=F("infinite-scroll");return t(),s("div",ie,[e("div",le,[e("div",ne,d(C.isSystem?"平台订单":"收银订单"),1),e("div",de,[c(z,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),onChange:I,size:"small"},{default:u(()=>[c(w,{value:1},{default:u(()=>[f("全部")]),_:1}),c(w,{value:2},{default:u(()=>[f("未支付")]),_:1})]),_:1},8,["modelValue"]),c(b,{modelValue:A.value,"onUpdate:modelValue":l[1]||(l[1]=a=>A.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:g,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ce,[c(M,{modelValue:v.value.search_info,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>$(!0),["enter"])),onClear:l[5]||(l[5]=a=>$(!0)),clearable:""},{append:u(()=>[c(E,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:l[2]||(l[2]=a=>$(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",re,[(t(!0),s(j,null,K(k.value,(a,N)=>(t(),s("div",{class:B(["item",{"item-active":L.value==N}]),key:N,onClick:R=>_(a,N)},[e("div",ue,[e("div",{class:B(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+d(a.order_sn),3),e("div",ve,d(a.create_time),1)]),e("div",pe,[a.orderProduct?(t(),s("div",fe,[(t(!0),s(j,null,K(a.orderProduct.slice(0,5),(R,J)=>(t(),O(p,{key:J,src:R.cart_info.productAttr.image||R.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",me,d(a.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",he,[e("div",ye,"¥"+d(a.pay_price),1),e("div",ge,"共"+d(a.total_num)+"件商品",1)])]),e("div",ke,[e("div",$e,[a.paid?(t(),s("div",be,[f(" 已支付 "),a.pay_type==13?(t(),s("span",Ce,"(支付宝收款)")):n("",!0),a.pay_type==12?(t(),s("span",Ve,"(现金支付)")):n("",!0),a.pay_type==11?(t(),s("span",Se,"(微信收款)")):n("",!0),a.pay_type==0?(t(),s("span",we,"(余额支付)")):n("",!0),a.pay_type==1?(t(),s("span",Pe,"(微信支付)")):n("",!0),a.pay_type==9?(t(),s("span",Le,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Ie,"(对公转账)")):n("",!0)])):(t(),s("div",Ae,"未支付"))]),a.service_info?(t(),s("div",De," 收银员: "+d(a.service_info.nickname),1)):(t(),s("div",xe,"平台订单"))])],10,_e))),128)),S.value?(t(),s("div",Be,"没有更多了")):n("",!0),y.value?(t(),s("div",Ue,"加载中...")):n("",!0)])),[[P,y.value],[T,$]])])}}},Tt=q(ze,[["__scopeId","data-v-de2f4dca"]]),m=C=>(Z("data-v-b4c5a30d"),C=C(),ee(),C),Ee={class:"my-order"},Me={class:"header-nav"},Ne=["onClick"],Re={class:"detail"},Ye={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},je={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Oe={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},qe=m(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},Ge={class:"info-item"},Je=m(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=m(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=m(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=m(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=m(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),dt={class:"info-item-info"},ct={class:"info-item"},rt=m(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),_t={class:"info-item-info"},ut={class:"info-item"},vt=m(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),pt={class:"info-item-info"},ft={key:0},mt={key:1},ht={key:2},yt={key:3},gt={key:4},kt={key:5},$t={key:6},bt={key:0,class:"table-title"},Ct={key:1,class:"table-info",style:{"flex-direction":"column"}},Vt={class:"info-item"},St=m(()=>e("div",{class:"info-item-title"},"头像:",-1)),wt={class:"info-item-info"},Pt={class:"info-item"},Lt=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),It={class:"info-item-info"},At={class:"info-item"},Dt=m(()=>e("div",{class:"info-item-title"},"账号:",-1)),xt={class:"info-item-info"},Bt={key:2,class:"footer"},Ut={class:"info"},zt={class:"ser"},Et={class:"price"},Mt={key:0,class:"handle"},Nt={key:1,class:"handle"},Rt=m(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Yt={class:"dialog-footer"},Ft={__name:"detail",setup(C){const x=H(),U=X(),o=r({});D.on("set-order-detail",_=>{o.value=_}),r([]);const I=r(null),A=r(!1);r(0);const g=r(0),v=r(["商品信息","订单详情"]),y=r(""),V=r(!1),L=_=>{y.value=_,V.value=!0},S=()=>{V.value=!1,se({order_sn:y.value,staff_id:x.userInfo.service.service_id}).then(_=>{Y({message:_.message,type:"success"}),U.push({name:"home"})})},k=_=>{I.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),I.value.drawer=!0},$=_=>{oe({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?(Y({message:i.message,type:"success"}),D.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"),z=h("el-table"),b=h("el-button"),E=h("el-dialog"),M=F("loading");return t(),s("div",Ee,[e("div",Me,[(t(!0),s(j,null,K(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},d(p),11,Ne))),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",Re,[o.value.orderProduct&&g.value==0?(t(),s("div",Ye,[e("div",Fe,[f(" 共计 "),e("span",je,d(o.value.total_num),1),f(" 件商品 ")]),c(z,{style:{height:"calc(100vh - 100px - 14rem)"},data:o.value.orderProduct},{default:u(()=>[c(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:p})=>[e("div",Ke,[c(l,{style:{height:"3rem",width:"3rem"},src:p.cart_info.productAttr.image||p.cart_info.product.image},null,8,["src"]),e("span",Oe,d(p.cart_info.product.store_name),1)])]),_:1}),c(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),c(w,{prop:"product_num",label:"数量",width:"150"}),c(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),o.value.orderProduct&&g.value==1?(t(),s("div",Te,[qe,e("div",He,[e("div",Ge,[Je,e("div",Qe,d(o.value.create_time),1)]),e("div",We,[Xe,e("div",Ze,d(o.value.total_num),1)]),e("div",et,[tt,e("div",st,"¥"+d(o.value.total_price),1)]),e("div",ot,[at,e("div",it,d(o.value.pay_time),1)]),e("div",lt,[nt,e("div",dt,"¥"+d(o.value.deduction_price),1)]),e("div",ct,[rt,e("div",_t,"¥"+d(o.value.pay_price),1)]),e("div",ut,[vt,e("div",pt,[o.value.pay_type==11?(t(),s("span",ft,"微信收款")):n("",!0),o.value.pay_type==12?(t(),s("span",mt,"现金支付")):n("",!0),o.value.pay_type==13?(t(),s("span",ht,"支付宝收款")):n("",!0),o.value.pay_type==0?(t(),s("span",yt,"余额支付")):n("",!0),o.value.pay_type==1?(t(),s("span",gt,"微信支付")):n("",!0),o.value.pay_type==9?(t(),s("span",kt,"商户余额支付")):n("",!0),o.value.pay_type==10?(t(),s("span",$t,"对公转账")):n("",!0)])])]),o.value.service_info?(t(),s("div",bt,"收银员信息")):n("",!0),o.value.service_info?(t(),s("div",Ct,[e("div",Vt,[St,e("div",wt,[c(l,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:o.value.service_info.avatar},null,8,["src"])])]),e("div",Pt,[Lt,e("div",It,d(o.value.service_info.nickname),1)]),e("div",At,[Dt,e("div",xt,d(o.value.service_info.account),1)])])):n("",!0)])):n("",!0),o.value.service_info?(t(),s("div",Bt,[e("div",Ut,[e("div",zt,"收银员: "+d(o.value.service_info.nickname),1),e("div",Et,[f(" 实付: "),e("span",null,"¥"+d(o.value.pay_price),1)])]),o.value.paid?(t(),s("div",Nt,"已支付")):(t(),s("div",Mt,[c(b,{class:"btn",type:"primary",onClick:i[0]||(i[0]=p=>k(o.value))},{default:u(()=>[f("重新支付")]),_:1}),c(b,{class:"btn",type:"primary",onClick:i[1]||(i[1]=p=>$(o.value.order_sn))},{default:u(()=>[f("检测状态")]),_:1}),c(b,{class:"btn",type:"success",onClick:i[2]||(i[2]=p=>L(o.value.order_sn))},{default:u(()=>[f("提单")]),_:1})]))])):n("",!0)])),[[M,A.value]]),c(ae,{ref_key:"payRef",ref:I},null,512),c(E,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",Yt,[c(b,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),O(b,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),O(b,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Rt]),_:1},8,["modelValue"])])}}},qt=q(Ft,[["__scopeId","data-v-b4c5a30d"]]);export{qt as d,Tt as o}; diff --git a/dist/assets/index-x9vBVpAd.js b/dist/assets/index-5epx37BL.js similarity index 97% rename from dist/assets/index-x9vBVpAd.js rename to dist/assets/index-5epx37BL.js index fed34c0..ba13623 100644 --- a/dist/assets/index-x9vBVpAd.js +++ b/dist/assets/index-5epx37BL.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 x,F as T,i as q,s as l,E as L,m as U,p as B,t as d,d as H,v as W,x as X,A as Y,n as j,o as Z,H as O,I as ee}from"./index-CEZ1QYTt.js";import{v as te,f as se,i as oe}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import{p as ie}from"./pay-DjmOAiUp.js";import{p as ae}from"./padding-IWJ9EQ5v.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},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 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})},z=(r,n)=>{h.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 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,q(b.value,(i,P)=>(t(),s("div",{class:B(["item",{"item-active":h.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",he,[i.orderProduct?(t(),s("div",me,[(t(!0),s(T,null,q(i.orderProduct.slice(0,5),(_,V)=>(t(),H(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",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)),m.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-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"},qe={style:{"font-size":"0.9rem"}},He={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"},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(),I=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r,j(()=>{var n;(n=A.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),z=()=>{C.value=!1,se({order_sn:b.value}).then(r=>{L({message:r.message,type:"success"}),I.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,q(m.value,(_,V)=>(t(),s("div",{key:V,class:B(["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:B(["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",qe,[$(" 共计 "),e("span",He,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",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,[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(),H(R,{key:0,onClick:r.goHome},{default:p(()=>[$(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),H(R,{key:1,type:"primary",onClick:z},{default:p(()=>[$(" 确认提单 ")]),_:1}))])]),default:p(()=>[Ft]),_:1},8,["modelValue"])])}}},qt=G(Tt,[["__scopeId","data-v-5d71f69a"]]),Ht={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",Ht,[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(qt,{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 x,F as T,i as q,s as l,E as L,m as U,p as B,t as d,d as H,v as W,x as X,A as Y,n as j,o as Z,H as O,I as ee}from"./index-DCKl20sY.js";import{v as te,f as se,i as oe}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js";import{p as ie}from"./pay-T7Krcb2W.js";import{p as ae}from"./padding-CiGjC__s.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},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 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})},z=(r,n)=>{h.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 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,q(b.value,(i,P)=>(t(),s("div",{class:B(["item",{"item-active":h.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",he,[i.orderProduct?(t(),s("div",me,[(t(!0),s(T,null,q(i.orderProduct.slice(0,5),(_,V)=>(t(),H(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",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)),m.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-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"},qe={style:{"font-size":"0.9rem"}},He={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"},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(),I=Y(),o=a({});U.on("set-order-detail",r=>{o.value=r,j(()=>{var n;(n=A.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),z=()=>{C.value=!1,se({order_sn:b.value}).then(r=>{L({message:r.message,type:"success"}),I.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,q(m.value,(_,V)=>(t(),s("div",{key:V,class:B(["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:B(["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",qe,[$(" 共计 "),e("span",He,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",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,[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(),H(R,{key:0,onClick:r.goHome},{default:p(()=>[$(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),H(R,{key:1,type:"primary",onClick:z},{default:p(()=>[$(" 确认提单 ")]),_:1}))])]),default:p(()=>[Ft]),_:1},8,["modelValue"])])}}},qt=G(Tt,[["__scopeId","data-v-5d71f69a"]]),Ht={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",Ht,[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(qt,{ref:"detailRef",onReInit:g},null,512),[[O,k.value==2]])]))}};export{es as default}; diff --git a/dist/assets/index-DRBBEO3s.js b/dist/assets/index-BLjHE6Rj.js similarity index 97% rename from dist/assets/index-DRBBEO3s.js rename to dist/assets/index-BLjHE6Rj.js index fa689f8..b673bd0 100644 --- a/dist/assets/index-DRBBEO3s.js +++ b/dist/assets/index-BLjHE6Rj.js @@ -1 +1 @@ -import{_ as q,u as H,r,o as Q,m as D,b as h,j as F,c as t,h as s,e,t as c,f as d,w as u,g as f,k as W,q as G,F as j,i as K,p as B,d as O,s as n,A as X,E as Y,v as Z,x as ee}from"./index-CEZ1QYTt.js";import{e as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import{p as ae}from"./pay-DjmOAiUp.js";import{p as ie}from"./padding-IWJ9EQ5v.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},xe={key:5},Ie={key:6},Ae={key:1,style:{color:"#ff4a00"}},De={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 x=H(),R=$;r([]);const o=r(1),I=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],b(!0)};r(null);const A=r(""),g=()=>{v.value.date=A.value.join("-"),b(!0)},v=r({page:1,limit:20,search_info:"",date:"",staff_id:0}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),b=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;R.isSystem||(v.value.staff_id=x.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(x.userInfo.service.mer_id,v.value).then(l=>{i?k.value=l.data.list:k.value=[...k.value,...l.data.list],l.data.list.length{S.value=!0,y.value=!1})},_=(i,l)=>{L.value=l,D.emit("set-order-detail",i)};return Q(()=>{D.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),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:I,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:A.value,"onUpdate:modelValue":l[1]||(l[1]=a=>A.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:g,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",re,[d(E,{modelValue:v.value.search_info,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>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 5px 5px 0"},onClick:l[2]||(l[2]=a=>b(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",_e,[(t(!0),s(j,null,K(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(j,null,K(a.orderProduct.slice(0,5),(N,J)=>(t(),O(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",xe,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Ie,"(对公转账)")):n("",!0)])):(t(),s("div",Ae,"未支付"))]),a.service_info?(t(),s("div",De," 收银员: "+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-95b48c3f"]]),m=$=>(Z("data-v-6ff318a4"),$=$(),ee(),$),Me={class:"my-order"},Ne={class:"header-nav"},Ye=["onClick"],Fe={class:"detail"},je={key:0,class:"table"},Ke={style:{"font-size":"0.9rem"}},Oe={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"},xt={class:"info-item"},It=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),At={class:"info-item-info"},Dt={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)),jt={class:"dialog-footer"},Kt={__name:"detail",setup($){const x=H(),R=X(),o=r({});D.on("set-order-detail",_=>{o.value=_}),r([]);const I=r(null),A=r(!1);r(0);const g=r(0),v=r(["商品信息","订单详情"]),y=r(""),V=r(!1),L=_=>{y.value=_,V.value=!0},S=()=>{V.value=!1,se({order_sn:y.value,staff_id:x.userInfo.service.service_id}).then(_=>{Y({message:_.message,type:"success"}),R.push({name:"home"})})},k=_=>{I.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),I.value.drawer=!0},b=_=>{oe({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?(Y({message:i.message,type:"success"}),D.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(j,null,K(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",je,[e("div",Ke,[f(" 共计 "),e("span",Oe,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",xt,[It,e("div",At,c(o.value.service_info.nickname),1)]),e("div",Dt,[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,A.value]]),d(ae,{ref_key:"payRef",ref:I},null,512),d(z,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",jt,[d(C,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),O(C,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),O(C,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Ft]),_:1},8,["modelValue"])])}}},Ot=q(Kt,[["__scopeId","data-v-6ff318a4"]]),Tt={class:"my-card"},Qt={__name:"index",setup($){return(x,R)=>(t(),s("div",Tt,[d(Ee,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(ie),d(Ot,{ref:"detailRef"},null,512)]))}};export{Qt as default}; +import{_ as q,u as H,r,o as Q,m as D,b as h,j as F,c as t,h as s,e,t as c,f as d,w as u,g as f,k as W,q as G,F as j,i as K,p as B,d as O,s as n,A as X,E as Y,v as Z,x as ee}from"./index-DCKl20sY.js";import{e as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js";import{p as ae}from"./pay-T7Krcb2W.js";import{p as ie}from"./padding-CiGjC__s.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},xe={key:5},Ie={key:6},Ae={key:1,style:{color:"#ff4a00"}},De={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 x=H(),R=$;r([]);const o=r(1),I=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],b(!0)};r(null);const A=r(""),g=()=>{v.value.date=A.value.join("-"),b(!0)},v=r({page:1,limit:20,search_info:"",date:"",staff_id:0}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),b=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;R.isSystem||(v.value.staff_id=x.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(x.userInfo.service.mer_id,v.value).then(l=>{i?k.value=l.data.list:k.value=[...k.value,...l.data.list],l.data.list.length{S.value=!0,y.value=!1})},_=(i,l)=>{L.value=l,D.emit("set-order-detail",i)};return Q(()=>{D.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),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:I,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:A.value,"onUpdate:modelValue":l[1]||(l[1]=a=>A.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:g,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",re,[d(E,{modelValue:v.value.search_info,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>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 5px 5px 0"},onClick:l[2]||(l[2]=a=>b(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",_e,[(t(!0),s(j,null,K(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(j,null,K(a.orderProduct.slice(0,5),(N,J)=>(t(),O(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",xe,"(商户余额支付)")):n("",!0),a.pay_type==10?(t(),s("span",Ie,"(对公转账)")):n("",!0)])):(t(),s("div",Ae,"未支付"))]),a.service_info?(t(),s("div",De," 收银员: "+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-95b48c3f"]]),m=$=>(Z("data-v-6ff318a4"),$=$(),ee(),$),Me={class:"my-order"},Ne={class:"header-nav"},Ye=["onClick"],Fe={class:"detail"},je={key:0,class:"table"},Ke={style:{"font-size":"0.9rem"}},Oe={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"},xt={class:"info-item"},It=m(()=>e("div",{class:"info-item-title"},"昵称:",-1)),At={class:"info-item-info"},Dt={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)),jt={class:"dialog-footer"},Kt={__name:"detail",setup($){const x=H(),R=X(),o=r({});D.on("set-order-detail",_=>{o.value=_}),r([]);const I=r(null),A=r(!1);r(0);const g=r(0),v=r(["商品信息","订单详情"]),y=r(""),V=r(!1),L=_=>{y.value=_,V.value=!0},S=()=>{V.value=!1,se({order_sn:y.value,staff_id:x.userInfo.service.service_id}).then(_=>{Y({message:_.message,type:"success"}),R.push({name:"home"})})},k=_=>{I.value.setRePay({price:_.pay_price,order_id:_.group_order_id}),I.value.drawer=!0},b=_=>{oe({order_sn:_}).then(i=>{i.data.paid==1||i.message=="支付成功"?(Y({message:i.message,type:"success"}),D.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(j,null,K(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",je,[e("div",Ke,[f(" 共计 "),e("span",Oe,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",xt,[It,e("div",At,c(o.value.service_info.nickname),1)]),e("div",Dt,[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,A.value]]),d(ae,{ref_key:"payRef",ref:I},null,512),d(z,{modelValue:V.value,"onUpdate:modelValue":i[4]||(i[4]=p=>V.value=p),title:"提示",width:"500"},{footer:u(()=>[e("div",jt,[d(C,{onClick:i[3]||(i[3]=p=>V.value=!1)},{default:u(()=>[f("取消")]),_:1}),_.cartCount>0?(t(),O(C,{key:0,onClick:_.goHome},{default:u(()=>[f(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),O(C,{key:1,type:"primary",onClick:S},{default:u(()=>[f(" 确认提单 ")]),_:1}))])]),default:u(()=>[Ft]),_:1},8,["modelValue"])])}}},Ot=q(Kt,[["__scopeId","data-v-6ff318a4"]]),Tt={class:"my-card"},Qt={__name:"index",setup($){return(x,R)=>(t(),s("div",Tt,[d(Ee,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(ie),d(Ot,{ref:"detailRef"},null,512)]))}};export{Qt as default}; diff --git a/dist/assets/index-CR9FqBWJ.js b/dist/assets/index-C8N4ffo0.js similarity index 98% rename from dist/assets/index-CR9FqBWJ.js rename to dist/assets/index-C8N4ffo0.js index 16775bf..2bc8318 100644 --- a/dist/assets/index-CR9FqBWJ.js +++ b/dist/assets/index-C8N4ffo0.js @@ -1 +1 @@ -import{_ as H,r as p,u as Q,b as i,c as f,d as L,w as a,h as S,t as W,e as j,f as l,l as K,D as M,g as k,E as g,j as te,q as le,k as ae,F as oe,i as ne,s as z}from"./index-CEZ1QYTt.js";import{p as re,c as ue,b as ie,d as de,e as se,s as ce,u as pe,f as _e}from"./shop-Co_PTsDS.js";const me={key:0},fe={key:1},ve={class:"dra-body"},ge=["src"],ye={__name:"add",emits:["reload"],setup(X,{expose:T,emit:A}){const d=p(!1),q={store_name:"",image:[],slider_image:[],attrValue:[{bar_code:"",price:"",stock:"",cost:"",ot_price:"",wholesale_price:"0",extension_one:"",extension_two:""}],content:{image:[]},unit_name:"",delivery_way:["1"]},n=p(q),U=Q(),D=A,_=p(!1),R=p(""),P=t=>{R.value=t.url,_.value=!0},N=p("add"),I=(t,e)=>{n.value=q,N.value=t,t=="add"?d.value=!0:t=="edit"&&(d.value=!0,v(e.product_id))},v=t=>{re(U.userInfo.service.mer_id,t).then(e=>{e.data.image=[{url:e.data.image,uid:e.data.image}],e.data.content.image=e.data.content.image.map(m=>({url:m,uid:e.data.image})),e.data.slider_image=e.data.slider_image.map(m=>({url:m,uid:e.data.image})),n.value=e.data,console.log(n.value)})},B=p([]);(()=>{ue(U.userInfo.service.mer_id).then(t=>{B.value=t.data})})();const E=p(null),O=()=>{var e,m,c,y,h,C;let t=JSON.parse(JSON.stringify(n.value));if(console.log(t.cate_id),t.cate_id&&typeof t.cate_id=="object"&&t.cate_id.length>0?t.cate_id=t.cate_id[t.cate_id.length-1]||"":t.cate_id=t.cate_id||"",t.image=="")return g.error("请上传商品封面图");if(t.slider_image.length==0)return g.error("请上传商品轮播图");if(t.content.image=t.content.image.map(r=>{var s,w,V,b;return(w=(s=r==null?void 0:r.response)==null?void 0:s.data)!=null&&w.path?(b=(V=r==null?void 0:r.response)==null?void 0:V.data)==null?void 0:b.path:r.url}),t.image=(c=(m=(e=t.image[0])==null?void 0:e.response)==null?void 0:m.data)!=null&&c.path?(C=(h=(y=t.image[0])==null?void 0:y.response)==null?void 0:h.data)==null?void 0:C.path:t.image[0].url,t.slider_image=t.slider_image.map(r=>{var s,w,V,b;return(w=(s=r==null?void 0:r.response)==null?void 0:s.data)!=null&&w.path?(b=(V=r==null?void 0:r.response)==null?void 0:V.data)==null?void 0:b.path:r.url}),t.store_name=="")return g.error("请输入商品名称");if(t.cate_id=="")return g.error("请选择平台分类");if(t.attrValue[0].bar_code=="")return g.error("请输入商品条码");if(t.attrValue[0].stock<=0)return g.error("请输入商品库存");if(t.attrValue[0].price<=0)return g.error("请输入商品价格");N.value=="add"?ie(U.userInfo.service.mer_id,t).then(r=>{g.success(r.message),D("reload",!0),$()}):de(U.userInfo.service.mer_id,t.product_id,t).then(r=>{g.success(r.message),D("reload",!0),$()})},J=()=>{$()},$=()=>{d.value=!1},F=()=>{};return T({drawer:d,show:I}),(t,e)=>{const m=i("el-input"),c=i("el-form-item"),y=i("el-cascader"),h=i("Plus"),C=i("el-icon"),r=i("el-upload"),s=i("el-form"),w=i("el-dialog"),V=i("el-button"),b=i("el-drawer");return f(),L(b,{size:800,modelValue:d.value,"onUpdate:modelValue":e[10]||(e[10]=u=>d.value=u),direction:"rtl",onOpen:F,"before-close":$},{header:a(()=>[N.value=="add"?(f(),S("h4",me,"添加商品")):(f(),S("h4",fe,"编辑商品 ["+W(n.value.product_id)+"]",1))]),default:a(()=>[j("div",ve,[l(s,{ref_key:"formRef",ref:E,model:n.value,"label-width":"150px"},{default:a(()=>[l(c,{label:"商品条码",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].bar_code,"onUpdate:modelValue":e[0]||(e[0]=u=>n.value.attrValue[0].bar_code=u),type:"number",placeholder:"请输入商品条码"},null,8,["modelValue"])]),_:1}),l(c,{label:"商品名称",required:""},{default:a(()=>[l(m,{modelValue:n.value.store_name,"onUpdate:modelValue":e[1]||(e[1]=u=>n.value.store_name=u),placeholder:"请输入商品名称"},null,8,["modelValue"])]),_:1}),l(c,{label:"平台分类",required:""},{default:a(()=>[l(y,{modelValue:n.value.cate_id,"onUpdate:modelValue":e[2]||(e[2]=u=>n.value.cate_id=u),class:"pageWidth",options:B.value,filterable:"",clearable:""},null,8,["modelValue","options"])]),_:1}),l(c,{label:"商品封面图",required:""},{default:a(()=>[l(r,{"file-list":n.value.image,"onUpdate:fileList":e[3]||(e[3]=u=>n.value.image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:1},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(c,{label:"商品轮播图",required:""},{default:a(()=>[l(r,{"file-list":n.value.slider_image,"onUpdate:fileList":e[4]||(e[4]=u=>n.value.slider_image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:9},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(c,{label:"商品详情"},{default:a(()=>[l(r,{"file-list":n.value.content.image,"onUpdate:fileList":e[5]||(e[5]=u=>n.value.content.image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:9},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(c,{label:"商品单位",required:""},{default:a(()=>[l(m,{modelValue:n.value.unit_name,"onUpdate:modelValue":e[6]||(e[6]=u=>n.value.unit_name=u),placeholder:"请输入商品单位"},null,8,["modelValue"])]),_:1}),l(c,{label:"零售价",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].price,"onUpdate:modelValue":e[7]||(e[7]=u=>n.value.attrValue[0].price=u),type:"number",placeholder:"请输入零售价"},null,8,["modelValue"])]),_:1}),l(c,{label:"库存",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].stock,"onUpdate:modelValue":e[8]||(e[8]=u=>n.value.attrValue[0].stock=u),type:"number",placeholder:"请输入库存"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),l(w,{modelValue:_.value,"onUpdate:modelValue":e[9]||(e[9]=u=>_.value=u)},{default:a(()=>[j("img",{style:{width:"100%",height:"100%"},"w-full":"",src:R.value,alt:"Preview Image"},null,8,ge)]),_:1},8,["modelValue"])]),footer:a(()=>[l(V,{onClick:J},{default:a(()=>[k("取消")]),_:1}),l(V,{type:"primary",onClick:O},{default:a(()=>[k("确认")]),_:1})]),_:1},8,["modelValue"])}}},we=H(ye,[["__scopeId","data-v-731b5090"]]),Ve={"element-loading-text":"加载中",class:"my-shop"},be={key:0,style:{color:"#ff4a00"}},ke={key:1},he={key:2},Ce={class:"dialog-footer"},xe={__name:"index",setup(X){const T=p([]),A=Q(),d=p({page:1,limit:15,type:1,keyword:"",staff_id:A.userInfo.service.service_id}),q=p(!1),n=p(0),U=p([]),D=()=>{se(A.userInfo.service.mer_id).then(t=>{U.value=t.data})};D();const _=(t=!1)=>{q.value=!0,D(),ce(A.userInfo.service.mer_id,d.value).then(e=>{T.value=e.data.list,n.value=e.data.count,q.value=!1})};_();const R=t=>{d.value.page=t,_()},P=t=>{d.value.page=t,_()},N=t=>{d.value.page=t,_()},I=p(!1),v=p({}),B=t=>{v.value=t,I.value=!0},G=()=>{let t={attr:v.value.attr||[],attrValue:v.value.attrValue,mer_cate_id:v.value.merCateId||[],spec_type:v.value.spec_type,is_stock:1};pe(v.value.product_id,t).then(e=>{g({message:e.message,type:"success"}),I.value=!1,_()}).catch(e=>{g({message:e,type:"error"})})},E=p("1"),O=t=>{d.value.type=t,d.value.page=1,_()},J=t=>{_e(A.userInfo.service.mer_id,t.product_id,{status:t.is_show?1:0}).then(e=>{g.success(e.message),_(!0)})},$=p(null),F=(t="add",e)=>{$.value.show(t,e)};return(t,e)=>{const m=i("el-input"),c=i("el-form-item"),y=i("el-button"),h=i("el-form"),C=i("el-menu-item"),r=i("el-menu"),s=i("el-table-column"),w=i("el-image"),V=i("el-switch"),b=i("el-table"),u=i("el-pagination"),Y=i("el-input-number"),Z=i("el-dialog"),ee=te("loading");return le((f(),S("div",Ve,[l(h,{inline:!0},{default:a(()=>[l(c,{label:"关键字:"},{default:a(()=>[l(m,{modelValue:d.value.keyword,"onUpdate:modelValue":e[0]||(e[0]=o=>d.value.keyword=o),placeholder:"请输入关键字搜索",style:{width:"20rem"},clearable:"",onClear:e[1]||(e[1]=o=>_(!0)),onKeydown:e[2]||(e[2]=ae(o=>_(!0),["enter"]))},null,8,["modelValue"])]),_:1}),l(c,null,{default:a(()=>[l(y,{type:"primary",onClick:e[3]||(e[3]=o=>_(!0))},{default:a(()=>[k("搜索")]),_:1})]),_:1}),l(c,null,{default:a(()=>[l(y,{type:"primary",onClick:e[4]||(e[4]=o=>F("add"))},{default:a(()=>[k("新增")]),_:1})]),_:1})]),_:1}),l(r,{"default-active":E.value,class:"el-menu-top",mode:"horizontal",onSelect:O},{default:a(()=>[(f(!0),S(oe,null,ne(U.value,(o,x)=>(f(),L(C,{index:o.type+"",key:x},{default:a(()=>[k(W(`${o.name}(${o.count})`),1)]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"]),l(b,{data:T.value,style:{width:"100%"}},{default:a(()=>[l(s,{prop:"product_id",label:"ID",width:"100"}),l(s,{prop:"image",label:"图片",width:"120"},{default:a(o=>[l(w,{loading:"lazy",style:{width:"60px",height:"60px"},src:o.row.image},null,8,["src"])]),_:1}),l(s,{prop:"store_name",label:"商品名称",width:"500"}),l(s,{prop:"price",label:"售价"}),l(s,{prop:"stock",label:"库存"}),d.value.type<=2?(f(),L(s,{key:0,label:"上/下架",width:"100"},{default:a(o=>[l(V,{modelValue:o.row.is_show,"onUpdate:modelValue":x=>o.row.is_show=x,"active-value":1,"inline-prompt":"","active-text":"上架","inactive-text":"下架",onClick:x=>J(o.row)},null,8,["modelValue","onUpdate:modelValue","onClick"])]),_:1})):z("",!0),d.value.type<=4?(f(),L(s,{key:1,label:"商品状态",width:"100"},{default:a(o=>[o.row.is_used?o.row.is_show?(f(),S("span",ke,"上架显示")):(f(),S("span",he,"下架")):(f(),S("span",be,"平台关闭"))]),_:1})):z("",!0),l(s,{label:"操作",width:"120"},{default:a(o=>[d.value.type!=5?(f(),L(y,{key:0,type:"primary",link:"",onClick:x=>B(o.row)},{default:a(()=>[k("修改库存")]),_:2},1032,["onClick"])):z("",!0),d.value.type!=1&&d.value.type!=5?(f(),L(y,{key:1,type:"primary",link:"",onClick:x=>F("edit",o.row)},{default:a(()=>[k("编辑")]),_:2},1032,["onClick"])):z("",!0)]),_:1})]),_:1},8,["data"]),l(u,{"page-size":d.value.limit,layout:"prev, pager, next",total:n.value,onPrevClick:R,onNextClick:P,onCurrentChange:N},null,8,["page-size","total"]),l(Z,{modelValue:I.value,"onUpdate:modelValue":e[6]||(e[6]=o=>I.value=o),title:"编辑商品库存",width:"800"},{footer:a(()=>[j("div",Ce,[l(y,{onClick:e[5]||(e[5]=o=>I.value=!1)},{default:a(()=>[k("取消")]),_:1}),l(y,{type:"primary",onClick:G},{default:a(()=>[k(" 确定 ")]),_:1})])]),default:a(()=>[v.value.attrValue?(f(),L(b,{key:0,data:v.value.attrValue,stripe:"",style:{width:"100%"}},{default:a(()=>[l(s,{prop:"image",label:"图片",width:"180"},{default:a(o=>[l(w,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:o.row.image||v.value.image},null,8,["src"])]),_:1}),l(s,{prop:"sku",label:"名称",width:"180"},{default:a(o=>[j("span",null,W(o.row.sku||v.value.store_name),1)]),_:1}),l(s,{prop:"price",label:"价格"}),l(s,{prop:"stock",label:"库存"},{default:a(o=>[l(Y,{modelValue:o.row.stock,"onUpdate:modelValue":x=>o.row.stock=x,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):z("",!0)]),_:1},8,["modelValue"]),l(we,{ref_key:"addRef",ref:$,onReload:_},null,512)])),[[ee,q.value]])}}},$e=H(xe,[["__scopeId","data-v-40712e2c"]]);export{$e as default}; +import{_ as H,r as p,u as Q,b as i,c as f,d as L,w as a,h as S,t as W,e as j,f as l,l as K,D as M,g as k,E as g,j as te,q as le,k as ae,F as oe,i as ne,s as z}from"./index-DCKl20sY.js";import{p as re,c as ue,b as ie,d as de,e as se,s as ce,u as pe,f as _e}from"./shop-CAkzXRhR.js";const me={key:0},fe={key:1},ve={class:"dra-body"},ge=["src"],ye={__name:"add",emits:["reload"],setup(X,{expose:T,emit:A}){const d=p(!1),q={store_name:"",image:[],slider_image:[],attrValue:[{bar_code:"",price:"",stock:"",cost:"",ot_price:"",wholesale_price:"0",extension_one:"",extension_two:""}],content:{image:[]},unit_name:"",delivery_way:["1"]},n=p(q),U=Q(),D=A,_=p(!1),R=p(""),P=t=>{R.value=t.url,_.value=!0},N=p("add"),I=(t,e)=>{n.value=q,N.value=t,t=="add"?d.value=!0:t=="edit"&&(d.value=!0,v(e.product_id))},v=t=>{re(U.userInfo.service.mer_id,t).then(e=>{e.data.image=[{url:e.data.image,uid:e.data.image}],e.data.content.image=e.data.content.image.map(m=>({url:m,uid:e.data.image})),e.data.slider_image=e.data.slider_image.map(m=>({url:m,uid:e.data.image})),n.value=e.data,console.log(n.value)})},B=p([]);(()=>{ue(U.userInfo.service.mer_id).then(t=>{B.value=t.data})})();const E=p(null),O=()=>{var e,m,c,y,h,C;let t=JSON.parse(JSON.stringify(n.value));if(console.log(t.cate_id),t.cate_id&&typeof t.cate_id=="object"&&t.cate_id.length>0?t.cate_id=t.cate_id[t.cate_id.length-1]||"":t.cate_id=t.cate_id||"",t.image=="")return g.error("请上传商品封面图");if(t.slider_image.length==0)return g.error("请上传商品轮播图");if(t.content.image=t.content.image.map(r=>{var s,w,V,b;return(w=(s=r==null?void 0:r.response)==null?void 0:s.data)!=null&&w.path?(b=(V=r==null?void 0:r.response)==null?void 0:V.data)==null?void 0:b.path:r.url}),t.image=(c=(m=(e=t.image[0])==null?void 0:e.response)==null?void 0:m.data)!=null&&c.path?(C=(h=(y=t.image[0])==null?void 0:y.response)==null?void 0:h.data)==null?void 0:C.path:t.image[0].url,t.slider_image=t.slider_image.map(r=>{var s,w,V,b;return(w=(s=r==null?void 0:r.response)==null?void 0:s.data)!=null&&w.path?(b=(V=r==null?void 0:r.response)==null?void 0:V.data)==null?void 0:b.path:r.url}),t.store_name=="")return g.error("请输入商品名称");if(t.cate_id=="")return g.error("请选择平台分类");if(t.attrValue[0].bar_code=="")return g.error("请输入商品条码");if(t.attrValue[0].stock<=0)return g.error("请输入商品库存");if(t.attrValue[0].price<=0)return g.error("请输入商品价格");N.value=="add"?ie(U.userInfo.service.mer_id,t).then(r=>{g.success(r.message),D("reload",!0),$()}):de(U.userInfo.service.mer_id,t.product_id,t).then(r=>{g.success(r.message),D("reload",!0),$()})},J=()=>{$()},$=()=>{d.value=!1},F=()=>{};return T({drawer:d,show:I}),(t,e)=>{const m=i("el-input"),c=i("el-form-item"),y=i("el-cascader"),h=i("Plus"),C=i("el-icon"),r=i("el-upload"),s=i("el-form"),w=i("el-dialog"),V=i("el-button"),b=i("el-drawer");return f(),L(b,{size:800,modelValue:d.value,"onUpdate:modelValue":e[10]||(e[10]=u=>d.value=u),direction:"rtl",onOpen:F,"before-close":$},{header:a(()=>[N.value=="add"?(f(),S("h4",me,"添加商品")):(f(),S("h4",fe,"编辑商品 ["+W(n.value.product_id)+"]",1))]),default:a(()=>[j("div",ve,[l(s,{ref_key:"formRef",ref:E,model:n.value,"label-width":"150px"},{default:a(()=>[l(c,{label:"商品条码",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].bar_code,"onUpdate:modelValue":e[0]||(e[0]=u=>n.value.attrValue[0].bar_code=u),type:"number",placeholder:"请输入商品条码"},null,8,["modelValue"])]),_:1}),l(c,{label:"商品名称",required:""},{default:a(()=>[l(m,{modelValue:n.value.store_name,"onUpdate:modelValue":e[1]||(e[1]=u=>n.value.store_name=u),placeholder:"请输入商品名称"},null,8,["modelValue"])]),_:1}),l(c,{label:"平台分类",required:""},{default:a(()=>[l(y,{modelValue:n.value.cate_id,"onUpdate:modelValue":e[2]||(e[2]=u=>n.value.cate_id=u),class:"pageWidth",options:B.value,filterable:"",clearable:""},null,8,["modelValue","options"])]),_:1}),l(c,{label:"商品封面图",required:""},{default:a(()=>[l(r,{"file-list":n.value.image,"onUpdate:fileList":e[3]||(e[3]=u=>n.value.image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:1},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(c,{label:"商品轮播图",required:""},{default:a(()=>[l(r,{"file-list":n.value.slider_image,"onUpdate:fileList":e[4]||(e[4]=u=>n.value.slider_image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:9},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(c,{label:"商品详情"},{default:a(()=>[l(r,{"file-list":n.value.content.image,"onUpdate:fileList":e[5]||(e[5]=u=>n.value.content.image=u),action:K(M).upload,name:"field","list-type":"picture-card","on-preview":P,limit:9},{default:a(()=>[l(C,null,{default:a(()=>[l(h)]),_:1})]),_:1},8,["file-list","action"])]),_:1}),l(c,{label:"商品单位",required:""},{default:a(()=>[l(m,{modelValue:n.value.unit_name,"onUpdate:modelValue":e[6]||(e[6]=u=>n.value.unit_name=u),placeholder:"请输入商品单位"},null,8,["modelValue"])]),_:1}),l(c,{label:"零售价",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].price,"onUpdate:modelValue":e[7]||(e[7]=u=>n.value.attrValue[0].price=u),type:"number",placeholder:"请输入零售价"},null,8,["modelValue"])]),_:1}),l(c,{label:"库存",required:""},{default:a(()=>[l(m,{modelValue:n.value.attrValue[0].stock,"onUpdate:modelValue":e[8]||(e[8]=u=>n.value.attrValue[0].stock=u),type:"number",placeholder:"请输入库存"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),l(w,{modelValue:_.value,"onUpdate:modelValue":e[9]||(e[9]=u=>_.value=u)},{default:a(()=>[j("img",{style:{width:"100%",height:"100%"},"w-full":"",src:R.value,alt:"Preview Image"},null,8,ge)]),_:1},8,["modelValue"])]),footer:a(()=>[l(V,{onClick:J},{default:a(()=>[k("取消")]),_:1}),l(V,{type:"primary",onClick:O},{default:a(()=>[k("确认")]),_:1})]),_:1},8,["modelValue"])}}},we=H(ye,[["__scopeId","data-v-731b5090"]]),Ve={"element-loading-text":"加载中",class:"my-shop"},be={key:0,style:{color:"#ff4a00"}},ke={key:1},he={key:2},Ce={class:"dialog-footer"},xe={__name:"index",setup(X){const T=p([]),A=Q(),d=p({page:1,limit:15,type:1,keyword:"",staff_id:A.userInfo.service.service_id}),q=p(!1),n=p(0),U=p([]),D=()=>{se(A.userInfo.service.mer_id).then(t=>{U.value=t.data})};D();const _=(t=!1)=>{q.value=!0,D(),ce(A.userInfo.service.mer_id,d.value).then(e=>{T.value=e.data.list,n.value=e.data.count,q.value=!1})};_();const R=t=>{d.value.page=t,_()},P=t=>{d.value.page=t,_()},N=t=>{d.value.page=t,_()},I=p(!1),v=p({}),B=t=>{v.value=t,I.value=!0},G=()=>{let t={attr:v.value.attr||[],attrValue:v.value.attrValue,mer_cate_id:v.value.merCateId||[],spec_type:v.value.spec_type,is_stock:1};pe(v.value.product_id,t).then(e=>{g({message:e.message,type:"success"}),I.value=!1,_()}).catch(e=>{g({message:e,type:"error"})})},E=p("1"),O=t=>{d.value.type=t,d.value.page=1,_()},J=t=>{_e(A.userInfo.service.mer_id,t.product_id,{status:t.is_show?1:0}).then(e=>{g.success(e.message),_(!0)})},$=p(null),F=(t="add",e)=>{$.value.show(t,e)};return(t,e)=>{const m=i("el-input"),c=i("el-form-item"),y=i("el-button"),h=i("el-form"),C=i("el-menu-item"),r=i("el-menu"),s=i("el-table-column"),w=i("el-image"),V=i("el-switch"),b=i("el-table"),u=i("el-pagination"),Y=i("el-input-number"),Z=i("el-dialog"),ee=te("loading");return le((f(),S("div",Ve,[l(h,{inline:!0},{default:a(()=>[l(c,{label:"关键字:"},{default:a(()=>[l(m,{modelValue:d.value.keyword,"onUpdate:modelValue":e[0]||(e[0]=o=>d.value.keyword=o),placeholder:"请输入关键字搜索",style:{width:"20rem"},clearable:"",onClear:e[1]||(e[1]=o=>_(!0)),onKeydown:e[2]||(e[2]=ae(o=>_(!0),["enter"]))},null,8,["modelValue"])]),_:1}),l(c,null,{default:a(()=>[l(y,{type:"primary",onClick:e[3]||(e[3]=o=>_(!0))},{default:a(()=>[k("搜索")]),_:1})]),_:1}),l(c,null,{default:a(()=>[l(y,{type:"primary",onClick:e[4]||(e[4]=o=>F("add"))},{default:a(()=>[k("新增")]),_:1})]),_:1})]),_:1}),l(r,{"default-active":E.value,class:"el-menu-top",mode:"horizontal",onSelect:O},{default:a(()=>[(f(!0),S(oe,null,ne(U.value,(o,x)=>(f(),L(C,{index:o.type+"",key:x},{default:a(()=>[k(W(`${o.name}(${o.count})`),1)]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"]),l(b,{data:T.value,style:{width:"100%"}},{default:a(()=>[l(s,{prop:"product_id",label:"ID",width:"100"}),l(s,{prop:"image",label:"图片",width:"120"},{default:a(o=>[l(w,{loading:"lazy",style:{width:"60px",height:"60px"},src:o.row.image},null,8,["src"])]),_:1}),l(s,{prop:"store_name",label:"商品名称",width:"500"}),l(s,{prop:"price",label:"售价"}),l(s,{prop:"stock",label:"库存"}),d.value.type<=2?(f(),L(s,{key:0,label:"上/下架",width:"100"},{default:a(o=>[l(V,{modelValue:o.row.is_show,"onUpdate:modelValue":x=>o.row.is_show=x,"active-value":1,"inline-prompt":"","active-text":"上架","inactive-text":"下架",onClick:x=>J(o.row)},null,8,["modelValue","onUpdate:modelValue","onClick"])]),_:1})):z("",!0),d.value.type<=4?(f(),L(s,{key:1,label:"商品状态",width:"100"},{default:a(o=>[o.row.is_used?o.row.is_show?(f(),S("span",ke,"上架显示")):(f(),S("span",he,"下架")):(f(),S("span",be,"平台关闭"))]),_:1})):z("",!0),l(s,{label:"操作",width:"120"},{default:a(o=>[d.value.type!=5?(f(),L(y,{key:0,type:"primary",link:"",onClick:x=>B(o.row)},{default:a(()=>[k("修改库存")]),_:2},1032,["onClick"])):z("",!0),d.value.type!=1&&d.value.type!=5?(f(),L(y,{key:1,type:"primary",link:"",onClick:x=>F("edit",o.row)},{default:a(()=>[k("编辑")]),_:2},1032,["onClick"])):z("",!0)]),_:1})]),_:1},8,["data"]),l(u,{"page-size":d.value.limit,layout:"prev, pager, next",total:n.value,onPrevClick:R,onNextClick:P,onCurrentChange:N},null,8,["page-size","total"]),l(Z,{modelValue:I.value,"onUpdate:modelValue":e[6]||(e[6]=o=>I.value=o),title:"编辑商品库存",width:"800"},{footer:a(()=>[j("div",Ce,[l(y,{onClick:e[5]||(e[5]=o=>I.value=!1)},{default:a(()=>[k("取消")]),_:1}),l(y,{type:"primary",onClick:G},{default:a(()=>[k(" 确定 ")]),_:1})])]),default:a(()=>[v.value.attrValue?(f(),L(b,{key:0,data:v.value.attrValue,stripe:"",style:{width:"100%"}},{default:a(()=>[l(s,{prop:"image",label:"图片",width:"180"},{default:a(o=>[l(w,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:o.row.image||v.value.image},null,8,["src"])]),_:1}),l(s,{prop:"sku",label:"名称",width:"180"},{default:a(o=>[j("span",null,W(o.row.sku||v.value.store_name),1)]),_:1}),l(s,{prop:"price",label:"价格"}),l(s,{prop:"stock",label:"库存"},{default:a(o=>[l(Y,{modelValue:o.row.stock,"onUpdate:modelValue":x=>o.row.stock=x,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):z("",!0)]),_:1},8,["modelValue"]),l(we,{ref_key:"addRef",ref:$,onReload:_},null,512)])),[[ee,q.value]])}}},$e=H(xe,[["__scopeId","data-v-40712e2c"]]);export{$e as default}; diff --git a/dist/assets/index-BVCrvs59.js b/dist/assets/index-CYsZgCwo.js similarity index 96% rename from dist/assets/index-BVCrvs59.js rename to dist/assets/index-CYsZgCwo.js index c88e1a2..4d1d7bc 100644 --- a/dist/assets/index-BVCrvs59.js +++ b/dist/assets/index-CYsZgCwo.js @@ -1 +1 @@ -import{_ as U,u as I,r as u,o as L,b as n,c as R,h as S,e as w,f as e,w as t,k as v,g as b,v as K,x as B,A as C,E as d,K as E,L as N}from"./index-CEZ1QYTt.js";const M=l=>(K("data-v-59a7e82c"),l=l(),B(),l),T={class:"body"},A={class:"login"},$=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),j={__name:"index",setup(l){const p=I(),y=C(),h=u(null),_=u(null),s=u({account:"",password:"",key:"",captchaVerification:"",code:""}),i=()=>{if(!s.value.account)return d({message:"请填写账号",type:"error"});if(!s.value.password)return d({message:"请填写密码",type:"error"});E(s.value).then(a=>{console.log(a),a.data&&(p.setToken(a.data.token),N().then(({data:o})=>{if(!o.service)return d({message:"请联系管理员开通服务",type:"error"});p.setUserInfo(o),y.push("/")}))}).catch(a=>{})};return L(()=>{}),(a,o)=>{const k=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),g=n("Lock"),x=n("el-button"),V=n("el-form");return R(),S("div",T,[w("div",A,[$,e(V,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(x,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},z=U(j,[["__scopeId","data-v-59a7e82c"]]);export{z as default}; +import{_ as U,u as I,r as u,o as L,b as n,c as R,h as S,e as w,f as e,w as t,k as v,g as b,v as K,x as B,A as C,E as d,K as E,L as N}from"./index-DCKl20sY.js";const M=l=>(K("data-v-59a7e82c"),l=l(),B(),l),T={class:"body"},A={class:"login"},$=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),j={__name:"index",setup(l){const p=I(),y=C(),h=u(null),_=u(null),s=u({account:"",password:"",key:"",captchaVerification:"",code:""}),i=()=>{if(!s.value.account)return d({message:"请填写账号",type:"error"});if(!s.value.password)return d({message:"请填写密码",type:"error"});E(s.value).then(a=>{console.log(a),a.data&&(p.setToken(a.data.token),N().then(({data:o})=>{if(!o.service)return d({message:"请联系管理员开通服务",type:"error"});p.setUserInfo(o),y.push("/")}))}).catch(a=>{})};return L(()=>{}),(a,o)=>{const k=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),g=n("Lock"),x=n("el-button"),V=n("el-form");return R(),S("div",T,[w("div",A,[$,e(V,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(x,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},z=U(j,[["__scopeId","data-v-59a7e82c"]]);export{z as default}; diff --git a/dist/assets/index-Dd0QzaAA.js b/dist/assets/index-CeB6n1Pj.js similarity index 97% rename from dist/assets/index-Dd0QzaAA.js rename to dist/assets/index-CeB6n1Pj.js index a0c30fa..598aff9 100644 --- a/dist/assets/index-Dd0QzaAA.js +++ b/dist/assets/index-CeB6n1Pj.js @@ -1 +1 @@ -import{c as ie,a as re,b as ee,d as ue,o as de}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import{_ as j,r as i,o as q,m as b,a as M,b as m,c as y,d as J,w as $,e,f as c,g as h,t as R,n as H,E as T,u as te,h as V,F as Q,i as W,j as oe,k as _e,l as B,p as se,q as ae,s as G,v as le,x as ne,y as pe,z as ve}from"./index-CEZ1QYTt.js";import{_ as fe}from"./lodash-BH6ba4wg.js";import{p as me}from"./padding-IWJ9EQ5v.js";import{g as he,a as ge}from"./shop-Co_PTsDS.js";import{p as ye}from"./pay-DjmOAiUp.js";const ke={class:"price"},be={class:"flex"},$e={style:{margin:"10px","padding-bottom":"40px"}},we={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},xe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(A,{expose:S,emit:k}){const a=i(!1),u=i(null),o=i(0),d=(n=!0,p=0)=>{l.value.nowPrice="",l.value.percentage="",a.value=n,o.value=p,H(()=>{setTimeout(()=>{var C;(C=u.value)==null||C.focus()},150)})},l=i({nowPrice:"",percentage:""}),v=n=>{l.value.percentage=(n/o.value*100).toFixed(2)},w=n=>{l.value.nowPrice=(o.value*n/100).toFixed(2)},F=k,I=()=>{if(l.value.percentage>100)return l.value.nowPrice="",l.value.percentage="",T.error("改价金额不能大于当前订单金额");if(l.value.nowPrice<=0)return l.value.nowPrice="",l.value.percentage="",T.error("金额不能小于0");F("changeAllPrice",l.value.nowPrice)};S({show:d,dialogVisible:a});const L=()=>{a.value&&I()};return q(()=>{b.on("enter",L)}),M(()=>{b.off("enter",L)}),(n,p)=>{const C=m("el-input"),D=m("el-button"),_=m("el-dialog");return y(),J(_,{modelValue:a.value,"onUpdate:modelValue":p[2]||(p[2]=f=>a.value=f),title:"订单改价",width:"650"},{footer:$(()=>[e("div",xe,[c(D,{class:"ok-btn",type:"primary",onClick:I},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),default:$(()=>[e("div",ke,[e("div",be,[c(C,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:l.value.nowPrice,"onUpdate:modelValue":p[0]||(p[0]=f=>l.value.nowPrice=f),type:"number",placeholder:"请输入改价后的价格",onInput:v},{suffix:$(()=>[h("元")]),_:1},8,["modelValue"]),c(C,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:l.value.percentage,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value.percentage=f),type:"number",placeholder:"请输入比例",onInput:w},{suffix:$(()=>[h("%")]),_:1},8,["modelValue"])]),e("div",$e,[h(" 改价后金额: "),e("span",we,"¥"+R(l.value.nowPrice||o.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ce=j(Ie,[["__scopeId","data-v-428f0e3b"]]),Pe={class:"my-order"},Ve={class:"header-nav"},Ae={class:"nav-item"},Se={class:"order-list"},Fe={class:"order-item-info"},Le={class:"order-item-title"},Re={class:"title"},Ee=["onClick"],De={class:"order-item-sku"},ze=["onClick"],Ue={class:"order-item-price"},Oe={class:"order-footer"},qe={class:"order-total"},Me={class:"price"},Ne={class:"total-item"},Be={style:{"font-size":"1.4rem"}},Te={class:"total-item"},je={class:"update-price"},Ke={class:"order-btn"},Ge={__name:"order",emits:["goPay","editAttr"],setup(A,{expose:S,emit:k}){const a=i([]),u=i(0),o=i(0),d=i(0),l=te(),v=()=>{let t=[];a.value.map(r=>{t.push(r.cart_id)}),t.length!=0&&F(t)},w=t=>{a.value=a.value.filter(r=>r.cart_id!=t),F([t])},F=t=>{ie({cart_id:t}).then(r=>{console.log(r),I()})},I=()=>{u.value=0,o.value=0,d.value=0,re({staff_id:l.userInfo.service.service_id}).then(t=>{var r,x;((x=(r=t.data)==null?void 0:r.list)==null?void 0:x.length)>0?(a.value=t.data.list[0].list,a.value.forEach(P=>{u.value+=P.productAttr.price*P.cart_num}),o.value=u.value):a.value=[]})};I();const L=k,n=()=>{L("goPay")},p=(t,r)=>{ee(t.cart_id,{cart_num:t.cart_num}).then(x=>{u.value=0,a.value.forEach(P=>{u.value+=P.productAttr.price*P.cart_num}),o.value=u.value})},C=t=>{L("editPupop",t)},D=(t,r)=>{ee(t,r).then(x=>{I()})},_=t=>{d.value=o.value-t,u.value=+t,H(()=>{setTimeout(()=>{g(!1)},150)})};i(0);const f=i(null),g=(t=!0)=>{f.value.show(t,o.value)};S({getList:I,list:a,editItem:D,discounts:d,allPrice:u});const z=()=>{f.value.dialogVisible?f.value.dialogVisible=!1:g()},s=()=>{a.value.length>0&&v()};return q(()=>{b.on("insert",z),b.on("delete",s)}),M(()=>{b.off("insert",z),b.off("delete",s)}),(t,r)=>{const x=m("Delete"),P=m("el-icon"),O=m("el-empty"),U=m("el-image"),K=m("ArrowDown"),Y=m("el-input-number"),Z=m("el-button");return y(),V("div",Pe,[e("div",Ve,[e("div",Ae,[h(" 已选购 "),e("span",null,R(a.value.length),1),h(" 件 ")]),e("div",{class:"nav-item-clear",onClick:v},[c(P,null,{default:$(()=>[c(x)]),_:1}),h("清空 (Delete) ")])]),e("div",Se,[a.value.length==0?(y(),J(O,{key:0,description:"请点击右侧添加商品"})):(y(!0),V(Q,{key:1},W(a.value,(E,ce)=>(y(),V("div",{class:"order-item",key:ce},[c(U,{loading:"lazy",class:"order-item-img",src:E.productAttr&&E.productAttr.image||E.product.image},null,8,["src"]),e("div",Fe,[e("div",Le,[e("div",Re,R(E.spu.store_name),1),e("div",{class:"delete",onClick:N=>w(E.cart_id)},"删除",8,Ee)]),e("div",De,[e("span",{style:{display:"flex","align-items":"center"},onClick:N=>C(E)},[h("商品规格: "+R(E.productAttr.sku||"默认规格"),1),c(P,{size:"16",style:{"margin-left":"0.2rem"}},{default:$(()=>[c(K)]),_:1})],8,ze)]),e("div",Ue,[e("div",null,[h(" ¥"),e("span",null,R(E.productAttr.price),1)]),e("div",null,[c(Y,{modelValue:E.cart_num,"onUpdate:modelValue":N=>E.cart_num=N,"step-strictly":"",min:1,step:1,onChange:N=>p(E)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Oe,[e("div",qe,[e("div",Me,[e("div",Ne,[h(" 实付: "),e("span",null,[h("¥"),e("span",Be,R(u.value.toFixed(2)),1)])]),e("div",Te,[h(" 优惠: "),e("span",null,[h("¥"),e("span",null,R(d.value.toFixed(2)),1)])])]),e("div",je,[c(Z,{class:"btn",type:"primary",onClick:g},{default:$(()=>[h("改价 (Insert)")]),_:1})])]),e("div",Ke,[c(Z,{class:"btn",type:"primary",onClick:n,disabled:a.value.length==0},{default:$(()=>[h("立即结账 (F9)")]),_:1},8,["disabled"])])]),c(Ce,{ref_key:"priceRef",ref:f,onChangeAllPrice:_},null,512)])}}},Je=j(Ge,[["__scopeId","data-v-141d660c"]]),X=A=>(le("data-v-cfa0a07d"),A=A(),ne(),A),He={class:"my-order"},Qe=X(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},ot=X(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),st=[ot],at={key:1,class:"no-stock"},lt=X(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],ct={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(A,{expose:S,emit:k}){const a=i(null),u=k,o=i(""),d=()=>{u("loadMore",{bar_code:o.value})},l=n=>{if(n.is_used==0)return T.error("该商品已被平台关闭");if(n.stock==0)return T.warning("该商品无库存");u("changeItem",n)},v=fe.throttle(()=>{u("getStoreList",{bar_code:o.value},!0)},300);S({bar_code:o});const w=i(!1),F=()=>{w.value=!0},I=()=>{w.value=!1},L=()=>{var n;(n=a.value)==null||n.focus()};return q(()=>{H(()=>{var n;(n=a.value)==null||n.focus(),F()}),b.on("shift",L)}),M(()=>{b.off("shift",L)}),(n,p)=>{const C=m("el-input"),D=m("Search"),_=m("el-icon"),f=m("el-button"),g=m("el-image"),z=m("el-space"),s=oe("infinite-scroll");return y(),V("div",He,[e("div",{class:se(["header-nav",{"input-focus":w.value}])},[Qe,e("div",We,[c(C,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=t=>o.value=t),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:a,onFocus:F,onBlur:I,onKeyup:_e(B(v),["enter"]),onClear:B(v)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:p[1]||(p[1]=(...t)=>B(v)&&B(v)(...t))},[c(f,{class:"btn",type:"primary"},{default:$(()=>[c(_,null,{default:$(()=>[c(D)]),_:1})]),_:1})])],2),ae((y(),V("div",Xe,[c(z,{wrap:"",size:20},{default:$(()=>[(y(!0),V(Q,null,W(A.storeList,(t,r)=>(y(),V("div",{class:"shop-item",key:r,onClick:x=>l(t)},[c(g,{loading:"lazy",src:t.image},null,8,["src"]),e("div",Ze,R(t.store_name),1),e("div",et,[h(" ¥"),e("span",null,R(t.price),1)]),t.stock==0?(y(),V("div",tt,st)):G("",!0),t.is_used==0?(y(),V("div",at,nt)):G("",!0)],8,Ye))),128))]),_:1})])),[[s,d]])])}}},it=j(ct,[["__scopeId","data-v-cfa0a07d"]]),rt=A=>(le("data-v-29f08ea1"),A=A(),ne(),A),ut={class:"shop"},dt={key:0,class:"shop-info"},_t={class:"shop-info-left"},pt={class:"shop-info-right"},vt={class:"shop-info-right-top"},ft={class:"shop-info-right-center"},mt={class:"shop-info-right-price"},ht={class:"shop-sku"},gt=rt(()=>e("div",{class:"title"},"产品",-1)),yt={class:"sku"},kt=["onClick"],bt={class:"dialog-footer"},$t={__name:"pupop",emits:["changeItem"],setup(A,{expose:S,emit:k}){const a=i(!1),u=_=>{a.value=_},o=i({}),d=i(null),l=i(!1),v=i("add"),w=i({}),F=(_,f="add")=>{v.value=f,f=="add"?(o.value=_,d.value=_.attr[0]):(l.value=!0,w.value=_,he(_.product_id).then(g=>{g.data.attrValue=JSON.parse(JSON.stringify(g.data.attr)),g.data.attr=Object.keys(g.data.sku),o.value=g.data,d.value=g.data.attr[0],l.value=!1}).catch(g=>{l.value=!1}))},I=k,L=()=>{v.value=="add"?I("changeItem",o.value,d.value):I("editItem",w.value.cart_id,{cart_num:w.value.cart_num,product_attr_unique:o.value.sku[d.value].unique}),a.value=!1},n=_=>{d.value=_};S({show:u,setForm:F});const p=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_>0)return n(o.value.attr[_-1])},C=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_{a.value&&L()};return q(()=>{b.on("left",p),b.on("right",C),b.on("enter",D)}),M(()=>{b.off("left",p),b.off("right",C),b.off("enter",D)}),(_,f)=>{const g=m("el-image"),z=m("el-space"),s=m("el-button"),t=m("el-dialog"),r=oe("loading");return y(),J(t,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),title:"商品规格",width:"650"},pe({default:$(()=>{var x,P,O;return[ae((y(),V("div",ut,[o.value.sku?(y(),V("div",dt,[e("div",_t,[c(g,{loading:"lazy",src:((x=o.value.sku[d.value])==null?void 0:x.image)||o.value.image},null,8,["src"])]),e("div",pt,[e("div",vt,R(o.value.store_name),1),e("div",ft,"库存"+R(((P=o.value.sku[d.value])==null?void 0:P.stock)||0),1),e("div",mt,[h("¥"),e("span",null,R(((O=o.value.sku[d.value])==null?void 0:O.price)||o.value.price),1)])])])):G("",!0),e("div",ht,[gt,e("div",yt,[c(z,{wrap:"",size:20},{default:$(()=>[(y(!0),V(Q,null,W(o.value.attr,(U,K)=>(y(),V("div",{class:se(["sku-item",{"sku-item_active":d.value==U}]),onClick:Y=>n(U),key:K},R(U||"默认规格"),11,kt))),128))]),_:1})])])])),[[r,l.value]])]}),_:2},[v.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:$(()=>[e("div",bt,[c(s,{class:"ok-btn",type:"primary",onClick:L},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},wt=j($t,[["__scopeId","data-v-29f08ea1"]]),xt={class:"my-card"},Ft={__name:"index",setup(A){const S=i(null),k=i(null),a=i(null),u=i(null),o=i([]),d=te(),l=ve(),v=i({page:0,limit:30}),w=(s={},t=!1)=>{v.value={staff_id:d.userInfo.service.service_id,sale_type:2,...v.value,...s},t&&(o.value=[],v.value.page=1,F.value=!1),ge(d.userInfo.service.mer_id,v.value).then(r=>{var P,O;((O=(P=r.data)==null?void 0:P.list)==null?void 0:O.length)(U.attr=Object.keys(U.sku),U));o.value=o.value.concat(x),s.bar_code&&o.value.length==1&&L(s.bar_code)&&(a.value.bar_code="",p(o.value[0],o.value[0].attr[0]))})},F=i(!1),I=s=>{F.value||(v.value.page++,w(s))};function L(s){return/^\d+$/.test(s)}const n=(s,t="")=>{let r={is_new:0,product_id:s.product_id,cart_num:1,product_attr_unique:s.sku[t]!==void 0?s.sku[t].unique:"",staff_id:d.userInfo.service.service_id,product_type:0};ue(r).then(x=>{k.value.getList()})},p=(s,t)=>{if(!s.attr||s.attr.length==0||s.attr.length==1)return n(s,s.attr[0]?s.attr[0]:"");if(t)return n(s,t);S.value.setForm(s,"add"),S.value.show(!0)},C=(s,t)=>{k.value.editItem(s,t)},D=s=>{S.value.setForm(s,"edit"),S.value.show(!0)},_=()=>{let s=k.value.list.map(r=>r.cart_id),t={takes:[],use_coupon:{},use_integral:!1,cart_id:s};k.value.discounts>0&&(t.deduction_price=k.value.discounts.toFixed(2),t.pay_type="micropay"),de(t).then(r=>{u.value.setForm({data:r.data,cart_id:s})})},f=()=>{_(),u.value.drawer=!0},g=()=>{k.value.getList()},z=()=>{l.name=="saleHome"&&(!u.value.drawer&&k.value.list.length>0?f():u.value.beforeClose())};return q(()=>{w(),v.value.page++,b.on("F9",z)}),M(()=>{b.off("F9",z)}),(s,t)=>(y(),V("div",xt,[c(Je,{ref_key:"orderRef",ref:k,onGoPay:f,onEditPupop:D},null,512),c(me),c(it,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:o.value,onGetStoreList:w,onChangeItem:p,onLoadMore:I},null,8,["storeList"]),c(wt,{ref_key:"pupopRef",ref:S,onChangeItem:p,onEditItem:C},null,512),c(ye,{ref_key:"payRef",ref:u,onPaySuccess:g},null,512)]))}};export{Ft as default}; +import{c as ie,a as re,b as ee,d as ue,o as de}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js";import{_ as j,r as i,o as q,m as b,a as M,b as m,c as y,d as J,w as $,e,f as c,g as h,t as R,n as H,E as T,u as te,h as V,F as Q,i as W,j as oe,k as _e,l as B,p as se,q as ae,s as G,v as le,x as ne,y as pe,z as ve}from"./index-DCKl20sY.js";import{_ as fe}from"./lodash-sOK8yL6t.js";import{p as me}from"./padding-CiGjC__s.js";import{g as he,a as ge}from"./shop-CAkzXRhR.js";import{p as ye}from"./pay-T7Krcb2W.js";const ke={class:"price"},be={class:"flex"},$e={style:{margin:"10px","padding-bottom":"40px"}},we={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},xe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(A,{expose:S,emit:k}){const a=i(!1),u=i(null),o=i(0),d=(n=!0,p=0)=>{l.value.nowPrice="",l.value.percentage="",a.value=n,o.value=p,H(()=>{setTimeout(()=>{var C;(C=u.value)==null||C.focus()},150)})},l=i({nowPrice:"",percentage:""}),v=n=>{l.value.percentage=(n/o.value*100).toFixed(2)},w=n=>{l.value.nowPrice=(o.value*n/100).toFixed(2)},F=k,I=()=>{if(l.value.percentage>100)return l.value.nowPrice="",l.value.percentage="",T.error("改价金额不能大于当前订单金额");if(l.value.nowPrice<=0)return l.value.nowPrice="",l.value.percentage="",T.error("金额不能小于0");F("changeAllPrice",l.value.nowPrice)};S({show:d,dialogVisible:a});const L=()=>{a.value&&I()};return q(()=>{b.on("enter",L)}),M(()=>{b.off("enter",L)}),(n,p)=>{const C=m("el-input"),D=m("el-button"),_=m("el-dialog");return y(),J(_,{modelValue:a.value,"onUpdate:modelValue":p[2]||(p[2]=f=>a.value=f),title:"订单改价",width:"650"},{footer:$(()=>[e("div",xe,[c(D,{class:"ok-btn",type:"primary",onClick:I},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),default:$(()=>[e("div",ke,[e("div",be,[c(C,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:l.value.nowPrice,"onUpdate:modelValue":p[0]||(p[0]=f=>l.value.nowPrice=f),type:"number",placeholder:"请输入改价后的价格",onInput:v},{suffix:$(()=>[h("元")]),_:1},8,["modelValue"]),c(C,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:l.value.percentage,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value.percentage=f),type:"number",placeholder:"请输入比例",onInput:w},{suffix:$(()=>[h("%")]),_:1},8,["modelValue"])]),e("div",$e,[h(" 改价后金额: "),e("span",we,"¥"+R(l.value.nowPrice||o.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ce=j(Ie,[["__scopeId","data-v-428f0e3b"]]),Pe={class:"my-order"},Ve={class:"header-nav"},Ae={class:"nav-item"},Se={class:"order-list"},Fe={class:"order-item-info"},Le={class:"order-item-title"},Re={class:"title"},Ee=["onClick"],De={class:"order-item-sku"},ze=["onClick"],Ue={class:"order-item-price"},Oe={class:"order-footer"},qe={class:"order-total"},Me={class:"price"},Ne={class:"total-item"},Be={style:{"font-size":"1.4rem"}},Te={class:"total-item"},je={class:"update-price"},Ke={class:"order-btn"},Ge={__name:"order",emits:["goPay","editAttr"],setup(A,{expose:S,emit:k}){const a=i([]),u=i(0),o=i(0),d=i(0),l=te(),v=()=>{let t=[];a.value.map(r=>{t.push(r.cart_id)}),t.length!=0&&F(t)},w=t=>{a.value=a.value.filter(r=>r.cart_id!=t),F([t])},F=t=>{ie({cart_id:t}).then(r=>{console.log(r),I()})},I=()=>{u.value=0,o.value=0,d.value=0,re({staff_id:l.userInfo.service.service_id}).then(t=>{var r,x;((x=(r=t.data)==null?void 0:r.list)==null?void 0:x.length)>0?(a.value=t.data.list[0].list,a.value.forEach(P=>{u.value+=P.productAttr.price*P.cart_num}),o.value=u.value):a.value=[]})};I();const L=k,n=()=>{L("goPay")},p=(t,r)=>{ee(t.cart_id,{cart_num:t.cart_num}).then(x=>{u.value=0,a.value.forEach(P=>{u.value+=P.productAttr.price*P.cart_num}),o.value=u.value})},C=t=>{L("editPupop",t)},D=(t,r)=>{ee(t,r).then(x=>{I()})},_=t=>{d.value=o.value-t,u.value=+t,H(()=>{setTimeout(()=>{g(!1)},150)})};i(0);const f=i(null),g=(t=!0)=>{f.value.show(t,o.value)};S({getList:I,list:a,editItem:D,discounts:d,allPrice:u});const z=()=>{f.value.dialogVisible?f.value.dialogVisible=!1:g()},s=()=>{a.value.length>0&&v()};return q(()=>{b.on("insert",z),b.on("delete",s)}),M(()=>{b.off("insert",z),b.off("delete",s)}),(t,r)=>{const x=m("Delete"),P=m("el-icon"),O=m("el-empty"),U=m("el-image"),K=m("ArrowDown"),Y=m("el-input-number"),Z=m("el-button");return y(),V("div",Pe,[e("div",Ve,[e("div",Ae,[h(" 已选购 "),e("span",null,R(a.value.length),1),h(" 件 ")]),e("div",{class:"nav-item-clear",onClick:v},[c(P,null,{default:$(()=>[c(x)]),_:1}),h("清空 (Delete) ")])]),e("div",Se,[a.value.length==0?(y(),J(O,{key:0,description:"请点击右侧添加商品"})):(y(!0),V(Q,{key:1},W(a.value,(E,ce)=>(y(),V("div",{class:"order-item",key:ce},[c(U,{loading:"lazy",class:"order-item-img",src:E.productAttr&&E.productAttr.image||E.product.image},null,8,["src"]),e("div",Fe,[e("div",Le,[e("div",Re,R(E.spu.store_name),1),e("div",{class:"delete",onClick:N=>w(E.cart_id)},"删除",8,Ee)]),e("div",De,[e("span",{style:{display:"flex","align-items":"center"},onClick:N=>C(E)},[h("商品规格: "+R(E.productAttr.sku||"默认规格"),1),c(P,{size:"16",style:{"margin-left":"0.2rem"}},{default:$(()=>[c(K)]),_:1})],8,ze)]),e("div",Ue,[e("div",null,[h(" ¥"),e("span",null,R(E.productAttr.price),1)]),e("div",null,[c(Y,{modelValue:E.cart_num,"onUpdate:modelValue":N=>E.cart_num=N,"step-strictly":"",min:1,step:1,onChange:N=>p(E)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Oe,[e("div",qe,[e("div",Me,[e("div",Ne,[h(" 实付: "),e("span",null,[h("¥"),e("span",Be,R(u.value.toFixed(2)),1)])]),e("div",Te,[h(" 优惠: "),e("span",null,[h("¥"),e("span",null,R(d.value.toFixed(2)),1)])])]),e("div",je,[c(Z,{class:"btn",type:"primary",onClick:g},{default:$(()=>[h("改价 (Insert)")]),_:1})])]),e("div",Ke,[c(Z,{class:"btn",type:"primary",onClick:n,disabled:a.value.length==0},{default:$(()=>[h("立即结账 (F9)")]),_:1},8,["disabled"])])]),c(Ce,{ref_key:"priceRef",ref:f,onChangeAllPrice:_},null,512)])}}},Je=j(Ge,[["__scopeId","data-v-141d660c"]]),X=A=>(le("data-v-cfa0a07d"),A=A(),ne(),A),He={class:"my-order"},Qe=X(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},ot=X(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),st=[ot],at={key:1,class:"no-stock"},lt=X(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],ct={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(A,{expose:S,emit:k}){const a=i(null),u=k,o=i(""),d=()=>{u("loadMore",{bar_code:o.value})},l=n=>{if(n.is_used==0)return T.error("该商品已被平台关闭");if(n.stock==0)return T.warning("该商品无库存");u("changeItem",n)},v=fe.throttle(()=>{u("getStoreList",{bar_code:o.value},!0)},300);S({bar_code:o});const w=i(!1),F=()=>{w.value=!0},I=()=>{w.value=!1},L=()=>{var n;(n=a.value)==null||n.focus()};return q(()=>{H(()=>{var n;(n=a.value)==null||n.focus(),F()}),b.on("shift",L)}),M(()=>{b.off("shift",L)}),(n,p)=>{const C=m("el-input"),D=m("Search"),_=m("el-icon"),f=m("el-button"),g=m("el-image"),z=m("el-space"),s=oe("infinite-scroll");return y(),V("div",He,[e("div",{class:se(["header-nav",{"input-focus":w.value}])},[Qe,e("div",We,[c(C,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=t=>o.value=t),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:a,onFocus:F,onBlur:I,onKeyup:_e(B(v),["enter"]),onClear:B(v)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:p[1]||(p[1]=(...t)=>B(v)&&B(v)(...t))},[c(f,{class:"btn",type:"primary"},{default:$(()=>[c(_,null,{default:$(()=>[c(D)]),_:1})]),_:1})])],2),ae((y(),V("div",Xe,[c(z,{wrap:"",size:20},{default:$(()=>[(y(!0),V(Q,null,W(A.storeList,(t,r)=>(y(),V("div",{class:"shop-item",key:r,onClick:x=>l(t)},[c(g,{loading:"lazy",src:t.image},null,8,["src"]),e("div",Ze,R(t.store_name),1),e("div",et,[h(" ¥"),e("span",null,R(t.price),1)]),t.stock==0?(y(),V("div",tt,st)):G("",!0),t.is_used==0?(y(),V("div",at,nt)):G("",!0)],8,Ye))),128))]),_:1})])),[[s,d]])])}}},it=j(ct,[["__scopeId","data-v-cfa0a07d"]]),rt=A=>(le("data-v-29f08ea1"),A=A(),ne(),A),ut={class:"shop"},dt={key:0,class:"shop-info"},_t={class:"shop-info-left"},pt={class:"shop-info-right"},vt={class:"shop-info-right-top"},ft={class:"shop-info-right-center"},mt={class:"shop-info-right-price"},ht={class:"shop-sku"},gt=rt(()=>e("div",{class:"title"},"产品",-1)),yt={class:"sku"},kt=["onClick"],bt={class:"dialog-footer"},$t={__name:"pupop",emits:["changeItem"],setup(A,{expose:S,emit:k}){const a=i(!1),u=_=>{a.value=_},o=i({}),d=i(null),l=i(!1),v=i("add"),w=i({}),F=(_,f="add")=>{v.value=f,f=="add"?(o.value=_,d.value=_.attr[0]):(l.value=!0,w.value=_,he(_.product_id).then(g=>{g.data.attrValue=JSON.parse(JSON.stringify(g.data.attr)),g.data.attr=Object.keys(g.data.sku),o.value=g.data,d.value=g.data.attr[0],l.value=!1}).catch(g=>{l.value=!1}))},I=k,L=()=>{v.value=="add"?I("changeItem",o.value,d.value):I("editItem",w.value.cart_id,{cart_num:w.value.cart_num,product_attr_unique:o.value.sku[d.value].unique}),a.value=!1},n=_=>{d.value=_};S({show:u,setForm:F});const p=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_>0)return n(o.value.attr[_-1])},C=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_{a.value&&L()};return q(()=>{b.on("left",p),b.on("right",C),b.on("enter",D)}),M(()=>{b.off("left",p),b.off("right",C),b.off("enter",D)}),(_,f)=>{const g=m("el-image"),z=m("el-space"),s=m("el-button"),t=m("el-dialog"),r=oe("loading");return y(),J(t,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),title:"商品规格",width:"650"},pe({default:$(()=>{var x,P,O;return[ae((y(),V("div",ut,[o.value.sku?(y(),V("div",dt,[e("div",_t,[c(g,{loading:"lazy",src:((x=o.value.sku[d.value])==null?void 0:x.image)||o.value.image},null,8,["src"])]),e("div",pt,[e("div",vt,R(o.value.store_name),1),e("div",ft,"库存"+R(((P=o.value.sku[d.value])==null?void 0:P.stock)||0),1),e("div",mt,[h("¥"),e("span",null,R(((O=o.value.sku[d.value])==null?void 0:O.price)||o.value.price),1)])])])):G("",!0),e("div",ht,[gt,e("div",yt,[c(z,{wrap:"",size:20},{default:$(()=>[(y(!0),V(Q,null,W(o.value.attr,(U,K)=>(y(),V("div",{class:se(["sku-item",{"sku-item_active":d.value==U}]),onClick:Y=>n(U),key:K},R(U||"默认规格"),11,kt))),128))]),_:1})])])])),[[r,l.value]])]}),_:2},[v.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:$(()=>[e("div",bt,[c(s,{class:"ok-btn",type:"primary",onClick:L},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},wt=j($t,[["__scopeId","data-v-29f08ea1"]]),xt={class:"my-card"},Ft={__name:"index",setup(A){const S=i(null),k=i(null),a=i(null),u=i(null),o=i([]),d=te(),l=ve(),v=i({page:0,limit:30}),w=(s={},t=!1)=>{v.value={staff_id:d.userInfo.service.service_id,sale_type:2,...v.value,...s},t&&(o.value=[],v.value.page=1,F.value=!1),ge(d.userInfo.service.mer_id,v.value).then(r=>{var P,O;((O=(P=r.data)==null?void 0:P.list)==null?void 0:O.length)(U.attr=Object.keys(U.sku),U));o.value=o.value.concat(x),s.bar_code&&o.value.length==1&&L(s.bar_code)&&(a.value.bar_code="",p(o.value[0],o.value[0].attr[0]))})},F=i(!1),I=s=>{F.value||(v.value.page++,w(s))};function L(s){return/^\d+$/.test(s)}const n=(s,t="")=>{let r={is_new:0,product_id:s.product_id,cart_num:1,product_attr_unique:s.sku[t]!==void 0?s.sku[t].unique:"",staff_id:d.userInfo.service.service_id,product_type:0};ue(r).then(x=>{k.value.getList()})},p=(s,t)=>{if(!s.attr||s.attr.length==0||s.attr.length==1)return n(s,s.attr[0]?s.attr[0]:"");if(t)return n(s,t);S.value.setForm(s,"add"),S.value.show(!0)},C=(s,t)=>{k.value.editItem(s,t)},D=s=>{S.value.setForm(s,"edit"),S.value.show(!0)},_=()=>{let s=k.value.list.map(r=>r.cart_id),t={takes:[],use_coupon:{},use_integral:!1,cart_id:s};k.value.discounts>0&&(t.deduction_price=k.value.discounts.toFixed(2),t.pay_type="micropay"),de(t).then(r=>{u.value.setForm({data:r.data,cart_id:s})})},f=()=>{_(),u.value.drawer=!0},g=()=>{k.value.getList()},z=()=>{l.name=="saleHome"&&(!u.value.drawer&&k.value.list.length>0?f():u.value.beforeClose())};return q(()=>{w(),v.value.page++,b.on("F9",z)}),M(()=>{b.off("F9",z)}),(s,t)=>(y(),V("div",xt,[c(Je,{ref_key:"orderRef",ref:k,onGoPay:f,onEditPupop:D},null,512),c(me),c(it,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:o.value,onGetStoreList:w,onChangeItem:p,onLoadMore:I},null,8,["storeList"]),c(wt,{ref_key:"pupopRef",ref:S,onChangeItem:p,onEditItem:C},null,512),c(ye,{ref_key:"payRef",ref:u,onPaySuccess:g},null,512)]))}};export{Ft as default}; diff --git a/dist/assets/index-DC-gKzEm.js b/dist/assets/index-DC-gKzEm.js new file mode 100644 index 0000000..7c9905f --- /dev/null +++ b/dist/assets/index-DC-gKzEm.js @@ -0,0 +1 @@ +import{o as r,d as o}from"./detail-v5kbvKzr.js";import{p as t}from"./padding-CiGjC__s.js";import{c as a,h as s,f as e}from"./index-DCKl20sY.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js";import"./pay-T7Krcb2W.js";const c={class:"my-card"},u={__name:"index",setup(d){return(i,l)=>(a(),s("div",c,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/index-CEZ1QYTt.js b/dist/assets/index-DCKl20sY.js similarity index 99% rename from dist/assets/index-CEZ1QYTt.js rename to dist/assets/index-DCKl20sY.js index dd7bed4..a30fecf 100644 --- a/dist/assets/index-CEZ1QYTt.js +++ b/dist/assets/index-DCKl20sY.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-DInWDOK8.js","./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js","./pay-BMUiW0di.css","./lodash-BH6ba4wg.js","./padding-IWJ9EQ5v.js","./shop-Co_PTsDS.js","./pay-DjmOAiUp.js","./index-CUMIE358.css","./index-DNTUc2C9.js","./detail-RFFCHX7F.js","./detail-ExuR4cbt.css","./index-DmS05-EY.css","./indexSystem-BRT8g_VH.js","./index-Dd0QzaAA.js","./index-DkSpSzQB.css","./index-DRBBEO3s.js","./index-DkuN9OSj.css","./indexList-Bbfw8qYS.js","./indexList-Cdt8gTOX.css","./indexCount-Tj_lyoEF.js","./indexCount-BUWO-6iT.css","./index-CR9FqBWJ.js","./index-CZQEuDzk.css","./index-x9vBVpAd.js","./index-DV9hG0ly.css","./index-BVCrvs59.js","./index-Dwwi99ut.css"] + __vite__mapDeps.viteFileDeps = ["./index-RAiQ8ZiL.js","./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js","./pay-BMUiW0di.css","./lodash-sOK8yL6t.js","./padding-CiGjC__s.js","./shop-CAkzXRhR.js","./pay-T7Krcb2W.js","./index-CUMIE358.css","./index-DC-gKzEm.js","./detail-v5kbvKzr.js","./detail-ExuR4cbt.css","./index-DmS05-EY.css","./indexSystem-RkjNE_Xi.js","./index-CeB6n1Pj.js","./index-DkSpSzQB.css","./index-BLjHE6Rj.js","./index-DkuN9OSj.css","./indexList-B7wC4WB5.js","./indexList-Cdt8gTOX.css","./indexCount-DTZECtBi.js","./indexCount-BUWO-6iT.css","./index-C8N4ffo0.js","./index-CZQEuDzk.css","./index-5epx37BL.js","./index-DV9hG0ly.css","./index-CYsZgCwo.js","./index-Dwwi99ut.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -76,4 +76,4 @@ function __vite__mapDeps(indexes) { `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[c4]=this[c4]={accessors:{}}).accessors,r=this.prototype;function a(l){const s=cs(l);o[s]||(cce(r,l),o[s]=!0)}return Ve.isArray(t)?t.forEach(a):a(t),this}}md.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ve.reduceDescriptors(md.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Ve.freezeMethods(md);const lr=md;function pf(e,t){const n=this||iv,o=t||n,r=lr.from(o.headers);let a=o.data;return Ve.forEach(e,function(s){a=s.call(n,a,r.normalize(),t?t.status:void 0)}),r.normalize(),a}function kb(e){return!!(e&&e.__CANCEL__)}function Oi(e,t,n){Rt.call(this,e??"canceled",Rt.ERR_CANCELED,t,n),this.name="CanceledError"}Ve.inherits(Oi,Rt,{__CANCEL__:!0});function dce(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const fce=Io.hasStandardBrowserEnv?{write(e,t,n,o,r,a){const l=[e+"="+encodeURIComponent(t)];Ve.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),Ve.isString(o)&&l.push("path="+o),Ve.isString(r)&&l.push("domain="+r),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function pce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Eb(e,t){return e&&!pce(t)?vce(e,t):t}const hce=Io.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(a){let l=a;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(l){const s=Ve.isString(l)?r(l):l;return s.protocol===o.protocol&&s.host===o.host}}():function(){return function(){return!0}}();function mce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gce(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,a=0,l;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),f=o[a];l||(l=c),n[r]=u,o[r]=c;let d=a,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===a&&(a=(a+1)%e),c-l{const a=r.loaded,l=r.lengthComputable?r.total:void 0,s=a-n,u=o(s),c=a<=l;n=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&c?(l-a)/u:void 0,event:r};f[t?"download":"upload"]=!0,e(f)}}const yce=typeof XMLHttpRequest<"u",_ce=yce&&function(e){return new Promise(function(n,o){let r=e.data;const a=lr.from(e.headers).normalize();let{responseType:l,withXSRFToken:s}=e,u;function c(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}let f;if(Ve.isFormData(r)){if(Io.hasStandardBrowserEnv||Io.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((f=a.getContentType())!==!1){const[v,...y]=f?f.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([v||"multipart/form-data",...y].join("; "))}}let d=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(v+":"+y))}const p=Eb(e.baseURL,e.url);d.open(e.method.toUpperCase(),bb(p,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function h(){if(!d)return;const v=lr.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),g={data:!l||l==="text"||l==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:v,config:e,request:d};dce(function(b){n(b),c()},function(b){o(b),c()},g),d=null}if("onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(h)},d.onabort=function(){d&&(o(new Rt("Request aborted",Rt.ECONNABORTED,e,d)),d=null)},d.onerror=function(){o(new Rt("Network Error",Rt.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||wb;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),o(new Rt(y,g.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,e,d)),d=null},Io.hasStandardBrowserEnv&&(s&&Ve.isFunction(s)&&(s=s(e)),s||s!==!1&&hce(p))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&fce.read(e.xsrfCookieName);v&&a.set(e.xsrfHeaderName,v)}r===void 0&&a.setContentType(null),"setRequestHeader"in d&&Ve.forEach(a.toJSON(),function(y,g){d.setRequestHeader(g,y)}),Ve.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),l&&l!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",d4(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",d4(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=v=>{d&&(o(!v||v.type?new Oi(null,e,d):v),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const m=mce(p);if(m&&Io.protocols.indexOf(m)===-1){o(new Rt("Unsupported protocol "+m+":",Rt.ERR_BAD_REQUEST,e));return}d.send(r||null)})},W0={http:Wue,xhr:_ce};Ve.forEach(W0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const f4=e=>`- ${e}`,bce=e=>Ve.isFunction(e)||e===null||e===!1,xb={getAdapter:e=>{e=Ve.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let a=0;a`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=t?a.length>1?`since : `+a.map(f4).join(` `):" "+f4(a[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o},adapters:W0};function vf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Oi(null,e)}function p4(e){return vf(e),e.headers=lr.from(e.headers),e.data=pf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xb.getAdapter(e.adapter||iv.adapter)(e).then(function(o){return vf(e),o.data=pf.call(e,e.transformResponse,o),o.headers=lr.from(o.headers),o},function(o){return kb(o)||(vf(e),o&&o.response&&(o.response.data=pf.call(e,e.transformResponse,o.response),o.response.headers=lr.from(o.response.headers))),Promise.reject(o)})}const v4=e=>e instanceof lr?{...e}:e;function Fl(e,t){t=t||{};const n={};function o(c,f,d){return Ve.isPlainObject(c)&&Ve.isPlainObject(f)?Ve.merge.call({caseless:d},c,f):Ve.isPlainObject(f)?Ve.merge({},f):Ve.isArray(f)?f.slice():f}function r(c,f,d){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c,d)}else return o(c,f,d)}function a(c,f){if(!Ve.isUndefined(f))return o(void 0,f)}function l(c,f){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c)}else return o(void 0,f)}function s(c,f,d){if(d in t)return o(c,f);if(d in e)return o(void 0,c)}const u={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(c,f)=>r(v4(c),v4(f),!0)};return Ve.forEach(Object.keys(Object.assign({},e,t)),function(f){const d=u[f]||r,p=d(e[f],t[f],f);Ve.isUndefined(p)&&d!==s||(n[f]=p)}),n}const Mb="1.6.8",uv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{uv[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const h4={};uv.transitional=function(t,n,o){function r(a,l){return"[Axios v"+Mb+"] Transitional option '"+a+"'"+l+(o?". "+o:"")}return(a,l,s)=>{if(t===!1)throw new Rt(r(l," has been removed"+(n?" in "+n:"")),Rt.ERR_DEPRECATED);return n&&!h4[l]&&(h4[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,s):!0}};function wce(e,t,n){if(typeof e!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const a=o[r],l=t[a];if(l){const s=e[a],u=s===void 0||l(s,a,e);if(u!==!0)throw new Rt("option "+a+" must be "+u,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+a,Rt.ERR_BAD_OPTION)}}const j0={assertOptions:wce,validators:uv},Mr=j0.validators;class yc{constructor(t){this.defaults=t,this.interceptors={request:new u4,response:new u4}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const a=r.stack?r.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=` -`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&j0.assertOptions(o,{silentJSONParsing:Mr.transitional(Mr.boolean),forcedJSONParsing:Mr.transitional(Mr.boolean),clarifyTimeoutError:Mr.transitional(Mr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:j0.assertOptions(r,{encode:Mr.function,serialize:Mr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&Ve.merge(a.common,a[n.method]);a&&Ve.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=lr.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[p4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Oi(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new cv(function(r){t=r}),cancel:t}}}const Cce=cv;function Sce(e){return function(n){return e.apply(null,n)}}function kce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const q0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(q0).forEach(([e,t])=>{q0[t]=e});const Ece=q0;function $b(e){const t=new Hu(e),n=ib(Hu.prototype.request,t);return Ve.extend(n,Hu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return $b(Fl(e,r))},n}const sn=$b(iv);sn.Axios=Hu;sn.CanceledError=Oi;sn.CancelToken=Cce;sn.isCancel=kb;sn.VERSION=Mb;sn.toFormData=hd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Sce;sn.isAxiosError=kce;sn.mergeConfig=Fl;sn.AxiosHeaders=lr;sn.formToJSON=e=>Sb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=xb.getAdapter;sn.HttpStatusCode=Ece;sn.default=sn;const xce={url:"http://192.168.1.21:8324/api",upload:"http://192.168.1.21:8324/api/upload/image/field"},Ai=sn.create({baseURL:xce.url,timeout:1e4});Ai.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Ai.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ts({message:e.data.message,type:"error"}),setTimeout(()=>{const t=rv();t.setUserInfo({}),t.setToken(""),Ob.push("/login")},700)),e.data.status===400)throw Ts({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ts({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function ade(e){return Ai.post("auth/login",e)}function lde(e){return Ai.get("user",e)}function Mce(){return Ai.post("logout")}const dv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},$ce=e=>(j4("data-v-24e72736"),e=e(),q4(),e),Tce={class:"my-card"},Oce={class:"card-header"},Ace={style:{width:"4.5rem"}},Nce=$ce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Rce={class:"card-body"},Ice={class:"el-dropdown-link"},Pce={class:"info"},Lce={style:{"margin-left":"0.3rem"}},Vce={__name:"myHeader",setup(e){const t=rv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=ob(),a=()=>{Mce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ts({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ge("el-image"),c=Ge("el-avatar"),f=Ge("arrow-down"),d=Ge("el-icon"),p=Ge("el-dropdown-item"),h=Ge("el-dropdown-menu"),m=Ge("el-dropdown");return _(),M("div",Tce,[k("div",Oce,[k("div",Ace,[W(u,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),Nce]),k("div",Rce,[W(m,{trigger:"hover"},{dropdown:X(()=>[W(h,null,{default:X(()=>[W(p,{onClick:a},{default:X(()=>[gt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",Ice,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Pce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Lce,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:X(()=>[W(f)]),_:1})])]),_:1})])])}}},Bce=dv(Vce,[["__scopeId","data-v-24e72736"]]);function zce(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(r){r(n)}),(o=e.get("*"))&&o.slice().map(function(r){r(t,n)})}}}const qn=zce(),oa=e=>(j4("data-v-dbb96e9b"),e=e(),q4(),e),Hce={class:"my-card"},Dce=oa(()=>k("div",null,"收银",-1)),Fce=oa(()=>k("div",null,"收银订单",-1)),Kce=oa(()=>k("div",null,"平台订单",-1)),Wce=oa(()=>k("div",null,"批发",-1)),jce=oa(()=>k("div",null,"批发订单",-1)),qce=oa(()=>k("div",null,"核销",-1)),Uce=oa(()=>k("div",null,"商品",-1)),Yce=oa(()=>k("div",null,"统计",-1)),Gce={__name:"myAside",setup(e){const t=ob(),n=tue(),o=s=>{t.push({name:s})},r=P(["home","order","orderSystem","saleHome","saleOrder","convert","shop","orderCount"]),a=()=>{let s=r.value.indexOf(n.name);s==0&&(s=r.value.length),s>0&&o(r.value[s-1])},l=()=>{let s=r.value.indexOf(n.name);s==r.value.length-1&&(s=-1),s{qn.on("up",a),qn.on("down",l)}),Ho(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Ge("Sell"),f=Ge("el-icon"),d=Ge("DataLine"),p=Ge("DataAnalysis"),h=Ge("Van"),m=Ge("Tickets"),v=Ge("FullScreen"),y=Ge("ShoppingBag"),g=Ge("Coin");return _(),M("div",Hce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:u[0]||(u[0]=w=>o("home"))},[W(f,{size:"30"},{default:X(()=>[W(c)]),_:1}),Dce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:u[1]||(u[1]=w=>o("order"))},[W(f,{size:"30"},{default:X(()=>[W(d)]),_:1}),Fce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderSystem"}]),onClick:u[2]||(u[2]=w=>o("orderSystem"))},[W(f,{size:"30"},{default:X(()=>[W(p)]),_:1}),Kce],2),k("div",{class:T(["list-item",{active:i(n).name=="saleHome"}]),onClick:u[3]||(u[3]=w=>o("saleHome"))},[W(f,{size:"30"},{default:X(()=>[W(h)]),_:1}),Wce],2),k("div",{class:T(["list-item",{active:i(n).name=="saleOrder"}]),onClick:u[4]||(u[4]=w=>o("saleOrder"))},[W(f,{size:"30"},{default:X(()=>[W(m)]),_:1}),jce],2),k("div",{class:T(["list-item",{active:i(n).name=="convert"}]),onClick:u[5]||(u[5]=w=>o("convert"))},[W(f,{size:"30"},{default:X(()=>[W(v)]),_:1}),qce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:u[6]||(u[6]=w=>o("shop"))},[W(f,{size:"30"},{default:X(()=>[W(y)]),_:1}),Uce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderCount"}]),onClick:u[7]||(u[7]=w=>o("orderCount"))},[W(f,{size:"30"},{default:X(()=>[W(g)]),_:1}),Yce],2)])}}},Xce=dv(Gce,[["__scopeId","data-v-dbb96e9b"]]),Jce={class:"common-layout"},Zce={__name:"index",setup(e){const t=n=>{console.log("按下",n.keyCode),n.keyCode==16&&qn.emit("shift"),n.keyCode==120&&qn.emit("F9"),n.keyCode==13&&qn.emit("enter"),n.keyCode==37&&qn.emit("left"),n.keyCode==39&&qn.emit("right"),n.keyCode==38&&qn.emit("up"),n.keyCode==40&&qn.emit("down"),n.keyCode==46&&qn.emit("delete"),n.keyCode==45&&qn.emit("insert")};return et(()=>{window.addEventListener("keydown",t),console.log("开启键盘监听")}),Ho(()=>{window.removeEventListener("keydown",t),console.log("关闭键盘监听")}),(n,o)=>{const r=Ge("el-header"),a=Ge("el-aside"),l=Ge("router-view"),s=Ge("el-main"),u=Ge("el-container");return _(),M("div",Jce,[W(u,null,{default:X(()=>[W(r,null,{default:X(()=>[W(Bce)]),_:1}),W(u,null,{default:X(()=>[W(a,{width:"100px"},{default:X(()=>[W(Xce)]),_:1}),W(s,null,{default:X(()=>[W(l,{class:"my-main"},{default:X(({Component:c})=>[W(tn,{name:"el-zoom-in-top"},{default:X(()=>[(_(),le(it(c)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Qce=dv(Zce,[["__scopeId","data-v-64ddf17e"]]),ede=[{path:"/",name:"layout",component:Qce,redirect:"/home",meta:{title:"里海收银系统"},children:[{path:"/home",name:"home",meta:{title:"收银"},component:()=>go(()=>import("./index-DInWDOK8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)},{path:"/order",name:"order",meta:{title:"收银订单"},component:()=>go(()=>import("./index-DNTUc2C9.js"),__vite__mapDeps([8,9,1,2,6,10,4,11]),import.meta.url)},{path:"/orderSystem",name:"orderSystem",meta:{title:"平台订单"},component:()=>go(()=>import("./indexSystem-BRT8g_VH.js"),__vite__mapDeps([12,9,1,2,6,10,4,11]),import.meta.url)},{path:"/saleHome",name:"saleHome",meta:{title:"批发"},component:()=>go(()=>import("./index-Dd0QzaAA.js"),__vite__mapDeps([13,1,2,3,4,5,6,14]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"批发订单"},component:()=>go(()=>import("./index-DRBBEO3s.js"),__vite__mapDeps([15,1,2,6,4,16]),import.meta.url)},{path:"/orderList",name:"orderList",meta:{title:"统计"},component:()=>go(()=>import("./indexList-Bbfw8qYS.js"),__vite__mapDeps([17,1,2,6,18]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"统计"},component:()=>go(()=>import("./indexCount-Tj_lyoEF.js"),__vite__mapDeps([19,1,2,20]),import.meta.url)},{path:"/shop",name:"shop",component:()=>go(()=>import("./index-CR9FqBWJ.js"),__vite__mapDeps([21,5,22]),import.meta.url)},{path:"/convert",name:"convert",component:()=>go(()=>import("./index-x9vBVpAd.js"),__vite__mapDeps([23,1,2,6,4,24]),import.meta.url)}]},{path:"/login",name:"login",component:()=>go(()=>import("./index-BVCrvs59.js"),__vite__mapDeps([25,26]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>go(()=>import("./index-BtVtGQsy.js"),__vite__mapDeps([]),import.meta.url)}],Tb=Qie({history:$ie(),routes:ede});Tb.beforeEach((e,t,n)=>{const o=rv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ob=Tb,Ni=Og(Z5);for(const[e,t]of Object.entries(ML))Ni.component(e,t);const tde=oue();Ni.use(Ob);Ni.use(tde);Ni.use(Use,{locale:Yse});Ni.mount("#app");export{ob as A,wr as B,Cr as C,xce as D,Ts as E,Ke as F,Ai as G,bt as H,y2 as I,S as J,ade as K,lde as L,dv as _,Ho as a,Ge as b,_ as c,le as d,k as e,W as f,gt as g,M as h,ht as i,xc as j,Mt as k,i as l,qn as m,We as n,et as o,T as p,tt as q,P as r,ne as s,Te as t,rv as u,j4 as v,X as w,q4 as x,sr as y,tue as z}; +`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&j0.assertOptions(o,{silentJSONParsing:Mr.transitional(Mr.boolean),forcedJSONParsing:Mr.transitional(Mr.boolean),clarifyTimeoutError:Mr.transitional(Mr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:j0.assertOptions(r,{encode:Mr.function,serialize:Mr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&Ve.merge(a.common,a[n.method]);a&&Ve.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=lr.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[p4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Oi(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new cv(function(r){t=r}),cancel:t}}}const Cce=cv;function Sce(e){return function(n){return e.apply(null,n)}}function kce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const q0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(q0).forEach(([e,t])=>{q0[t]=e});const Ece=q0;function $b(e){const t=new Hu(e),n=ib(Hu.prototype.request,t);return Ve.extend(n,Hu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return $b(Fl(e,r))},n}const sn=$b(iv);sn.Axios=Hu;sn.CanceledError=Oi;sn.CancelToken=Cce;sn.isCancel=kb;sn.VERSION=Mb;sn.toFormData=hd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Sce;sn.isAxiosError=kce;sn.mergeConfig=Fl;sn.AxiosHeaders=lr;sn.formToJSON=e=>Sb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=xb.getAdapter;sn.HttpStatusCode=Ece;sn.default=sn;const xce={url:"https://crmeb-test.shop.lihaink.cn/api",upload:"https://crmeb-test.shop.lihaink.cn/api/upload/image/field"},Ai=sn.create({baseURL:xce.url,timeout:1e4});Ai.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Ai.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ts({message:e.data.message,type:"error"}),setTimeout(()=>{const t=rv();t.setUserInfo({}),t.setToken(""),Ob.push("/login")},700)),e.data.status===400)throw Ts({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ts({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function ade(e){return Ai.post("auth/login",e)}function lde(e){return Ai.get("user",e)}function Mce(){return Ai.post("logout")}const dv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},$ce=e=>(j4("data-v-24e72736"),e=e(),q4(),e),Tce={class:"my-card"},Oce={class:"card-header"},Ace={style:{width:"4.5rem"}},Nce=$ce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Rce={class:"card-body"},Ice={class:"el-dropdown-link"},Pce={class:"info"},Lce={style:{"margin-left":"0.3rem"}},Vce={__name:"myHeader",setup(e){const t=rv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=ob(),a=()=>{Mce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ts({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ge("el-image"),c=Ge("el-avatar"),f=Ge("arrow-down"),d=Ge("el-icon"),p=Ge("el-dropdown-item"),h=Ge("el-dropdown-menu"),m=Ge("el-dropdown");return _(),M("div",Tce,[k("div",Oce,[k("div",Ace,[W(u,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),Nce]),k("div",Rce,[W(m,{trigger:"hover"},{dropdown:X(()=>[W(h,null,{default:X(()=>[W(p,{onClick:a},{default:X(()=>[gt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",Ice,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Pce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Lce,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:X(()=>[W(f)]),_:1})])]),_:1})])])}}},Bce=dv(Vce,[["__scopeId","data-v-24e72736"]]);function zce(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(r){r(n)}),(o=e.get("*"))&&o.slice().map(function(r){r(t,n)})}}}const qn=zce(),oa=e=>(j4("data-v-dbb96e9b"),e=e(),q4(),e),Hce={class:"my-card"},Dce=oa(()=>k("div",null,"收银",-1)),Fce=oa(()=>k("div",null,"收银订单",-1)),Kce=oa(()=>k("div",null,"平台订单",-1)),Wce=oa(()=>k("div",null,"批发",-1)),jce=oa(()=>k("div",null,"批发订单",-1)),qce=oa(()=>k("div",null,"核销",-1)),Uce=oa(()=>k("div",null,"商品",-1)),Yce=oa(()=>k("div",null,"统计",-1)),Gce={__name:"myAside",setup(e){const t=ob(),n=tue(),o=s=>{t.push({name:s})},r=P(["home","order","orderSystem","saleHome","saleOrder","convert","shop","orderCount"]),a=()=>{let s=r.value.indexOf(n.name);s==0&&(s=r.value.length),s>0&&o(r.value[s-1])},l=()=>{let s=r.value.indexOf(n.name);s==r.value.length-1&&(s=-1),s{qn.on("up",a),qn.on("down",l)}),Ho(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Ge("Sell"),f=Ge("el-icon"),d=Ge("DataLine"),p=Ge("DataAnalysis"),h=Ge("Van"),m=Ge("Tickets"),v=Ge("FullScreen"),y=Ge("ShoppingBag"),g=Ge("Coin");return _(),M("div",Hce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:u[0]||(u[0]=w=>o("home"))},[W(f,{size:"30"},{default:X(()=>[W(c)]),_:1}),Dce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:u[1]||(u[1]=w=>o("order"))},[W(f,{size:"30"},{default:X(()=>[W(d)]),_:1}),Fce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderSystem"}]),onClick:u[2]||(u[2]=w=>o("orderSystem"))},[W(f,{size:"30"},{default:X(()=>[W(p)]),_:1}),Kce],2),k("div",{class:T(["list-item",{active:i(n).name=="saleHome"}]),onClick:u[3]||(u[3]=w=>o("saleHome"))},[W(f,{size:"30"},{default:X(()=>[W(h)]),_:1}),Wce],2),k("div",{class:T(["list-item",{active:i(n).name=="saleOrder"}]),onClick:u[4]||(u[4]=w=>o("saleOrder"))},[W(f,{size:"30"},{default:X(()=>[W(m)]),_:1}),jce],2),k("div",{class:T(["list-item",{active:i(n).name=="convert"}]),onClick:u[5]||(u[5]=w=>o("convert"))},[W(f,{size:"30"},{default:X(()=>[W(v)]),_:1}),qce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:u[6]||(u[6]=w=>o("shop"))},[W(f,{size:"30"},{default:X(()=>[W(y)]),_:1}),Uce],2),k("div",{class:T(["list-item",{active:i(n).name=="orderCount"}]),onClick:u[7]||(u[7]=w=>o("orderCount"))},[W(f,{size:"30"},{default:X(()=>[W(g)]),_:1}),Yce],2)])}}},Xce=dv(Gce,[["__scopeId","data-v-dbb96e9b"]]),Jce={class:"common-layout"},Zce={__name:"index",setup(e){const t=n=>{console.log("按下",n.keyCode),n.keyCode==16&&qn.emit("shift"),n.keyCode==120&&qn.emit("F9"),n.keyCode==13&&qn.emit("enter"),n.keyCode==37&&qn.emit("left"),n.keyCode==39&&qn.emit("right"),n.keyCode==38&&qn.emit("up"),n.keyCode==40&&qn.emit("down"),n.keyCode==46&&qn.emit("delete"),n.keyCode==45&&qn.emit("insert")};return et(()=>{window.addEventListener("keydown",t),console.log("开启键盘监听")}),Ho(()=>{window.removeEventListener("keydown",t),console.log("关闭键盘监听")}),(n,o)=>{const r=Ge("el-header"),a=Ge("el-aside"),l=Ge("router-view"),s=Ge("el-main"),u=Ge("el-container");return _(),M("div",Jce,[W(u,null,{default:X(()=>[W(r,null,{default:X(()=>[W(Bce)]),_:1}),W(u,null,{default:X(()=>[W(a,{width:"100px"},{default:X(()=>[W(Xce)]),_:1}),W(s,null,{default:X(()=>[W(l,{class:"my-main"},{default:X(({Component:c})=>[W(tn,{name:"el-zoom-in-top"},{default:X(()=>[(_(),le(it(c)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Qce=dv(Zce,[["__scopeId","data-v-64ddf17e"]]),ede=[{path:"/",name:"layout",component:Qce,redirect:"/home",meta:{title:"里海收银系统"},children:[{path:"/home",name:"home",meta:{title:"收银"},component:()=>go(()=>import("./index-RAiQ8ZiL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)},{path:"/order",name:"order",meta:{title:"收银订单"},component:()=>go(()=>import("./index-DC-gKzEm.js"),__vite__mapDeps([8,9,1,2,6,10,4,11]),import.meta.url)},{path:"/orderSystem",name:"orderSystem",meta:{title:"平台订单"},component:()=>go(()=>import("./indexSystem-RkjNE_Xi.js"),__vite__mapDeps([12,9,1,2,6,10,4,11]),import.meta.url)},{path:"/saleHome",name:"saleHome",meta:{title:"批发"},component:()=>go(()=>import("./index-CeB6n1Pj.js"),__vite__mapDeps([13,1,2,3,4,5,6,14]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"批发订单"},component:()=>go(()=>import("./index-BLjHE6Rj.js"),__vite__mapDeps([15,1,2,6,4,16]),import.meta.url)},{path:"/orderList",name:"orderList",meta:{title:"统计"},component:()=>go(()=>import("./indexList-B7wC4WB5.js"),__vite__mapDeps([17,1,2,6,18]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"统计"},component:()=>go(()=>import("./indexCount-DTZECtBi.js"),__vite__mapDeps([19,1,2,20]),import.meta.url)},{path:"/shop",name:"shop",component:()=>go(()=>import("./index-C8N4ffo0.js"),__vite__mapDeps([21,5,22]),import.meta.url)},{path:"/convert",name:"convert",component:()=>go(()=>import("./index-5epx37BL.js"),__vite__mapDeps([23,1,2,6,4,24]),import.meta.url)}]},{path:"/login",name:"login",component:()=>go(()=>import("./index-CYsZgCwo.js"),__vite__mapDeps([25,26]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>go(()=>import("./index-DSZ_WMrL.js"),__vite__mapDeps([]),import.meta.url)}],Tb=Qie({history:$ie(),routes:ede});Tb.beforeEach((e,t,n)=>{const o=rv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ob=Tb,Ni=Og(Z5);for(const[e,t]of Object.entries(ML))Ni.component(e,t);const tde=oue();Ni.use(Ob);Ni.use(tde);Ni.use(Use,{locale:Yse});Ni.mount("#app");export{ob as A,wr as B,Cr as C,xce as D,Ts as E,Ke as F,Ai as G,bt as H,y2 as I,S as J,ade as K,lde as L,dv as _,Ho as a,Ge as b,_ as c,le as d,k as e,W as f,gt as g,M as h,ht as i,xc as j,Mt as k,i as l,qn as m,We as n,et as o,T as p,tt as q,P as r,ne as s,Te as t,rv as u,j4 as v,X as w,q4 as x,sr as y,tue as z}; diff --git a/dist/assets/index-DNTUc2C9.js b/dist/assets/index-DNTUc2C9.js deleted file mode 100644 index d48e2ab..0000000 --- a/dist/assets/index-DNTUc2C9.js +++ /dev/null @@ -1 +0,0 @@ -import{o as r,d as o}from"./detail-RFFCHX7F.js";import{p as t}from"./padding-IWJ9EQ5v.js";import{c as a,h as s,f as e}from"./index-CEZ1QYTt.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import"./pay-DjmOAiUp.js";const c={class:"my-card"},u={__name:"index",setup(d){return(i,l)=>(a(),s("div",c,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/index-BtVtGQsy.js b/dist/assets/index-DSZ_WMrL.js similarity index 84% rename from dist/assets/index-BtVtGQsy.js rename to dist/assets/index-DSZ_WMrL.js index 2942b81..3d4e385 100644 --- a/dist/assets/index-BtVtGQsy.js +++ b/dist/assets/index-DSZ_WMrL.js @@ -1 +1 @@ -import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-CEZ1QYTt.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; +import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-DCKl20sY.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; diff --git a/dist/assets/index-DInWDOK8.js b/dist/assets/index-RAiQ8ZiL.js similarity index 97% rename from dist/assets/index-DInWDOK8.js rename to dist/assets/index-RAiQ8ZiL.js index bb8b30c..24a2204 100644 --- a/dist/assets/index-DInWDOK8.js +++ b/dist/assets/index-RAiQ8ZiL.js @@ -1 +1 @@ -import{c as ie,a as re,b as ee,d as ue,o as de}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import{_ as j,r as i,o as q,m as b,a as M,b as m,c as y,d as J,w as $,e,f as c,g as h,t as R,n as H,E as T,u as te,h as V,F as Q,i as W,j as oe,k as _e,l as B,p as se,q as ae,s as G,v as le,x as ne,y as pe,z as ve}from"./index-CEZ1QYTt.js";import{_ as fe}from"./lodash-BH6ba4wg.js";import{p as me}from"./padding-IWJ9EQ5v.js";import{g as he,s as ge}from"./shop-Co_PTsDS.js";import{p as ye}from"./pay-DjmOAiUp.js";const ke={class:"price"},be={class:"flex"},$e={style:{margin:"10px","padding-bottom":"40px"}},we={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},xe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(A,{expose:S,emit:k}){const a=i(!1),u=i(null),o=i(0),d=(n=!0,p=0)=>{l.value.nowPrice="",l.value.percentage="",a.value=n,o.value=p,H(()=>{setTimeout(()=>{var C;(C=u.value)==null||C.focus()},150)})},l=i({nowPrice:"",percentage:""}),v=n=>{l.value.percentage=(n/o.value*100).toFixed(2)},w=n=>{l.value.nowPrice=(o.value*n/100).toFixed(2)},F=k,I=()=>{if(l.value.percentage>100)return l.value.nowPrice="",l.value.percentage="",T.error("改价金额不能大于当前订单金额");if(l.value.nowPrice<=0)return l.value.nowPrice="",l.value.percentage="",T.error("金额不能小于0");F("changeAllPrice",l.value.nowPrice)};S({show:d,dialogVisible:a});const L=()=>{a.value&&I()};return q(()=>{b.on("enter",L)}),M(()=>{b.off("enter",L)}),(n,p)=>{const C=m("el-input"),D=m("el-button"),_=m("el-dialog");return y(),J(_,{modelValue:a.value,"onUpdate:modelValue":p[2]||(p[2]=f=>a.value=f),title:"订单改价",width:"650"},{footer:$(()=>[e("div",xe,[c(D,{class:"ok-btn",type:"primary",onClick:I},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),default:$(()=>[e("div",ke,[e("div",be,[c(C,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:l.value.nowPrice,"onUpdate:modelValue":p[0]||(p[0]=f=>l.value.nowPrice=f),type:"number",placeholder:"请输入改价后的价格",onInput:v},{suffix:$(()=>[h("元")]),_:1},8,["modelValue"]),c(C,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:l.value.percentage,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value.percentage=f),type:"number",placeholder:"请输入比例",onInput:w},{suffix:$(()=>[h("%")]),_:1},8,["modelValue"])]),e("div",$e,[h(" 改价后金额: "),e("span",we,"¥"+R(l.value.nowPrice||o.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ce=j(Ie,[["__scopeId","data-v-5c8bcd20"]]),Pe={class:"my-order"},Ve={class:"header-nav"},Ae={class:"nav-item"},Se={class:"order-list"},Fe={class:"order-item-info"},Le={class:"order-item-title"},Re={class:"title"},Ee=["onClick"],De={class:"order-item-sku"},ze=["onClick"],Ue={class:"order-item-price"},Oe={class:"order-footer"},qe={class:"order-total"},Me={class:"price"},Ne={class:"total-item"},Be={style:{"font-size":"1.4rem"}},Te={class:"total-item"},je={class:"update-price"},Ke={class:"order-btn"},Ge={__name:"order",emits:["goPay","editAttr"],setup(A,{expose:S,emit:k}){const a=i([]),u=i(0),o=i(0),d=i(0),l=te(),v=()=>{let t=[];a.value.map(r=>{t.push(r.cart_id)}),t.length!=0&&F(t)},w=t=>{a.value=a.value.filter(r=>r.cart_id!=t),F([t])},F=t=>{ie({cart_id:t}).then(r=>{console.log(r),I()})},I=()=>{u.value=0,o.value=0,d.value=0,re({staff_id:l.userInfo.service.service_id}).then(t=>{var r,x;((x=(r=t.data)==null?void 0:r.list)==null?void 0:x.length)>0?(a.value=t.data.list[0].list,a.value.forEach(P=>{u.value+=P.productAttr.price*P.cart_num}),o.value=u.value):a.value=[]})};I();const L=k,n=()=>{L("goPay")},p=(t,r)=>{ee(t.cart_id,{cart_num:t.cart_num}).then(x=>{u.value=0,a.value.forEach(P=>{u.value+=P.productAttr.price*P.cart_num}),o.value=u.value})},C=t=>{L("editPupop",t)},D=(t,r)=>{ee(t,r).then(x=>{I()})},_=t=>{d.value=o.value-t,u.value=+t,H(()=>{setTimeout(()=>{g(!1)},150)})};i(0);const f=i(null),g=(t=!0)=>{f.value.show(t,o.value)};S({getList:I,list:a,editItem:D,discounts:d,allPrice:u});const z=()=>{f.value.dialogVisible?f.value.dialogVisible=!1:g()},s=()=>{a.value.length>0&&v()};return q(()=>{b.on("insert",z),b.on("delete",s)}),M(()=>{b.off("insert",z),b.off("delete",s)}),(t,r)=>{const x=m("Delete"),P=m("el-icon"),O=m("el-empty"),U=m("el-image"),K=m("ArrowDown"),Y=m("el-input-number"),Z=m("el-button");return y(),V("div",Pe,[e("div",Ve,[e("div",Ae,[h(" 已选购 "),e("span",null,R(a.value.length),1),h(" 件 ")]),e("div",{class:"nav-item-clear",onClick:v},[c(P,null,{default:$(()=>[c(x)]),_:1}),h("清空 (Delete) ")])]),e("div",Se,[a.value.length==0?(y(),J(O,{key:0,description:"请点击右侧添加商品"})):(y(!0),V(Q,{key:1},W(a.value,(E,ce)=>(y(),V("div",{class:"order-item",key:ce},[c(U,{loading:"lazy",class:"order-item-img",src:E.productAttr&&E.productAttr.image||E.product.image},null,8,["src"]),e("div",Fe,[e("div",Le,[e("div",Re,R(E.spu.store_name),1),e("div",{class:"delete",onClick:N=>w(E.cart_id)},"删除",8,Ee)]),e("div",De,[e("span",{style:{display:"flex","align-items":"center"},onClick:N=>C(E)},[h("商品规格: "+R(E.productAttr.sku||"默认规格"),1),c(P,{size:"16",style:{"margin-left":"0.2rem"}},{default:$(()=>[c(K)]),_:1})],8,ze)]),e("div",Ue,[e("div",null,[h(" ¥"),e("span",null,R(E.productAttr.price),1)]),e("div",null,[c(Y,{modelValue:E.cart_num,"onUpdate:modelValue":N=>E.cart_num=N,"step-strictly":"",min:1,step:1,onChange:N=>p(E)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Oe,[e("div",qe,[e("div",Me,[e("div",Ne,[h(" 实付: "),e("span",null,[h("¥"),e("span",Be,R(u.value.toFixed(2)),1)])]),e("div",Te,[h(" 优惠: "),e("span",null,[h("¥"),e("span",null,R(d.value.toFixed(2)),1)])])]),e("div",je,[c(Z,{class:"btn",type:"primary",onClick:g},{default:$(()=>[h("改价 (Insert)")]),_:1})])]),e("div",Ke,[c(Z,{class:"btn",type:"primary",onClick:n,disabled:a.value.length==0},{default:$(()=>[h("立即结账 (F9)")]),_:1},8,["disabled"])])]),c(Ce,{ref_key:"priceRef",ref:f,onChangeAllPrice:_},null,512)])}}},Je=j(Ge,[["__scopeId","data-v-08d90ace"]]),X=A=>(le("data-v-f63718c9"),A=A(),ne(),A),He={class:"my-order"},Qe=X(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},ot=X(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),st=[ot],at={key:1,class:"no-stock"},lt=X(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],ct={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(A,{expose:S,emit:k}){const a=i(null),u=k,o=i(""),d=()=>{u("loadMore",{bar_code:o.value})},l=n=>{if(n.is_used==0)return T.error("该商品已被平台关闭");if(n.stock==0)return T.warning("该商品无库存");u("changeItem",n)},v=fe.throttle(()=>{u("getStoreList",{bar_code:o.value},!0)},300);S({bar_code:o});const w=i(!1),F=()=>{w.value=!0},I=()=>{w.value=!1},L=()=>{var n;(n=a.value)==null||n.focus()};return q(()=>{H(()=>{var n;(n=a.value)==null||n.focus(),F()}),b.on("shift",L)}),M(()=>{b.off("shift",L)}),(n,p)=>{const C=m("el-input"),D=m("Search"),_=m("el-icon"),f=m("el-button"),g=m("el-image"),z=m("el-space"),s=oe("infinite-scroll");return y(),V("div",He,[e("div",{class:se(["header-nav",{"input-focus":w.value}])},[Qe,e("div",We,[c(C,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=t=>o.value=t),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:a,onFocus:F,onBlur:I,onKeyup:_e(B(v),["enter"]),onClear:B(v)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:p[1]||(p[1]=(...t)=>B(v)&&B(v)(...t))},[c(f,{class:"btn",type:"primary"},{default:$(()=>[c(_,null,{default:$(()=>[c(D)]),_:1})]),_:1})])],2),ae((y(),V("div",Xe,[c(z,{wrap:"",size:20},{default:$(()=>[(y(!0),V(Q,null,W(A.storeList,(t,r)=>(y(),V("div",{class:"shop-item",key:r,onClick:x=>l(t)},[c(g,{loading:"lazy",src:t.image},null,8,["src"]),e("div",Ze,R(t.store_name),1),e("div",et,[h(" ¥"),e("span",null,R(t.price),1)]),t.stock==0?(y(),V("div",tt,st)):G("",!0),t.is_used==0?(y(),V("div",at,nt)):G("",!0)],8,Ye))),128))]),_:1})])),[[s,d]])])}}},it=j(ct,[["__scopeId","data-v-f63718c9"]]),rt=A=>(le("data-v-52f45b9b"),A=A(),ne(),A),ut={class:"shop"},dt={key:0,class:"shop-info"},_t={class:"shop-info-left"},pt={class:"shop-info-right"},vt={class:"shop-info-right-top"},ft={class:"shop-info-right-center"},mt={class:"shop-info-right-price"},ht={class:"shop-sku"},gt=rt(()=>e("div",{class:"title"},"产品",-1)),yt={class:"sku"},kt=["onClick"],bt={class:"dialog-footer"},$t={__name:"pupop",emits:["changeItem"],setup(A,{expose:S,emit:k}){const a=i(!1),u=_=>{a.value=_},o=i({}),d=i(null),l=i(!1),v=i("add"),w=i({}),F=(_,f="add")=>{v.value=f,f=="add"?(o.value=_,d.value=_.attr[0]):(l.value=!0,w.value=_,he(_.product_id).then(g=>{g.data.attrValue=JSON.parse(JSON.stringify(g.data.attr)),g.data.attr=Object.keys(g.data.sku),o.value=g.data,d.value=g.data.attr[0],l.value=!1}).catch(g=>{l.value=!1}))},I=k,L=()=>{v.value=="add"?I("changeItem",o.value,d.value):I("editItem",w.value.cart_id,{cart_num:w.value.cart_num,product_attr_unique:o.value.sku[d.value].unique}),a.value=!1},n=_=>{d.value=_};S({show:u,setForm:F});const p=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_>0)return n(o.value.attr[_-1])},C=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_{a.value&&L()};return q(()=>{b.on("left",p),b.on("right",C),b.on("enter",D)}),M(()=>{b.off("left",p),b.off("right",C),b.off("enter",D)}),(_,f)=>{const g=m("el-image"),z=m("el-space"),s=m("el-button"),t=m("el-dialog"),r=oe("loading");return y(),J(t,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),title:"商品规格",width:"650"},pe({default:$(()=>{var x,P,O;return[ae((y(),V("div",ut,[o.value.sku?(y(),V("div",dt,[e("div",_t,[c(g,{loading:"lazy",src:((x=o.value.sku[d.value])==null?void 0:x.image)||o.value.image},null,8,["src"])]),e("div",pt,[e("div",vt,R(o.value.store_name),1),e("div",ft,"库存"+R(((P=o.value.sku[d.value])==null?void 0:P.stock)||0),1),e("div",mt,[h("¥"),e("span",null,R(((O=o.value.sku[d.value])==null?void 0:O.price)||o.value.price),1)])])])):G("",!0),e("div",ht,[gt,e("div",yt,[c(z,{wrap:"",size:20},{default:$(()=>[(y(!0),V(Q,null,W(o.value.attr,(U,K)=>(y(),V("div",{class:se(["sku-item",{"sku-item_active":d.value==U}]),onClick:Y=>n(U),key:K},R(U||"默认规格"),11,kt))),128))]),_:1})])])])),[[r,l.value]])]}),_:2},[v.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:$(()=>[e("div",bt,[c(s,{class:"ok-btn",type:"primary",onClick:L},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},wt=j($t,[["__scopeId","data-v-52f45b9b"]]),xt={class:"my-card"},Ft={__name:"index",setup(A){const S=i(null),k=i(null),a=i(null),u=i(null),o=i([]),d=te(),l=ve(),v=i({page:0,limit:30}),w=(s={},t=!1)=>{v.value={staff_id:d.userInfo.service.service_id,...v.value,...s},t&&(o.value=[],v.value.page=1,F.value=!1),ge(d.userInfo.service.mer_id,v.value).then(r=>{var P,O;((O=(P=r.data)==null?void 0:P.list)==null?void 0:O.length)(U.attr=Object.keys(U.sku),U));o.value=o.value.concat(x),s.bar_code&&o.value.length==1&&L(s.bar_code)&&(a.value.bar_code="",p(o.value[0],o.value[0].attr[0]))})},F=i(!1),I=s=>{F.value||(v.value.page++,w(s))};function L(s){return/^\d+$/.test(s)}const n=(s,t="")=>{let r={is_new:0,product_id:s.product_id,cart_num:1,product_attr_unique:s.sku[t]!==void 0?s.sku[t].unique:"",staff_id:d.userInfo.service.service_id,product_type:0};ue(r).then(x=>{k.value.getList()})},p=(s,t)=>{if(!s.attr||s.attr.length==0||s.attr.length==1)return n(s,s.attr[0]?s.attr[0]:"");if(t)return n(s,t);S.value.setForm(s,"add"),S.value.show(!0)},C=(s,t)=>{k.value.editItem(s,t)},D=s=>{S.value.setForm(s,"edit"),S.value.show(!0)},_=()=>{let s=k.value.list.map(r=>r.cart_id),t={takes:[],use_coupon:{},use_integral:!1,cart_id:s};k.value.discounts>0&&(t.deduction_price=k.value.discounts.toFixed(2),t.pay_type="micropay"),de(t).then(r=>{u.value.setForm({data:r.data,cart_id:s})})},f=()=>{_(),u.value.drawer=!0},g=()=>{k.value.getList()},z=()=>{console.log("F9"),l.name=="home"&&(!u.value.drawer&&k.value.list.length>0?f():u.value.beforeClose())};return q(()=>{w(),v.value.page++,b.on("F9",z)}),M(()=>{b.off("F9",z)}),(s,t)=>(y(),V("div",xt,[c(Je,{ref_key:"orderRef",ref:k,onGoPay:f,onEditPupop:D},null,512),c(me),c(it,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:o.value,onGetStoreList:w,onChangeItem:p,onLoadMore:I},null,8,["storeList"]),c(wt,{ref_key:"pupopRef",ref:S,onChangeItem:p,onEditItem:C},null,512),c(ye,{ref_key:"payRef",ref:u,onPaySuccess:g},null,512)]))}};export{Ft as default}; +import{c as ie,a as re,b as ee,d as ue,o as de}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js";import{_ as j,r as i,o as q,m as b,a as M,b as m,c as y,d as J,w as $,e,f as c,g as h,t as R,n as H,E as T,u as te,h as V,F as Q,i as W,j as oe,k as _e,l as B,p as se,q as ae,s as G,v as le,x as ne,y as pe,z as ve}from"./index-DCKl20sY.js";import{_ as fe}from"./lodash-sOK8yL6t.js";import{p as me}from"./padding-CiGjC__s.js";import{g as he,s as ge}from"./shop-CAkzXRhR.js";import{p as ye}from"./pay-T7Krcb2W.js";const ke={class:"price"},be={class:"flex"},$e={style:{margin:"10px","padding-bottom":"40px"}},we={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},xe={class:"dialog-footer"},Ie={__name:"price",emits:["changeAllPrice"],setup(A,{expose:S,emit:k}){const a=i(!1),u=i(null),o=i(0),d=(n=!0,p=0)=>{l.value.nowPrice="",l.value.percentage="",a.value=n,o.value=p,H(()=>{setTimeout(()=>{var C;(C=u.value)==null||C.focus()},150)})},l=i({nowPrice:"",percentage:""}),v=n=>{l.value.percentage=(n/o.value*100).toFixed(2)},w=n=>{l.value.nowPrice=(o.value*n/100).toFixed(2)},F=k,I=()=>{if(l.value.percentage>100)return l.value.nowPrice="",l.value.percentage="",T.error("改价金额不能大于当前订单金额");if(l.value.nowPrice<=0)return l.value.nowPrice="",l.value.percentage="",T.error("金额不能小于0");F("changeAllPrice",l.value.nowPrice)};S({show:d,dialogVisible:a});const L=()=>{a.value&&I()};return q(()=>{b.on("enter",L)}),M(()=>{b.off("enter",L)}),(n,p)=>{const C=m("el-input"),D=m("el-button"),_=m("el-dialog");return y(),J(_,{modelValue:a.value,"onUpdate:modelValue":p[2]||(p[2]=f=>a.value=f),title:"订单改价",width:"650"},{footer:$(()=>[e("div",xe,[c(D,{class:"ok-btn",type:"primary",onClick:I},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),default:$(()=>[e("div",ke,[e("div",be,[c(C,{ref_key:"priceRef",ref:u,style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:l.value.nowPrice,"onUpdate:modelValue":p[0]||(p[0]=f=>l.value.nowPrice=f),type:"number",placeholder:"请输入改价后的价格",onInput:v},{suffix:$(()=>[h("元")]),_:1},8,["modelValue"]),c(C,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:l.value.percentage,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value.percentage=f),type:"number",placeholder:"请输入比例",onInput:w},{suffix:$(()=>[h("%")]),_:1},8,["modelValue"])]),e("div",$e,[h(" 改价后金额: "),e("span",we,"¥"+R(l.value.nowPrice||o.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Ce=j(Ie,[["__scopeId","data-v-5c8bcd20"]]),Pe={class:"my-order"},Ve={class:"header-nav"},Ae={class:"nav-item"},Se={class:"order-list"},Fe={class:"order-item-info"},Le={class:"order-item-title"},Re={class:"title"},Ee=["onClick"],De={class:"order-item-sku"},ze=["onClick"],Ue={class:"order-item-price"},Oe={class:"order-footer"},qe={class:"order-total"},Me={class:"price"},Ne={class:"total-item"},Be={style:{"font-size":"1.4rem"}},Te={class:"total-item"},je={class:"update-price"},Ke={class:"order-btn"},Ge={__name:"order",emits:["goPay","editAttr"],setup(A,{expose:S,emit:k}){const a=i([]),u=i(0),o=i(0),d=i(0),l=te(),v=()=>{let t=[];a.value.map(r=>{t.push(r.cart_id)}),t.length!=0&&F(t)},w=t=>{a.value=a.value.filter(r=>r.cart_id!=t),F([t])},F=t=>{ie({cart_id:t}).then(r=>{console.log(r),I()})},I=()=>{u.value=0,o.value=0,d.value=0,re({staff_id:l.userInfo.service.service_id}).then(t=>{var r,x;((x=(r=t.data)==null?void 0:r.list)==null?void 0:x.length)>0?(a.value=t.data.list[0].list,a.value.forEach(P=>{u.value+=P.productAttr.price*P.cart_num}),o.value=u.value):a.value=[]})};I();const L=k,n=()=>{L("goPay")},p=(t,r)=>{ee(t.cart_id,{cart_num:t.cart_num}).then(x=>{u.value=0,a.value.forEach(P=>{u.value+=P.productAttr.price*P.cart_num}),o.value=u.value})},C=t=>{L("editPupop",t)},D=(t,r)=>{ee(t,r).then(x=>{I()})},_=t=>{d.value=o.value-t,u.value=+t,H(()=>{setTimeout(()=>{g(!1)},150)})};i(0);const f=i(null),g=(t=!0)=>{f.value.show(t,o.value)};S({getList:I,list:a,editItem:D,discounts:d,allPrice:u});const z=()=>{f.value.dialogVisible?f.value.dialogVisible=!1:g()},s=()=>{a.value.length>0&&v()};return q(()=>{b.on("insert",z),b.on("delete",s)}),M(()=>{b.off("insert",z),b.off("delete",s)}),(t,r)=>{const x=m("Delete"),P=m("el-icon"),O=m("el-empty"),U=m("el-image"),K=m("ArrowDown"),Y=m("el-input-number"),Z=m("el-button");return y(),V("div",Pe,[e("div",Ve,[e("div",Ae,[h(" 已选购 "),e("span",null,R(a.value.length),1),h(" 件 ")]),e("div",{class:"nav-item-clear",onClick:v},[c(P,null,{default:$(()=>[c(x)]),_:1}),h("清空 (Delete) ")])]),e("div",Se,[a.value.length==0?(y(),J(O,{key:0,description:"请点击右侧添加商品"})):(y(!0),V(Q,{key:1},W(a.value,(E,ce)=>(y(),V("div",{class:"order-item",key:ce},[c(U,{loading:"lazy",class:"order-item-img",src:E.productAttr&&E.productAttr.image||E.product.image},null,8,["src"]),e("div",Fe,[e("div",Le,[e("div",Re,R(E.spu.store_name),1),e("div",{class:"delete",onClick:N=>w(E.cart_id)},"删除",8,Ee)]),e("div",De,[e("span",{style:{display:"flex","align-items":"center"},onClick:N=>C(E)},[h("商品规格: "+R(E.productAttr.sku||"默认规格"),1),c(P,{size:"16",style:{"margin-left":"0.2rem"}},{default:$(()=>[c(K)]),_:1})],8,ze)]),e("div",Ue,[e("div",null,[h(" ¥"),e("span",null,R(E.productAttr.price),1)]),e("div",null,[c(Y,{modelValue:E.cart_num,"onUpdate:modelValue":N=>E.cart_num=N,"step-strictly":"",min:1,step:1,onChange:N=>p(E)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Oe,[e("div",qe,[e("div",Me,[e("div",Ne,[h(" 实付: "),e("span",null,[h("¥"),e("span",Be,R(u.value.toFixed(2)),1)])]),e("div",Te,[h(" 优惠: "),e("span",null,[h("¥"),e("span",null,R(d.value.toFixed(2)),1)])])]),e("div",je,[c(Z,{class:"btn",type:"primary",onClick:g},{default:$(()=>[h("改价 (Insert)")]),_:1})])]),e("div",Ke,[c(Z,{class:"btn",type:"primary",onClick:n,disabled:a.value.length==0},{default:$(()=>[h("立即结账 (F9)")]),_:1},8,["disabled"])])]),c(Ce,{ref_key:"priceRef",ref:f,onChangeAllPrice:_},null,512)])}}},Je=j(Ge,[["__scopeId","data-v-08d90ace"]]),X=A=>(le("data-v-f63718c9"),A=A(),ne(),A),He={class:"my-order"},Qe=X(()=>e("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),We={class:"nav-item-input"},Xe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500","infinite-scroll-immediate":!1,style:{overflow:"auto"}},Ye=["onClick"],Ze={class:"shop-name"},et={class:"shop-price"},tt={key:0,class:"no-stock"},ot=X(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),st=[ot],at={key:1,class:"no-stock"},lt=X(()=>e("div",null,[e("span",null,"平台"),e("span",null,"关闭")],-1)),nt=[lt],ct={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(A,{expose:S,emit:k}){const a=i(null),u=k,o=i(""),d=()=>{u("loadMore",{bar_code:o.value})},l=n=>{if(n.is_used==0)return T.error("该商品已被平台关闭");if(n.stock==0)return T.warning("该商品无库存");u("changeItem",n)},v=fe.throttle(()=>{u("getStoreList",{bar_code:o.value},!0)},300);S({bar_code:o});const w=i(!1),F=()=>{w.value=!0},I=()=>{w.value=!1},L=()=>{var n;(n=a.value)==null||n.focus()};return q(()=>{H(()=>{var n;(n=a.value)==null||n.focus(),F()}),b.on("shift",L)}),M(()=>{b.off("shift",L)}),(n,p)=>{const C=m("el-input"),D=m("Search"),_=m("el-icon"),f=m("el-button"),g=m("el-image"),z=m("el-space"),s=oe("infinite-scroll");return y(),V("div",He,[e("div",{class:se(["header-nav",{"input-focus":w.value}])},[Qe,e("div",We,[c(C,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=t=>o.value=t),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:a,onFocus:F,onBlur:I,onKeyup:_e(B(v),["enter"]),onClear:B(v)},null,8,["modelValue","onKeyup","onClear"])]),e("div",{class:"nav-item-btn",onClick:p[1]||(p[1]=(...t)=>B(v)&&B(v)(...t))},[c(f,{class:"btn",type:"primary"},{default:$(()=>[c(_,null,{default:$(()=>[c(D)]),_:1})]),_:1})])],2),ae((y(),V("div",Xe,[c(z,{wrap:"",size:20},{default:$(()=>[(y(!0),V(Q,null,W(A.storeList,(t,r)=>(y(),V("div",{class:"shop-item",key:r,onClick:x=>l(t)},[c(g,{loading:"lazy",src:t.image},null,8,["src"]),e("div",Ze,R(t.store_name),1),e("div",et,[h(" ¥"),e("span",null,R(t.price),1)]),t.stock==0?(y(),V("div",tt,st)):G("",!0),t.is_used==0?(y(),V("div",at,nt)):G("",!0)],8,Ye))),128))]),_:1})])),[[s,d]])])}}},it=j(ct,[["__scopeId","data-v-f63718c9"]]),rt=A=>(le("data-v-52f45b9b"),A=A(),ne(),A),ut={class:"shop"},dt={key:0,class:"shop-info"},_t={class:"shop-info-left"},pt={class:"shop-info-right"},vt={class:"shop-info-right-top"},ft={class:"shop-info-right-center"},mt={class:"shop-info-right-price"},ht={class:"shop-sku"},gt=rt(()=>e("div",{class:"title"},"产品",-1)),yt={class:"sku"},kt=["onClick"],bt={class:"dialog-footer"},$t={__name:"pupop",emits:["changeItem"],setup(A,{expose:S,emit:k}){const a=i(!1),u=_=>{a.value=_},o=i({}),d=i(null),l=i(!1),v=i("add"),w=i({}),F=(_,f="add")=>{v.value=f,f=="add"?(o.value=_,d.value=_.attr[0]):(l.value=!0,w.value=_,he(_.product_id).then(g=>{g.data.attrValue=JSON.parse(JSON.stringify(g.data.attr)),g.data.attr=Object.keys(g.data.sku),o.value=g.data,d.value=g.data.attr[0],l.value=!1}).catch(g=>{l.value=!1}))},I=k,L=()=>{v.value=="add"?I("changeItem",o.value,d.value):I("editItem",w.value.cart_id,{cart_num:w.value.cart_num,product_attr_unique:o.value.sku[d.value].unique}),a.value=!1},n=_=>{d.value=_};S({show:u,setForm:F});const p=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_>0)return n(o.value.attr[_-1])},C=()=>{if(!a.value)return;let _=o.value.attr.indexOf(d.value);if(_{a.value&&L()};return q(()=>{b.on("left",p),b.on("right",C),b.on("enter",D)}),M(()=>{b.off("left",p),b.off("right",C),b.off("enter",D)}),(_,f)=>{const g=m("el-image"),z=m("el-space"),s=m("el-button"),t=m("el-dialog"),r=oe("loading");return y(),J(t,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),title:"商品规格",width:"650"},pe({default:$(()=>{var x,P,O;return[ae((y(),V("div",ut,[o.value.sku?(y(),V("div",dt,[e("div",_t,[c(g,{loading:"lazy",src:((x=o.value.sku[d.value])==null?void 0:x.image)||o.value.image},null,8,["src"])]),e("div",pt,[e("div",vt,R(o.value.store_name),1),e("div",ft,"库存"+R(((P=o.value.sku[d.value])==null?void 0:P.stock)||0),1),e("div",mt,[h("¥"),e("span",null,R(((O=o.value.sku[d.value])==null?void 0:O.price)||o.value.price),1)])])])):G("",!0),e("div",ht,[gt,e("div",yt,[c(z,{wrap:"",size:20},{default:$(()=>[(y(!0),V(Q,null,W(o.value.attr,(U,K)=>(y(),V("div",{class:se(["sku-item",{"sku-item_active":d.value==U}]),onClick:Y=>n(U),key:K},R(U||"默认规格"),11,kt))),128))]),_:1})])])])),[[r,l.value]])]}),_:2},[v.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:$(()=>[e("div",bt,[c(s,{class:"ok-btn",type:"primary",onClick:L},{default:$(()=>[h(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},wt=j($t,[["__scopeId","data-v-52f45b9b"]]),xt={class:"my-card"},Ft={__name:"index",setup(A){const S=i(null),k=i(null),a=i(null),u=i(null),o=i([]),d=te(),l=ve(),v=i({page:0,limit:30}),w=(s={},t=!1)=>{v.value={staff_id:d.userInfo.service.service_id,...v.value,...s},t&&(o.value=[],v.value.page=1,F.value=!1),ge(d.userInfo.service.mer_id,v.value).then(r=>{var P,O;((O=(P=r.data)==null?void 0:P.list)==null?void 0:O.length)(U.attr=Object.keys(U.sku),U));o.value=o.value.concat(x),s.bar_code&&o.value.length==1&&L(s.bar_code)&&(a.value.bar_code="",p(o.value[0],o.value[0].attr[0]))})},F=i(!1),I=s=>{F.value||(v.value.page++,w(s))};function L(s){return/^\d+$/.test(s)}const n=(s,t="")=>{let r={is_new:0,product_id:s.product_id,cart_num:1,product_attr_unique:s.sku[t]!==void 0?s.sku[t].unique:"",staff_id:d.userInfo.service.service_id,product_type:0};ue(r).then(x=>{k.value.getList()})},p=(s,t)=>{if(!s.attr||s.attr.length==0||s.attr.length==1)return n(s,s.attr[0]?s.attr[0]:"");if(t)return n(s,t);S.value.setForm(s,"add"),S.value.show(!0)},C=(s,t)=>{k.value.editItem(s,t)},D=s=>{S.value.setForm(s,"edit"),S.value.show(!0)},_=()=>{let s=k.value.list.map(r=>r.cart_id),t={takes:[],use_coupon:{},use_integral:!1,cart_id:s};k.value.discounts>0&&(t.deduction_price=k.value.discounts.toFixed(2),t.pay_type="micropay"),de(t).then(r=>{u.value.setForm({data:r.data,cart_id:s})})},f=()=>{_(),u.value.drawer=!0},g=()=>{k.value.getList()},z=()=>{console.log("F9"),l.name=="home"&&(!u.value.drawer&&k.value.list.length>0?f():u.value.beforeClose())};return q(()=>{w(),v.value.page++,b.on("F9",z)}),M(()=>{b.off("F9",z)}),(s,t)=>(y(),V("div",xt,[c(Je,{ref_key:"orderRef",ref:k,onGoPay:f,onEditPupop:D},null,512),c(me),c(it,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:o.value,onGetStoreList:w,onChangeItem:p,onLoadMore:I},null,8,["storeList"]),c(wt,{ref_key:"pupopRef",ref:S,onChangeItem:p,onEditItem:C},null,512),c(ye,{ref_key:"payRef",ref:u,onPaySuccess:g},null,512)]))}};export{Ft as default}; diff --git a/dist/assets/indexCount-Tj_lyoEF.js b/dist/assets/indexCount-DTZECtBi.js similarity index 95% rename from dist/assets/indexCount-Tj_lyoEF.js rename to dist/assets/indexCount-DTZECtBi.js index 39e5ec2..6db9226 100644 --- a/dist/assets/indexCount-Tj_lyoEF.js +++ b/dist/assets/indexCount-DTZECtBi.js @@ -1 +1 @@ -import{h as x,s as P}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import{_ as b,u as w,r as o,b as u,j as I,q as S,c as p,h,e,t,s as C,f as i,w as m,g as D,v as F,x as N,A as V}from"./index-CEZ1QYTt.js";const a=c=>(F("data-v-891907f0"),c=c(),N(),c),k={"element-loading-text":"加载中",class:"my-order"},A={key:0,class:"from"},B={class:"form-card green"},L=a(()=>e("div",{class:"tips"},"今日线上收银金额",-1)),O={class:"form-card green"},j=a(()=>e("div",{class:"tips"},"昨日线上收银金额",-1)),q={class:"form-card green"},E=a(()=>e("div",{class:"tips"},"本月线上收银金额",-1)),R={class:"form-card"},T=a(()=>e("div",{class:"tips"},"今日收银 线上+现金 总金额",-1)),U={class:"form-card"},z=a(()=>e("div",{class:"tips"},"本月收银 线上+现金 总金额",-1)),G={class:"form-card red"},H=a(()=>e("div",{class:"tips"},"今日现金收银金额",-1)),J={class:"form-card red"},K=a(()=>e("div",{class:"tips"},"昨日现金收银金额",-1)),M={class:"form-card red"},Q=a(()=>e("div",{class:"tips"},"本月现金收银金额",-1)),W={class:"form-card"},X=a(()=>e("div",{class:"tips"},"昨日收银 线上+现金 总金额",-1)),Y={class:"table"},Z={__name:"indexCount",setup(c){const l=w(),_=o([]);V(),o(1),o(null);const y=o({page:1,limit:15,staff_id:l.userInfo.service.service_id}),n=o(!1);o(0),(()=>{x(l.userInfo.service.mer_id,y.value).then(r=>{_.value=r.data})})();const s=o({});return(()=>{n.value=!0,P(l.userInfo.service.mer_id,{staff_id:l.userInfo.service.service_id}).then(r=>{s.value=r.data.data,n.value=!1})})(),(r,se)=>{const d=u("el-table-column"),f=u("el-table"),g=I("loading");return S((p(),h("div",k,[s.value.today?(p(),h("div",A,[e("div",B,[e("div",null,t(s.value.today.payPrice),1),L]),e("div",O,[e("div",null,t(s.value.yesterday.payPrice),1),j]),e("div",q,[e("div",null,t(s.value.month.payPrice),1),E]),e("div",R,[e("div",null,t((s.value.today.cashPayment+s.value.today.payPrice).toFixed(2)),1),T]),e("div",U,[e("div",null,t((s.value.month.cashPayment+s.value.month.payPrice).toFixed(2)),1),z]),e("div",G,[e("div",null,t(s.value.today.cashPayment),1),H]),e("div",J,[e("div",null,t(s.value.yesterday.cashPayment),1),K]),e("div",M,[e("div",null,t(s.value.month.cashPayment),1),Q]),e("div",W,[e("div",null,t((s.value.yesterday.cashPayment+s.value.yesterday.payPrice).toFixed(2)),1),X])])):C("",!0),e("div",Y,[i(f,{data:_.value,style:{width:"100%"}},{default:m(()=>[i(d,{prop:"day",label:"日期",width:"260"}),i(d,{prop:"total",label:"订单数量"}),i(d,{prop:"cash_payment",label:"现金收银金额"}),i(d,{prop:"pay_price",label:"线上收银金额"}),i(d,{label:"总金额"},{default:m(v=>[D(t(((+v.row.pay_price||0)+(+v.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[g,n.value]])}}},oe=b(Z,[["__scopeId","data-v-891907f0"]]);export{oe as default}; +import{h as x,s as P}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js";import{_ as b,u as w,r as o,b as u,j as I,q as S,c as p,h,e,t,s as C,f as i,w as m,g as D,v as F,x as N,A as V}from"./index-DCKl20sY.js";const a=c=>(F("data-v-891907f0"),c=c(),N(),c),k={"element-loading-text":"加载中",class:"my-order"},A={key:0,class:"from"},B={class:"form-card green"},L=a(()=>e("div",{class:"tips"},"今日线上收银金额",-1)),O={class:"form-card green"},j=a(()=>e("div",{class:"tips"},"昨日线上收银金额",-1)),q={class:"form-card green"},E=a(()=>e("div",{class:"tips"},"本月线上收银金额",-1)),R={class:"form-card"},T=a(()=>e("div",{class:"tips"},"今日收银 线上+现金 总金额",-1)),U={class:"form-card"},z=a(()=>e("div",{class:"tips"},"本月收银 线上+现金 总金额",-1)),G={class:"form-card red"},H=a(()=>e("div",{class:"tips"},"今日现金收银金额",-1)),J={class:"form-card red"},K=a(()=>e("div",{class:"tips"},"昨日现金收银金额",-1)),M={class:"form-card red"},Q=a(()=>e("div",{class:"tips"},"本月现金收银金额",-1)),W={class:"form-card"},X=a(()=>e("div",{class:"tips"},"昨日收银 线上+现金 总金额",-1)),Y={class:"table"},Z={__name:"indexCount",setup(c){const l=w(),_=o([]);V(),o(1),o(null);const y=o({page:1,limit:15,staff_id:l.userInfo.service.service_id}),n=o(!1);o(0),(()=>{x(l.userInfo.service.mer_id,y.value).then(r=>{_.value=r.data})})();const s=o({});return(()=>{n.value=!0,P(l.userInfo.service.mer_id,{staff_id:l.userInfo.service.service_id}).then(r=>{s.value=r.data.data,n.value=!1})})(),(r,se)=>{const d=u("el-table-column"),f=u("el-table"),g=I("loading");return S((p(),h("div",k,[s.value.today?(p(),h("div",A,[e("div",B,[e("div",null,t(s.value.today.payPrice),1),L]),e("div",O,[e("div",null,t(s.value.yesterday.payPrice),1),j]),e("div",q,[e("div",null,t(s.value.month.payPrice),1),E]),e("div",R,[e("div",null,t((s.value.today.cashPayment+s.value.today.payPrice).toFixed(2)),1),T]),e("div",U,[e("div",null,t((s.value.month.cashPayment+s.value.month.payPrice).toFixed(2)),1),z]),e("div",G,[e("div",null,t(s.value.today.cashPayment),1),H]),e("div",J,[e("div",null,t(s.value.yesterday.cashPayment),1),K]),e("div",M,[e("div",null,t(s.value.month.cashPayment),1),Q]),e("div",W,[e("div",null,t((s.value.yesterday.cashPayment+s.value.yesterday.payPrice).toFixed(2)),1),X])])):C("",!0),e("div",Y,[i(f,{data:_.value,style:{width:"100%"}},{default:m(()=>[i(d,{prop:"day",label:"日期",width:"260"}),i(d,{prop:"total",label:"订单数量"}),i(d,{prop:"cash_payment",label:"现金收银金额"}),i(d,{prop:"pay_price",label:"线上收银金额"}),i(d,{label:"总金额"},{default:m(v=>[D(t(((+v.row.pay_price||0)+(+v.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[g,n.value]])}}},oe=b(Z,[["__scopeId","data-v-891907f0"]]);export{oe as default}; diff --git a/dist/assets/indexList-Bbfw8qYS.js b/dist/assets/indexList-B7wC4WB5.js similarity index 96% rename from dist/assets/indexList-Bbfw8qYS.js rename to dist/assets/indexList-B7wC4WB5.js index aea9530..baaa675 100644 --- a/dist/assets/indexList-Bbfw8qYS.js +++ b/dist/assets/indexList-B7wC4WB5.js @@ -1 +1 @@ -import{e as F,a as G,g as J,f as K}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import{_ as Q,u as W,r as s,b as d,j as X,q as Y,c as u,h as m,f as t,w as o,g as r,t as Z,e as P,d as I,A as ee,E as h,v as te,x as ae}from"./index-CEZ1QYTt.js";import{p as oe}from"./pay-DjmOAiUp.js";const le=v=>(te("data-v-80048b20"),v=v(),ae(),v),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ue=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ce={class:"dialog-footer"},pe={__name:"indexList",setup(v){const k=W(),C=s([]),b=ee(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),w=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(k.userInfo.service.mer_id,n.value).then(e=>{C.value=e.data.list,w.value=e.data.count,y.value=!1})};i();const x=s(0);(()=>{G({staff_id:k.userInfo.service.service_id}).then(e=>{var a;x.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},E=e=>{J({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),U=()=>{_.value=!1,K({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),z=e=>{L.value=e,_.value=!0},O=()=>{b.push({name:"home"})};return(e,a)=>{const S=d("el-radio-button"),T=d("el-radio-group"),c=d("el-table-column"),p=d("el-button"),j=d("el-table"),q=d("el-pagination"),H=d("el-dialog"),M=X("loading");return Y((u(),m("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(S,{value:1},{default:o(()=>[r("全部")]),_:1}),t(S,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(c,{prop:"group_order_id",label:"ID",width:"100"}),t(c,{prop:"order_sn",label:"订单号",width:"260"}),t(c,{prop:"total_price",label:"订单金额"}),t(c,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(u(),m("span",ne,"已支付")):(u(),m("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),m("span",ie,Z(l.row.pay_time),1)):(u(),m("div",de,[t(p,{type:"primary",link:"",onClick:V=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>E(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(q,{"page-size":n.value.limit,layout:"prev, pager, next",total:w.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(oe,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(H,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ce,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(u(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(u(),I(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ue]),_:1},8,["modelValue"])])),[[M,y.value]])}}},fe=Q(pe,[["__scopeId","data-v-80048b20"]]);export{fe as default}; +import{e as F,a as G,g as J,f as K}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js";import{_ as Q,u as W,r as s,b as d,j as X,q as Y,c as u,h as m,f as t,w as o,g as r,t as Z,e as P,d as I,A as ee,E as h,v as te,x as ae}from"./index-DCKl20sY.js";import{p as oe}from"./pay-T7Krcb2W.js";const le=v=>(te("data-v-80048b20"),v=v(),ae(),v),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ue=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ce={class:"dialog-footer"},pe={__name:"indexList",setup(v){const k=W(),C=s([]),b=ee(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),w=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(k.userInfo.service.mer_id,n.value).then(e=>{C.value=e.data.list,w.value=e.data.count,y.value=!1})};i();const x=s(0);(()=>{G({staff_id:k.userInfo.service.service_id}).then(e=>{var a;x.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},E=e=>{J({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),U=()=>{_.value=!1,K({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),z=e=>{L.value=e,_.value=!0},O=()=>{b.push({name:"home"})};return(e,a)=>{const S=d("el-radio-button"),T=d("el-radio-group"),c=d("el-table-column"),p=d("el-button"),j=d("el-table"),q=d("el-pagination"),H=d("el-dialog"),M=X("loading");return Y((u(),m("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(S,{value:1},{default:o(()=>[r("全部")]),_:1}),t(S,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(c,{prop:"group_order_id",label:"ID",width:"100"}),t(c,{prop:"order_sn",label:"订单号",width:"260"}),t(c,{prop:"total_price",label:"订单金额"}),t(c,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(u(),m("span",ne,"已支付")):(u(),m("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),m("span",ie,Z(l.row.pay_time),1)):(u(),m("div",de,[t(p,{type:"primary",link:"",onClick:V=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>E(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(q,{"page-size":n.value.limit,layout:"prev, pager, next",total:w.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(oe,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(H,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ce,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(u(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(u(),I(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ue]),_:1},8,["modelValue"])])),[[M,y.value]])}}},fe=Q(pe,[["__scopeId","data-v-80048b20"]]);export{fe as default}; diff --git a/dist/assets/indexSystem-BRT8g_VH.js b/dist/assets/indexSystem-BRT8g_VH.js deleted file mode 100644 index e294b19..0000000 --- a/dist/assets/indexSystem-BRT8g_VH.js +++ /dev/null @@ -1 +0,0 @@ -import{o as r,d as t}from"./detail-RFFCHX7F.js";import{p as o}from"./padding-IWJ9EQ5v.js";import{c as s,h as a,f as e}from"./index-CEZ1QYTt.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import"./pay-DjmOAiUp.js";const i={class:"my-card"},u={__name:"indexSystem",setup(m){return(c,d)=>(s(),a("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef",isSystem:""},null,512),e(o),e(t,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/indexSystem-RkjNE_Xi.js b/dist/assets/indexSystem-RkjNE_Xi.js new file mode 100644 index 0000000..3982dbf --- /dev/null +++ b/dist/assets/indexSystem-RkjNE_Xi.js @@ -0,0 +1 @@ +import{o as r,d as t}from"./detail-v5kbvKzr.js";import{p as o}from"./padding-CiGjC__s.js";import{c as s,h as a,f as e}from"./index-DCKl20sY.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js";import"./pay-T7Krcb2W.js";const i={class:"my-card"},u={__name:"indexSystem",setup(m){return(c,d)=>(s(),a("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef",isSystem:""},null,512),e(o),e(t,{ref:"detailRef"},null,512)]))}};export{u as default}; diff --git a/dist/assets/lodash-BH6ba4wg.js b/dist/assets/lodash-sOK8yL6t.js similarity index 99% rename from dist/assets/lodash-BH6ba4wg.js rename to dist/assets/lodash-sOK8yL6t.js index 0c53af5..3a9068b 100644 --- a/dist/assets/lodash-BH6ba4wg.js +++ b/dist/assets/lodash-sOK8yL6t.js @@ -1,4 +1,4 @@ -import{B as jt,C as rp}from"./index-CEZ1QYTt.js";var Je={exports:{}};/** +import{B as jt,C as rp}from"./index-DCKl20sY.js";var Je={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors diff --git a/dist/assets/padding-IWJ9EQ5v.js b/dist/assets/padding-CiGjC__s.js similarity index 65% rename from dist/assets/padding-IWJ9EQ5v.js rename to dist/assets/padding-CiGjC__s.js index 869878f..186bbda 100644 --- a/dist/assets/padding-IWJ9EQ5v.js +++ b/dist/assets/padding-CiGjC__s.js @@ -1 +1 @@ -import{_ as e,c as t,h as c}from"./index-CEZ1QYTt.js";const n={},o={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",o)}const i=e(n,[["render",s]]);export{i as p}; +import{_ as e,c as t,h as c}from"./index-DCKl20sY.js";const n={},o={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",o)}const i=e(n,[["render",s]]);export{i as p}; diff --git a/dist/assets/pay-DjmOAiUp.js b/dist/assets/pay-T7Krcb2W.js similarity index 97% rename from dist/assets/pay-DjmOAiUp.js rename to dist/assets/pay-T7Krcb2W.js index ae6b02e..0db623f 100644 --- a/dist/assets/pay-DjmOAiUp.js +++ b/dist/assets/pay-T7Krcb2W.js @@ -1 +1 @@ -import{_ as de,r as o,u as ve,J as _e,o as fe,m as F,a as pe,b as D,j as me,c as y,d as X,w as g,e as t,p as R,g as V,t as P,q as ye,h as C,f as S,k as ge,F as he,i as ke,n as B,E as _,v as be,x as we}from"./index-CEZ1QYTt.js";import{j as Y,k as Ce,g as Se}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";const A=b=>{if(!b)return;let T=new window.SpeechSynthesisUtterance(b);window.speechSynthesis.speak(T)},E=b=>(be("data-v-80c4a58e"),b=b(),we(),b),xe=E(()=>t("h4",null,"选择支付方式",-1)),Ve={class:"dra-body"},Be={class:"header"},Ee=E(()=>t("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),$e={style:{color:"#f5222d","padding-bottom":"2rem"}},je={style:{"font-size":"1.6rem"}},Fe={key:0,"element-loading-text":"支付中",class:"card1"},De=E(()=>t("div",{class:"tips"},null,-1)),Ie={key:1,class:"card2"},Le={class:"drawer-body"},Pe={class:"counter"},Ae={class:"received"},Te={key:0},Ue={key:1,style:{"font-size":"1rem",color:"#999"}},ze={key:0,class:"balance"},Ne={class:"money"},Oe=E(()=>t("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Re={key:1,class:"balance"},qe=E(()=>t("div",null,"不够找零, 请支付更多金额",-1)),Ke=E(()=>t("div",{class:"tips"},"按下小键盘输入金额",-1)),Me=[qe,Ke],Je={class:"keypad"},We={class:"left"},Ge={class:"right"},He={style:{width:"100%",display:"flex","justify-content":"center"}},Qe={__name:"pay",emits:["paySuccess"],setup(b,{expose:T,emit:Z}){const f=o(!1),p=o(1),l=o(""),i=o(""),q=ve(),ee=()=>{h()},ae=()=>{B(()=>{setTimeout(()=>{var a;n.value=!1,l.value="",z.value=!0,(a=i.value)==null||a.focus(),w(p.value)},300)})},w=a=>{p.value=a,p.value==2?window.addEventListener("keydown",O):(window.removeEventListener("keydown",O),B(()=>{var e;l.value="",(e=i.value)==null||e.focus()}))},m=o({}),U=o([]),se=a=>{m.value=a.data,U.value=a.cart_id},te=a=>{m.value.order_price=a.price,d.value=a.order_id},le=Z,z=o(!1),oe=o(["1","2","3","4","5","6","7","8","9","0","00","."]);let x=0;const K=/^(10|11|12|13|14|15)\d{16}$/,M=/^(25|26|27|28|29|30)\d{14,22}$/,d=o(""),ue=()=>{if(n.value=!0,i.value.blur(),d.value)J(d.value);else{let a;if(K.test(l.value))a="micropay";else if(M.test(l.value))a="alipayBar";else return n.value=!1,l.value="",i.value.focus(),_.error("请输入正确的支付码");Y({address_id:"",key:m.value.key,cart_id:U.value,pay_type:a,auth_code:l.value,staff_id:q.userInfo.service.service_id}).then(e=>{if(e.status==200&&(e.message=="支付成功"||e.message=="success"))f.value=!1,_({message:e.message=="success"?"支付成功":e.message,type:"success"}),A(e.data.message||e.data.result.message),h();else if(e.data.group_order_sn)d.value=e.data.group_order_id,$.value=0,x=0,I(e.data.group_order_sn);else return d.value=e.data.result.order_id,n.value=!1,_({message:e.message,type:"error"})}).catch(e=>{n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()})})}},J=a=>{let e;if(p.value==1){let s;if(K.test(l.value))s="micropay";else if(M.test(l.value))s="alipayBar";else return n.value=!1,l.value="",i.value.focus(),_.error("请输入正确的支付码");e={type:s,auth_code:l.value}}else e={type:"cash_payment"};Ce(a,e).then(s=>{s.status==200&&(s.message=="支付成功"||s.message=="success")?(f.value=!1,_({message:s.message=="success"?"支付成功":s.message,type:"success"}),A(s.data.message||s.data.result.message),h()):(d.value=s.data.group_order_id,$.value=0,x=0,I(s.data.group_order_sn))}).catch(s=>{l.value="",n.value=!1,B(()=>{var k;(k=i.value)==null||k.focus()})})},$=o(0),I=a=>{a&&($.value++,x+=5e3,Se({order_sn:a}).then(e=>{e.data.paid==1||e.message=="支付成功"?(_({message:e.message,type:"success"}),A(e.data.message),h()):(_({message:e.message,type:"error"}),l.value="",n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()}))}).catch(e=>{z.value&&$.value<3?setTimeout(()=>{I(a)},15e3-x>0?15e3-x:0):(l.value="",n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()}))}))},h=()=>{var a;window.removeEventListener("keydown",O),z.value=!1,n.value=!1,l.value="",u.value="",v.value=[],(a=i.value)==null||a.blur(),le("paySuccess"),f.value=!1},n=o(!1);T({drawer:f,setForm:se,setRePay:te,beforeClose:h});const v=o([]),u=o(""),j=_e(()=>+u.value>0?(u.value-m.value.order_price).toFixed(2):-1),W=o(!1),N=a=>{a===-1?v.value=[]:v.value.pop(),u.value=v.value.length?v.value.join(""):0},c=a=>{W.value===!1&&(u.value="",W.value=!0);let e=String(u.value).indexOf(".")+1,s=String(u.value).length-e;console.log(e,s),(e===0||s<2)&&(v.value.join("")<=9999999&&v.value.push(a),u.value=v.value.join("")>99999999?99999999:v.value.join(""))},G=()=>{if(j.value===""||j.value===null||j.value===void 0||+u.value<+m.value.order_price)return _.error("收款金额应该大于等于应收金额");d.value?J(d.value):Y({address_id:"",key:m.value.key,cart_id:U.value,pay_type:"cash_payment",staff_id:q.userInfo.service.service_id}).then(a=>{if(a.status==200&&a.message=="支付成功")f.value=!1,_({message:a.message,type:"success"}),w(1),A(a.data.message),h();else if(a.data.group_order_sn)d.value=a.data.group_order_id,$.value=0,x=0,I(a.data.group_order_sn);else return d.value=a.data.result.order_id,u.value="",v.value=[],n.value=!1,_({message:a.message,type:"error"})}).catch(a=>{n.value=!1})},O=a=>{let s=(a||window.event).keyCode;if(s==37)return w(2);if(s==120)return F.emit("F9");if(s==27)return h();switch(a.stopPropagation(),a.preventDefault(),s){case 96:case 48:c(0);break;case 97:case 49:c(1);break;case 98:case 50:c(2);break;case 99:case 51:c(3);break;case 100:case 52:c(4);break;case 101:case 53:c(5);break;case 102:case 54:c(6);break;case 103:case 55:c(7);break;case 104:case 56:c(8);break;case 105:case 57:c(9);break;case 110:c(".");break;case 190:c(".");break;case 8:N();break;case 13:G();break}},L=o(!1),H=()=>{if(!(!f.value||L.value&&l.value.length>0)&&p.value==2)return w(1)},Q=()=>{if(!(!f.value||L.value&&l.value.length>0)&&p.value==1)return w(2)};return fe(()=>{F.on("left",H),F.on("right",Q)}),pe(()=>{F.off("left",H),F.off("right",Q)}),(a,e)=>{const s=D("el-input"),k=D("el-button"),ne=D("Delete"),ce=D("el-icon"),re=D("el-drawer"),ie=me("loading");return y(),X(re,{size:800,modelValue:f.value,"onUpdate:modelValue":e[6]||(e[6]=r=>f.value=r),direction:"rtl",onOpen:ae,"before-close":h},{header:g(()=>[xe]),default:g(()=>[t("div",Ve,[t("div",Be,[t("div",{class:R(["left",{active:p.value==1}]),onClick:e[0]||(e[0]=r=>w(1))}," 微信/支付宝 ",2),t("div",{class:R(["right",{active:p.value==2}]),onClick:e[1]||(e[1]=r=>w(2))}," 现金收款 ",2)]),Ee,t("div",$e,[V(" ¥"),t("span",je,P(m.value.order_price),1)]),p.value==1?ye((y(),C("div",Fe,[S(s,{ref_key:"codeRef",ref:i,modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=r=>l.value=r),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ge(ue,["enter"]),onFocus:e[3]||(e[3]=r=>{L.value=!0}),onBlur:e[4]||(e[4]=r=>{L.value=!1})},null,8,["modelValue"]),De])),[[ie,n.value]]):(y(),C("div",Ie,[t("div",Le,[t("div",Pe,[t("div",Ae,[u.value?(y(),C("span",Te,P(u.value),1)):(y(),C("span",Ue,"按下键盘输入客户支付金额"))]),j.value>=0?(y(),C("div",ze,[t("div",null,[V("需找零(元):"),t("span",Ne,"¥"+P(j.value),1)]),Oe])):(y(),C("div",Re,Me)),t("div",Je,[t("div",We,[(y(!0),C(he,null,ke(oe.value,r=>(y(),X(k,{key:r,onClick:Xe=>c(r)},{default:g(()=>[V(P(r),1)]),_:2},1032,["onClick"]))),128))]),t("div",Ge,[S(k,{onClick:N},{default:g(()=>[S(ce,null,{default:g(()=>[S(ne)]),_:1})]),_:1}),S(k,{onClick:e[5]||(e[5]=r=>N(-1))},{default:g(()=>[V("C")]),_:1}),S(k,{class:R(["enter",{"enter-disable":+u.value<+m.value.order_price}]),disabled:+u.value<+m.value.order_price,onClick:G},{default:g(()=>[V(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:g(()=>[t("div",He,[S(k,{class:"cancel-btn",onClick:ee},{default:g(()=>[V("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ea=de(Qe,[["__scopeId","data-v-80c4a58e"]]);export{ea as p}; +import{_ as de,r as o,u as ve,J as _e,o as fe,m as F,a as pe,b as D,j as me,c as y,d as X,w as g,e as t,p as R,g as V,t as P,q as ye,h as C,f as S,k as ge,F as he,i as ke,n as B,E as _,v as be,x as we}from"./index-DCKl20sY.js";import{j as Y,k as Ce,g as Se}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js";const A=b=>{if(!b)return;let T=new window.SpeechSynthesisUtterance(b);window.speechSynthesis.speak(T)},E=b=>(be("data-v-80c4a58e"),b=b(),we(),b),xe=E(()=>t("h4",null,"选择支付方式",-1)),Ve={class:"dra-body"},Be={class:"header"},Ee=E(()=>t("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),$e={style:{color:"#f5222d","padding-bottom":"2rem"}},je={style:{"font-size":"1.6rem"}},Fe={key:0,"element-loading-text":"支付中",class:"card1"},De=E(()=>t("div",{class:"tips"},null,-1)),Ie={key:1,class:"card2"},Le={class:"drawer-body"},Pe={class:"counter"},Ae={class:"received"},Te={key:0},Ue={key:1,style:{"font-size":"1rem",color:"#999"}},ze={key:0,class:"balance"},Ne={class:"money"},Oe=E(()=>t("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Re={key:1,class:"balance"},qe=E(()=>t("div",null,"不够找零, 请支付更多金额",-1)),Ke=E(()=>t("div",{class:"tips"},"按下小键盘输入金额",-1)),Me=[qe,Ke],Je={class:"keypad"},We={class:"left"},Ge={class:"right"},He={style:{width:"100%",display:"flex","justify-content":"center"}},Qe={__name:"pay",emits:["paySuccess"],setup(b,{expose:T,emit:Z}){const f=o(!1),p=o(1),l=o(""),i=o(""),q=ve(),ee=()=>{h()},ae=()=>{B(()=>{setTimeout(()=>{var a;n.value=!1,l.value="",z.value=!0,(a=i.value)==null||a.focus(),w(p.value)},300)})},w=a=>{p.value=a,p.value==2?window.addEventListener("keydown",O):(window.removeEventListener("keydown",O),B(()=>{var e;l.value="",(e=i.value)==null||e.focus()}))},m=o({}),U=o([]),se=a=>{m.value=a.data,U.value=a.cart_id},te=a=>{m.value.order_price=a.price,d.value=a.order_id},le=Z,z=o(!1),oe=o(["1","2","3","4","5","6","7","8","9","0","00","."]);let x=0;const K=/^(10|11|12|13|14|15)\d{16}$/,M=/^(25|26|27|28|29|30)\d{14,22}$/,d=o(""),ue=()=>{if(n.value=!0,i.value.blur(),d.value)J(d.value);else{let a;if(K.test(l.value))a="micropay";else if(M.test(l.value))a="alipayBar";else return n.value=!1,l.value="",i.value.focus(),_.error("请输入正确的支付码");Y({address_id:"",key:m.value.key,cart_id:U.value,pay_type:a,auth_code:l.value,staff_id:q.userInfo.service.service_id}).then(e=>{if(e.status==200&&(e.message=="支付成功"||e.message=="success"))f.value=!1,_({message:e.message=="success"?"支付成功":e.message,type:"success"}),A(e.data.message||e.data.result.message),h();else if(e.data.group_order_sn)d.value=e.data.group_order_id,$.value=0,x=0,I(e.data.group_order_sn);else return d.value=e.data.result.order_id,n.value=!1,_({message:e.message,type:"error"})}).catch(e=>{n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()})})}},J=a=>{let e;if(p.value==1){let s;if(K.test(l.value))s="micropay";else if(M.test(l.value))s="alipayBar";else return n.value=!1,l.value="",i.value.focus(),_.error("请输入正确的支付码");e={type:s,auth_code:l.value}}else e={type:"cash_payment"};Ce(a,e).then(s=>{s.status==200&&(s.message=="支付成功"||s.message=="success")?(f.value=!1,_({message:s.message=="success"?"支付成功":s.message,type:"success"}),A(s.data.message||s.data.result.message),h()):(d.value=s.data.group_order_id,$.value=0,x=0,I(s.data.group_order_sn))}).catch(s=>{l.value="",n.value=!1,B(()=>{var k;(k=i.value)==null||k.focus()})})},$=o(0),I=a=>{a&&($.value++,x+=5e3,Se({order_sn:a}).then(e=>{e.data.paid==1||e.message=="支付成功"?(_({message:e.message,type:"success"}),A(e.data.message),h()):(_({message:e.message,type:"error"}),l.value="",n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()}))}).catch(e=>{z.value&&$.value<3?setTimeout(()=>{I(a)},15e3-x>0?15e3-x:0):(l.value="",n.value=!1,B(()=>{var s;(s=i.value)==null||s.focus()}))}))},h=()=>{var a;window.removeEventListener("keydown",O),z.value=!1,n.value=!1,l.value="",u.value="",v.value=[],(a=i.value)==null||a.blur(),le("paySuccess"),f.value=!1},n=o(!1);T({drawer:f,setForm:se,setRePay:te,beforeClose:h});const v=o([]),u=o(""),j=_e(()=>+u.value>0?(u.value-m.value.order_price).toFixed(2):-1),W=o(!1),N=a=>{a===-1?v.value=[]:v.value.pop(),u.value=v.value.length?v.value.join(""):0},c=a=>{W.value===!1&&(u.value="",W.value=!0);let e=String(u.value).indexOf(".")+1,s=String(u.value).length-e;console.log(e,s),(e===0||s<2)&&(v.value.join("")<=9999999&&v.value.push(a),u.value=v.value.join("")>99999999?99999999:v.value.join(""))},G=()=>{if(j.value===""||j.value===null||j.value===void 0||+u.value<+m.value.order_price)return _.error("收款金额应该大于等于应收金额");d.value?J(d.value):Y({address_id:"",key:m.value.key,cart_id:U.value,pay_type:"cash_payment",staff_id:q.userInfo.service.service_id}).then(a=>{if(a.status==200&&a.message=="支付成功")f.value=!1,_({message:a.message,type:"success"}),w(1),A(a.data.message),h();else if(a.data.group_order_sn)d.value=a.data.group_order_id,$.value=0,x=0,I(a.data.group_order_sn);else return d.value=a.data.result.order_id,u.value="",v.value=[],n.value=!1,_({message:a.message,type:"error"})}).catch(a=>{n.value=!1})},O=a=>{let s=(a||window.event).keyCode;if(s==37)return w(2);if(s==120)return F.emit("F9");if(s==27)return h();switch(a.stopPropagation(),a.preventDefault(),s){case 96:case 48:c(0);break;case 97:case 49:c(1);break;case 98:case 50:c(2);break;case 99:case 51:c(3);break;case 100:case 52:c(4);break;case 101:case 53:c(5);break;case 102:case 54:c(6);break;case 103:case 55:c(7);break;case 104:case 56:c(8);break;case 105:case 57:c(9);break;case 110:c(".");break;case 190:c(".");break;case 8:N();break;case 13:G();break}},L=o(!1),H=()=>{if(!(!f.value||L.value&&l.value.length>0)&&p.value==2)return w(1)},Q=()=>{if(!(!f.value||L.value&&l.value.length>0)&&p.value==1)return w(2)};return fe(()=>{F.on("left",H),F.on("right",Q)}),pe(()=>{F.off("left",H),F.off("right",Q)}),(a,e)=>{const s=D("el-input"),k=D("el-button"),ne=D("Delete"),ce=D("el-icon"),re=D("el-drawer"),ie=me("loading");return y(),X(re,{size:800,modelValue:f.value,"onUpdate:modelValue":e[6]||(e[6]=r=>f.value=r),direction:"rtl",onOpen:ae,"before-close":h},{header:g(()=>[xe]),default:g(()=>[t("div",Ve,[t("div",Be,[t("div",{class:R(["left",{active:p.value==1}]),onClick:e[0]||(e[0]=r=>w(1))}," 微信/支付宝 ",2),t("div",{class:R(["right",{active:p.value==2}]),onClick:e[1]||(e[1]=r=>w(2))}," 现金收款 ",2)]),Ee,t("div",$e,[V(" ¥"),t("span",je,P(m.value.order_price),1)]),p.value==1?ye((y(),C("div",Fe,[S(s,{ref_key:"codeRef",ref:i,modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=r=>l.value=r),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ge(ue,["enter"]),onFocus:e[3]||(e[3]=r=>{L.value=!0}),onBlur:e[4]||(e[4]=r=>{L.value=!1})},null,8,["modelValue"]),De])),[[ie,n.value]]):(y(),C("div",Ie,[t("div",Le,[t("div",Pe,[t("div",Ae,[u.value?(y(),C("span",Te,P(u.value),1)):(y(),C("span",Ue,"按下键盘输入客户支付金额"))]),j.value>=0?(y(),C("div",ze,[t("div",null,[V("需找零(元):"),t("span",Ne,"¥"+P(j.value),1)]),Oe])):(y(),C("div",Re,Me)),t("div",Je,[t("div",We,[(y(!0),C(he,null,ke(oe.value,r=>(y(),X(k,{key:r,onClick:Xe=>c(r)},{default:g(()=>[V(P(r),1)]),_:2},1032,["onClick"]))),128))]),t("div",Ge,[S(k,{onClick:N},{default:g(()=>[S(ce,null,{default:g(()=>[S(ne)]),_:1})]),_:1}),S(k,{onClick:e[5]||(e[5]=r=>N(-1))},{default:g(()=>[V("C")]),_:1}),S(k,{class:R(["enter",{"enter-disable":+u.value<+m.value.order_price}]),disabled:+u.value<+m.value.order_price,onClick:G},{default:g(()=>[V(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]),footer:g(()=>[t("div",He,[S(k,{class:"cancel-btn",onClick:ee},{default:g(()=>[V("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ea=de(Qe,[["__scopeId","data-v-80c4a58e"]]);export{ea as p}; diff --git a/dist/assets/pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js b/dist/assets/pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js similarity index 93% rename from dist/assets/pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js rename to dist/assets/pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js index 2b42e6c..dc02d91 100644 --- a/dist/assets/pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js +++ b/dist/assets/pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-oH06ybYZ.js @@ -1 +1 @@ -import{G as e}from"./index-CEZ1QYTt.js";function n(r){return e.post("user/cart/create",r)}function s(r){return e.get("user/cart/lst",{params:r})}function o(r,t){return e.post(`user/cart/change/${r}`,t)}function u(r){return e.post("v2/order/check",r)}function c(r){return e.post("user/cart/delete",r)}function p(r){return e.post("v2/order/create",r)}function d(r,t){return e.post(`order/pay/${r}`,t)}function f(r){return e.get("micropay_query",{params:r})}function A(r,t){return e.get(`admin/${r}/order_list`,{params:t})}function g(r,t){return e.get(`verifier/${r}/order/${t}`)}function m(r){return e.get("order_lading",{params:r})}function $(r,t,i){return e.post(`verifier/${r}/${t}`,i)}function v(r,t){return e.get(`admin/${r}/statistics`,{params:t})}function h(r,t){return e.get(`admin/${r}/order_price`,{params:t})}export{s as a,o as b,c,n as d,A as e,m as f,f as g,h,$ as i,p as j,d as k,u as o,v as s,g as v}; +import{G as e}from"./index-DCKl20sY.js";function n(r){return e.post("user/cart/create",r)}function s(r){return e.get("user/cart/lst",{params:r})}function o(r,t){return e.post(`user/cart/change/${r}`,t)}function u(r){return e.post("v2/order/check",r)}function c(r){return e.post("user/cart/delete",r)}function p(r){return e.post("v2/order/create",r)}function d(r,t){return e.post(`order/pay/${r}`,t)}function f(r){return e.get("micropay_query",{params:r})}function A(r,t){return e.get(`admin/${r}/order_list`,{params:t})}function g(r,t){return e.get(`verifier/${r}/order/${t}`)}function m(r){return e.get("order_lading",{params:r})}function $(r,t,i){return e.post(`verifier/${r}/${t}`,i)}function v(r,t){return e.get(`admin/${r}/statistics`,{params:t})}function h(r,t){return e.get(`admin/${r}/order_price`,{params:t})}export{s as a,o as b,c,n as d,A as e,m as f,f as g,h,$ as i,p as j,d as k,u as o,v as s,g as v}; diff --git a/dist/assets/shop-Co_PTsDS.js b/dist/assets/shop-CAkzXRhR.js similarity index 91% rename from dist/assets/shop-Co_PTsDS.js rename to dist/assets/shop-CAkzXRhR.js index ac7ab4c..cd78eb8 100644 --- a/dist/assets/shop-Co_PTsDS.js +++ b/dist/assets/shop-CAkzXRhR.js @@ -1 +1 @@ -import{G as e}from"./index-CEZ1QYTt.js";function a(t,r){return e.get(`server/${t}/product/lst`,{params:r})}function p(t,r){return e.get(`store/product/detail/${t}`,{params:r})}function o(t,r){return e.post(`user_free_trial/${t}`,r)}function i(t,r){return e.get(`server/${t}/product/title`,{params:r})}function n(t,r,s){return e.post(`server/${t}/product/status/${r}`,s)}function c(t,r){return e.get(`server/${t}/category/list`,{params:r})}function d(t,r){return e.post(`server/${t}/product/create`,r)}function f(t,r,s){return e.post(`server/${t}/product/update/${r}`,s)}function $(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}function l(t,r){return e.get(`server/${t}/product/lst`,{params:r})}export{l as a,d as b,c,f as d,i as e,n as f,p as g,$ as p,a as s,o as u}; +import{G as e}from"./index-DCKl20sY.js";function a(t,r){return e.get(`server/${t}/product/lst`,{params:r})}function p(t,r){return e.get(`store/product/detail/${t}`,{params:r})}function o(t,r){return e.post(`user_free_trial/${t}`,r)}function i(t,r){return e.get(`server/${t}/product/title`,{params:r})}function n(t,r,s){return e.post(`server/${t}/product/status/${r}`,s)}function c(t,r){return e.get(`server/${t}/category/list`,{params:r})}function d(t,r){return e.post(`server/${t}/product/create`,r)}function f(t,r,s){return e.post(`server/${t}/product/update/${r}`,s)}function $(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}function l(t,r){return e.get(`server/${t}/product/lst`,{params:r})}export{l as a,d as b,c,f as d,i as e,n as f,p as g,$ as p,a as s,o as u}; diff --git a/dist/index.html b/dist/index.html index c65ad3f..b2b3280 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,7 +5,7 @@ 里海收银系统 - +