新增批发功能
This commit is contained in:
parent
3681e40b73
commit
65e61b2433
|
@ -1,4 +1,4 @@
|
||||||
VITE_NOW_TYPE = 'dist'
|
VITE_NOW_TYPE = 'dist'
|
||||||
|
|
||||||
# VITE_BASE_URL = 'http://192.168.1.21:8324'
|
VITE_BASE_URL = 'http://192.168.1.7:8324'
|
||||||
VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn'
|
# VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn'
|
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
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
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
import{o as r,d as o}from"./detail-C2TXBbda.js";import{p as t}from"./padding-C2vugETl.js";import{c as a,h as s,f as e}from"./index-Detor8ok.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-B369kKjL.js";import"./pay-YTQcUTqZ.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
|
@ -0,0 +1 @@
|
||||||
|
import{o as r,d as o}from"./detail-BSXHg2W7.js";import{p as t}from"./padding-ChZ2-3BS.js";import{c as a,h as s,f as e}from"./index-DKxgp1Q5.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DtwGRKii.js";import"./pay-DtFDX3hL.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 @@
|
||||||
@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}
|
@charset "UTF-8";.my-order[data-v-8bebdb1f]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-8bebdb1f]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-8bebdb1f]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-8bebdb1f]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-8bebdb1f]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-8bebdb1f]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-8bebdb1f]{height:calc(100vh - 100px - 10.2rem);overflow-y:auto}.my-order .order-list .item[data-v-8bebdb1f]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-8bebdb1f]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-8bebdb1f]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-8bebdb1f]: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-8bebdb1f]: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-8bebdb1f]{font-size:.8rem}.my-order .order-list .item .shop[data-v-8bebdb1f]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-8bebdb1f]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-8bebdb1f]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-8bebdb1f]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-8bebdb1f]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-8bebdb1f]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-8bebdb1f]{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-8bebdb1f]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-8bebdb1f]{background-color:#efefef}.my-order .load-end[data-v-8bebdb1f]{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}
|
|
@ -1 +1 @@
|
||||||
import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-Detor8ok.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-DKxgp1Q5.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};
|
|
@ -1 +1 @@
|
||||||
import{_ as U,u as I,r as u,o as L,b as n,c as R,h as S,e as w,f as e,w as t,k as v,g as b,v as K,x as B,A as C,E as d,K as E,L as N}from"./index-Detor8ok.js";const M=l=>(K("data-v-59a7e82c"),l=l(),B(),l),T={class:"body"},A={class:"login"},$=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),j={__name:"index",setup(l){const p=I(),y=C(),h=u(null),_=u(null),s=u({account:"",password:"",key:"",captchaVerification:"",code:""}),i=()=>{if(!s.value.account)return d({message:"请填写账号",type:"error"});if(!s.value.password)return d({message:"请填写密码",type:"error"});E(s.value).then(a=>{console.log(a),a.data&&(p.setToken(a.data.token),N().then(({data:o})=>{if(!o.service)return d({message:"请联系管理员开通服务",type:"error"});p.setUserInfo(o),y.push("/")}))}).catch(a=>{})};return L(()=>{}),(a,o)=>{const k=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),g=n("Lock"),x=n("el-button"),V=n("el-form");return R(),S("div",T,[w("div",A,[$,e(V,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(x,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[b("登录")]),_:1})]),_:1})]),_:1})])])}}},z=U(j,[["__scopeId","data-v-59a7e82c"]]);export{z as default};
|
import{_ as U,u as I,r as u,o as L,b as n,c as R,h as S,e as w,f as e,w as t,k as v,g as b,v as K,x as B,A as C,E as d,K as E,L as N}from"./index-DKxgp1Q5.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{h as x,s as P}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-B369kKjL.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-Detor8ok.js";const a=c=>(F("data-v-891907f0"),c=c(),N(),c),k={"element-loading-text":"加载中",class:"my-order"},A={key:0,class:"from"},B={class:"form-card green"},L=a(()=>e("div",{class:"tips"},"今日线上收银金额",-1)),O={class:"form-card green"},j=a(()=>e("div",{class:"tips"},"昨日线上收银金额",-1)),q={class:"form-card green"},E=a(()=>e("div",{class:"tips"},"本月线上收银金额",-1)),R={class:"form-card"},T=a(()=>e("div",{class:"tips"},"今日收银 线上+现金 总金额",-1)),U={class:"form-card"},z=a(()=>e("div",{class:"tips"},"本月收银 线上+现金 总金额",-1)),G={class:"form-card red"},H=a(()=>e("div",{class:"tips"},"今日现金收银金额",-1)),J={class:"form-card red"},K=a(()=>e("div",{class:"tips"},"昨日现金收银金额",-1)),M={class:"form-card red"},Q=a(()=>e("div",{class:"tips"},"本月现金收银金额",-1)),W={class:"form-card"},X=a(()=>e("div",{class:"tips"},"昨日收银 线上+现金 总金额",-1)),Y={class:"table"},Z={__name:"indexCount",setup(c){const l=w(),_=o([]);V(),o(1),o(null);const y=o({page:1,limit:15,staff_id:l.userInfo.service.service_id}),n=o(!1);o(0),(()=>{x(l.userInfo.service.mer_id,y.value).then(r=>{_.value=r.data})})();const s=o({});return(()=>{n.value=!0,P(l.userInfo.service.mer_id,{staff_id:l.userInfo.service.service_id}).then(r=>{s.value=r.data.data,n.value=!1})})(),(r,se)=>{const d=u("el-table-column"),f=u("el-table"),g=I("loading");return S((p(),h("div",k,[s.value.today?(p(),h("div",A,[e("div",B,[e("div",null,t(s.value.today.payPrice),1),L]),e("div",O,[e("div",null,t(s.value.yesterday.payPrice),1),j]),e("div",q,[e("div",null,t(s.value.month.payPrice),1),E]),e("div",R,[e("div",null,t((s.value.today.cashPayment+s.value.today.payPrice).toFixed(2)),1),T]),e("div",U,[e("div",null,t((s.value.month.cashPayment+s.value.month.payPrice).toFixed(2)),1),z]),e("div",G,[e("div",null,t(s.value.today.cashPayment),1),H]),e("div",J,[e("div",null,t(s.value.yesterday.cashPayment),1),K]),e("div",M,[e("div",null,t(s.value.month.cashPayment),1),Q]),e("div",W,[e("div",null,t((s.value.yesterday.cashPayment+s.value.yesterday.payPrice).toFixed(2)),1),X])])):C("",!0),e("div",Y,[i(f,{data:_.value,style:{width:"100%"}},{default:m(()=>[i(d,{prop:"day",label:"日期",width:"260"}),i(d,{prop:"total",label:"订单数量"}),i(d,{prop:"cash_payment",label:"现金收银金额"}),i(d,{prop:"pay_price",label:"线上收银金额"}),i(d,{label:"总金额"},{default:m(v=>[D(t(((+v.row.pay_price||0)+(+v.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[g,n.value]])}}},oe=b(Z,[["__scopeId","data-v-891907f0"]]);export{oe as default};
|
import{h as x,i as P}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DtwGRKii.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-DKxgp1Q5.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-B369kKjL.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-Detor8ok.js";import{p as oe}from"./pay-YTQcUTqZ.js";const le=v=>(te("data-v-80048b20"),v=v(),ae(),v),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ue=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ce={class:"dialog-footer"},pe={__name:"indexList",setup(v){const k=W(),C=s([]),b=ee(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),w=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(k.userInfo.service.mer_id,n.value).then(e=>{C.value=e.data.list,w.value=e.data.count,y.value=!1})};i();const x=s(0);(()=>{G({staff_id:k.userInfo.service.service_id}).then(e=>{var a;x.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},E=e=>{J({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),U=()=>{_.value=!1,K({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),z=e=>{L.value=e,_.value=!0},O=()=>{b.push({name:"home"})};return(e,a)=>{const S=d("el-radio-button"),T=d("el-radio-group"),c=d("el-table-column"),p=d("el-button"),j=d("el-table"),q=d("el-pagination"),H=d("el-dialog"),M=X("loading");return Y((u(),m("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(S,{value:1},{default:o(()=>[r("全部")]),_:1}),t(S,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(c,{prop:"group_order_id",label:"ID",width:"100"}),t(c,{prop:"order_sn",label:"订单号",width:"260"}),t(c,{prop:"total_price",label:"订单金额"}),t(c,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(u(),m("span",ne,"已支付")):(u(),m("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),m("span",ie,Z(l.row.pay_time),1)):(u(),m("div",de,[t(p,{type:"primary",link:"",onClick:V=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>E(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(q,{"page-size":n.value.limit,layout:"prev, pager, next",total:w.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(oe,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(H,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ce,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(u(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(u(),I(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ue]),_:1},8,["modelValue"])])),[[M,y.value]])}}},fe=Q(pe,[["__scopeId","data-v-80048b20"]]);export{fe as default};
|
import{e as F,a as G,g as J,f as K}from"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DtwGRKii.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-DKxgp1Q5.js";import{p as oe}from"./pay-DtFDX3hL.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};
|
|
@ -1 +0,0 @@
|
||||||
import{o as r,d as t}from"./detail-C2TXBbda.js";import{p as o}from"./padding-C2vugETl.js";import{c as s,h as a,f as e}from"./index-Detor8ok.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-B369kKjL.js";import"./pay-YTQcUTqZ.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};
|
|
|
@ -0,0 +1 @@
|
||||||
|
import{o as r,d as t}from"./detail-BSXHg2W7.js";import{p as o}from"./padding-ChZ2-3BS.js";import{c as s,h as a,f as e}from"./index-DKxgp1Q5.js";import"./pay.vue_vue_type_style_index_0_scoped_80c4a58e_lang-DtwGRKii.js";import"./pay-DtFDX3hL.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,4 +1,4 @@
|
||||||
import{B as jt,C as rp}from"./index-Detor8ok.js";var Je={exports:{}};/**
|
import{B as jt,C as rp}from"./index-DKxgp1Q5.js";var Je={exports:{}};/**
|
||||||
* @license
|
* @license
|
||||||
* Lodash <https://lodash.com/>
|
* Lodash <https://lodash.com/>
|
||||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@ -1 +1 @@
|
||||||
import{_ as e,c as t,h as c}from"./index-Detor8ok.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-DKxgp1Q5.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 +0,0 @@
|
||||||
import{G as e}from"./index-Detor8ok.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};
|
|
|
@ -0,0 +1 @@
|
||||||
|
import{G as t}from"./index-DKxgp1Q5.js";function n(r){return t.post("user/cart/create",r)}function s(r){return t.get("user/cart/lst",{params:r})}function o(r,e){return t.post(`user/cart/change/${r}`,e)}function u(r){return t.post("v2/order/check",r)}function c(r){return t.post("user/cart/delete",r)}function p(r){return t.post("v2/order/create",r)}function d(r,e){return t.post(`order/pay/${r}`,e)}function f(r){return t.get("micropay_query",{params:r})}function A(r,e){return t.get(`admin/${r}/order_list`,{params:e})}function m(r,e){return t.get(`verifier/${r}/order/${e}`)}function g(r){return t.get("order_lading",{params:r})}function $(r,e,i){return t.post(`verifier/${r}/${e}`,i)}function l(r,e){return t.get(`admin/${r}/statistics`,{params:e})}function v(r,e){return t.get(`admin/${r}/order_price`,{params:e})}function h(r,e){return t.get("order/list",{params:e})}export{s as a,o as b,c,n as d,A as e,g as f,f as g,v as h,l as i,$ as j,p as k,d as l,u as o,h as s,m as v};
|
|
@ -1 +1 @@
|
||||||
import{G as e}from"./index-Detor8ok.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 l(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}function $(t){return e.get("product/spu/lst",{params:t})}export{$ as a,d as b,c,f as d,i as e,n as f,p as g,l as p,a as s,o as u};
|
import{G as e}from"./index-DKxgp1Q5.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 l(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}function $(t){return e.get("product/spu/lst",{params:t})}export{$ as a,d as b,c,f as d,i as e,n as f,p as g,l as p,a as s,o as u};
|
|
@ -5,7 +5,7 @@
|
||||||
<link rel="icon" type="image/svg+xml" href="./cashier.svg" />
|
<link rel="icon" type="image/svg+xml" href="./cashier.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>里海收银系统</title>
|
<title>里海收银系统</title>
|
||||||
<script type="module" crossorigin src="./assets/index-Detor8ok.js"></script>
|
<script type="module" crossorigin src="./assets/index-DKxgp1Q5.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-D-6RFZwF.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-D-6RFZwF.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -105,3 +105,11 @@ export function statisticsApi(mer_id, data) {
|
||||||
export function orderPriceApi(mer_id, data) {
|
export function orderPriceApi(mer_id, data) {
|
||||||
return request.get(`admin/${mer_id}/order_price`, { params: data })
|
return request.get(`admin/${mer_id}/order_price`, { params: data })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 批发订单列表
|
||||||
|
*/
|
||||||
|
export function saleOrderListApi(mer_id, data) {
|
||||||
|
return request.get(`order/list`, { params: data })
|
||||||
|
}
|
|
@ -3,7 +3,7 @@ import { ref, onMounted, onUnmounted, nextTick } from "vue";
|
||||||
import { cartListApi, cartDeleteApi, cartChangeApi } from "@/api/store.js";
|
import { cartListApi, cartDeleteApi, cartChangeApi } from "@/api/store.js";
|
||||||
import price from "./price.vue";
|
import price from "./price.vue";
|
||||||
import mitt from "@/utils/mitt.js";
|
import mitt from "@/utils/mitt.js";
|
||||||
import { useUserStore } from "@/store/user.js"
|
import { useUserStore } from "@/store/user.js";
|
||||||
|
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
const allPrice = ref(0); //商品总价
|
const allPrice = ref(0); //商品总价
|
||||||
|
@ -41,6 +41,7 @@ const getList = () => {
|
||||||
discounts.value = 0;
|
discounts.value = 0;
|
||||||
cartListApi({
|
cartListApi({
|
||||||
staff_id: userStore.userInfo.service.service_id,
|
staff_id: userStore.userInfo.service.service_id,
|
||||||
|
sale_type: 2,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.data?.list?.length > 0) {
|
if (res.data?.list?.length > 0) {
|
||||||
list.value = res.data.list[0].list;
|
list.value = res.data.list[0].list;
|
||||||
|
@ -53,7 +54,7 @@ const getList = () => {
|
||||||
};
|
};
|
||||||
getList();
|
getList();
|
||||||
|
|
||||||
const emit = defineEmits(["goPay","editAttr"]);
|
const emit = defineEmits(["goPay", "editAttr"]);
|
||||||
|
|
||||||
const goPay = () => {
|
const goPay = () => {
|
||||||
emit("goPay");
|
emit("goPay");
|
||||||
|
@ -71,47 +72,47 @@ const changeCartNum = (val, old) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const editAttr = (data)=>{
|
const editAttr = (data) => {
|
||||||
emit("editPupop", data);
|
emit("editPupop", data);
|
||||||
}
|
};
|
||||||
|
|
||||||
const editItem = (id, data)=>{
|
const editItem = (id, data) => {
|
||||||
cartChangeApi(id, data).then((res) => {
|
cartChangeApi(id, data).then((res) => {
|
||||||
getList()
|
getList();
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
const changeAllPrice = (price)=>{
|
const changeAllPrice = (price) => {
|
||||||
discounts.value = costPrice.value - price;
|
discounts.value = costPrice.value - price;
|
||||||
allPrice.value = +price;
|
allPrice.value = +price;
|
||||||
nextTick(()=>{
|
nextTick(() => {
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
showPrice(false)
|
showPrice(false);
|
||||||
}, 150)
|
}, 150);
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
const nowPrice = ref(0);
|
const nowPrice = ref(0);
|
||||||
const priceRef = ref(null);
|
const priceRef = ref(null);
|
||||||
const showPrice = (type=true)=>{
|
const showPrice = (type = true) => {
|
||||||
priceRef.value.show(type, costPrice.value);
|
priceRef.value.show(type, costPrice.value);
|
||||||
}
|
};
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
getList,
|
getList,
|
||||||
list,
|
list,
|
||||||
editItem,
|
editItem,
|
||||||
discounts,
|
discounts,
|
||||||
allPrice
|
allPrice,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 键盘事件
|
// 键盘事件
|
||||||
const ainsert = () => {
|
const ainsert = () => {
|
||||||
if(priceRef.value.dialogVisible) priceRef.value.dialogVisible = false;
|
if (priceRef.value.dialogVisible) priceRef.value.dialogVisible = false;
|
||||||
else showPrice();
|
else showPrice();
|
||||||
};
|
};
|
||||||
const adelete = () => {
|
const adelete = () => {
|
||||||
if(list.value.length > 0) clearAll();
|
if (list.value.length > 0) clearAll();
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
mitt.on("insert", ainsert);
|
mitt.on("insert", ainsert);
|
||||||
|
@ -122,8 +123,6 @@ onUnmounted(() => {
|
||||||
mitt.off("insert", ainsert);
|
mitt.off("insert", ainsert);
|
||||||
mitt.off("delete", adelete);
|
mitt.off("delete", adelete);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -139,7 +138,8 @@ onUnmounted(() => {
|
||||||
<div class="order-list">
|
<div class="order-list">
|
||||||
<el-empty v-if="list.length == 0" description="请点击右侧添加商品" />
|
<el-empty v-if="list.length == 0" description="请点击右侧添加商品" />
|
||||||
<div v-else class="order-item" v-for="(item, index) in list" :key="index">
|
<div v-else class="order-item" v-for="(item, index) in list" :key="index">
|
||||||
<el-image loading="lazy"
|
<el-image
|
||||||
|
loading="lazy"
|
||||||
class="order-item-img"
|
class="order-item-img"
|
||||||
:src="
|
:src="
|
||||||
(item.productAttr && item.productAttr.image) || item.product.image
|
(item.productAttr && item.productAttr.image) || item.product.image
|
||||||
|
@ -151,7 +151,13 @@ onUnmounted(() => {
|
||||||
<div class="delete" @click="deleteOne(item.cart_id)">删除</div>
|
<div class="delete" @click="deleteOne(item.cart_id)">删除</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="order-item-sku">
|
<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>
|
<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>
|
||||||
<div class="order-item-price">
|
<div class="order-item-price">
|
||||||
<div>
|
<div>
|
||||||
|
@ -189,11 +195,17 @@ onUnmounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="update-price">
|
<div class="update-price">
|
||||||
<el-button class="btn" type="primary" @click="showPrice">改价 (Insert)</el-button>
|
<el-button class="btn" type="primary" @click="showPrice"
|
||||||
|
>改价 (Insert)</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="order-btn">
|
<div class="order-btn">
|
||||||
<el-button class="btn" type="primary" @click="goPay" :disabled="list.length == 0"
|
<el-button
|
||||||
|
class="btn"
|
||||||
|
type="primary"
|
||||||
|
@click="goPay"
|
||||||
|
:disabled="list.length == 0"
|
||||||
>立即结账 (F9)</el-button
|
>立即结账 (F9)</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,7 +25,7 @@ const where = ref({
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 30,
|
limit: 30,
|
||||||
});
|
});
|
||||||
const getStoreList = (data={}, reload=false) => {
|
const getStoreList = (data = {}, reload = false) => {
|
||||||
where.value = {
|
where.value = {
|
||||||
staff_id: userStore.userInfo.service.service_id,
|
staff_id: userStore.userInfo.service.service_id,
|
||||||
sale_type: 2,
|
sale_type: 2,
|
||||||
|
@ -40,6 +40,12 @@ const getStoreList = (data={}, reload=false) => {
|
||||||
saleStoreListApi(where.value).then((res) => {
|
saleStoreListApi(where.value).then((res) => {
|
||||||
if (res.data?.list?.length < where.value.limit) loadEnd.value = true;
|
if (res.data?.list?.length < where.value.limit) loadEnd.value = true;
|
||||||
let list = res.data.list.map((item) => {
|
let list = res.data.list.map((item) => {
|
||||||
|
Object.keys(item.sku).forEach(key=>{
|
||||||
|
if(item.sku[key].wholesale_price)item.sku[key].price = item.sku[key].wholesale_price;
|
||||||
|
})
|
||||||
|
item.attrValue.forEach(t => {
|
||||||
|
if(t.wholesale_price)t.price = t.wholesale_price;
|
||||||
|
});
|
||||||
item.attr = Object.keys(item.sku);
|
item.attr = Object.keys(item.sku);
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
|
@ -56,7 +62,6 @@ const getStoreList = (data={}, reload=false) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const loadEnd = ref(false);
|
const loadEnd = ref(false);
|
||||||
const loadMore = (data) => {
|
const loadMore = (data) => {
|
||||||
if (loadEnd.value) return;
|
if (loadEnd.value) return;
|
||||||
|
@ -77,8 +82,8 @@ const cartAddInfo = (item, change = "") => {
|
||||||
item.sku[change] !== undefined ? item.sku[change].unique : "",
|
item.sku[change] !== undefined ? item.sku[change].unique : "",
|
||||||
staff_id: userStore.userInfo.service.service_id,
|
staff_id: userStore.userInfo.service.service_id,
|
||||||
product_type: 0,
|
product_type: 0,
|
||||||
|
sale_type: 2,
|
||||||
// spread_id: this.currSpid,
|
// spread_id: this.currSpid,
|
||||||
// sale_type: 1
|
|
||||||
};
|
};
|
||||||
cartCreateApi(q).then((res) => {
|
cartCreateApi(q).then((res) => {
|
||||||
orderRef.value.getList();
|
orderRef.value.getList();
|
||||||
|
@ -125,7 +130,6 @@ const checkOut = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const goPay = () => {
|
const goPay = () => {
|
||||||
checkOut();
|
checkOut();
|
||||||
payRef.value.drawer = true;
|
payRef.value.drawer = true;
|
||||||
|
|
|
@ -5,6 +5,7 @@ import {
|
||||||
orderStatusApi,
|
orderStatusApi,
|
||||||
orderLadingApi,
|
orderLadingApi,
|
||||||
cartListApi,
|
cartListApi,
|
||||||
|
saleOrderListApi
|
||||||
} from "@/api/store.js";
|
} from "@/api/store.js";
|
||||||
import { useUserStore } from "@/store/user.js";
|
import { useUserStore } from "@/store/user.js";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
@ -43,7 +44,8 @@ const where = ref({
|
||||||
limit: 20,
|
limit: 20,
|
||||||
search_info: "",
|
search_info: "",
|
||||||
date: "",
|
date: "",
|
||||||
staff_id: 0
|
staff_id: 0,
|
||||||
|
sale_type: 2
|
||||||
});
|
});
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
@ -59,7 +61,7 @@ const getOrderList = (reload = false) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if (tabPosition.value == 1) where.value.paid = null;
|
if (tabPosition.value == 1) where.value.paid = null;
|
||||||
if (tabPosition.value == 2) where.value.paid = 0;
|
if (tabPosition.value == 2) where.value.paid = 0;
|
||||||
orderListApi(userStore.userInfo.service.mer_id, where.value)
|
saleOrderListApi(userStore.userInfo.service.mer_id, where.value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (reload) orderList.value = res.data.list;
|
if (reload) orderList.value = res.data.list;
|
||||||
else orderList.value = [...orderList.value, ...res.data.list];
|
else orderList.value = [...orderList.value, ...res.data.list];
|
||||||
|
|
Loading…
Reference in New Issue