This commit is contained in:
weipengfei 2024-04-10 18:03:46 +08:00
parent d12de5fd1c
commit 59efc8d420
30 changed files with 292 additions and 99 deletions

View File

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

1
dist/assets/detail-B1GiYJo4.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/assets/detail-Db_y7W0l.css vendored Normal file
View File

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

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-BpXYCW1n.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-ewPIg6Mj.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 @@
@charset "UTF-8";.my-shop[data-v-33636025]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll}[data-v-33636025]::-webkit-scrollbar{width:5px}[data-v-33636025]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:20px 0}[data-v-33636025]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}[data-v-33636025]::-webkit-scrollbar-thumb:hover{background-color:#999}

View File

@ -1 +0,0 @@
import{s as L,u as S}from"./shop-DouiAmok.js";import{_ as A,r as i,u as F,b as r,l as T,v as $,c as w,h as j,f as e,w as l,g as m,e as k,d as M,t as O,x as P,E as y}from"./index-BpXYCW1n.js";const q={"element-loading-text":"加载中",class:"my-shop"},G={class:"dialog-footer"},H={__name:"index",setup(J){const v=i([]),V=F(),u=i({page:1,limit:15}),d=i(!1),g=i(0),c=()=>{d.value=!0,L(V.userInfo.service.mer_id,u.value).then(t=>{v.value=t.data.list,g.value=t.data.count,d.value=!1})};c();const C=t=>{u.value.page=t,c()},x=t=>{u.value.page=t,c()},N=t=>{u.value.page=t,c()},p=i(!1),o=i({}),U=t=>{o.value=t,p.value=!0},z=()=>{let t={attr:o.value.attr||[],attrValue:o.value.attrValue,mer_cate_id:o.value.merCateId||[],spec_type:o.value.spec_type,is_stock:1};S(o.value.product_id,t).then(n=>{y({message:n.message,type:"success"}),p.value=!1,c()}).catch(n=>{y({message:n,type:"error"})})};return(t,n)=>{const s=r("el-table-column"),f=r("el-image"),_=r("el-button"),h=r("el-table"),B=r("el-pagination"),D=r("el-input-number"),I=r("el-dialog"),E=T("loading");return $((w(),j("div",q,[e(h,{data:v.value,style:{width:"100%"}},{default:l(()=>[e(s,{prop:"product_id",label:"ID",width:"100"}),e(s,{prop:"image",label:"图片",width:"120"},{default:l(a=>[e(f,{loading:"lazy",style:{width:"60px",height:"60px"},src:a.row.image},null,8,["src"])]),_:1}),e(s,{prop:"store_name",label:"商品名称",width:"500"}),e(s,{prop:"price",label:"售价"}),e(s,{prop:"stock",label:"库存"}),e(s,{label:"操作",width:"120"},{default:l(a=>[e(_,{type:"primary",link:"",onClick:b=>U(a.row)},{default:l(()=>[m("编辑")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),e(B,{"page-size":u.value.limit,layout:"prev, pager, next",total:g.value,onPrevClick:C,onNextClick:x,onCurrentChange:N},null,8,["page-size","total"]),e(I,{modelValue:p.value,"onUpdate:modelValue":n[1]||(n[1]=a=>p.value=a),title:"编辑商品库存",width:"800"},{footer:l(()=>[k("div",G,[e(_,{onClick:n[0]||(n[0]=a=>p.value=!1)},{default:l(()=>[m("取消")]),_:1}),e(_,{type:"primary",onClick:z},{default:l(()=>[m(" 确定 ")]),_:1})])]),default:l(()=>[o.value.attrValue?(w(),M(h,{key:0,data:o.value.attrValue,stripe:"",style:{width:"100%"}},{default:l(()=>[e(s,{prop:"image",label:"图片",width:"180"},{default:l(a=>[e(f,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:a.row.image||o.value.image},null,8,["src"])]),_:1}),e(s,{prop:"sku",label:"名称",width:"180"},{default:l(a=>[k("span",null,O(a.row.sku||o.value.store_name),1)]),_:1}),e(s,{prop:"price",label:"价格"}),e(s,{prop:"stock",label:"库存"},{default:l(a=>[e(D,{modelValue:a.row.stock,"onUpdate:modelValue":b=>a.row.stock=b,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):P("",!0)]),_:1},8,["modelValue"])])),[[E,d.value]])}}},R=A(H,[["__scopeId","data-v-33636025"]]);export{R as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as U,u as I,r as u,o as R,b as n,c as S,h as b,e as w,f as e,w as t,p as v,g as C,y as K,z as L,C as B,E as d,J as E,K as N}from"./index-BpXYCW1n.js";const M=l=>(K("data-v-59a7e82c"),l=l(),L(),l),T={class:"body"},z={class:"login"},J=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__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 R(()=>{}),(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 S(),b("div",T,[w("div",z,[J,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(()=>[C("登录")]),_:1})]),_:1})]),_:1})])])}}},q=U($,[["__scopeId","data-v-59a7e82c"]]);export{q as default}; import{_ as U,u as I,r as u,o as R,b as n,c as S,h as b,e as w,f as e,w as t,p as v,g as C,y as K,z as L,C as B,E as d,J as E,K as N}from"./index-ewPIg6Mj.js";const M=l=>(K("data-v-59a7e82c"),l=l(),L(),l),T={class:"body"},z={class:"login"},J=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__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 R(()=>{}),(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 S(),b("div",T,[w("div",z,[J,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(()=>[C("登录")]),_:1})]),_:1})]),_:1})])])}}},q=U($,[["__scopeId","data-v-59a7e82c"]]);export{q as default};

View File

@ -1 +0,0 @@
@charset "UTF-8";.my-order[data-v-477f396c]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-477f396c]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav span[data-v-477f396c]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-477f396c]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-477f396c]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:1px solid #eee}.my-order .order-list[data-v-477f396c]{height:calc(100vh - 100px - 8.2rem);overflow-y:auto}.my-order .order-list .item[data-v-477f396c]{padding:1rem;border-bottom:1px solid #eee}.my-order .order-list .item .top[data-v-477f396c]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-list .item .top .sn[data-v-477f396c]{font-weight:700;font-size:.9rem}.my-order .order-list .item .top .cahier[data-v-477f396c]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #2ec479;color:#2ec479;border-radius:3px}.my-order .order-list .item .top .cahier2[data-v-477f396c]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:1px solid #ff4a00;color:#ff4a00;border-radius:3px}.my-order .order-list .item .top .create-time[data-v-477f396c]{font-size:.8rem}.my-order .order-list .item .shop[data-v-477f396c]{display:flex;justify-content:space-between}.my-order .order-list .item .shop .right[data-v-477f396c]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-list .item .shop .right .money[data-v-477f396c]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-list .item .shop .right .count[data-v-477f396c]{font-size:.7rem;color:#999}.my-order .order-list .item .shop .left[data-v-477f396c]{height:4.5rem;display:flex;align-items:center}.my-order .order-list .item .shop .left .shop-img[data-v-477f396c]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-list .item .shop .left .shop-name[data-v-477f396c]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-list .item .bottom[data-v-477f396c]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-list .item-active[data-v-477f396c]{background-color:#efefef}.my-order .load-end[data-v-477f396c]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-f0903720]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-f0903720]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-f0903720]{height:4rem;width:8rem;cursor:pointer;display:flex;justify-content:center;align-items:center;font-size:1.2rem;background-color:#f5f5f5;border-radius:1rem 1rem 0 0}.my-order .header-nav .nav-item-active[data-v-f0903720]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-f0903720]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-f0903720]{border-radius:0 0 0 1rem}.my-order .detail[data-v-f0903720]{height:calc(100vh - 100px - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-f0903720]{padding:1rem 1rem 6rem}.my-order .detail .table .table-title[data-v-f0903720]{font-weight:700;padding-top:1rem}.my-order .detail .table .table-info[data-v-f0903720]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:2rem;border-bottom:1px solid #eee}.my-order .detail .table .table-info[data-v-f0903720]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-f0903720]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-f0903720]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-f0903720]{height:6rem;box-sizing:border-box;padding:0 1.5rem;position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -1px 10px #eee;display:flex;justify-content:space-between;align-items:center;background-color:#fff}.my-order .detail .footer .info[data-v-f0903720]{display:flex;align-items:flex-end}.my-order .detail .footer .info .ser[data-v-f0903720]{font-weight:700;margin-right:1rem}.my-order .detail .footer .info .price[data-v-f0903720]{margin-right:1rem}.my-order .detail .footer .info .price span[data-v-f0903720]{color:#ff4a00;font-size:1.2rem;font-weight:700}.my-order .detail .footer .handle .btn[data-v-f0903720]{border-radius:4rem;padding:1.2rem}.my-card{display:flex}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#999}

1
dist/assets/index-DeU85iHe.js vendored Normal file
View File

@ -0,0 +1 @@
import{o as r,d as o}from"./detail-B1GiYJo4.js";import{p as t}from"./padding-CHwe9gtr.js";import{c as a,h as s,f as e}from"./index-ewPIg6Mj.js";import"./pay-BdASyvsQ.js";const c={class:"my-card"},_={__name:"index",setup(d){return(l,n)=>(a(),s("div",c,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),e(t),e(o,{ref:"detailRef"},null,512)]))}};export{_ as default};

1
dist/assets/index-DmS05-EY.css vendored Normal file
View File

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

1
dist/assets/index-OsZ-HISy.js vendored Normal file
View File

@ -0,0 +1 @@
import{s as q,p as G,u as H}from"./shop-BHLflC8g.js";import{_ as J,r as u,u as K,b as n,l as Q,v as R,c,h as m,f as t,w as l,F as W,i as X,d as v,x as y,g,e as I,t as U,E as T}from"./index-ewPIg6Mj.js";const Y={"element-loading-text":"加载中",class:"my-shop"},Z={key:0},ee={key:1,style:{color:"#ff4a00"}},te={class:"dialog-footer"},ae={__name:"index",setup(le){const k=u([]),f=K(),i=u({page:1,limit:15,type:1,staff_id:f.userInfo.service.service_id}),h=u(!1),b=u(0),d=()=>{h.value=!0,q(f.userInfo.service.mer_id,i.value).then(a=>{k.value=a.data.list,b.value=a.data.count,h.value=!1})};d();const z=a=>{i.value.page=a,d()},A=a=>{i.value.page=a,d()},N=a=>{i.value.page=a,d()},_=u(!1),s=u({}),S=a=>{s.value=a,_.value=!0},B=()=>{let a={attr:s.value.attr||[],attrValue:s.value.attrValue,mer_cate_id:s.value.merCateId||[],spec_type:s.value.spec_type,is_stock:1};H(s.value.product_id,a).then(r=>{T({message:r.message,type:"success"}),_.value=!1,d()}).catch(r=>{T({message:r,type:"error"})})},D=u(1),F=a=>{i.value.type=a,i.value.page=1,d()},V=u([]);return(()=>{G(f.userInfo.service.mer_id).then(a=>{V.value=a.data})})(),(a,r)=>{const L=n("el-menu-item"),$=n("el-menu"),o=n("el-table-column"),x=n("el-image"),E=n("el-switch"),w=n("el-button"),C=n("el-table"),P=n("el-pagination"),j=n("el-input-number"),M=n("el-dialog"),O=Q("loading");return R((c(),m("div",Y,[t($,{"default-active":D.value,class:"el-menu-top",mode:"horizontal",onSelect:F},{default:l(()=>[(c(!0),m(W,null,X(V.value,(e,p)=>(c(),v(L,{index:e.type,key:p},{default:l(()=>[g(U(`${e.name}(${e.count})`),1)]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"]),t(C,{data:k.value,style:{width:"100%"}},{default:l(()=>[t(o,{prop:"product_id",label:"ID",width:"100"}),t(o,{prop:"image",label:"图片",width:"120"},{default:l(e=>[t(x,{loading:"lazy",style:{width:"60px",height:"60px"},src:e.row.image},null,8,["src"])]),_:1}),t(o,{prop:"store_name",label:"商品名称",width:"500"}),t(o,{prop:"price",label:"售价"}),t(o,{prop:"stock",label:"库存"}),i.value.type<=2?(c(),v(o,{key:0,label:"上/下架",width:"100"},{default:l(e=>[t(E,{modelValue:e.row.is_show,"onUpdate:modelValue":p=>e.row.is_show=p,"active-value":1,"inline-prompt":"","active-text":"上架","inactive-text":"下架"},null,8,["modelValue","onUpdate:modelValue"])]),_:1})):y("",!0),t(o,{label:"商品状态",width:"100"},{default:l(e=>[e.row.is_used?(c(),m("span",Z,"上架显示")):(c(),m("span",ee,"平台关闭"))]),_:1}),t(o,{label:"操作",width:"120"},{default:l(e=>[i.value.type<=4?(c(),v(w,{key:0,type:"primary",link:"",onClick:p=>S(e.row)},{default:l(()=>[g("修改库存")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"]),t(P,{"page-size":i.value.limit,layout:"prev, pager, next",total:b.value,onPrevClick:z,onNextClick:A,onCurrentChange:N},null,8,["page-size","total"]),t(M,{modelValue:_.value,"onUpdate:modelValue":r[1]||(r[1]=e=>_.value=e),title:"编辑商品库存",width:"800"},{footer:l(()=>[I("div",te,[t(w,{onClick:r[0]||(r[0]=e=>_.value=!1)},{default:l(()=>[g("取消")]),_:1}),t(w,{type:"primary",onClick:B},{default:l(()=>[g(" 确定 ")]),_:1})])]),default:l(()=>[s.value.attrValue?(c(),v(C,{key:0,data:s.value.attrValue,stripe:"",style:{width:"100%"}},{default:l(()=>[t(o,{prop:"image",label:"图片",width:"180"},{default:l(e=>[t(x,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:e.row.image||s.value.image},null,8,["src"])]),_:1}),t(o,{prop:"sku",label:"名称",width:"180"},{default:l(e=>[I("span",null,U(e.row.sku||s.value.store_name),1)]),_:1}),t(o,{prop:"price",label:"价格"}),t(o,{prop:"stock",label:"库存"},{default:l(e=>[t(j,{modelValue:e.row.stock,"onUpdate:modelValue":p=>e.row.stock=p,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):y("",!0)]),_:1},8,["modelValue"])])),[[O,h.value]])}}},ie=J(ae,[["__scopeId","data-v-16fa6099"]]);export{ie as default};

1
dist/assets/index-bxpvkJ90.css vendored Normal file
View File

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

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 +1 @@
import{e as F,a as G,p as J,g as K,f as Q}from"./pay-EEWGeT4Q.js";import{_ as W,u as X,r as s,b as d,l as Y,v as Z,c as u,h as v,f as t,w as o,g as r,t as ee,e as P,d as I,C as te,E as h,y as ae,z as oe}from"./index-BpXYCW1n.js";const le=m=>(ae("data-v-80048b20"),m=m(),oe(),m),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(m){const k=X(),C=s([]),b=te(),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=>{K({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),E=()=>{_.value=!1,Q({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=Y("loading");return Z((u(),v("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(),v("span",ne,"已支付")):(u(),v("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),v("span",ie,ee(l.row.pay_time),1)):(u(),v("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(J,{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]])}}},ge=W(pe,[["__scopeId","data-v-80048b20"]]);export{ge as default}; import{e as F,a as G,p as J,g as K,f as Q}from"./pay-BdASyvsQ.js";import{_ as W,u as X,r as s,b as d,l as Y,v as Z,c as u,h as v,f as t,w as o,g as r,t as ee,e as P,d as I,C as te,E as h,y as ae,z as oe}from"./index-ewPIg6Mj.js";const le=m=>(ae("data-v-80048b20"),m=m(),oe(),m),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(m){const k=X(),C=s([]),b=te(),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=>{K({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),E=()=>{_.value=!1,Q({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=Y("loading");return Z((u(),v("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(),v("span",ne,"已支付")):(u(),v("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),v("span",ie,ee(l.row.pay_time),1)):(u(),v("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(J,{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]])}}},ge=W(pe,[["__scopeId","data-v-80048b20"]]);export{ge as default};

1
dist/assets/indexSystem-DoxYu-uj.js vendored Normal file
View File

@ -0,0 +1 @@
import{o as r,d as t}from"./detail-B1GiYJo4.js";import{p as s}from"./padding-CHwe9gtr.js";import{c as o,h as a,f as e}from"./index-ewPIg6Mj.js";import"./pay-BdASyvsQ.js";const c={class:"my-card"},_={__name:"indexSystem",setup(d){return(i,l)=>(o(),a("div",c,[e(r,{style:{"flex-shrink":"0"},ref:"orderRef",isSystem:""},null,512),e(s),e(t,{ref:"detailRef"},null,512)]))}};export{_ as default};

View File

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

File diff suppressed because one or more lines are too long

1
dist/assets/shop-BHLflC8g.js vendored Normal file
View File

@ -0,0 +1 @@
import{D as e}from"./index-ewPIg6Mj.js";function u(r,t){return e.get(`server/${r}/product/lst`,{params:t})}function a(r,t){return e.get(`store/product/detail/${r}`,{params:t})}function i(r,t){return e.post(`user_free_trial/${r}`,t)}function o(r,t){return e.get(`server/${r}/product/title`,{params:t})}export{a as g,o as p,u as s,i as u};

View File

@ -1 +0,0 @@
import{D as e}from"./index-BpXYCW1n.js";function u(r,t){return e.get(`server/${r}/product/lst`,{params:t})}function a(r,t){return e.get(`store/product/detail/${r}`,{params:t})}function o(r,t){return e.post(`user_free_trial/${r}`,t)}export{a as g,u as s,o as u};

4
dist/index.html vendored
View File

@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="./cashier.svg" /> <link rel="icon" type="image/svg+xml" href="./cashier.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>里海收银系统</title> <title>里海收银系统</title>
<script type="module" crossorigin src="./assets/index-BpXYCW1n.js"></script> <script type="module" crossorigin src="./assets/index-ewPIg6Mj.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DVUNn34X.css"> <link rel="stylesheet" crossorigin href="./assets/index-BVX4hike.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -20,3 +20,10 @@ export function getAttrValue(id, data) {
export function userFreeTrialApi(id, data) { export function userFreeTrialApi(id, data) {
return request.post(`user_free_trial/${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 })
}

View File

@ -9,13 +9,15 @@ const route = useRoute()
const navTo = (name) => { const navTo = (name) => {
router.push({ name }) router.push({ name })
} }
const list = ref(['home', 'order', 'convert', 'shop']); const list = ref(['home', 'order', 'orderSystem', 'convert', 'shop', 'orderList']);
const aup = ()=>{ const aup = ()=>{
let index = list.value.indexOf(route.name); let index = list.value.indexOf(route.name);
if(index==0) index = list.value.length;
if(index>0) navTo(list.value[index-1]); if(index>0) navTo(list.value[index-1]);
} }
const adown = ()=>{ const adown = ()=>{
let index = list.value.indexOf(route.name); let index = list.value.indexOf(route.name);
if(index==list.value.length-1) index = -1;
if(index<list.value.length-1) navTo(list.value[index+1]); if(index<list.value.length-1) navTo(list.value[index+1]);
} }
onMounted(() => { onMounted(() => {
@ -39,7 +41,11 @@ onUnmounted(() => {
</div> </div>
<div class="list-item" :class="{'active': route.name=='order'}" @click="navTo('order')"> <div class="list-item" :class="{'active': route.name=='order'}" @click="navTo('order')">
<el-icon size="30"><DataLine /></el-icon> <el-icon size="30"><DataLine /></el-icon>
<div>订单</div> <div>收银订单</div>
</div>
<div class="list-item" :class="{'active': route.name=='orderSystem'}" @click="navTo('orderSystem')">
<el-icon size="30"><DataAnalysis /></el-icon>
<div>平台订单</div>
</div> </div>
<div class="list-item" :class="{'active': route.name=='convert'}" @click="navTo('convert')"> <div class="list-item" :class="{'active': route.name=='convert'}" @click="navTo('convert')">
<el-icon size="30"><FullScreen /></el-icon> <el-icon size="30"><FullScreen /></el-icon>
@ -49,6 +55,10 @@ onUnmounted(() => {
<el-icon size="30"><ShoppingBag /></el-icon> <el-icon size="30"><ShoppingBag /></el-icon>
<div>商品</div> <div>商品</div>
</div> </div>
<div class="list-item" :class="{'active': route.name=='orderList'}" @click="navTo('orderList')">
<el-icon size="30"><Coin /></el-icon>
<div>统计</div>
</div>
</div> </div>
</template> </template>

View File

@ -9,20 +9,30 @@ const routes = [
name: 'layout', name: 'layout',
component: layout, component: layout,
redirect: '/home', redirect: '/home',
meta: { title: '里海收银系统' },
children: [ children: [
{ {
path: '/home', path: '/home',
name: 'home', name: 'home',
meta: { title: '收银' },
component: () => import('@/views/home/index.vue'), component: () => import('@/views/home/index.vue'),
}, },
{ {
path: '/order', path: '/order',
name: 'order', name: 'order',
meta: { title: '收银订单' },
component: () => import('@/views/order/index.vue'), component: () => import('@/views/order/index.vue'),
}, },
{
path: '/orderSystem',
name: 'orderSystem',
meta: { title: '平台订单' },
component: () => import('@/views/order/indexSystem.vue'),
},
{ {
path: '/orderList', path: '/orderList',
name: 'orderList', name: 'orderList',
meta: { title: '统计' },
component: () => import('@/views/order/indexList.vue'), component: () => import('@/views/order/indexList.vue'),
}, },
{ {

View File

@ -12,6 +12,12 @@ import { useRouter } from "vue-router";
import mitt from "@/utils/mitt.js"; import mitt from "@/utils/mitt.js";
const userStore = useUserStore(); const userStore = useUserStore();
const props = defineProps({
isSystem:{
type:Boolean,
default:false
}
})
const list = ref([]); const list = ref([]);
@ -24,13 +30,19 @@ const changeTabPosition = (e) => {
getOrderList(true); getOrderList(true);
}; };
const payRef = ref(null); const payRef = ref(null);
const date = ref('');
const changeDate = ()=>{
where.value.date = date.value.join('-');
getOrderList(true);
}
const where = ref({ const where = ref({
page: 1, page: 1,
limit: 20, limit: 20,
search_info: '' search_info: "",
date: "",
}); });
const loading = ref(false); const loading = ref(false);
@ -39,22 +51,25 @@ const activeStore = ref(0);
const loadEnd = ref(false); const loadEnd = ref(false);
const orderList = ref([]); const orderList = ref([]);
const getOrderList = (reload=false) => { const getOrderList = (reload = false) => {
if(reload) where.value.page = 1; if (reload) where.value.page = 1;
else if(loadEnd.value || loading.value) return; else if (loadEnd.value || loading.value) return;
if(!props.isSystem) where.value.staff_id = userStore.userInfo.service.service_id;
loading.value = true; loading.value = true;
if (tabPosition.value == 1) where.value.paid = null; if (tabPosition.value == 1) where.value.paid = null;
if (tabPosition.value == 2) where.value.paid = 0; if (tabPosition.value == 2) where.value.paid = 0;
orderListApi(userStore.userInfo.service.mer_id, where.value).then((res) => { orderListApi(userStore.userInfo.service.mer_id, where.value)
if(reload) orderList.value = res.data.list; .then((res) => {
if (reload) orderList.value = res.data.list;
else orderList.value = [...orderList.value, ...res.data.list]; else orderList.value = [...orderList.value, ...res.data.list];
if(res.data.list.length < where.value.limit) loadEnd.value = true; if (res.data.list.length < where.value.limit) loadEnd.value = true;
else where.value.page++; else where.value.page++;
activeStore.value = 0; activeStore.value = 0;
mitt.emit("set-order-detail", orderList.value[0]); mitt.emit("set-order-detail", orderList.value[0]);
total.value = res.data.count; total.value = res.data.count;
loading.value = false; loading.value = false;
}).catch(err=>{ })
.catch((err) => {
loadEnd.value = true; loadEnd.value = true;
loading.value = false; loading.value = false;
}); });
@ -63,14 +78,16 @@ const getOrderList = (reload=false) => {
const setForm = (item, index) => { const setForm = (item, index) => {
activeStore.value = index; activeStore.value = index;
mitt.emit("set-order-detail", item); mitt.emit("set-order-detail", item);
} };
</script> </script>
<template> <template>
<div class="my-order"> <div class="my-order">
<div class="header-nav"> <div class="header-nav">
<div class="nav-item">订单列表</div> <div class="nav-item">
<div class="nav-item-clear"> {{ isSystem ? '平台订单' : '收银订单' }}
</div>
<div class="nav-item-btn">
<el-radio-group <el-radio-group
v-model="tabPosition" v-model="tabPosition"
@change="changeTabPosition" @change="changeTabPosition"
@ -79,10 +96,26 @@ const setForm = (item, index) => {
<el-radio-button :value="1">全部</el-radio-button> <el-radio-button :value="1">全部</el-radio-button>
<el-radio-button :value="2">未支付</el-radio-button> <el-radio-button :value="2">未支付</el-radio-button>
</el-radio-group> </el-radio-group>
<el-date-picker
v-model="date"
type="daterange"
start-placeholder="开始时间"
end-placeholder="结束时间"
size="small"
value-format="YYYY/MM/DD"
@change="changeDate"
style="width: 14rem;margin-left: 1rem;"
/>
</div> </div>
</div> </div>
<div class="header-input"> <div class="header-input">
<el-input v-model="where.search_info" placeholder="请输入订单编号" @keydown.enter="getOrderList(true)" @clear="getOrderList(true)" clearable> <el-input
v-model="where.search_info"
placeholder="请输入订单编号"
@keydown.enter="getOrderList(true)"
@clear="getOrderList(true)"
clearable
>
<template #append> <template #append>
<el-button <el-button
type="primary" type="primary"
@ -97,13 +130,34 @@ const setForm = (item, index) => {
</template> </template>
</el-input> </el-input>
</div> </div>
<div class="order-list" v-loading="loading" v-infinite-scroll="getOrderList" <div
class="order-list"
v-loading="loading"
v-infinite-scroll="getOrderList"
infinite-scroll-distance="300" infinite-scroll-distance="300"
infinite-scroll-delay="500" infinite-scroll-delay="500"
style="overflow: auto"> 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="item"
:class="{ 'item-active': activeStore == index }"
v-for="(item, index) in orderList"
:key="index"
@click="setForm(item, index)"
>
<div class="top"> <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="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 class="create-time">{{ item.create_time }}</div>
</div> </div>
<div class="shop"> <div class="shop">
@ -137,9 +191,11 @@ const setForm = (item, index) => {
<span v-if="item.pay_type == 9">(商户余额支付)</span> <span v-if="item.pay_type == 9">(商户余额支付)</span>
<span v-if="item.pay_type == 10">(对公转账)</span> <span v-if="item.pay_type == 10">(对公转账)</span>
</div> </div>
<div v-else style="color: #ff4a00;">未支付</div> <div v-else style="color: #ff4a00">未支付</div>
</div>
<div class="cashier" v-if="item.service_info">
收银员: {{ item.service_info.nickname }}
</div> </div>
<div class="cashier" v-if="item.service_info">收银员: {{ item.service_info.nickname }}</div>
<div class="cashier" v-else>平台订单</div> <div class="cashier" v-else>平台订单</div>
</div> </div>
</div> </div>
@ -160,18 +216,21 @@ const setForm = (item, index) => {
.header-nav { .header-nav {
display: flex; display: flex;
flex-direction: column;
justify-content: space-between; justify-content: space-between;
padding: 1rem; padding: 1rem;
height: 1.5rem; height: 3.5rem;
span { span {
color: #ff4a00; color: #ff4a00;
} }
.nav-item-clear { .nav-item{
font-weight: bold;
}
.nav-item-btn {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
font-size: 0.8rem;
cursor: pointer;
} }
} }
.header-input { .header-input {
@ -181,7 +240,7 @@ const setForm = (item, index) => {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.order-list { .order-list {
height: calc(100vh - 100px - 8.2rem); height: calc(100vh - 100px - 10.2rem);
overflow-y: auto; overflow-y: auto;
.item { .item {
padding: 1rem; padding: 1rem;
@ -194,7 +253,7 @@ const setForm = (item, index) => {
font-weight: bold; font-weight: bold;
font-size: 0.9rem; font-size: 0.9rem;
} }
.cahier{ .cahier {
&::before { &::before {
content: "收银"; content: "收银";
font-weight: 400; font-weight: 400;
@ -206,7 +265,7 @@ const setForm = (item, index) => {
border-radius: 3px; border-radius: 3px;
} }
} }
.cahier2{ .cahier2 {
&::before { &::before {
content: "平台"; content: "平台";
font-weight: 400; font-weight: 400;
@ -261,18 +320,18 @@ const setForm = (item, index) => {
} }
} }
} }
.bottom{ .bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 0.9rem; font-size: 0.9rem;
color: #777; color: #777;
} }
} }
.item-active{ .item-active {
background-color: #efefef; background-color: #efefef;
} }
} }
.load-end{ .load-end {
text-align: center; text-align: center;
padding: 1rem; padding: 1rem;
color: #333; color: #333;

View File

@ -0,0 +1,43 @@
<script setup>
import order from "./component/order.vue";
import detail from "./component/detail.vue";
import padding from "@/components/padding.vue";
import { ref, nextTick } from "vue";
</script>
<template>
<div class="my-card">
<order style="flex-shrink: 0;" ref="orderRef" isSystem/>
<padding />
<detail ref="detailRef"/>
</div>
</template>
<style lang="scss">
.my-card {
display: flex;
}
/* 修改滚动条的样式 */
::-webkit-scrollbar {
width: 5px; /* 设置滚动条的宽度 */
}
/* 设置滚动条的轨道样式 */
::-webkit-scrollbar-track {
background-color: #f1f1f1; /* 设置轨道的背景色 */
/* margin: 20px 0; */
}
/* 设置滚动条的滑块样式 */
::-webkit-scrollbar-thumb {
background-color: #ccc; /* 设置滑块的背景色 */
border-radius: 5px; /* 设置滑块的圆角 */
}
/* 设置滚动条鼠标悬停时的滑块样式 */
::-webkit-scrollbar-thumb:hover {
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
}
</style>

View File

@ -1,6 +1,6 @@
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue";
import { storeListApi, userFreeTrialApi } from "@/api/shop.js"; import { storeListApi, userFreeTrialApi, productTitleApi } from "@/api/shop.js";
import { useUserStore } from "@/store/user.js"; import { useUserStore } from "@/store/user.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
@ -10,6 +10,8 @@ const userStore = useUserStore();
const where = ref({ const where = ref({
page: 1, page: 1,
limit: 15, limit: 15,
type: 1,
staff_id: userStore.userInfo.service.service_id,
}); });
const loading = ref(false); const loading = ref(false);
@ -50,35 +52,68 @@ const edit = (row) => {
const submitUpdate = () => { const submitUpdate = () => {
let obj = { let obj = {
attr: form.value.attr||[], attr: form.value.attr || [],
attrValue: form.value.attrValue, attrValue: form.value.attrValue,
mer_cate_id: form.value.merCateId || [], mer_cate_id: form.value.merCateId || [],
spec_type: form.value.spec_type, spec_type: form.value.spec_type,
is_stock: 1, is_stock: 1,
}; };
userFreeTrialApi(form.value.product_id, obj).then((res) => { userFreeTrialApi(form.value.product_id, obj)
.then((res) => {
ElMessage({ ElMessage({
message: res.message, message: res.message,
type: "success", type: "success",
}) });
dialogFormVisible.value = false; dialogFormVisible.value = false;
getOrderList(); getOrderList();
}).catch(err=>{ })
.catch((err) => {
ElMessage({ ElMessage({
message: err, message: err,
type: "error", type: "error",
}) });
}); });
}; };
const activeIndex = ref(1);
const handleSelect = (key) => {
where.value.type = key;
where.value.page = 1;
getOrderList();
};
const productTitle = ref([]);
const getProductTitleApi = () => {
productTitleApi(userStore.userInfo.service.mer_id).then((res) => {
productTitle.value = res.data;
});
};
getProductTitleApi();
</script> </script>
<template> <template>
<div v-loading="loading" element-loading-text="加载中" class="my-shop"> <div v-loading="loading" element-loading-text="加载中" class="my-shop">
<el-menu
:default-active="activeIndex"
class="el-menu-top"
mode="horizontal"
@select="handleSelect"
>
<el-menu-item
:index="item.type"
v-for="(item, index) in productTitle"
:key="index"
>{{ `${item.name}(${item.count})` }}</el-menu-item
>
</el-menu>
<el-table :data="orderList" style="width: 100%"> <el-table :data="orderList" style="width: 100%">
<el-table-column prop="product_id" label="ID" width="100" /> <el-table-column prop="product_id" label="ID" width="100" />
<el-table-column prop="image" label="图片" width="120"> <el-table-column prop="image" label="图片" width="120">
<template #default="scope"> <template #default="scope">
<el-image loading="lazy" <el-image
loading="lazy"
style="width: 60px; height: 60px" style="width: 60px; height: 60px"
:src="scope.row.image" :src="scope.row.image"
></el-image> ></el-image>
@ -87,14 +122,36 @@ const submitUpdate = () => {
<el-table-column prop="store_name" label="商品名称" width="500" /> <el-table-column prop="store_name" label="商品名称" width="500" />
<el-table-column prop="price" label="售价" /> <el-table-column prop="price" label="售价" />
<el-table-column prop="stock" label="库存" /> <el-table-column prop="stock" label="库存" />
<el-table-column label="上/下架" v-if="where.type<=2" width="100">
<template #default="scope">
<el-switch
v-model="scope.row.is_show"
:active-value="1"
inline-prompt
active-text="上架"
inactive-text="下架"
/>
</template>
</el-table-column>
<el-table-column label="商品状态" width="100">
<template #default="scope">
<span v-if="scope.row.is_used">上架显示</span>
<span v-else style="color: #ff4a00">平台关闭</span>
</template>
</el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template #default="scope"> <template #default="scope">
<el-button type="primary" link @click="edit(scope.row)" <el-button
>编辑</el-button type="primary"
v-if="where.type <= 4"
link
@click="edit(scope.row)"
>修改库存</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
:page-size="where.limit" :page-size="where.limit"
layout="prev, pager, next" layout="prev, pager, next"
@ -113,7 +170,8 @@ const submitUpdate = () => {
> >
<el-table-column prop="image" label="图片" width="180"> <el-table-column prop="image" label="图片" width="180">
<template #default="scope"> <template #default="scope">
<el-image loading="lazy" <el-image
loading="lazy"
style="width: 5rem; height: 5rem" style="width: 5rem; height: 5rem"
:src="scope.row.image || form.image" :src="scope.row.image || form.image"
/> />
@ -175,4 +233,7 @@ const submitUpdate = () => {
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */ background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
} }
.el-menu--horizontal {
height: 2.5rem;
}
</style> </style>