This commit is contained in:
parent
bd5e80b697
commit
d39f6cd9ab
|
@ -1,4 +1,4 @@
|
|||
VITE_NOW_TYPE = 'dist'
|
||||
|
||||
# VITE_BASE_URL = 'http://192.168.1.16:8324'
|
||||
VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn'
|
||||
VITE_BASE_URL = 'http://192.168.1.21:8324'
|
||||
# VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn'
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
@charset "UTF-8";.my-order[data-v-b99dc933]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-b99dc933]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-b99dc933]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-b99dc933]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-b99dc933]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-b99dc933]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-b99dc933]{height:calc(100vh - 100px - 10.2rem);overflow-y:auto}.my-order .order-list .item[data-v-b99dc933]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-b99dc933]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-b99dc933]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-b99dc933]: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-b99dc933]: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-b99dc933]{font-size:.8rem}.my-order .order-list .item .shop[data-v-b99dc933]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-b99dc933]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-b99dc933]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-b99dc933]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-b99dc933]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-b99dc933]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-b99dc933]{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-b99dc933]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-b99dc933]{background-color:#efefef}.my-order .load-end[data-v-b99dc933]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-b71eab04]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-b71eab04]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-b71eab04]{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-b71eab04]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-b71eab04]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-b71eab04]{border-radius:0 0 0 1rem}.my-order .detail[data-v-b71eab04]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-b71eab04]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-b71eab04]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-b71eab04]{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-b71eab04]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-b71eab04]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-b71eab04]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-b71eab04]{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-b71eab04]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-b71eab04]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-b71eab04]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-b71eab04]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-b71eab04]{border-radius:4rem;padding:1.2rem}
|
|
@ -0,0 +1 @@
|
|||
@charset "UTF-8";.my-order[data-v-de2f4dca]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-de2f4dca]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-de2f4dca]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-de2f4dca]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-de2f4dca]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-de2f4dca]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-de2f4dca]{height:calc(100vh - 100px - 10.2rem);overflow-y:auto}.my-order .order-list .item[data-v-de2f4dca]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-de2f4dca]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-de2f4dca]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-de2f4dca]: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-de2f4dca]: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-de2f4dca]{font-size:.8rem}.my-order .order-list .item .shop[data-v-de2f4dca]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-de2f4dca]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-de2f4dca]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-de2f4dca]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-de2f4dca]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-de2f4dca]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-de2f4dca]{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-de2f4dca]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-de2f4dca]{background-color:#efefef}.my-order .load-end[data-v-de2f4dca]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-b4c5a30d]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-b4c5a30d]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-b4c5a30d]{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-b4c5a30d]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-b4c5a30d]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-b4c5a30d]{border-radius:0 0 0 1rem}.my-order .detail[data-v-b4c5a30d]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-b4c5a30d]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-b4c5a30d]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-b4c5a30d]{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-b4c5a30d]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-b4c5a30d]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-b4c5a30d]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-b4c5a30d]{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-b4c5a30d]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-b4c5a30d]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-b4c5a30d]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-b4c5a30d]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-b4c5a30d]{border-radius:4rem;padding:1.2rem}
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
import{o as r,d as o}from"./detail-Bpwzuymw.js";import{p as t}from"./padding-DyNuAxix.js";import{c as a,h as s,f as e}from"./index-D2m-MYBy.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-2s7oulip.js";import"./pay-CwE3-dJe.js";const c={class:"my-card"},u={__name:"index",setup(d){return(i,l)=>(a(),s("div",c,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{u as default};
|
|
@ -1 +1 @@
|
|||
import{_ as U,u as I,r as u,o as L,b as n,c as R,h as S,e as w,f as e,w as t,p as v,g as b,y as C,z as K,C as B,E as d,K as E,L as N}from"./index-D2m-MYBy.js";const M=l=>(C("data-v-59a7e82c"),l=l(),K(),l),T={class:"body"},z={class:"login"},$=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),j={__name:"index",setup(l){const p=I(),y=B(),h=u(null),_=u(null),s=u({account:"",password:"",key:"",captchaVerification:"",code:""}),i=()=>{if(!s.value.account)return d({message:"请填写账号",type:"error"});if(!s.value.password)return d({message:"请填写密码",type:"error"});E(s.value).then(a=>{console.log(a),a.data&&(p.setToken(a.data.token),N().then(({data:o})=>{if(!o.service)return d({message:"请联系管理员开通服务",type:"error"});p.setUserInfo(o),y.push("/")}))}).catch(a=>{})};return L(()=>{}),(a,o)=>{const g=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),k=n("Lock"),V=n("el-button"),x=n("el-form");return R(),S("div",T,[w("div",z,[$,e(x,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},A=U(j,[["__scopeId","data-v-59a7e82c"]]);export{A as default};
|
||||
import{_ as U,u as I,r as u,o as L,b as n,c as R,h as S,e as w,f as e,w as t,k as v,g as b,v as K,x as B,A as C,E as d,K as E,L as N}from"./index-CEZ1QYTt.js";const M=l=>(K("data-v-59a7e82c"),l=l(),B(),l),T={class:"body"},A={class:"login"},$=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),j={__name:"index",setup(l){const p=I(),y=C(),h=u(null),_=u(null),s=u({account:"",password:"",key:"",captchaVerification:"",code:""}),i=()=>{if(!s.value.account)return d({message:"请填写账号",type:"error"});if(!s.value.password)return d({message:"请填写密码",type:"error"});E(s.value).then(a=>{console.log(a),a.data&&(p.setToken(a.data.token),N().then(({data:o})=>{if(!o.service)return d({message:"请联系管理员开通服务",type:"error"});p.setUserInfo(o),y.push("/")}))}).catch(a=>{})};return L(()=>{}),(a,o)=>{const k=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),g=n("Lock"),x=n("el-button"),V=n("el-form");return R(),S("div",T,[w("div",A,[$,e(V,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(x,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},z=U(j,[["__scopeId","data-v-59a7e82c"]]);export{z as default};
|
|
@ -1 +1 @@
|
|||
import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-D2m-MYBy.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-CEZ1QYTt.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
import{o as r,d as o}from"./detail-RFFCHX7F.js";import{p as t}from"./padding-IWJ9EQ5v.js";import{c as a,h as s,f as e}from"./index-CEZ1QYTt.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import"./pay-DjmOAiUp.js";const c={class:"my-card"},u={__name:"index",setup(d){return(i,l)=>(a(),s("div",c,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{u as default};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
@charset "UTF-8";.my-order[data-v-95b48c3f]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-95b48c3f]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-95b48c3f]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-95b48c3f]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-95b48c3f]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-95b48c3f]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-95b48c3f]{height:calc(100vh - 100px - 10.2rem);overflow-y:auto}.my-order .order-list .item[data-v-95b48c3f]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-95b48c3f]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-95b48c3f]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-95b48c3f]: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-95b48c3f]: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-95b48c3f]{font-size:.8rem}.my-order .order-list .item .shop[data-v-95b48c3f]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-95b48c3f]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-95b48c3f]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-95b48c3f]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-95b48c3f]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-95b48c3f]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-95b48c3f]{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-95b48c3f]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-95b48c3f]{background-color:#efefef}.my-order .load-end[data-v-95b48c3f]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-6ff318a4]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-6ff318a4]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-6ff318a4]{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-6ff318a4]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-6ff318a4]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-6ff318a4]{border-radius:0 0 0 1rem}.my-order .detail[data-v-6ff318a4]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-6ff318a4]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-6ff318a4]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-6ff318a4]{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-6ff318a4]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-6ff318a4]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-6ff318a4]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-6ff318a4]{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-6ff318a4]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-6ff318a4]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-6ff318a4]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-6ff318a4]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-6ff318a4]{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}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{h as x,s as P}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-2s7oulip.js";import{_ as b,u as w,r as o,b as u,l as I,v as S,c as p,h,e,t,x as C,f as i,w as m,g as D,y as F,z as N,C as V}from"./index-D2m-MYBy.js";const a=c=>(F("data-v-891907f0"),c=c(),N(),c),k={"element-loading-text":"加载中",class:"my-order"},B={key:0,class:"from"},L={class:"form-card green"},A=a(()=>e("div",{class:"tips"},"今日线上收银金额",-1)),O={class:"form-card green"},z=a(()=>e("div",{class:"tips"},"昨日线上收银金额",-1)),E={class:"form-card green"},R=a(()=>e("div",{class:"tips"},"本月线上收银金额",-1)),T={class:"form-card"},U=a(()=>e("div",{class:"tips"},"今日收银 线上+现金 总金额",-1)),j={class:"form-card"},q=a(()=>e("div",{class:"tips"},"本月收银 线上+现金 总金额",-1)),G={class:"form-card red"},H=a(()=>e("div",{class:"tips"},"今日现金收银金额",-1)),J={class:"form-card red"},K=a(()=>e("div",{class:"tips"},"昨日现金收银金额",-1)),M={class:"form-card red"},Q=a(()=>e("div",{class:"tips"},"本月现金收银金额",-1)),W={class:"form-card"},X=a(()=>e("div",{class:"tips"},"昨日收银 线上+现金 总金额",-1)),Y={class:"table"},Z={__name:"indexCount",setup(c){const l=w(),_=o([]);V(),o(1),o(null);const y=o({page:1,limit:15,staff_id:l.userInfo.service.service_id}),n=o(!1);o(0),(()=>{x(l.userInfo.service.mer_id,y.value).then(r=>{_.value=r.data})})();const s=o({});return(()=>{n.value=!0,P(l.userInfo.service.mer_id,{staff_id:l.userInfo.service.service_id}).then(r=>{s.value=r.data.data,n.value=!1})})(),(r,se)=>{const d=u("el-table-column"),f=u("el-table"),g=I("loading");return S((p(),h("div",k,[s.value.today?(p(),h("div",B,[e("div",L,[e("div",null,t(s.value.today.payPrice),1),A]),e("div",O,[e("div",null,t(s.value.yesterday.payPrice),1),z]),e("div",E,[e("div",null,t(s.value.month.payPrice),1),R]),e("div",T,[e("div",null,t((s.value.today.cashPayment+s.value.today.payPrice).toFixed(2)),1),U]),e("div",j,[e("div",null,t((s.value.month.cashPayment+s.value.month.payPrice).toFixed(2)),1),q]),e("div",G,[e("div",null,t(s.value.today.cashPayment),1),H]),e("div",J,[e("div",null,t(s.value.yesterday.cashPayment),1),K]),e("div",M,[e("div",null,t(s.value.month.cashPayment),1),Q]),e("div",W,[e("div",null,t((s.value.yesterday.cashPayment+s.value.yesterday.payPrice).toFixed(2)),1),X])])):C("",!0),e("div",Y,[i(f,{data:_.value,style:{width:"100%"}},{default:m(()=>[i(d,{prop:"day",label:"日期",width:"260"}),i(d,{prop:"total",label:"订单数量"}),i(d,{prop:"cash_payment",label:"现金收银金额"}),i(d,{prop:"pay_price",label:"线上收银金额"}),i(d,{label:"总金额"},{default:m(v=>[D(t(((+v.row.pay_price||0)+(+v.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[g,n.value]])}}},oe=b(Z,[["__scopeId","data-v-891907f0"]]);export{oe as default};
|
||||
import{h as x,s as P}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import{_ as b,u as w,r as o,b as u,j as I,q as S,c as p,h,e,t,s as C,f as i,w as m,g as D,v as F,x as N,A as V}from"./index-CEZ1QYTt.js";const a=c=>(F("data-v-891907f0"),c=c(),N(),c),k={"element-loading-text":"加载中",class:"my-order"},A={key:0,class:"from"},B={class:"form-card green"},L=a(()=>e("div",{class:"tips"},"今日线上收银金额",-1)),O={class:"form-card green"},j=a(()=>e("div",{class:"tips"},"昨日线上收银金额",-1)),q={class:"form-card green"},E=a(()=>e("div",{class:"tips"},"本月线上收银金额",-1)),R={class:"form-card"},T=a(()=>e("div",{class:"tips"},"今日收银 线上+现金 总金额",-1)),U={class:"form-card"},z=a(()=>e("div",{class:"tips"},"本月收银 线上+现金 总金额",-1)),G={class:"form-card red"},H=a(()=>e("div",{class:"tips"},"今日现金收银金额",-1)),J={class:"form-card red"},K=a(()=>e("div",{class:"tips"},"昨日现金收银金额",-1)),M={class:"form-card red"},Q=a(()=>e("div",{class:"tips"},"本月现金收银金额",-1)),W={class:"form-card"},X=a(()=>e("div",{class:"tips"},"昨日收银 线上+现金 总金额",-1)),Y={class:"table"},Z={__name:"indexCount",setup(c){const l=w(),_=o([]);V(),o(1),o(null);const y=o({page:1,limit:15,staff_id:l.userInfo.service.service_id}),n=o(!1);o(0),(()=>{x(l.userInfo.service.mer_id,y.value).then(r=>{_.value=r.data})})();const s=o({});return(()=>{n.value=!0,P(l.userInfo.service.mer_id,{staff_id:l.userInfo.service.service_id}).then(r=>{s.value=r.data.data,n.value=!1})})(),(r,se)=>{const d=u("el-table-column"),f=u("el-table"),g=I("loading");return S((p(),h("div",k,[s.value.today?(p(),h("div",A,[e("div",B,[e("div",null,t(s.value.today.payPrice),1),L]),e("div",O,[e("div",null,t(s.value.yesterday.payPrice),1),j]),e("div",q,[e("div",null,t(s.value.month.payPrice),1),E]),e("div",R,[e("div",null,t((s.value.today.cashPayment+s.value.today.payPrice).toFixed(2)),1),T]),e("div",U,[e("div",null,t((s.value.month.cashPayment+s.value.month.payPrice).toFixed(2)),1),z]),e("div",G,[e("div",null,t(s.value.today.cashPayment),1),H]),e("div",J,[e("div",null,t(s.value.yesterday.cashPayment),1),K]),e("div",M,[e("div",null,t(s.value.month.cashPayment),1),Q]),e("div",W,[e("div",null,t((s.value.yesterday.cashPayment+s.value.yesterday.payPrice).toFixed(2)),1),X])])):C("",!0),e("div",Y,[i(f,{data:_.value,style:{width:"100%"}},{default:m(()=>[i(d,{prop:"day",label:"日期",width:"260"}),i(d,{prop:"total",label:"订单数量"}),i(d,{prop:"cash_payment",label:"现金收银金额"}),i(d,{prop:"pay_price",label:"线上收银金额"}),i(d,{label:"总金额"},{default:m(v=>[D(t(((+v.row.pay_price||0)+(+v.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[g,n.value]])}}},oe=b(Z,[["__scopeId","data-v-891907f0"]]);export{oe as default};
|
|
@ -1 +1 @@
|
|||
import{e as F,a as G,g as J,f as K}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-2s7oulip.js";import{_ as Q,u as W,r as s,b as d,l as X,v as Y,c as u,h as m,f as t,w as o,g as r,t as Z,e as P,d as I,C as ee,E as h,y as te,z as ae}from"./index-D2m-MYBy.js";import{p as oe}from"./pay-CwE3-dJe.js";const le=v=>(te("data-v-80048b20"),v=v(),ae(),v),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ue=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ce={class:"dialog-footer"},pe={__name:"indexList",setup(v){const k=W(),C=s([]),b=ee(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),w=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(k.userInfo.service.mer_id,n.value).then(e=>{C.value=e.data.list,w.value=e.data.count,y.value=!1})};i();const x=s(0);(()=>{G({staff_id:k.userInfo.service.service_id}).then(e=>{var a;x.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},z=e=>{J({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),E=()=>{_.value=!1,K({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),U=e=>{L.value=e,_.value=!0},O=()=>{b.push({name:"home"})};return(e,a)=>{const S=d("el-radio-button"),T=d("el-radio-group"),c=d("el-table-column"),p=d("el-button"),H=d("el-table"),M=d("el-pagination"),j=d("el-dialog"),q=X("loading");return Y((u(),m("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(S,{value:1},{default:o(()=>[r("全部")]),_:1}),t(S,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(H,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(c,{prop:"group_order_id",label:"ID",width:"100"}),t(c,{prop:"order_sn",label:"订单号",width:"260"}),t(c,{prop:"total_price",label:"订单金额"}),t(c,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(u(),m("span",ne,"已支付")):(u(),m("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),m("span",ie,Z(l.row.pay_time),1)):(u(),m("div",de,[t(p,{type:"primary",link:"",onClick:V=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>U(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(M,{"page-size":n.value.limit,layout:"prev, pager, next",total:w.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(oe,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(j,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ce,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(u(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(u(),I(p,{key:1,type:"primary",onClick:E},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ue]),_:1},8,["modelValue"])])),[[q,y.value]])}}},fe=Q(pe,[["__scopeId","data-v-80048b20"]]);export{fe as default};
|
||||
import{e as F,a as G,g as J,f as K}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import{_ as Q,u as W,r as s,b as d,j as X,q as Y,c as u,h as m,f as t,w as o,g as r,t as Z,e as P,d as I,A as ee,E as h,v as te,x as ae}from"./index-CEZ1QYTt.js";import{p as oe}from"./pay-DjmOAiUp.js";const le=v=>(te("data-v-80048b20"),v=v(),ae(),v),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ue=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ce={class:"dialog-footer"},pe={__name:"indexList",setup(v){const k=W(),C=s([]),b=ee(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),w=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(k.userInfo.service.mer_id,n.value).then(e=>{C.value=e.data.list,w.value=e.data.count,y.value=!1})};i();const x=s(0);(()=>{G({staff_id:k.userInfo.service.service_id}).then(e=>{var a;x.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},E=e=>{J({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),U=()=>{_.value=!1,K({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),z=e=>{L.value=e,_.value=!0},O=()=>{b.push({name:"home"})};return(e,a)=>{const S=d("el-radio-button"),T=d("el-radio-group"),c=d("el-table-column"),p=d("el-button"),j=d("el-table"),q=d("el-pagination"),H=d("el-dialog"),M=X("loading");return Y((u(),m("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(S,{value:1},{default:o(()=>[r("全部")]),_:1}),t(S,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(c,{prop:"group_order_id",label:"ID",width:"100"}),t(c,{prop:"order_sn",label:"订单号",width:"260"}),t(c,{prop:"total_price",label:"订单金额"}),t(c,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(u(),m("span",ne,"已支付")):(u(),m("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),m("span",ie,Z(l.row.pay_time),1)):(u(),m("div",de,[t(p,{type:"primary",link:"",onClick:V=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>E(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(q,{"page-size":n.value.limit,layout:"prev, pager, next",total:w.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(oe,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(H,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ce,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(u(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(u(),I(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ue]),_:1},8,["modelValue"])])),[[M,y.value]])}}},fe=Q(pe,[["__scopeId","data-v-80048b20"]]);export{fe as default};
|
|
@ -0,0 +1 @@
|
|||
import{o as r,d as t}from"./detail-RFFCHX7F.js";import{p as o}from"./padding-IWJ9EQ5v.js";import{c as s,h as a,f as e}from"./index-CEZ1QYTt.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DhxhOh9t.js";import"./pay-DjmOAiUp.js";const i={class:"my-card"},u={__name:"indexSystem",setup(m){return(c,d)=>(s(),a("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef",isSystem:""},null,512),e(o),e(t,{ref:"detailRef"},null,512)]))}};export{u as default};
|
|
@ -1 +0,0 @@
|
|||
import{o as r,d as t}from"./detail-Bpwzuymw.js";import{p as o}from"./padding-DyNuAxix.js";import{c as s,h as a,f as e}from"./index-D2m-MYBy.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-2s7oulip.js";import"./pay-CwE3-dJe.js";const i={class:"my-card"},u={__name:"indexSystem",setup(m){return(c,d)=>(s(),a("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef",isSystem:""},null,512),e(o),e(t,{ref:"detailRef"},null,512)]))}};export{u as default};
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{_ as e,c as t,h as c}from"./index-D2m-MYBy.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-CEZ1QYTt.js";const n={},o={style:{width:"20px",height:"100%"}};function s(r,_){return t(),c("div",o)}const i=e(n,[["render",s]]);export{i as p};
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{G as e}from"./index-D2m-MYBy.js";function n(r){return e.post("user/cart/create",r)}function s(r){return e.get("user/cart/lst",{params:r})}function o(r,t){return e.post(`user/cart/change/${r}`,t)}function u(r){return e.post("v2/order/check",r)}function c(r){return e.post("user/cart/delete",r)}function p(r){return e.post("v2/order/create",r)}function d(r,t){return e.post(`order/pay/${r}`,t)}function f(r){return e.get("micropay_query",{params:r})}function A(r,t){return e.get(`admin/${r}/order_list`,{params:t})}function g(r,t){return e.get(`verifier/${r}/order/${t}`)}function m(r){return e.get("order_lading",{params:r})}function $(r,t,i){return e.post(`verifier/${r}/${t}`,i)}function v(r,t){return e.get(`admin/${r}/statistics`,{params:t})}function h(r,t){return e.get(`admin/${r}/order_price`,{params:t})}export{s as a,o as b,c,n as d,A as e,m as f,f as g,h,$ as i,p as j,d as k,u as o,v as s,g as v};
|
||||
import{G as e}from"./index-CEZ1QYTt.js";function n(r){return e.post("user/cart/create",r)}function s(r){return e.get("user/cart/lst",{params:r})}function o(r,t){return e.post(`user/cart/change/${r}`,t)}function u(r){return e.post("v2/order/check",r)}function c(r){return e.post("user/cart/delete",r)}function p(r){return e.post("v2/order/create",r)}function d(r,t){return e.post(`order/pay/${r}`,t)}function f(r){return e.get("micropay_query",{params:r})}function A(r,t){return e.get(`admin/${r}/order_list`,{params:t})}function g(r,t){return e.get(`verifier/${r}/order/${t}`)}function m(r){return e.get("order_lading",{params:r})}function $(r,t,i){return e.post(`verifier/${r}/${t}`,i)}function v(r,t){return e.get(`admin/${r}/statistics`,{params:t})}function h(r,t){return e.get(`admin/${r}/order_price`,{params:t})}export{s as a,o as b,c,n as d,A as e,m as f,f as g,h,$ as i,p as j,d as k,u as o,v as s,g as v};
|
|
@ -1 +1 @@
|
|||
import{G as e}from"./index-D2m-MYBy.js";function a(t,r){return e.get(`server/${t}/product/lst`,{params:r})}function p(t,r){return e.get(`store/product/detail/${t}`,{params:r})}function o(t,r){return e.post(`user_free_trial/${t}`,r)}function i(t,r){return e.get(`server/${t}/product/title`,{params:r})}function n(t,r,s){return e.post(`server/${t}/product/status/${r}`,s)}function c(t,r){return e.get(`server/${t}/category/list`,{params:r})}function d(t,r){return e.post(`server/${t}/product/create`,r)}function $(t,r,s){return e.post(`server/${t}/product/update/${r}`,s)}function f(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}export{d as a,$ as b,c,i as d,n as e,p as g,f as p,a as s,o as u};
|
||||
import{G as e}from"./index-CEZ1QYTt.js";function a(t,r){return e.get(`server/${t}/product/lst`,{params:r})}function p(t,r){return e.get(`store/product/detail/${t}`,{params:r})}function o(t,r){return e.post(`user_free_trial/${t}`,r)}function i(t,r){return e.get(`server/${t}/product/title`,{params:r})}function n(t,r,s){return e.post(`server/${t}/product/status/${r}`,s)}function c(t,r){return e.get(`server/${t}/category/list`,{params:r})}function d(t,r){return e.post(`server/${t}/product/create`,r)}function f(t,r,s){return e.post(`server/${t}/product/update/${r}`,s)}function $(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}function l(t,r){return e.get(`server/${t}/product/lst`,{params:r})}export{l as a,d as b,c,f as d,i as e,n as f,p as g,$ as p,a as s,o as u};
|
|
@ -5,8 +5,8 @@
|
|||
<link rel="icon" type="image/svg+xml" href="./cashier.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>里海收银系统</title>
|
||||
<script type="module" crossorigin src="./assets/index-D2m-MYBy.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-jw1reycn.css">
|
||||
<script type="module" crossorigin src="./assets/index-CEZ1QYTt.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-D-6RFZwF.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
|
|
@ -62,3 +62,10 @@ export function productUpdateApi(mer_id, id, data) {
|
|||
export function productDetailApi(mer_id, id, data) {
|
||||
return request.get(`server/${mer_id}/product/detail/${id}`, { params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批发商品列表
|
||||
*/
|
||||
export function saleStoreListApi(id, data) {
|
||||
return request.get(`server/${id}/product/lst`, { params: data })
|
||||
}
|
|
@ -9,7 +9,7 @@ const route = useRoute()
|
|||
const navTo = (name) => {
|
||||
router.push({ name })
|
||||
}
|
||||
const list = ref(['home', 'order', 'orderSystem', 'convert', 'shop', 'orderCount']);
|
||||
const list = ref(['home', 'order', 'orderSystem', 'saleHome', 'saleOrder', 'convert', 'shop', 'orderCount']);
|
||||
const aup = ()=>{
|
||||
let index = list.value.indexOf(route.name);
|
||||
if(index==0) index = list.value.length;
|
||||
|
@ -47,6 +47,14 @@ onUnmounted(() => {
|
|||
<el-icon size="30"><DataAnalysis /></el-icon>
|
||||
<div>平台订单</div>
|
||||
</div>
|
||||
<div class="list-item" :class="{'active': route.name=='saleHome'}" @click="navTo('saleHome')">
|
||||
<el-icon size="30"><Van /></el-icon>
|
||||
<div>批发</div>
|
||||
</div>
|
||||
<div class="list-item" :class="{'active': route.name=='saleOrder'}" @click="navTo('saleOrder')">
|
||||
<el-icon size="30"><Tickets /></el-icon>
|
||||
<div>批发订单</div>
|
||||
</div>
|
||||
<div class="list-item" :class="{'active': route.name=='convert'}" @click="navTo('convert')">
|
||||
<el-icon size="30"><FullScreen /></el-icon>
|
||||
<div>核销</div>
|
||||
|
|
|
@ -29,6 +29,18 @@ const routes = [
|
|||
meta: { title: '平台订单' },
|
||||
component: () => import('@/views/order/indexSystem.vue'),
|
||||
},
|
||||
{
|
||||
path: '/saleHome',
|
||||
name: 'saleHome',
|
||||
meta: { title: '批发' },
|
||||
component: () => import('@/views/saleHome/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/saleOrder',
|
||||
name: 'saleOrder',
|
||||
meta: { title: '批发订单' },
|
||||
component: () => import('@/views/saleOrder/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/orderList',
|
||||
name: 'orderList',
|
||||
|
|
|
@ -69,6 +69,8 @@ const getOrderStatus = (id) => {
|
|||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
mitt.emit("update-order-detail", {});
|
||||
formData.value.paid = 1;
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
|
@ -215,7 +217,7 @@ const getOrderStatus = (id) => {
|
|||
实付: <span>¥{{ formData.pay_price }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="handle" v-if="!formData.pay_time">
|
||||
<div class="handle" v-if="!formData.paid">
|
||||
<el-button class="btn" type="primary" @click="rePay(formData)"
|
||||
>重新支付</el-button
|
||||
>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import {
|
||||
orderListApi,
|
||||
orderStatusApi,
|
||||
|
@ -80,6 +80,13 @@ const setForm = (item, index) => {
|
|||
activeStore.value = index;
|
||||
mitt.emit("set-order-detail", item);
|
||||
};
|
||||
|
||||
onMounted(()=>{
|
||||
mitt.on("update-order-detail", (item) => {
|
||||
console.log('===');
|
||||
orderList.value[activeStore.value].paid = 1;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -0,0 +1,318 @@
|
|||
<script setup>
|
||||
import { ref, onMounted, onUnmounted, nextTick } from "vue";
|
||||
import { cartListApi, cartDeleteApi, cartChangeApi } from "@/api/store.js";
|
||||
import price from "./price.vue";
|
||||
import mitt from "@/utils/mitt.js";
|
||||
import { useUserStore } from "@/store/user.js"
|
||||
|
||||
const list = ref([]);
|
||||
const allPrice = ref(0); //商品总价
|
||||
const costPrice = ref(0); //商品原价
|
||||
const discounts = ref(0); //优惠金额
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
const clearAll = () => {
|
||||
let cart_id = [];
|
||||
list.value.map((item) => {
|
||||
cart_id.push(item.cart_id);
|
||||
});
|
||||
if (cart_id.length == 0) return;
|
||||
deleteShop(cart_id);
|
||||
};
|
||||
|
||||
const deleteOne = (cart_id) => {
|
||||
list.value = list.value.filter((item) => item.cart_id != cart_id);
|
||||
deleteShop([cart_id]);
|
||||
};
|
||||
|
||||
const deleteShop = (arr) => {
|
||||
cartDeleteApi({
|
||||
cart_id: arr,
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
getList();
|
||||
});
|
||||
};
|
||||
|
||||
const getList = () => {
|
||||
allPrice.value = 0;
|
||||
costPrice.value = 0;
|
||||
discounts.value = 0;
|
||||
cartListApi({
|
||||
staff_id: userStore.userInfo.service.service_id,
|
||||
}).then((res) => {
|
||||
if (res.data?.list?.length > 0) {
|
||||
list.value = res.data.list[0].list;
|
||||
list.value.forEach((item) => {
|
||||
allPrice.value += item.productAttr.price * item.cart_num;
|
||||
});
|
||||
costPrice.value = allPrice.value;
|
||||
} else list.value = [];
|
||||
});
|
||||
};
|
||||
getList();
|
||||
|
||||
const emit = defineEmits(["goPay","editAttr"]);
|
||||
|
||||
const goPay = () => {
|
||||
emit("goPay");
|
||||
};
|
||||
|
||||
const changeCartNum = (val, old) => {
|
||||
cartChangeApi(val.cart_id, {
|
||||
cart_num: val.cart_num,
|
||||
}).then((res) => {
|
||||
allPrice.value = 0;
|
||||
list.value.forEach((item) => {
|
||||
allPrice.value += item.productAttr.price * item.cart_num;
|
||||
});
|
||||
costPrice.value = allPrice.value;
|
||||
});
|
||||
};
|
||||
|
||||
const editAttr = (data)=>{
|
||||
emit("editPupop", data);
|
||||
}
|
||||
|
||||
const editItem = (id, data)=>{
|
||||
cartChangeApi(id, data).then((res) => {
|
||||
getList()
|
||||
});
|
||||
}
|
||||
|
||||
const changeAllPrice = (price)=>{
|
||||
discounts.value = costPrice.value - price;
|
||||
allPrice.value = +price;
|
||||
nextTick(()=>{
|
||||
setTimeout(()=>{
|
||||
showPrice(false)
|
||||
}, 150)
|
||||
})
|
||||
}
|
||||
|
||||
const nowPrice = ref(0);
|
||||
const priceRef = ref(null);
|
||||
const showPrice = (type=true)=>{
|
||||
priceRef.value.show(type, costPrice.value);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getList,
|
||||
list,
|
||||
editItem,
|
||||
discounts,
|
||||
allPrice
|
||||
});
|
||||
|
||||
// 键盘事件
|
||||
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);
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-order">
|
||||
<div class="header-nav">
|
||||
<div class="nav-item">
|
||||
已选购 <span>{{ list.length }}</span> 件
|
||||
</div>
|
||||
<div class="nav-item-clear" @click="clearAll">
|
||||
<el-icon><Delete /></el-icon>清空 (Delete)
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-list">
|
||||
<el-empty v-if="list.length == 0" description="请点击右侧添加商品" />
|
||||
<div v-else class="order-item" v-for="(item, index) in list" :key="index">
|
||||
<el-image loading="lazy"
|
||||
class="order-item-img"
|
||||
:src="
|
||||
(item.productAttr && item.productAttr.image) || item.product.image
|
||||
"
|
||||
></el-image>
|
||||
<div class="order-item-info">
|
||||
<div class="order-item-title">
|
||||
<div class="title">{{ item.spu.store_name }}</div>
|
||||
<div class="delete" @click="deleteOne(item.cart_id)">删除</div>
|
||||
</div>
|
||||
<div class="order-item-sku">
|
||||
<span style="display: flex;align-items: center;" @click="editAttr(item)">商品规格: {{ item.productAttr.sku || '默认规格' }}<el-icon size="16" style="margin-left: 0.2rem;"><ArrowDown /></el-icon></span>
|
||||
</div>
|
||||
<div class="order-item-price">
|
||||
<div>
|
||||
¥<span>{{ item.productAttr.price }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-input-number
|
||||
v-model="item.cart_num"
|
||||
step-strictly
|
||||
:min="1"
|
||||
:step="1"
|
||||
@change="changeCartNum(item)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-footer">
|
||||
<div class="order-total">
|
||||
<div class="price">
|
||||
<div class="total-item">
|
||||
实付:
|
||||
<span
|
||||
>¥<span style="font-size: 1.4rem">{{
|
||||
allPrice.toFixed(2)
|
||||
}}</span></span
|
||||
>
|
||||
</div>
|
||||
<div class="total-item">
|
||||
优惠:
|
||||
<span
|
||||
>¥<span>{{ discounts.toFixed(2) }}</span></span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="update-price">
|
||||
<el-button class="btn" type="primary" @click="showPrice">改价 (Insert)</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-btn">
|
||||
<el-button class="btn" type="primary" @click="goPay" :disabled="list.length == 0"
|
||||
>立即结账 (F9)</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<price ref="priceRef" @changeAllPrice="changeAllPrice"></price>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.my-order {
|
||||
border-radius: 1.2rem;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
width: 30rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.header-nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 1rem;
|
||||
height: 1.5rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
span {
|
||||
color: #ff4a00;
|
||||
}
|
||||
.nav-item-clear {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 0.8rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.order-list {
|
||||
height: calc(100vh - 100px - 14rem);
|
||||
overflow-y: auto;
|
||||
.order-item {
|
||||
display: flex;
|
||||
padding: 1rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
.order-item-img {
|
||||
width: 5rem;
|
||||
height: 5rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
.order-item-info {
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
padding-left: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
& > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.order-item-title {
|
||||
.title {
|
||||
width: 18rem;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.delete {
|
||||
color: #1890ff;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.order-item-sku {
|
||||
cursor: pointer;
|
||||
font-size: 0.8rem;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.order-footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
box-shadow: 0 -1px 10px #eee;
|
||||
|
||||
.order-total {
|
||||
height: 2.5rem;
|
||||
padding: 1rem 2rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #eee;
|
||||
align-items: center;
|
||||
.price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.total-item {
|
||||
padding-right: 1.5rem;
|
||||
span {
|
||||
color: #f5222d;
|
||||
}
|
||||
}
|
||||
}
|
||||
.update-price {
|
||||
.btn {
|
||||
border-radius: 3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.order-btn {
|
||||
height: 3.2rem;
|
||||
padding: 1rem 1.5rem;
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 1.2rem;
|
||||
border-radius: 3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,123 @@
|
|||
<script setup>
|
||||
import { ref, nextTick, onMounted, onUnmounted } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import mitt from "@/utils/mitt.js";
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
|
||||
const priceRef = ref(null);
|
||||
const allPrice = ref(0);
|
||||
const show = (e=true, p = 0) => {
|
||||
priceInfo.value.nowPrice = "";
|
||||
priceInfo.value.percentage = "";
|
||||
dialogVisible.value = e;
|
||||
allPrice.value = p;
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
priceRef.value?.focus();
|
||||
}, 150);
|
||||
});
|
||||
};
|
||||
|
||||
const priceInfo = ref({
|
||||
nowPrice: "",
|
||||
percentage: "",
|
||||
});
|
||||
|
||||
const inputPrice = (e) => {
|
||||
priceInfo.value.percentage = ((e / allPrice.value) * 100).toFixed(2);
|
||||
};
|
||||
const inputPercentage = (e) => {
|
||||
priceInfo.value.nowPrice = ((allPrice.value * e) / 100).toFixed(2);
|
||||
};
|
||||
|
||||
const emit = defineEmits(["changeAllPrice"]);
|
||||
const submitPrice = () => {
|
||||
if (priceInfo.value.percentage > 100) {
|
||||
priceInfo.value.nowPrice = "";
|
||||
priceInfo.value.percentage = "";
|
||||
return ElMessage.error("改价金额不能大于当前订单金额");
|
||||
}
|
||||
if (priceInfo.value.nowPrice <= 0) {
|
||||
priceInfo.value.nowPrice = "";
|
||||
priceInfo.value.percentage = "";
|
||||
return ElMessage.error("金额不能小于0");
|
||||
}
|
||||
emit("changeAllPrice", priceInfo.value.nowPrice);
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
dialogVisible,
|
||||
});
|
||||
|
||||
// 键盘事件
|
||||
const aenter = () => {
|
||||
if (dialogVisible.value) submitPrice();
|
||||
};
|
||||
onMounted(() => {
|
||||
mitt.on("enter", aenter);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
mitt.off("enter", aenter);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" title="订单改价" width="650">
|
||||
<div class="price">
|
||||
<div class="flex">
|
||||
<el-input
|
||||
ref="priceRef"
|
||||
style="flex: 3; margin: 10px; height: 2.5rem"
|
||||
v-model="priceInfo.nowPrice"
|
||||
type="number"
|
||||
placeholder="请输入改价后的价格"
|
||||
@input="inputPrice"
|
||||
>
|
||||
<template #suffix>元</template>
|
||||
</el-input>
|
||||
<el-input
|
||||
style="flex: 2; margin: 10px; height: 2.5rem"
|
||||
v-model="priceInfo.percentage"
|
||||
type="number"
|
||||
placeholder="请输入比例"
|
||||
@input="inputPercentage"
|
||||
>
|
||||
<template #suffix>%</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="margin: 10px; padding-bottom: 40px">
|
||||
改价后金额:
|
||||
<span style="color: #f5222d; font-weight: bold; margin-left: 1rem"
|
||||
>¥{{ priceInfo.nowPrice || allPrice || " - - " }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button class="ok-btn" type="primary" @click="submitPrice">
|
||||
确定 (Enter)
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-footer {
|
||||
.ok-btn {
|
||||
width: 100%;
|
||||
height: 2.5rem;
|
||||
border-radius: 2.5rem;
|
||||
}
|
||||
}
|
||||
.price {
|
||||
border-top: 1px solid #eee;
|
||||
padding-top: 1rem;
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,195 @@
|
|||
<script setup>
|
||||
import { ref, onMounted, onUnmounted } from 'vue'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { getAttrValue } from "@/api/shop.js"
|
||||
import mitt from "@/utils/mitt.js";
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
const show = (e)=>{
|
||||
dialogVisible.value = e;
|
||||
}
|
||||
|
||||
const form = ref({});
|
||||
const active = ref(null);
|
||||
const loading = ref(false);
|
||||
const mode = ref('add');
|
||||
const editForm = ref({});
|
||||
const setForm = (data, type='add')=>{
|
||||
mode.value = type;
|
||||
if(type == 'add'){
|
||||
form.value = data;
|
||||
active.value = data.attr[0];
|
||||
}
|
||||
else {
|
||||
loading.value = true;
|
||||
editForm.value = data;
|
||||
getAttrValue(data.product_id).then(res=>{
|
||||
res.data.attrValue = JSON.parse(JSON.stringify(res.data.attr))
|
||||
res.data.attr = Object.keys(res.data.sku)
|
||||
form.value = res.data;
|
||||
active.value = res.data.attr[0];
|
||||
loading.value = false;
|
||||
}).catch(err=>{
|
||||
loading.value = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const emit = defineEmits(['changeItem'])
|
||||
|
||||
const changeItem = ()=>{
|
||||
if(mode.value == 'add') emit('changeItem', form.value, active.value);
|
||||
else emit('editItem', editForm.value.cart_id, {
|
||||
cart_num: editForm.value.cart_num,
|
||||
product_attr_unique: form.value.sku[active.value].unique,
|
||||
});
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
const changeActive = (item)=>{
|
||||
active.value = item;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
setForm
|
||||
})
|
||||
|
||||
// 键盘事件
|
||||
const aleft = () => {
|
||||
if(!dialogVisible.value) return;
|
||||
let index = form.value.attr.indexOf(active.value);
|
||||
if(index>0) return changeActive(form.value.attr[index-1]);
|
||||
};
|
||||
const aright = () => {
|
||||
if(!dialogVisible.value) return;
|
||||
let index = form.value.attr.indexOf(active.value);
|
||||
if(index<form.value.attr.length-1) return changeActive(form.value.attr[index+1]);
|
||||
};
|
||||
const aenter = ()=>{
|
||||
if(!dialogVisible.value) return;
|
||||
changeItem();
|
||||
}
|
||||
onMounted(() => {
|
||||
mitt.on("left", aleft);
|
||||
mitt.on("right", aright);
|
||||
mitt.on("enter", aenter);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
mitt.off("left", aleft);
|
||||
mitt.off("right", aright);
|
||||
mitt.off("enter", aenter);
|
||||
});
|
||||
|
||||
const close = ()=>{
|
||||
console.log('sss');
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="商品规格"
|
||||
width="650"
|
||||
>
|
||||
<div class="shop" v-loading="loading">
|
||||
<div class="shop-info" v-if="form.sku">
|
||||
<div class="shop-info-left">
|
||||
<el-image loading="lazy" :src="form.sku[active]?.image || form.image"></el-image>
|
||||
</div>
|
||||
<div class="shop-info-right">
|
||||
<div class="shop-info-right-top">{{ form.store_name }}</div>
|
||||
<div class="shop-info-right-center">库存{{ form.sku[active]?.stock || 0 }}</div>
|
||||
<div class="shop-info-right-price">¥<span>{{form.sku[active]?.price || form.price}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shop-sku">
|
||||
<div class="title">产品</div>
|
||||
<div class="sku">
|
||||
<el-space wrap :size="20">
|
||||
<div class="sku-item " :class="{'sku-item_active': active==item}" @click="changeActive(item)" v-for="(item, index) in form.attr" :key="index">{{ item || '默认规格' }}</div>
|
||||
</el-space>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer v-if="!(mode != 'add' && form.attr && form.attr.length==1)">
|
||||
<div class="dialog-footer">
|
||||
<el-button class="ok-btn" type="primary" @click="changeItem">
|
||||
确定 (Enter)
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-footer{
|
||||
.ok-btn{
|
||||
width: 100%;
|
||||
height: 2.5rem;
|
||||
border-radius: 2.5rem;
|
||||
}
|
||||
}
|
||||
.shop{
|
||||
border-top: 1px solid #eee;
|
||||
padding-top: 1rem;
|
||||
.shop-info{
|
||||
display: flex;
|
||||
.shop-info-left{
|
||||
flex-shrink: 0;
|
||||
margin-right: 0.8rem;
|
||||
height: 8rem;
|
||||
width: 8rem;
|
||||
overflow: hidden;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
.shop-info-right{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.shop-info-right-top{
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2; /* 限制文本显示为两行 */
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
.shop-info-right-center{
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
.shop-info-right-price{
|
||||
color: #ff4a00;
|
||||
font-size: 1.2rem;
|
||||
font-weight: bold;
|
||||
span{
|
||||
font-size: 1.4rem;
|
||||
margin-left: 0.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.shop-sku{
|
||||
min-height: 20rem;
|
||||
.title{
|
||||
font-size: 1.1rem;
|
||||
font-weight: bold;
|
||||
padding: 1rem 0 0.5rem 0;
|
||||
}
|
||||
.sku{
|
||||
.sku-item{
|
||||
cursor: pointer;
|
||||
padding: 0.5rem 1rem;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 3rem;
|
||||
&_active{
|
||||
background-color: #1890ff;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,254 @@
|
|||
<script setup>
|
||||
import { ref, watch, onMounted, onUnmounted, nextTick } from "vue";
|
||||
import mitt from "@/utils/mitt.js";
|
||||
import _ from 'lodash';
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const props = defineProps({
|
||||
storeList: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const codeRef = ref(null);
|
||||
|
||||
const emit = defineEmits(["getStoreList", "changeItem", "loadMore"]);
|
||||
|
||||
const bar_code = ref("");
|
||||
|
||||
const loadMore = () => {
|
||||
emit("loadMore", {
|
||||
bar_code: bar_code.value,
|
||||
});
|
||||
};
|
||||
|
||||
const changeItem = (item) => {
|
||||
if(item.is_used==0) return ElMessage.error("该商品已被平台关闭");
|
||||
if(item.stock==0) return ElMessage.warning("该商品无库存");
|
||||
emit("changeItem", item);
|
||||
};
|
||||
|
||||
const handleEnter = _.throttle(() => {
|
||||
emit("getStoreList", {
|
||||
bar_code: bar_code.value,
|
||||
}, true);
|
||||
}, 300)
|
||||
|
||||
defineExpose({
|
||||
bar_code,
|
||||
});
|
||||
|
||||
const isfocus = ref(false);
|
||||
const focus = () => {
|
||||
isfocus.value = true;
|
||||
};
|
||||
const blur = () => {
|
||||
isfocus.value = false;
|
||||
};
|
||||
|
||||
// 键盘事件
|
||||
const ashift = () => {
|
||||
codeRef.value?.focus();
|
||||
};
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
codeRef.value?.focus();
|
||||
focus();
|
||||
});
|
||||
mitt.on("shift", ashift);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
mitt.off("shift", ashift);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-order">
|
||||
<div class="header-nav" :class="{ 'input-focus': isfocus }">
|
||||
<div class="nav-item-label">搜索 (Shift)</div>
|
||||
<div class="nav-item-input">
|
||||
<el-input
|
||||
v-model="bar_code"
|
||||
placeholder=" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索"
|
||||
clearable
|
||||
ref="codeRef"
|
||||
@focus="focus"
|
||||
@blur="blur"
|
||||
@keyup.enter="handleEnter"
|
||||
@clear="handleEnter"
|
||||
/>
|
||||
</div>
|
||||
<div class="nav-item-btn" @click="handleEnter">
|
||||
<el-button class="btn" type="primary"
|
||||
><el-icon><Search /></el-icon
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="shop-list"
|
||||
v-infinite-scroll="loadMore"
|
||||
infinite-scroll-distance="100"
|
||||
infinite-scroll-delay="500"
|
||||
:infinite-scroll-immediate="false"
|
||||
style="overflow: auto"
|
||||
>
|
||||
<el-space wrap :size="20">
|
||||
<div
|
||||
class="shop-item"
|
||||
v-for="(item, index) in storeList"
|
||||
:key="index"
|
||||
@click="changeItem(item)"
|
||||
>
|
||||
<el-image loading="lazy" :src="item.image"></el-image>
|
||||
<div class="shop-name">{{ item.store_name }}</div>
|
||||
<div class="shop-price">
|
||||
¥<span>{{ item.price }}</span>
|
||||
</div>
|
||||
<div class="no-stock" v-if="item.stock == 0">
|
||||
<div>
|
||||
<span>暂无</span>
|
||||
<span>库存</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="no-stock" v-if="item.is_used == 0">
|
||||
<div>
|
||||
<span>平台</span>
|
||||
<span>关闭</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-space>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.my-order {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.header-nav {
|
||||
border-radius: 0.8rem;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
border: 1px solid rgba($color: #000000, $alpha: 0);
|
||||
|
||||
.nav-item-label {
|
||||
width: 7rem;
|
||||
height: 3rem;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
line-height: 3rem;
|
||||
}
|
||||
.nav-item-input {
|
||||
flex: 1;
|
||||
.el-input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
::v-deep .el-input__wrapper {
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.nav-item-btn {
|
||||
width: 5rem;
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.input-focus {
|
||||
border: 1px solid #1890ff;
|
||||
}
|
||||
|
||||
.shop-list {
|
||||
height: calc(100vh - 100px - 3.1rem);
|
||||
width: auto;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
padding-top: 20px;
|
||||
|
||||
.shop-item {
|
||||
width: 11rem;
|
||||
height: 16rem;
|
||||
cursor: pointer;
|
||||
background-color: #fff;
|
||||
border-radius: 1rem;
|
||||
padding: 0.5rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.el-image {
|
||||
border-radius: 0.5rem;
|
||||
width: 11rem;
|
||||
height: 11rem;
|
||||
}
|
||||
|
||||
.shop-name {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 2; /* 将文本限制为两行 */
|
||||
}
|
||||
|
||||
.shop-price {
|
||||
font-size: 0.8rem;
|
||||
color: #f5222d;
|
||||
span {
|
||||
font-size: 1.2rem;
|
||||
margin-left: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #1890ff;
|
||||
color: #fff;
|
||||
.shop-price {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.no-stock {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba($color: #000000, $alpha: 0.2);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
div {
|
||||
background-color: #4e4e4e;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
width: 5rem;
|
||||
height: 5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
, nextTick
|
|
@ -0,0 +1,198 @@
|
|||
<script setup>
|
||||
import order from "./component/order.vue";
|
||||
import shop from "./component/shop.vue";
|
||||
import padding from "@/components/padding.vue";
|
||||
import pupop from "./component/pupop.vue";
|
||||
import pay from "@/components/pay.vue";
|
||||
import { ref, nextTick, onMounted, onUnmounted } from "vue";
|
||||
import { cartCreateApi, orderCheckApi } from "@/api/store.js";
|
||||
import { saleStoreListApi } from "@/api/shop.js";
|
||||
import { useUserStore } from "@/store/user.js";
|
||||
import { useRoute } from "vue-router";
|
||||
import mitt from "@/utils/mitt.js";
|
||||
|
||||
const pupopRef = ref(null);
|
||||
const orderRef = ref(null);
|
||||
const shopRef = ref(null);
|
||||
const payRef = ref(null);
|
||||
|
||||
const storeList = ref([]);
|
||||
|
||||
const userStore = useUserStore();
|
||||
const route = useRoute();
|
||||
|
||||
const where = ref({
|
||||
page: 0,
|
||||
limit: 30,
|
||||
});
|
||||
const getStoreList = (data={}, reload=false) => {
|
||||
where.value = {
|
||||
staff_id: userStore.userInfo.service.service_id,
|
||||
sale_type: 2,
|
||||
...where.value,
|
||||
...data,
|
||||
};
|
||||
if (reload) {
|
||||
storeList.value = [];
|
||||
where.value.page = 1;
|
||||
loadEnd.value = false;
|
||||
}
|
||||
saleStoreListApi(userStore.userInfo.service.mer_id, where.value).then((res) => {
|
||||
if (res.data?.list?.length < where.value.limit) loadEnd.value = true;
|
||||
let list = res.data.list.map((item) => {
|
||||
item.attr = Object.keys(item.sku);
|
||||
return item;
|
||||
});
|
||||
storeList.value = storeList.value.concat(list);
|
||||
if (
|
||||
data.bar_code &&
|
||||
storeList.value.length == 1 &&
|
||||
isAllDigits(data.bar_code)
|
||||
) {
|
||||
shopRef.value.bar_code = "";
|
||||
changeItem(storeList.value[0], storeList.value[0].attr[0]);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
const loadEnd = ref(false);
|
||||
const loadMore = (data) => {
|
||||
if (loadEnd.value) return;
|
||||
where.value.page++;
|
||||
getStoreList(data);
|
||||
};
|
||||
|
||||
function isAllDigits(str) {
|
||||
return /^\d+$/.test(str);
|
||||
}
|
||||
|
||||
const cartAddInfo = (item, change = "") => {
|
||||
// console.log(item, change);
|
||||
let q = {
|
||||
is_new: 0,
|
||||
product_id: item.product_id,
|
||||
cart_num: 1,
|
||||
product_attr_unique:
|
||||
item.sku[change] !== undefined ? item.sku[change].unique : "",
|
||||
staff_id: userStore.userInfo.service.service_id,
|
||||
product_type: 0,
|
||||
// spread_id: this.currSpid,
|
||||
// sale_type: 1
|
||||
};
|
||||
cartCreateApi(q).then((res) => {
|
||||
orderRef.value.getList();
|
||||
});
|
||||
};
|
||||
|
||||
const changeItem = (item, change) => {
|
||||
if (!item.attr || item.attr.length == 0 || item.attr.length == 1)
|
||||
return cartAddInfo(item, item.attr[0] ? item.attr[0] : "");
|
||||
else if (change) return cartAddInfo(item, change);
|
||||
else {
|
||||
pupopRef.value.setForm(item, "add");
|
||||
pupopRef.value.show(true);
|
||||
}
|
||||
};
|
||||
|
||||
const editItem = (id, data) => {
|
||||
orderRef.value.editItem(id, data);
|
||||
};
|
||||
|
||||
const editPupop = (item) => {
|
||||
pupopRef.value.setForm(item, "edit");
|
||||
pupopRef.value.show(true);
|
||||
};
|
||||
|
||||
// 结算
|
||||
const checkOut = () => {
|
||||
let cart_id = orderRef.value.list.map((item) => item.cart_id);
|
||||
let query = {
|
||||
takes: [],
|
||||
use_coupon: {},
|
||||
use_integral: false,
|
||||
cart_id: cart_id,
|
||||
};
|
||||
if (orderRef.value.discounts > 0) {
|
||||
query.deduction_price = orderRef.value.discounts.toFixed(2);
|
||||
query.pay_type = "micropay";
|
||||
}
|
||||
orderCheckApi(query).then((res) => {
|
||||
payRef.value.setForm({
|
||||
data: res.data,
|
||||
cart_id: cart_id,
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
const goPay = () => {
|
||||
checkOut();
|
||||
payRef.value.drawer = true;
|
||||
};
|
||||
|
||||
const paySuccess = () => {
|
||||
orderRef.value.getList();
|
||||
};
|
||||
|
||||
// 键盘事件
|
||||
const aF9 = () => {
|
||||
if (route.name != "saleHome") return;
|
||||
if (!payRef.value.drawer && orderRef.value.list.length > 0) goPay();
|
||||
else payRef.value.beforeClose();
|
||||
};
|
||||
onMounted(() => {
|
||||
getStoreList();
|
||||
where.value.page++;
|
||||
mitt.on("F9", aF9);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
mitt.off("F9", aF9);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-card">
|
||||
<order ref="orderRef" @goPay="goPay" @editPupop="editPupop" />
|
||||
<padding />
|
||||
<shop
|
||||
ref="shopRef"
|
||||
style="flex: 1"
|
||||
:storeList="storeList"
|
||||
@getStoreList="getStoreList"
|
||||
@changeItem="changeItem"
|
||||
@loadMore="loadMore"
|
||||
/>
|
||||
<pupop ref="pupopRef" @changeItem="changeItem" @editItem="editItem" />
|
||||
<pay ref="payRef" @paySuccess="paySuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.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; /* 设置鼠标悬停时滑块的背景色 */
|
||||
}
|
||||
</style>
|
||||
, onMounted, onUnmounted
|
|
@ -0,0 +1,375 @@
|
|||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import {
|
||||
orderListApi,
|
||||
orderStatusApi,
|
||||
orderLadingApi,
|
||||
cartListApi,
|
||||
} from "@/api/store.js";
|
||||
import { useUserStore } from "@/store/user.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import mitt from "@/utils/mitt.js";
|
||||
import pay from "@/components/pay.vue";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
|
||||
const formData = ref({});
|
||||
mitt.on("set-order-detail", (res) => {
|
||||
formData.value = res;
|
||||
});
|
||||
|
||||
const list = ref([]);
|
||||
|
||||
const payRef = ref(null);
|
||||
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const activeStore = ref(0);
|
||||
const activeStoreList = ref(["商品信息", "订单详情"]);
|
||||
|
||||
const orderLadingSn = ref("");
|
||||
const dialogVisible = ref(false);
|
||||
const orderLadingComfirm = (order_sn) => {
|
||||
orderLadingSn.value = order_sn;
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
const orderLading = () => {
|
||||
dialogVisible.value = false;
|
||||
orderLadingApi({
|
||||
order_sn: orderLadingSn.value,
|
||||
staff_id: userStore.userInfo.service.service_id
|
||||
}).then((res) => {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
router.push({
|
||||
name: "home",
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const rePay = (row) => {
|
||||
payRef.value.setRePay({
|
||||
price: row.pay_price,
|
||||
order_id: row.group_order_id,
|
||||
});
|
||||
payRef.value.drawer = true;
|
||||
};
|
||||
|
||||
const getOrderStatus = (id) => {
|
||||
orderStatusApi({
|
||||
order_sn: id,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.paid == 1 || res.message == "支付成功") {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
mitt.emit("update-order-detail", {});
|
||||
formData.value.paid = 1;
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-order">
|
||||
<div class="header-nav">
|
||||
<div
|
||||
v-for="(item, index) in activeStoreList"
|
||||
:key="index"
|
||||
class="nav-item"
|
||||
:class="{
|
||||
'nav-item-active': activeStore == index,
|
||||
'nav-item-radius1': activeStore == index + 1,
|
||||
'nav-item-radius2': activeStore == index - 1,
|
||||
}"
|
||||
@click="activeStore = index"
|
||||
>
|
||||
{{ item }}
|
||||
</div>
|
||||
<div
|
||||
class="nav-item"
|
||||
:class="{
|
||||
'nav-item-radius2': activeStore == activeStoreList.length - 1,
|
||||
}"
|
||||
style="flex: 1"
|
||||
></div>
|
||||
</div>
|
||||
<div class="detail" v-loading="loading">
|
||||
<div class="table" v-if="formData.orderProduct && activeStore == 0">
|
||||
<div style="font-size: 0.9rem">
|
||||
共计
|
||||
<span style="color: #ff4a00">{{ formData.total_num }}</span> 件商品
|
||||
</div>
|
||||
<el-table
|
||||
style="height: calc(100vh - 100px - 14rem)"
|
||||
:data="formData.orderProduct"
|
||||
>
|
||||
<el-table-column prop="cart_info.product.store_name" label="商品信息">
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-image
|
||||
style="height: 3rem; width: 3rem"
|
||||
:src="
|
||||
row.cart_info.productAttr.image ||
|
||||
row.cart_info.product.image
|
||||
"
|
||||
></el-image>
|
||||
<span style="margin-left: 0.5rem">{{
|
||||
row.cart_info.product.store_name
|
||||
}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cart_info.productAttr.price"
|
||||
label="单价"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column prop="product_num" label="数量" width="150" />
|
||||
<el-table-column prop="total_price" label="总价" width="150" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="table" v-if="formData.orderProduct && activeStore == 1">
|
||||
<div class="table-title">订单信息</div>
|
||||
<div class="table-info">
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">创建时间:</div>
|
||||
<div class="info-item-info">{{ formData.create_time }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">商品总数:</div>
|
||||
<div class="info-item-info">{{ formData.total_num }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">商品总价:</div>
|
||||
<div class="info-item-info">¥{{ formData.total_price }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">支付时间:</div>
|
||||
<div class="info-item-info">{{ formData.pay_time }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">优惠抵扣:</div>
|
||||
<div class="info-item-info">¥{{ formData.deduction_price }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">实际支付:</div>
|
||||
<div class="info-item-info">¥{{ formData.pay_price }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">支付方式:</div>
|
||||
<div class="info-item-info">
|
||||
<span v-if="formData.pay_type == 11">微信收款</span>
|
||||
<span v-if="formData.pay_type == 12">现金支付</span>
|
||||
<span v-if="formData.pay_type == 13">支付宝收款</span>
|
||||
<span v-if="formData.pay_type == 0">余额支付</span>
|
||||
<span v-if="formData.pay_type == 1">微信支付</span>
|
||||
<span v-if="formData.pay_type == 9">商户余额支付</span>
|
||||
<span v-if="formData.pay_type == 10">对公转账</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-title" v-if="formData.service_info">收银员信息</div>
|
||||
<div
|
||||
class="table-info"
|
||||
v-if="formData.service_info"
|
||||
style="flex-direction: column"
|
||||
>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">头像:</div>
|
||||
<div class="info-item-info">
|
||||
<el-image
|
||||
style="height: 4rem; width: 4rem; border-radius: 50%"
|
||||
:src="formData.service_info.avatar"
|
||||
></el-image>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">昵称:</div>
|
||||
<div class="info-item-info">
|
||||
{{ formData.service_info.nickname }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">账号:</div>
|
||||
<div class="info-item-info">
|
||||
{{ formData.service_info.account }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer" v-if="formData.service_info">
|
||||
<div class="info">
|
||||
<div class="ser">收银员: {{ formData.service_info.nickname }}</div>
|
||||
<div class="price">
|
||||
实付: <span>¥{{ formData.pay_price }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="handle" v-if="!formData.paid">
|
||||
<el-button class="btn" type="primary" @click="rePay(formData)"
|
||||
>重新支付</el-button
|
||||
>
|
||||
<el-button
|
||||
class="btn"
|
||||
type="primary"
|
||||
@click="getOrderStatus(formData.order_sn)"
|
||||
>检测状态</el-button
|
||||
>
|
||||
<el-button
|
||||
class="btn"
|
||||
type="success"
|
||||
@click="orderLadingComfirm(formData.order_sn)"
|
||||
>提单</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="handle" v-else>已支付</div>
|
||||
</div>
|
||||
</div>
|
||||
<pay ref="payRef" />
|
||||
<el-dialog v-model="dialogVisible" title="提示" width="500">
|
||||
<span
|
||||
>提单前请清空购物车, 避免提单的商品与购物车商品混合,
|
||||
请确保购物车内无数据后再进行提单</span
|
||||
>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button v-if="cartCount > 0" @click="goHome">
|
||||
前去清空购物车
|
||||
</el-button>
|
||||
<el-button v-else type="primary" @click="orderLading">
|
||||
确认提单
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.my-order {
|
||||
border-radius: 1.2rem;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.header-nav {
|
||||
display: flex;
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
#f5f5f5 50%,
|
||||
#fff 50%
|
||||
); /* 创建渐变背景 */
|
||||
.nav-item {
|
||||
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;
|
||||
}
|
||||
.nav-item-active {
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
transition: 300ms;
|
||||
}
|
||||
.nav-item-radius1 {
|
||||
border-radius: 0 0 1rem 0;
|
||||
}
|
||||
.nav-item-radius2 {
|
||||
border-radius: 0 0 0 1rem;
|
||||
}
|
||||
}
|
||||
.detail {
|
||||
height: calc(100vh - 100px - 4rem);
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
.table {
|
||||
padding: 1rem;
|
||||
padding-bottom: 6rem;
|
||||
|
||||
.table-title {
|
||||
font-weight: bold;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
.table-info {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
color: #777;
|
||||
font-size: 0.9rem;
|
||||
padding-bottom: 2rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
width: 33%;
|
||||
display: flex;
|
||||
padding-top: 1rem;
|
||||
.info-item-title {
|
||||
flex-shrink: 0;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
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;
|
||||
.info {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
.ser {
|
||||
font-weight: bold;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
.price {
|
||||
margin-right: 1rem;
|
||||
span {
|
||||
color: #ff4a00;
|
||||
font-size: 1.2rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
.handle {
|
||||
.btn {
|
||||
border-radius: 4rem;
|
||||
padding: 1.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,349 @@
|
|||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import {
|
||||
orderListApi,
|
||||
orderStatusApi,
|
||||
orderLadingApi,
|
||||
cartListApi,
|
||||
} from "@/api/store.js";
|
||||
import { useUserStore } from "@/store/user.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import mitt from "@/utils/mitt.js";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const props = defineProps({
|
||||
isSystem:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
})
|
||||
|
||||
const list = ref([]);
|
||||
|
||||
const tabPosition = ref(1); // 1-全部, 2-未支付
|
||||
const changeTabPosition = (e) => {
|
||||
where.value.page = 1;
|
||||
loadEnd.value = false;
|
||||
loading.value = false;
|
||||
orderList.value = [];
|
||||
getOrderList(true);
|
||||
};
|
||||
|
||||
const payRef = ref(null);
|
||||
|
||||
const date = ref('');
|
||||
const changeDate = ()=>{
|
||||
where.value.date = date.value.join('-');
|
||||
getOrderList(true);
|
||||
}
|
||||
|
||||
const where = ref({
|
||||
page: 1,
|
||||
limit: 20,
|
||||
search_info: "",
|
||||
date: "",
|
||||
staff_id: 0
|
||||
});
|
||||
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const activeStore = ref(0);
|
||||
|
||||
const loadEnd = ref(false);
|
||||
const orderList = ref([]);
|
||||
const getOrderList = (reload = false) => {
|
||||
if (reload) where.value.page = 1;
|
||||
else if (loadEnd.value || loading.value) return;
|
||||
if(!props.isSystem) where.value.staff_id = userStore.userInfo.service.service_id;
|
||||
loading.value = true;
|
||||
if (tabPosition.value == 1) where.value.paid = null;
|
||||
if (tabPosition.value == 2) where.value.paid = 0;
|
||||
orderListApi(userStore.userInfo.service.mer_id, where.value)
|
||||
.then((res) => {
|
||||
if (reload) orderList.value = res.data.list;
|
||||
else orderList.value = [...orderList.value, ...res.data.list];
|
||||
if (res.data.list.length < where.value.limit) loadEnd.value = true;
|
||||
else where.value.page++;
|
||||
activeStore.value = 0;
|
||||
mitt.emit("set-order-detail", orderList.value[0]);
|
||||
total.value = res.data.count;
|
||||
loading.value = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
loadEnd.value = true;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
const setForm = (item, index) => {
|
||||
activeStore.value = index;
|
||||
mitt.emit("set-order-detail", item);
|
||||
};
|
||||
|
||||
onMounted(()=>{
|
||||
mitt.on("update-order-detail", (item) => {
|
||||
console.log('===');
|
||||
orderList.value[activeStore.value].paid = 1;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-order">
|
||||
<div class="header-nav">
|
||||
<div class="nav-item">
|
||||
{{ isSystem ? '平台订单' : '收银订单' }}
|
||||
</div>
|
||||
<div class="nav-item-btn">
|
||||
<el-radio-group
|
||||
v-model="tabPosition"
|
||||
@change="changeTabPosition"
|
||||
size="small"
|
||||
>
|
||||
<el-radio-button :value="1">全部</el-radio-button>
|
||||
<el-radio-button :value="2">未支付</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker
|
||||
v-model="date"
|
||||
type="daterange"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
size="small"
|
||||
value-format="YYYY/MM/DD"
|
||||
@change="changeDate"
|
||||
style="width: 14rem;margin-left: 1rem;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-input">
|
||||
<el-input
|
||||
v-model="where.search_info"
|
||||
placeholder="请输入订单编号"
|
||||
@keydown.enter="getOrderList(true)"
|
||||
@clear="getOrderList(true)"
|
||||
clearable
|
||||
>
|
||||
<template #append>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="
|
||||
background-color: #1890ff;
|
||||
color: #fff;
|
||||
border-radius: 0 5px 5px 0;
|
||||
"
|
||||
@click="getOrderList(true)"
|
||||
>搜索</el-button
|
||||
>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div
|
||||
class="order-list"
|
||||
v-loading="loading"
|
||||
v-infinite-scroll="getOrderList"
|
||||
infinite-scroll-distance="300"
|
||||
infinite-scroll-delay="500"
|
||||
style="overflow: auto"
|
||||
>
|
||||
<div
|
||||
class="item"
|
||||
:class="{ 'item-active': activeStore == index }"
|
||||
v-for="(item, index) in orderList"
|
||||
:key="index"
|
||||
@click="setForm(item, index)"
|
||||
>
|
||||
<div class="top">
|
||||
<div
|
||||
class="sn"
|
||||
:class="
|
||||
item.pay_type === 11 ||
|
||||
item.pay_type === 12 ||
|
||||
item.pay_type === 13
|
||||
? 'cahier'
|
||||
: 'cahier2'
|
||||
"
|
||||
>
|
||||
单号: {{ item.order_sn }}
|
||||
</div>
|
||||
<div class="create-time">{{ item.create_time }}</div>
|
||||
</div>
|
||||
<div class="shop">
|
||||
<div class="left" v-if="item.orderProduct">
|
||||
<el-image
|
||||
v-for="(shop, imgkey) in item.orderProduct.slice(0, 5)"
|
||||
:key="imgkey"
|
||||
:src="
|
||||
shop.cart_info.productAttr.image || shop.cart_info.product.image
|
||||
"
|
||||
class="shop-img"
|
||||
></el-image>
|
||||
<div v-if="item.orderProduct.length == 1" class="shop-name">
|
||||
{{ item.orderProduct[0].cart_info.product.store_name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="money">¥{{ item.pay_price }}</div>
|
||||
<div class="count">共{{ item.total_num }}件商品</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="pay">
|
||||
<div v-if="item.paid">
|
||||
已支付
|
||||
<span v-if="item.pay_type == 13">(支付宝收款)</span>
|
||||
<span v-if="item.pay_type == 12">(现金支付)</span>
|
||||
<span v-if="item.pay_type == 11">(微信收款)</span>
|
||||
<span v-if="item.pay_type == 0">(余额支付)</span>
|
||||
<span v-if="item.pay_type == 1">(微信支付)</span>
|
||||
<span v-if="item.pay_type == 9">(商户余额支付)</span>
|
||||
<span v-if="item.pay_type == 10">(对公转账)</span>
|
||||
</div>
|
||||
<div v-else style="color: #ff4a00">未支付</div>
|
||||
</div>
|
||||
<div class="cashier" v-if="item.service_info">
|
||||
收银员: {{ item.service_info.nickname }}
|
||||
</div>
|
||||
<div class="cashier" v-else>平台订单</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="loadEnd" class="load-end">没有更多了</div>
|
||||
<div v-if="loading" class="load-end">加载中...</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.my-order {
|
||||
border-radius: 1.2rem;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
width: 30rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.header-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 1rem;
|
||||
height: 3.5rem;
|
||||
|
||||
span {
|
||||
color: #ff4a00;
|
||||
}
|
||||
.nav-item{
|
||||
font-weight: bold;
|
||||
}
|
||||
.nav-item-btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.header-input {
|
||||
padding: 1rem;
|
||||
padding-top: 0;
|
||||
height: 2.5rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.order-list {
|
||||
height: calc(100vh - 100px - 10.2rem);
|
||||
overflow-y: auto;
|
||||
.item {
|
||||
padding: 1rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
.sn {
|
||||
font-weight: bold;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.cahier {
|
||||
&::before {
|
||||
content: "收银";
|
||||
font-weight: 400;
|
||||
font-size: 0.7rem;
|
||||
padding: 0.1rem 0.1rem;
|
||||
margin-right: 0.2rem;
|
||||
border: 1px solid #2ec479;
|
||||
color: #2ec479;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
.cahier2 {
|
||||
&::before {
|
||||
content: "平台";
|
||||
font-weight: 400;
|
||||
font-size: 0.7rem;
|
||||
padding: 0.1rem 0.1rem;
|
||||
margin-right: 0.2rem;
|
||||
border: 1px solid #ff4a00;
|
||||
color: #ff4a00;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
.create-time {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
.shop {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.right {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
.money {
|
||||
font-size: 1rem;
|
||||
color: #ff4a00;
|
||||
font-weight: bold;
|
||||
}
|
||||
.count {
|
||||
font-size: 0.7rem;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.left {
|
||||
height: 4.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.shop-img {
|
||||
width: 3.5rem;
|
||||
height: 3.5rem;
|
||||
border-radius: 0.3rem;
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
.shop-name {
|
||||
font-size: 0.9rem;
|
||||
color: #333;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
/* 将文本限制为三行 */
|
||||
-webkit-line-clamp: 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.9rem;
|
||||
color: #777;
|
||||
}
|
||||
}
|
||||
.item-active {
|
||||
background-color: #efefef;
|
||||
}
|
||||
}
|
||||
.load-end {
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
color: #333;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,43 @@
|
|||
<script setup>
|
||||
import order from "./component/order.vue";
|
||||
import detail from "./component/detail.vue";
|
||||
import padding from "@/components/padding.vue";
|
||||
import { ref, nextTick } from "vue";
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-card">
|
||||
<order style="flex-shrink: 0;" ref="orderRef"/>
|
||||
<padding />
|
||||
<detail ref="detailRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.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; /* 设置鼠标悬停时滑块的背景色 */
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,205 @@
|
|||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import {
|
||||
orderListApi,
|
||||
orderStatusApi,
|
||||
orderLadingApi,
|
||||
cartListApi,
|
||||
statisticsApi,
|
||||
orderPriceApi,
|
||||
} from "@/api/store.js";
|
||||
import { useUserStore } from "@/store/user.js";
|
||||
import pay from "@/components/pay.vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const orderList = ref([]);
|
||||
const router = useRouter();
|
||||
|
||||
const tabPosition = ref(1); // 1-全部, 2-未收银
|
||||
const payRef = ref(null);
|
||||
|
||||
const where = ref({
|
||||
page: 1,
|
||||
limit: 15,
|
||||
staff_id: userStore.userInfo.service.service_id,
|
||||
});
|
||||
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
|
||||
const getOrderList = () => {
|
||||
orderPriceApi(userStore.userInfo.service.mer_id, where.value).then((res) => {
|
||||
orderList.value = res.data;
|
||||
// total.value = res.data.count;
|
||||
});
|
||||
};
|
||||
|
||||
getOrderList();
|
||||
|
||||
const formData = ref({});
|
||||
const getStatistics = () => {
|
||||
loading.value = true;
|
||||
statisticsApi(userStore.userInfo.service.mer_id, {
|
||||
staff_id: userStore.userInfo.service.service_id,
|
||||
}).then((res) => {
|
||||
formData.value = res.data.data;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
getStatistics();
|
||||
|
||||
const prevClick = (e) => {
|
||||
where.value.page = e;
|
||||
getOrderList();
|
||||
};
|
||||
|
||||
const nextClick = (e) => {
|
||||
where.value.page = e;
|
||||
getOrderList();
|
||||
};
|
||||
|
||||
const currentChange = (e) => {
|
||||
where.value.page = e;
|
||||
getOrderList();
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-loading="loading" element-loading-text="加载中" class="my-order">
|
||||
<div class="from" v-if="formData.today">
|
||||
<div class="form-card green">
|
||||
<div>{{ formData.today.payPrice }}</div>
|
||||
<div class="tips">今日线上收银金额</div>
|
||||
</div>
|
||||
<div class="form-card green">
|
||||
<div>{{ formData.yesterday.payPrice }}</div>
|
||||
<div class="tips">昨日线上收银金额</div>
|
||||
</div>
|
||||
<div class="form-card green">
|
||||
<div>{{ formData.month.payPrice }}</div>
|
||||
<div class="tips">本月线上收银金额</div>
|
||||
</div>
|
||||
<div class="form-card">
|
||||
<div>{{ (formData.today.cashPayment + formData.today.payPrice).toFixed(2) }}</div>
|
||||
<div class="tips">今日收银 线上+现金 总金额</div>
|
||||
</div>
|
||||
<div class="form-card">
|
||||
<div>{{ (formData.month.cashPayment + formData.month.payPrice).toFixed(2) }}</div>
|
||||
<div class="tips">本月收银 线上+现金 总金额</div>
|
||||
</div>
|
||||
<div class="form-card red">
|
||||
<div>{{ formData.today.cashPayment }}</div>
|
||||
<div class="tips">今日现金收银金额</div>
|
||||
</div>
|
||||
<div class="form-card red">
|
||||
<div>{{ formData.yesterday.cashPayment }}</div>
|
||||
<div class="tips">昨日现金收银金额</div>
|
||||
</div>
|
||||
<div class="form-card red">
|
||||
<div>{{ formData.month.cashPayment }}</div>
|
||||
<div class="tips">本月现金收银金额</div>
|
||||
</div>
|
||||
<div class="form-card">
|
||||
<div>
|
||||
{{ (formData.yesterday.cashPayment + formData.yesterday.payPrice).toFixed(2) }}
|
||||
</div>
|
||||
<div class="tips">昨日收银 线上+现金 总金额</div>
|
||||
</div>
|
||||
<!-- <div class="form-card">
|
||||
<div>{{formData.today.orderNum}}</div>
|
||||
<div class="tips">今日订单数</div>
|
||||
</div>
|
||||
<div class="form-card">
|
||||
<div>{{formData.yesterday.orderNum}}</div>
|
||||
<div class="tips">昨日订单数</div>
|
||||
</div>
|
||||
<div class="form-card">
|
||||
<div>{{formData.month.orderNum}}</div>
|
||||
<div class="tips">本月订单数</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table :data="orderList" style="width: 100%">
|
||||
<el-table-column prop="day" label="日期" width="260" />
|
||||
<el-table-column prop="total" label="订单数量" />
|
||||
<el-table-column prop="cash_payment" label="现金收银金额" />
|
||||
<el-table-column prop="pay_price" label="线上收银金额" />
|
||||
<el-table-column label="总金额">
|
||||
<template #default="scope">
|
||||
{{ (((+scope.row.pay_price || 0) + (+scope.row.cash_payment || 0))).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my-order {
|
||||
/* background-color: #fff; */
|
||||
/* border-radius: 1.2rem; */
|
||||
box-sizing: border-box;
|
||||
/* padding: 1rem; */
|
||||
/* overflow-y: scroll; */
|
||||
.from {
|
||||
width: 100%;
|
||||
padding-bottom: 20px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr); /* 六列 */
|
||||
gap: 20px; /* 列间距 */
|
||||
|
||||
.form-card {
|
||||
border-radius: 0.8rem;
|
||||
height: 5rem;
|
||||
background-color: #fff;
|
||||
font-size: 1.3rem;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.tips {
|
||||
font-size: 0.9rem;
|
||||
color: #999;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.red {
|
||||
color: #ff4a00;
|
||||
}
|
||||
.green {
|
||||
color: #01c86f;
|
||||
}
|
||||
}
|
||||
.table {
|
||||
background-color: #fff;
|
||||
border-radius: 1.2rem;
|
||||
box-sizing: border-box;
|
||||
padding: 1rem;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
}
|
||||
/* 修改滚动条的样式 */
|
||||
::-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; /* 设置鼠标悬停时滑块的背景色 */
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,238 @@
|
|||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import {
|
||||
orderListApi,
|
||||
orderStatusApi,
|
||||
orderLadingApi,
|
||||
cartListApi
|
||||
} from "@/api/store.js";
|
||||
import { useUserStore } from "@/store/user.js";
|
||||
import pay from "@/components/pay.vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const orderList = ref([]);
|
||||
const router = useRouter();
|
||||
|
||||
const tabPosition = ref(1); // 1-全部, 2-未支付
|
||||
const payRef = ref(null);
|
||||
|
||||
const where = ref({
|
||||
page: 1,
|
||||
limit: 20,
|
||||
});
|
||||
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
|
||||
const getOrderList = () => {
|
||||
loading.value = true;
|
||||
if (tabPosition.value == 1) where.value.paid = null;
|
||||
if (tabPosition.value == 2) where.value.paid = 0;
|
||||
orderListApi(userStore.userInfo.service.mer_id, where.value).then((res) => {
|
||||
orderList.value = res.data.list;
|
||||
total.value = res.data.count;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
getOrderList();
|
||||
|
||||
|
||||
const cartCount = ref(0);
|
||||
const getCartList = () => {
|
||||
cartListApi({
|
||||
staff_id: userStore.userInfo.service.service_id,
|
||||
}).then((res) => {
|
||||
cartCount.value = res.data.list?.length;
|
||||
});
|
||||
};
|
||||
getCartList();
|
||||
|
||||
const changeTabPosition = (e) => {
|
||||
where.value.page = 1;
|
||||
getOrderList();
|
||||
};
|
||||
|
||||
const prevClick = (e) => {
|
||||
where.value.page = e;
|
||||
getOrderList();
|
||||
};
|
||||
|
||||
const nextClick = (e) => {
|
||||
where.value.page = e;
|
||||
getOrderList();
|
||||
};
|
||||
|
||||
const currentChange = (e) => {
|
||||
where.value.page = e;
|
||||
getOrderList();
|
||||
};
|
||||
|
||||
const paySuccess = () => {
|
||||
getOrderList();
|
||||
};
|
||||
|
||||
const rePay = (row) => {
|
||||
payRef.value.setRePay({
|
||||
price: row.pay_price,
|
||||
order_id: row.group_order_id,
|
||||
});
|
||||
payRef.value.drawer = true;
|
||||
};
|
||||
|
||||
const getOrderStatus = (id) => {
|
||||
orderStatusApi({
|
||||
order_sn: id,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.paid == 1 || res.message == "支付成功") {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
getOrderList();
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {});
|
||||
};
|
||||
|
||||
const orderLadingSn = ref('')
|
||||
const orderLading = () => {
|
||||
dialogVisible.value = false;
|
||||
orderLadingApi({
|
||||
order_sn: orderLadingSn.value,
|
||||
}).then((res) => {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
router.push({
|
||||
name: "home",
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const orderLadingComfirm = (order_sn)=>{
|
||||
orderLadingSn.value = order_sn;
|
||||
dialogVisible.value = true;
|
||||
}
|
||||
|
||||
const goHome = ()=>{
|
||||
router.push({
|
||||
name: "home",
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-loading="loading" element-loading-text="加载中" class="my-order">
|
||||
<el-radio-group
|
||||
v-model="tabPosition"
|
||||
style="margin-bottom: 30px"
|
||||
@change="changeTabPosition"
|
||||
>
|
||||
<el-radio-button :value="1">全部</el-radio-button>
|
||||
<el-radio-button :value="2">未支付</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-table :data="orderList" style="width: 100%">
|
||||
<el-table-column prop="group_order_id" label="ID" width="100" />
|
||||
<el-table-column prop="order_sn" label="订单号" width="260" />
|
||||
<el-table-column prop="total_price" label="订单金额" />
|
||||
<el-table-column prop="paid" label="支付状态">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.paid == 1">已支付</span>
|
||||
<span v-else style="color: #ff4a00">未支付</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="订单创建时间" />
|
||||
<el-table-column prop="pay_time" label="订单支付时间">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.pay_time">{{ scope.row.pay_time }}</span>
|
||||
<div v-else class="flex">
|
||||
<el-button type="primary" link @click="rePay(scope.row)"
|
||||
>重新支付</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="getOrderStatus(scope.row.order_sn)"
|
||||
>检测状态</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="orderLadingComfirm(scope.row.order_sn)"
|
||||
>提单</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:page-size="where.limit"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
@prev-click="prevClick"
|
||||
@next-click="nextClick"
|
||||
@current-change="currentChange"
|
||||
/>
|
||||
<pay ref="payRef" @paySuccess="paySuccess" />
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="提示"
|
||||
width="500"
|
||||
>
|
||||
<span>提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button v-if="cartCount>0" @click="goHome">
|
||||
前去清空购物车
|
||||
</el-button>
|
||||
<el-button v-else type="primary" @click="orderLading">
|
||||
确认提单
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my-order {
|
||||
background-color: #fff;
|
||||
border-radius: 1.2rem;
|
||||
box-sizing: border-box;
|
||||
padding: 1rem;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
/* 修改滚动条的样式 */
|
||||
::-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; /* 设置鼠标悬停时滑块的背景色 */
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,43 @@
|
|||
<script setup>
|
||||
import order from "./component/order.vue";
|
||||
import detail from "./component/detail.vue";
|
||||
import padding from "@/components/padding.vue";
|
||||
import { ref, nextTick } from "vue";
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-card">
|
||||
<order style="flex-shrink: 0;" ref="orderRef" isSystem/>
|
||||
<padding />
|
||||
<detail ref="detailRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.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; /* 设置鼠标悬停时滑块的背景色 */
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue