From 375c281a5d7e81474d393cd4d304665e3979e598 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Sat, 6 Apr 2024 18:15:40 +0800 Subject: [PATCH] 1 --- .env.development | 4 ++-- dist/assets/index-B4pghAyb.js | 1 - dist/assets/{index-C-KLbSdz.js => index-BWoVrzFI.js} | 2 +- dist/assets/{index-BSmo2Z__.js => index-CKGYBK9P.js} | 2 +- dist/assets/{index-D5pSuA5u.js => index-CMeCUgUG.js} | 4 ++-- dist/assets/{index-C__UFXHW.css => index-D7l49p7O.css} | 2 +- dist/assets/index-DYIX07Vb.js | 1 + dist/assets/{index-B6NJAtmD.js => index-FkEbh-kW.js} | 2 +- dist/assets/{index-y31P2_LV.js => index-X-sbpCmf.js} | 2 +- dist/assets/{indexList-Czsm3GIz.js => indexList-CVvMxSCD.js} | 2 +- dist/assets/{padding-UtAMRAsR.js => padding-DsZ1Gb7U.js} | 2 +- dist/assets/{pay-5Jv4r2r0.js => pay-BRo_1KzL.js} | 2 +- dist/assets/{shop-DjLHIKgd.js => shop-27Bl47qn.js} | 2 +- dist/index.html | 2 +- src/views/order/component/order.vue | 1 + 15 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 dist/assets/index-B4pghAyb.js rename dist/assets/{index-C-KLbSdz.js => index-BWoVrzFI.js} (95%) rename dist/assets/{index-BSmo2Z__.js => index-CKGYBK9P.js} (96%) rename dist/assets/{index-D5pSuA5u.js => index-CMeCUgUG.js} (99%) rename dist/assets/{index-C__UFXHW.css => index-D7l49p7O.css} (68%) create mode 100644 dist/assets/index-DYIX07Vb.js rename dist/assets/{index-B6NJAtmD.js => index-FkEbh-kW.js} (96%) rename dist/assets/{index-y31P2_LV.js => index-X-sbpCmf.js} (92%) rename dist/assets/{indexList-Czsm3GIz.js => indexList-CVvMxSCD.js} (96%) rename dist/assets/{padding-UtAMRAsR.js => padding-DsZ1Gb7U.js} (65%) rename dist/assets/{pay-5Jv4r2r0.js => pay-BRo_1KzL.js} (98%) rename dist/assets/{shop-DjLHIKgd.js => shop-27Bl47qn.js} (75%) diff --git a/.env.development b/.env.development index 822a12e..9127492 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ VITE_NOW_TYPE = 'dist' -VITE_BASE_URL = 'http://192.168.1.22:8324' -# VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn' \ No newline at end of file +# VITE_BASE_URL = 'http://192.168.1.22:8324' +VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn' \ No newline at end of file diff --git a/dist/assets/index-B4pghAyb.js b/dist/assets/index-B4pghAyb.js deleted file mode 100644 index 06f035d..0000000 --- a/dist/assets/index-B4pghAyb.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as M,u as T,r,a as k,h as U,o as s,f as i,b as e,d as l,w as f,e as h,i as J,j,F as z,g as F,n as A,t as _,c as O,k as n,p as q,l as H,q as Q,E as N}from"./index-D5pSuA5u.js";import{e as W,p as X,f as Y,g as Z}from"./pay-5Jv4r2r0.js";import{p as ee}from"./padding-UtAMRAsR.js";function te(c){return{all:c=c||new Map,on:function(m,t){var u=c.get(m);u?u.push(t):c.set(m,[t])},off:function(m,t){var u=c.get(m);u&&(t?u.splice(u.indexOf(t)>>>0,1):c.set(m,[]))},emit:function(m,t){var u=c.get(m);u&&u.slice().map(function(v){v(t)}),(u=c.get("*"))&&u.slice().map(function(v){v(m,t)})}}}const K=te(),se=c=>(q("data-v-d06e73c3"),c=c(),H(),c),oe={class:"my-order"},ie={class:"header-nav"},ae=se(()=>e("div",{class:"nav-item"},"订单列表",-1)),le={class:"nav-item-clear"},ne={class:"header-input"},ce={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},de=["onClick"],_e={class:"top"},re={class:"create-time"},ue={class:"shop"},ve={key:0,class:"left"},pe={key:0,class:"shop-name"},fe={class:"right"},me={class:"money"},he={class:"count"},ye={class:"bottom"},ge={class:"pay"},ke={key:0},$e={key:0},be={key:1},Ce={key:2},we={key:3},Ve={key:4},Se={key:5},Pe={key:1,style:{color:"#ff4a00"}},Le={key:0,class:"cashier"},xe={key:1,class:"cashier"},Ie={key:0,class:"load-end"},Ae={key:1,class:"load-end"},Re={__name:"order",setup(c){const m=T();r([]);const t=r(1),u=C=>{v.value.page=1,g.value=!1,p.value=!1,b.value=[],V(!0)};r(null);const v=r({page:1,limit:20,search_info:""}),p=r(!1),L=r(0),S=r(0),g=r(!1),b=r([]),V=(C=!1)=>{if(C)v.value.page=1;else if(g.value||p.value)return;p.value=!0,t.value==1&&(v.value.paid=null),t.value==2&&(v.value.paid=0),W(m.userInfo.service.mer_id,v.value).then(a=>{C?b.value=a.data.list:b.value=[...b.value,...a.data.list],a.data.list.length{p.value=!1})},R=(C,a)=>{S.value=a,K.emit("set-order-detail",C)};return(C,a)=>{const d=k("el-radio-button"),x=k("el-radio-group"),P=k("el-button"),B=k("el-input"),w=k("el-image"),D=U("loading"),E=U("infinite-scroll");return s(),i("div",oe,[e("div",ie,[ae,e("div",le,[l(x,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),onChange:u,size:"small"},{default:f(()=>[l(d,{value:1},{default:f(()=>[h("全部")]),_:1}),l(d,{value:2},{default:f(()=>[h("未支付")]),_:1})]),_:1},8,["modelValue"])])]),e("div",ne,[l(B,{modelValue:v.value.search_info,"onUpdate:modelValue":a[2]||(a[2]=o=>v.value.search_info=o),placeholder:"请输入订单编号",onKeydown:a[3]||(a[3]=J(o=>V(!0),["enter"])),onClear:a[4]||(a[4]=o=>V(!0)),clearable:""},{append:f(()=>[l(P,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:a[1]||(a[1]=o=>V(!0))},{default:f(()=>[h("搜索")]),_:1})]),_:1},8,["modelValue"])]),j((s(),i("div",ce,[(s(!0),i(z,null,F(b.value,(o,$)=>(s(),i("div",{class:A(["item",{"item-active":S.value==$}]),key:$,onClick:I=>R(o,$)},[e("div",_e,[e("div",{class:A(["sn",{cahier:o.pay_type==11||o.pay_type==12}])},"单号: "+_(o.order_sn),3),e("div",re,_(o.create_time),1)]),e("div",ue,[o.orderProduct?(s(),i("div",ve,[(s(!0),i(z,null,F(o.orderProduct.slice(0,5),(I,G)=>(s(),O(w,{key:G,src:I.cart_info.productAttr.image||I.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),o.orderProduct.length==1?(s(),i("div",pe,_(o.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",fe,[e("div",me,"¥"+_(o.pay_price),1),e("div",he,"共"+_(o.total_num)+"件商品",1)])]),e("div",ye,[e("div",ge,[o.paid?(s(),i("div",ke,[h(" 已支付 "),o.pay_type==12?(s(),i("span",$e,"(现金支付)")):n("",!0),o.pay_type==11?(s(),i("span",be,"(微信支付)")):n("",!0),o.pay_type==0?(s(),i("span",Ce,"(余额支付)")):n("",!0),o.pay_type==1?(s(),i("span",we,"(微信支付)")):n("",!0),o.pay_type==9?(s(),i("span",Ve,"(商户余额支付)")):n("",!0),o.pay_type==10?(s(),i("span",Se,"(对公转账)")):n("",!0)])):(s(),i("div",Pe,"未支付"))]),o.service_info?(s(),i("div",Le,"收银员: "+_(o.service_info.nickname),1)):(s(),i("div",xe,"平台订单"))])],10,de))),128)),g.value?(s(),i("div",Ie,"没有更多了")):n("",!0),p.value?(s(),i("div",Ae,"加载中...")):n("",!0)])),[[D,p.value],[E,V]])])}}},Be=M(Re,[["__scopeId","data-v-d06e73c3"]]),y=c=>(q("data-v-b59b7350"),c=c(),H(),c),De={class:"my-order"},Ee={class:"header-nav"},Ne=["onClick"],Ue={class:"detail"},ze={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},Oe={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Me={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},je=y(()=>e("div",{class:"table-title"},"订单信息",-1)),qe={class:"table-info"},He={class:"info-item"},Ge=y(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=y(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=y(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=y(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ot={class:"info-item-info"},it={class:"info-item"},at=y(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},ct=y(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},rt=y(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ut={class:"info-item-info"},vt={key:0},pt={key:1},ft={key:2},mt={key:3},ht={key:4},yt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info",style:{"flex-direction":"column"}},$t={class:"info-item"},bt=y(()=>e("div",{class:"info-item-title"},"头像:",-1)),Ct={class:"info-item-info"},wt={class:"info-item"},Vt=y(()=>e("div",{class:"info-item-title"},"昵称:",-1)),St={class:"info-item-info"},Pt={class:"info-item"},Lt=y(()=>e("div",{class:"info-item-title"},"账号:",-1)),xt={class:"info-item-info"},It={key:2,class:"footer"},At={class:"info"},Rt={class:"ser"},Bt={class:"price"},Dt={key:0,class:"handle"},Et={key:1,class:"handle"},Nt=y(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ut={class:"dialog-footer"},zt={__name:"detail",setup(c){T();const m=Q(),t=r({});K.on("set-order-detail",a=>{t.value=a}),r([]);const u=r(null),v=r(!1);r(0);const p=r(0),L=r(["商品信息","订单详情"]),S=r(""),g=r(!1),b=a=>{S.value=a,g.value=!0},V=()=>{g.value=!1,Y({order_sn:S.value}).then(a=>{N({message:a.message,type:"success"}),m.push({name:"home"})})},R=a=>{u.value.setRePay({price:a.pay_price,order_id:a.group_order_id}),u.value.drawer=!0},C=a=>{Z({order_sn:a}).then(d=>{d.data.paid==1||d.message=="支付成功"?N({message:d.message,type:"success"}):N({message:d.message,type:"error"})}).catch(d=>{})};return(a,d)=>{const x=k("el-image"),P=k("el-table-column"),B=k("el-table"),w=k("el-button"),D=k("el-dialog"),E=U("loading");return s(),i("div",De,[e("div",Ee,[(s(!0),i(z,null,F(L.value,(o,$)=>(s(),i("div",{key:$,class:A(["nav-item",{"nav-item-active":p.value==$,"nav-item-radius1":p.value==$+1,"nav-item-radius2":p.value==$-1}]),onClick:I=>p.value=$},_(o),11,Ne))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":p.value==L.value.length-1}]),style:{flex:"1"}},null,2)]),j((s(),i("div",Ue,[t.value.orderProduct&&p.value==0?(s(),i("div",ze,[e("div",Fe,[h(" 共计 "),e("span",Oe,_(t.value.total_num),1),h(" 件商品 ")]),l(B,{style:{height:"calc(100vh - 100px - 14rem)"},data:t.value.orderProduct},{default:f(()=>[l(P,{prop:"cart_info.product.store_name",label:"商品信息"},{default:f(({row:o})=>[e("div",Ke,[l(x,{style:{height:"3rem",width:"3rem"},src:o.cart_info.productAttr.image||o.cart_info.product.image},null,8,["src"]),e("span",Me,_(o.cart_info.product.store_name),1)])]),_:1}),l(P,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),l(P,{prop:"product_num",label:"数量",width:"150"}),l(P,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),t.value.orderProduct&&p.value==1?(s(),i("div",Te,[je,e("div",qe,[e("div",He,[Ge,e("div",Je,_(t.value.create_time),1)]),e("div",Qe,[We,e("div",Xe,_(t.value.total_num),1)]),e("div",Ye,[Ze,e("div",et,"¥"+_(t.value.total_price),1)]),e("div",tt,[st,e("div",ot,_(t.value.pay_time),1)]),e("div",it,[at,e("div",lt,"¥"+_(t.value.deduction_price),1)]),e("div",nt,[ct,e("div",dt,"¥"+_(t.value.pay_price),1)]),e("div",_t,[rt,e("div",ut,[t.value.pay_type==11?(s(),i("span",vt,"微信收款")):n("",!0),t.value.pay_type==12?(s(),i("span",pt,"现金支付")):n("",!0),t.value.pay_type==0?(s(),i("span",ft,"余额支付")):n("",!0),t.value.pay_type==1?(s(),i("span",mt,"微信支付")):n("",!0),t.value.pay_type==9?(s(),i("span",ht,"商户余额支付")):n("",!0),t.value.pay_type==10?(s(),i("span",yt,"对公转账")):n("",!0)])])]),t.value.service_info?(s(),i("div",gt,"收银员信息")):n("",!0),t.value.service_info?(s(),i("div",kt,[e("div",$t,[bt,e("div",Ct,[l(x,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:t.value.service_info.avatar},null,8,["src"])])]),e("div",wt,[Vt,e("div",St,_(t.value.service_info.nickname),1)]),e("div",Pt,[Lt,e("div",xt,_(t.value.service_info.account),1)])])):n("",!0)])):n("",!0),t.value.service_info?(s(),i("div",It,[e("div",At,[e("div",Rt,"收银员: "+_(t.value.service_info.nickname),1),e("div",Bt,[h(" 实付: "),e("span",null,"¥"+_(t.value.pay_price),1)])]),t.value.pay_time?(s(),i("div",Et,"已支付")):(s(),i("div",Dt,[l(w,{class:"btn",type:"primary",onClick:d[0]||(d[0]=o=>R(t.value))},{default:f(()=>[h("重新支付")]),_:1}),l(w,{class:"btn",type:"primary",onClick:d[1]||(d[1]=o=>C(t.value.order_sn))},{default:f(()=>[h("检测状态")]),_:1}),l(w,{class:"btn",type:"success",onClick:d[2]||(d[2]=o=>b(t.value.order_sn))},{default:f(()=>[h("提单")]),_:1})]))])):n("",!0)])),[[E,v.value]]),l(X,{ref_key:"payRef",ref:u},null,512),l(D,{modelValue:g.value,"onUpdate:modelValue":d[4]||(d[4]=o=>g.value=o),title:"提示",width:"500"},{footer:f(()=>[e("div",Ut,[l(w,{onClick:d[3]||(d[3]=o=>g.value=!1)},{default:f(()=>[h("取消")]),_:1}),a.cartCount>0?(s(),O(w,{key:0,onClick:a.goHome},{default:f(()=>[h(" 前去清空购物车 ")]),_:1},8,["onClick"])):(s(),O(w,{key:1,type:"primary",onClick:V},{default:f(()=>[h(" 确认提单 ")]),_:1}))])]),default:f(()=>[Nt]),_:1},8,["modelValue"])])}}},Ft=M(zt,[["__scopeId","data-v-b59b7350"]]),Ot={class:"my-card"},jt={__name:"index",setup(c){return(m,t)=>(s(),i("div",Ot,[l(Be,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(ee),l(Ft,{ref:"detailRef"},null,512)]))}};export{jt as default}; diff --git a/dist/assets/index-C-KLbSdz.js b/dist/assets/index-BWoVrzFI.js similarity index 95% rename from dist/assets/index-C-KLbSdz.js rename to dist/assets/index-BWoVrzFI.js index 9d99b1f..7310b69 100644 --- a/dist/assets/index-C-KLbSdz.js +++ b/dist/assets/index-BWoVrzFI.js @@ -1 +1 @@ -import{s as L,u as S}from"./shop-DjLHIKgd.js";import{_ as j,r as i,u as A,a as r,h as F,j as T,f as $,d as e,w as l,o as k,e as m,b as w,c as M,t as O,k as P,E as y}from"./index-D5pSuA5u.js";const q={"element-loading-text":"加载中",class:"my-shop"},G={class:"dialog-footer"},H={__name:"index",setup(J){const v=i([]),V=A(),u=i({page:1,limit:15}),d=i(!1),g=i(0),c=()=>{d.value=!0,L(V.userInfo.service.mer_id,u.value).then(t=>{v.value=t.data.list,g.value=t.data.count,d.value=!1})};c();const C=t=>{u.value.page=t,c()},x=t=>{u.value.page=t,c()},N=t=>{u.value.page=t,c()},p=i(!1),o=i({}),U=t=>{o.value=t,p.value=!0},z=()=>{let t={attr:o.value.attr||[],attrValue:o.value.attrValue,mer_cate_id:o.value.merCateId||[],spec_type:o.value.spec_type,is_stock:1};S(o.value.product_id,t).then(n=>{y({message:n.message,type:"success"}),p.value=!1,c()}).catch(n=>{y({message:n,type:"error"})})};return(t,n)=>{const s=r("el-table-column"),f=r("el-image"),_=r("el-button"),h=r("el-table"),B=r("el-pagination"),D=r("el-input-number"),I=r("el-dialog"),E=F("loading");return T((k(),$("div",q,[e(h,{data:v.value,style:{width:"100%"}},{default:l(()=>[e(s,{prop:"product_id",label:"ID",width:"100"}),e(s,{prop:"image",label:"图片",width:"120"},{default:l(a=>[e(f,{loading:"lazy",style:{width:"60px",height:"60px"},src:a.row.image},null,8,["src"])]),_:1}),e(s,{prop:"store_name",label:"商品名称",width:"500"}),e(s,{prop:"price",label:"售价"}),e(s,{prop:"stock",label:"库存"}),e(s,{label:"操作",width:"120"},{default:l(a=>[e(_,{type:"primary",link:"",onClick:b=>U(a.row)},{default:l(()=>[m("编辑")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),e(B,{"page-size":u.value.limit,layout:"prev, pager, next",total:g.value,onPrevClick:C,onNextClick:x,onCurrentChange:N},null,8,["page-size","total"]),e(I,{modelValue:p.value,"onUpdate:modelValue":n[1]||(n[1]=a=>p.value=a),title:"编辑商品库存",width:"800"},{footer:l(()=>[w("div",G,[e(_,{onClick:n[0]||(n[0]=a=>p.value=!1)},{default:l(()=>[m("取消")]),_:1}),e(_,{type:"primary",onClick:z},{default:l(()=>[m(" 确定 ")]),_:1})])]),default:l(()=>[o.value.attrValue?(k(),M(h,{key:0,data:o.value.attrValue,stripe:"",style:{width:"100%"}},{default:l(()=>[e(s,{prop:"image",label:"图片",width:"180"},{default:l(a=>[e(f,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:a.row.image||o.value.image},null,8,["src"])]),_:1}),e(s,{prop:"sku",label:"名称",width:"180"},{default:l(a=>[w("span",null,O(a.row.sku||o.value.store_name),1)]),_:1}),e(s,{prop:"price",label:"价格"}),e(s,{prop:"stock",label:"库存"},{default:l(a=>[e(D,{modelValue:a.row.stock,"onUpdate:modelValue":b=>a.row.stock=b,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):P("",!0)]),_:1},8,["modelValue"])])),[[E,d.value]])}}},R=j(H,[["__scopeId","data-v-33636025"]]);export{R as default}; +import{s as L,u as S}from"./shop-27Bl47qn.js";import{_ as j,r as i,u as A,a as r,h as F,j as T,f as $,d as e,w as l,o as k,e as m,b as w,c as M,t as O,k as P,E as y}from"./index-CMeCUgUG.js";const q={"element-loading-text":"加载中",class:"my-shop"},G={class:"dialog-footer"},H={__name:"index",setup(J){const v=i([]),V=A(),u=i({page:1,limit:15}),d=i(!1),g=i(0),c=()=>{d.value=!0,L(V.userInfo.service.mer_id,u.value).then(t=>{v.value=t.data.list,g.value=t.data.count,d.value=!1})};c();const C=t=>{u.value.page=t,c()},x=t=>{u.value.page=t,c()},N=t=>{u.value.page=t,c()},p=i(!1),o=i({}),U=t=>{o.value=t,p.value=!0},z=()=>{let t={attr:o.value.attr||[],attrValue:o.value.attrValue,mer_cate_id:o.value.merCateId||[],spec_type:o.value.spec_type,is_stock:1};S(o.value.product_id,t).then(n=>{y({message:n.message,type:"success"}),p.value=!1,c()}).catch(n=>{y({message:n,type:"error"})})};return(t,n)=>{const s=r("el-table-column"),f=r("el-image"),_=r("el-button"),h=r("el-table"),B=r("el-pagination"),D=r("el-input-number"),I=r("el-dialog"),E=F("loading");return T((k(),$("div",q,[e(h,{data:v.value,style:{width:"100%"}},{default:l(()=>[e(s,{prop:"product_id",label:"ID",width:"100"}),e(s,{prop:"image",label:"图片",width:"120"},{default:l(a=>[e(f,{loading:"lazy",style:{width:"60px",height:"60px"},src:a.row.image},null,8,["src"])]),_:1}),e(s,{prop:"store_name",label:"商品名称",width:"500"}),e(s,{prop:"price",label:"售价"}),e(s,{prop:"stock",label:"库存"}),e(s,{label:"操作",width:"120"},{default:l(a=>[e(_,{type:"primary",link:"",onClick:b=>U(a.row)},{default:l(()=>[m("编辑")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),e(B,{"page-size":u.value.limit,layout:"prev, pager, next",total:g.value,onPrevClick:C,onNextClick:x,onCurrentChange:N},null,8,["page-size","total"]),e(I,{modelValue:p.value,"onUpdate:modelValue":n[1]||(n[1]=a=>p.value=a),title:"编辑商品库存",width:"800"},{footer:l(()=>[w("div",G,[e(_,{onClick:n[0]||(n[0]=a=>p.value=!1)},{default:l(()=>[m("取消")]),_:1}),e(_,{type:"primary",onClick:z},{default:l(()=>[m(" 确定 ")]),_:1})])]),default:l(()=>[o.value.attrValue?(k(),M(h,{key:0,data:o.value.attrValue,stripe:"",style:{width:"100%"}},{default:l(()=>[e(s,{prop:"image",label:"图片",width:"180"},{default:l(a=>[e(f,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:a.row.image||o.value.image},null,8,["src"])]),_:1}),e(s,{prop:"sku",label:"名称",width:"180"},{default:l(a=>[w("span",null,O(a.row.sku||o.value.store_name),1)]),_:1}),e(s,{prop:"price",label:"价格"}),e(s,{prop:"stock",label:"库存"},{default:l(a=>[e(D,{modelValue:a.row.stock,"onUpdate:modelValue":b=>a.row.stock=b,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):P("",!0)]),_:1},8,["modelValue"])])),[[E,d.value]])}}},R=j(H,[["__scopeId","data-v-33636025"]]);export{R as default}; diff --git a/dist/assets/index-BSmo2Z__.js b/dist/assets/index-CKGYBK9P.js similarity index 96% rename from dist/assets/index-BSmo2Z__.js rename to dist/assets/index-CKGYBK9P.js index 247da7b..dd8d0ea 100644 --- a/dist/assets/index-BSmo2Z__.js +++ b/dist/assets/index-CKGYBK9P.js @@ -1 +1 @@ -import{_ as V,u as g,q as x,r as k,y as U,a,f as I,b as i,d as e,w as o,o as S,e as b,p as L,l as B,E as u,z as C,A as E}from"./index-D5pSuA5u.js";const N=l=>(L("data-v-00c0f4e8"),l=l(),B(),l),M={class:"body"},T={class:"login"},q=N(()=>i("div",{class:"title"},"里海收银系统 - 登录",-1)),z={__name:"index",setup(l){const d=g(),m=x(),t=k({account:"",password:"",key:"",captchaVerification:"",code:""}),f=()=>{if(!t.value.account)return u({message:"请填写账号",type:"error"});if(!t.value.password)return u({message:"请填写密码",type:"error"});C(t.value).then(n=>{console.log(n),n.data&&(d.setToken(n.data.token),E().then(({data:s})=>{if(!s.service)return u({message:"请联系管理员开通服务",type:"error"});d.setUserInfo(s),m.push("/")}))}).catch(n=>{})};return U(()=>{}),(n,s)=>{const v=a("User"),p=a("el-icon"),_=a("el-input"),r=a("el-form-item"),h=a("Lock"),w=a("el-button"),y=a("el-form");return S(),I("div",M,[i("div",T,[q,e(y,null,{default:o(()=>[e(r,null,{default:o(()=>[e(_,{modelValue:t.value.account,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value.account=c),placeholder:"请输入账号"},{prefix:o(()=>[e(p,null,{default:o(()=>[e(v)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:o(()=>[e(_,{modelValue:t.value.password,"onUpdate:modelValue":s[1]||(s[1]=c=>t.value.password=c),type:"password",placeholder:"请输入密码","show-password":""},{prefix:o(()=>[e(p,null,{default:o(()=>[e(h)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:o(()=>[e(w,{style:{width:"100%"},type:"primary",onClick:f},{default:o(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},R=V(z,[["__scopeId","data-v-00c0f4e8"]]);export{R as default}; +import{_ as V,u as g,q as x,r as k,y as U,a,f as I,b as i,d as e,w as o,o as S,e as b,p as L,l as B,E as u,z as C,A as E}from"./index-CMeCUgUG.js";const N=l=>(L("data-v-00c0f4e8"),l=l(),B(),l),M={class:"body"},T={class:"login"},q=N(()=>i("div",{class:"title"},"里海收银系统 - 登录",-1)),z={__name:"index",setup(l){const d=g(),m=x(),t=k({account:"",password:"",key:"",captchaVerification:"",code:""}),f=()=>{if(!t.value.account)return u({message:"请填写账号",type:"error"});if(!t.value.password)return u({message:"请填写密码",type:"error"});C(t.value).then(n=>{console.log(n),n.data&&(d.setToken(n.data.token),E().then(({data:s})=>{if(!s.service)return u({message:"请联系管理员开通服务",type:"error"});d.setUserInfo(s),m.push("/")}))}).catch(n=>{})};return U(()=>{}),(n,s)=>{const v=a("User"),p=a("el-icon"),_=a("el-input"),r=a("el-form-item"),h=a("Lock"),w=a("el-button"),y=a("el-form");return S(),I("div",M,[i("div",T,[q,e(y,null,{default:o(()=>[e(r,null,{default:o(()=>[e(_,{modelValue:t.value.account,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value.account=c),placeholder:"请输入账号"},{prefix:o(()=>[e(p,null,{default:o(()=>[e(v)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:o(()=>[e(_,{modelValue:t.value.password,"onUpdate:modelValue":s[1]||(s[1]=c=>t.value.password=c),type:"password",placeholder:"请输入密码","show-password":""},{prefix:o(()=>[e(p,null,{default:o(()=>[e(h)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:o(()=>[e(w,{style:{width:"100%"},type:"primary",onClick:f},{default:o(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},R=V(z,[["__scopeId","data-v-00c0f4e8"]]);export{R as default}; diff --git a/dist/assets/index-D5pSuA5u.js b/dist/assets/index-CMeCUgUG.js similarity index 99% rename from dist/assets/index-D5pSuA5u.js rename to dist/assets/index-CMeCUgUG.js index c4458b5..87e4fa7 100644 --- a/dist/assets/index-D5pSuA5u.js +++ b/dist/assets/index-CMeCUgUG.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-B6NJAtmD.js","./pay-5Jv4r2r0.js","./pay-CgGUliwa.css","./padding-UtAMRAsR.js","./shop-DjLHIKgd.js","./index-C1LWyo4d.css","./index-B4pghAyb.js","./index-C__UFXHW.css","./indexList-Czsm3GIz.js","./indexList-BWS4uCkU.css","./index-C-KLbSdz.js","./index-Bmp4AY5x.css","./index-BSmo2Z__.js","./index-Cq3x8gKD.css"] + __vite__mapDeps.viteFileDeps = ["./index-FkEbh-kW.js","./pay-BRo_1KzL.js","./pay-CgGUliwa.css","./padding-DsZ1Gb7U.js","./shop-27Bl47qn.js","./index-C1LWyo4d.css","./index-DYIX07Vb.js","./index-D7l49p7O.css","./indexList-CVvMxSCD.js","./indexList-BWS4uCkU.css","./index-BWoVrzFI.js","./index-Bmp4AY5x.css","./index-CKGYBK9P.js","./index-Cq3x8gKD.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -76,4 +76,4 @@ function __vite__mapDeps(indexes) { `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[u4]=this[u4]={accessors:{}}).accessors,r=this.prototype;function a(l){const s=is(l);o[s]||(uce(r,l),o[s]=!0)}return Ve.isArray(t)?t.forEach(a):a(t),this}}vd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ve.reduceDescriptors(vd.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Ve.freezeMethods(vd);const or=vd;function df(e,t){const n=this||lv,o=t||n,r=or.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 Sb(e){return!!(e&&e.__CANCEL__)}function $i(e,t,n){Rt.call(this,e??"canceled",Rt.ERR_CANCELED,t,n),this.name="CanceledError"}Ve.inherits($i,Rt,{__CANCEL__:!0});function cce(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const dce=No.hasStandardBrowserEnv?{write(e,t,n,o,r,a){const l=[e+"="+encodeURIComponent(t)];Ve.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),Ve.isString(o)&&l.push("path="+o),Ve.isString(r)&&l.push("domain="+r),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function fce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function pce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function kb(e,t){return e&&!fce(t)?pce(e,t):t}const vce=No.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(a){let l=a;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(l){const s=Ve.isString(l)?r(l):l;return s.protocol===o.protocol&&s.host===o.host}}():function(){return function(){return!0}}();function hce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function mce(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,a=0,l;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),f=o[a];l||(l=c),n[r]=u,o[r]=c;let d=a,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===a&&(a=(a+1)%e),c-l{const a=r.loaded,l=r.lengthComputable?r.total:void 0,s=a-n,u=o(s),c=a<=l;n=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&c?(l-a)/u:void 0,event:r};f[t?"download":"upload"]=!0,e(f)}}const gce=typeof XMLHttpRequest<"u",yce=gce&&function(e){return new Promise(function(n,o){let r=e.data;const a=or.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(No.hasStandardBrowserEnv||No.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=kb(e.baseURL,e.url);d.open(e.method.toUpperCase(),_b(p,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function h(){if(!d)return;const v=or.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),g={data:!l||l==="text"||l==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:v,config:e,request:d};cce(function(b){n(b),c()},function(b){o(b),c()},g),d=null}if("onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(h)},d.onabort=function(){d&&(o(new Rt("Request aborted",Rt.ECONNABORTED,e,d)),d=null)},d.onerror=function(){o(new Rt("Network Error",Rt.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||bb;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),o(new Rt(y,g.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,e,d)),d=null},No.hasStandardBrowserEnv&&(s&&Ve.isFunction(s)&&(s=s(e)),s||s!==!1&&vce(p))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&dce.read(e.xsrfCookieName);v&&a.set(e.xsrfHeaderName,v)}r===void 0&&a.setContentType(null),"setRequestHeader"in d&&Ve.forEach(a.toJSON(),function(y,g){d.setRequestHeader(g,y)}),Ve.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),l&&l!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",c4(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",c4(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=v=>{d&&(o(!v||v.type?new $i(null,e,d):v),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const m=hce(p);if(m&&No.protocols.indexOf(m)===-1){o(new Rt("Unsupported protocol "+m+":",Rt.ERR_BAD_REQUEST,e));return}d.send(r||null)})},F0={http:Kue,xhr:yce};Ve.forEach(F0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const d4=e=>`- ${e}`,_ce=e=>Ve.isFunction(e)||e===null||e===!1,Eb={getAdapter:e=>{e=Ve.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let a=0;a`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=t?a.length>1?`since : `+a.map(d4).join(` `):" "+d4(a[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o},adapters:F0};function ff(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $i(null,e)}function f4(e){return ff(e),e.headers=or.from(e.headers),e.data=df.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Eb.getAdapter(e.adapter||lv.adapter)(e).then(function(o){return ff(e),o.data=df.call(e,e.transformResponse,o),o.headers=or.from(o.headers),o},function(o){return Sb(o)||(ff(e),o&&o.response&&(o.response.data=df.call(e,e.transformResponse,o.response),o.response.headers=or.from(o.response.headers))),Promise.reject(o)})}const p4=e=>e instanceof or?{...e}:e;function Hl(e,t){t=t||{};const n={};function o(c,f,d){return Ve.isPlainObject(c)&&Ve.isPlainObject(f)?Ve.merge.call({caseless:d},c,f):Ve.isPlainObject(f)?Ve.merge({},f):Ve.isArray(f)?f.slice():f}function r(c,f,d){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c,d)}else return o(c,f,d)}function a(c,f){if(!Ve.isUndefined(f))return o(void 0,f)}function l(c,f){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c)}else return o(void 0,f)}function s(c,f,d){if(d in t)return o(c,f);if(d in e)return o(void 0,c)}const u={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(c,f)=>r(p4(c),p4(f),!0)};return Ve.forEach(Object.keys(Object.assign({},e,t)),function(f){const d=u[f]||r,p=d(e[f],t[f],f);Ve.isUndefined(p)&&d!==s||(n[f]=p)}),n}const xb="1.6.8",sv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{sv[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const v4={};sv.transitional=function(t,n,o){function r(a,l){return"[Axios v"+xb+"] Transitional option '"+a+"'"+l+(o?". "+o:"")}return(a,l,s)=>{if(t===!1)throw new Rt(r(l," has been removed"+(n?" in "+n:"")),Rt.ERR_DEPRECATED);return n&&!v4[l]&&(v4[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,s):!0}};function bce(e,t,n){if(typeof e!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const a=o[r],l=t[a];if(l){const s=e[a],u=s===void 0||l(s,a,e);if(u!==!0)throw new Rt("option "+a+" must be "+u,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+a,Rt.ERR_BAD_OPTION)}}const K0={assertOptions:bce,validators:sv},kr=K0.validators;class mc{constructor(t){this.defaults=t,this.interceptors={request:new i4,response:new i4}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const a=r.stack?r.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=` -`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&K0.assertOptions(o,{silentJSONParsing:kr.transitional(kr.boolean),forcedJSONParsing:kr.transitional(kr.boolean),clarifyTimeoutError:kr.transitional(kr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:K0.assertOptions(r,{encode:kr.function,serialize:kr.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=or.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[f4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new $i(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 iv(function(r){t=r}),cancel:t}}}const wce=iv;function Cce(e){return function(n){return e.apply(null,n)}}function Sce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const W0={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(W0).forEach(([e,t])=>{W0[t]=e});const kce=W0;function Mb(e){const t=new Bu(e),n=sb(Bu.prototype.request,t);return Ve.extend(n,Bu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Mb(Hl(e,r))},n}const sn=Mb(lv);sn.Axios=Bu;sn.CanceledError=$i;sn.CancelToken=wce;sn.isCancel=Sb;sn.VERSION=xb;sn.toFormData=pd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Cce;sn.isAxiosError=Sce;sn.mergeConfig=Hl;sn.AxiosHeaders=or;sn.formToJSON=e=>Cb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=Eb.getAdapter;sn.HttpStatusCode=kce;sn.default=sn;const Ti=sn.create({baseURL:"http://192.168.1.22:8324/api",timeout:1e4});Ti.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)));Ti.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ms({message:e.data.message,type:"error"}),setTimeout(()=>{const t=nv();t.setUserInfo({}),t.setToken(""),Tb.push("/login")},700)),e.data.status===400)throw Ms({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ms({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Xce(e){return Ti.post("auth/login",e)}function Jce(e){return Ti.get("user",e)}function Ece(){return Ti.post("logout")}const uv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},xce=e=>(W4("data-v-28f3f43a"),e=e(),j4(),e),Mce={class:"my-card"},$ce={class:"card-header"},Tce=xce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Oce={class:"card-body"},Ace={class:"el-dropdown-link"},Nce={class:"info"},Rce={style:{"margin-left":"0.3rem"}},Ice={__name:"myHeader",setup(e){const t=nv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=nb(),a=()=>{Ece().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ms({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ze("el-image"),c=Ze("el-avatar"),f=Ze("arrow-down"),d=Ze("el-icon"),p=Ze("el-dropdown-item"),h=Ze("el-dropdown-menu"),m=Ze("el-dropdown");return _(),M("div",Mce,[k("div",$ce,[W(u,{style:{height:"3rem",width:"3rem"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"}),Tce]),k("div",Oce,[W(m,{trigger:"hover"},{dropdown:J(()=>[W(h,null,{default:J(()=>[W(p,{onClick:a},{default:J(()=>[gt("退出登录")]),_:1})]),_:1})]),default:J(()=>[k("div",Ace,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Nce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Rce,"("+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:J(()=>[W(f)]),_:1})])]),_:1})])])}}},Pce=uv(Ice,[["__scopeId","data-v-28f3f43a"]]),cv=e=>(W4("data-v-60ad4a9d"),e=e(),j4(),e),Lce={class:"my-card"},Vce=cv(()=>k("div",null,"收银",-1)),Bce=cv(()=>k("div",null,"订单",-1)),zce=cv(()=>k("div",null,"商品",-1)),Hce={__name:"myAside",setup(e){const t=nb(),n=eue(),o=r=>{t.push({name:r})};return(r,a)=>{const l=Ze("Sell"),s=Ze("el-icon"),u=Ze("DataLine"),c=Ze("ShoppingBag");return _(),M("div",Lce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:a[0]||(a[0]=f=>o("home"))},[W(s,{size:"30"},{default:J(()=>[W(l)]),_:1}),Vce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:a[1]||(a[1]=f=>o("order"))},[W(s,{size:"30"},{default:J(()=>[W(u)]),_:1}),Bce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:a[2]||(a[2]=f=>o("shop"))},[W(s,{size:"30"},{default:J(()=>[W(c)]),_:1}),zce],2)])}}},Dce=uv(Hce,[["__scopeId","data-v-60ad4a9d"]]),Fce={class:"common-layout"},Kce={__name:"index",setup(e){return(t,n)=>{const o=Ze("el-header"),r=Ze("el-aside"),a=Ze("router-view"),l=Ze("el-main"),s=Ze("el-container");return _(),M("div",Fce,[W(s,null,{default:J(()=>[W(o,null,{default:J(()=>[W(Pce)]),_:1}),W(s,null,{default:J(()=>[W(r,{width:"100px"},{default:J(()=>[W(Dce)]),_:1}),W(l,null,{default:J(()=>[W(a,{class:"my-main"},{default:J(({Component:u})=>[W(tn,{name:"el-fade-in-linear"},{default:J(()=>[(_(),le(it(u)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Wce=uv(Kce,[["__scopeId","data-v-b7511b8b"]]),jce=[{path:"/",name:"layout",component:Wce,redirect:"/home",children:[{path:"/home",name:"home",component:()=>Qa(()=>import("./index-B6NJAtmD.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/order",name:"order",component:()=>Qa(()=>import("./index-B4pghAyb.js"),__vite__mapDeps([6,1,2,3,7]),import.meta.url)},{path:"/orderList",name:"orderList",component:()=>Qa(()=>import("./indexList-Czsm3GIz.js"),__vite__mapDeps([8,1,2,9]),import.meta.url)},{path:"/shop",name:"shop",component:()=>Qa(()=>import("./index-C-KLbSdz.js"),__vite__mapDeps([10,4,11]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Qa(()=>import("./index-BSmo2Z__.js"),__vite__mapDeps([12,13]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Qa(()=>import("./index-y31P2_LV.js"),__vite__mapDeps([]),import.meta.url)}],$b=Zie({history:Mie(),routes:jce});$b.beforeEach((e,t,n)=>{const o=nv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Tb=$b,Oi=Tg(J5);for(const[e,t]of Object.entries(xL))Oi.component(e,t);const qce=nue();Oi.use(Tb);Oi.use(qce);Oi.use(qse,{locale:Use});Oi.mount("#app");export{Jce as A,Ms as E,Ke as F,uv as _,Ze as a,k as b,le as c,W as d,gt as e,M as f,ht as g,kc as h,Mt as i,et as j,ne as k,j4 as l,rr as m,T as n,_ as o,W4 as p,nb as q,P as r,Ti as s,Te as t,nv as u,S as v,J as w,We as x,tt as y,Xce as z}; +`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&K0.assertOptions(o,{silentJSONParsing:kr.transitional(kr.boolean),forcedJSONParsing:kr.transitional(kr.boolean),clarifyTimeoutError:kr.transitional(kr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:K0.assertOptions(r,{encode:kr.function,serialize:kr.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=or.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[f4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new $i(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 iv(function(r){t=r}),cancel:t}}}const wce=iv;function Cce(e){return function(n){return e.apply(null,n)}}function Sce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const W0={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(W0).forEach(([e,t])=>{W0[t]=e});const kce=W0;function Mb(e){const t=new Bu(e),n=sb(Bu.prototype.request,t);return Ve.extend(n,Bu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Mb(Hl(e,r))},n}const sn=Mb(lv);sn.Axios=Bu;sn.CanceledError=$i;sn.CancelToken=wce;sn.isCancel=Sb;sn.VERSION=xb;sn.toFormData=pd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Cce;sn.isAxiosError=Sce;sn.mergeConfig=Hl;sn.AxiosHeaders=or;sn.formToJSON=e=>Cb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=Eb.getAdapter;sn.HttpStatusCode=kce;sn.default=sn;const Ti=sn.create({baseURL:"https://crmeb-test.shop.lihaink.cn/api",timeout:1e4});Ti.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)));Ti.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&(Ms({message:e.data.message,type:"error"}),setTimeout(()=>{const t=nv();t.setUserInfo({}),t.setToken(""),Tb.push("/login")},700)),e.data.status===400)throw Ms({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),Ms({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Xce(e){return Ti.post("auth/login",e)}function Jce(e){return Ti.get("user",e)}function Ece(){return Ti.post("logout")}const uv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},xce=e=>(W4("data-v-28f3f43a"),e=e(),j4(),e),Mce={class:"my-card"},$ce={class:"card-header"},Tce=xce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Oce={class:"card-body"},Ace={class:"el-dropdown-link"},Nce={class:"info"},Rce={style:{"margin-left":"0.3rem"}},Ice={__name:"myHeader",setup(e){const t=nv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=nb(),a=()=>{Ece().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{Ms({message:"退出失败",type:"error"})})};return(l,s)=>{const u=Ze("el-image"),c=Ze("el-avatar"),f=Ze("arrow-down"),d=Ze("el-icon"),p=Ze("el-dropdown-item"),h=Ze("el-dropdown-menu"),m=Ze("el-dropdown");return _(),M("div",Mce,[k("div",$ce,[W(u,{style:{height:"3rem",width:"3rem"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"}),Tce]),k("div",Oce,[W(m,{trigger:"hover"},{dropdown:J(()=>[W(h,null,{default:J(()=>[W(p,{onClick:a},{default:J(()=>[gt("退出登录")]),_:1})]),_:1})]),default:J(()=>[k("div",Ace,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Nce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Rce,"("+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:J(()=>[W(f)]),_:1})])]),_:1})])])}}},Pce=uv(Ice,[["__scopeId","data-v-28f3f43a"]]),cv=e=>(W4("data-v-60ad4a9d"),e=e(),j4(),e),Lce={class:"my-card"},Vce=cv(()=>k("div",null,"收银",-1)),Bce=cv(()=>k("div",null,"订单",-1)),zce=cv(()=>k("div",null,"商品",-1)),Hce={__name:"myAside",setup(e){const t=nb(),n=eue(),o=r=>{t.push({name:r})};return(r,a)=>{const l=Ze("Sell"),s=Ze("el-icon"),u=Ze("DataLine"),c=Ze("ShoppingBag");return _(),M("div",Lce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:a[0]||(a[0]=f=>o("home"))},[W(s,{size:"30"},{default:J(()=>[W(l)]),_:1}),Vce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:a[1]||(a[1]=f=>o("order"))},[W(s,{size:"30"},{default:J(()=>[W(u)]),_:1}),Bce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:a[2]||(a[2]=f=>o("shop"))},[W(s,{size:"30"},{default:J(()=>[W(c)]),_:1}),zce],2)])}}},Dce=uv(Hce,[["__scopeId","data-v-60ad4a9d"]]),Fce={class:"common-layout"},Kce={__name:"index",setup(e){return(t,n)=>{const o=Ze("el-header"),r=Ze("el-aside"),a=Ze("router-view"),l=Ze("el-main"),s=Ze("el-container");return _(),M("div",Fce,[W(s,null,{default:J(()=>[W(o,null,{default:J(()=>[W(Pce)]),_:1}),W(s,null,{default:J(()=>[W(r,{width:"100px"},{default:J(()=>[W(Dce)]),_:1}),W(l,null,{default:J(()=>[W(a,{class:"my-main"},{default:J(({Component:u})=>[W(tn,{name:"el-fade-in-linear"},{default:J(()=>[(_(),le(it(u)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Wce=uv(Kce,[["__scopeId","data-v-b7511b8b"]]),jce=[{path:"/",name:"layout",component:Wce,redirect:"/home",children:[{path:"/home",name:"home",component:()=>Qa(()=>import("./index-FkEbh-kW.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/order",name:"order",component:()=>Qa(()=>import("./index-DYIX07Vb.js"),__vite__mapDeps([6,1,2,3,7]),import.meta.url)},{path:"/orderList",name:"orderList",component:()=>Qa(()=>import("./indexList-CVvMxSCD.js"),__vite__mapDeps([8,1,2,9]),import.meta.url)},{path:"/shop",name:"shop",component:()=>Qa(()=>import("./index-BWoVrzFI.js"),__vite__mapDeps([10,4,11]),import.meta.url)}]},{path:"/login",name:"login",component:()=>Qa(()=>import("./index-CKGYBK9P.js"),__vite__mapDeps([12,13]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>Qa(()=>import("./index-X-sbpCmf.js"),__vite__mapDeps([]),import.meta.url)}],$b=Zie({history:Mie(),routes:jce});$b.beforeEach((e,t,n)=>{const o=nv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Tb=$b,Oi=Tg(J5);for(const[e,t]of Object.entries(xL))Oi.component(e,t);const qce=nue();Oi.use(Tb);Oi.use(qce);Oi.use(qse,{locale:Use});Oi.mount("#app");export{Jce as A,Ms as E,Ke as F,uv as _,Ze as a,k as b,le as c,W as d,gt as e,M as f,ht as g,kc as h,Mt as i,et as j,ne as k,j4 as l,rr as m,T as n,_ as o,W4 as p,nb as q,P as r,Ti as s,Te as t,nv as u,S as v,J as w,We as x,tt as y,Xce as z}; diff --git a/dist/assets/index-C__UFXHW.css b/dist/assets/index-D7l49p7O.css similarity index 68% rename from dist/assets/index-C__UFXHW.css rename to dist/assets/index-D7l49p7O.css index e2ba475..2f6728d 100644 --- a/dist/assets/index-C__UFXHW.css +++ b/dist/assets/index-D7l49p7O.css @@ -1 +1 @@ -@charset "UTF-8";.my-order[data-v-d06e73c3]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-d06e73c3]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav span[data-v-d06e73c3]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-d06e73c3]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-d06e73c3]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-d06e73c3]{height:calc(100vh - 100px - 8.2rem);overflow-y:auto}.my-order .order-list .item[data-v-d06e73c3]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-d06e73c3]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-d06e73c3]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-d06e73c3]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #2ec479;color:#2ec479;border-radius:3px}.my-order .order-list .item .top .create-time[data-v-d06e73c3]{font-size:.8rem}.my-order .order-list .item .shop[data-v-d06e73c3]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-d06e73c3]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-d06e73c3]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-d06e73c3]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-d06e73c3]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-d06e73c3]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-d06e73c3]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-list .item .bottom[data-v-d06e73c3]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-d06e73c3]{background-color:#efefef}.my-order .load-end[data-v-d06e73c3]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-b59b7350]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-b59b7350]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-b59b7350]{height:4rem;width:8rem;cursor:pointer;display:flex;justify-content:center;align-items:center;font-size:1.2rem;background-color:#f5f5f5;border-radius:1rem 1rem 0 0}.my-order .header-nav .nav-item-active[data-v-b59b7350]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-b59b7350]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-b59b7350]{border-radius:0 0 0 1rem}.my-order .detail[data-v-b59b7350]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-b59b7350]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-b59b7350]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-b59b7350]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:2rem;border-bottom:1px solid #eee}.my-order .detail .table .table-info[data-v-b59b7350]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-b59b7350]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-b59b7350]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-b59b7350]{height:6rem;box-sizing:border-box;padding:0 1.5rem;position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px 10px #eee;display:flex;justify-content:space-between;align-items:center;background-color:#fff}.my-order .detail .footer .info[data-v-b59b7350]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-b59b7350]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-b59b7350]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-b59b7350]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-b59b7350]{border-radius:4rem;padding:1.2rem}.my-card{display:flex}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.my-order[data-v-e6c59a6f]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-e6c59a6f]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav span[data-v-e6c59a6f]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-e6c59a6f]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-e6c59a6f]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-e6c59a6f]{height:calc(100vh - 100px - 8.2rem);overflow-y:auto}.my-order .order-list .item[data-v-e6c59a6f]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-e6c59a6f]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-e6c59a6f]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-e6c59a6f]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #2ec479;color:#2ec479;border-radius:3px}.my-order .order-list .item .top .create-time[data-v-e6c59a6f]{font-size:.8rem}.my-order .order-list .item .shop[data-v-e6c59a6f]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-e6c59a6f]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-e6c59a6f]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-e6c59a6f]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-e6c59a6f]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-e6c59a6f]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-e6c59a6f]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-list .item .bottom[data-v-e6c59a6f]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-e6c59a6f]{background-color:#efefef}.my-order .load-end[data-v-e6c59a6f]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-b59b7350]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-b59b7350]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-b59b7350]{height:4rem;width:8rem;cursor:pointer;display:flex;justify-content:center;align-items:center;font-size:1.2rem;background-color:#f5f5f5;border-radius:1rem 1rem 0 0}.my-order .header-nav .nav-item-active[data-v-b59b7350]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-b59b7350]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-b59b7350]{border-radius:0 0 0 1rem}.my-order .detail[data-v-b59b7350]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-b59b7350]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-b59b7350]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-b59b7350]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:2rem;border-bottom:1px solid #eee}.my-order .detail .table .table-info[data-v-b59b7350]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-b59b7350]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-b59b7350]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-b59b7350]{height:6rem;box-sizing:border-box;padding:0 1.5rem;position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px 10px #eee;display:flex;justify-content:space-between;align-items:center;background-color:#fff}.my-order .detail .footer .info[data-v-b59b7350]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-b59b7350]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-b59b7350]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-b59b7350]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-b59b7350]{border-radius:4rem;padding:1.2rem}.my-card{display:flex}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/index-DYIX07Vb.js b/dist/assets/index-DYIX07Vb.js new file mode 100644 index 0000000..0898c2d --- /dev/null +++ b/dist/assets/index-DYIX07Vb.js @@ -0,0 +1 @@ +import{_ as M,u as T,r as _,a as k,h as U,o as s,f as i,b as e,d as l,w as f,e as h,i as J,j,F as z,g as F,n as A,t as r,c as O,k as n,p as q,l as H,q as Q,E as N}from"./index-CMeCUgUG.js";import{e as W,p as X,f as Y,g as Z}from"./pay-BRo_1KzL.js";import{p as ee}from"./padding-DsZ1Gb7U.js";function te(c){return{all:c=c||new Map,on:function(m,t){var u=c.get(m);u?u.push(t):c.set(m,[t])},off:function(m,t){var u=c.get(m);u&&(t?u.splice(u.indexOf(t)>>>0,1):c.set(m,[]))},emit:function(m,t){var u=c.get(m);u&&u.slice().map(function(v){v(t)}),(u=c.get("*"))&&u.slice().map(function(v){v(m,t)})}}}const K=te(),se=c=>(q("data-v-e6c59a6f"),c=c(),H(),c),oe={class:"my-order"},ie={class:"header-nav"},ae=se(()=>e("div",{class:"nav-item"},"订单列表",-1)),le={class:"nav-item-clear"},ne={class:"header-input"},ce={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},de=["onClick"],re={class:"top"},_e={class:"create-time"},ue={class:"shop"},ve={key:0,class:"left"},pe={key:0,class:"shop-name"},fe={class:"right"},me={class:"money"},he={class:"count"},ye={class:"bottom"},ge={class:"pay"},ke={key:0},$e={key:0},be={key:1},Ce={key:2},we={key:3},Ve={key:4},Se={key:5},Pe={key:1,style:{color:"#ff4a00"}},Le={key:0,class:"cashier"},xe={key:1,class:"cashier"},Ie={key:0,class:"load-end"},Ae={key:1,class:"load-end"},Re={__name:"order",setup(c){const m=T();_([]);const t=_(1),u=C=>{v.value.page=1,g.value=!1,p.value=!1,b.value=[],V(!0)};_(null);const v=_({page:1,limit:20,search_info:""}),p=_(!1),L=_(0),S=_(0),g=_(!1),b=_([]),V=(C=!1)=>{if(C)v.value.page=1;else if(g.value||p.value)return;p.value=!0,t.value==1&&(v.value.paid=null),t.value==2&&(v.value.paid=0),W(m.userInfo.service.mer_id,v.value).then(a=>{C?b.value=a.data.list:b.value=[...b.value,...a.data.list],a.data.list.length{g.value=!0,p.value=!1})},R=(C,a)=>{S.value=a,K.emit("set-order-detail",C)};return(C,a)=>{const d=k("el-radio-button"),x=k("el-radio-group"),P=k("el-button"),B=k("el-input"),w=k("el-image"),D=U("loading"),E=U("infinite-scroll");return s(),i("div",oe,[e("div",ie,[ae,e("div",le,[l(x,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),onChange:u,size:"small"},{default:f(()=>[l(d,{value:1},{default:f(()=>[h("全部")]),_:1}),l(d,{value:2},{default:f(()=>[h("未支付")]),_:1})]),_:1},8,["modelValue"])])]),e("div",ne,[l(B,{modelValue:v.value.search_info,"onUpdate:modelValue":a[2]||(a[2]=o=>v.value.search_info=o),placeholder:"请输入订单编号",onKeydown:a[3]||(a[3]=J(o=>V(!0),["enter"])),onClear:a[4]||(a[4]=o=>V(!0)),clearable:""},{append:f(()=>[l(P,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:a[1]||(a[1]=o=>V(!0))},{default:f(()=>[h("搜索")]),_:1})]),_:1},8,["modelValue"])]),j((s(),i("div",ce,[(s(!0),i(z,null,F(b.value,(o,$)=>(s(),i("div",{class:A(["item",{"item-active":S.value==$}]),key:$,onClick:I=>R(o,$)},[e("div",re,[e("div",{class:A(["sn",{cahier:o.pay_type==11||o.pay_type==12}])},"单号: "+r(o.order_sn),3),e("div",_e,r(o.create_time),1)]),e("div",ue,[o.orderProduct?(s(),i("div",ve,[(s(!0),i(z,null,F(o.orderProduct.slice(0,5),(I,G)=>(s(),O(w,{key:G,src:I.cart_info.productAttr.image||I.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),o.orderProduct.length==1?(s(),i("div",pe,r(o.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",fe,[e("div",me,"¥"+r(o.pay_price),1),e("div",he,"共"+r(o.total_num)+"件商品",1)])]),e("div",ye,[e("div",ge,[o.paid?(s(),i("div",ke,[h(" 已支付 "),o.pay_type==12?(s(),i("span",$e,"(现金支付)")):n("",!0),o.pay_type==11?(s(),i("span",be,"(微信支付)")):n("",!0),o.pay_type==0?(s(),i("span",Ce,"(余额支付)")):n("",!0),o.pay_type==1?(s(),i("span",we,"(微信支付)")):n("",!0),o.pay_type==9?(s(),i("span",Ve,"(商户余额支付)")):n("",!0),o.pay_type==10?(s(),i("span",Se,"(对公转账)")):n("",!0)])):(s(),i("div",Pe,"未支付"))]),o.service_info?(s(),i("div",Le,"收银员: "+r(o.service_info.nickname),1)):(s(),i("div",xe,"平台订单"))])],10,de))),128)),g.value?(s(),i("div",Ie,"没有更多了")):n("",!0),p.value?(s(),i("div",Ae,"加载中...")):n("",!0)])),[[D,p.value],[E,V]])])}}},Be=M(Re,[["__scopeId","data-v-e6c59a6f"]]),y=c=>(q("data-v-b59b7350"),c=c(),H(),c),De={class:"my-order"},Ee={class:"header-nav"},Ne=["onClick"],Ue={class:"detail"},ze={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},Oe={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Me={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},je=y(()=>e("div",{class:"table-title"},"订单信息",-1)),qe={class:"table-info"},He={class:"info-item"},Ge=y(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=y(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=y(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=y(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ot={class:"info-item-info"},it={class:"info-item"},at=y(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},ct=y(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},rt={class:"info-item"},_t=y(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ut={class:"info-item-info"},vt={key:0},pt={key:1},ft={key:2},mt={key:3},ht={key:4},yt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info",style:{"flex-direction":"column"}},$t={class:"info-item"},bt=y(()=>e("div",{class:"info-item-title"},"头像:",-1)),Ct={class:"info-item-info"},wt={class:"info-item"},Vt=y(()=>e("div",{class:"info-item-title"},"昵称:",-1)),St={class:"info-item-info"},Pt={class:"info-item"},Lt=y(()=>e("div",{class:"info-item-title"},"账号:",-1)),xt={class:"info-item-info"},It={key:2,class:"footer"},At={class:"info"},Rt={class:"ser"},Bt={class:"price"},Dt={key:0,class:"handle"},Et={key:1,class:"handle"},Nt=y(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ut={class:"dialog-footer"},zt={__name:"detail",setup(c){T();const m=Q(),t=_({});K.on("set-order-detail",a=>{t.value=a}),_([]);const u=_(null),v=_(!1);_(0);const p=_(0),L=_(["商品信息","订单详情"]),S=_(""),g=_(!1),b=a=>{S.value=a,g.value=!0},V=()=>{g.value=!1,Y({order_sn:S.value}).then(a=>{N({message:a.message,type:"success"}),m.push({name:"home"})})},R=a=>{u.value.setRePay({price:a.pay_price,order_id:a.group_order_id}),u.value.drawer=!0},C=a=>{Z({order_sn:a}).then(d=>{d.data.paid==1||d.message=="支付成功"?N({message:d.message,type:"success"}):N({message:d.message,type:"error"})}).catch(d=>{})};return(a,d)=>{const x=k("el-image"),P=k("el-table-column"),B=k("el-table"),w=k("el-button"),D=k("el-dialog"),E=U("loading");return s(),i("div",De,[e("div",Ee,[(s(!0),i(z,null,F(L.value,(o,$)=>(s(),i("div",{key:$,class:A(["nav-item",{"nav-item-active":p.value==$,"nav-item-radius1":p.value==$+1,"nav-item-radius2":p.value==$-1}]),onClick:I=>p.value=$},r(o),11,Ne))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":p.value==L.value.length-1}]),style:{flex:"1"}},null,2)]),j((s(),i("div",Ue,[t.value.orderProduct&&p.value==0?(s(),i("div",ze,[e("div",Fe,[h(" 共计 "),e("span",Oe,r(t.value.total_num),1),h(" 件商品 ")]),l(B,{style:{height:"calc(100vh - 100px - 14rem)"},data:t.value.orderProduct},{default:f(()=>[l(P,{prop:"cart_info.product.store_name",label:"商品信息"},{default:f(({row:o})=>[e("div",Ke,[l(x,{style:{height:"3rem",width:"3rem"},src:o.cart_info.productAttr.image||o.cart_info.product.image},null,8,["src"]),e("span",Me,r(o.cart_info.product.store_name),1)])]),_:1}),l(P,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),l(P,{prop:"product_num",label:"数量",width:"150"}),l(P,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),t.value.orderProduct&&p.value==1?(s(),i("div",Te,[je,e("div",qe,[e("div",He,[Ge,e("div",Je,r(t.value.create_time),1)]),e("div",Qe,[We,e("div",Xe,r(t.value.total_num),1)]),e("div",Ye,[Ze,e("div",et,"¥"+r(t.value.total_price),1)]),e("div",tt,[st,e("div",ot,r(t.value.pay_time),1)]),e("div",it,[at,e("div",lt,"¥"+r(t.value.deduction_price),1)]),e("div",nt,[ct,e("div",dt,"¥"+r(t.value.pay_price),1)]),e("div",rt,[_t,e("div",ut,[t.value.pay_type==11?(s(),i("span",vt,"微信收款")):n("",!0),t.value.pay_type==12?(s(),i("span",pt,"现金支付")):n("",!0),t.value.pay_type==0?(s(),i("span",ft,"余额支付")):n("",!0),t.value.pay_type==1?(s(),i("span",mt,"微信支付")):n("",!0),t.value.pay_type==9?(s(),i("span",ht,"商户余额支付")):n("",!0),t.value.pay_type==10?(s(),i("span",yt,"对公转账")):n("",!0)])])]),t.value.service_info?(s(),i("div",gt,"收银员信息")):n("",!0),t.value.service_info?(s(),i("div",kt,[e("div",$t,[bt,e("div",Ct,[l(x,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:t.value.service_info.avatar},null,8,["src"])])]),e("div",wt,[Vt,e("div",St,r(t.value.service_info.nickname),1)]),e("div",Pt,[Lt,e("div",xt,r(t.value.service_info.account),1)])])):n("",!0)])):n("",!0),t.value.service_info?(s(),i("div",It,[e("div",At,[e("div",Rt,"收银员: "+r(t.value.service_info.nickname),1),e("div",Bt,[h(" 实付: "),e("span",null,"¥"+r(t.value.pay_price),1)])]),t.value.pay_time?(s(),i("div",Et,"已支付")):(s(),i("div",Dt,[l(w,{class:"btn",type:"primary",onClick:d[0]||(d[0]=o=>R(t.value))},{default:f(()=>[h("重新支付")]),_:1}),l(w,{class:"btn",type:"primary",onClick:d[1]||(d[1]=o=>C(t.value.order_sn))},{default:f(()=>[h("检测状态")]),_:1}),l(w,{class:"btn",type:"success",onClick:d[2]||(d[2]=o=>b(t.value.order_sn))},{default:f(()=>[h("提单")]),_:1})]))])):n("",!0)])),[[E,v.value]]),l(X,{ref_key:"payRef",ref:u},null,512),l(D,{modelValue:g.value,"onUpdate:modelValue":d[4]||(d[4]=o=>g.value=o),title:"提示",width:"500"},{footer:f(()=>[e("div",Ut,[l(w,{onClick:d[3]||(d[3]=o=>g.value=!1)},{default:f(()=>[h("取消")]),_:1}),a.cartCount>0?(s(),O(w,{key:0,onClick:a.goHome},{default:f(()=>[h(" 前去清空购物车 ")]),_:1},8,["onClick"])):(s(),O(w,{key:1,type:"primary",onClick:V},{default:f(()=>[h(" 确认提单 ")]),_:1}))])]),default:f(()=>[Nt]),_:1},8,["modelValue"])])}}},Ft=M(zt,[["__scopeId","data-v-b59b7350"]]),Ot={class:"my-card"},jt={__name:"index",setup(c){return(m,t)=>(s(),i("div",Ot,[l(Be,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(ee),l(Ft,{ref:"detailRef"},null,512)]))}};export{jt as default}; diff --git a/dist/assets/index-B6NJAtmD.js b/dist/assets/index-FkEbh-kW.js similarity index 96% rename from dist/assets/index-B6NJAtmD.js rename to dist/assets/index-FkEbh-kW.js index 62cc55e..e6e9506 100644 --- a/dist/assets/index-B6NJAtmD.js +++ b/dist/assets/index-FkEbh-kW.js @@ -1 +1 @@ -import{c as W,a as X,b as B,d as Y,p as Z,o as ee}from"./pay-5Jv4r2r0.js";import{_ as U,r as u,a as _,o as y,c as q,w as k,b as e,d as n,e as m,t as V,f as A,F as O,g as M,h as j,i as te,j as G,k as J,p as K,l as T,m as oe,n as se,u as ae}from"./index-D5pSuA5u.js";import{p as le}from"./padding-UtAMRAsR.js";import{g as ne,s as ce}from"./shop-DjLHIKgd.js";const ie={class:"price"},re={class:"flex"},ue={style:{margin:"10px","padding-bottom":"40px"}},de={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},_e={class:"dialog-footer"},pe={__name:"price",emits:["submit"],setup(w,{expose:x,emit:b}){const s=u(!1),l=u(0),o=(g,v=0)=>{s.value=g,l.value=v},c=u({nowPrice:"",percentage:""}),p=g=>{c.value.percentage=(g/l.value*100).toFixed(2)},$=g=>{c.value.nowPrice=(l.value*g/100).toFixed(2)},f=b,L=()=>{f("submit",c.value.nowPrice),s.value=!1};return x({show:o}),(g,v)=>{const P=_("el-input"),h=_("el-button"),I=_("el-dialog");return y(),q(I,{modelValue:s.value,"onUpdate:modelValue":v[2]||(v[2]=r=>s.value=r),title:"订单改价",width:"650"},{footer:k(()=>[e("div",_e,[n(h,{class:"ok-btn",type:"primary",onClick:L},{default:k(()=>[m(" 确定 ")]),_:1})])]),default:k(()=>[e("div",ie,[e("div",re,[n(P,{style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:c.value.nowPrice,"onUpdate:modelValue":v[0]||(v[0]=r=>c.value.nowPrice=r),placeholder:"请输入改价后的价格",onInput:p},{suffix:k(()=>[m("元")]),_:1},8,["modelValue"]),n(P,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:c.value.percentage,"onUpdate:modelValue":v[1]||(v[1]=r=>c.value.percentage=r),placeholder:"请输入比例",onInput:$},{suffix:k(()=>[m("%")]),_:1},8,["modelValue"])]),e("div",ue,[m("改价后金额: "),e("span",de,"¥"+V(c.value.nowPrice||l.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},ve=U(pe,[["__scopeId","data-v-518d9bc5"]]),me={class:"my-order"},he={class:"header-nav"},fe={class:"nav-item"},ge={class:"order-list"},ye={class:"order-item-info"},ke={class:"order-item-title"},be={class:"title"},$e=["onClick"],we={class:"order-item-sku"},xe=["onClick"],Ie={class:"order-item-price"},Ce={class:"order-footer"},Ve={class:"order-total"},Ae={class:"price"},Pe={class:"total-item"},Se={style:{"font-size":"1.4rem"}},Le={class:"total-item"},Fe={class:"update-price"},De={class:"order-btn"},Re={__name:"order",emits:["goPay","editAttr"],setup(w,{expose:x,emit:b}){const s=u([]),l=u(0),o=u(0),c=()=>{let a=[];s.value.map(t=>{a.push(t.cart_id)}),a.length!=0&&$(a)},p=a=>{s.value=s.value.filter(t=>t.cart_id!=a),$([a])},$=a=>{W({cart_id:a}).then(t=>{console.log(t),f()})},f=()=>{l.value=0,o.value=0,X({source:300}).then(a=>{var t,i;((i=(t=a.data)==null?void 0:t.list)==null?void 0:i.length)>0?(s.value=a.data.list[0].list,s.value.forEach(d=>{l.value+=d.productAttr.price*d.cart_num})):s.value=[]})};f();const L=b,g=()=>{L("goPay")},v=(a,t)=>{B(a.cart_id,{cart_num:a.cart_num}).then(i=>{l.value=0,s.value.forEach(d=>{l.value+=d.productAttr.price*d.cart_num})})},P=a=>{L("editPupop",a)},h=(a,t)=>{B(a,t).then(i=>{f()})},I=a=>{o.value=l.value-a,l.value=+a};u(0);const r=u(null),C=()=>{r.value.show(!0,l.value)};return x({getList:f,list:s,editItem:h,discounts:o,allPrice:l}),(a,t)=>{const i=_("Delete"),d=_("el-icon"),D=_("el-empty"),R=_("el-image"),F=_("ArrowDown"),E=_("el-input-number"),N=_("el-button");return y(),A("div",me,[e("div",he,[e("div",fe,[m(" 已选购 "),e("span",null,V(s.value.length),1),m(" 件 ")]),e("div",{class:"nav-item-clear",onClick:c},[n(d,null,{default:k(()=>[n(i)]),_:1}),m("清空 ")])]),e("div",ge,[s.value.length==0?(y(),q(D,{key:0,description:"请点击右侧添加商品"})):(y(!0),A(O,{key:1},M(s.value,(S,Q)=>(y(),A("div",{class:"order-item",key:Q},[n(R,{loading:"lazy",class:"order-item-img",src:S.productAttr&&S.productAttr.image||S.product.image},null,8,["src"]),e("div",ye,[e("div",ke,[e("div",be,V(S.spu.store_name),1),e("div",{class:"delete",onClick:z=>p(S.cart_id)},"删除",8,$e)]),e("div",we,[e("span",{style:{display:"flex","align-items":"center"},onClick:z=>P(S)},[m("商品规格: "+V(S.productAttr.sku||"默认规格"),1),n(d,{size:"16",style:{"margin-left":"0.2rem"}},{default:k(()=>[n(F)]),_:1})],8,xe)]),e("div",Ie,[e("div",null,[m(" ¥"),e("span",null,V(S.productAttr.price),1)]),e("div",null,[n(E,{modelValue:S.cart_num,"onUpdate:modelValue":z=>S.cart_num=z,"step-strictly":"",min:1,step:1,onChange:z=>v(S)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Ce,[e("div",Ve,[e("div",Ae,[e("div",Pe,[m(" 实付: "),e("span",null,[m("¥"),e("span",Se,V(l.value.toFixed(2)),1)])]),e("div",Le,[m(" 优惠: "),e("span",null,[m("¥"),e("span",null,V(o.value.toFixed(2)),1)])])]),e("div",Fe,[n(N,{class:"btn",type:"primary",onClick:C},{default:k(()=>[m("改价")]),_:1})])]),e("div",De,[n(N,{class:"btn",type:"primary",onClick:g,disabled:s.value.length==0},{default:k(()=>[m("立即结账")]),_:1},8,["disabled"])])]),n(ve,{ref_key:"priceRef",ref:r,onSubmit:I},null,512)])}}},ze=U(Re,[["__scopeId","data-v-19078e04"]]),H=w=>(K("data-v-b06e04b9"),w=w(),T(),w),Ue={class:"my-order"},Ee={class:"header-nav"},Ne=H(()=>e("div",{class:"nav-item-label"},"搜索",-1)),qe={class:"nav-item-input"},Oe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500",style:{overflow:"auto"}},Me=["onClick"],Be={class:"shop-name"},je={class:"shop-price"},Ge={key:0,class:"no-stock"},Je=H(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),Ke=[Je],Te={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(w,{expose:x,emit:b}){const s=b,l=u(""),o=()=>{s("loadMore",{bar_code:l.value})},c=$=>{s("changeItem",$)},p=()=>{s("getStoreList",{bar_code:l.value})};return x({bar_code:l}),($,f)=>{const L=_("el-input"),g=_("Search"),v=_("el-icon"),P=_("el-button"),h=_("el-image"),I=_("el-space"),r=j("infinite-scroll");return y(),A("div",Ue,[e("div",Ee,[Ne,e("div",qe,[n(L,{modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=C=>l.value=C),placeholder:"搜索商品名称/ID/唯一码或点击聚焦扫码",clearable:"",onKeyup:te(p,["enter"]),onClear:p},null,8,["modelValue"])]),e("div",{class:"nav-item-btn",onClick:p},[n(P,{class:"btn",type:"primary"},{default:k(()=>[n(v,null,{default:k(()=>[n(g)]),_:1})]),_:1})])]),G((y(),A("div",Oe,[n(I,{wrap:"",size:20},{default:k(()=>[(y(!0),A(O,null,M(w.storeList,(C,a)=>(y(),A("div",{class:"shop-item",key:a,onClick:t=>c(C)},[n(h,{loading:"lazy",src:C.image},null,8,["src"]),e("div",Be,V(C.store_name),1),e("div",je,[m(" ¥"),e("span",null,V(C.price),1)]),C.stock==0?(y(),A("div",Ge,Ke)):J("",!0)],8,Me))),128))]),_:1})])),[[r,o]])])}}},He=U(Te,[["__scopeId","data-v-b06e04b9"]]),Qe=w=>(K("data-v-9ba07525"),w=w(),T(),w),We={class:"shop"},Xe={key:0,class:"shop-info"},Ye={class:"shop-info-left"},Ze={class:"shop-info-right"},et={class:"shop-info-right-top"},tt={class:"shop-info-right-center"},ot={class:"shop-info-right-price"},st={class:"shop-sku"},at=Qe(()=>e("div",{class:"title"},"产品",-1)),lt={class:"sku"},nt=["onClick"],ct={class:"dialog-footer"},it={__name:"pupop",emits:["changeItem"],setup(w,{expose:x,emit:b}){const s=u(!1),l=h=>{s.value=h},o=u({}),c=u(null),p=u(!1),$=u("add"),f=u({}),L=(h,I="add")=>{$.value=I,I=="add"?(o.value=h,c.value=h.attr[0]):(p.value=!0,f.value=h,ne(h.product_id).then(r=>{r.data.attrValue=JSON.parse(JSON.stringify(r.data.attr)),r.data.attr=Object.keys(r.data.sku),o.value=r.data,c.value=r.data.attr[0],p.value=!1}).catch(r=>{p.value=!1}))},g=b,v=()=>{$.value=="add"?g("changeItem",o.value,c.value):g("editItem",f.value.cart_id,{cart_num:f.value.cart_num,product_attr_unique:o.value.sku[c.value].unique}),s.value=!1},P=h=>{c.value=h};return x({show:l,setForm:L}),(h,I)=>{const r=_("el-image"),C=_("el-space"),a=_("el-button"),t=_("el-dialog"),i=j("loading");return y(),q(t,{modelValue:s.value,"onUpdate:modelValue":I[0]||(I[0]=d=>s.value=d),title:"商品规格",width:"650"},oe({default:k(()=>{var d,D,R;return[G((y(),A("div",We,[o.value.sku?(y(),A("div",Xe,[e("div",Ye,[n(r,{loading:"lazy",src:((d=o.value.sku[c.value])==null?void 0:d.image)||o.value.image},null,8,["src"])]),e("div",Ze,[e("div",et,V(o.value.store_name),1),e("div",tt,"库存"+V(((D=o.value.sku[c.value])==null?void 0:D.stock)||0),1),e("div",ot,[m("¥"),e("span",null,V(((R=o.value.sku[c.value])==null?void 0:R.price)||o.value.price),1)])])])):J("",!0),e("div",st,[at,e("div",lt,[n(C,{wrap:"",size:20},{default:k(()=>[(y(!0),A(O,null,M(o.value.attr,(F,E)=>(y(),A("div",{class:se(["sku-item",{"sku-item_active":c.value==F}]),onClick:N=>P(F),key:E},V(F||"默认规格"),11,nt))),128))]),_:1})])])])),[[i,p.value]])]}),_:2},[$.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:k(()=>[e("div",ct,[n(a,{class:"ok-btn",type:"primary",onClick:v},{default:k(()=>[m(" 确定 ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},rt=U(it,[["__scopeId","data-v-9ba07525"]]),ut={class:"my-card"},mt={__name:"index",setup(w){const x=u(null),b=u(null),s=u(null),l=u(null),o=u([]),c=ae(),p=u({page:0,limit:30}),$=t=>{p.value={source:300,...p.value,...t},t.bar_code&&g(t.bar_code)&&(o.value=[],p.value.page=1),ce(c.userInfo.service.mer_id,p.value).then(i=>{var D,R;((R=(D=i.data)==null?void 0:D.list)==null?void 0:R.length)(F.attr=Object.keys(F.sku),F));o.value=o.value.concat(d),t.bar_code&&o.value.length==1&&g(t.bar_code)&&(s.value.bar_code="",v(o.value[0],o.value[0].attr[0]))})},f=u(!1),L=t=>{f.value||(p.value.page++,$(t))};function g(t){return/^\d+$/.test(t)}const v=(t,i="")=>{let d={is_new:0,product_id:t.product_id,cart_num:1,product_attr_unique:t.sku[i]!==void 0?t.sku[i].unique:"",source:300,product_type:0};Y(d).then(D=>{b.value.getList()})},P=(t,i)=>{if(!t.attr||t.attr.length==0||t.attr.length==1)return v(t,t.attr[0]?t.attr[0]:"");if(i)return v(t,i);x.value.setForm(t,"add"),x.value.show(!0)},h=(t,i)=>{b.value.editItem(t,i)},I=t=>{x.value.setForm(t,"edit"),x.value.show(!0)},r=()=>{let t=b.value.list.map(d=>d.cart_id),i={takes:[],use_coupon:{},use_integral:!1,cart_id:t};b.value.discounts>0&&(i.deduction_price=b.value.discounts.toFixed(2),i.pay_type="micropay"),ee(i).then(d=>{l.value.setForm({data:d.data,cart_id:t})})},C=()=>{r(),l.value.drawer=!0},a=()=>{b.value.getList()};return(t,i)=>(y(),A("div",ut,[n(ze,{ref_key:"orderRef",ref:b,onGoPay:C,onEditPupop:I},null,512),n(le),n(He,{ref_key:"shopRef",ref:s,style:{flex:"1"},storeList:o.value,onGetStoreList:$,onChangeItem:P,onLoadMore:L},null,8,["storeList"]),n(rt,{ref_key:"pupopRef",ref:x,onChangeItem:P,onEditItem:h},null,512),n(Z,{ref_key:"payRef",ref:l,onPaySuccess:a},null,512)]))}};export{mt as default}; +import{c as W,a as X,b as B,d as Y,p as Z,o as ee}from"./pay-BRo_1KzL.js";import{_ as U,r as u,a as _,o as y,c as q,w as k,b as e,d as n,e as m,t as V,f as A,F as O,g as M,h as j,i as te,j as G,k as J,p as K,l as T,m as oe,n as se,u as ae}from"./index-CMeCUgUG.js";import{p as le}from"./padding-DsZ1Gb7U.js";import{g as ne,s as ce}from"./shop-27Bl47qn.js";const ie={class:"price"},re={class:"flex"},ue={style:{margin:"10px","padding-bottom":"40px"}},de={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},_e={class:"dialog-footer"},pe={__name:"price",emits:["submit"],setup(w,{expose:x,emit:b}){const s=u(!1),l=u(0),o=(g,v=0)=>{s.value=g,l.value=v},c=u({nowPrice:"",percentage:""}),p=g=>{c.value.percentage=(g/l.value*100).toFixed(2)},$=g=>{c.value.nowPrice=(l.value*g/100).toFixed(2)},f=b,L=()=>{f("submit",c.value.nowPrice),s.value=!1};return x({show:o}),(g,v)=>{const P=_("el-input"),h=_("el-button"),I=_("el-dialog");return y(),q(I,{modelValue:s.value,"onUpdate:modelValue":v[2]||(v[2]=r=>s.value=r),title:"订单改价",width:"650"},{footer:k(()=>[e("div",_e,[n(h,{class:"ok-btn",type:"primary",onClick:L},{default:k(()=>[m(" 确定 ")]),_:1})])]),default:k(()=>[e("div",ie,[e("div",re,[n(P,{style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:c.value.nowPrice,"onUpdate:modelValue":v[0]||(v[0]=r=>c.value.nowPrice=r),placeholder:"请输入改价后的价格",onInput:p},{suffix:k(()=>[m("元")]),_:1},8,["modelValue"]),n(P,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:c.value.percentage,"onUpdate:modelValue":v[1]||(v[1]=r=>c.value.percentage=r),placeholder:"请输入比例",onInput:$},{suffix:k(()=>[m("%")]),_:1},8,["modelValue"])]),e("div",ue,[m("改价后金额: "),e("span",de,"¥"+V(c.value.nowPrice||l.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},ve=U(pe,[["__scopeId","data-v-518d9bc5"]]),me={class:"my-order"},he={class:"header-nav"},fe={class:"nav-item"},ge={class:"order-list"},ye={class:"order-item-info"},ke={class:"order-item-title"},be={class:"title"},$e=["onClick"],we={class:"order-item-sku"},xe=["onClick"],Ie={class:"order-item-price"},Ce={class:"order-footer"},Ve={class:"order-total"},Ae={class:"price"},Pe={class:"total-item"},Se={style:{"font-size":"1.4rem"}},Le={class:"total-item"},Fe={class:"update-price"},De={class:"order-btn"},Re={__name:"order",emits:["goPay","editAttr"],setup(w,{expose:x,emit:b}){const s=u([]),l=u(0),o=u(0),c=()=>{let a=[];s.value.map(t=>{a.push(t.cart_id)}),a.length!=0&&$(a)},p=a=>{s.value=s.value.filter(t=>t.cart_id!=a),$([a])},$=a=>{W({cart_id:a}).then(t=>{console.log(t),f()})},f=()=>{l.value=0,o.value=0,X({source:300}).then(a=>{var t,i;((i=(t=a.data)==null?void 0:t.list)==null?void 0:i.length)>0?(s.value=a.data.list[0].list,s.value.forEach(d=>{l.value+=d.productAttr.price*d.cart_num})):s.value=[]})};f();const L=b,g=()=>{L("goPay")},v=(a,t)=>{B(a.cart_id,{cart_num:a.cart_num}).then(i=>{l.value=0,s.value.forEach(d=>{l.value+=d.productAttr.price*d.cart_num})})},P=a=>{L("editPupop",a)},h=(a,t)=>{B(a,t).then(i=>{f()})},I=a=>{o.value=l.value-a,l.value=+a};u(0);const r=u(null),C=()=>{r.value.show(!0,l.value)};return x({getList:f,list:s,editItem:h,discounts:o,allPrice:l}),(a,t)=>{const i=_("Delete"),d=_("el-icon"),D=_("el-empty"),R=_("el-image"),F=_("ArrowDown"),E=_("el-input-number"),N=_("el-button");return y(),A("div",me,[e("div",he,[e("div",fe,[m(" 已选购 "),e("span",null,V(s.value.length),1),m(" 件 ")]),e("div",{class:"nav-item-clear",onClick:c},[n(d,null,{default:k(()=>[n(i)]),_:1}),m("清空 ")])]),e("div",ge,[s.value.length==0?(y(),q(D,{key:0,description:"请点击右侧添加商品"})):(y(!0),A(O,{key:1},M(s.value,(S,Q)=>(y(),A("div",{class:"order-item",key:Q},[n(R,{loading:"lazy",class:"order-item-img",src:S.productAttr&&S.productAttr.image||S.product.image},null,8,["src"]),e("div",ye,[e("div",ke,[e("div",be,V(S.spu.store_name),1),e("div",{class:"delete",onClick:z=>p(S.cart_id)},"删除",8,$e)]),e("div",we,[e("span",{style:{display:"flex","align-items":"center"},onClick:z=>P(S)},[m("商品规格: "+V(S.productAttr.sku||"默认规格"),1),n(d,{size:"16",style:{"margin-left":"0.2rem"}},{default:k(()=>[n(F)]),_:1})],8,xe)]),e("div",Ie,[e("div",null,[m(" ¥"),e("span",null,V(S.productAttr.price),1)]),e("div",null,[n(E,{modelValue:S.cart_num,"onUpdate:modelValue":z=>S.cart_num=z,"step-strictly":"",min:1,step:1,onChange:z=>v(S)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",Ce,[e("div",Ve,[e("div",Ae,[e("div",Pe,[m(" 实付: "),e("span",null,[m("¥"),e("span",Se,V(l.value.toFixed(2)),1)])]),e("div",Le,[m(" 优惠: "),e("span",null,[m("¥"),e("span",null,V(o.value.toFixed(2)),1)])])]),e("div",Fe,[n(N,{class:"btn",type:"primary",onClick:C},{default:k(()=>[m("改价")]),_:1})])]),e("div",De,[n(N,{class:"btn",type:"primary",onClick:g,disabled:s.value.length==0},{default:k(()=>[m("立即结账")]),_:1},8,["disabled"])])]),n(ve,{ref_key:"priceRef",ref:r,onSubmit:I},null,512)])}}},ze=U(Re,[["__scopeId","data-v-19078e04"]]),H=w=>(K("data-v-b06e04b9"),w=w(),T(),w),Ue={class:"my-order"},Ee={class:"header-nav"},Ne=H(()=>e("div",{class:"nav-item-label"},"搜索",-1)),qe={class:"nav-item-input"},Oe={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500",style:{overflow:"auto"}},Me=["onClick"],Be={class:"shop-name"},je={class:"shop-price"},Ge={key:0,class:"no-stock"},Je=H(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),Ke=[Je],Te={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(w,{expose:x,emit:b}){const s=b,l=u(""),o=()=>{s("loadMore",{bar_code:l.value})},c=$=>{s("changeItem",$)},p=()=>{s("getStoreList",{bar_code:l.value})};return x({bar_code:l}),($,f)=>{const L=_("el-input"),g=_("Search"),v=_("el-icon"),P=_("el-button"),h=_("el-image"),I=_("el-space"),r=j("infinite-scroll");return y(),A("div",Ue,[e("div",Ee,[Ne,e("div",qe,[n(L,{modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=C=>l.value=C),placeholder:"搜索商品名称/ID/唯一码或点击聚焦扫码",clearable:"",onKeyup:te(p,["enter"]),onClear:p},null,8,["modelValue"])]),e("div",{class:"nav-item-btn",onClick:p},[n(P,{class:"btn",type:"primary"},{default:k(()=>[n(v,null,{default:k(()=>[n(g)]),_:1})]),_:1})])]),G((y(),A("div",Oe,[n(I,{wrap:"",size:20},{default:k(()=>[(y(!0),A(O,null,M(w.storeList,(C,a)=>(y(),A("div",{class:"shop-item",key:a,onClick:t=>c(C)},[n(h,{loading:"lazy",src:C.image},null,8,["src"]),e("div",Be,V(C.store_name),1),e("div",je,[m(" ¥"),e("span",null,V(C.price),1)]),C.stock==0?(y(),A("div",Ge,Ke)):J("",!0)],8,Me))),128))]),_:1})])),[[r,o]])])}}},He=U(Te,[["__scopeId","data-v-b06e04b9"]]),Qe=w=>(K("data-v-9ba07525"),w=w(),T(),w),We={class:"shop"},Xe={key:0,class:"shop-info"},Ye={class:"shop-info-left"},Ze={class:"shop-info-right"},et={class:"shop-info-right-top"},tt={class:"shop-info-right-center"},ot={class:"shop-info-right-price"},st={class:"shop-sku"},at=Qe(()=>e("div",{class:"title"},"产品",-1)),lt={class:"sku"},nt=["onClick"],ct={class:"dialog-footer"},it={__name:"pupop",emits:["changeItem"],setup(w,{expose:x,emit:b}){const s=u(!1),l=h=>{s.value=h},o=u({}),c=u(null),p=u(!1),$=u("add"),f=u({}),L=(h,I="add")=>{$.value=I,I=="add"?(o.value=h,c.value=h.attr[0]):(p.value=!0,f.value=h,ne(h.product_id).then(r=>{r.data.attrValue=JSON.parse(JSON.stringify(r.data.attr)),r.data.attr=Object.keys(r.data.sku),o.value=r.data,c.value=r.data.attr[0],p.value=!1}).catch(r=>{p.value=!1}))},g=b,v=()=>{$.value=="add"?g("changeItem",o.value,c.value):g("editItem",f.value.cart_id,{cart_num:f.value.cart_num,product_attr_unique:o.value.sku[c.value].unique}),s.value=!1},P=h=>{c.value=h};return x({show:l,setForm:L}),(h,I)=>{const r=_("el-image"),C=_("el-space"),a=_("el-button"),t=_("el-dialog"),i=j("loading");return y(),q(t,{modelValue:s.value,"onUpdate:modelValue":I[0]||(I[0]=d=>s.value=d),title:"商品规格",width:"650"},oe({default:k(()=>{var d,D,R;return[G((y(),A("div",We,[o.value.sku?(y(),A("div",Xe,[e("div",Ye,[n(r,{loading:"lazy",src:((d=o.value.sku[c.value])==null?void 0:d.image)||o.value.image},null,8,["src"])]),e("div",Ze,[e("div",et,V(o.value.store_name),1),e("div",tt,"库存"+V(((D=o.value.sku[c.value])==null?void 0:D.stock)||0),1),e("div",ot,[m("¥"),e("span",null,V(((R=o.value.sku[c.value])==null?void 0:R.price)||o.value.price),1)])])])):J("",!0),e("div",st,[at,e("div",lt,[n(C,{wrap:"",size:20},{default:k(()=>[(y(!0),A(O,null,M(o.value.attr,(F,E)=>(y(),A("div",{class:se(["sku-item",{"sku-item_active":c.value==F}]),onClick:N=>P(F),key:E},V(F||"默认规格"),11,nt))),128))]),_:1})])])])),[[i,p.value]])]}),_:2},[$.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:k(()=>[e("div",ct,[n(a,{class:"ok-btn",type:"primary",onClick:v},{default:k(()=>[m(" 确定 ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},rt=U(it,[["__scopeId","data-v-9ba07525"]]),ut={class:"my-card"},mt={__name:"index",setup(w){const x=u(null),b=u(null),s=u(null),l=u(null),o=u([]),c=ae(),p=u({page:0,limit:30}),$=t=>{p.value={source:300,...p.value,...t},t.bar_code&&g(t.bar_code)&&(o.value=[],p.value.page=1),ce(c.userInfo.service.mer_id,p.value).then(i=>{var D,R;((R=(D=i.data)==null?void 0:D.list)==null?void 0:R.length)(F.attr=Object.keys(F.sku),F));o.value=o.value.concat(d),t.bar_code&&o.value.length==1&&g(t.bar_code)&&(s.value.bar_code="",v(o.value[0],o.value[0].attr[0]))})},f=u(!1),L=t=>{f.value||(p.value.page++,$(t))};function g(t){return/^\d+$/.test(t)}const v=(t,i="")=>{let d={is_new:0,product_id:t.product_id,cart_num:1,product_attr_unique:t.sku[i]!==void 0?t.sku[i].unique:"",source:300,product_type:0};Y(d).then(D=>{b.value.getList()})},P=(t,i)=>{if(!t.attr||t.attr.length==0||t.attr.length==1)return v(t,t.attr[0]?t.attr[0]:"");if(i)return v(t,i);x.value.setForm(t,"add"),x.value.show(!0)},h=(t,i)=>{b.value.editItem(t,i)},I=t=>{x.value.setForm(t,"edit"),x.value.show(!0)},r=()=>{let t=b.value.list.map(d=>d.cart_id),i={takes:[],use_coupon:{},use_integral:!1,cart_id:t};b.value.discounts>0&&(i.deduction_price=b.value.discounts.toFixed(2),i.pay_type="micropay"),ee(i).then(d=>{l.value.setForm({data:d.data,cart_id:t})})},C=()=>{r(),l.value.drawer=!0},a=()=>{b.value.getList()};return(t,i)=>(y(),A("div",ut,[n(ze,{ref_key:"orderRef",ref:b,onGoPay:C,onEditPupop:I},null,512),n(le),n(He,{ref_key:"shopRef",ref:s,style:{flex:"1"},storeList:o.value,onGetStoreList:$,onChangeItem:P,onLoadMore:L},null,8,["storeList"]),n(rt,{ref_key:"pupopRef",ref:x,onChangeItem:P,onEditItem:h},null,512),n(Z,{ref_key:"payRef",ref:l,onPaySuccess:a},null,512)]))}};export{mt as default}; diff --git a/dist/assets/index-y31P2_LV.js b/dist/assets/index-X-sbpCmf.js similarity index 92% rename from dist/assets/index-y31P2_LV.js rename to dist/assets/index-X-sbpCmf.js index 971df97..edefe78 100644 --- a/dist/assets/index-y31P2_LV.js +++ b/dist/assets/index-X-sbpCmf.js @@ -1 +1 @@ -import{a as t,f as c,b as e,d as o,w as a,o as d,e as l}from"./index-D5pSuA5u.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"}},p=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),h=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 d(),c("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[p,h,o(i,{type:"primary",onClick:s},{default:a(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; +import{a as t,f as c,b as e,d as o,w as a,o as d,e as l}from"./index-CMeCUgUG.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"}},p=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),h=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 d(),c("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[p,h,o(i,{type:"primary",onClick:s},{default:a(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; diff --git a/dist/assets/indexList-Czsm3GIz.js b/dist/assets/indexList-CVvMxSCD.js similarity index 96% rename from dist/assets/indexList-Czsm3GIz.js rename to dist/assets/indexList-CVvMxSCD.js index e8f82be..6071507 100644 --- a/dist/assets/indexList-Czsm3GIz.js +++ b/dist/assets/indexList-CVvMxSCD.js @@ -1 +1 @@ -import{e as F,a as G,p as J,g as K,f as Q}from"./pay-5Jv4r2r0.js";import{_ as W,u as X,r as s,q as Y,a as d,h as Z,j as ee,f as m,d as t,w as o,o as c,e as r,t as te,b as I,c as V,E as h,p as ae,l as oe}from"./index-D5pSuA5u.js";const le=v=>(ae("data-v-f71c3ce9"),v=v(),oe(),v),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ce=le(()=>I("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ue={class:"dialog-footer"},pe={__name:"indexList",setup(v){const P=X(),k=s([]),C=Y(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),b=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(P.userInfo.service.mer_id,n.value).then(e=>{k.value=e.data.list,b.value=e.data.count,y.value=!1})};i();const w=s(0);(()=>{G({source:300}).then(e=>{var a;w.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=>{K({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=>{})},x=s(""),U=()=>{_.value=!1,Q({order_sn:x.value}).then(e=>{h({message:e.message,type:"success"}),C.push({name:"home"})})},_=s(!1),z=e=>{x.value=e,_.value=!0},O=()=>{C.push({name:"home"})};return(e,a)=>{const L=d("el-radio-button"),T=d("el-radio-group"),u=d("el-table-column"),p=d("el-button"),j=d("el-table"),q=d("el-pagination"),H=d("el-dialog"),M=Z("loading");return ee((c(),m("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(L,{value:1},{default:o(()=>[r("全部")]),_:1}),t(L,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:k.value,style:{width:"100%"}},{default:o(()=>[t(u,{prop:"group_order_id",label:"ID",width:"100"}),t(u,{prop:"order_sn",label:"订单号",width:"260"}),t(u,{prop:"total_price",label:"订单金额"}),t(u,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(c(),m("span",ne,"已支付")):(c(),m("span",re,"未支付"))]),_:1}),t(u,{prop:"create_time",label:"订单创建时间"}),t(u,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(c(),m("span",ie,te(l.row.pay_time),1)):(c(),m("div",de,[t(p,{type:"primary",link:"",onClick:S=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:S=>E(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:S=>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:b.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(J,{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(()=>[I("div",ue,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),w.value>0?(c(),V(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(c(),V(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ce]),_:1},8,["modelValue"])])),[[M,y.value]])}}},ge=W(pe,[["__scopeId","data-v-f71c3ce9"]]);export{ge as default}; +import{e as F,a as G,p as J,g as K,f as Q}from"./pay-BRo_1KzL.js";import{_ as W,u as X,r as s,q as Y,a as d,h as Z,j as ee,f as m,d as t,w as o,o as c,e as r,t as te,b as I,c as V,E as h,p as ae,l as oe}from"./index-CMeCUgUG.js";const le=v=>(ae("data-v-f71c3ce9"),v=v(),oe(),v),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ce=le(()=>I("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ue={class:"dialog-footer"},pe={__name:"indexList",setup(v){const P=X(),k=s([]),C=Y(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),b=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(P.userInfo.service.mer_id,n.value).then(e=>{k.value=e.data.list,b.value=e.data.count,y.value=!1})};i();const w=s(0);(()=>{G({source:300}).then(e=>{var a;w.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=>{K({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=>{})},x=s(""),U=()=>{_.value=!1,Q({order_sn:x.value}).then(e=>{h({message:e.message,type:"success"}),C.push({name:"home"})})},_=s(!1),z=e=>{x.value=e,_.value=!0},O=()=>{C.push({name:"home"})};return(e,a)=>{const L=d("el-radio-button"),T=d("el-radio-group"),u=d("el-table-column"),p=d("el-button"),j=d("el-table"),q=d("el-pagination"),H=d("el-dialog"),M=Z("loading");return ee((c(),m("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(L,{value:1},{default:o(()=>[r("全部")]),_:1}),t(L,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:k.value,style:{width:"100%"}},{default:o(()=>[t(u,{prop:"group_order_id",label:"ID",width:"100"}),t(u,{prop:"order_sn",label:"订单号",width:"260"}),t(u,{prop:"total_price",label:"订单金额"}),t(u,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(c(),m("span",ne,"已支付")):(c(),m("span",re,"未支付"))]),_:1}),t(u,{prop:"create_time",label:"订单创建时间"}),t(u,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(c(),m("span",ie,te(l.row.pay_time),1)):(c(),m("div",de,[t(p,{type:"primary",link:"",onClick:S=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:S=>E(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:S=>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:b.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(J,{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(()=>[I("div",ue,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),w.value>0?(c(),V(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(c(),V(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ce]),_:1},8,["modelValue"])])),[[M,y.value]])}}},ge=W(pe,[["__scopeId","data-v-f71c3ce9"]]);export{ge as default}; diff --git a/dist/assets/padding-UtAMRAsR.js b/dist/assets/padding-DsZ1Gb7U.js similarity index 65% rename from dist/assets/padding-UtAMRAsR.js rename to dist/assets/padding-DsZ1Gb7U.js index 25b2ce5..42817d2 100644 --- a/dist/assets/padding-UtAMRAsR.js +++ b/dist/assets/padding-DsZ1Gb7U.js @@ -1 +1 @@ -import{_ as e,o as t,f as c}from"./index-D5pSuA5u.js";const o={},n={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",n)}const i=e(o,[["render",s]]);export{i as p}; +import{_ as e,o as t,f as c}from"./index-CMeCUgUG.js";const o={},n={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",n)}const i=e(o,[["render",s]]);export{i as p}; diff --git a/dist/assets/pay-5Jv4r2r0.js b/dist/assets/pay-BRo_1KzL.js similarity index 98% rename from dist/assets/pay-5Jv4r2r0.js rename to dist/assets/pay-BRo_1KzL.js index 84d8fa6..0c17444 100644 --- a/dist/assets/pay-5Jv4r2r0.js +++ b/dist/assets/pay-BRo_1KzL.js @@ -1 +1 @@ -import{s as v,_ as le,r as l,v as ne,a as E,h as ce,o as f,c as K,w as m,b as o,n as M,e as L,t as B,j as re,f as b,d as w,i as ue,F as de,g as ie,x as $,E as C,p as ve,l as pe}from"./index-D5pSuA5u.js";function qe(s){return v.post("user/cart/create",s)}function Oe(s){return v.get("user/cart/lst",{params:s})}function Re(s,p){return v.post(`user/cart/change/${s}`,p)}function Ue(s){return v.post("v2/order/check",s)}function Ke(s){return v.post("user/cart/delete",s)}function G(s){return v.post("v2/order/create",s)}function _e(s,p){return v.post(`order/pay/${s}`,p)}function fe(s){return v.get("micropay_query",{params:s})}function Me(s,p){return v.get(`admin/${s}/order_list`,{params:p})}function Ge(s){return v.get("order_lading",{params:s})}const P=s=>{let p=new window.SpeechSynthesisUtterance(s);window.speechSynthesis.speak(p)},q=s=>(ve("data-v-517a591d"),s=s(),pe(),s),me=q(()=>o("h4",null,"选择支付方式",-1)),ye={class:"dra-body"},ge={class:"header"},he=q(()=>o("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),ke={style:{color:"#f5222d","padding-bottom":"2rem"}},be={style:{"font-size":"1.6rem"}},we={key:0,"element-loading-text":"支付中",class:"card1"},Ce=q(()=>o("div",{class:"tips"},null,-1)),xe={key:1,class:"card2"},Se={class:"drawer-body"},Ae={class:"counter"},Le={class:"received"},Ve={key:0},De={key:1,style:{"font-size":"1rem",color:"#999"}},Ee={key:0,class:"balance"},$e={class:"money"},je={key:1,class:"balance"},Be={class:"keypad"},Pe={class:"left"},Te={class:"right"},ze={style:{width:"100%",display:"flex","justify-content":"center"}},Fe={__name:"pay",emits:["paySuccess"],setup(s,{expose:p,emit:H}){const h=l(!1),k=l(1),_=l(""),y=l(""),J=()=>{A()},Q=()=>{$(()=>{setTimeout(()=>{var e;c.value=!1,_.value="",F.value=!0,(e=y.value)==null||e.focus(),T(k.value)},300)})},T=e=>{k.value=e,k.value==2?document.addEventListener("keydown",N):document.removeEventListener("keydown",N)},x=l({}),z=l([]),W=e=>{x.value=e.data,z.value=e.cart_id},X=e=>{x.value.order_price=e.price,u.value=e.order_id},Y=H,F=l(!1),Z=l(["1","2","3","4","5","6","7","8","9","0","00","."]);let S=0;const u=l(""),ee=()=>{c.value=!0,y.value.blur(),u.value?O(u.value):G({address_id:"",key:x.value.key,cart_id:z.value,pay_type:"micropay",auth_code:_.value,source:300}).then(e=>{if(e.status==200&&e.message=="支付成功")h.value=!1,C({message:e.message,type:"success"}),P(e.data.message),A();else if(e.data.group_order_sn)u.value=e.data.group_order_id,V.value=0,S=0,j(e.data.group_order_sn);else return u.value=e.data.result.order_id,c.value=!1,C({message:e.message,type:"error"})}).catch(e=>{c.value=!1,$(()=>{var a;(a=y.value)==null||a.focus()})})},O=e=>{let a;k.value==1?a={type:"micropay",auth_code:_.value}:a={type:"cash_payment"},_e(e,a).then(t=>{t.status==200&&t.message=="支付成功"?(h.value=!1,C({message:t.message,type:"success"}),P(t.data.message),A()):(u.value=t.data.group_order_id,V.value=0,S=0,j(t.data.group_order_sn))}).catch(t=>{_.value="",c.value=!1,$(()=>{var g;(g=y.value)==null||g.focus()})})},V=l(0),j=e=>{e&&(V.value++,S+=5e3,fe({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(C({message:a.message,type:"success"}),P(a.data.message),A()):(C({message:a.message,type:"error"}),_.value="",c.value=!1,$(()=>{var t;(t=y.value)==null||t.focus()}))}).catch(a=>{F.value&&V.value<3?setTimeout(()=>{j(e)},15e3-S>0?15e3-S:0):(_.value="",c.value=!1,$(()=>{var t;(t=y.value)==null||t.focus()}))}))},A=()=>{var e;F.value=!1,c.value=!1,_.value="",r.value="",d.value=[],(e=y.value)==null||e.blur(),document.removeEventListener("keydown",N),Y("paySuccess"),h.value=!1},c=l(!1);p({drawer:h,setForm:W,setRePay:X});const d=l([]),r=l(""),D=ne(()=>+r.value>0?(r.value-x.value.order_price).toFixed(2):-1),R=l(!1),I=e=>{e===-1?d.value=[]:d.value.pop(),r.value=d.value.length?d.value.join(""):0},n=e=>{R.value===!1&&(r.value="",R.value=!0);let a=String(r.value).indexOf(".")+1,t=String(r.value).length-a;console.log(a,t),(a===0||t<2)&&(d.value.join("")<=9999999&&d.value.push(e),r.value=d.value.join("")>99999999?99999999:d.value.join(""))},U=()=>{D.value===""||D.value===null||D.value===void 0||(u.value?O(u.value):G({address_id:"",key:x.value.key,cart_id:z.value,pay_type:"cash_payment",source:300}).then(e=>{if(e.status==200&&e.message=="支付成功")h.value=!1,C({message:e.message,type:"success"}),P(e.data.message),A();else if(e.data.group_order_sn)u.value=e.data.group_order_id,V.value=0,S=0,j(e.data.group_order_sn);else return u.value=e.data.result.order_id,r.value="",d.value=[],c.value=!1,C({message:e.message,type:"error"})}).catch(e=>{c.value=!1}))},N=e=>{let t=(e||window.event).keyCode;switch(e.stopPropagation(),e.preventDefault(),t){case 96:case 48:n(0);break;case 97:case 49:n(1);break;case 98:case 50:n(2);break;case 99:case 51:n(3);break;case 100:case 52:n(4);break;case 101:case 53:n(5);break;case 102:case 54:n(6);break;case 103:case 55:n(7);break;case 104:case 56:n(8);break;case 105:case 57:n(9);break;case 110:n(".");break;case 190:n(".");break;case 8:I();break;case 13:U();break}};return(e,a)=>{const t=E("el-input"),g=E("el-button"),ae=E("Delete"),se=E("el-icon"),te=E("el-drawer"),oe=ce("loading");return f(),K(te,{size:800,modelValue:h.value,"onUpdate:modelValue":a[4]||(a[4]=i=>h.value=i),direction:"rtl",onOpen:Q,"before-close":A},{header:m(()=>[me]),default:m(()=>[o("div",ye,[o("div",ge,[o("div",{class:M(["left",{active:k.value==1}]),onClick:a[0]||(a[0]=i=>T(1))}," 微信 ",2),o("div",{class:M(["right",{active:k.value==2}]),onClick:a[1]||(a[1]=i=>T(2))}," 现金收款 ",2)]),he,o("div",ke,[L(" ¥"),o("span",be,B(x.value.order_price),1)]),k.value==1?re((f(),b("div",we,[w(t,{ref_key:"codeRef",ref:y,modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=i=>_.value=i),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ue(ee,["enter"])},null,8,["modelValue"]),Ce])),[[oe,c.value]]):(f(),b("div",xe,[o("div",Se,[o("div",Ae,[o("div",Le,[r.value?(f(),b("span",Ve,B(r.value),1)):(f(),b("span",De,"按下键盘输入客户支付金额"))]),D.value>=0?(f(),b("div",Ee,[L(" 需找零(元):"),o("span",$e,"¥"+B(D.value),1)])):(f(),b("div",je,"不够找零, 请支付更多金额")),o("div",Be,[o("div",Pe,[(f(!0),b(de,null,ie(Z.value,i=>(f(),K(g,{key:i,onClick:Ie=>n(i)},{default:m(()=>[L(B(i),1)]),_:2},1032,["onClick"]))),128))]),o("div",Te,[w(g,{onClick:I},{default:m(()=>[w(se,null,{default:m(()=>[w(ae)]),_:1})]),_:1}),w(g,{onClick:a[3]||(a[3]=i=>I(-1))},{default:m(()=>[L("C")]),_:1}),w(g,{class:"enter",onClick:U},{default:m(()=>[L("确认")]),_:1})])])])])]))])]),footer:m(()=>[o("div",ze,[w(g,{class:"cancel-btn",onClick:J},{default:m(()=>[L("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},He=le(Fe,[["__scopeId","data-v-517a591d"]]);export{Oe as a,Re as b,Ke as c,qe as d,Me as e,Ge as f,fe as g,Ue as o,He as p}; +import{s as v,_ as le,r as l,v as ne,a as E,h as ce,o as f,c as K,w as m,b as o,n as M,e as L,t as B,j as re,f as b,d as w,i as ue,F as de,g as ie,x as $,E as C,p as ve,l as pe}from"./index-CMeCUgUG.js";function qe(s){return v.post("user/cart/create",s)}function Oe(s){return v.get("user/cart/lst",{params:s})}function Re(s,p){return v.post(`user/cart/change/${s}`,p)}function Ue(s){return v.post("v2/order/check",s)}function Ke(s){return v.post("user/cart/delete",s)}function G(s){return v.post("v2/order/create",s)}function _e(s,p){return v.post(`order/pay/${s}`,p)}function fe(s){return v.get("micropay_query",{params:s})}function Me(s,p){return v.get(`admin/${s}/order_list`,{params:p})}function Ge(s){return v.get("order_lading",{params:s})}const P=s=>{let p=new window.SpeechSynthesisUtterance(s);window.speechSynthesis.speak(p)},q=s=>(ve("data-v-517a591d"),s=s(),pe(),s),me=q(()=>o("h4",null,"选择支付方式",-1)),ye={class:"dra-body"},ge={class:"header"},he=q(()=>o("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),ke={style:{color:"#f5222d","padding-bottom":"2rem"}},be={style:{"font-size":"1.6rem"}},we={key:0,"element-loading-text":"支付中",class:"card1"},Ce=q(()=>o("div",{class:"tips"},null,-1)),xe={key:1,class:"card2"},Se={class:"drawer-body"},Ae={class:"counter"},Le={class:"received"},Ve={key:0},De={key:1,style:{"font-size":"1rem",color:"#999"}},Ee={key:0,class:"balance"},$e={class:"money"},je={key:1,class:"balance"},Be={class:"keypad"},Pe={class:"left"},Te={class:"right"},ze={style:{width:"100%",display:"flex","justify-content":"center"}},Fe={__name:"pay",emits:["paySuccess"],setup(s,{expose:p,emit:H}){const h=l(!1),k=l(1),_=l(""),y=l(""),J=()=>{A()},Q=()=>{$(()=>{setTimeout(()=>{var e;c.value=!1,_.value="",F.value=!0,(e=y.value)==null||e.focus(),T(k.value)},300)})},T=e=>{k.value=e,k.value==2?document.addEventListener("keydown",N):document.removeEventListener("keydown",N)},x=l({}),z=l([]),W=e=>{x.value=e.data,z.value=e.cart_id},X=e=>{x.value.order_price=e.price,u.value=e.order_id},Y=H,F=l(!1),Z=l(["1","2","3","4","5","6","7","8","9","0","00","."]);let S=0;const u=l(""),ee=()=>{c.value=!0,y.value.blur(),u.value?O(u.value):G({address_id:"",key:x.value.key,cart_id:z.value,pay_type:"micropay",auth_code:_.value,source:300}).then(e=>{if(e.status==200&&e.message=="支付成功")h.value=!1,C({message:e.message,type:"success"}),P(e.data.message),A();else if(e.data.group_order_sn)u.value=e.data.group_order_id,V.value=0,S=0,j(e.data.group_order_sn);else return u.value=e.data.result.order_id,c.value=!1,C({message:e.message,type:"error"})}).catch(e=>{c.value=!1,$(()=>{var a;(a=y.value)==null||a.focus()})})},O=e=>{let a;k.value==1?a={type:"micropay",auth_code:_.value}:a={type:"cash_payment"},_e(e,a).then(t=>{t.status==200&&t.message=="支付成功"?(h.value=!1,C({message:t.message,type:"success"}),P(t.data.message),A()):(u.value=t.data.group_order_id,V.value=0,S=0,j(t.data.group_order_sn))}).catch(t=>{_.value="",c.value=!1,$(()=>{var g;(g=y.value)==null||g.focus()})})},V=l(0),j=e=>{e&&(V.value++,S+=5e3,fe({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(C({message:a.message,type:"success"}),P(a.data.message),A()):(C({message:a.message,type:"error"}),_.value="",c.value=!1,$(()=>{var t;(t=y.value)==null||t.focus()}))}).catch(a=>{F.value&&V.value<3?setTimeout(()=>{j(e)},15e3-S>0?15e3-S:0):(_.value="",c.value=!1,$(()=>{var t;(t=y.value)==null||t.focus()}))}))},A=()=>{var e;F.value=!1,c.value=!1,_.value="",r.value="",d.value=[],(e=y.value)==null||e.blur(),document.removeEventListener("keydown",N),Y("paySuccess"),h.value=!1},c=l(!1);p({drawer:h,setForm:W,setRePay:X});const d=l([]),r=l(""),D=ne(()=>+r.value>0?(r.value-x.value.order_price).toFixed(2):-1),R=l(!1),I=e=>{e===-1?d.value=[]:d.value.pop(),r.value=d.value.length?d.value.join(""):0},n=e=>{R.value===!1&&(r.value="",R.value=!0);let a=String(r.value).indexOf(".")+1,t=String(r.value).length-a;console.log(a,t),(a===0||t<2)&&(d.value.join("")<=9999999&&d.value.push(e),r.value=d.value.join("")>99999999?99999999:d.value.join(""))},U=()=>{D.value===""||D.value===null||D.value===void 0||(u.value?O(u.value):G({address_id:"",key:x.value.key,cart_id:z.value,pay_type:"cash_payment",source:300}).then(e=>{if(e.status==200&&e.message=="支付成功")h.value=!1,C({message:e.message,type:"success"}),P(e.data.message),A();else if(e.data.group_order_sn)u.value=e.data.group_order_id,V.value=0,S=0,j(e.data.group_order_sn);else return u.value=e.data.result.order_id,r.value="",d.value=[],c.value=!1,C({message:e.message,type:"error"})}).catch(e=>{c.value=!1}))},N=e=>{let t=(e||window.event).keyCode;switch(e.stopPropagation(),e.preventDefault(),t){case 96:case 48:n(0);break;case 97:case 49:n(1);break;case 98:case 50:n(2);break;case 99:case 51:n(3);break;case 100:case 52:n(4);break;case 101:case 53:n(5);break;case 102:case 54:n(6);break;case 103:case 55:n(7);break;case 104:case 56:n(8);break;case 105:case 57:n(9);break;case 110:n(".");break;case 190:n(".");break;case 8:I();break;case 13:U();break}};return(e,a)=>{const t=E("el-input"),g=E("el-button"),ae=E("Delete"),se=E("el-icon"),te=E("el-drawer"),oe=ce("loading");return f(),K(te,{size:800,modelValue:h.value,"onUpdate:modelValue":a[4]||(a[4]=i=>h.value=i),direction:"rtl",onOpen:Q,"before-close":A},{header:m(()=>[me]),default:m(()=>[o("div",ye,[o("div",ge,[o("div",{class:M(["left",{active:k.value==1}]),onClick:a[0]||(a[0]=i=>T(1))}," 微信 ",2),o("div",{class:M(["right",{active:k.value==2}]),onClick:a[1]||(a[1]=i=>T(2))}," 现金收款 ",2)]),he,o("div",ke,[L(" ¥"),o("span",be,B(x.value.order_price),1)]),k.value==1?re((f(),b("div",we,[w(t,{ref_key:"codeRef",ref:y,modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=i=>_.value=i),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ue(ee,["enter"])},null,8,["modelValue"]),Ce])),[[oe,c.value]]):(f(),b("div",xe,[o("div",Se,[o("div",Ae,[o("div",Le,[r.value?(f(),b("span",Ve,B(r.value),1)):(f(),b("span",De,"按下键盘输入客户支付金额"))]),D.value>=0?(f(),b("div",Ee,[L(" 需找零(元):"),o("span",$e,"¥"+B(D.value),1)])):(f(),b("div",je,"不够找零, 请支付更多金额")),o("div",Be,[o("div",Pe,[(f(!0),b(de,null,ie(Z.value,i=>(f(),K(g,{key:i,onClick:Ie=>n(i)},{default:m(()=>[L(B(i),1)]),_:2},1032,["onClick"]))),128))]),o("div",Te,[w(g,{onClick:I},{default:m(()=>[w(se,null,{default:m(()=>[w(ae)]),_:1})]),_:1}),w(g,{onClick:a[3]||(a[3]=i=>I(-1))},{default:m(()=>[L("C")]),_:1}),w(g,{class:"enter",onClick:U},{default:m(()=>[L("确认")]),_:1})])])])])]))])]),footer:m(()=>[o("div",ze,[w(g,{class:"cancel-btn",onClick:J},{default:m(()=>[L("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},He=le(Fe,[["__scopeId","data-v-517a591d"]]);export{Oe as a,Re as b,Ke as c,qe as d,Me as e,Ge as f,fe as g,Ue as o,He as p}; diff --git a/dist/assets/shop-DjLHIKgd.js b/dist/assets/shop-27Bl47qn.js similarity index 75% rename from dist/assets/shop-DjLHIKgd.js rename to dist/assets/shop-27Bl47qn.js index b9cfef1..0ecf8ac 100644 --- a/dist/assets/shop-DjLHIKgd.js +++ b/dist/assets/shop-27Bl47qn.js @@ -1 +1 @@ -import{s as e}from"./index-D5pSuA5u.js";function u(r,t){return e.get(`server/${r}/product/lst`,{params:t})}function a(r,t){return e.get(`store/product/detail/${r}`,{params:t})}function o(r,t){return e.post(`user_free_trial/${r}`,t)}export{a as g,u as s,o as u}; +import{s as e}from"./index-CMeCUgUG.js";function u(r,t){return e.get(`server/${r}/product/lst`,{params:t})}function a(r,t){return e.get(`store/product/detail/${r}`,{params:t})}function o(r,t){return e.post(`user_free_trial/${r}`,t)}export{a as g,u as s,o as u}; diff --git a/dist/index.html b/dist/index.html index b27567e..c715c39 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,7 +5,7 @@ 里海收银系统 - + diff --git a/src/views/order/component/order.vue b/src/views/order/component/order.vue index 4b6f189..b571d97 100644 --- a/src/views/order/component/order.vue +++ b/src/views/order/component/order.vue @@ -55,6 +55,7 @@ const getOrderList = (reload=false) => { total.value = res.data.count; loading.value = false; }).catch(err=>{ + loadEnd.value = true; loading.value = false; }); };