Compare commits

..

No commits in common. "fb48f880696ef9626f6e4d3f20f48c8ca9201a10" and "81095f57a1567b7511247bffec3606f40eaf0077" have entirely different histories.

116 changed files with 330 additions and 5913 deletions

View File

@ -1,4 +1,2 @@
VITE_NOW_TYPE = 'dist'
# VITE_BASE_URL = 'http://192.168.1.7:8324'
VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn'
VITE_BASE_URL = 'http://192.168.1.22:8324'
# VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn'

View File

@ -1,3 +1 @@
VITE_NOW_TYPE = 'build'
VITE_BASE_URL = 'https://shop.lihaink.cn'
VITE_BASE_URL = ''

2
.gitignore vendored
View File

@ -8,7 +8,7 @@ pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
@charset "UTF-8";.my-order[data-v-1fde361d]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-1fde361d]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-1fde361d]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-1fde361d]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-1fde361d]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-1fde361d]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-1fde361d]{height:calc(100vh - 100px - 10.2rem);overflow-y:auto}.my-order .order-list .item[data-v-1fde361d]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-1fde361d]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-1fde361d]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-1fde361d]: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-1fde361d]: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-1fde361d]{font-size:.8rem}.my-order .order-list .item .shop[data-v-1fde361d]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-1fde361d]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-1fde361d]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-1fde361d]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-1fde361d]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-1fde361d]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-1fde361d]{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-1fde361d]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-1fde361d]{background-color:#efefef}.my-order .load-end[data-v-1fde361d]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-f0903720]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-f0903720]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-f0903720]{height:4rem;width:8rem;cursor:pointer;display:flex;justify-content:center;align-items:center;font-size:1.2rem;background-color:#f5f5f5;border-radius:1rem 1rem 0 0}.my-order .header-nav .nav-item-active[data-v-f0903720]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-f0903720]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-f0903720]{border-radius:0 0 0 1rem}.my-order .detail[data-v-f0903720]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-f0903720]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-f0903720]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-f0903720]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:2rem;border-bottom:1px solid #eee}.my-order .detail .table .table-info[data-v-f0903720]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-f0903720]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-f0903720]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-f0903720]{height:6rem;box-sizing:border-box;padding:0 1.5rem;position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px 10px #eee;display:flex;justify-content:space-between;align-items:center;background-color:#fff}.my-order .detail .footer .info[data-v-f0903720]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-f0903720]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-f0903720]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-f0903720]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-f0903720]{border-radius:4rem;padding:1.2rem}

View File

@ -1 +0,0 @@
import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-DUM_3Px5.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

View File

@ -1 +0,0 @@
import{o as r,d as o}from"./detail-B501BovZ.js";import{p as t}from"./padding-CwOzKUo2.js";import{c as a,h as s,f as e}from"./index-DUM_3Px5.js";import"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-CPz3lDzO.js";import"./pay-BIYaSPbP.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};

View File

@ -1 +0,0 @@
@charset "UTF-8";.dra-body[data-v-2d33ceca]{width:100%;display:flex;flex-direction:column;text-align:center}[data-v-2d33ceca] .el-upload--picture-card{--el-upload-picture-card-size: 60px !important}[data-v-2d33ceca] .el-upload-list--picture-card .el-upload-list__item{height:60px!important;width:60px!important}.my-shop[data-v-e8828dd9]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll}[data-v-e8828dd9]::-webkit-scrollbar{width:5px}[data-v-e8828dd9]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:20px 0}[data-v-e8828dd9]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}[data-v-e8828dd9]::-webkit-scrollbar-thumb:hover{background-color:#999}.el-menu--horizontal[data-v-e8828dd9]{height:2.5rem}.el-form--inline .el-form-item[data-v-e8828dd9]{margin-right:1rem}

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

View File

@ -1 +0,0 @@
@charset "UTF-8";.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}

View File

@ -1 +0,0 @@
.body[data-v-59a7e82c]{width:100vw;height:100vh;box-sizing:border-box;background-image:url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b84ef202404101425077785.png);background-size:100% 100%;background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.body .login[data-v-59a7e82c]{width:18rem;background-color:#fff;border-radius:2rem;padding:2rem 3rem}.body .login .title[data-v-59a7e82c]{text-align:center;font-size:1.3rem;padding-bottom:2rem}

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

View File

@ -1 +0,0 @@
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-DUM_3Px5.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};

View File

@ -1 +0,0 @@
@charset "UTF-8";.my-order[data-v-e81bdac1]{box-sizing:border-box}.my-order .from[data-v-e81bdac1]{width:100%;padding-bottom:20px;display:grid;grid-template-columns:repeat(5,1fr);gap:20px}.my-order .from .form-card[data-v-e81bdac1]{border-radius:.8rem;height:5rem;background-color:#fff;font-size:1.3rem;font-weight:700;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-order .from .form-card .tips[data-v-e81bdac1]{font-size:.9rem;color:#999;font-weight:400}.my-order .from .red[data-v-e81bdac1]{color:#ff4a00}.my-order .from .green[data-v-e81bdac1]{color:#01c86f}.my-order .table[data-v-e81bdac1]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll}[data-v-e81bdac1]::-webkit-scrollbar{width:5px}[data-v-e81bdac1]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:20px 0}[data-v-e81bdac1]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}[data-v-e81bdac1]::-webkit-scrollbar-thumb:hover{background-color:#999}

View File

@ -1 +0,0 @@
import{h as f,s as g}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-CPz3lDzO.js";import{_ as P,u as b,r as o,b as v,l as x,v as I,c as u,h as p,e,t,x as S,f as l,w,y as C,z as D,C as k}from"./index-DUM_3Px5.js";const a=i=>(C("data-v-e81bdac1"),i=i(),D(),i),B={"element-loading-text":"加载中",class:"my-order"},L={key:0,class:"from"},N={class:"form-card green"},V=a(()=>e("div",{class:"tips"},"今日线上收银金额",-1)),A={class:"form-card green"},O=a(()=>e("div",{class:"tips"},"昨日线上收银金额",-1)),z={class:"form-card green"},E=a(()=>e("div",{class:"tips"},"本月线上收银金额",-1)),R={class:"form-card"},U=a(()=>e("div",{class:"tips"},"今日收银 线上+现金 总金额",-1)),j={class:"form-card"},q=a(()=>e("div",{class:"tips"},"本月收银 线上+现金 总金额",-1)),F={class:"form-card red"},G=a(()=>e("div",{class:"tips"},"今日现金收银金额",-1)),H={class:"form-card red"},J=a(()=>e("div",{class:"tips"},"昨日现金收银金额",-1)),K={class:"form-card red"},M=a(()=>e("div",{class:"tips"},"本月现金收银金额",-1)),Q={class:"form-card"},T=a(()=>e("div",{class:"tips"},"昨日收银 线上+现金 总金额",-1)),W={class:"table"},X={__name:"indexCount",setup(i){const c=b(),_=o([]);k(),o(1),o(null);const h=o({page:1,limit:15,staff_id:c.userInfo.service.service_id}),r=o(!1);o(0),(()=>{f(c.userInfo.service.mer_id,h.value).then(d=>{_.value=d.data})})();const s=o({});return(()=>{r.value=!0,g(c.userInfo.service.mer_id,{staff_id:c.userInfo.service.service_id}).then(d=>{s.value=d.data.data,r.value=!1})})(),(d,$)=>{const n=v("el-table-column"),m=v("el-table"),y=x("loading");return I((u(),p("div",B,[s.value.today?(u(),p("div",L,[e("div",N,[e("div",null,t(s.value.today.payPrice),1),V]),e("div",A,[e("div",null,t(s.value.yesterday.payPrice),1),O]),e("div",z,[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),1),U]),e("div",j,[e("div",null,t(s.value.month.cashPayment+s.value.month.payPrice),1),q]),e("div",F,[e("div",null,t(s.value.today.cashPayment),1),G]),e("div",H,[e("div",null,t(s.value.yesterday.cashPayment),1),J]),e("div",K,[e("div",null,t(s.value.month.cashPayment),1),M]),e("div",Q,[e("div",null,t(s.value.yesterday.cashPayment+s.value.yesterday.payPrice),1),T])])):S("",!0),e("div",W,[l(m,{data:_.value,style:{width:"100%"}},{default:w(()=>[l(n,{prop:"day",label:"日期",width:"260"}),l(n,{prop:"total",label:"订单数量"}),l(n,{prop:"pay_price",label:"总金额"})]),_:1},8,["data"])])])),[[y,r.value]])}}},te=P(X,[["__scopeId","data-v-e81bdac1"]]);export{te as default};

View File

@ -1 +0,0 @@
@charset "UTF-8";.my-order[data-v-80048b20]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll}[data-v-80048b20]::-webkit-scrollbar{width:5px}[data-v-80048b20]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:20px 0}[data-v-80048b20]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}[data-v-80048b20]::-webkit-scrollbar-thumb:hover{background-color:#999}

View File

@ -1 +0,0 @@
import{e as F,a as G,g as J,f as K}from"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-CPz3lDzO.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-DUM_3Px5.js";import{p as oe}from"./pay-BIYaSPbP.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};

View File

@ -1 +0,0 @@
import{o as r,d as t}from"./detail-B501BovZ.js";import{p as o}from"./padding-CwOzKUo2.js";import{c as s,h as a,f as e}from"./index-DUM_3Px5.js";import"./pay.vue_vue_type_style_index_0_scoped_d2507c03_lang-CPz3lDzO.js";import"./pay-BIYaSPbP.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};

View File

@ -1 +0,0 @@
import{_ as e,c as t,h as c}from"./index-DUM_3Px5.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

View File

@ -1 +0,0 @@
.dra-body[data-v-d2507c03]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-d2507c03]{width:25rem;display:flex}.dra-body .header>div[data-v-d2507c03]{flex:1;border:1px solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-d2507c03]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-d2507c03]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-d2507c03]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-d2507c03]{width:100%;height:3rem}.dra-body .card1 .tips[data-v-d2507c03]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.cancel-btn[data-v-d2507c03]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-d2507c03]{width:100%;overflow-x:hidden}.counter[data-v-d2507c03]{padding:20px;border-radius:20px;background-color:#f3f9ff}.counter .received[data-v-d2507c03]{height:58px;padding:0 20px;border:1px solid #1890ff;box-shadow:0 0 3px #1890ff;border-radius:8px;background-color:#fff;font-size:26px;line-height:58px;color:#333}.counter .balance[data-v-d2507c03]{width:100%;box-sizing:border-box;padding:18px 0 18px 10px;text-align:start;font-size:.95rem;color:#303133;display:flex;justify-content:space-between}.counter .balance .money[data-v-d2507c03]{color:#ff4a00}.counter .balance .tips[data-v-d2507c03]{font-size:.8rem;color:#999}.counter .keypad[data-v-d2507c03]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:10px}.counter .keypad .left[data-v-d2507c03]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:10px}.counter .keypad .right[data-v-d2507c03]{display:grid;grid-template-columns:auto;grid-gap:10px}.counter .keypad .el-button[data-v-d2507c03]{height:62px;width:130px;margin:0!important;border:0;border-radius:8px;font-weight:500;font-size:28px!important;line-height:62px;color:#1890ff}.counter .keypad .el-button[data-v-d2507c03]:focus{box-shadow:none}.counter .keypad .enter[data-v-d2507c03]{grid-row-end:span 4;height:134px;line-height:134px;background-color:#1890ff;font-weight:500;font-size:1.35rem!important;color:#fff;position:relative}.counter .keypad .enter-disable[data-v-d2507c03]{background-color:#ccc}

View File

@ -1 +0,0 @@
import{G as e}from"./index-DUM_3Px5.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};

View File

@ -1 +0,0 @@
import{G as e}from"./index-DUM_3Px5.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};

View File

@ -1 +0,0 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31.92 32"><defs><style>.cls-1{fill:#333;fill-opacity:0;}.cls-2,.cls-3{fill:#1890ff;fill-rule:evenodd;isolation:isolate;}.cls-2{opacity:0.8;}</style></defs><title>cashier</title><rect class="cls-1" width="31.92" height="32"/><path class="cls-2" d="M23,12.36,12.28,23.11c-4.83,4.83,2.47,12.13,7.3,7.31L30.33,19.66C35.16,14.83,27.86,7.53,23,12.36Z"/><path class="cls-2" d="M19.64,23.11,8.89,12.36c-4.83-4.83-12.13,2.47-7.31,7.3L12.34,30.42c4.83,4.82,12.13-2.48,7.3-7.31Z"/><path class="cls-3" d="M20.58,11.16,16,15.79l-4.62-4.63a6.21,6.21,0,0,1,0-9.13A6.71,6.71,0,0,1,16,0C20.94.06,25.22,6.52,20.58,11.16Z"/></svg>

Before

Width:  |  Height:  |  Size: 699 B

View File

@ -1,14 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-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-DUM_3Px5.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-jw1reycn.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1 +0,0 @@
@charset "UTF-8";.my-order[data-v-afd5b49f]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-afd5b49f]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-afd5b49f]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-afd5b49f]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-afd5b49f]{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.my-order .header-input[data-v-afd5b49f]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-list[data-v-afd5b49f]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-list .item[data-v-afd5b49f]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .item .top[data-v-afd5b49f]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-afd5b49f]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-afd5b49f]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #2ec479;color:#2ec479;border-radius:.187rem}.my-order .order-list .item .top .cahier2[data-v-afd5b49f]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #ff4a00;color:#ff4a00;border-radius:.187rem}.my-order .order-list .item .top .create-time[data-v-afd5b49f]{font-size:.8rem}.my-order .order-list .item .shop[data-v-afd5b49f]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-afd5b49f]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-afd5b49f]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-afd5b49f]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-afd5b49f]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-afd5b49f]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-afd5b49f]{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-afd5b49f]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-afd5b49f]{background-color:#efefef}.my-order .load-end[data-v-afd5b49f]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order-no-system .header-nav[data-v-afd5b49f]{height:5.5rem}.my-order-no-system .order-list[data-v-afd5b49f]{height:calc(100vh - 18.45rem)}.my-order[data-v-e6e9d4a9]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-e6e9d4a9]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-e6e9d4a9]{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-e6e9d4a9]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-e6e9d4a9]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-e6e9d4a9]{border-radius:0 0 0 1rem}.my-order .detail[data-v-e6e9d4a9]{height:calc(100vh - 10.25rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-e6e9d4a9]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-e6e9d4a9]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-e6e9d4a9]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:2rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-e6e9d4a9]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-e6e9d4a9]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-e6e9d4a9]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-e6e9d4a9]{height:6rem;box-sizing:border-box;padding:0 1.5rem;position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -.0625rem .625rem #eee;display:flex;justify-content:space-between;align-items:center;background-color:#fff}.my-order .detail .footer .info[data-v-e6e9d4a9]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-e6e9d4a9]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-e6e9d4a9]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-e6e9d4a9]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-e6e9d4a9]{border-radius:4rem;padding:1.2rem}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
@charset "UTF-8";.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999}

View File

@ -1 +0,0 @@
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-3-t8Fk7s.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};

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

View File

@ -1 +0,0 @@
import{o as r,d as o}from"./detail-SSwoB7VG.js";import{p as t}from"./padding-DTyMU7Be.js";import{c as a,h as s,f as e}from"./index-3-t8Fk7s.js";import"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import"./moment-Cl4UOzQZ.js";import"./pay-Bt7FIL7i.js";const i={class:"my-card"},h={__name:"index",setup(c){return(d,l)=>(a(),s("div",i,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{h as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
.body[data-v-59a7e82c]{width:100vw;height:100vh;box-sizing:border-box;background-image:url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b84ef202404101425077785.png);background-size:100% 100%;background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.body .login[data-v-59a7e82c]{width:18rem;background-color:#fff;border-radius:2rem;padding:2rem 3rem}.body .login .title[data-v-59a7e82c]{text-align:center;font-size:1.3rem;padding-bottom:2rem}

View File

@ -1 +0,0 @@
import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-3-t8Fk7s.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};

View File

@ -1 +0,0 @@
@charset "UTF-8";.dra-body[data-v-4a30c70d]{width:100%;display:flex;flex-direction:column;text-align:center}[data-v-4a30c70d] .el-upload--picture-card{--el-upload-picture-card-size: 3.75rem !important}[data-v-4a30c70d] .el-upload-list--picture-card .el-upload-list__item{height:3.75rem!important;width:3.75rem!important}.my-shop[data-v-22d63487]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll}[data-v-22d63487]::-webkit-scrollbar{width:.315rem}[data-v-22d63487]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}[data-v-22d63487]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}[data-v-22d63487]::-webkit-scrollbar-thumb:hover{background-color:#999}.el-menu--horizontal[data-v-22d63487]{height:2.5rem}.el-form--inline .el-form-item[data-v-22d63487]{margin-right:1rem}

View File

@ -1 +0,0 @@
import{h as S,i as Y}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{_ as w,u as P,r as o,b as h,j as k,q as N,c as f,h as b,e as t,t as d,s as D,f as r,w as x,g as F,v as M,x as V,A as j}from"./index-3-t8Fk7s.js";import{h as n}from"./moment-Cl4UOzQZ.js";const v=l=>(M("data-v-266c9d86"),l=l(),V(),l),q={"element-loading-text":"加载中",class:"my-order"},A={key:0,class:"from"},B={class:"form-card"},L=v(()=>t("div",{class:"tips"},"今日收银 平台+线上+现金 总金额",-1)),T={class:"form-card"},O=v(()=>t("div",{class:"tips"},"昨日收银 平台+线上+现金 总金额",-1)),E={class:"form-card"},R=v(()=>t("div",{class:"tips"},"本月收银 平台+线上+现金 总金额",-1)),U={class:"table"},z={__name:"indexCount",setup(l){const c=P(),m=o([]),g=j();o(1),o(null);const C=o({page:1,limit:15,staff_id:c.userInfo.service.service_id}),_=o(!1);o(0),(()=>{S(c.userInfo.service.mer_id,C.value).then(s=>{m.value=s.data})})();const a=o({});(()=>{_.value=!0,Y(c.userInfo.service.mer_id,{staff_id:c.userInfo.service.service_id}).then(s=>{a.value=s.data.data,_.value=!1})})();const I=(s,p)=>{let e="",i={};Number(n(s.day).format("MM"))>Number(n().format("MM"))?e=n().format("YYYY")-1+"-"+s.day.split("-").join("-"):e=n().format("YYYY")+"-"+s.day.split("-").join("-"),i.date=e,p.no==2&&(i.payType=1),p.no==3&&(i.payType=2),g.push({path:"order",query:i})};return(s,p)=>{const e=h("el-table-column"),i=h("el-table"),u=k("loading");return N((f(),b("div",q,[a.value.today?(f(),b("div",A,[t("div",B,[t("div",null,d((a.value.today.cashPayment+a.value.today.payPrice).toFixed(2)),1),L]),t("div",T,[t("div",null,d((a.value.yesterday.cashPayment+a.value.yesterday.payPrice).toFixed(2)),1),O]),t("div",E,[t("div",null,d((a.value.month.cashPayment+a.value.month.payPrice).toFixed(2)),1),R])])):D("",!0),t("div",U,[r(i,{data:m.value,style:{width:"100%"},onCellClick:I},{default:x(()=>[r(e,{prop:"day",label:"日期",width:"260"}),r(e,{prop:"total",label:"订单数量"}),r(e,{prop:"cash_payment",label:"现金收银金额"}),r(e,{prop:"cash_registe",label:"线上收银金额"}),r(e,{prop:"pay_price",label:"平台交易额"}),r(e,{label:"总金额"},{default:x(y=>[F(d(((+y.row.pay_price||0)+(+y.row.cash_payment||0)).toFixed(2)),1)]),_:1})]),_:1},8,["data"])])])),[[u,_.value]])}}},W=w(z,[["__scopeId","data-v-266c9d86"]]);export{W as default};

View File

@ -1 +0,0 @@
@charset "UTF-8";.my-order[data-v-266c9d86]{box-sizing:border-box}.my-order .from[data-v-266c9d86]{width:100%;padding-bottom:1.25rem;display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem}.my-order .from .form-card[data-v-266c9d86]{border-radius:.8rem;height:5rem;background-color:#fff;font-size:1.3rem;font-weight:700;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-order .from .form-card .tips[data-v-266c9d86]{font-size:.9rem;color:#999;font-weight:400}.my-order .from .red[data-v-266c9d86]{color:#ff4a00}.my-order .from .green[data-v-266c9d86]{color:#01c86f}.my-order .table[data-v-266c9d86]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll;cursor:pointer}[data-v-266c9d86]::-webkit-scrollbar{width:.315rem}[data-v-266c9d86]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}[data-v-266c9d86]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}[data-v-266c9d86]::-webkit-scrollbar-thumb:hover{background-color:#999}

View File

@ -1 +0,0 @@
@charset "UTF-8";.my-order[data-v-3c901223]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll}[data-v-3c901223]::-webkit-scrollbar{width:.315rem}[data-v-3c901223]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}[data-v-3c901223]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}[data-v-3c901223]::-webkit-scrollbar-thumb:hover{background-color:#999}

View File

@ -1 +0,0 @@
import{e as F,a as G,g as J,f as K}from"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import{_ as Q,u as W,r as s,b as d,j as X,q as Y,c,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-3-t8Fk7s.js";import{p as oe}from"./pay-Bt7FIL7i.js";const le=v=>(te("data-v-3c901223"),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"},ce=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ue={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"),u=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((c(),m("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(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(u,{prop:"group_order_id",label:"ID",width:"100"}),t(u,{prop:"order_sn",label:"订单号",width:"260"}),t(u,{prop:"total_price",label:"订单金额"}),t(u,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(c(),m("span",ne,"已支付")):(c(),m("span",re,"未支付"))]),_:1}),t(u,{prop:"create_time",label:"订单创建时间"}),t(u,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(c(),m("span",ie,Z(l.row.pay_time),1)):(c(),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",ue,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(c(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(c(),I(p,{key:1,type:"primary",onClick:U},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ce]),_:1},8,["modelValue"])])),[[M,y.value]])}}},fe=Q(pe,[["__scopeId","data-v-3c901223"]]);export{fe as default};

View File

@ -1 +0,0 @@
import{o as r,d as t}from"./detail-SSwoB7VG.js";import{p as o}from"./padding-DTyMU7Be.js";import{c as s,h as a,f as e}from"./index-3-t8Fk7s.js";import"./pay.vue_vue_type_style_index_0_scoped_7f298acd_lang-BaAcCNPN.js";import"./moment-Cl4UOzQZ.js";import"./pay-Bt7FIL7i.js";const i={class:"my-card"},h={__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{h as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as e,c as t,h as c}from"./index-3-t8Fk7s.js";const n={},o={style:{width:"1rem",height:"100%"}};function r(s,_){return t(),c("div",o)}const i=e(n,[["render",r]]);export{i as p};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
.dra-body[data-v-7f298acd]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-7f298acd]{width:25rem;display:flex}.dra-body .header>div[data-v-7f298acd]{flex:1;border:.0625rem solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-7f298acd]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-7f298acd]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-7f298acd]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-7f298acd]{width:100%;height:3rem}.dra-body .card1 .tips[data-v-7f298acd]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.cancel-btn[data-v-7f298acd]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-7f298acd]{width:100%;overflow-x:hidden}.counter[data-v-7f298acd]{padding:1.25rem;border-radius:1.25rem;background-color:#f3f9ff}.counter .received[data-v-7f298acd]{height:3rem;padding:0 1.25rem;border:.0625rem solid #1890ff;box-shadow:0 0 .18rem #1890ff;border-radius:.5rem;background-color:#fff;font-size:1.62rem;line-height:3rem;color:#333}.counter .balance[data-v-7f298acd]{width:100%;box-sizing:border-box;padding:1.12rem 0 1.12rem .625rem;text-align:start;font-size:.95rem;color:#303133;display:flex;justify-content:space-between}.counter .balance .money[data-v-7f298acd]{color:#ff4a00}.counter .balance .tips[data-v-7f298acd]{font-size:.8rem;color:#999}.counter .keypad[data-v-7f298acd]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:.625rem}.counter .keypad .left[data-v-7f298acd]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:.625rem}.counter .keypad .right[data-v-7f298acd]{display:grid;grid-template-columns:auto;grid-gap:.625rem}.counter .keypad .el-button[data-v-7f298acd]{height:3.875rem;width:8.125rem;margin:0!important;border:0;border-radius:.5rem;font-weight:500;font-size:1.75rem!important;line-height:3.87rem;color:#1890ff}.counter .keypad .el-button[data-v-7f298acd]:focus{box-shadow:none}.counter .keypad .enter[data-v-7f298acd]{grid-row-end:span 4;height:8.37rem;line-height:8.37rem;background-color:#1890ff;font-weight:500;font-size:1.35rem!important;color:#fff;position:relative}.counter .keypad .enter-disable[data-v-7f298acd]{background-color:#ccc}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

View File

@ -1 +0,0 @@
import{G as t}from"./index-3-t8Fk7s.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};

View File

@ -1 +0,0 @@
import{G as e}from"./index-3-t8Fk7s.js";function u(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 n(t,r){return e.get(`server/${t}/product/title`,{params:r})}function i(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 g(t,r,s){return e.get(`server/${t}/product/detail/${r}`,{params:s})}function l(t){return e.get("product/spu/lst",{params:t})}function $(t,r){return e.get(`store/merchant/category/lst/${t}`,{params:r})}export{l as a,d as b,c,f as d,n as e,i as f,p as g,$ as m,g as p,u as s,o as u};

1
dist/cashier.svg vendored
View File

@ -1 +0,0 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31.92 32"><defs><style>.cls-1{fill:#333;fill-opacity:0;}.cls-2,.cls-3{fill:#1890ff;fill-rule:evenodd;isolation:isolate;}.cls-2{opacity:0.8;}</style></defs><title>cashier</title><rect class="cls-1" width="31.92" height="32"/><path class="cls-2" d="M23,12.36,12.28,23.11c-4.83,4.83,2.47,12.13,7.3,7.31L30.33,19.66C35.16,14.83,27.86,7.53,23,12.36Z"/><path class="cls-2" d="M19.64,23.11,8.89,12.36c-4.83-4.83-12.13,2.47-7.31,7.3L12.34,30.42c4.83,4.82,12.13-2.48,7.3-7.31Z"/><path class="cls-3" d="M20.58,11.16,16,15.79l-4.62-4.63a6.21,6.21,0,0,1,0-9.13A6.71,6.71,0,0,1,16,0C20.94.06,25.22,6.52,20.58,11.16Z"/></svg>

Before

Width:  |  Height:  |  Size: 699 B

49
dist/index.html vendored
View File

@ -1,49 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./cashier.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>里海收银系统</title>
<style>
/* 小屏幕 */
@media screen and (max-width: 576px) {
html {
font-size: 0.625rem;
}
}
/* 中等屏幕 */
@media screen and (min-width: 577px) and (max-width: 992px) {
html {
font-size: 0.625rem;
}
}
/* 大屏幕 */
@media screen and (min-width: 993px) and (max-width: 1336px) {
html {
font-size: 0.6875rem;
}
}
/* 大屏幕 */
@media screen and (min-width: 1336px) and (max-width: 1900px) {
html {
font-size: 0.75rem;
}
}
/* 大屏幕 */
@media screen and (min-width: 1900px){
html {
font-size: 1rem;
}
}
</style>
<script type="module" crossorigin src="./assets/index-3-t8Fk7s.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-BbwxVKIL.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

1
dist/vite.svg vendored
View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,45 +1,10 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/cashier.svg" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>里海收银系统</title>
<style>
/* 小屏幕 */
@media screen and (max-width: 576px) {
html {
font-size: 10px;
}
}
/* 中等屏幕 */
@media screen and (min-width: 577px) and (max-width: 992px) {
html {
font-size: 10px;
}
}
/* 大屏幕 */
@media screen and (min-width: 993px) and (max-width: 1336px) {
html {
font-size: 11px;
}
}
/* 大屏幕 */
@media screen and (min-width: 1336px) and (max-width: 1900px) {
html {
font-size: 12px;
}
}
/* 大屏幕 */
@media screen and (min-width: 1900px){
html {
font-size: 16px;
}
}
</style>
</head>
<body>
<div id="app"></div>

20
package-lock.json generated
View File

@ -11,9 +11,7 @@
"@element-plus/icons-vue": "^2.3.1",
"axios": "^1.6.8",
"element-plus": "^2.6.3",
"lodash": "^4.17.21",
"mitt": "^3.0.1",
"moment": "^2.30.1",
"pinia": "^2.1.7",
"sass": "^1.72.0",
"vue": "^3.4.21",
@ -21,7 +19,6 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"postcss-pxtorem": "^6.1.0",
"typescript": "^5.2.2",
"vite": "^5.2.0",
"vue-tsc": "^2.0.6"
@ -1317,14 +1314,6 @@
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
"integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="
},
"node_modules/moment": {
"version": "2.30.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
"engines": {
"node": "*"
}
},
"node_modules/muggle-string": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz",
@ -1460,15 +1449,6 @@
"node": "^10 || ^12 || >=14"
}
},
"node_modules/postcss-pxtorem": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/postcss-pxtorem/-/postcss-pxtorem-6.1.0.tgz",
"integrity": "sha512-ROODSNci9ADal3zUcPHOF/K83TiCgNSPXQFSbwyPHNV8ioHIE4SaC+FPOufd8jsr5jV2uIz29v1Uqy1c4ov42g==",
"dev": true,
"peerDependencies": {
"postcss": "^8.0.0"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",

View File

@ -5,17 +5,14 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build --mode development",
"build:prod": "vue-tsc && vite build",
"build": "vue-tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"axios": "^1.6.8",
"element-plus": "^2.6.3",
"lodash": "^4.17.21",
"mitt": "^3.0.1",
"moment": "^2.30.1",
"pinia": "^2.1.7",
"sass": "^1.72.0",
"vue": "^3.4.21",
@ -23,7 +20,6 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"postcss-pxtorem": "^6.1.0",
"typescript": "^5.2.2",
"vite": "^5.2.0",
"vue-tsc": "^2.0.6"

View File

@ -1,9 +0,0 @@
module.exports = {
plugins: {
'postcss-pxtorem': {
rootValue: 16, // 设计稿宽度的 1/10
propList: ['*'], // 转换所有属性的px值
// selectorBlackList: ['html'], // 排除html选择器
},
},
};

View File

@ -1 +0,0 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31.92 32"><defs><style>.cls-1{fill:#333;fill-opacity:0;}.cls-2,.cls-3{fill:#1890ff;fill-rule:evenodd;isolation:isolate;}.cls-2{opacity:0.8;}</style></defs><title>cashier</title><rect class="cls-1" width="31.92" height="32"/><path class="cls-2" d="M23,12.36,12.28,23.11c-4.83,4.83,2.47,12.13,7.3,7.31L30.33,19.66C35.16,14.83,27.86,7.53,23,12.36Z"/><path class="cls-2" d="M19.64,23.11,8.89,12.36c-4.83-4.83-12.13,2.47-7.31,7.3L12.34,30.42c4.83,4.82,12.13-2.48,7.3-7.31Z"/><path class="cls-3" d="M20.58,11.16,16,15.79l-4.62-4.63a6.21,6.21,0,0,1,0-9.13A6.71,6.71,0,0,1,16,0C20.94.06,25.22,6.52,20.58,11.16Z"/></svg>

Before

Width:  |  Height:  |  Size: 699 B

View File

@ -3,11 +3,7 @@ import { onMounted } from 'vue'
onMounted(() => {
document.body.style.setProperty('--el-color-primary', '#1890ff');
document.body.style.setProperty('--el-upload-picture-card-size', '60px');
document.body.style.setProperty('--el-upload-list-picture-card-size', '60px');
})
const screenWidth = window.innerWidth;
console.log('当前屏幕宽度:', screenWidth);
</script>
<template>
@ -18,10 +14,4 @@ const screenWidth = window.innerWidth;
.el-button:focus{
outline: none;
}
// input
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
</style>

View File

@ -4,7 +4,7 @@ import request from '@/utils/axios.js'
* @description 商品列表
*/
export function storeListApi(id, data) {
return request.get(`server/${id}/product/lst`, { params: data })
return request.get(`server/${id}/product/lst`, { params: data })
}
/**
@ -20,59 +20,3 @@ export function getAttrValue(id, data) {
export function userFreeTrialApi(id, data) {
return request.post(`user_free_trial/${id}`, data)
}
/**
* @description 商品状态分类数量
*/
export function productTitleApi(id, data) {
return request.get(`server/${id}/product/title`, { params: data })
}
/**
* @description 上下架
*/
export function productStatusApi(mer_id, id, data) {
return request.post(`server/${mer_id}/product/status/${id}`, data)
}
/**
* @description 平台分类
*/
export function categoryListApi(mer_id, data) {
return request.get(`server/${mer_id}/category/list`, { params: data })
}
/**
* @description 添加商品
*/
export function productCreateApi(mer_id, data) {
return request.post(`server/${mer_id}/product/create`, data)
}
/**
* @description 编辑商品
*/
export function productUpdateApi(mer_id, id, data) {
return request.post(`server/${mer_id}/product/update/${id}`, data)
}
/**
* @description 商品详情
*/
export function productDetailApi(mer_id, id, data) {
return request.get(`server/${mer_id}/product/detail/${id}`, { params: data })
}
/**
* @description 批发商品列表
*/
export function saleStoreListApi(data) {
return request.get(`product/spu/lst`, { params: data })
}
/**
* @description 店铺商品分类
*/
export function merchantCategoryListApi(id, data) {
return request.get(`store/merchant/category/lst/${id}`, { params: data })
}

View File

@ -64,13 +64,6 @@ export function orderListApi(id, data) {
return request.get(`admin/${id}/order_list`, { params: data })
}
/**
* @description 核销订单列表
*/
export function verifierOrderListApi(id, code) {
return request.get(`verifier/${id}/order/${code}`)
}
/**
* @description 未支付订单列表
*/
@ -83,33 +76,4 @@ export function groupOrderListApi(id, data) {
*/
export function orderLadingApi(data) {
return request.get(`order_lading`, { params: data })
}
/**
* @description 核销
*/
export function verifierApi(mer_id, id, data) {
return request.post(`verifier/${mer_id}/${id}`, data)
}
/**
* @description 统计
*/
export function statisticsApi(mer_id, data) {
return request.get(`admin/${mer_id}/statistics`, { params: data })
}
/**
* @description 统计列表
*/
export function orderPriceApi(mer_id, 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 })
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

View File

@ -1,18 +1,14 @@
<script setup>
import { ref, watch, nextTick, computed, onMounted, onUnmounted } from "vue";
import { ref, watch, nextTick, computed } from "vue";
import { orderCreateApi, orderStatusApi, orderPayApi } from "@/api/store.js";
import { ElMessage } from "element-plus";
import { audioplay } from "@/utils/audio.js";
import mitt from "@/utils/mitt.js";
import { useUserStore } from "@/store/user.js";
const drawer = ref(false);
const active = ref(1);
const input = ref("");
const codeRef = ref("");
const userStore = useUserStore();
const cancelClick = () => {
beforeClose();
};
@ -23,8 +19,7 @@ const open = () => {
loading.value = false;
input.value = "";
reLoad.value = true;
codeRef.value?.focus();
changeActive(active.value);
codeRef.value.focus();
}, 300);
});
};
@ -33,14 +28,8 @@ const changeActive = (e) => {
active.value = e;
if (active.value == 2) {
//
window.addEventListener("keydown", keyboard);
} else{
window.removeEventListener("keydown", keyboard);
nextTick(()=>{
input.value = "";
codeRef.value?.focus();
})
}
document.addEventListener("keydown", keyboard);
} else document.removeEventListener("keydown", keyboard);
};
const form = ref({});
@ -51,7 +40,7 @@ const setForm = (e) => {
};
const setRePay = (e) => {
form.value.order_price = e.price;
form.value.total_price = e.price;
order_id.value = e.order_id;
};
@ -76,42 +65,29 @@ const numList = ref([
let timecount = 0; //
const regexWechat = /^(10|11|12|13|14|15)\d{16}$/; // 10-1518
const regexPay = /^(25|26|27|28|29|30)\d{14,22}$/; // 25-3016-24
const order_id = ref("");
//
const handleEnter = () => {
loading.value = true;
codeRef.value.blur();
if (order_id.value) orderPay(order_id.value);
else {
let pay_type;
if (regexWechat.test(input.value)) pay_type = "micropay";
else if (regexPay.test(input.value)) pay_type = "alipayBar";
else {
loading.value = false;
input.value = "";
codeRef.value.focus();
return ElMessage.error("请输入正确的支付码");
}
else
orderCreateApi({
address_id: "",
key: form.value.key,
cart_id: cart_id.value,
pay_type: pay_type,
pay_type: "micropay",
auth_code: input.value,
staff_id: userStore.userInfo.service.service_id,
source: 300,
})
.then((res) => {
if (res.status == 200 && (res.message == "支付成功" || res.message == "success")) {
if (res.status == 200 && res.message == "支付成功") {
drawer.value = false;
ElMessage({
message: res.message=='success'?'支付成功':res.message,
message: res.message,
type: "success",
});
audioplay(res.data.message||res.data.result.message);
audioplay(res.data.message);
beforeClose();
} else {
if (!res.data.group_order_sn) {
@ -135,38 +111,21 @@ const handleEnter = () => {
codeRef.value?.focus();
});
});
}
};
const orderPay = (id) => {
let query;
if (active.value == 1) {
let pay_type;
if (regexWechat.test(input.value)) pay_type = "micropay";
else if (regexPay.test(input.value)) pay_type = "alipayBar";
else {
loading.value = false;
input.value = "";
codeRef.value.focus();
return ElMessage.error("请输入正确的支付码");
}
query = {
type: pay_type,
auth_code: input.value,
};
} else
query = {
type: "cash_payment",
};
orderPayApi(id, query)
orderPayApi(id, {
type: "micropay",
auth_code: input.value,
})
.then((res) => {
if (res.status == 200 && (res.message == "支付成功" || res.message == "success")) {
if (res.status == 200 && res.message == "支付成功") {
drawer.value = false;
ElMessage({
message: res.message=='success'?'支付成功':res.message,
message: res.message,
type: "success",
});
audioplay(res.data.message||res.data.result.message);
audioplay(res.data.message);
beforeClose();
} else {
order_id.value = res.data.group_order_id;
@ -186,7 +145,6 @@ const orderPay = (id) => {
const count = ref(0); // 3, 3,
const getOrderStatus = (id) => {
if (!id) return;
count.value++;
timecount += 5000;
orderStatusApi({
@ -231,7 +189,6 @@ const getOrderStatus = (id) => {
};
const beforeClose = () => {
window.removeEventListener("keydown", keyboard);
reLoad.value = false;
loading.value = false;
input.value = "";
@ -248,7 +205,6 @@ defineExpose({
drawer,
setForm,
setRePay,
beforeClose
});
const collectionArray = ref([]);
@ -294,63 +250,53 @@ const numTap = (item) => {
};
//
const cashBnt = () => {
if (
changePrice.value === "" ||
changePrice.value === null ||
changePrice.value === undefined ||
+collection.value < +form.value.order_price
) return ElMessage.error("收款金额应该大于等于应收金额");
if (order_id.value) orderPay(order_id.value);
else
orderCreateApi({
address_id: "",
key: form.value.key,
cart_id: cart_id.value,
pay_type: "cash_payment",
staff_id: userStore.userInfo.service.service_id,
})
.then((res) => {
if (res.status == 200 && res.message == "支付成功") {
drawer.value = false;
ElMessage({
if(changePrice.value!=''&&changePrice.value>=0) orderCreateApi({
address_id: "",
key: form.value.key,
cart_id: cart_id.value,
pay_type: "cash_payment",
source: 300,
})
.then((res) => {
if (res.status == 200 && res.message == "支付成功") {
drawer.value = false;
ElMessage({
message: res.message,
type: "success",
});
audioplay(res.data.message);
beforeClose();
} else {
if (!res.data.group_order_sn) {
order_id.value = res.data.result.order_id;
collection.value = "";
collectionArray.value = [];
loading.value = false;
return ElMessage({
message: res.message,
type: "success",
type: "error",
});
changeActive(1);
audioplay(res.data.message);
beforeClose();
} else {
if (!res.data.group_order_sn) {
order_id.value = res.data.result.order_id;
collection.value = "";
collectionArray.value = [];
loading.value = false;
return ElMessage({
message: res.message,
type: "error",
});
} else {
order_id.value = res.data.group_order_id;
count.value = 0;
timecount = 0;
getOrderStatus(res.data.group_order_sn);
}
order_id.value = res.data.group_order_id;
count.value = 0;
timecount = 0;
getOrderStatus(res.data.group_order_sn);
}
})
.catch((err) => {
loading.value = false;
});
}
})
.catch((err) => {
loading.value = false;
});
};
//
const keyboard = (event) => {
let e = event || window.event;
let key = e.keyCode;
if(key == 37)return changeActive(2);
if(key == 120)return mitt.emit('F9');
if(key == 27)return beforeClose();
event.stopPropagation(); //
event.preventDefault(); //
if (true) {
event.stopPropagation(); //
event.preventDefault(); //
}
switch (key) {
case 96:
case 48:
@ -406,34 +352,11 @@ const keyboard = (event) => {
break;
}
};
//
const isFocus = ref(false)
//
const aleft = () => {
if(!drawer.value||(isFocus.value&&input.value.length>0)) return;
if(active.value==2) return changeActive(1);
};
const aright = () => {
if(!drawer.value||(isFocus.value&&input.value.length>0)) return;
if(active.value==1) return changeActive(2);
};
onMounted(() => {
mitt.on("left", aleft);
mitt.on("right", aright);
});
onUnmounted(() => {
mitt.off("left", aleft);
mitt.off("right", aright);
});
</script>
<template>
<el-drawer
size="60rem"
:size="800"
v-model="drawer"
direction="rtl"
@open="open"
@ -450,7 +373,7 @@ onUnmounted(() => {
:class="{ active: active == 1 }"
@click="changeActive(1)"
>
微信/支付宝
微信
</div>
<div
class="right"
@ -477,8 +400,6 @@ onUnmounted(() => {
class="code-input"
placeholder="请点击输入框聚焦扫码或输入编码号"
@keyup.enter="handleEnter"
@focus="isFocus=true;"
@blur="isFocus=false;"
/>
<div class="tips"></div>
</div>
@ -492,13 +413,9 @@ onUnmounted(() => {
>
</div>
<div class="balance" v-if="changePrice >= 0">
<div>需找零()<span class="money">{{ changePrice }}</span></div>
<div class="tips">按回车(Enter)确认支付</div>
</div>
<div class="balance" v-else>
<div>不够找零, 请支付更多金额</div>
<div class="tips">按下小键盘输入金额</div>
需找零()<span class="money">{{ changePrice }}</span>
</div>
<div class="balance" v-else>不够找零, 请支付更多金额</div>
<div class="keypad">
<div class="left">
<el-button
@ -513,9 +430,7 @@ onUnmounted(() => {
><el-icon><Delete /></el-icon
></el-button>
<el-button @click="delNum(-1)">C</el-button>
<el-button class="enter" :class="{'enter-disable': +collection < +form.order_price}" :disabled="+collection < +form.order_price" @click="cashBnt">
确认
</el-button>
<el-button class="enter" @click="cashBnt">确认</el-button>
</div>
</div>
</div>
@ -571,7 +486,7 @@ onUnmounted(() => {
.tips {
width: 38rem;
height: 16rem;
background: url('@/assets/pay.png');
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a4971202404051443356430.png");
background-size: 100% 100%;
background-repeat: no-repeat;
}
@ -593,68 +508,61 @@ onUnmounted(() => {
}
.counter {
padding: 1.25rem;
border-radius: 1.25rem;
padding: 20px;
border-radius: 20px;
background-color: #f3f9ff;
.received {
height: 3.0rem;
padding: 0 1.25rem;
border: 1px solid #1890ff;
box-shadow: 0 0 0.18rem #1890ff;
border-radius: 0.5rem;
height: 58px;
padding: 0 20px;
border: 1px solid #eeeeee;
border-radius: 8px;
background-color: #ffffff;
font-size: 1.62rem;
line-height: 3.0rem;
color: #333;
font-size: 26px;
line-height: 58px;
color: #303133;
}
.balance {
width: 100%;
box-sizing: border-box;
padding: 1.12rem 0 1.12rem 0.625rem;
padding: 18px 0 18px 10px;
text-align: start;
font-size: 0.95rem;
font-size: 15px;
color: #303133;
display: flex;
justify-content: space-between;
.money {
color: #ff4a00;
}
.tips{
font-size: 0.8rem;
color: #999;
}
}
.keypad {
display: grid;
grid-template-columns: auto auto auto auto;
grid-gap: 0.625rem;
grid-gap: 10px;
.left {
grid-column-end: span 3;
display: grid;
grid-template-columns: auto auto auto;
grid-gap: 0.625rem;
grid-gap: 10px;
}
.right {
display: grid;
grid-template-columns: auto;
grid-gap: 0.625rem;
grid-gap: 10px;
}
.el-button {
height: 3.875rem;
width: 8.125rem;
height: 62px;
width: 130px;
margin: 0 !important;
border: 0;
border-radius: 0.5rem;
border-radius: 8px;
font-weight: 500;
font-size: 1.75rem !important;
line-height: 3.87rem;
font-size: 28px !important;
line-height: 62px;
color: #1890ff;
&:focus {
@ -664,16 +572,12 @@ onUnmounted(() => {
.enter {
grid-row-end: span 4;
height: 8.37rem;
line-height: 8.37rem;
height: 134px;
background-color: #1890ff;
font-weight: 500;
font-size: 1.35rem !important;
font-size: 22px !important;
line-height: 134px;
color: #ffffff;
position: relative;
}
.enter-disable {
background-color: #ccc;
}
}
}

View File

@ -1,6 +0,0 @@
const config = {
url: import.meta.env.VITE_BASE_URL + '/api',
upload: import.meta.env.VITE_BASE_URL + '/api/upload/image/field',
}
export default config;

View File

@ -1,34 +1,6 @@
<script setup>
import myHeader from "./myHeader.vue";
import myAside from "./myAside.vue";
import { ref, nextTick, onMounted, onUnmounted } from "vue";
import mitt from "@/utils/mitt.js";
const KeyboardEvent = (e)=>{
console.log('按下', e.keyCode);
if(e.keyCode == 16) mitt.emit('shift');
if(e.keyCode == 120) mitt.emit('F9');
if(e.keyCode == 13) mitt.emit('enter');
if(e.keyCode == 37) mitt.emit('left');
if(e.keyCode == 39) mitt.emit('right');
if(e.keyCode == 38) mitt.emit('up');
if(e.keyCode == 40) mitt.emit('down');
if(e.keyCode == 46) mitt.emit('delete');
if(e.keyCode == 45) mitt.emit('insert');
}
onMounted(()=>{
window.addEventListener('keydown', KeyboardEvent);
console.log('开启键盘监听');
})
onUnmounted(()=>{
window.removeEventListener('keydown', KeyboardEvent);
console.log('关闭键盘监听');
})
</script>
<template>
@ -38,18 +10,13 @@ onUnmounted(()=>{
<myHeader></myHeader>
</el-header>
<el-container>
<el-aside width="6.25rem">
<el-aside width="100px">
<myAside></myAside>
</el-aside>
<el-main style="color: #333;">
<router-view v-slot="{ Component }" class="my-main">
<transition name="el-zoom-in-top">
<component :is="Component"></component>
</transition>
</router-view>
<!-- <transition name="el-zoom-in-top">
<el-main>
<transition name="el-zoom-in-top">
<router-view class="my-main"></router-view>
</transition> -->
</transition>
</el-main>
</el-container>
</el-container>
@ -63,18 +30,16 @@ onUnmounted(()=>{
background-color: #001529;
.el-header {
color: #fff;
height: 4rem;
}
.el-aside {
color: #fff;
}
.el-main {
background-color: #f5f5f5;
width: calc(100vw - 6.25rem);
height: calc(100vh - 4rem);
width: calc(100vw - 100px);
height: calc(100vh - 60px);
border-radius: 2rem 0 0 0;
overflow-y: scroll;
padding: 1rem;
.my-main {
height: 100%;

View File

@ -1,118 +1,55 @@
<script setup>
import { useRoute, useRouter } from "vue-router";
import { ref, onMounted, onUnmounted } from "vue";
import mitt from "@/utils/mitt.js";
import { useRoute, useRouter } from 'vue-router'
const router = useRouter();
const route = useRoute();
const router = useRouter()
const route = useRoute()
const navTo = (name) => {
router.push({ name });
};
const list = ref([
{ name: "home", title: "收银", ico: "Sell", count: 0 },
{ name: "order", title: "收银订单", ico: "DataLine", count: 0 },
{ name: "orderSystem", title: "平台订单", ico: "DataAnalysis", count: 0 },
{ name: "saleHome", title: "批发", ico: "Van", count: 0 },
{ name: "saleOrder", title: "批发订单", ico: "Tickets", count: 0 },
{ name: "convert", title: "核销", ico: "FullScreen", count: 0 },
{ name: "shop", title: "商品", ico: "ShoppingBag", count: 0 },
{ name: "orderCount", title: "订单统计", ico: "PieChart", count: 0 },
]);
const aup = () => {
let index = list.value.findIndex((item) => item.name == route.name);
if (index == 0) index = list.value.length;
if (index > 0) navTo(list.value[index - 1].name);
};
const adown = () => {
let index = list.value.findIndex((item) => item.name == route.name);
if (index == list.value.length - 1) index = -1;
if (index < list.value.length - 1) navTo(list.value[index + 1].name);
};
onMounted(() => {
mitt.on("up", aup);
mitt.on("down", adown);
});
router.push({ name })
}
onUnmounted(() => {
mitt.off("aup", aup);
mitt.off("adown", adown);
});
</script>
<template>
<div class="my-card">
<div
v-for="item in list"
:key="item.name"
class="list-item"
:class="{ active: route.name == item.name }"
@click="navTo(item.name)"
>
<el-icon size="2rem">
<component :is="item.ico" />
</el-icon>
<div>{{ item.title }}</div>
<div v-if="item.count" class="badge">{{ item.count }}</div>
<div class="my-card">
<div class="list-item" :class="{'active': route.name=='home'}" @click="navTo('home')">
<el-icon size="30"><Sell /></el-icon>
<div>收银</div>
</div>
<div class="list-item" :class="{'active': route.name=='orderList'}" @click="navTo('orderList')">
<el-icon size="30"><DataLine /></el-icon>
<div>订单</div>
</div>
<div class="list-item" :class="{'active': route.name=='shop'}" @click="navTo('shop')">
<el-icon size="30"><ShoppingBag /></el-icon>
<div>商品</div>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.my-card {
width: 100%;
height: calc(100vh - 100px);
display: flex;
flex-direction: column;
align-items: center;
padding-top: 1.5rem;
overflow: auto;
.list-item {
width: 4.5rem;
height: 4.5rem;
border-radius: 0.7rem;
cursor: pointer;
.my-card{
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 1.2rem;
position: relative;
padding-top: 1.5rem;
.list-item{
width: 4.5rem;
height: 4.5rem;
border-radius: 0.7rem;
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 1.2rem;
&.active {
background-color: #1890ff;
transition: 300ms;
&.active {
background-color: #1890ff;
transition: 300ms;
}
}
.badge{
position: absolute;
top: -0.5rem;
right: -0.5rem;
background-color: #ff4a00;
font-size: 0.7rem;
padding: 0.2rem 0.5rem;
border-radius: 2rem;
}
}
}
/* 修改滚动条的样式 */
::-webkit-scrollbar {
display: none; /* 隐藏滚动条 */
}
/* 设置滚动条的轨道样式 */
::-webkit-scrollbar-track {
background-color: #f1f1f1; /* 设置轨道的背景色 */
margin: 1.25rem 0;
}
/* 设置滚动条的滑块样式 */
::-webkit-scrollbar-thumb {
background-color: #ccc; /* 设置滑块的背景色 */
border-radius: 0.315rem; /* 设置滑块的圆角 */
}
/* 设置滚动条鼠标悬停时的滑块样式 */
::-webkit-scrollbar-thumb:hover {
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
}
</style>
</style>

View File

@ -38,11 +38,9 @@ const onLogout = () => {
<template>
<div class="my-card">
<div class="card-header">
<div style="width: 4.5rem;">
<el-image style="height: 2.5rem;width: 2.5rem;margin: 0 auto;"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"
></el-image>
</div>
<el-image style="height: 3rem;width: 3rem;"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/56a52202404051428413664.png"
></el-image>
<div class="card-title">里海收银系统</div>
</div>
<div class="card-body">
@ -82,6 +80,7 @@ const onLogout = () => {
align-items: center;
.card-title {
font-size: 1.6rem;
margin-left: 1rem;
}
}
}

View File

@ -9,60 +9,27 @@ const routes = [
name: 'layout',
component: layout,
redirect: '/home',
meta: { title: '里海收银系统' },
children: [
{
path: '/home',
name: 'home',
meta: { title: '收银' },
component: () => import('@/views/home/index.vue'),
},
{
path: '/order',
name: 'order',
meta: { title: '收银订单' },
component: () => import('@/views/order/index.vue'),
},
{
path: '/orderSystem',
name: 'orderSystem',
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: '/home',
name: 'home',
component: () => import('@/views/home/index.vue'),
},
{
path: '/order',
name: 'order',
component: () => import('@/views/order/index.vue'),
},
{
path: '/orderList',
name: 'orderList',
meta: { title: '统计' },
component: () => import('@/views/order/indexList.vue'),
},
{
path: '/orderCount',
name: 'orderCount',
meta: { title: '统计' },
component: () => import('@/views/order/indexCount.vue'),
},
},
{
path: '/shop',
name: 'shop',
component: () => import('@/views/shop/index.vue'),
},
{
path: '/convert',
name: 'convert',
component: () => import('@/views/convert/index.vue'),
}
}
]
},
{

View File

@ -1,6 +1,5 @@
export const audioplay = (text) => {
if(!text) return;
let ssu = new window.SpeechSynthesisUtterance(text);
window.speechSynthesis.speak(ssu);
}

View File

@ -2,10 +2,9 @@ import axios from "axios";
import { ElMessage } from "element-plus";
import router from "@/router/index.js";
import { useUserStore } from "../store/user";
import config from "@/config";
const request = axios.create({
baseURL: config.url,
baseURL: import.meta.env.VITE_BASE_URL + '/api',
timeout: 10000
})

View File

@ -1,3 +0,0 @@
import miit from "mitt"
export default miit()

View File

@ -1,396 +0,0 @@
<script setup>
import { nextTick, ref } from "vue";
import {
orderListApi,
orderStatusApi,
orderLadingApi,
cartListApi,
verifierApi,
} 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;
nextTick(()=>{
tableRef.value?.toggleAllSelection();
})
});
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,
}).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",
});
} else {
ElMessage({
message: res.message,
type: "error",
});
}
})
.catch((err) => {});
};
const emit = defineEmits(['reInit'])
const tableRef = ref(null);
//
const convert = ()=>{
let tableList = tableRef.value.getSelectionRows();
if(tableList.length == 0){
return ElMessage.error('请选择核销商品');
}
let query = {
data: [],
verify_code: formData.value.verify_code
}
tableList.forEach(item => {
query.data.push({
id: item.order_product_id,
num: item.product_num
})
});
verifierApi(userStore.userInfo.service.mer_id, formData.value.order_id, query).then(res=>{
ElMessage.success(res.message);
emit('reInit');
}).catch(err=>{
ElMessage.error(err.message)
})
}
</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"
ref="tableRef"
>
<el-table-column type="selection" width="55" />
<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="180">
<template #default="{ row }">
<el-input-number v-model="row.product_num" step-strictly :max="row.refund_num" :min="1" :step="1" size="small"></el-input-number>
</template>
</el-table-column>
<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">
<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.verify_status==0">
<el-button class="btn" type="warning" @click="convert"
>核销</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 0.625rem #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>

View File

@ -1,297 +0,0 @@
<script setup>
import { ref, watch } from "vue";
import {
verifierOrderListApi,
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 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 where = ref({
page: 1,
limit: 20,
search_info: ''
});
const loading = ref(false);
const total = ref(0);
const activeStore = ref(0);
const loadEnd = ref(false);
const orderList = ref([]);
const getOrderList = (reload=false) => {
if(!where.value.search_info) return ElMessage.error("请输入订单编号");
if(reload) where.value.page = 1;
else if(loadEnd.value || loading.value) return;
loading.value = true;
if (tabPosition.value == 1) where.value.paid = null;
if (tabPosition.value == 2) where.value.paid = 0;
orderList.value = [];
mitt.emit("set-order-detail", {});
verifierOrderListApi(userStore.userInfo.service.mer_id, where.value.search_info).then((res) => {
orderList.value = [res.data];
mitt.emit("set-order-detail", orderList.value[0]);
// 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);
}
const setCode = (code)=>{
where.value.search_info = code;
getOrderList(true);
}
const emit = defineEmits(["backOne"]);
const backOne = ()=>{
emit("backOne");
}
defineExpose({
setCode,
})
</script>
<template>
<div class="my-order">
<div class="header-nav">
<div class="nav-item">核销订单</div>
<div class="nav-item-clear">
<el-button type="primary" size="small" @click="backOne">返回上一页</el-button>
</div>
</div>
<div class="header-input">
<el-input v-model="where.search_info" placeholder="请输入订单编号" @keydown.enter="getOrderList(true)" clearable>
<template #append>
<el-button
type="primary"
style="
background-color: #1890ff;
color: #fff;
border-radius: 0 0.315rem 0.315rem 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"
infinite-scroll-immediate="false"
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;
justify-content: space-between;
padding: 1rem;
height: 1.5rem;
span {
color: #ff4a00;
}
.nav-item-clear {
display: flex;
align-items: center;
font-size: 0.8rem;
cursor: pointer;
}
}
.header-input {
padding: 1rem;
padding-top: 0;
height: 2.5rem;
border-bottom: 1px solid #eee;
}
.order-list {
height: calc(100vh - 100px - 8.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: 0.18rem;
}
}
.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: 0.18rem;
}
}
.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>, watch

View File

@ -1,119 +0,0 @@
<script setup>
import order from "./component/order.vue";
import detail from "./component/detail.vue";
import padding from "@/components/padding.vue";
import { ref, nextTick, onMounted } from "vue";
import { ElMessage } from "element-plus";
const type = ref(1);
const code = ref("");
const inputRef = ref(null);
const orderRef = ref(null);
const handleEnterKey = () => {
if(code.value == "") return ElMessage.error("请输入订单编号");
type.value = 2;
nextTick(() => {
orderRef.value.setCode(code.value);
});
};
const reInit = ()=>{
handleEnterKey();
}
onMounted(() => {
nextTick(() => {
inputRef.value.focus();
});
});
</script>
<template>
<div class="my-card">
<div class="my-code" v-show="type == 1">
<h2>订单核销</h2>
<div class="box">
<input
ref="inputRef"
v-model="code"
placeholder=""
class="input"
@keyup.enter="handleEnterKey"
/>
<div class="btn" @click="handleEnterKey">查询</div>
</div>
</div>
<order v-show="type == 2" style="flex-shrink: 0" ref="orderRef" @backOne="type=1"/>
<padding v-show="type == 2" />
<detail v-show="type == 2" ref="detailRef" @reInit="reInit"/>
</div>
</template>
<style lang="scss">
.my-card {
display: flex;
.my-code {
height: 70%;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.box {
width: 38rem;
position: relative;
.input {
width: 100%;
height: 3rem;
box-sizing: border-box;
border-radius: 4rem;
border: 1px solid #1890ff;
padding: 0 1rem;
font-size: 1.1rem;
&:focus {
outline: none;
box-shadow: 0 0 0.31rem #1890ff; /* 可选:添加阴影效果以突出显示聚焦状态 */
transition: all 0.2s ease-in-out;
}
}
.btn {
position: absolute;
right: 0;
top: 0;
width: 5rem;
height: 100%;
border-radius: 0 4rem 4rem 0;
background: #1890ff;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
}
}
}
/* 修改滚动条的样式 */
::-webkit-scrollbar {
width: 0.31rem; /* 设置滚动条的宽度 */
}
/* 设置滚动条的轨道样式 */
::-webkit-scrollbar-track {
background-color: #f1f1f1; /* 设置轨道的背景色 */
/* margin: 1.25rem 0; */
}
/* 设置滚动条的滑块样式 */
::-webkit-scrollbar-thumb {
background-color: #ccc; /* 设置滑块的背景色 */
border-radius: 0.31rem; /* 设置滑块的圆角 */
}
/* 设置滚动条鼠标悬停时的滑块样式 */
::-webkit-scrollbar-thumb:hover {
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
}
</style>

View File

@ -1,17 +1,12 @@
<script setup>
import { ref, onMounted, onUnmounted, nextTick } from "vue";
import { ref } 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) => {
@ -37,17 +32,15 @@ const deleteShop = (arr) => {
const getList = () => {
allPrice.value = 0;
costPrice.value = 0;
discounts.value = 0;
cartListApi({
staff_id: userStore.userInfo.service.service_id,
source: 300,
}).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 = [];
});
};
@ -67,7 +60,6 @@ const changeCartNum = (val, old) => {
list.value.forEach((item) => {
allPrice.value += item.productAttr.price * item.cart_num;
});
costPrice.value = allPrice.value;
});
};
@ -82,19 +74,14 @@ const editItem = (id, data)=>{
}
const changeAllPrice = (price)=>{
discounts.value = costPrice.value - price;
discounts.value = allPrice.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);
const showPrice = ()=>{
priceRef.value.show(true, allPrice.value);
}
defineExpose({
@ -104,26 +91,6 @@ defineExpose({
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>
@ -133,7 +100,7 @@ onUnmounted(() => {
已选购 <span>{{ list.length }}</span>
</div>
<div class="nav-item-clear" @click="clearAll">
<el-icon><Delete /></el-icon> (Delete)
<el-icon><Delete /></el-icon>
</div>
</div>
<div class="order-list">
@ -189,16 +156,16 @@ onUnmounted(() => {
</div>
</div>
<div class="update-price">
<el-button class="btn" type="primary" @click="showPrice" size="small">改价 (Insert)</el-button>
<el-button class="btn" type="primary" @click="showPrice">改价</el-button>
</div>
</div>
<div class="order-btn">
<el-button class="btn" type="primary" @click="goPay" :disabled="list.length == 0"
>立即结账 (F9)</el-button
>立即结账</el-button
>
</div>
</div>
<price ref="priceRef" @changeAllPrice="changeAllPrice"></price>
<price ref="priceRef" @submit="changeAllPrice"></price>
</div>
</template>
@ -244,7 +211,7 @@ onUnmounted(() => {
.order-item-info {
flex: 1;
box-sizing: border-box;
padding-left: 0.75rem;
padding-left: 12px;
display: flex;
flex-direction: column;
justify-content: space-between;
@ -278,7 +245,7 @@ onUnmounted(() => {
bottom: 0;
left: 0;
width: 100%;
box-shadow: 0 -1px 0.625rem #eee;
box-shadow: 0 -1px 10px #eee;
.order-total {
height: 2.5rem;
@ -300,7 +267,6 @@ onUnmounted(() => {
.update-price {
.btn {
border-radius: 3rem;
font-size: 1rem;
}
}
}

View File

@ -3,7 +3,7 @@
<template>
<div style="width: 1rem;height: 100%;"></div>
<div style="width: 20px;height: 100%;"></div>
</template>
<style scoped lang="scss">

View File

@ -1,104 +1,60 @@
<script setup>
import { ref, nextTick, onMounted, onUnmounted } from "vue";
import { ElMessage } from "element-plus";
import mitt from "@/utils/mitt.js";
import { ref } from 'vue'
import { ElMessageBox } from 'element-plus'
const dialogVisible = ref(false);
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 allPrice = ref(0)
const show = (e, p = 0)=>{
dialogVisible.value = e;
allPrice.value = p;
}
const priceInfo = ref({
nowPrice: "",
percentage: "",
});
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 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);
};
const emit = defineEmits(['submit'])
const submit = ()=>{
emit('submit', priceInfo.value.nowPrice);
dialogVisible.value = false;
}
defineExpose({
show,
dialogVisible,
});
show
})
//
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">
<el-dialog
v-model="dialogVisible"
title="订单改价"
width="650"
>
<div class="price">
<div class="flex">
<el-input
ref="priceRef"
style="flex: 3; margin: 0.625rem; height: 2.5rem"
v-model="priceInfo.nowPrice"
type="number"
placeholder="请输入改价后的价格"
@input="inputPrice"
>
<template #suffix></template>
</el-input>
<el-input
style="flex: 2; margin: 0.625rem; height: 2.5rem"
v-model="priceInfo.percentage"
type="number"
placeholder="请输入比例"
@input="inputPercentage"
>
<template #suffix>%</template>
</el-input>
</div>
<div style="margin: 0.625rem; padding-bottom: 40px">
改价后金额:
<span style="color: #f5222d; font-weight: bold; margin-left: 1rem"
>¥{{ priceInfo.nowPrice || allPrice || " - - " }}</span
>
</div>
<div class="flex">
<el-input style="flex: 3;margin: 10px;height: 2.5rem;" v-model="priceInfo.nowPrice" placeholder="请输入改价后的价格" @input="inputPrice">
<template #suffix></template>
</el-input>
<el-input style="flex: 2;margin: 10px;height: 2.5rem;" v-model="priceInfo.percentage" 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 class="ok-btn" type="primary" @click="submit">
确定
</el-button>
</div>
</template>
@ -106,18 +62,18 @@ onUnmounted(() => {
</template>
<style scoped lang="scss">
.dialog-footer {
.ok-btn {
width: 100%;
height: 2.5rem;
border-radius: 2.5rem;
}
.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;
}
.price{
border-top: 1px solid #eee;
padding-top: 1rem;
.flex{
display: flex;
}
}
</style>

View File

@ -1,8 +1,7 @@
<script setup>
import { ref, onMounted, onUnmounted } from 'vue'
import { ref } from 'vue'
import { ElMessageBox } from 'element-plus'
import { getAttrValue } from "@/api/shop.js"
import mitt from "@/utils/mitt.js";
const dialogVisible = ref(false)
@ -56,36 +55,6 @@ defineExpose({
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>
@ -118,7 +87,7 @@ const close = ()=>{
<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>

View File

@ -1,8 +1,5 @@
<script setup>
import { ref, watch, onMounted, onUnmounted, nextTick } from "vue";
import mitt from "@/utils/mitt.js";
import _ from 'lodash';
import { ElMessage } from "element-plus";
import { ref, watch } from "vue";
const props = defineProps({
storeList: {
@ -11,8 +8,6 @@ const props = defineProps({
},
});
const codeRef = ref(null);
const emit = defineEmits(["getStoreList", "changeItem", "loadMore"]);
const bar_code = ref("");
@ -24,60 +19,26 @@ const loadMore = () => {
};
const changeItem = (item) => {
if(item.is_used==0) return ElMessage.error("该商品已被平台关闭");
if(item.stock==0) return ElMessage.warning("该商品无库存");
emit("changeItem", item);
};
const handleEnter = _.throttle(() => {
const handleEnter = () => {
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="header-nav">
<div class="nav-item-label">搜索</div>
<div class="nav-item-input">
<el-input
v-model="bar_code"
placeholder=" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索"
placeholder="搜索商品名称/ID/唯一码或点击聚焦扫码"
clearable
ref="codeRef"
@focus="focus"
@blur="blur"
@keyup.enter="handleEnter"
@clear="handleEnter"
/>
</div>
<div class="nav-item-btn" @click="handleEnter">
@ -91,10 +52,9 @@ onUnmounted(() => {
v-infinite-scroll="loadMore"
infinite-scroll-distance="100"
infinite-scroll-delay="500"
:infinite-scroll-immediate="false"
style="overflow: auto"
>
<el-space wrap v-if="storeList.length">
<el-space wrap :size="20">
<div
class="shop-item"
v-for="(item, index) in storeList"
@ -106,23 +66,14 @@ onUnmounted(() => {
<div class="shop-price">
¥<span>{{ item.price }}</span>
</div>
<div class="no-stock" v-if="item.stock == 0">
<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 class="no-data" v-if="!storeList.length">
<el-empty :image-size="300" description="没有找到对应商品"></el-empty>
</div>
</div>
</div>
</template>
@ -141,10 +92,9 @@ onUnmounted(() => {
justify-content: space-between;
overflow: hidden;
width: auto;
border: 1px solid rgba($color: #000000, $alpha: 0);
.nav-item-label {
width: 7rem;
width: 5rem;
height: 3rem;
box-sizing: border-box;
text-align: center;
@ -173,16 +123,12 @@ onUnmounted(() => {
}
}
.input-focus {
border: 1px solid #1890ff;
}
.shop-list {
height: calc(100vh - 9.75rem);
height: calc(100vh - 100px - 3rem);
width: auto;
overflow-y: auto;
box-sizing: border-box;
padding-top: 1rem;
padding-top: 20px;
.shop-item {
width: 11rem;
@ -216,7 +162,7 @@ onUnmounted(() => {
color: #f5222d;
span {
font-size: 1.2rem;
margin-left: 0.187rem;
margin-left: 3px;
}
}
@ -238,7 +184,7 @@ onUnmounted(() => {
display: flex;
justify-content: center;
align-items: center;
div {
div{
background-color: #4e4e4e;
color: #fff;
border-radius: 50%;
@ -254,4 +200,3 @@ onUnmounted(() => {
}
}
</style>
, nextTick

View File

@ -1,15 +1,13 @@
<script setup>
import order from "./component/order.vue";
import shop from "./component/shop.vue";
import padding from "@/components/padding.vue";
import padding from "./component/padding.vue";
import pupop from "./component/pupop.vue";
import pay from "@/components/pay.vue";
import { ref, nextTick, onMounted, onUnmounted } from "vue";
import { ref, nextTick } from "vue";
import { cartCreateApi, orderCheckApi } from "@/api/store.js";
import { storeListApi } 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);
@ -19,48 +17,36 @@ 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) => {
const getStoreList = (data) => {
where.value = {
staff_id: userStore.userInfo.service.service_id,
source: 300,
...where.value,
...data,
};
if (reload) {
storeList.value = [];
where.value.page = 1;
loadEnd.value = false;
}
storeListApi(userStore.userInfo.service.mer_id, 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) => {
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]);
if (data.bar_code && storeList.value.length == 1 && isAllDigits(data.bar_code)) {
cartAddInfo(storeList.value[0], storeList.value[0].attr[0]);
}
});
};
const loadEnd = ref(false);
const loadMore = (data) => {
if (loadEnd.value) return;
const loadMore = (data)=>{
if(loadEnd.value) return;
where.value.page++;
getStoreList(data);
};
}
function isAllDigits(str) {
return /^\d+$/.test(str);
@ -74,7 +60,7 @@ const cartAddInfo = (item, change = "") => {
cart_num: 1,
product_attr_unique:
item.sku[change] !== undefined ? item.sku[change].unique : "",
staff_id: userStore.userInfo.service.service_id,
source: 300, //
product_type: 0,
// spread_id: this.currSpid,
// sale_type: 1
@ -85,23 +71,22 @@ const cartAddInfo = (item, change = "") => {
};
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);
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.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.setForm(item, 'edit');
pupopRef.value.show(true);
};
}
//
const checkOut = () => {
@ -111,8 +96,8 @@ const checkOut = () => {
use_coupon: {},
use_integral: false,
cart_id: cart_id,
};
if (orderRef.value.discounts > 0) {
}
if(orderRef.value.discounts>0){
query.deduction_price = orderRef.value.discounts.toFixed(2);
query.pay_type = "micropay";
}
@ -124,37 +109,22 @@ const checkOut = () => {
});
};
// getStoreList();
const goPay = () => {
checkOut();
payRef.value.drawer = true;
};
const paySuccess = () => {
const paySuccess = ()=>{
orderRef.value.getList();
};
}
//
const aF9 = () => {
console.log("F9");
if (route.name != "home") 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" />
<order ref="orderRef" @goPay="goPay" @editPupop="editPupop"/>
<padding />
<shop
ref="shopRef"
@ -164,8 +134,8 @@ onUnmounted(() => {
@changeItem="changeItem"
@loadMore="loadMore"
/>
<pupop ref="pupopRef" @changeItem="changeItem" @editItem="editItem" />
<pay ref="payRef" @paySuccess="paySuccess" />
<pupop ref="pupopRef" @changeItem="changeItem" @editItem="editItem"/>
<pay ref="payRef" @paySuccess="paySuccess"/>
</div>
</template>
@ -195,4 +165,3 @@ onUnmounted(() => {
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
}
</style>
, onMounted, onUnmounted

View File

@ -8,9 +8,6 @@ import { useRouter } from "vue-router";
const userStore = useUserStore();
const router = useRouter();
const accRef = ref(null);
const pwdRef = ref(null);
const formLogin = ref({
account: "",
password: "",
@ -76,7 +73,7 @@ onMounted(() => {
<div class="title">里海收银系统 - 登录</div>
<el-form>
<el-form-item>
<el-input ref="accRef" v-model="formLogin.account" placeholder="请输入账号" :autofocus="true" @keydown.enter="pwdRef.focus()">
<el-input v-model="formLogin.account" placeholder="请输入账号">
<template #prefix>
<el-icon><User /></el-icon>
</template>
@ -84,12 +81,10 @@ onMounted(() => {
</el-form-item>
<el-form-item>
<el-input
ref="pwdRef"
v-model="formLogin.password"
type="password"
placeholder="请输入密码"
show-password
@keydown.enter="onLogin"
>
<template #prefix>
<el-icon><Lock /></el-icon>
@ -111,7 +106,7 @@ onMounted(() => {
width: 100vw;
height: 100vh;
box-sizing: border-box;
background-image: url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b84ef202404101425077785.png);
background-image: url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/78559202404051452598712.png);
background-size: 100% 100%;
background-repeat: no-repeat;
display: flex;

View File

@ -1,375 +0,0 @@
<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 0.625rem #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>

View File

@ -1,244 +1,71 @@
<script setup>
import { ref, onMounted } from "vue";
import { ref } from "vue";
import {
orderListApi,
orderStatusApi,
orderLadingApi,
cartListApi,
cartListApi
} from "@/api/store.js";
import { useUserStore } from "@/store/user.js";
import { ElMessage } from "element-plus";
import { useRouter, useRoute } from "vue-router";
import mitt from "@/utils/mitt.js";
import moment from "moment";
import { useRouter } from "vue-router";
const route = useRoute();
const userStore = useUserStore();
const props = defineProps({
isSystem: {
type: Boolean,
default: false,
},
});
const list = ref([]);
const keyword = ref('');
const tabPosition = ref(1); // 1-, 2-
const payType = ref(0); //
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,
});
if (route.query.date) {
date.value = [
moment(route.query.date).format("YYYY/MM/DD"),
moment(route.query.date).format("YYYY/MM/DD"),
];
where.value.date = date.value.join("-");
}
if(route.query.payType){
payType.value = route.query.payType;
}
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;
if (payType.value == 1) where.value.pay_type = "12";
else if (payType.value == 2) where.value.pay_type = "11,13";
else where.value.pay_type = "";
}
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) => {
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;
if (orderList.value.length > 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;
orderListApi(userStore.userInfo.service.mer_id, where.value).then((res) => {
orderList.value = res.data.list;
total.value = res.data.count;
loading.value = false;
});
});
};
getOrderList();
</script>
<template>
<div class="my-order" :class="{'my-order-no-system': !isSystem}">
<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 class="nav-item-btn" v-if="!isSystem">
<el-radio-group
v-model="payType"
@change="changeTabPosition"
size="small"
>
<el-radio-button :value="0">全部</el-radio-button>
<el-radio-button :value="1">现金收款</el-radio-button>
<el-radio-button :value="2">线上收款</el-radio-button>
</el-radio-group>
<div class="nav-item-clear">
<el-icon><Delete /></el-icon>
</div>
</div>
<div class="header-input">
<el-input
v-model="where.search_info"
placeholder="请输入订单编号"
@keydown.enter="getOrderList(true)"
@clear="getOrderList(true)"
clearable
>
<el-input v-model="keyword" placeholder="请输入订单编号">
<template #append>
<el-button
type="primary"
style="
background-color: #1890ff;
color: #fff;
border-radius: 0 0.315rem 0.315rem 0;
"
@click="getOrderList(true)"
>搜索</el-button
>
<el-button type="primary" style="background-color: #1890ff;color: #fff;border-radius: 0 5px 5px 0;">搜索</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="order-list">
<div class="item" v-for="(item, index) in orderList" :key="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 class="sn">单号: {{ item.order_sn }}</div>
<div class="create-time"> {{ item.create_time }}</div>
</div>
</div>
<div v-if="loadEnd" class="load-end">没有更多了</div>
<div v-if="loading" class="load-end">加载中...</div>
</div>
</div>
</template>
@ -254,135 +81,47 @@ onMounted(() => {
.header-nav {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 1rem;
height: 3.5rem;
height: 1.5rem;
span {
color: #ff4a00;
}
.nav-item {
font-weight: bold;
}
.nav-item-btn {
.nav-item-clear {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
font-size: 0.8rem;
cursor: pointer;
}
}
.header-input {
.header-input{
padding: 1rem;
padding-top: 0;
height: 2.5rem;
border-bottom: 1px solid #eee;
}
.order-list {
height: calc(100vh - 100px - 10.2rem);
height: calc(100vh - 100px - 8.2rem);
overflow-y: auto;
.item {
.item{
padding: 1rem;
border-bottom: 1px solid #eee;
.top {
.top{
display: flex;
justify-content: space-between;
align-items: flex-end;
.sn {
.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: 0.187rem;
&::before{
}
}
.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: 0.187rem;
}
}
.create-time {
.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;
}
}
.my-order-no-system{
.header-nav{
height: 5.5rem;
}
.order-list{
height: calc(100vh - 100px - 12.2rem);
}
}
</style>

View File

@ -1,7 +1,5 @@
<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";
@ -9,9 +7,7 @@ import { ref, nextTick } from "vue";
<template>
<div class="my-card">
<order style="flex-shrink: 0;" ref="orderRef"/>
<padding />
<detail ref="detailRef"/>
<order ref="orderRef" @goPay="goPay" @editPupop="editPupop"/>
</div>
</template>
@ -21,19 +17,19 @@ import { ref, nextTick } from "vue";
}
/* 修改滚动条的样式 */
::-webkit-scrollbar {
width: 0.315rem; /* 设置滚动条的宽度 */
width: 5px; /* 设置滚动条的宽度 */
}
/* 设置滚动条的轨道样式 */
::-webkit-scrollbar-track {
background-color: #f1f1f1; /* 设置轨道的背景色 */
/* margin: 1.25rem 0; */
margin: 20px 0;
}
/* 设置滚动条的滑块样式 */
::-webkit-scrollbar-thumb {
background-color: #ccc; /* 设置滑块的背景色 */
border-radius: 0.315rem; /* 设置滑块的圆角 */
border-radius: 5px; /* 设置滑块的圆角 */
}
/* 设置滚动条鼠标悬停时的滑块样式 */

View File

@ -1,216 +0,0 @@
<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";
import moment from "moment";
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();
};
const cellClick = (row, column) => {
let date = '';
let query = {}
if(Number(moment(row.day).format('MM')) > Number(moment().format('MM'))){
let year = moment().format('YYYY');
date = (year-1) + '-' + row.day.split('-').join('-');
}else {
let year = moment().format('YYYY');
date = year + '-' + row.day.split('-').join('-');
}
query.date = date;
if(column.no==2) query.payType = 1;
if(column.no==3) query.payType = 2;
router.push({
path: "order",
query: query
})
}
</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.yesterday.cashPayment + formData.yesterday.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>
<div class="table">
<el-table :data="orderList" style="width: 100%" @cell-click="cellClick">
<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="cash_registe" 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: 1.25rem;
display: grid;
grid-template-columns: repeat(3, 1fr); /* 六列 */
gap: 1.25rem; /* 列间距 */
.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;
cursor: pointer;
}
}
/* 修改滚动条的样式 */
::-webkit-scrollbar {
width: 0.315rem; /* 设置滚动条的宽度 */
}
/* 设置滚动条的轨道样式 */
::-webkit-scrollbar-track {
background-color: #f1f1f1; /* 设置轨道的背景色 */
margin: 1.25rem 0;
}
/* 设置滚动条的滑块样式 */
::-webkit-scrollbar-thumb {
background-color: #ccc; /* 设置滑块的背景色 */
border-radius: 0.315rem; /* 设置滑块的圆角 */
}
/* 设置滚动条鼠标悬停时的滑块样式 */
::-webkit-scrollbar-thumb:hover {
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
}
</style>

View File

@ -43,7 +43,7 @@ getOrderList();
const cartCount = ref(0);
const getCartList = () => {
cartListApi({
staff_id: userStore.userInfo.service.service_id,
source: 300,
}).then((res) => {
cartCount.value = res.data.list?.length;
});
@ -216,19 +216,19 @@ const goHome = ()=>{
}
/* 修改滚动条的样式 */
::-webkit-scrollbar {
width: 0.315rem; /* 设置滚动条的宽度 */
width: 5px; /* 设置滚动条的宽度 */
}
/* 设置滚动条的轨道样式 */
::-webkit-scrollbar-track {
background-color: #f1f1f1; /* 设置轨道的背景色 */
margin: 1.25rem 0;
margin: 20px 0;
}
/* 设置滚动条的滑块样式 */
::-webkit-scrollbar-thumb {
background-color: #ccc; /* 设置滑块的背景色 */
border-radius: 0.315rem; /* 设置滑块的圆角 */
border-radius: 5px; /* 设置滑块的圆角 */
}
/* 设置滚动条鼠标悬停时的滑块样式 */

Some files were not shown because too many files have changed in this diff Show More