diff --git a/dist/assets/index-KaXkCUcd.js b/dist/assets/index-BfT_t8I5.js similarity index 84% rename from dist/assets/index-KaXkCUcd.js rename to dist/assets/index-BfT_t8I5.js index eec4689..cafcf71 100644 --- a/dist/assets/index-KaXkCUcd.js +++ b/dist/assets/index-BfT_t8I5.js @@ -1 +1 @@ -import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-u0hj8LVS.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; +import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-CxOzLThu.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; diff --git a/dist/assets/index-ueWO1QlS.js b/dist/assets/index-BhKwC6ZQ.js similarity index 95% rename from dist/assets/index-ueWO1QlS.js rename to dist/assets/index-BhKwC6ZQ.js index f2fb2fe..ca33169 100644 --- a/dist/assets/index-ueWO1QlS.js +++ b/dist/assets/index-BhKwC6ZQ.js @@ -1 +1 @@ -import{s as L,u as S}from"./shop-D7k6mBWK.js";import{_ as j,r as i,x as A,b as r,j as F,p as T,c as w,h as $,f as e,w as l,g as m,e as k,d as q,t as M,q as O,E as y}from"./index-u0hj8LVS.js";const P={"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((w(),$("div",P,[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(()=>[k("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?(w(),q(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=>[k("span",null,M(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"])):O("",!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-CSB11RIS.js";import{_ as j,r as i,x as A,b as r,j as F,p as T,c as w,h as $,f as e,w as l,g as m,e as k,d as q,t as M,q as O,E as y}from"./index-CxOzLThu.js";const P={"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((w(),$("div",P,[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(()=>[k("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?(w(),q(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=>[k("span",null,M(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"])):O("",!0)]),_:1},8,["modelValue"])])),[[E,d.value]])}}},R=j(H,[["__scopeId","data-v-33636025"]]);export{R as default}; diff --git a/dist/assets/index-BswPnxBA.js b/dist/assets/index-BswPnxBA.js new file mode 100644 index 0000000..f517719 --- /dev/null +++ b/dist/assets/index-BswPnxBA.js @@ -0,0 +1 @@ +import{c as ae,a as le,b as H,p as ne,d as ce,o as ie}from"./pay-C2kOlX-6.js";import{_ as B,r as c,o as q,m as b,a as M,b as p,c as $,d as G,w as x,e as t,f as n,g,t as A,n as Q,E as re,h as S,F as J,i as K,j as W,k as ue,l as X,p as Y,q as Z,s as ee,u as te,v as de,x as _e,y as pe}from"./index-CxOzLThu.js";import{p as ve}from"./padding-C-nfgXnj.js";import{g as fe,s as me}from"./shop-CSB11RIS.js";const he={class:"price"},ge={class:"flex"},ye={style:{margin:"10px","padding-bottom":"40px"}},ke={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},be={class:"dialog-footer"},$e={__name:"price",emits:["submit"],setup(I,{expose:P,emit:y}){const a=c(!1),r=c(null),o=c(0),d=(u,_=0)=>{i.value.nowPrice="",i.value.percentage="",a.value=u,o.value=_,Q(()=>{setTimeout(()=>{var C;(C=r.value)==null||C.focus()},150)})},i=c({nowPrice:"",percentage:""}),f=u=>{i.value.percentage=(u/o.value*100).toFixed(2)},w=u=>{i.value.nowPrice=(o.value*u/100).toFixed(2)},V=y,F=()=>{if(i.value.nowPrice<=0)return i.value.nowPrice="",i.value.percentage="",re.error("金额不能小于0");V("submit",i.value.nowPrice),a.value=!1};P({show:d,dialogVisible:a});const L=()=>{if(a.value)F();else return};return q(()=>{b.on("enter",L)}),M(()=>{b.off("enter",L)}),(u,_)=>{const C=p("el-input"),D=p("el-button"),l=p("el-dialog");return $(),G(l,{modelValue:a.value,"onUpdate:modelValue":_[2]||(_[2]=v=>a.value=v),title:"订单改价",width:"650"},{footer:x(()=>[t("div",be,[n(D,{class:"ok-btn",type:"primary",onClick:F},{default:x(()=>[g(" 确定 ")]),_:1})])]),default:x(()=>[t("div",he,[t("div",ge,[n(C,{ref_key:"priceRef",ref:r,style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:i.value.nowPrice,"onUpdate:modelValue":_[0]||(_[0]=v=>i.value.nowPrice=v),min:.01,type:"number",placeholder:"请输入改价后的价格",onInput:f},{suffix:x(()=>[g("元")]),_:1},8,["modelValue"]),n(C,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:i.value.percentage,"onUpdate:modelValue":_[1]||(_[1]=v=>i.value.percentage=v),step:.01,type:"number",placeholder:"请输入比例",onInput:w},{suffix:x(()=>[g("%")]),_:1},8,["modelValue"])]),t("div",ye,[g("改价后金额: "),t("span",ke,"¥"+A(i.value.nowPrice||o.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},xe=B($e,[["__scopeId","data-v-1b136a21"]]),we={class:"my-order"},Ve={class:"header-nav"},Ce={class:"nav-item"},Ie={class:"order-list"},Pe={class:"order-item-info"},Ae={class:"order-item-title"},Se={class:"title"},Fe=["onClick"],Le={class:"order-item-sku"},Re=["onClick"],De={class:"order-item-price"},Ee={class:"order-footer"},Ue={class:"order-total"},ze={class:"price"},Oe={class:"total-item"},qe={style:{"font-size":"1.4rem"}},Me={class:"total-item"},Ne={class:"update-price"},Be={class:"order-btn"},je={__name:"order",emits:["goPay","editAttr"],setup(I,{expose:P,emit:y}){const a=c([]),r=c(0),o=c(0),d=c(0),i=()=>{let e=[];a.value.map(s=>{e.push(s.cart_id)}),e.length!=0&&w(e)},f=e=>{a.value=a.value.filter(s=>s.cart_id!=e),w([e])},w=e=>{ae({cart_id:e}).then(s=>{console.log(s),V()})},V=()=>{r.value=0,o.value=0,d.value=0,le({source:300}).then(e=>{var s,m;((m=(s=e.data)==null?void 0:s.list)==null?void 0:m.length)>0?(a.value=e.data.list[0].list,a.value.forEach(h=>{r.value+=h.productAttr.price*h.cart_num}),o.value=r.value):a.value=[]})};V();const F=y,L=()=>{F("goPay")},u=(e,s)=>{H(e.cart_id,{cart_num:e.cart_num}).then(m=>{r.value=0,a.value.forEach(h=>{r.value+=h.productAttr.price*h.cart_num}),o.value=r.value})},_=e=>{F("editPupop",e)},C=(e,s)=>{H(e,s).then(m=>{V()})},D=e=>{d.value=o.value-e,r.value=+e};c(0);const l=c(null),v=()=>{l.value.show(!0,o.value)};P({getList:V,list:a,editItem:C,discounts:d,allPrice:r});const k=()=>{l.value.dialogVisible?l.value.dialogVisible=!1:v()},E=()=>{a.value.length>0&&i()};return q(()=>{b.on("insert",k),b.on("delete",E)}),M(()=>{b.off("insert",k),b.off("delete",E)}),(e,s)=>{const m=p("Delete"),h=p("el-icon"),z=p("el-empty"),U=p("el-image"),O=p("ArrowDown"),j=p("el-input-number"),T=p("el-button");return $(),S("div",we,[t("div",Ve,[t("div",Ce,[g(" 已选购 "),t("span",null,A(a.value.length),1),g(" 件 ")]),t("div",{class:"nav-item-clear",onClick:i},[n(h,null,{default:x(()=>[n(m)]),_:1}),g("清空 ")])]),t("div",Ie,[a.value.length==0?($(),G(z,{key:0,description:"请点击右侧添加商品"})):($(!0),S(J,{key:1},K(a.value,(R,se)=>($(),S("div",{class:"order-item",key:se},[n(U,{loading:"lazy",class:"order-item-img",src:R.productAttr&&R.productAttr.image||R.product.image},null,8,["src"]),t("div",Pe,[t("div",Ae,[t("div",Se,A(R.spu.store_name),1),t("div",{class:"delete",onClick:N=>f(R.cart_id)},"删除",8,Fe)]),t("div",Le,[t("span",{style:{display:"flex","align-items":"center"},onClick:N=>_(R)},[g("商品规格: "+A(R.productAttr.sku||"默认规格"),1),n(h,{size:"16",style:{"margin-left":"0.2rem"}},{default:x(()=>[n(O)]),_:1})],8,Re)]),t("div",De,[t("div",null,[g(" ¥"),t("span",null,A(R.productAttr.price),1)]),t("div",null,[n(j,{modelValue:R.cart_num,"onUpdate:modelValue":N=>R.cart_num=N,"step-strictly":"",min:1,step:1,onChange:N=>u(R)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),t("div",Ee,[t("div",Ue,[t("div",ze,[t("div",Oe,[g(" 实付: "),t("span",null,[g("¥"),t("span",qe,A(r.value.toFixed(2)),1)])]),t("div",Me,[g(" 优惠: "),t("span",null,[g("¥"),t("span",null,A(d.value.toFixed(2)),1)])])]),t("div",Ne,[n(T,{class:"btn",type:"primary",onClick:v},{default:x(()=>[g("改价")]),_:1})])]),t("div",Be,[n(T,{class:"btn",type:"primary",onClick:L,disabled:a.value.length==0},{default:x(()=>[g("立即结账")]),_:1},8,["disabled"])])]),n(xe,{ref_key:"priceRef",ref:l,onSubmit:D},null,512)])}}},Te=B(je,[["__scopeId","data-v-7eb66bb5"]]),oe=I=>(ee("data-v-f72f05b9"),I=I(),te(),I),Ge={class:"my-order"},Je=oe(()=>t("div",{class:"nav-item-label"},"搜索",-1)),Ke={class:"nav-item-input"},He={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500",style:{overflow:"auto"}},Qe=["onClick"],We={class:"shop-name"},Xe={class:"shop-price"},Ye={key:0,class:"no-stock"},Ze=oe(()=>t("div",null,[t("span",null,"暂无"),t("span",null,"库存")],-1)),et=[Ze],tt={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(I,{expose:P,emit:y}){const a=c(null),r=y,o=c(""),d=()=>{r("loadMore",{bar_code:o.value})},i=u=>{r("changeItem",u)},f=()=>{r("getStoreList",{bar_code:o.value})};P({bar_code:o});const w=c(!1),V=()=>{w.value=!0},F=()=>{w.value=!1},L=()=>{var u;(u=a.value)==null||u.focus()};return q(()=>{Q(()=>{var u;(u=a.value)==null||u.focus(),V()}),b.on("shift",L)}),M(()=>{b.off("shift",L)}),(u,_)=>{const C=p("el-input"),D=p("Search"),l=p("el-icon"),v=p("el-button"),k=p("el-image"),E=p("el-space"),e=W("infinite-scroll");return $(),S("div",Ge,[t("div",{class:X(["header-nav",{"input-focus":w.value}])},[Je,t("div",Ke,[n(C,{modelValue:o.value,"onUpdate:modelValue":_[0]||(_[0]=s=>o.value=s),placeholder:"搜索商品名称/ID/唯一码或点击聚焦扫码",clearable:"",ref_key:"codeRef",ref:a,onFocus:V,onBlur:F,onKeyup:ue(f,["enter"]),onClear:f},null,8,["modelValue"])]),t("div",{class:"nav-item-btn",onClick:f},[n(v,{class:"btn",type:"primary"},{default:x(()=>[n(l,null,{default:x(()=>[n(D)]),_:1})]),_:1})])],2),Y(($(),S("div",He,[n(E,{wrap:"",size:20},{default:x(()=>[($(!0),S(J,null,K(I.storeList,(s,m)=>($(),S("div",{class:"shop-item",key:m,onClick:h=>i(s)},[n(k,{loading:"lazy",src:s.image},null,8,["src"]),t("div",We,A(s.store_name),1),t("div",Xe,[g(" ¥"),t("span",null,A(s.price),1)]),s.stock==0?($(),S("div",Ye,et)):Z("",!0)],8,Qe))),128))]),_:1})])),[[e,d]])])}}},ot=B(tt,[["__scopeId","data-v-f72f05b9"]]),st=I=>(ee("data-v-89e86b21"),I=I(),te(),I),at={class:"shop"},lt={key:0,class:"shop-info"},nt={class:"shop-info-left"},ct={class:"shop-info-right"},it={class:"shop-info-right-top"},rt={class:"shop-info-right-center"},ut={class:"shop-info-right-price"},dt={class:"shop-sku"},_t=st(()=>t("div",{class:"title"},"产品",-1)),pt={class:"sku"},vt=["onClick"],ft={class:"dialog-footer"},mt={__name:"pupop",emits:["changeItem"],setup(I,{expose:P,emit:y}){const a=c(!1),r=l=>{a.value=l},o=c({}),d=c(null),i=c(!1),f=c("add"),w=c({}),V=(l,v="add")=>{f.value=v,v=="add"?(o.value=l,d.value=l.attr[0]):(i.value=!0,w.value=l,fe(l.product_id).then(k=>{k.data.attrValue=JSON.parse(JSON.stringify(k.data.attr)),k.data.attr=Object.keys(k.data.sku),o.value=k.data,d.value=k.data.attr[0],i.value=!1}).catch(k=>{i.value=!1}))},F=y,L=()=>{f.value=="add"?F("changeItem",o.value,d.value):F("editItem",w.value.cart_id,{cart_num:w.value.cart_num,product_attr_unique:o.value.sku[d.value].unique}),a.value=!1},u=l=>{d.value=l};P({show:r,setForm:V});const _=()=>{if(!a.value)return;let l=o.value.attr.indexOf(d.value);if(l>0)return u(o.value.attr[l-1])},C=()=>{if(!a.value)return;let l=o.value.attr.indexOf(d.value);if(l{a.value&&L()};return q(()=>{b.on("left",_),b.on("right",C),b.on("enter",D)}),M(()=>{b.off("left",_),b.off("right",C),b.off("enter",D)}),(l,v)=>{const k=p("el-image"),E=p("el-space"),e=p("el-button"),s=p("el-dialog"),m=W("loading");return $(),G(s,{modelValue:a.value,"onUpdate:modelValue":v[0]||(v[0]=h=>a.value=h),title:"商品规格",width:"650"},de({default:x(()=>{var h,z,U;return[Y(($(),S("div",at,[o.value.sku?($(),S("div",lt,[t("div",nt,[n(k,{loading:"lazy",src:((h=o.value.sku[d.value])==null?void 0:h.image)||o.value.image},null,8,["src"])]),t("div",ct,[t("div",it,A(o.value.store_name),1),t("div",rt,"库存"+A(((z=o.value.sku[d.value])==null?void 0:z.stock)||0),1),t("div",ut,[g("¥"),t("span",null,A(((U=o.value.sku[d.value])==null?void 0:U.price)||o.value.price),1)])])])):Z("",!0),t("div",dt,[_t,t("div",pt,[n(E,{wrap:"",size:20},{default:x(()=>[($(!0),S(J,null,K(o.value.attr,(O,j)=>($(),S("div",{class:X(["sku-item",{"sku-item_active":d.value==O}]),onClick:T=>u(O),key:j},A(O||"默认规格"),11,vt))),128))]),_:1})])])])),[[m,i.value]])]}),_:2},[f.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:x(()=>[t("div",ft,[n(e,{class:"ok-btn",type:"primary",onClick:L},{default:x(()=>[g(" 确定 ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},ht=B(mt,[["__scopeId","data-v-89e86b21"]]),gt={class:"my-card"},xt={__name:"index",setup(I){const P=c(null),y=c(null),a=c(null),r=c(null),o=c([]),d=_e(),i=pe(),f=c({page:0,limit:30}),w=e=>{f.value={source:300,...f.value,...e},e.bar_code&&(o.value=[],f.value.page=1),me(d.userInfo.service.mer_id,f.value).then(s=>{var h,z;((z=(h=s.data)==null?void 0:h.list)==null?void 0:z.length)(U.attr=Object.keys(U.sku),U));o.value=o.value.concat(m),e.bar_code&&o.value.length==1&&L(e.bar_code)&&(a.value.bar_code="",_(o.value[0],o.value[0].attr[0]))})},V=c(!1),F=e=>{V.value||(f.value.page++,w(e))};function L(e){return/^\d+$/.test(e)}const u=(e,s="")=>{let m={is_new:0,product_id:e.product_id,cart_num:1,product_attr_unique:e.sku[s]!==void 0?e.sku[s].unique:"",source:300,product_type:0};ce(m).then(h=>{y.value.getList()})},_=(e,s)=>{if(!e.attr||e.attr.length==0||e.attr.length==1)return u(e,e.attr[0]?e.attr[0]:"");if(s)return u(e,s);P.value.setForm(e,"add"),P.value.show(!0)},C=(e,s)=>{y.value.editItem(e,s)},D=e=>{P.value.setForm(e,"edit"),P.value.show(!0)},l=()=>{let e=y.value.list.map(m=>m.cart_id),s={takes:[],use_coupon:{},use_integral:!1,cart_id:e};y.value.discounts>0&&(s.deduction_price=y.value.discounts.toFixed(2),s.pay_type="micropay"),ie(s).then(m=>{r.value.setForm({data:m.data,cart_id:e})})},v=()=>{l(),r.value.drawer=!0},k=()=>{y.value.getList()},E=()=>{console.log("F9"),i.name=="home"&&(!r.value.drawer&&y.value.list.length>0?v():r.value.beforeClose())};return q(()=>{b.on("F9",E)}),M(()=>{b.off("F9",E)}),(e,s)=>($(),S("div",gt,[n(Te,{ref_key:"orderRef",ref:y,onGoPay:v,onEditPupop:D},null,512),n(ve),n(ot,{ref_key:"shopRef",ref:a,style:{flex:"1"},storeList:o.value,onGetStoreList:w,onChangeItem:_,onLoadMore:F},null,8,["storeList"]),n(ht,{ref_key:"pupopRef",ref:P,onChangeItem:_,onEditItem:C},null,512),n(ne,{ref_key:"payRef",ref:r,onPaySuccess:k},null,512)]))}};export{xt as default}; diff --git a/dist/assets/index-Bzat-W9-.js b/dist/assets/index-Bzat-W9-.js deleted file mode 100644 index 0038d7a..0000000 --- a/dist/assets/index-Bzat-W9-.js +++ /dev/null @@ -1 +0,0 @@ -import{c as se,a as ae,b as K,p as le,d as ne,o as ce}from"./pay-D-50vyYW.js";import{_ as j,r as i,o as q,m as C,a as M,b as f,c as b,d as T,w as $,e,f as c,g,t as A,n as H,E as ie,h as S,F as G,i as J,j as Q,k as re,l as W,p as X,q as Y,s as Z,u as ee,v as ue,x as de,y as _e}from"./index-u0hj8LVS.js";import{p as pe}from"./padding-BLY6EjEZ.js";import{g as ve,s as fe}from"./shop-D7k6mBWK.js";const me={class:"price"},he={class:"flex"},ge={style:{margin:"10px","padding-bottom":"40px"}},ye={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},ke={class:"dialog-footer"},be={__name:"price",emits:["submit"],setup(I,{expose:P,emit:y}){const s=i(!1),r=i(null),o=i(0),_=(d,p=0)=>{u.value.nowPrice="",u.value.percentage="",s.value=d,o.value=p,H(()=>{setTimeout(()=>{var V;(V=r.value)==null||V.focus()},150)})},u=i({nowPrice:"",percentage:""}),h=d=>{u.value.percentage=(d/o.value*100).toFixed(2)},x=d=>{u.value.nowPrice=(o.value*d/100).toFixed(2)},w=y,F=()=>{if(u.value.nowPrice<=0)return u.value.nowPrice="",u.value.percentage="",ie.error("金额不能小于0");w("submit",u.value.nowPrice),s.value=!1};P({show:_,dialogVisible:s});const L=()=>{if(s.value)F();else return};return q(()=>{C.on("enter",L)}),M(()=>{C.off("enter",L)}),(d,p)=>{const V=f("el-input"),E=f("el-button"),n=f("el-dialog");return b(),T(n,{modelValue:s.value,"onUpdate:modelValue":p[2]||(p[2]=m=>s.value=m),title:"订单改价",width:"650"},{footer:$(()=>[e("div",ke,[c(E,{class:"ok-btn",type:"primary",onClick:F},{default:$(()=>[g(" 确定 ")]),_:1})])]),default:$(()=>[e("div",me,[e("div",he,[c(V,{ref_key:"priceRef",ref:r,style:{flex:"3",margin:"10px",height:"2.5rem"},modelValue:u.value.nowPrice,"onUpdate:modelValue":p[0]||(p[0]=m=>u.value.nowPrice=m),min:.01,type:"number",placeholder:"请输入改价后的价格",onInput:h},{suffix:$(()=>[g("元")]),_:1},8,["modelValue"]),c(V,{style:{flex:"2",margin:"10px",height:"2.5rem"},modelValue:u.value.percentage,"onUpdate:modelValue":p[1]||(p[1]=m=>u.value.percentage=m),min:.01,type:"number",placeholder:"请输入比例",onInput:x},{suffix:$(()=>[g("%")]),_:1},8,["modelValue"])]),e("div",ge,[g("改价后金额: "),e("span",ye,"¥"+A(u.value.nowPrice||o.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},$e=j(be,[["__scopeId","data-v-fd8ea485"]]),xe={class:"my-order"},we={class:"header-nav"},Ve={class:"nav-item"},Ce={class:"order-list"},Ie={class:"order-item-info"},Pe={class:"order-item-title"},Ae={class:"title"},Se=["onClick"],Fe={class:"order-item-sku"},Le=["onClick"],Re={class:"order-item-price"},De={class:"order-footer"},Ee={class:"order-total"},Ue={class:"price"},ze={class:"total-item"},Oe={style:{"font-size":"1.4rem"}},qe={class:"total-item"},Me={class:"update-price"},Ne={class:"order-btn"},Be={__name:"order",emits:["goPay","editAttr"],setup(I,{expose:P,emit:y}){const s=i([]),r=i(0),o=i(0),_=i(0),u=()=>{let l=[];s.value.map(t=>{l.push(t.cart_id)}),l.length!=0&&x(l)},h=l=>{s.value=s.value.filter(t=>t.cart_id!=l),x([l])},x=l=>{se({cart_id:l}).then(t=>{console.log(t),w()})},w=()=>{r.value=0,o.value=0,_.value=0,ae({source:300}).then(l=>{var t,a;((a=(t=l.data)==null?void 0:t.list)==null?void 0:a.length)>0?(s.value=l.data.list[0].list,s.value.forEach(v=>{r.value+=v.productAttr.price*v.cart_num}),o.value=r.value):s.value=[]})};w();const F=y,L=()=>{F("goPay")},d=(l,t)=>{K(l.cart_id,{cart_num:l.cart_num}).then(a=>{r.value=0,s.value.forEach(v=>{r.value+=v.productAttr.price*v.cart_num}),o.value=r.value})},p=l=>{F("editPupop",l)},V=(l,t)=>{K(l,t).then(a=>{w()})},E=l=>{_.value=o.value-l,r.value=+l};i(0);const n=i(null),m=()=>{n.value.show(!0,o.value)};P({getList:w,list:s,editItem:V,discounts:_,allPrice:r});const k=()=>{n.value.dialogVisible?n.value.dialogVisible=!1:m()};return q(()=>{C.on("insert",k)}),M(()=>{C.off("insert",k)}),(l,t)=>{const a=f("Delete"),v=f("el-icon"),D=f("el-empty"),z=f("el-image"),U=f("ArrowDown"),O=f("el-input-number"),N=f("el-button");return b(),S("div",xe,[e("div",we,[e("div",Ve,[g(" 已选购 "),e("span",null,A(s.value.length),1),g(" 件 ")]),e("div",{class:"nav-item-clear",onClick:u},[c(v,null,{default:$(()=>[c(a)]),_:1}),g("清空 ")])]),e("div",Ce,[s.value.length==0?(b(),T(D,{key:0,description:"请点击右侧添加商品"})):(b(!0),S(G,{key:1},J(s.value,(R,oe)=>(b(),S("div",{class:"order-item",key:oe},[c(z,{loading:"lazy",class:"order-item-img",src:R.productAttr&&R.productAttr.image||R.product.image},null,8,["src"]),e("div",Ie,[e("div",Pe,[e("div",Ae,A(R.spu.store_name),1),e("div",{class:"delete",onClick:B=>h(R.cart_id)},"删除",8,Se)]),e("div",Fe,[e("span",{style:{display:"flex","align-items":"center"},onClick:B=>p(R)},[g("商品规格: "+A(R.productAttr.sku||"默认规格"),1),c(v,{size:"16",style:{"margin-left":"0.2rem"}},{default:$(()=>[c(U)]),_:1})],8,Le)]),e("div",Re,[e("div",null,[g(" ¥"),e("span",null,A(R.productAttr.price),1)]),e("div",null,[c(O,{modelValue:R.cart_num,"onUpdate:modelValue":B=>R.cart_num=B,"step-strictly":"",min:1,step:1,onChange:B=>d(R)},null,8,["modelValue","onUpdate:modelValue","onChange"])])])])]))),128))]),e("div",De,[e("div",Ee,[e("div",Ue,[e("div",ze,[g(" 实付: "),e("span",null,[g("¥"),e("span",Oe,A(r.value.toFixed(2)),1)])]),e("div",qe,[g(" 优惠: "),e("span",null,[g("¥"),e("span",null,A(_.value.toFixed(2)),1)])])]),e("div",Me,[c(N,{class:"btn",type:"primary",onClick:m},{default:$(()=>[g("改价")]),_:1})])]),e("div",Ne,[c(N,{class:"btn",type:"primary",onClick:L,disabled:s.value.length==0},{default:$(()=>[g("立即结账")]),_:1},8,["disabled"])])]),c($e,{ref_key:"priceRef",ref:n,onSubmit:E},null,512)])}}},je=j(Be,[["__scopeId","data-v-f19da261"]]),te=I=>(Z("data-v-f72f05b9"),I=I(),ee(),I),Te={class:"my-order"},Ge=te(()=>e("div",{class:"nav-item-label"},"搜索",-1)),Je={class:"nav-item-input"},Ke={class:"shop-list","infinite-scroll-distance":"100","infinite-scroll-delay":"500",style:{overflow:"auto"}},He=["onClick"],Qe={class:"shop-name"},We={class:"shop-price"},Xe={key:0,class:"no-stock"},Ye=te(()=>e("div",null,[e("span",null,"暂无"),e("span",null,"库存")],-1)),Ze=[Ye],et={__name:"shop",props:{storeList:{type:Array,default:()=>[]}},emits:["getStoreList","changeItem","loadMore"],setup(I,{expose:P,emit:y}){const s=i(null),r=y,o=i(""),_=()=>{r("loadMore",{bar_code:o.value})},u=d=>{r("changeItem",d)},h=()=>{r("getStoreList",{bar_code:o.value})};P({bar_code:o});const x=i(!1),w=()=>{x.value=!0},F=()=>{x.value=!1},L=()=>{var d;(d=s.value)==null||d.focus()};return q(()=>{H(()=>{var d;(d=s.value)==null||d.focus(),w()}),C.on("shift",L)}),M(()=>{C.off("shift",L)}),(d,p)=>{const V=f("el-input"),E=f("Search"),n=f("el-icon"),m=f("el-button"),k=f("el-image"),l=f("el-space"),t=Q("infinite-scroll");return b(),S("div",Te,[e("div",{class:W(["header-nav",{"input-focus":x.value}])},[Ge,e("div",Je,[c(V,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=a=>o.value=a),placeholder:"搜索商品名称/ID/唯一码或点击聚焦扫码",clearable:"",ref_key:"codeRef",ref:s,onFocus:w,onBlur:F,onKeyup:re(h,["enter"]),onClear:h},null,8,["modelValue"])]),e("div",{class:"nav-item-btn",onClick:h},[c(m,{class:"btn",type:"primary"},{default:$(()=>[c(n,null,{default:$(()=>[c(E)]),_:1})]),_:1})])],2),X((b(),S("div",Ke,[c(l,{wrap:"",size:20},{default:$(()=>[(b(!0),S(G,null,J(I.storeList,(a,v)=>(b(),S("div",{class:"shop-item",key:v,onClick:D=>u(a)},[c(k,{loading:"lazy",src:a.image},null,8,["src"]),e("div",Qe,A(a.store_name),1),e("div",We,[g(" ¥"),e("span",null,A(a.price),1)]),a.stock==0?(b(),S("div",Xe,Ze)):Y("",!0)],8,He))),128))]),_:1})])),[[t,_]])])}}},tt=j(et,[["__scopeId","data-v-f72f05b9"]]),ot=I=>(Z("data-v-89e86b21"),I=I(),ee(),I),st={class:"shop"},at={key:0,class:"shop-info"},lt={class:"shop-info-left"},nt={class:"shop-info-right"},ct={class:"shop-info-right-top"},it={class:"shop-info-right-center"},rt={class:"shop-info-right-price"},ut={class:"shop-sku"},dt=ot(()=>e("div",{class:"title"},"产品",-1)),_t={class:"sku"},pt=["onClick"],vt={class:"dialog-footer"},ft={__name:"pupop",emits:["changeItem"],setup(I,{expose:P,emit:y}){const s=i(!1),r=n=>{s.value=n},o=i({}),_=i(null),u=i(!1),h=i("add"),x=i({}),w=(n,m="add")=>{h.value=m,m=="add"?(o.value=n,_.value=n.attr[0]):(u.value=!0,x.value=n,ve(n.product_id).then(k=>{k.data.attrValue=JSON.parse(JSON.stringify(k.data.attr)),k.data.attr=Object.keys(k.data.sku),o.value=k.data,_.value=k.data.attr[0],u.value=!1}).catch(k=>{u.value=!1}))},F=y,L=()=>{h.value=="add"?F("changeItem",o.value,_.value):F("editItem",x.value.cart_id,{cart_num:x.value.cart_num,product_attr_unique:o.value.sku[_.value].unique}),s.value=!1},d=n=>{_.value=n};P({show:r,setForm:w});const p=()=>{if(!s.value)return;let n=o.value.attr.indexOf(_.value);if(n>0)return d(o.value.attr[n-1])},V=()=>{if(!s.value)return;let n=o.value.attr.indexOf(_.value);if(n{s.value&&L()};return q(()=>{C.on("left",p),C.on("right",V),C.on("enter",E)}),M(()=>{C.off("left",p),C.off("right",V),C.off("enter",E)}),(n,m)=>{const k=f("el-image"),l=f("el-space"),t=f("el-button"),a=f("el-dialog"),v=Q("loading");return b(),T(a,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=D=>s.value=D),title:"商品规格",width:"650"},ue({default:$(()=>{var D,z,U;return[X((b(),S("div",st,[o.value.sku?(b(),S("div",at,[e("div",lt,[c(k,{loading:"lazy",src:((D=o.value.sku[_.value])==null?void 0:D.image)||o.value.image},null,8,["src"])]),e("div",nt,[e("div",ct,A(o.value.store_name),1),e("div",it,"库存"+A(((z=o.value.sku[_.value])==null?void 0:z.stock)||0),1),e("div",rt,[g("¥"),e("span",null,A(((U=o.value.sku[_.value])==null?void 0:U.price)||o.value.price),1)])])])):Y("",!0),e("div",ut,[dt,e("div",_t,[c(l,{wrap:"",size:20},{default:$(()=>[(b(!0),S(G,null,J(o.value.attr,(O,N)=>(b(),S("div",{class:W(["sku-item",{"sku-item_active":_.value==O}]),onClick:R=>d(O),key:N},A(O||"默认规格"),11,pt))),128))]),_:1})])])])),[[v,u.value]])]}),_:2},[h.value!="add"&&o.value.attr&&o.value.attr.length==1?void 0:{name:"footer",fn:$(()=>[e("div",vt,[c(t,{class:"ok-btn",type:"primary",onClick:L},{default:$(()=>[g(" 确定 ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},mt=j(ft,[["__scopeId","data-v-89e86b21"]]),ht={class:"my-card"},$t={__name:"index",setup(I){const P=i(null),y=i(null),s=i(null),r=i(null),o=i([]),_=de(),u=_e(),h=i({page:0,limit:30}),x=t=>{h.value={source:300,...h.value,...t},t.bar_code&&(o.value=[],h.value.page=1),fe(_.userInfo.service.mer_id,h.value).then(a=>{var D,z;((z=(D=a.data)==null?void 0:D.list)==null?void 0:z.length)(U.attr=Object.keys(U.sku),U));o.value=o.value.concat(v),t.bar_code&&o.value.length==1&&L(t.bar_code)&&(s.value.bar_code="",p(o.value[0],o.value[0].attr[0]))})},w=i(!1),F=t=>{w.value||(h.value.page++,x(t))};function L(t){return/^\d+$/.test(t)}const d=(t,a="")=>{let v={is_new:0,product_id:t.product_id,cart_num:1,product_attr_unique:t.sku[a]!==void 0?t.sku[a].unique:"",source:300,product_type:0};ne(v).then(D=>{y.value.getList()})},p=(t,a)=>{if(!t.attr||t.attr.length==0||t.attr.length==1)return d(t,t.attr[0]?t.attr[0]:"");if(a)return d(t,a);P.value.setForm(t,"add"),P.value.show(!0)},V=(t,a)=>{y.value.editItem(t,a)},E=t=>{P.value.setForm(t,"edit"),P.value.show(!0)},n=()=>{let t=y.value.list.map(v=>v.cart_id),a={takes:[],use_coupon:{},use_integral:!1,cart_id:t};y.value.discounts>0&&(a.deduction_price=y.value.discounts.toFixed(2),a.pay_type="micropay"),ce(a).then(v=>{r.value.setForm({data:v.data,cart_id:t})})},m=()=>{n(),r.value.drawer=!0},k=()=>{y.value.getList()},l=()=>{console.log("F9"),u.name=="home"&&(!r.value.drawer&&y.value.list.length>0?m():r.value.beforeClose())};return q(()=>{C.on("F9",l)}),M(()=>{C.off("F9",l)}),(t,a)=>(b(),S("div",ht,[c(je,{ref_key:"orderRef",ref:y,onGoPay:m,onEditPupop:E},null,512),c(pe),c(tt,{ref_key:"shopRef",ref:s,style:{flex:"1"},storeList:o.value,onGetStoreList:x,onChangeItem:p,onLoadMore:F},null,8,["storeList"]),c(mt,{ref_key:"pupopRef",ref:P,onChangeItem:p,onEditItem:V},null,512),c(le,{ref_key:"payRef",ref:r,onPaySuccess:k},null,512)]))}};export{$t as default}; diff --git a/dist/assets/index-CIYI9gxB.css b/dist/assets/index-CIYI9gxB.css new file mode 100644 index 0000000..f246482 --- /dev/null +++ b/dist/assets/index-CIYI9gxB.css @@ -0,0 +1 @@ +@charset "UTF-8";.dialog-footer .ok-btn[data-v-1b136a21]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-1b136a21]{border-top:1px solid #eee;padding-top:1rem}.price .flex[data-v-1b136a21]{display:flex}input[data-v-1b136a21]::-webkit-inner-spin-button{-webkit-appearance:none!important}input[data-v-1b136a21]::-webkit-outer-spin-button{-webkit-appearance:none!important}input[type=number][data-v-1b136a21]{-moz-appearance:textfield}.my-order[data-v-7eb66bb5]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-7eb66bb5]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:1px solid #eee}.my-order .header-nav span[data-v-7eb66bb5]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-7eb66bb5]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-7eb66bb5]{height:calc(100vh - 100px - 14rem);overflow-y:auto}.my-order .order-list .order-item[data-v-7eb66bb5]{display:flex;padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .order-item .order-item-img[data-v-7eb66bb5]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-7eb66bb5]{flex:1;box-sizing:border-box;padding-left:12px;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-7eb66bb5]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-7eb66bb5]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-7eb66bb5]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-7eb66bb5]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-7eb66bb5]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px 10px #eee}.my-order .order-footer .order-total[data-v-7eb66bb5]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:1px solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-7eb66bb5]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-7eb66bb5]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-7eb66bb5]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-7eb66bb5]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-7eb66bb5]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-7eb66bb5]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-f72f05b9]{height:100%;box-sizing:border-box;position:relative;overflow:hidden}.my-order .header-nav[data-v-f72f05b9]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:1px solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-f72f05b9]{width:5rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-f72f05b9]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-f72f05b9]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-f72f05b9] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-f72f05b9]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-f72f05b9]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-f72f05b9]{border:1px solid #1890ff}.my-order .shop-list[data-v-f72f05b9]{height:calc(100vh - 100px - 3.1rem);width:auto;overflow-y:auto;box-sizing:border-box;padding-top:20px}.my-order .shop-list .shop-item[data-v-f72f05b9]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-f72f05b9]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-f72f05b9]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-f72f05b9]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-f72f05b9]{font-size:1.2rem;margin-left:3px}.my-order .shop-list .shop-item[data-v-f72f05b9]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-f72f05b9]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-f72f05b9]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-f72f05b9]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-89e86b21]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-89e86b21]{border-top:1px solid #eee;padding-top:1rem}.shop .shop-info[data-v-89e86b21]{display:flex}.shop .shop-info .shop-info-left[data-v-89e86b21]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-89e86b21]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-89e86b21]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-89e86b21]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-89e86b21]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-89e86b21]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-89e86b21]{min-height:20rem}.shop .shop-sku .title[data-v-89e86b21]{font-size:1.1rem;font-weight:700;padding:1rem 0 .5rem}.shop .shop-sku .sku .sku-item[data-v-89e86b21]{cursor:pointer;padding:.5rem 1rem;background-color:#f5f5f5;border-radius:3rem}.shop .shop-sku .sku .sku-item_active[data-v-89e86b21]{background-color:#1890ff;color:#fff}.my-card{display:flex}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:20px 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/index-CaBidI9l.js b/dist/assets/index-CaBidI9l.js new file mode 100644 index 0000000..3fab72f --- /dev/null +++ b/dist/assets/index-CaBidI9l.js @@ -0,0 +1 @@ +import{_ as T,x as j,r as _,b as y,j as N,c as t,h as o,e,f as n,w as u,g as v,k as J,p as q,F as U,i as F,l as A,t as d,d as K,q as l,m as O,s as H,u as M,z as Q,E}from"./index-CxOzLThu.js";import{e as W,p as X,f as Y,g as Z}from"./pay-C2kOlX-6.js";import{p as ee}from"./padding-C-nfgXnj.js";const te=h=>(H("data-v-477f396c"),h=h(),M(),h),se={class:"my-order"},oe={class:"header-nav"},ae=te(()=>e("div",{class:"nav-item"},"订单列表",-1)),ie={class:"nav-item-clear"},le={class:"header-input"},ne={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},ce=["onClick"],de={class:"top"},_e={class:"create-time"},re={class:"shop"},ue={key:0,class:"left"},ve={key:0,class:"shop-name"},pe={class:"right"},fe={class:"money"},me={class:"count"},he={class:"bottom"},ye={class:"pay"},ge={key:0},ke={key:0},$e={key:1},be={key:2},Ce={key:3},Ve={key:4},we={key:5},Se={key:6},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(h){const P=j();_([]);const a=_(1),S=$=>{f.value.page=1,m.value=!1,r.value=!1,k.value=[],C(!0)};_(null);const f=_({page:1,limit:20,search_info:""}),r=_(!1),L=_(0),V=_(0),m=_(!1),k=_([]),C=($=!1)=>{if($)f.value.page=1;else if(m.value||r.value)return;r.value=!0,a.value==1&&(f.value.paid=null),a.value==2&&(f.value.paid=0),W(P.userInfo.service.mer_id,f.value).then(i=>{$?k.value=i.data.list:k.value=[...k.value,...i.data.list],i.data.list.length{m.value=!0,r.value=!1})},R=($,i)=>{V.value=i,O.emit("set-order-detail",$)};return($,i)=>{const c=y("el-radio-button"),x=y("el-radio-group"),w=y("el-button"),z=y("el-input"),b=y("el-image"),B=N("loading"),D=N("infinite-scroll");return t(),o("div",se,[e("div",oe,[ae,e("div",ie,[n(x,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=s=>a.value=s),onChange:S,size:"small"},{default:u(()=>[n(c,{value:1},{default:u(()=>[v("全部")]),_:1}),n(c,{value:2},{default:u(()=>[v("未支付")]),_:1})]),_:1},8,["modelValue"])])]),e("div",le,[n(z,{modelValue:f.value.search_info,"onUpdate:modelValue":i[2]||(i[2]=s=>f.value.search_info=s),placeholder:"请输入订单编号",onKeydown:i[3]||(i[3]=J(s=>C(!0),["enter"])),onClear:i[4]||(i[4]=s=>C(!0)),clearable:""},{append:u(()=>[n(w,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:i[1]||(i[1]=s=>C(!0))},{default:u(()=>[v("搜索")]),_:1})]),_:1},8,["modelValue"])]),q((t(),o("div",ne,[(t(!0),o(U,null,F(k.value,(s,g)=>(t(),o("div",{class:A(["item",{"item-active":V.value==g}]),key:g,onClick:I=>R(s,g)},[e("div",de,[e("div",{class:A(["sn",s.pay_type===11||s.pay_type===12||s.pay_type===13?"cahier":"cahier2"])},"单号: "+d(s.order_sn),3),e("div",_e,d(s.create_time),1)]),e("div",re,[s.orderProduct?(t(),o("div",ue,[(t(!0),o(U,null,F(s.orderProduct.slice(0,5),(I,G)=>(t(),K(b,{key:G,src:I.cart_info.productAttr.image||I.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),s.orderProduct.length==1?(t(),o("div",ve,d(s.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",pe,[e("div",fe,"¥"+d(s.pay_price),1),e("div",me,"共"+d(s.total_num)+"件商品",1)])]),e("div",he,[e("div",ye,[s.paid?(t(),o("div",ge,[v(" 已支付 "),s.pay_type==13?(t(),o("span",ke,"(支付宝收款)")):l("",!0),s.pay_type==12?(t(),o("span",$e,"(现金支付)")):l("",!0),s.pay_type==11?(t(),o("span",be,"(微信收款)")):l("",!0),s.pay_type==0?(t(),o("span",Ce,"(余额支付)")):l("",!0),s.pay_type==1?(t(),o("span",Ve,"(微信支付)")):l("",!0),s.pay_type==9?(t(),o("span",we,"(商户余额支付)")):l("",!0),s.pay_type==10?(t(),o("span",Se,"(对公转账)")):l("",!0)])):(t(),o("div",Pe,"未支付"))]),s.service_info?(t(),o("div",Le,"收银员: "+d(s.service_info.nickname),1)):(t(),o("div",xe,"平台订单"))])],10,ce))),128)),m.value?(t(),o("div",Ie,"没有更多了")):l("",!0),r.value?(t(),o("div",Ae,"加载中...")):l("",!0)])),[[B,r.value],[D,C]])])}}},ze=T(Re,[["__scopeId","data-v-477f396c"]]),p=h=>(H("data-v-f0903720"),h=h(),M(),h),Be={class:"my-order"},De={class:"header-nav"},Ee=["onClick"],Ne={class:"detail"},Ue={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},Ke={style:{color:"#ff4a00"}},Oe={style:{display:"flex","align-items":"center"}},Te={style:{"margin-left":"0.5rem"}},je={key:1,class:"table"},qe=p(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},Me={class:"info-item"},Ge=p(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=p(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=p(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=p(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=p(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},ct=p(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},rt=p(()=>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:6},kt={key:0,class:"table-title"},$t={key:1,class:"table-info",style:{"flex-direction":"column"}},bt={class:"info-item"},Ct=p(()=>e("div",{class:"info-item-title"},"头像:",-1)),Vt={class:"info-item-info"},wt={class:"info-item"},St=p(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Pt={class:"info-item-info"},Lt={class:"info-item"},xt=p(()=>e("div",{class:"info-item-title"},"账号:",-1)),It={class:"info-item-info"},At={key:2,class:"footer"},Rt={class:"info"},zt={class:"ser"},Bt={class:"price"},Dt={key:0,class:"handle"},Et={key:1,class:"handle"},Nt=p(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Ut={class:"dialog-footer"},Ft={__name:"detail",setup(h){j();const P=Q(),a=_({});O.on("set-order-detail",i=>{a.value=i}),_([]);const S=_(null),f=_(!1);_(0);const r=_(0),L=_(["商品信息","订单详情"]),V=_(""),m=_(!1),k=i=>{V.value=i,m.value=!0},C=()=>{m.value=!1,Y({order_sn:V.value}).then(i=>{E({message:i.message,type:"success"}),P.push({name:"home"})})},R=i=>{S.value.setRePay({price:i.pay_price,order_id:i.group_order_id}),S.value.drawer=!0},$=i=>{Z({order_sn:i}).then(c=>{c.data.paid==1||c.message=="支付成功"?E({message:c.message,type:"success"}):E({message:c.message,type:"error"})}).catch(c=>{})};return(i,c)=>{const x=y("el-image"),w=y("el-table-column"),z=y("el-table"),b=y("el-button"),B=y("el-dialog"),D=N("loading");return t(),o("div",Be,[e("div",De,[(t(!0),o(U,null,F(L.value,(s,g)=>(t(),o("div",{key:g,class:A(["nav-item",{"nav-item-active":r.value==g,"nav-item-radius1":r.value==g+1,"nav-item-radius2":r.value==g-1}]),onClick:I=>r.value=g},d(s),11,Ee))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":r.value==L.value.length-1}]),style:{flex:"1"}},null,2)]),q((t(),o("div",Ne,[a.value.orderProduct&&r.value==0?(t(),o("div",Ue,[e("div",Fe,[v(" 共计 "),e("span",Ke,d(a.value.total_num),1),v(" 件商品 ")]),n(z,{style:{height:"calc(100vh - 100px - 14rem)"},data:a.value.orderProduct},{default:u(()=>[n(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:s})=>[e("div",Oe,[n(x,{style:{height:"3rem",width:"3rem"},src:s.cart_info.productAttr.image||s.cart_info.product.image},null,8,["src"]),e("span",Te,d(s.cart_info.product.store_name),1)])]),_:1}),n(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),n(w,{prop:"product_num",label:"数量",width:"150"}),n(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):l("",!0),a.value.orderProduct&&r.value==1?(t(),o("div",je,[qe,e("div",He,[e("div",Me,[Ge,e("div",Je,d(a.value.create_time),1)]),e("div",Qe,[We,e("div",Xe,d(a.value.total_num),1)]),e("div",Ye,[Ze,e("div",et,"¥"+d(a.value.total_price),1)]),e("div",tt,[st,e("div",ot,d(a.value.pay_time),1)]),e("div",at,[it,e("div",lt,"¥"+d(a.value.deduction_price),1)]),e("div",nt,[ct,e("div",dt,"¥"+d(a.value.pay_price),1)]),e("div",_t,[rt,e("div",ut,[a.value.pay_type==11?(t(),o("span",vt,"微信收款")):l("",!0),a.value.pay_type==12?(t(),o("span",pt,"现金支付")):l("",!0),a.value.pay_type==13?(t(),o("span",ft,"支付宝收款")):l("",!0),a.value.pay_type==0?(t(),o("span",mt,"余额支付")):l("",!0),a.value.pay_type==1?(t(),o("span",ht,"微信支付")):l("",!0),a.value.pay_type==9?(t(),o("span",yt,"商户余额支付")):l("",!0),a.value.pay_type==10?(t(),o("span",gt,"对公转账")):l("",!0)])])]),a.value.service_info?(t(),o("div",kt,"收银员信息")):l("",!0),a.value.service_info?(t(),o("div",$t,[e("div",bt,[Ct,e("div",Vt,[n(x,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:a.value.service_info.avatar},null,8,["src"])])]),e("div",wt,[St,e("div",Pt,d(a.value.service_info.nickname),1)]),e("div",Lt,[xt,e("div",It,d(a.value.service_info.account),1)])])):l("",!0)])):l("",!0),a.value.service_info?(t(),o("div",At,[e("div",Rt,[e("div",zt,"收银员: "+d(a.value.service_info.nickname),1),e("div",Bt,[v(" 实付: "),e("span",null,"¥"+d(a.value.pay_price),1)])]),a.value.pay_time?(t(),o("div",Et,"已支付")):(t(),o("div",Dt,[n(b,{class:"btn",type:"primary",onClick:c[0]||(c[0]=s=>R(a.value))},{default:u(()=>[v("重新支付")]),_:1}),n(b,{class:"btn",type:"primary",onClick:c[1]||(c[1]=s=>$(a.value.order_sn))},{default:u(()=>[v("检测状态")]),_:1}),n(b,{class:"btn",type:"success",onClick:c[2]||(c[2]=s=>k(a.value.order_sn))},{default:u(()=>[v("提单")]),_:1})]))])):l("",!0)])),[[D,f.value]]),n(X,{ref_key:"payRef",ref:S},null,512),n(B,{modelValue:m.value,"onUpdate:modelValue":c[4]||(c[4]=s=>m.value=s),title:"提示",width:"500"},{footer:u(()=>[e("div",Ut,[n(b,{onClick:c[3]||(c[3]=s=>m.value=!1)},{default:u(()=>[v("取消")]),_:1}),i.cartCount>0?(t(),K(b,{key:0,onClick:i.goHome},{default:u(()=>[v(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(b,{key:1,type:"primary",onClick:C},{default:u(()=>[v(" 确认提单 ")]),_:1}))])]),default:u(()=>[Nt]),_:1},8,["modelValue"])])}}},Kt=T(Ft,[["__scopeId","data-v-f0903720"]]),Ot={class:"my-card"},Ht={__name:"index",setup(h){return(P,a)=>(t(),o("div",Ot,[n(ze,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),n(ee),n(Kt,{ref:"detailRef"},null,512)]))}};export{Ht as default}; diff --git a/dist/assets/index-u0hj8LVS.js b/dist/assets/index-CxOzLThu.js similarity index 99% rename from dist/assets/index-u0hj8LVS.js rename to dist/assets/index-CxOzLThu.js index 54967a7..3bcb91c 100644 --- a/dist/assets/index-u0hj8LVS.js +++ b/dist/assets/index-CxOzLThu.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-Bzat-W9-.js","./pay-D-50vyYW.js","./pay-C0RInKeg.css","./padding-BLY6EjEZ.js","./shop-D7k6mBWK.js","./index-DXB5Po7d.css","./index-pQtaDbrk.js","./index-vM3ptcSU.css","./indexList-B1jRlWLk.js","./indexList-BWS4uCkU.css","./index-ueWO1QlS.js","./index-Bmp4AY5x.css","./index-DQDmH99S.js","./index-mROn3Wap.css","./index-DVwXlSuN.js","./index-Cq3x8gKD.css"] + __vite__mapDeps.viteFileDeps = ["./index-BswPnxBA.js","./pay-C2kOlX-6.js","./pay-C__No5hD.css","./padding-C-nfgXnj.js","./shop-CSB11RIS.js","./index-CIYI9gxB.css","./index-CaBidI9l.js","./index-DXzcP25f.css","./indexList-BFyrvYgw.js","./indexList-BWS4uCkU.css","./index-BhKwC6ZQ.js","./index-Bmp4AY5x.css","./index-umt6s3SF.js","./index-DWtBHQXf.css","./index-D0aPW6wS.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[c4]=this[c4]={accessors:{}}).accessors,r=this.prototype;function a(l){const s=us(l);o[s]||(cce(r,l),o[s]=!0)}return Ve.isArray(t)?t.forEach(a):a(t),this}}hd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ve.reduceDescriptors(hd.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Ve.freezeMethods(hd);const ar=hd;function pf(e,t){const n=this||iv,o=t||n,r=ar.from(o.headers);let a=o.data;return Ve.forEach(e,function(s){a=s.call(n,a,r.normalize(),t?t.status:void 0)}),r.normalize(),a}function kb(e){return!!(e&&e.__CANCEL__)}function Ti(e,t,n){Rt.call(this,e??"canceled",Rt.ERR_CANCELED,t,n),this.name="CanceledError"}Ve.inherits(Ti,Rt,{__CANCEL__:!0});function dce(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const fce=Ro.hasStandardBrowserEnv?{write(e,t,n,o,r,a){const l=[e+"="+encodeURIComponent(t)];Ve.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),Ve.isString(o)&&l.push("path="+o),Ve.isString(r)&&l.push("domain="+r),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function pce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Eb(e,t){return e&&!pce(t)?vce(e,t):t}const hce=Ro.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(a){let l=a;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(l){const s=Ve.isString(l)?r(l):l;return s.protocol===o.protocol&&s.host===o.host}}():function(){return function(){return!0}}();function mce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gce(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,a=0,l;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),f=o[a];l||(l=c),n[r]=u,o[r]=c;let d=a,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===a&&(a=(a+1)%e),c-l{const a=r.loaded,l=r.lengthComputable?r.total:void 0,s=a-n,u=o(s),c=a<=l;n=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&c?(l-a)/u:void 0,event:r};f[t?"download":"upload"]=!0,e(f)}}const yce=typeof XMLHttpRequest<"u",_ce=yce&&function(e){return new Promise(function(n,o){let r=e.data;const a=ar.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(Ro.hasStandardBrowserEnv||Ro.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((f=a.getContentType())!==!1){const[v,...y]=f?f.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([v||"multipart/form-data",...y].join("; "))}}let d=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(v+":"+y))}const p=Eb(e.baseURL,e.url);d.open(e.method.toUpperCase(),bb(p,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function h(){if(!d)return;const v=ar.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),g={data:!l||l==="text"||l==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:v,config:e,request:d};dce(function(b){n(b),c()},function(b){o(b),c()},g),d=null}if("onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(h)},d.onabort=function(){d&&(o(new Rt("Request aborted",Rt.ECONNABORTED,e,d)),d=null)},d.onerror=function(){o(new Rt("Network Error",Rt.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||wb;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),o(new Rt(y,g.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,e,d)),d=null},Ro.hasStandardBrowserEnv&&(s&&Ve.isFunction(s)&&(s=s(e)),s||s!==!1&&hce(p))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&fce.read(e.xsrfCookieName);v&&a.set(e.xsrfHeaderName,v)}r===void 0&&a.setContentType(null),"setRequestHeader"in d&&Ve.forEach(a.toJSON(),function(y,g){d.setRequestHeader(g,y)}),Ve.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),l&&l!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",d4(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",d4(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=v=>{d&&(o(!v||v.type?new Ti(null,e,d):v),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const m=mce(p);if(m&&Ro.protocols.indexOf(m)===-1){o(new Rt("Unsupported protocol "+m+":",Rt.ERR_BAD_REQUEST,e));return}d.send(r||null)})},W0={http:Wue,xhr:_ce};Ve.forEach(W0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const f4=e=>`- ${e}`,bce=e=>Ve.isFunction(e)||e===null||e===!1,xb={getAdapter:e=>{e=Ve.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let a=0;a`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=t?a.length>1?`since : `+a.map(f4).join(` `):" "+f4(a[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o},adapters:W0};function vf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ti(null,e)}function p4(e){return vf(e),e.headers=ar.from(e.headers),e.data=pf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xb.getAdapter(e.adapter||iv.adapter)(e).then(function(o){return vf(e),o.data=pf.call(e,e.transformResponse,o),o.headers=ar.from(o.headers),o},function(o){return kb(o)||(vf(e),o&&o.response&&(o.response.data=pf.call(e,e.transformResponse,o.response),o.response.headers=ar.from(o.response.headers))),Promise.reject(o)})}const v4=e=>e instanceof ar?{...e}:e;function Dl(e,t){t=t||{};const n={};function o(c,f,d){return Ve.isPlainObject(c)&&Ve.isPlainObject(f)?Ve.merge.call({caseless:d},c,f):Ve.isPlainObject(f)?Ve.merge({},f):Ve.isArray(f)?f.slice():f}function r(c,f,d){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c,d)}else return o(c,f,d)}function a(c,f){if(!Ve.isUndefined(f))return o(void 0,f)}function l(c,f){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c)}else return o(void 0,f)}function s(c,f,d){if(d in t)return o(c,f);if(d in e)return o(void 0,c)}const u={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(c,f)=>r(v4(c),v4(f),!0)};return Ve.forEach(Object.keys(Object.assign({},e,t)),function(f){const d=u[f]||r,p=d(e[f],t[f],f);Ve.isUndefined(p)&&d!==s||(n[f]=p)}),n}const Mb="1.6.8",uv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{uv[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const h4={};uv.transitional=function(t,n,o){function r(a,l){return"[Axios v"+Mb+"] Transitional option '"+a+"'"+l+(o?". "+o:"")}return(a,l,s)=>{if(t===!1)throw new Rt(r(l," has been removed"+(n?" in "+n:"")),Rt.ERR_DEPRECATED);return n&&!h4[l]&&(h4[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,s):!0}};function wce(e,t,n){if(typeof e!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const a=o[r],l=t[a];if(l){const s=e[a],u=s===void 0||l(s,a,e);if(u!==!0)throw new Rt("option "+a+" must be "+u,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+a,Rt.ERR_BAD_OPTION)}}const j0={assertOptions:wce,validators:uv},xr=j0.validators;class gc{constructor(t){this.defaults=t,this.interceptors={request:new u4,response:new u4}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const a=r.stack?r.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=` -`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Dl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&j0.assertOptions(o,{silentJSONParsing:xr.transitional(xr.boolean),forcedJSONParsing:xr.transitional(xr.boolean),clarifyTimeoutError:xr.transitional(xr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:j0.assertOptions(r,{encode:xr.function,serialize:xr.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=ar.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[p4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Ti(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new cv(function(r){t=r}),cancel:t}}}const Cce=cv;function Sce(e){return function(n){return e.apply(null,n)}}function kce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const q0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(q0).forEach(([e,t])=>{q0[t]=e});const Ece=q0;function $b(e){const t=new zu(e),n=ib(zu.prototype.request,t);return Ve.extend(n,zu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return $b(Dl(e,r))},n}const sn=$b(iv);sn.Axios=zu;sn.CanceledError=Ti;sn.CancelToken=Cce;sn.isCancel=kb;sn.VERSION=Mb;sn.toFormData=vd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Sce;sn.isAxiosError=kce;sn.mergeConfig=Dl;sn.AxiosHeaders=ar;sn.formToJSON=e=>Sb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=xb.getAdapter;sn.HttpStatusCode=Ece;sn.default=sn;const Oi=sn.create({baseURL:"https://crmeb-test.shop.lihaink.cn/api",timeout:1e4});Oi.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Oi.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&($s({message:e.data.message,type:"error"}),setTimeout(()=>{const t=rv();t.setUserInfo({}),t.setToken(""),Ob.push("/login")},700)),e.data.status===400)throw $s({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),$s({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Qce(e){return Oi.post("auth/login",e)}function ede(e){return Oi.get("user",e)}function xce(){return Oi.post("logout")}const dv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Mce=e=>(j4("data-v-28f3f43a"),e=e(),q4(),e),$ce={class:"my-card"},Tce={class:"card-header"},Oce=Mce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Ace={class:"card-body"},Nce={class:"el-dropdown-link"},Rce={class:"info"},Ice={style:{"margin-left":"0.3rem"}},Pce={__name:"myHeader",setup(e){const t=rv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=ob(),a=()=>{xce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{$s({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",$ce,[k("div",Tce,[W(u,{style:{height:"3rem",width:"3rem"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"}),Oce]),k("div",Ace,[W(m,{trigger:"hover"},{dropdown:X(()=>[W(h,null,{default:X(()=>[W(p,{onClick:a},{default:X(()=>[gt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",Nce,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Rce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Ice,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:X(()=>[W(f)]),_:1})])]),_:1})])])}}},Lce=dv(Pce,[["__scopeId","data-v-28f3f43a"]]);function Vce(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(r){r(n)}),(o=e.get("*"))&&o.slice().map(function(r){r(t,n)})}}}const qn=Vce(),md=e=>(j4("data-v-72bc38cb"),e=e(),q4(),e),Bce={class:"my-card"},zce=md(()=>k("div",null,"收银",-1)),Hce=md(()=>k("div",null,"订单",-1)),Dce=md(()=>k("div",null,"核销",-1)),Fce=md(()=>k("div",null,"商品",-1)),Kce={__name:"myAside",setup(e){const t=ob(),n=tue(),o=s=>{t.push({name:s})},r=P(["home","order","convert","shop"]),a=()=>{let s=r.value.indexOf(n.name);s>0&&o(r.value[s-1])},l=()=>{let s=r.value.indexOf(n.name);s{qn.on("up",a),qn.on("down",l)}),zo(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Ze("Sell"),f=Ze("el-icon"),d=Ze("DataLine"),p=Ze("FullScreen"),h=Ze("ShoppingBag");return _(),M("div",Bce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:u[0]||(u[0]=m=>o("home"))},[W(f,{size:"30"},{default:X(()=>[W(c)]),_:1}),zce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:u[1]||(u[1]=m=>o("order"))},[W(f,{size:"30"},{default:X(()=>[W(d)]),_:1}),Hce],2),k("div",{class:T(["list-item",{active:i(n).name=="convert"}]),onClick:u[2]||(u[2]=m=>o("convert"))},[W(f,{size:"30"},{default:X(()=>[W(p)]),_:1}),Dce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:u[3]||(u[3]=m=>o("shop"))},[W(f,{size:"30"},{default:X(()=>[W(h)]),_:1}),Fce],2)])}}},Wce=dv(Kce,[["__scopeId","data-v-72bc38cb"]]),jce={class:"common-layout"},qce={__name:"index",setup(e){const t=n=>{console.log("按下",n.keyCode),n.keyCode==16&&qn.emit("shift"),n.keyCode==120&&qn.emit("F9"),n.keyCode==13&&qn.emit("enter"),n.keyCode==37&&qn.emit("left"),n.keyCode==39&&qn.emit("right"),n.keyCode==38&&qn.emit("up"),n.keyCode==40&&qn.emit("down"),n.keyCode==46&&qn.emit("delete"),n.keyCode==45&&qn.emit("insert")};return et(()=>{window.addEventListener("keydown",t),console.log("开启键盘监听")}),zo(()=>{window.removeEventListener("keydown",t),console.log("关闭键盘监听")}),(n,o)=>{const r=Ze("el-header"),a=Ze("el-aside"),l=Ze("router-view"),s=Ze("el-main"),u=Ze("el-container");return _(),M("div",jce,[W(u,null,{default:X(()=>[W(r,null,{default:X(()=>[W(Lce)]),_:1}),W(u,null,{default:X(()=>[W(a,{width:"100px"},{default:X(()=>[W(Wce)]),_:1}),W(s,null,{default:X(()=>[W(l,{class:"my-main"},{default:X(({Component:c})=>[W(tn,{name:"el-zoom-in-top"},{default:X(()=>[(_(),le(it(c)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Uce=dv(qce,[["__scopeId","data-v-64ddf17e"]]),Yce=[{path:"/",name:"layout",component:Uce,redirect:"/home",children:[{path:"/home",name:"home",component:()=>ia(()=>import("./index-Bzat-W9-.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/order",name:"order",component:()=>ia(()=>import("./index-pQtaDbrk.js"),__vite__mapDeps([6,1,2,3,7]),import.meta.url)},{path:"/orderList",name:"orderList",component:()=>ia(()=>import("./indexList-B1jRlWLk.js"),__vite__mapDeps([8,1,2,9]),import.meta.url)},{path:"/shop",name:"shop",component:()=>ia(()=>import("./index-ueWO1QlS.js"),__vite__mapDeps([10,4,11]),import.meta.url)},{path:"/convert",name:"convert",component:()=>ia(()=>import("./index-DQDmH99S.js"),__vite__mapDeps([12,1,2,3,13]),import.meta.url)}]},{path:"/login",name:"login",component:()=>ia(()=>import("./index-DVwXlSuN.js"),__vite__mapDeps([14,15]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>ia(()=>import("./index-KaXkCUcd.js"),__vite__mapDeps([]),import.meta.url)}],Tb=Qie({history:$ie(),routes:Yce});Tb.beforeEach((e,t,n)=>{const o=rv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ob=Tb,Ai=Og(Z5);for(const[e,t]of Object.entries(ML))Ai.component(e,t);const Gce=oue();Ai.use(Ob);Ai.use(Gce);Ai.use(Use,{locale:Yse});Ai.mount("#app");export{Oi as A,bt as B,y2 as C,S as D,$s as E,Ke as F,Qce as G,ede as H,dv as _,zo as a,Ze as b,_ as c,le as d,k as e,W as f,gt as g,M as h,ht as i,Ec as j,Mt as k,T as l,qn as m,We as n,et as o,tt as p,ne as q,P as r,j4 as s,Te as t,q4 as u,lr as v,X as w,rv as x,tue as y,ob as z}; +`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Dl(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&j0.assertOptions(o,{silentJSONParsing:xr.transitional(xr.boolean),forcedJSONParsing:xr.transitional(xr.boolean),clarifyTimeoutError:xr.transitional(xr.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:j0.assertOptions(r,{encode:xr.function,serialize:xr.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=ar.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[p4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Ti(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new cv(function(r){t=r}),cancel:t}}}const Cce=cv;function Sce(e){return function(n){return e.apply(null,n)}}function kce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const q0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(q0).forEach(([e,t])=>{q0[t]=e});const Ece=q0;function $b(e){const t=new zu(e),n=ib(zu.prototype.request,t);return Ve.extend(n,zu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return $b(Dl(e,r))},n}const sn=$b(iv);sn.Axios=zu;sn.CanceledError=Ti;sn.CancelToken=Cce;sn.isCancel=kb;sn.VERSION=Mb;sn.toFormData=vd;sn.AxiosError=Rt;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=Sce;sn.isAxiosError=kce;sn.mergeConfig=Dl;sn.AxiosHeaders=ar;sn.formToJSON=e=>Sb(Ve.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=xb.getAdapter;sn.HttpStatusCode=Ece;sn.default=sn;const Oi=sn.create({baseURL:"https://crmeb-test.shop.lihaink.cn/api",timeout:1e4});Oi.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers["X-Token"]="Bearer "+t),e},e=>(console.error(e),Promise.reject(e)));Oi.interceptors.response.use(e=>{if((e.data.status===401||e.data.status===4e4)&&($s({message:e.data.message,type:"error"}),setTimeout(()=>{const t=rv();t.setUserInfo({}),t.setToken(""),Ob.push("/login")},700)),e.data.status===400)throw $s({message:e.data.message,type:"error"}),new Error(e.data.message);return e.data},e=>{var t,n;return console.error(e),$s({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.message)||e,type:"error"}),Promise.reject(e)});function Qce(e){return Oi.post("auth/login",e)}function ede(e){return Oi.get("user",e)}function xce(){return Oi.post("logout")}const dv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Mce=e=>(j4("data-v-28f3f43a"),e=e(),q4(),e),$ce={class:"my-card"},Tce={class:"card-header"},Oce=Mce(()=>k("div",{class:"card-title"},"里海收银系统",-1)),Ace={class:"card-body"},Nce={class:"el-dropdown-link"},Rce={class:"info"},Ice={style:{"margin-left":"0.3rem"}},Pce={__name:"myHeader",setup(e){const t=rv(),n=P({});n.value=t.userInfo.mer_info;const o=P({});o.value=t.userInfo.service;const r=ob(),a=()=>{xce().then(()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")}).catch(()=>{$s({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",$ce,[k("div",Tce,[W(u,{style:{height:"3rem",width:"3rem"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"}),Oce]),k("div",Ace,[W(m,{trigger:"hover"},{dropdown:X(()=>[W(h,null,{default:X(()=>[W(p,{onClick:a},{default:X(()=>[gt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",Nce,[W(c,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",Rce,[k("div",null,[gt(Te(o.value.nickname)+" ",1),k("span",Ice,"("+Te(n.value.company_name||n.value.mer_name)+")",1)]),k("div",null,Te(i(t).userInfo.account),1)]),W(d,{class:"el-icon--right"},{default:X(()=>[W(f)]),_:1})])]),_:1})])])}}},Lce=dv(Pce,[["__scopeId","data-v-28f3f43a"]]);function Vce(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(r){r(n)}),(o=e.get("*"))&&o.slice().map(function(r){r(t,n)})}}}const qn=Vce(),md=e=>(j4("data-v-72bc38cb"),e=e(),q4(),e),Bce={class:"my-card"},zce=md(()=>k("div",null,"收银",-1)),Hce=md(()=>k("div",null,"订单",-1)),Dce=md(()=>k("div",null,"核销",-1)),Fce=md(()=>k("div",null,"商品",-1)),Kce={__name:"myAside",setup(e){const t=ob(),n=tue(),o=s=>{t.push({name:s})},r=P(["home","order","convert","shop"]),a=()=>{let s=r.value.indexOf(n.name);s>0&&o(r.value[s-1])},l=()=>{let s=r.value.indexOf(n.name);s{qn.on("up",a),qn.on("down",l)}),zo(()=>{qn.off("aup",a),qn.off("adown",l)}),(s,u)=>{const c=Ze("Sell"),f=Ze("el-icon"),d=Ze("DataLine"),p=Ze("FullScreen"),h=Ze("ShoppingBag");return _(),M("div",Bce,[k("div",{class:T(["list-item",{active:i(n).name=="home"}]),onClick:u[0]||(u[0]=m=>o("home"))},[W(f,{size:"30"},{default:X(()=>[W(c)]),_:1}),zce],2),k("div",{class:T(["list-item",{active:i(n).name=="order"}]),onClick:u[1]||(u[1]=m=>o("order"))},[W(f,{size:"30"},{default:X(()=>[W(d)]),_:1}),Hce],2),k("div",{class:T(["list-item",{active:i(n).name=="convert"}]),onClick:u[2]||(u[2]=m=>o("convert"))},[W(f,{size:"30"},{default:X(()=>[W(p)]),_:1}),Dce],2),k("div",{class:T(["list-item",{active:i(n).name=="shop"}]),onClick:u[3]||(u[3]=m=>o("shop"))},[W(f,{size:"30"},{default:X(()=>[W(h)]),_:1}),Fce],2)])}}},Wce=dv(Kce,[["__scopeId","data-v-72bc38cb"]]),jce={class:"common-layout"},qce={__name:"index",setup(e){const t=n=>{console.log("按下",n.keyCode),n.keyCode==16&&qn.emit("shift"),n.keyCode==120&&qn.emit("F9"),n.keyCode==13&&qn.emit("enter"),n.keyCode==37&&qn.emit("left"),n.keyCode==39&&qn.emit("right"),n.keyCode==38&&qn.emit("up"),n.keyCode==40&&qn.emit("down"),n.keyCode==46&&qn.emit("delete"),n.keyCode==45&&qn.emit("insert")};return et(()=>{window.addEventListener("keydown",t),console.log("开启键盘监听")}),zo(()=>{window.removeEventListener("keydown",t),console.log("关闭键盘监听")}),(n,o)=>{const r=Ze("el-header"),a=Ze("el-aside"),l=Ze("router-view"),s=Ze("el-main"),u=Ze("el-container");return _(),M("div",jce,[W(u,null,{default:X(()=>[W(r,null,{default:X(()=>[W(Lce)]),_:1}),W(u,null,{default:X(()=>[W(a,{width:"100px"},{default:X(()=>[W(Wce)]),_:1}),W(s,null,{default:X(()=>[W(l,{class:"my-main"},{default:X(({Component:c})=>[W(tn,{name:"el-zoom-in-top"},{default:X(()=>[(_(),le(it(c)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Uce=dv(qce,[["__scopeId","data-v-64ddf17e"]]),Yce=[{path:"/",name:"layout",component:Uce,redirect:"/home",children:[{path:"/home",name:"home",component:()=>ia(()=>import("./index-BswPnxBA.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)},{path:"/order",name:"order",component:()=>ia(()=>import("./index-CaBidI9l.js"),__vite__mapDeps([6,1,2,3,7]),import.meta.url)},{path:"/orderList",name:"orderList",component:()=>ia(()=>import("./indexList-BFyrvYgw.js"),__vite__mapDeps([8,1,2,9]),import.meta.url)},{path:"/shop",name:"shop",component:()=>ia(()=>import("./index-BhKwC6ZQ.js"),__vite__mapDeps([10,4,11]),import.meta.url)},{path:"/convert",name:"convert",component:()=>ia(()=>import("./index-umt6s3SF.js"),__vite__mapDeps([12,1,2,3,13]),import.meta.url)}]},{path:"/login",name:"login",component:()=>ia(()=>import("./index-D0aPW6wS.js"),__vite__mapDeps([14,15]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>ia(()=>import("./index-BfT_t8I5.js"),__vite__mapDeps([]),import.meta.url)}],Tb=Qie({history:$ie(),routes:Yce});Tb.beforeEach((e,t,n)=>{const o=rv();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ob=Tb,Ai=Og(Z5);for(const[e,t]of Object.entries(ML))Ai.component(e,t);const Gce=oue();Ai.use(Ob);Ai.use(Gce);Ai.use(Use,{locale:Yse});Ai.mount("#app");export{Oi as A,bt as B,y2 as C,S as D,$s as E,Ke as F,Qce as G,ede as H,dv as _,zo as a,Ze as b,_ as c,le as d,k as e,W as f,gt as g,M as h,ht as i,Ec as j,Mt as k,T as l,qn as m,We as n,et as o,tt as p,ne as q,P as r,j4 as s,Te as t,q4 as u,lr as v,X as w,rv as x,tue as y,ob as z}; diff --git a/dist/assets/index-DVwXlSuN.js b/dist/assets/index-D0aPW6wS.js similarity index 96% rename from dist/assets/index-DVwXlSuN.js rename to dist/assets/index-D0aPW6wS.js index 449fbd6..f71ff91 100644 --- a/dist/assets/index-DVwXlSuN.js +++ b/dist/assets/index-D0aPW6wS.js @@ -1 +1 @@ -import{_ as x,x as V,r as y,o as k,b as n,c as U,h as I,e as i,f as e,w as o,g as S,s as b,u as L,z as B,E as u,G as C,H as E}from"./index-u0hj8LVS.js";const N=l=>(b("data-v-00c0f4e8"),l=l(),L(),l),M={class:"body"},T={class:"login"},z=N(()=>i("div",{class:"title"},"里海收银系统 - 登录",-1)),G={__name:"index",setup(l){const d=V(),m=B(),t=y({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(a=>{console.log(a),a.data&&(d.setToken(a.data.token),E().then(({data:s})=>{if(!s.service)return u({message:"请联系管理员开通服务",type:"error"});d.setUserInfo(s),m.push("/")}))}).catch(a=>{})};return k(()=>{}),(a,s)=>{const v=n("User"),_=n("el-icon"),p=n("el-input"),c=n("el-form-item"),h=n("Lock"),w=n("el-button"),g=n("el-form");return U(),I("div",M,[i("div",T,[z,e(g,null,{default:o(()=>[e(c,null,{default:o(()=>[e(p,{modelValue:t.value.account,"onUpdate:modelValue":s[0]||(s[0]=r=>t.value.account=r),placeholder:"请输入账号"},{prefix:o(()=>[e(_,null,{default:o(()=>[e(v)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:o(()=>[e(p,{modelValue:t.value.password,"onUpdate:modelValue":s[1]||(s[1]=r=>t.value.password=r),type:"password",placeholder:"请输入密码","show-password":""},{prefix:o(()=>[e(_,null,{default:o(()=>[e(h)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:o(()=>[e(w,{style:{width:"100%"},type:"primary",onClick:f},{default:o(()=>[S("登录")]),_:1})]),_:1})]),_:1})])])}}},R=x(G,[["__scopeId","data-v-00c0f4e8"]]);export{R as default}; +import{_ as x,x as V,r as y,o as k,b as n,c as U,h as I,e as i,f as e,w as o,g as S,s as b,u as L,z as B,E as u,G as C,H as E}from"./index-CxOzLThu.js";const N=l=>(b("data-v-00c0f4e8"),l=l(),L(),l),M={class:"body"},T={class:"login"},z=N(()=>i("div",{class:"title"},"里海收银系统 - 登录",-1)),G={__name:"index",setup(l){const d=V(),m=B(),t=y({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(a=>{console.log(a),a.data&&(d.setToken(a.data.token),E().then(({data:s})=>{if(!s.service)return u({message:"请联系管理员开通服务",type:"error"});d.setUserInfo(s),m.push("/")}))}).catch(a=>{})};return k(()=>{}),(a,s)=>{const v=n("User"),_=n("el-icon"),p=n("el-input"),c=n("el-form-item"),h=n("Lock"),w=n("el-button"),g=n("el-form");return U(),I("div",M,[i("div",T,[z,e(g,null,{default:o(()=>[e(c,null,{default:o(()=>[e(p,{modelValue:t.value.account,"onUpdate:modelValue":s[0]||(s[0]=r=>t.value.account=r),placeholder:"请输入账号"},{prefix:o(()=>[e(_,null,{default:o(()=>[e(v)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:o(()=>[e(p,{modelValue:t.value.password,"onUpdate:modelValue":s[1]||(s[1]=r=>t.value.password=r),type:"password",placeholder:"请输入密码","show-password":""},{prefix:o(()=>[e(_,null,{default:o(()=>[e(h)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:o(()=>[e(w,{style:{width:"100%"},type:"primary",onClick:f},{default:o(()=>[S("登录")]),_:1})]),_:1})]),_:1})])])}}},R=x(G,[["__scopeId","data-v-00c0f4e8"]]);export{R as default}; diff --git a/dist/assets/index-DQDmH99S.js b/dist/assets/index-DQDmH99S.js deleted file mode 100644 index 66939b9..0000000 --- a/dist/assets/index-DQDmH99S.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as O,x as j,r as a,b as C,j as K,c as t,h as s,e,f as d,w as f,g as y,k as q,p as x,F as N,i as U,l as A,t as l,d as F,q as n,E as M,m as I,s as H,u as G,z as Q,o as W,n as T,B as L,C as X}from"./index-u0hj8LVS.js";import{v as Y,p as Z,f as ee}from"./pay-D-50vyYW.js";import{p as te}from"./padding-BLY6EjEZ.js";const se=h=>(H("data-v-aaca35b5"),h=h(),G(),h),oe={class:"my-order"},ie={class:"header-nav"},ae=se(()=>e("div",{class:"nav-item"},"核销订单",-1)),ne={class:"nav-item-clear"},le={class:"header-input"},ce={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500","infinite-scroll-immediate":"false",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"},he={class:"money"},me={class:"count"},ye={class:"bottom"},ke={class:"pay"},ge={key:0},$e={key:0},be={key:1},Ce={key:2},we={key:3},xe={key:4},Se={key:5},Ve={key:1,style:{color:"#ff4a00"}},Pe={key:0,class:"cashier"},Re={key:1,class:"cashier"},Le={key:0,class:"load-end"},Ie={key:1,class:"load-end"},Ae={__name:"order",setup(h,{expose:k}){const i=j();a([]);const g=a(1);a(null);const r=a({page:1,limit:20,search_info:""}),c=a(!1);a(0);const S=a(0),b=a(!1),p=a([]),V=(u=!1)=>{if(!r.value.search_info)return M.error("请输入订单编号");if(u)r.value.page=1;else if(b.value||c.value)return;c.value=!0,g.value==1&&(r.value.paid=null),g.value==2&&(r.value.paid=0),p.value=[],I.emit("set-order-detail",{}),Y(i.userInfo.service.mer_id,r.value.search_info).then(_=>{p.value=[_.data],I.emit("set-order-detail",p.value[0]),c.value=!1}).catch(_=>{b.value=!0,c.value=!1})},B=(u,_)=>{S.value=_,I.emit("set-order-detail",u)};return k({setCode:u=>{r.value.search_info=u,V(!0)}}),(u,_)=>{const w=C("el-button"),E=C("el-input"),P=C("el-image"),z=K("loading"),D=K("infinite-scroll");return t(),s("div",oe,[e("div",ie,[ae,e("div",ne,[d(w,{type:"primary",size:"small"},{default:f(()=>[y("返回上一页")]),_:1})])]),e("div",le,[d(E,{modelValue:r.value.search_info,"onUpdate:modelValue":_[1]||(_[1]=o=>r.value.search_info=o),placeholder:"请输入订单编号",onKeydown:_[2]||(_[2]=q(o=>V(!0),["enter"])),clearable:""},{append:f(()=>[d(w,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:_[0]||(_[0]=o=>V(!0))},{default:f(()=>[y("搜索")]),_:1})]),_:1},8,["modelValue"])]),x((t(),s("div",ce,[(t(!0),s(N,null,U(p.value,(o,$)=>(t(),s("div",{class:A(["item",{"item-active":S.value==$}]),key:$,onClick:R=>B(o,$)},[e("div",_e,[e("div",{class:A(["sn",o.pay_type===11||o.pay_type===12?"cahier":"cahier2"])},"单号: "+l(o.order_sn),3),e("div",re,l(o.create_time),1)]),e("div",ue,[o.orderProduct?(t(),s("div",ve,[(t(!0),s(N,null,U(o.orderProduct.slice(0,5),(R,J)=>(t(),F(P,{key:J,src:R.cart_info.productAttr.image||R.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),o.orderProduct.length==1?(t(),s("div",pe,l(o.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",fe,[e("div",he,"¥"+l(o.pay_price),1),e("div",me,"共"+l(o.total_num)+"件商品",1)])]),e("div",ye,[e("div",ke,[o.paid?(t(),s("div",ge,[y(" 已支付 "),o.pay_type==12?(t(),s("span",$e,"(现金支付)")):n("",!0),o.pay_type==11?(t(),s("span",be,"(微信支付)")):n("",!0),o.pay_type==0?(t(),s("span",Ce,"(余额支付)")):n("",!0),o.pay_type==1?(t(),s("span",we,"(微信支付)")):n("",!0),o.pay_type==9?(t(),s("span",xe,"(商户余额支付)")):n("",!0),o.pay_type==10?(t(),s("span",Se,"(对公转账)")):n("",!0)])):(t(),s("div",Ve,"未支付"))]),o.service_info?(t(),s("div",Pe,"收银员: "+l(o.service_info.nickname),1)):(t(),s("div",Re,"平台订单"))])],10,de))),128)),b.value?(t(),s("div",Le,"没有更多了")):n("",!0),c.value?(t(),s("div",Ie,"加载中...")):n("",!0)])),[[z,c.value],[D,V]])])}}},Be=O(Ae,[["__scopeId","data-v-aaca35b5"]]),v=h=>(H("data-v-e39dfe99"),h=h(),G(),h),Ee={class:"my-order"},ze={class:"header-nav"},De=["onClick"],Ke={class:"detail"},Ne={key:0,class:"table"},Ue={style:{"font-size":"0.9rem"}},Fe={style:{color:"#ff4a00"}},Me={style:{display:"flex","align-items":"center"}},Te={style:{"margin-left":"0.5rem"}},Oe={key:1,class:"table"},je=v(()=>e("div",{class:"table-title"},"订单信息",-1)),qe={class:"table-info"},He={class:"info-item"},Ge=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=v(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Xe={class:"info-item-info"},Ye={class:"info-item"},Ze=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ot={class:"info-item-info"},it={class:"info-item"},at=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),nt={class:"info-item-info"},lt={class:"info-item"},ct=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},rt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ut={class:"info-item-info"},vt={key:0},pt={key:1},ft={key:2},ht={key:3},mt={key:4},yt={key:5},kt={key:0,class:"table-title"},gt={key:1,class:"table-info",style:{"flex-direction":"column"}},$t={class:"info-item"},bt=v(()=>e("div",{class:"info-item-title"},"头像:",-1)),Ct={class:"info-item-info"},wt={class:"info-item"},xt=v(()=>e("div",{class:"info-item-title"},"昵称:",-1)),St={class:"info-item-info"},Vt={class:"info-item"},Pt=v(()=>e("div",{class:"info-item-title"},"账号:",-1)),Rt={class:"info-item-info"},Lt={class:"footer"},It={class:"info"},At={class:"price"},Bt={key:0,class:"handle"},Et={key:1,class:"handle"},zt=v(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Dt={class:"dialog-footer"},Kt={__name:"detail",setup(h){j();const k=Q(),i=a({});I.on("set-order-detail",m=>{i.value=m}),a([]);const g=a(null),r=a(!1);a(0);const c=a(0),S=a(["商品信息","订单详情"]),b=a(""),p=a(!1),V=()=>{p.value=!1,ee({order_sn:b.value}).then(m=>{M({message:m.message,type:"success"}),k.push({name:"home"})})},B=m=>{g.value.setRePay({price:m.pay_price,order_id:m.group_order_id}),g.value.drawer=!0};return(m,u)=>{const _=C("el-image"),w=C("el-table-column"),E=C("el-table"),P=C("el-button"),z=C("el-dialog"),D=K("loading");return t(),s("div",Ee,[e("div",ze,[(t(!0),s(N,null,U(S.value,(o,$)=>(t(),s("div",{key:$,class:A(["nav-item",{"nav-item-active":c.value==$,"nav-item-radius1":c.value==$+1,"nav-item-radius2":c.value==$-1}]),onClick:R=>c.value=$},l(o),11,De))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":c.value==S.value.length-1}]),style:{flex:"1"}},null,2)]),x((t(),s("div",Ke,[i.value.orderProduct&&c.value==0?(t(),s("div",Ne,[e("div",Ue,[y(" 共计 "),e("span",Fe,l(i.value.total_num),1),y(" 件商品 ")]),d(E,{style:{height:"calc(100vh - 100px - 14rem)"},data:i.value.orderProduct},{default:f(()=>[d(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:f(({row:o})=>[e("div",Me,[d(_,{style:{height:"3rem",width:"3rem"},src:o.cart_info.productAttr.image||o.cart_info.product.image},null,8,["src"]),e("span",Te,l(o.cart_info.product.store_name),1)])]),_:1}),d(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),d(w,{prop:"product_num",label:"数量",width:"150"}),d(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),i.value.orderProduct&&c.value==1?(t(),s("div",Oe,[je,e("div",qe,[e("div",He,[Ge,e("div",Je,l(i.value.create_time),1)]),e("div",Qe,[We,e("div",Xe,l(i.value.total_num),1)]),e("div",Ye,[Ze,e("div",et,"¥"+l(i.value.total_price),1)]),e("div",tt,[st,e("div",ot,l(i.value.pay_time),1)]),e("div",it,[at,e("div",nt,"¥"+l(i.value.deduction_price),1)]),e("div",lt,[ct,e("div",dt,"¥"+l(i.value.pay_price),1)]),e("div",_t,[rt,e("div",ut,[i.value.pay_type==11?(t(),s("span",vt,"微信收款")):n("",!0),i.value.pay_type==12?(t(),s("span",pt,"现金支付")):n("",!0),i.value.pay_type==0?(t(),s("span",ft,"余额支付")):n("",!0),i.value.pay_type==1?(t(),s("span",ht,"微信支付")):n("",!0),i.value.pay_type==9?(t(),s("span",mt,"商户余额支付")):n("",!0),i.value.pay_type==10?(t(),s("span",yt,"对公转账")):n("",!0)])])]),i.value.service_info?(t(),s("div",kt,"收银员信息")):n("",!0),i.value.service_info?(t(),s("div",gt,[e("div",$t,[bt,e("div",Ct,[d(_,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:i.value.service_info.avatar},null,8,["src"])])]),e("div",wt,[xt,e("div",St,l(i.value.service_info.nickname),1)]),e("div",Vt,[Pt,e("div",Rt,l(i.value.service_info.account),1)])])):n("",!0)])):n("",!0),e("div",Lt,[e("div",It,[e("div",At,[y(" 实付: "),e("span",null,"¥"+l(i.value.pay_price),1)])]),i.value.verify_status==0?(t(),s("div",Bt,[d(P,{class:"btn",type:"warning",onClick:u[0]||(u[0]=o=>B(i.value))},{default:f(()=>[y("核销")]),_:1})])):(t(),s("div",Et,"已支付"))])])),[[D,r.value]]),d(Z,{ref_key:"payRef",ref:g},null,512),d(z,{modelValue:p.value,"onUpdate:modelValue":u[2]||(u[2]=o=>p.value=o),title:"提示",width:"500"},{footer:f(()=>[e("div",Dt,[d(P,{onClick:u[1]||(u[1]=o=>p.value=!1)},{default:f(()=>[y("取消")]),_:1}),m.cartCount>0?(t(),F(P,{key:0,onClick:m.goHome},{default:f(()=>[y(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),F(P,{key:1,type:"primary",onClick:V},{default:f(()=>[y(" 确认提单 ")]),_:1}))])]),default:f(()=>[zt]),_:1},8,["modelValue"])])}}},Nt=O(Kt,[["__scopeId","data-v-e39dfe99"]]),Ut={class:"my-card"},Ft={class:"my-code"},Mt=e("h2",null,"订单核销",-1),Tt={class:"box"},Ht={__name:"index",setup(h){const k=a(1),i=a("1372640275688400"),g=a(null),r=a(null),c=()=>{if(i.value=="")return M.error("请输入订单编号");k.value=2,T(()=>{r.value.setCode(i.value)})};return W(()=>{T(()=>{g.value.focus()})}),(S,b)=>(t(),s("div",Ut,[x(e("div",Ft,[Mt,e("div",Tt,[x(e("input",{ref_key:"inputRef",ref:g,"onUpdate:modelValue":b[0]||(b[0]=p=>i.value=p),placeholder:"",class:"input",onKeyup:q(c,["enter"])},null,544),[[X,i.value]]),e("div",{class:"btn",onClick:c},"查询")])],512),[[L,k.value==1]]),x(d(Be,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:r},null,512),[[L,k.value==2]]),x(d(te,null,null,512),[[L,k.value==2]]),x(d(Nt,{ref:"detailRef"},null,512),[[L,k.value==2]])]))}};export{Ht as default}; diff --git a/dist/assets/index-mROn3Wap.css b/dist/assets/index-DWtBHQXf.css similarity index 51% rename from dist/assets/index-mROn3Wap.css rename to dist/assets/index-DWtBHQXf.css index 906fd94..226727c 100644 --- a/dist/assets/index-mROn3Wap.css +++ b/dist/assets/index-DWtBHQXf.css @@ -1 +1 @@ -@charset "UTF-8";.my-order[data-v-aaca35b5]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-aaca35b5]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav span[data-v-aaca35b5]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-aaca35b5]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-aaca35b5]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-aaca35b5]{height:calc(100vh - 100px - 8.2rem);overflow-y:auto}.my-order .order-list .item[data-v-aaca35b5]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-aaca35b5]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-aaca35b5]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-aaca35b5]: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 .cahier2[data-v-aaca35b5]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #ff4a00;color:#ff4a00;border-radius:3px}.my-order .order-list .item .top .create-time[data-v-aaca35b5]{font-size:.8rem}.my-order .order-list .item .shop[data-v-aaca35b5]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-aaca35b5]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-aaca35b5]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-aaca35b5]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-aaca35b5]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-aaca35b5]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-aaca35b5]{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-aaca35b5]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-aaca35b5]{background-color:#efefef}.my-order .load-end[data-v-aaca35b5]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-e39dfe99]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-e39dfe99]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-e39dfe99]{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-e39dfe99]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-e39dfe99]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-e39dfe99]{border-radius:0 0 0 1rem}.my-order .detail[data-v-e39dfe99]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-e39dfe99]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-e39dfe99]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-e39dfe99]{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-e39dfe99]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-e39dfe99]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-e39dfe99]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-e39dfe99]{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-e39dfe99]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-e39dfe99]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-e39dfe99]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-e39dfe99]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-e39dfe99]{border-radius:4rem;padding:1.2rem}.my-card{display:flex}.my-card .my-code{height:70%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-card .my-code .box{width:38rem;position:relative}.my-card .my-code .box .input{width:100%;height:3rem;box-sizing:border-box;border-radius:4rem;border:1px solid #1890ff;padding:0 1rem;font-size:1.1rem}.my-card .my-code .box .input:focus{outline:none;box-shadow:0 0 5px #1890ff;transition:all .2s ease-in-out}.my-card .my-code .box .btn{position:absolute;right:0;top:0;width:5rem;height:100%;border-radius:0 4rem 4rem 0;background:#1890ff;color:#fff;display:flex;justify-content:center;align-items:center}::-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-9936e733]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-9936e733]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav span[data-v-9936e733]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-9936e733]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-9936e733]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-9936e733]{height:calc(100vh - 100px - 8.2rem);overflow-y:auto}.my-order .order-list .item[data-v-9936e733]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-9936e733]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-9936e733]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-9936e733]: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 .cahier2[data-v-9936e733]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #ff4a00;color:#ff4a00;border-radius:3px}.my-order .order-list .item .top .create-time[data-v-9936e733]{font-size:.8rem}.my-order .order-list .item .shop[data-v-9936e733]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-9936e733]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-9936e733]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-9936e733]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-9936e733]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-9936e733]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-9936e733]{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-9936e733]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-9936e733]{background-color:#efefef}.my-order .load-end[data-v-9936e733]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-2ec0b2dc]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-2ec0b2dc]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-2ec0b2dc]{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-2ec0b2dc]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-2ec0b2dc]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-2ec0b2dc]{border-radius:0 0 0 1rem}.my-order .detail[data-v-2ec0b2dc]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-2ec0b2dc]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-2ec0b2dc]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-2ec0b2dc]{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-2ec0b2dc]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-2ec0b2dc]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-2ec0b2dc]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-2ec0b2dc]{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-2ec0b2dc]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-2ec0b2dc]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-2ec0b2dc]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-2ec0b2dc]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-2ec0b2dc]{border-radius:4rem;padding:1.2rem}.my-card{display:flex}.my-card .my-code{height:70%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-card .my-code .box{width:38rem;position:relative}.my-card .my-code .box .input{width:100%;height:3rem;box-sizing:border-box;border-radius:4rem;border:1px solid #1890ff;padding:0 1rem;font-size:1.1rem}.my-card .my-code .box .input:focus{outline:none;box-shadow:0 0 5px #1890ff;transition:all .2s ease-in-out}.my-card .my-code .box .btn{position:absolute;right:0;top:0;width:5rem;height:100%;border-radius:0 4rem 4rem 0;background:#1890ff;color:#fff;display:flex;justify-content:center;align-items:center}::-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-DXB5Po7d.css b/dist/assets/index-DXB5Po7d.css deleted file mode 100644 index 3c3afc6..0000000 --- a/dist/assets/index-DXB5Po7d.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.dialog-footer .ok-btn[data-v-fd8ea485]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-fd8ea485]{border-top:1px solid #eee;padding-top:1rem}.price .flex[data-v-fd8ea485]{display:flex}.my-order[data-v-f19da261]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-f19da261]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:1px solid #eee}.my-order .header-nav span[data-v-f19da261]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-f19da261]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-f19da261]{height:calc(100vh - 100px - 14rem);overflow-y:auto}.my-order .order-list .order-item[data-v-f19da261]{display:flex;padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .order-item .order-item-img[data-v-f19da261]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-f19da261]{flex:1;box-sizing:border-box;padding-left:12px;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-f19da261]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-f19da261]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-f19da261]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-f19da261]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-f19da261]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px 10px #eee}.my-order .order-footer .order-total[data-v-f19da261]{height:2.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:1px solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-f19da261]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-f19da261]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-f19da261]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-f19da261]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-f19da261]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-f19da261]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-f72f05b9]{height:100%;box-sizing:border-box;position:relative;overflow:hidden}.my-order .header-nav[data-v-f72f05b9]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:1px solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-f72f05b9]{width:5rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-f72f05b9]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-f72f05b9]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-f72f05b9] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-f72f05b9]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-f72f05b9]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-f72f05b9]{border:1px solid #1890ff}.my-order .shop-list[data-v-f72f05b9]{height:calc(100vh - 100px - 3.1rem);width:auto;overflow-y:auto;box-sizing:border-box;padding-top:20px}.my-order .shop-list .shop-item[data-v-f72f05b9]{width:11rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.5rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-f72f05b9]{border-radius:.5rem;width:11rem;height:11rem}.my-order .shop-list .shop-item .shop-name[data-v-f72f05b9]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-f72f05b9]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-f72f05b9]{font-size:1.2rem;margin-left:3px}.my-order .shop-list .shop-item[data-v-f72f05b9]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-f72f05b9]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-f72f05b9]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-f72f05b9]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-89e86b21]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-89e86b21]{border-top:1px solid #eee;padding-top:1rem}.shop .shop-info[data-v-89e86b21]{display:flex}.shop .shop-info .shop-info-left[data-v-89e86b21]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-89e86b21]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-89e86b21]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-89e86b21]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-89e86b21]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-89e86b21]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-89e86b21]{min-height:20rem}.shop .shop-sku .title[data-v-89e86b21]{font-size:1.1rem;font-weight:700;padding:1rem 0 .5rem}.shop .shop-sku .sku .sku-item[data-v-89e86b21]{cursor:pointer;padding:.5rem 1rem;background-color:#f5f5f5;border-radius:3rem}.shop .shop-sku .sku .sku-item_active[data-v-89e86b21]{background-color:#1890ff;color:#fff}.my-card{display:flex}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:20px 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/index-DXzcP25f.css b/dist/assets/index-DXzcP25f.css new file mode 100644 index 0000000..49304cf --- /dev/null +++ b/dist/assets/index-DXzcP25f.css @@ -0,0 +1 @@ +@charset "UTF-8";.my-order[data-v-477f396c]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-477f396c]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav span[data-v-477f396c]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-477f396c]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-477f396c]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-477f396c]{height:calc(100vh - 100px - 8.2rem);overflow-y:auto}.my-order .order-list .item[data-v-477f396c]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-477f396c]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-477f396c]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-477f396c]: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 .cahier2[data-v-477f396c]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #ff4a00;color:#ff4a00;border-radius:3px}.my-order .order-list .item .top .create-time[data-v-477f396c]{font-size:.8rem}.my-order .order-list .item .shop[data-v-477f396c]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-477f396c]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-477f396c]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-477f396c]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-477f396c]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-477f396c]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-477f396c]{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-477f396c]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-477f396c]{background-color:#efefef}.my-order .load-end[data-v-477f396c]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-f0903720]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-f0903720]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-f0903720]{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-f0903720]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-f0903720]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-f0903720]{border-radius:0 0 0 1rem}.my-order .detail[data-v-f0903720]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-f0903720]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-f0903720]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-f0903720]{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-f0903720]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-f0903720]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-f0903720]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-f0903720]{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-f0903720]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-f0903720]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-f0903720]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-f0903720]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-f0903720]{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-pQtaDbrk.js b/dist/assets/index-pQtaDbrk.js deleted file mode 100644 index a54f1eb..0000000 --- a/dist/assets/index-pQtaDbrk.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as T,x as j,r as _,b as y,j as N,c as t,h as o,e,f as l,w as u,g as v,k as J,p as q,F as U,i as F,l as A,t as d,d as K,q as n,m as O,s as H,u as M,z as Q,E}from"./index-u0hj8LVS.js";import{e as W,p as X,f as Y,g as Z}from"./pay-D-50vyYW.js";import{p as ee}from"./padding-BLY6EjEZ.js";const te=h=>(H("data-v-10a58262"),h=h(),M(),h),se={class:"my-order"},oe={class:"header-nav"},ae=te(()=>e("div",{class:"nav-item"},"订单列表",-1)),ie={class:"nav-item-clear"},le={class:"header-input"},ne={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},ce=["onClick"],de={class:"top"},_e={class:"create-time"},re={class:"shop"},ue={key:0,class:"left"},ve={key:0,class:"shop-name"},pe={class:"right"},fe={class:"money"},me={class:"count"},he={class:"bottom"},ye={class:"pay"},ge={key:0},ke={key:0},$e={key:1},be={key:2},Ce={key:3},Ve={key:4},we={key:5},Se={key:1,style:{color:"#ff4a00"}},Pe={key:0,class:"cashier"},Le={key:1,class:"cashier"},xe={key:0,class:"load-end"},Ie={key:1,class:"load-end"},Ae={__name:"order",setup(h){const P=j();_([]);const a=_(1),S=$=>{f.value.page=1,m.value=!1,r.value=!1,k.value=[],C(!0)};_(null);const f=_({page:1,limit:20,search_info:""}),r=_(!1),L=_(0),V=_(0),m=_(!1),k=_([]),C=($=!1)=>{if($)f.value.page=1;else if(m.value||r.value)return;r.value=!0,a.value==1&&(f.value.paid=null),a.value==2&&(f.value.paid=0),W(P.userInfo.service.mer_id,f.value).then(i=>{$?k.value=i.data.list:k.value=[...k.value,...i.data.list],i.data.list.length{m.value=!0,r.value=!1})},R=($,i)=>{V.value=i,O.emit("set-order-detail",$)};return($,i)=>{const c=y("el-radio-button"),x=y("el-radio-group"),w=y("el-button"),z=y("el-input"),b=y("el-image"),B=N("loading"),D=N("infinite-scroll");return t(),o("div",se,[e("div",oe,[ae,e("div",ie,[l(x,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=s=>a.value=s),onChange:S,size:"small"},{default:u(()=>[l(c,{value:1},{default:u(()=>[v("全部")]),_:1}),l(c,{value:2},{default:u(()=>[v("未支付")]),_:1})]),_:1},8,["modelValue"])])]),e("div",le,[l(z,{modelValue:f.value.search_info,"onUpdate:modelValue":i[2]||(i[2]=s=>f.value.search_info=s),placeholder:"请输入订单编号",onKeydown:i[3]||(i[3]=J(s=>C(!0),["enter"])),onClear:i[4]||(i[4]=s=>C(!0)),clearable:""},{append:u(()=>[l(w,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:i[1]||(i[1]=s=>C(!0))},{default:u(()=>[v("搜索")]),_:1})]),_:1},8,["modelValue"])]),q((t(),o("div",ne,[(t(!0),o(U,null,F(k.value,(s,g)=>(t(),o("div",{class:A(["item",{"item-active":V.value==g}]),key:g,onClick:I=>R(s,g)},[e("div",de,[e("div",{class:A(["sn",s.pay_type===11||s.pay_type===12?"cahier":"cahier2"])},"单号: "+d(s.order_sn),3),e("div",_e,d(s.create_time),1)]),e("div",re,[s.orderProduct?(t(),o("div",ue,[(t(!0),o(U,null,F(s.orderProduct.slice(0,5),(I,G)=>(t(),K(b,{key:G,src:I.cart_info.productAttr.image||I.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),s.orderProduct.length==1?(t(),o("div",ve,d(s.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",pe,[e("div",fe,"¥"+d(s.pay_price),1),e("div",me,"共"+d(s.total_num)+"件商品",1)])]),e("div",he,[e("div",ye,[s.paid?(t(),o("div",ge,[v(" 已支付 "),s.pay_type==12?(t(),o("span",ke,"(现金支付)")):n("",!0),s.pay_type==11?(t(),o("span",$e,"(微信支付)")):n("",!0),s.pay_type==0?(t(),o("span",be,"(余额支付)")):n("",!0),s.pay_type==1?(t(),o("span",Ce,"(微信支付)")):n("",!0),s.pay_type==9?(t(),o("span",Ve,"(商户余额支付)")):n("",!0),s.pay_type==10?(t(),o("span",we,"(对公转账)")):n("",!0)])):(t(),o("div",Se,"未支付"))]),s.service_info?(t(),o("div",Pe,"收银员: "+d(s.service_info.nickname),1)):(t(),o("div",Le,"平台订单"))])],10,ce))),128)),m.value?(t(),o("div",xe,"没有更多了")):n("",!0),r.value?(t(),o("div",Ie,"加载中...")):n("",!0)])),[[B,r.value],[D,C]])])}}},Re=T(Ae,[["__scopeId","data-v-10a58262"]]),p=h=>(H("data-v-b59b7350"),h=h(),M(),h),ze={class:"my-order"},Be={class:"header-nav"},De=["onClick"],Ee={class:"detail"},Ne={key:0,class:"table"},Ue={style:{"font-size":"0.9rem"}},Fe={style:{color:"#ff4a00"}},Ke={style:{display:"flex","align-items":"center"}},Oe={style:{"margin-left":"0.5rem"}},Te={key:1,class:"table"},je=p(()=>e("div",{class:"table-title"},"订单信息",-1)),qe={class:"table-info"},He={class:"info-item"},Me=p(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ge={class:"info-item-info"},Je={class:"info-item"},Qe=p(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),We={class:"info-item-info"},Xe={class:"info-item"},Ye=p(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=p(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=p(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=p(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},_t=p(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),rt={class:"info-item-info"},ut={key:0},vt={key:1},pt={key:2},ft={key:3},mt={key:4},ht={key:5},yt={key:0,class:"table-title"},gt={key:1,class:"table-info",style:{"flex-direction":"column"}},kt={class:"info-item"},$t=p(()=>e("div",{class:"info-item-title"},"头像:",-1)),bt={class:"info-item-info"},Ct={class:"info-item"},Vt=p(()=>e("div",{class:"info-item-title"},"昵称:",-1)),wt={class:"info-item-info"},St={class:"info-item"},Pt=p(()=>e("div",{class:"info-item-title"},"账号:",-1)),Lt={class:"info-item-info"},xt={key:2,class:"footer"},It={class:"info"},At={class:"ser"},Rt={class:"price"},zt={key:0,class:"handle"},Bt={key:1,class:"handle"},Dt=p(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Et={class:"dialog-footer"},Nt={__name:"detail",setup(h){j();const P=Q(),a=_({});O.on("set-order-detail",i=>{a.value=i}),_([]);const S=_(null),f=_(!1);_(0);const r=_(0),L=_(["商品信息","订单详情"]),V=_(""),m=_(!1),k=i=>{V.value=i,m.value=!0},C=()=>{m.value=!1,Y({order_sn:V.value}).then(i=>{E({message:i.message,type:"success"}),P.push({name:"home"})})},R=i=>{S.value.setRePay({price:i.pay_price,order_id:i.group_order_id}),S.value.drawer=!0},$=i=>{Z({order_sn:i}).then(c=>{c.data.paid==1||c.message=="支付成功"?E({message:c.message,type:"success"}):E({message:c.message,type:"error"})}).catch(c=>{})};return(i,c)=>{const x=y("el-image"),w=y("el-table-column"),z=y("el-table"),b=y("el-button"),B=y("el-dialog"),D=N("loading");return t(),o("div",ze,[e("div",Be,[(t(!0),o(U,null,F(L.value,(s,g)=>(t(),o("div",{key:g,class:A(["nav-item",{"nav-item-active":r.value==g,"nav-item-radius1":r.value==g+1,"nav-item-radius2":r.value==g-1}]),onClick:I=>r.value=g},d(s),11,De))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":r.value==L.value.length-1}]),style:{flex:"1"}},null,2)]),q((t(),o("div",Ee,[a.value.orderProduct&&r.value==0?(t(),o("div",Ne,[e("div",Ue,[v(" 共计 "),e("span",Fe,d(a.value.total_num),1),v(" 件商品 ")]),l(z,{style:{height:"calc(100vh - 100px - 14rem)"},data:a.value.orderProduct},{default:u(()=>[l(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:u(({row:s})=>[e("div",Ke,[l(x,{style:{height:"3rem",width:"3rem"},src:s.cart_info.productAttr.image||s.cart_info.product.image},null,8,["src"]),e("span",Oe,d(s.cart_info.product.store_name),1)])]),_:1}),l(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),l(w,{prop:"product_num",label:"数量",width:"150"}),l(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):n("",!0),a.value.orderProduct&&r.value==1?(t(),o("div",Te,[je,e("div",qe,[e("div",He,[Me,e("div",Ge,d(a.value.create_time),1)]),e("div",Je,[Qe,e("div",We,d(a.value.total_num),1)]),e("div",Xe,[Ye,e("div",Ze,"¥"+d(a.value.total_price),1)]),e("div",et,[tt,e("div",st,d(a.value.pay_time),1)]),e("div",ot,[at,e("div",it,"¥"+d(a.value.deduction_price),1)]),e("div",lt,[nt,e("div",ct,"¥"+d(a.value.pay_price),1)]),e("div",dt,[_t,e("div",rt,[a.value.pay_type==11?(t(),o("span",ut,"微信收款")):n("",!0),a.value.pay_type==12?(t(),o("span",vt,"现金支付")):n("",!0),a.value.pay_type==0?(t(),o("span",pt,"余额支付")):n("",!0),a.value.pay_type==1?(t(),o("span",ft,"微信支付")):n("",!0),a.value.pay_type==9?(t(),o("span",mt,"商户余额支付")):n("",!0),a.value.pay_type==10?(t(),o("span",ht,"对公转账")):n("",!0)])])]),a.value.service_info?(t(),o("div",yt,"收银员信息")):n("",!0),a.value.service_info?(t(),o("div",gt,[e("div",kt,[$t,e("div",bt,[l(x,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:a.value.service_info.avatar},null,8,["src"])])]),e("div",Ct,[Vt,e("div",wt,d(a.value.service_info.nickname),1)]),e("div",St,[Pt,e("div",Lt,d(a.value.service_info.account),1)])])):n("",!0)])):n("",!0),a.value.service_info?(t(),o("div",xt,[e("div",It,[e("div",At,"收银员: "+d(a.value.service_info.nickname),1),e("div",Rt,[v(" 实付: "),e("span",null,"¥"+d(a.value.pay_price),1)])]),a.value.pay_time?(t(),o("div",Bt,"已支付")):(t(),o("div",zt,[l(b,{class:"btn",type:"primary",onClick:c[0]||(c[0]=s=>R(a.value))},{default:u(()=>[v("重新支付")]),_:1}),l(b,{class:"btn",type:"primary",onClick:c[1]||(c[1]=s=>$(a.value.order_sn))},{default:u(()=>[v("检测状态")]),_:1}),l(b,{class:"btn",type:"success",onClick:c[2]||(c[2]=s=>k(a.value.order_sn))},{default:u(()=>[v("提单")]),_:1})]))])):n("",!0)])),[[D,f.value]]),l(X,{ref_key:"payRef",ref:S},null,512),l(B,{modelValue:m.value,"onUpdate:modelValue":c[4]||(c[4]=s=>m.value=s),title:"提示",width:"500"},{footer:u(()=>[e("div",Et,[l(b,{onClick:c[3]||(c[3]=s=>m.value=!1)},{default:u(()=>[v("取消")]),_:1}),i.cartCount>0?(t(),K(b,{key:0,onClick:i.goHome},{default:u(()=>[v(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),K(b,{key:1,type:"primary",onClick:C},{default:u(()=>[v(" 确认提单 ")]),_:1}))])]),default:u(()=>[Dt]),_:1},8,["modelValue"])])}}},Ut=T(Nt,[["__scopeId","data-v-b59b7350"]]),Ft={class:"my-card"},jt={__name:"index",setup(h){return(P,a)=>(t(),o("div",Ft,[l(Re,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(ee),l(Ut,{ref:"detailRef"},null,512)]))}};export{jt as default}; diff --git a/dist/assets/index-umt6s3SF.js b/dist/assets/index-umt6s3SF.js new file mode 100644 index 0000000..7c1ebe7 --- /dev/null +++ b/dist/assets/index-umt6s3SF.js @@ -0,0 +1 @@ +import{_ as O,x as j,r as n,b as C,j as K,c as t,h as s,e,f as d,w as f,g as m,k as q,p as x,F as N,i as U,l as A,t as l,d as F,q as a,E as M,m as I,s as H,u as G,z as Q,o as W,n as T,B as L,C as X}from"./index-CxOzLThu.js";import{v as Y,p as Z,f as ee}from"./pay-C2kOlX-6.js";import{p as te}from"./padding-C-nfgXnj.js";const se=h=>(H("data-v-9936e733"),h=h(),G(),h),oe={class:"my-order"},ie={class:"header-nav"},ae=se(()=>e("div",{class:"nav-item"},"核销订单",-1)),ne={class:"nav-item-clear"},le={class:"header-input"},ce={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500","infinite-scroll-immediate":"false",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"},he={class:"money"},ye={class:"count"},me={class:"bottom"},ke={class:"pay"},ge={key:0},$e={key:0},be={key:1},Ce={key:2},we={key:3},xe={key:4},Se={key:5},Ve={key:6},Pe={key:1,style:{color:"#ff4a00"}},Re={key:0,class:"cashier"},Le={key:1,class:"cashier"},Ie={key:0,class:"load-end"},Ae={key:1,class:"load-end"},Be={__name:"order",setup(h,{expose:k}){const i=j();n([]);const g=n(1);n(null);const r=n({page:1,limit:20,search_info:""}),c=n(!1);n(0);const S=n(0),b=n(!1),p=n([]),V=(u=!1)=>{if(!r.value.search_info)return M.error("请输入订单编号");if(u)r.value.page=1;else if(b.value||c.value)return;c.value=!0,g.value==1&&(r.value.paid=null),g.value==2&&(r.value.paid=0),p.value=[],I.emit("set-order-detail",{}),Y(i.userInfo.service.mer_id,r.value.search_info).then(_=>{p.value=[_.data],I.emit("set-order-detail",p.value[0]),c.value=!1}).catch(_=>{b.value=!0,c.value=!1})},B=(u,_)=>{S.value=_,I.emit("set-order-detail",u)};return k({setCode:u=>{r.value.search_info=u,V(!0)}}),(u,_)=>{const w=C("el-button"),E=C("el-input"),P=C("el-image"),z=K("loading"),D=K("infinite-scroll");return t(),s("div",oe,[e("div",ie,[ae,e("div",ne,[d(w,{type:"primary",size:"small"},{default:f(()=>[m("返回上一页")]),_:1})])]),e("div",le,[d(E,{modelValue:r.value.search_info,"onUpdate:modelValue":_[1]||(_[1]=o=>r.value.search_info=o),placeholder:"请输入订单编号",onKeydown:_[2]||(_[2]=q(o=>V(!0),["enter"])),clearable:""},{append:f(()=>[d(w,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:_[0]||(_[0]=o=>V(!0))},{default:f(()=>[m("搜索")]),_:1})]),_:1},8,["modelValue"])]),x((t(),s("div",ce,[(t(!0),s(N,null,U(p.value,(o,$)=>(t(),s("div",{class:A(["item",{"item-active":S.value==$}]),key:$,onClick:R=>B(o,$)},[e("div",_e,[e("div",{class:A(["sn",o.pay_type===11||o.pay_type===12||o.pay_type===13?"cahier":"cahier2"])},"单号: "+l(o.order_sn),3),e("div",re,l(o.create_time),1)]),e("div",ue,[o.orderProduct?(t(),s("div",ve,[(t(!0),s(N,null,U(o.orderProduct.slice(0,5),(R,J)=>(t(),F(P,{key:J,src:R.cart_info.productAttr.image||R.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),o.orderProduct.length==1?(t(),s("div",pe,l(o.orderProduct[0].cart_info.product.store_name),1)):a("",!0)])):a("",!0),e("div",fe,[e("div",he,"¥"+l(o.pay_price),1),e("div",ye,"共"+l(o.total_num)+"件商品",1)])]),e("div",me,[e("div",ke,[o.paid?(t(),s("div",ge,[m(" 已支付 "),o.pay_type==13?(t(),s("span",$e,"(支付宝收款)")):a("",!0),o.pay_type==12?(t(),s("span",be,"(现金支付)")):a("",!0),o.pay_type==11?(t(),s("span",Ce,"(微信收款)")):a("",!0),o.pay_type==0?(t(),s("span",we,"(余额支付)")):a("",!0),o.pay_type==1?(t(),s("span",xe,"(微信支付)")):a("",!0),o.pay_type==9?(t(),s("span",Se,"(商户余额支付)")):a("",!0),o.pay_type==10?(t(),s("span",Ve,"(对公转账)")):a("",!0)])):(t(),s("div",Pe,"未支付"))]),o.service_info?(t(),s("div",Re,"收银员: "+l(o.service_info.nickname),1)):(t(),s("div",Le,"平台订单"))])],10,de))),128)),b.value?(t(),s("div",Ie,"没有更多了")):a("",!0),c.value?(t(),s("div",Ae,"加载中...")):a("",!0)])),[[z,c.value],[D,V]])])}}},Ee=O(Be,[["__scopeId","data-v-9936e733"]]),v=h=>(H("data-v-2ec0b2dc"),h=h(),G(),h),ze={class:"my-order"},De={class:"header-nav"},Ke=["onClick"],Ne={class:"detail"},Ue={key:0,class:"table"},Fe={style:{"font-size":"0.9rem"}},Me={style:{color:"#ff4a00"}},Te={style:{display:"flex","align-items":"center"}},Oe={style:{"margin-left":"0.5rem"}},je={key:1,class:"table"},qe=v(()=>e("div",{class:"table-title"},"订单信息",-1)),He={class:"table-info"},Ge={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=v(()=>e("div",{class:"info-item-title"},"商品总数:",-1)),Ye={class:"info-item-info"},Ze={class:"info-item"},et=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),it={class:"info-item-info"},at={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),lt={class:"info-item-info"},ct={class:"info-item"},dt=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),_t={class:"info-item-info"},rt={class:"info-item"},ut=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),vt={class:"info-item-info"},pt={key:0},ft={key:1},ht={key:2},yt={key:3},mt={key:4},kt={key:5},gt={key:6},$t={key:0,class:"table-title"},bt={key:1,class:"table-info",style:{"flex-direction":"column"}},Ct={class:"info-item"},wt=v(()=>e("div",{class:"info-item-title"},"头像:",-1)),xt={class:"info-item-info"},St={class:"info-item"},Vt=v(()=>e("div",{class:"info-item-title"},"昵称:",-1)),Pt={class:"info-item-info"},Rt={class:"info-item"},Lt=v(()=>e("div",{class:"info-item-title"},"账号:",-1)),It={class:"info-item-info"},At={class:"footer"},Bt={class:"info"},Et={class:"price"},zt={key:0,class:"handle"},Dt={key:1,class:"handle"},Kt=v(()=>e("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),Nt={class:"dialog-footer"},Ut={__name:"detail",setup(h){j();const k=Q(),i=n({});I.on("set-order-detail",y=>{i.value=y}),n([]);const g=n(null),r=n(!1);n(0);const c=n(0),S=n(["商品信息","订单详情"]),b=n(""),p=n(!1),V=()=>{p.value=!1,ee({order_sn:b.value}).then(y=>{M({message:y.message,type:"success"}),k.push({name:"home"})})},B=y=>{g.value.setRePay({price:y.pay_price,order_id:y.group_order_id}),g.value.drawer=!0};return(y,u)=>{const _=C("el-image"),w=C("el-table-column"),E=C("el-table"),P=C("el-button"),z=C("el-dialog"),D=K("loading");return t(),s("div",ze,[e("div",De,[(t(!0),s(N,null,U(S.value,(o,$)=>(t(),s("div",{key:$,class:A(["nav-item",{"nav-item-active":c.value==$,"nav-item-radius1":c.value==$+1,"nav-item-radius2":c.value==$-1}]),onClick:R=>c.value=$},l(o),11,Ke))),128)),e("div",{class:A(["nav-item",{"nav-item-radius2":c.value==S.value.length-1}]),style:{flex:"1"}},null,2)]),x((t(),s("div",Ne,[i.value.orderProduct&&c.value==0?(t(),s("div",Ue,[e("div",Fe,[m(" 共计 "),e("span",Me,l(i.value.total_num),1),m(" 件商品 ")]),d(E,{style:{height:"calc(100vh - 100px - 14rem)"},data:i.value.orderProduct},{default:f(()=>[d(w,{prop:"cart_info.product.store_name",label:"商品信息"},{default:f(({row:o})=>[e("div",Te,[d(_,{style:{height:"3rem",width:"3rem"},src:o.cart_info.productAttr.image||o.cart_info.product.image},null,8,["src"]),e("span",Oe,l(o.cart_info.product.store_name),1)])]),_:1}),d(w,{prop:"cart_info.productAttr.price",label:"单价",width:"150"}),d(w,{prop:"product_num",label:"数量",width:"150"}),d(w,{prop:"total_price",label:"总价",width:"150"})]),_:1},8,["data"])])):a("",!0),i.value.orderProduct&&c.value==1?(t(),s("div",je,[qe,e("div",He,[e("div",Ge,[Je,e("div",Qe,l(i.value.create_time),1)]),e("div",We,[Xe,e("div",Ye,l(i.value.total_num),1)]),e("div",Ze,[et,e("div",tt,"¥"+l(i.value.total_price),1)]),e("div",st,[ot,e("div",it,l(i.value.pay_time),1)]),e("div",at,[nt,e("div",lt,"¥"+l(i.value.deduction_price),1)]),e("div",ct,[dt,e("div",_t,"¥"+l(i.value.pay_price),1)]),e("div",rt,[ut,e("div",vt,[i.value.pay_type==11?(t(),s("span",pt,"微信收款")):a("",!0),i.value.pay_type==12?(t(),s("span",ft,"现金支付")):a("",!0),i.value.pay_type==13?(t(),s("span",ht,"支付宝收款")):a("",!0),i.value.pay_type==0?(t(),s("span",yt,"余额支付")):a("",!0),i.value.pay_type==1?(t(),s("span",mt,"微信支付")):a("",!0),i.value.pay_type==9?(t(),s("span",kt,"商户余额支付")):a("",!0),i.value.pay_type==10?(t(),s("span",gt,"对公转账")):a("",!0)])])]),i.value.service_info?(t(),s("div",$t,"收银员信息")):a("",!0),i.value.service_info?(t(),s("div",bt,[e("div",Ct,[wt,e("div",xt,[d(_,{style:{height:"4rem",width:"4rem","border-radius":"50%"},src:i.value.service_info.avatar},null,8,["src"])])]),e("div",St,[Vt,e("div",Pt,l(i.value.service_info.nickname),1)]),e("div",Rt,[Lt,e("div",It,l(i.value.service_info.account),1)])])):a("",!0)])):a("",!0),e("div",At,[e("div",Bt,[e("div",Et,[m(" 实付: "),e("span",null,"¥"+l(i.value.pay_price),1)])]),i.value.verify_status==0?(t(),s("div",zt,[d(P,{class:"btn",type:"warning",onClick:u[0]||(u[0]=o=>B(i.value))},{default:f(()=>[m("核销")]),_:1})])):(t(),s("div",Dt,"已支付"))])])),[[D,r.value]]),d(Z,{ref_key:"payRef",ref:g},null,512),d(z,{modelValue:p.value,"onUpdate:modelValue":u[2]||(u[2]=o=>p.value=o),title:"提示",width:"500"},{footer:f(()=>[e("div",Nt,[d(P,{onClick:u[1]||(u[1]=o=>p.value=!1)},{default:f(()=>[m("取消")]),_:1}),y.cartCount>0?(t(),F(P,{key:0,onClick:y.goHome},{default:f(()=>[m(" 前去清空购物车 ")]),_:1},8,["onClick"])):(t(),F(P,{key:1,type:"primary",onClick:V},{default:f(()=>[m(" 确认提单 ")]),_:1}))])]),default:f(()=>[Kt]),_:1},8,["modelValue"])])}}},Ft=O(Ut,[["__scopeId","data-v-2ec0b2dc"]]),Mt={class:"my-card"},Tt={class:"my-code"},Ot=e("h2",null,"订单核销",-1),jt={class:"box"},Jt={__name:"index",setup(h){const k=n(1),i=n("1372640275688400"),g=n(null),r=n(null),c=()=>{if(i.value=="")return M.error("请输入订单编号");k.value=2,T(()=>{r.value.setCode(i.value)})};return W(()=>{T(()=>{g.value.focus()})}),(S,b)=>(t(),s("div",Mt,[x(e("div",Tt,[Ot,e("div",jt,[x(e("input",{ref_key:"inputRef",ref:g,"onUpdate:modelValue":b[0]||(b[0]=p=>i.value=p),placeholder:"",class:"input",onKeyup:q(c,["enter"])},null,544),[[X,i.value]]),e("div",{class:"btn",onClick:c},"查询")])],512),[[L,k.value==1]]),x(d(Ee,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:r},null,512),[[L,k.value==2]]),x(d(te,null,null,512),[[L,k.value==2]]),x(d(Ft,{ref:"detailRef"},null,512),[[L,k.value==2]])]))}};export{Jt as default}; diff --git a/dist/assets/index-vM3ptcSU.css b/dist/assets/index-vM3ptcSU.css deleted file mode 100644 index f72423d..0000000 --- a/dist/assets/index-vM3ptcSU.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.my-order[data-v-10a58262]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-10a58262]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav span[data-v-10a58262]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-10a58262]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-10a58262]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-10a58262]{height:calc(100vh - 100px - 8.2rem);overflow-y:auto}.my-order .order-list .item[data-v-10a58262]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-10a58262]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-10a58262]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-10a58262]: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 .cahier2[data-v-10a58262]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #ff4a00;color:#ff4a00;border-radius:3px}.my-order .order-list .item .top .create-time[data-v-10a58262]{font-size:.8rem}.my-order .order-list .item .shop[data-v-10a58262]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-10a58262]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-10a58262]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-10a58262]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-10a58262]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-10a58262]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-10a58262]{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-10a58262]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-10a58262]{background-color:#efefef}.my-order .load-end[data-v-10a58262]{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/indexList-B1jRlWLk.js b/dist/assets/indexList-BFyrvYgw.js similarity index 96% rename from dist/assets/indexList-B1jRlWLk.js rename to dist/assets/indexList-BFyrvYgw.js index 872749b..80b92f7 100644 --- a/dist/assets/indexList-B1jRlWLk.js +++ b/dist/assets/indexList-BFyrvYgw.js @@ -1 +1 @@ -import{e as F,a as G,p as J,g as K,f as Q}from"./pay-D-50vyYW.js";import{_ as W,x as X,r as s,b as d,j as Y,p as Z,c,h as m,f as t,w as o,g as r,t as ee,e as I,d as V,z as te,E as h,s as ae,u as oe}from"./index-u0hj8LVS.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=te(),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},z=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(""),E=()=>{_.value=!1,Q({order_sn:x.value}).then(e=>{h({message:e.message,type:"success"}),C.push({name:"home"})})},_=s(!1),U=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"),H=d("el-pagination"),M=d("el-dialog"),q=Y("loading");return Z((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,ee(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=>z(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:S=>U(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(H,{"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(M,{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:E},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ce]),_:1},8,["modelValue"])])),[[q,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-C2kOlX-6.js";import{_ as W,x as X,r as s,b as d,j as Y,p as Z,c,h as m,f as t,w as o,g as r,t as ee,e as I,d as V,z as te,E as h,s as ae,u as oe}from"./index-CxOzLThu.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=te(),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},z=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(""),E=()=>{_.value=!1,Q({order_sn:x.value}).then(e=>{h({message:e.message,type:"success"}),C.push({name:"home"})})},_=s(!1),U=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"),H=d("el-pagination"),M=d("el-dialog"),q=Y("loading");return Z((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,ee(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=>z(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:S=>U(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(H,{"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(M,{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:E},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ce]),_:1},8,["modelValue"])])),[[q,y.value]])}}},ge=W(pe,[["__scopeId","data-v-f71c3ce9"]]);export{ge as default}; diff --git a/dist/assets/padding-BLY6EjEZ.js b/dist/assets/padding-C-nfgXnj.js similarity index 65% rename from dist/assets/padding-BLY6EjEZ.js rename to dist/assets/padding-C-nfgXnj.js index f958699..a596b2e 100644 --- a/dist/assets/padding-BLY6EjEZ.js +++ b/dist/assets/padding-C-nfgXnj.js @@ -1 +1 @@ -import{_ as e,c as t,h as c}from"./index-u0hj8LVS.js";const n={},o={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",o)}const i=e(n,[["render",s]]);export{i as p}; +import{_ as e,c as t,h as c}from"./index-CxOzLThu.js";const n={},o={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",o)}const i=e(n,[["render",s]]);export{i as p}; diff --git a/dist/assets/pay-C0RInKeg.css b/dist/assets/pay-C0RInKeg.css deleted file mode 100644 index 8b2d22d..0000000 --- a/dist/assets/pay-C0RInKeg.css +++ /dev/null @@ -1 +0,0 @@ -.dra-body[data-v-9c62934a]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-9c62934a]{width:25rem;display:flex}.dra-body .header>div[data-v-9c62934a]{flex:1;border:1px solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-9c62934a]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-9c62934a]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-9c62934a]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-9c62934a]{width:100%;height:3rem}.dra-body .card1 .tips[data-v-9c62934a]{width:38rem;height:16rem;background:url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a4971202404051443356430.png);background-size:100% 100%;background-repeat:no-repeat}.cancel-btn[data-v-9c62934a]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-9c62934a]{width:100%;overflow-x:hidden}.counter[data-v-9c62934a]{padding:20px;border-radius:20px;background-color:#f3f9ff}.counter .received[data-v-9c62934a]{height:58px;padding:0 20px;border:1px solid #1890ff;box-shadow:0 0 3px #1890ff;border-radius:8px;background-color:#fff;font-size:26px;line-height:58px;color:#333}.counter .balance[data-v-9c62934a]{width:100%;box-sizing:border-box;padding:18px 0 18px 10px;text-align:start;font-size:15px;color:#303133}.counter .balance .money[data-v-9c62934a]{color:#ff4a00}.counter .keypad[data-v-9c62934a]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:10px}.counter .keypad .left[data-v-9c62934a]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:10px}.counter .keypad .right[data-v-9c62934a]{display:grid;grid-template-columns:auto;grid-gap:10px}.counter .keypad .el-button[data-v-9c62934a]{height:62px;width:130px;margin:0!important;border:0;border-radius:8px;font-weight:500;font-size:28px!important;line-height:62px;color:#1890ff}.counter .keypad .el-button[data-v-9c62934a]:focus{box-shadow:none}.counter .keypad .enter[data-v-9c62934a]{grid-row-end:span 4;height:134px;background-color:#1890ff;font-weight:500;font-size:22px!important;line-height:134px;color:#fff} diff --git a/dist/assets/pay-C2kOlX-6.js b/dist/assets/pay-C2kOlX-6.js new file mode 100644 index 0000000..d01371e --- /dev/null +++ b/dist/assets/pay-C2kOlX-6.js @@ -0,0 +1 @@ +import{A as v,_ as ie,r as n,D as de,o as ve,m as E,a as pe,b as j,j as _e,c as k,d as Q,w as b,e as l,l as U,g as L,t as F,p as fe,h as A,f as x,k as me,F as ge,i as ye,n as V,E as m,s as he,u as ke}from"./index-CxOzLThu.js";function Ge(t){return v.post("user/cart/create",t)}function He(t){return v.get("user/cart/lst",{params:t})}function Je(t,i){return v.post(`user/cart/change/${t}`,i)}function Qe(t){return v.post("v2/order/check",t)}function Xe(t){return v.post("user/cart/delete",t)}function X(t){return v.post("v2/order/create",t)}function be(t,i){return v.post(`order/pay/${t}`,i)}function we(t){return v.get("micropay_query",{params:t})}function Ye(t,i){return v.get(`admin/${t}/order_list`,{params:i})}function Ze(t,i){return v.get(`verifier/${t}/order/${i}`)}function ea(t){return v.get("order_lading",{params:t})}const T=t=>{if(!t)return;let i=new window.SpeechSynthesisUtterance(t);window.speechSynthesis.speak(i)},q=t=>(he("data-v-448c5090"),t=t(),ke(),t),Ce=q(()=>l("h4",null,"选择支付方式",-1)),Ae={class:"dra-body"},xe={class:"header"},Se=q(()=>l("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),$e={style:{color:"#f5222d","padding-bottom":"2rem"}},Le={style:{"font-size":"1.6rem"}},Ve={key:0,"element-loading-text":"支付中",class:"card1"},De=q(()=>l("div",{class:"tips"},null,-1)),Be={key:1,class:"card2"},Ee={class:"drawer-body"},je={class:"counter"},Pe={class:"received"},Fe={key:0},Te={key:1,style:{"font-size":"1rem",color:"#999"}},ze={key:0,class:"balance"},Ie={class:"money"},Ne={key:1,class:"balance"},Oe={class:"keypad"},Ue={class:"left"},qe={class:"right"},Re={style:{width:"100%",display:"flex","justify-content":"center"}},Ke={__name:"pay",emits:["paySuccess"],setup(t,{expose:i,emit:Y}){const g=n(!1),y=n(1),o=n(""),d=n(""),Z=()=>{w()},ee=()=>{V(()=>{setTimeout(()=>{var e;u.value=!1,o.value="",I.value=!0,(e=d.value)==null||e.focus(),S(y.value)},300)})},S=e=>{y.value=e,y.value==2?window.addEventListener("keydown",O):(window.removeEventListener("keydown",O),V(()=>{var a;o.value="",(a=d.value)==null||a.focus()}))},h=n({}),z=n([]),ae=e=>{h.value=e.data,z.value=e.cart_id},se=e=>{h.value.order_price=e.price,p.value=e.order_id},te=Y,I=n(!1),le=n(["1","2","3","4","5","6","7","8","9","0","00","."]);let $=0;const R=/^(10|11|12|13|14|15)\d{16}$/,K=/^(25|26|27|28|29|30)\d{14,22}$/,p=n(""),oe=()=>{if(u.value=!0,d.value.blur(),p.value)M(p.value);else{let e;if(R.test(o.value))e="micropay";else if(K.test(o.value))e="alipayBar";else return u.value=!1,o.value="",d.value.focus(),m.error("请输入正确的支付码");X({address_id:"",key:h.value.key,cart_id:z.value,pay_type:e,auth_code:o.value,source:300}).then(a=>{if(a.status==200&&(a.message=="支付成功"||a.message=="success"))g.value=!1,m({message:a.message=="success"?"支付成功":a.message,type:"success"}),T(a.data.message||a.data.result.message),w();else if(a.data.group_order_sn)p.value=a.data.group_order_id,D.value=0,$=0,P(a.data.group_order_sn);else return p.value=a.data.result.order_id,u.value=!1,m({message:a.message,type:"error"})}).catch(a=>{u.value=!1,V(()=>{var s;(s=d.value)==null||s.focus()})})}},M=e=>{let a;if(y.value==1){let s;if(R.test(o.value))s="micropay";else if(K.test(o.value))s="alipayBar";else return u.value=!1,o.value="",d.value.focus(),m.error("请输入正确的支付码");a={type:s,auth_code:o.value}}else a={type:"cash_payment"};be(e,a).then(s=>{s.status==200&&(s.message=="支付成功"||s.message=="success")?(g.value=!1,m({message:s.message=="success"?"支付成功":s.message,type:"success"}),T(s.data.message||s.data.result.message),w()):(p.value=s.data.group_order_id,D.value=0,$=0,P(s.data.group_order_sn))}).catch(s=>{o.value="",u.value=!1,V(()=>{var C;(C=d.value)==null||C.focus()})})},D=n(0),P=e=>{e&&(D.value++,$+=5e3,we({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(m({message:a.message,type:"success"}),T(a.data.message),w()):(m({message:a.message,type:"error"}),o.value="",u.value=!1,V(()=>{var s;(s=d.value)==null||s.focus()}))}).catch(a=>{I.value&&D.value<3?setTimeout(()=>{P(e)},15e3-$>0?15e3-$:0):(o.value="",u.value=!1,V(()=>{var s;(s=d.value)==null||s.focus()}))}))},w=()=>{var e;window.removeEventListener("keydown",O),I.value=!1,u.value=!1,o.value="",r.value="",_.value=[],(e=d.value)==null||e.blur(),te("paySuccess"),g.value=!1},u=n(!1);i({drawer:g,setForm:ae,setRePay:se,beforeClose:w});const _=n([]),r=n(""),B=de(()=>+r.value>0?(r.value-h.value.order_price).toFixed(2):-1),W=n(!1),N=e=>{e===-1?_.value=[]:_.value.pop(),r.value=_.value.length?_.value.join(""):0},c=e=>{W.value===!1&&(r.value="",W.value=!0);let a=String(r.value).indexOf(".")+1,s=String(r.value).length-a;console.log(a,s),(a===0||s<2)&&(_.value.join("")<=9999999&&_.value.push(e),r.value=_.value.join("")>99999999?99999999:_.value.join(""))},G=()=>{if(B.value===""||B.value===null||B.value===void 0||+r.value<+h.value.order_price)return m.error("收款金额应该大于等于应收金额");p.value?M(p.value):X({address_id:"",key:h.value.key,cart_id:z.value,pay_type:"cash_payment",source:300}).then(e=>{if(e.status==200&&e.message=="支付成功")g.value=!1,m({message:e.message,type:"success"}),T(e.data.message),w();else if(e.data.group_order_sn)p.value=e.data.group_order_id,D.value=0,$=0,P(e.data.group_order_sn);else return p.value=e.data.result.order_id,r.value="",_.value=[],u.value=!1,m({message:e.message,type:"error"})}).catch(e=>{u.value=!1})},O=e=>{let s=(e||window.event).keyCode;if(s==37)return S(2);if(s==120)return E.emit("F9");if(s==27)return w();switch(e.stopPropagation(),e.preventDefault(),s){case 96:case 48:c(0);break;case 97:case 49:c(1);break;case 98:case 50:c(2);break;case 99:case 51:c(3);break;case 100:case 52:c(4);break;case 101:case 53:c(5);break;case 102:case 54:c(6);break;case 103:case 55:c(7);break;case 104:case 56:c(8);break;case 105:case 57:c(9);break;case 110:c(".");break;case 190:c(".");break;case 8:N();break;case 13:G();break}},H=()=>{if(g.value&&y.value==2)return S(1)},J=()=>{if(g.value&&y.value==1)return S(2)};return ve(()=>{E.on("left",H),E.on("right",J)}),pe(()=>{E.off("left",H),E.off("right",J)}),(e,a)=>{const s=j("el-input"),C=j("el-button"),re=j("Delete"),ne=j("el-icon"),ue=j("el-drawer"),ce=_e("loading");return k(),Q(ue,{size:800,modelValue:g.value,"onUpdate:modelValue":a[4]||(a[4]=f=>g.value=f),direction:"rtl",onOpen:ee,"before-close":w},{header:b(()=>[Ce]),default:b(()=>[l("div",Ae,[l("div",xe,[l("div",{class:U(["left",{active:y.value==1}]),onClick:a[0]||(a[0]=f=>S(1))}," 微信/支付宝 ",2),l("div",{class:U(["right",{active:y.value==2}]),onClick:a[1]||(a[1]=f=>S(2))}," 现金收款 ",2)]),Se,l("div",$e,[L(" ¥"),l("span",Le,F(h.value.order_price),1)]),y.value==1?fe((k(),A("div",Ve,[x(s,{ref_key:"codeRef",ref:d,modelValue:o.value,"onUpdate:modelValue":a[2]||(a[2]=f=>o.value=f),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:me(oe,["enter"])},null,8,["modelValue"]),De])),[[ce,u.value]]):(k(),A("div",Be,[l("div",Ee,[l("div",je,[l("div",Pe,[r.value?(k(),A("span",Fe,F(r.value),1)):(k(),A("span",Te,"按下键盘输入客户支付金额"))]),B.value>=0?(k(),A("div",ze,[L(" 需找零(元):"),l("span",Ie,"¥"+F(B.value),1)])):(k(),A("div",Ne,"不够找零, 请支付更多金额")),l("div",Oe,[l("div",Ue,[(k(!0),A(ge,null,ye(le.value,f=>(k(),Q(C,{key:f,onClick:Me=>c(f)},{default:b(()=>[L(F(f),1)]),_:2},1032,["onClick"]))),128))]),l("div",qe,[x(C,{onClick:N},{default:b(()=>[x(ne,null,{default:b(()=>[x(re)]),_:1})]),_:1}),x(C,{onClick:a[3]||(a[3]=f=>N(-1))},{default:b(()=>[L("C")]),_:1}),x(C,{class:U(["enter",{"enter-disable":+r.value<+h.value.order_price}]),disabled:+r.value<+h.value.order_price,onClick:G},{default:b(()=>[L("确认")]),_:1},8,["class","disabled"])])])])])]))])]),footer:b(()=>[l("div",Re,[x(C,{class:"cancel-btn",onClick:Z},{default:b(()=>[L("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},aa=ie(Ke,[["__scopeId","data-v-448c5090"]]);export{He as a,Je as b,Xe as c,Ge as d,Ye as e,ea as f,we as g,Qe as o,aa as p,Ze as v}; diff --git a/dist/assets/pay-C__No5hD.css b/dist/assets/pay-C__No5hD.css new file mode 100644 index 0000000..c540fec --- /dev/null +++ b/dist/assets/pay-C__No5hD.css @@ -0,0 +1 @@ +.dra-body[data-v-448c5090]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-448c5090]{width:25rem;display:flex}.dra-body .header>div[data-v-448c5090]{flex:1;border:1px solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-448c5090]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-448c5090]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-448c5090]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-448c5090]{width:100%;height:3rem}.dra-body .card1 .tips[data-v-448c5090]{width:38rem;height:16rem;background:url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a4971202404051443356430.png);background-size:100% 100%;background-repeat:no-repeat}.cancel-btn[data-v-448c5090]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-448c5090]{width:100%;overflow-x:hidden}.counter[data-v-448c5090]{padding:20px;border-radius:20px;background-color:#f3f9ff}.counter .received[data-v-448c5090]{height:58px;padding:0 20px;border:1px solid #1890ff;box-shadow:0 0 3px #1890ff;border-radius:8px;background-color:#fff;font-size:26px;line-height:58px;color:#333}.counter .balance[data-v-448c5090]{width:100%;box-sizing:border-box;padding:18px 0 18px 10px;text-align:start;font-size:15px;color:#303133}.counter .balance .money[data-v-448c5090]{color:#ff4a00}.counter .keypad[data-v-448c5090]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:10px}.counter .keypad .left[data-v-448c5090]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:10px}.counter .keypad .right[data-v-448c5090]{display:grid;grid-template-columns:auto;grid-gap:10px}.counter .keypad .el-button[data-v-448c5090]{height:62px;width:130px;margin:0!important;border:0;border-radius:8px;font-weight:500;font-size:28px!important;line-height:62px;color:#1890ff}.counter .keypad .el-button[data-v-448c5090]:focus{box-shadow:none}.counter .keypad .enter[data-v-448c5090]{grid-row-end:span 4;height:134px;background-color:#1890ff;font-weight:500;font-size:22px!important;line-height:134px;color:#fff}.counter .keypad .enter-disable[data-v-448c5090]{background-color:#ccc} diff --git a/dist/assets/pay-D-50vyYW.js b/dist/assets/pay-D-50vyYW.js deleted file mode 100644 index fdde2a5..0000000 --- a/dist/assets/pay-D-50vyYW.js +++ /dev/null @@ -1 +0,0 @@ -import{A as v,_ as ie,r,D as de,o as ve,m as E,a as pe,b as j,j as fe,c as y,d as J,w as h,e as o,l as Q,g as L,t as F,p as _e,h as C,f as A,k as me,F as ge,i as ye,n as V,E as k,s as he,u as ke}from"./index-u0hj8LVS.js";function Ge(t){return v.post("user/cart/create",t)}function He(t){return v.get("user/cart/lst",{params:t})}function Je(t,c){return v.post(`user/cart/change/${t}`,c)}function Qe(t){return v.post("v2/order/check",t)}function Xe(t){return v.post("user/cart/delete",t)}function X(t){return v.post("v2/order/create",t)}function be(t,c){return v.post(`order/pay/${t}`,c)}function we(t){return v.get("micropay_query",{params:t})}function Ye(t,c){return v.get(`admin/${t}/order_list`,{params:c})}function Ze(t,c){return v.get(`verifier/${t}/order/${c}`)}function ea(t){return v.get("order_lading",{params:t})}const T=t=>{if(!t)return;let c=new window.SpeechSynthesisUtterance(t);window.speechSynthesis.speak(c)},U=t=>(he("data-v-9c62934a"),t=t(),ke(),t),Ce=U(()=>o("h4",null,"选择支付方式",-1)),Ae={class:"dra-body"},xe={class:"header"},Se=U(()=>o("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),$e={style:{color:"#f5222d","padding-bottom":"2rem"}},Le={style:{"font-size":"1.6rem"}},Ve={key:0,"element-loading-text":"支付中",class:"card1"},De=U(()=>o("div",{class:"tips"},null,-1)),Be={key:1,class:"card2"},Ee={class:"drawer-body"},je={class:"counter"},Pe={class:"received"},Fe={key:0},Te={key:1,style:{"font-size":"1rem",color:"#999"}},ze={key:0,class:"balance"},Ie={class:"money"},Ne={key:1,class:"balance"},Oe={class:"keypad"},Ue={class:"left"},qe={class:"right"},Re={style:{width:"100%",display:"flex","justify-content":"center"}},Ke={__name:"pay",emits:["paySuccess"],setup(t,{expose:c,emit:Y}){const m=r(!1),g=r(1),l=r(""),i=r(""),Z=()=>{b()},ee=()=>{V(()=>{setTimeout(()=>{var e;n.value=!1,l.value="",I.value=!0,(e=i.value)==null||e.focus(),x(g.value)},300)})},x=e=>{g.value=e,g.value==2?window.addEventListener("keydown",O):(window.removeEventListener("keydown",O),V(()=>{var a;l.value="",(a=i.value)==null||a.focus()}))},S=r({}),z=r([]),ae=e=>{S.value=e.data,z.value=e.cart_id},se=e=>{S.value.order_price=e.price,p.value=e.order_id},te=Y,I=r(!1),oe=r(["1","2","3","4","5","6","7","8","9","0","00","."]);let $=0;const q=/^(10|11|12|13|14|15)\d{16}$/,R=/^(25|26|27|28|29|30)\d{14,22}$/,p=r(""),le=()=>{if(n.value=!0,i.value.blur(),p.value)K(p.value);else{let e;if(q.test(l.value))e="micropay";else if(R.test(l.value))e="alipayBar";else return n.value=!1,l.value="",i.value.focus(),k.error("请输入正确的支付码");X({address_id:"",key:S.value.key,cart_id:z.value,pay_type:e,auth_code:l.value,source:300}).then(a=>{if(a.status==200&&(a.message=="支付成功"||a.message=="success"))m.value=!1,k({message:a.message=="success"?"支付成功":a.message,type:"success"}),T(a.data.message||a.data.result.message),b();else if(a.data.group_order_sn)p.value=a.data.group_order_id,D.value=0,$=0,P(a.data.group_order_sn);else return p.value=a.data.result.order_id,n.value=!1,k({message:a.message,type:"error"})}).catch(a=>{n.value=!1,V(()=>{var s;(s=i.value)==null||s.focus()})})}},K=e=>{let a;if(g.value==1){let s;if(q.test(l.value))s="micropay";else if(R.test(l.value))s="alipayBar";else return n.value=!1,l.value="",i.value.focus(),k.error("请输入正确的支付码");a={type:s,auth_code:l.value}}else a={type:"cash_payment"};be(e,a).then(s=>{s.status==200&&(s.message=="支付成功"||s.message=="success")?(m.value=!1,k({message:s.message=="success"?"支付成功":s.message,type:"success"}),T(s.data.message||s.data.result.message),b()):(p.value=s.data.group_order_id,D.value=0,$=0,P(s.data.group_order_sn))}).catch(s=>{l.value="",n.value=!1,V(()=>{var w;(w=i.value)==null||w.focus()})})},D=r(0),P=e=>{e&&(D.value++,$+=5e3,we({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(k({message:a.message,type:"success"}),T(a.data.message),b()):(k({message:a.message,type:"error"}),l.value="",n.value=!1,V(()=>{var s;(s=i.value)==null||s.focus()}))}).catch(a=>{I.value&&D.value<3?setTimeout(()=>{P(e)},15e3-$>0?15e3-$:0):(l.value="",n.value=!1,V(()=>{var s;(s=i.value)==null||s.focus()}))}))},b=()=>{var e;window.removeEventListener("keydown",O),I.value=!1,n.value=!1,l.value="",d.value="",f.value=[],(e=i.value)==null||e.blur(),te("paySuccess"),m.value=!1},n=r(!1);c({drawer:m,setForm:ae,setRePay:se,beforeClose:b});const f=r([]),d=r(""),B=de(()=>+d.value>0?(d.value-S.value.order_price).toFixed(2):-1),M=r(!1),N=e=>{e===-1?f.value=[]:f.value.pop(),d.value=f.value.length?f.value.join(""):0},u=e=>{M.value===!1&&(d.value="",M.value=!0);let a=String(d.value).indexOf(".")+1,s=String(d.value).length-a;console.log(a,s),(a===0||s<2)&&(f.value.join("")<=9999999&&f.value.push(e),d.value=f.value.join("")>99999999?99999999:f.value.join(""))},W=()=>{B.value===""||B.value===null||B.value===void 0||(p.value?K(p.value):X({address_id:"",key:S.value.key,cart_id:z.value,pay_type:"cash_payment",source:300}).then(e=>{if(e.status==200&&e.message=="支付成功")m.value=!1,k({message:e.message,type:"success"}),T(e.data.message),b();else if(e.data.group_order_sn)p.value=e.data.group_order_id,D.value=0,$=0,P(e.data.group_order_sn);else return p.value=e.data.result.order_id,d.value="",f.value=[],n.value=!1,k({message:e.message,type:"error"})}).catch(e=>{n.value=!1}))},O=e=>{let s=(e||window.event).keyCode;if(s==37)return x(2);if(s==120)return E.emit("F9");if(s==27)return b();switch(e.stopPropagation(),e.preventDefault(),s){case 96:case 48:u(0);break;case 97:case 49:u(1);break;case 98:case 50:u(2);break;case 99:case 51:u(3);break;case 100:case 52:u(4);break;case 101:case 53:u(5);break;case 102:case 54:u(6);break;case 103:case 55:u(7);break;case 104:case 56:u(8);break;case 105:case 57:u(9);break;case 110:u(".");break;case 190:u(".");break;case 8:N();break;case 13:W();break}},G=()=>{if(m.value&&g.value==2)return x(1)},H=()=>{if(m.value&&g.value==1)return x(2)};return ve(()=>{E.on("left",G),E.on("right",H)}),pe(()=>{E.off("left",G),E.off("right",H)}),(e,a)=>{const s=j("el-input"),w=j("el-button"),re=j("Delete"),ne=j("el-icon"),ue=j("el-drawer"),ce=fe("loading");return y(),J(ue,{size:800,modelValue:m.value,"onUpdate:modelValue":a[4]||(a[4]=_=>m.value=_),direction:"rtl",onOpen:ee,"before-close":b},{header:h(()=>[Ce]),default:h(()=>[o("div",Ae,[o("div",xe,[o("div",{class:Q(["left",{active:g.value==1}]),onClick:a[0]||(a[0]=_=>x(1))}," 微信/支付宝 ",2),o("div",{class:Q(["right",{active:g.value==2}]),onClick:a[1]||(a[1]=_=>x(2))}," 现金收款 ",2)]),Se,o("div",$e,[L(" ¥"),o("span",Le,F(S.value.order_price),1)]),g.value==1?_e((y(),C("div",Ve,[A(s,{ref_key:"codeRef",ref:i,modelValue:l.value,"onUpdate:modelValue":a[2]||(a[2]=_=>l.value=_),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:me(le,["enter"])},null,8,["modelValue"]),De])),[[ce,n.value]]):(y(),C("div",Be,[o("div",Ee,[o("div",je,[o("div",Pe,[d.value?(y(),C("span",Fe,F(d.value),1)):(y(),C("span",Te,"按下键盘输入客户支付金额"))]),B.value>=0?(y(),C("div",ze,[L(" 需找零(元):"),o("span",Ie,"¥"+F(B.value),1)])):(y(),C("div",Ne,"不够找零, 请支付更多金额")),o("div",Oe,[o("div",Ue,[(y(!0),C(ge,null,ye(oe.value,_=>(y(),J(w,{key:_,onClick:Me=>u(_)},{default:h(()=>[L(F(_),1)]),_:2},1032,["onClick"]))),128))]),o("div",qe,[A(w,{onClick:N},{default:h(()=>[A(ne,null,{default:h(()=>[A(re)]),_:1})]),_:1}),A(w,{onClick:a[3]||(a[3]=_=>N(-1))},{default:h(()=>[L("C")]),_:1}),A(w,{class:"enter",onClick:W},{default:h(()=>[L("确认")]),_:1})])])])])]))])]),footer:h(()=>[o("div",Re,[A(w,{class:"cancel-btn",onClick:Z},{default:h(()=>[L("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},aa=ie(Ke,[["__scopeId","data-v-9c62934a"]]);export{He as a,Je as b,Xe as c,Ge as d,Ye as e,ea as f,we as g,Qe as o,aa as p,Ze as v}; diff --git a/dist/assets/shop-D7k6mBWK.js b/dist/assets/shop-CSB11RIS.js similarity index 75% rename from dist/assets/shop-D7k6mBWK.js rename to dist/assets/shop-CSB11RIS.js index 2420730..7cb2cc1 100644 --- a/dist/assets/shop-D7k6mBWK.js +++ b/dist/assets/shop-CSB11RIS.js @@ -1 +1 @@ -import{A as e}from"./index-u0hj8LVS.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{A as e}from"./index-CxOzLThu.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 5861a44..a088590 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,7 +5,7 @@ 里海收银系统 - + diff --git a/src/components/pay.vue b/src/components/pay.vue index 7bb6900..e2c0442 100644 --- a/src/components/pay.vue +++ b/src/components/pay.vue @@ -294,9 +294,9 @@ const cashBnt = () => { if ( changePrice.value === "" || changePrice.value === null || - changePrice.value === undefined - ) - return; + changePrice.value === undefined || + +collection.value < +form.value.order_price + ) return ElMessage.error("收款金额应该大于等于应收金额"); if (order_id.value) orderPay(order_id.value); else orderCreateApi({ @@ -501,7 +501,7 @@ onUnmounted(() => { > C - 确认 + 确认 @@ -651,6 +651,9 @@ onUnmounted(() => { line-height: 134px; color: #ffffff; } + .enter-disable { + background-color: #ccc; + } } } diff --git a/src/views/convert/component/detail.vue b/src/views/convert/component/detail.vue index d5742b5..bbbd819 100644 --- a/src/views/convert/component/detail.vue +++ b/src/views/convert/component/detail.vue @@ -170,6 +170,7 @@ const getOrderStatus = (id) => {
微信收款 现金支付 + 支付宝收款 余额支付 微信支付 商户余额支付 diff --git a/src/views/convert/component/order.vue b/src/views/convert/component/order.vue index fcfd9f0..edb3708 100644 --- a/src/views/convert/component/order.vue +++ b/src/views/convert/component/order.vue @@ -112,7 +112,7 @@ defineExpose({ style="overflow: auto">
-
单号: {{ item.order_sn }}
+
单号: {{ item.order_sn }}
{{ item.create_time }}
@@ -138,8 +138,9 @@ defineExpose({
已支付 + (支付宝收款) (现金支付) - (微信支付) + (微信收款) (余额支付) (微信支付) (商户余额支付) diff --git a/src/views/home/component/order.vue b/src/views/home/component/order.vue index 7a246e0..c73d8b7 100644 --- a/src/views/home/component/order.vue +++ b/src/views/home/component/order.vue @@ -102,12 +102,17 @@ const ainsert = () => { if(priceRef.value.dialogVisible) priceRef.value.dialogVisible = false; else showPrice(); }; +const adelete = () => { + if(list.value.length > 0) clearAll(); +}; onMounted(() => { mitt.on("insert", ainsert); + mitt.on("delete", adelete); }); onUnmounted(() => { mitt.off("insert", ainsert); + mitt.off("delete", adelete); }); diff --git a/src/views/home/component/price.vue b/src/views/home/component/price.vue index d4aad0d..b9f52af 100644 --- a/src/views/home/component/price.vue +++ b/src/views/home/component/price.vue @@ -73,7 +73,7 @@ onUnmounted(() => { - +
@@ -104,4 +104,18 @@ onUnmounted(() => { display: flex; } } -nextTick, +// 全局css 加上以下代码,可以隐藏上下箭头 + +// 取消input的上下箭头 +input::-webkit-inner-spin-button { + -webkit-appearance: none !important; +} + +input::-webkit-outer-spin-button{ + -webkit-appearance: none !important; +} + +input[type="number"]{ + -moz-appearance: textfield; +} + diff --git a/src/views/order/component/detail.vue b/src/views/order/component/detail.vue index 4bce60d..5c4b49e 100644 --- a/src/views/order/component/detail.vue +++ b/src/views/order/component/detail.vue @@ -170,6 +170,7 @@ const getOrderStatus = (id) => {
微信收款 现金支付 + 支付宝收款 余额支付 微信支付 商户余额支付 diff --git a/src/views/order/component/order.vue b/src/views/order/component/order.vue index d170a2c..479a087 100644 --- a/src/views/order/component/order.vue +++ b/src/views/order/component/order.vue @@ -103,7 +103,7 @@ const setForm = (item, index) => { style="overflow: auto">
-
单号: {{ item.order_sn }}
+
单号: {{ item.order_sn }}
{{ item.create_time }}
@@ -129,8 +129,9 @@ const setForm = (item, index) => {
已支付 + (支付宝收款) (现金支付) - (微信支付) + (微信收款) (余额支付) (微信支付) (商户余额支付)