Compare commits
7 Commits
d519d8961f
...
a584e1f1ac
Author | SHA1 | Date |
---|---|---|
weipengfei | a584e1f1ac | |
weipengfei | 6761eecefd | |
weipengfei | 995017dff0 | |
weipengfei | bd7886dd3b | |
weipengfei | df365d0692 | |
weipengfei | cc8d911e0e | |
weipengfei | 38e3259be3 |
|
@ -1 +1 @@
|
|||
import{r as o,b as c,c as m,d as y,w as p,g as v,t as f,N as x}from"./index-BlCcmI7_.js";const g={__name:"authCode",props:{type:{type:String,default:"primary"},start:{type:Boolean,default:!0},time:{type:Number,default:60},text:{type:String,default:"发送验证码"},timeText:{type:String,default:"秒重新获取"},width:{type:String,default:"100px"},disabled:{type:Boolean,default:!1}},emits:["sendCode"],setup(t,{expose:s,emit:r}){const l=t,u=r,i=()=>{u("sendCode"),l.start&&n()},e=o(0),a=o(null),n=()=>{e.value=l.time,a.value=setInterval(()=>{e.value--,e.value<=0&&(clearInterval(a.value),e.value=0)},1e3)};return s({startCountDown:n,resetDown:()=>{clearInterval(a.value),e.value=0}}),(b,C)=>{const d=c("el-button");return m(),y(d,{type:t.type,style:x({width:t.width}),onClick:i,disabled:e.value>0||t.disabled},{default:p(()=>[v(f(e.value>0?`${e.value}${t.timeText}`:t.text),1)]),_:1},8,["type","style","disabled"])}}};export{g as _};
|
||||
import{r as o,b as c,c as m,d as y,w as p,g as v,t as f,N as x}from"./index-DcsjF_vo.js";const g={__name:"authCode",props:{type:{type:String,default:"primary"},start:{type:Boolean,default:!0},time:{type:Number,default:60},text:{type:String,default:"发送验证码"},timeText:{type:String,default:"秒重新获取"},width:{type:String,default:"100px"},disabled:{type:Boolean,default:!1}},emits:["sendCode"],setup(t,{expose:s,emit:r}){const l=t,u=r,i=()=>{u("sendCode"),l.start&&n()},e=o(0),a=o(null),n=()=>{e.value=l.time,a.value=setInterval(()=>{e.value--,e.value<=0&&(clearInterval(a.value),e.value=0)},1e3)};return s({startCountDown:n,resetDown:()=>{clearInterval(a.value),e.value=0}}),(b,C)=>{const d=c("el-button");return m(),y(d,{type:t.type,style:x({width:t.width}),onClick:i,disabled:e.value>0||t.disabled},{default:p(()=>[v(f(e.value>0?`${e.value}${t.timeText}`:t.text),1)]),_:1},8,["type","style","disabled"])}}};export{g as _};
|
|
@ -1 +1 @@
|
|||
import{O as o,P as s,E as r,u as d,Q as g}from"./index-BlCcmI7_.js";const m=o.create({baseURL:s.api,timeout:6e4});m.interceptors.request.use(t=>{const a=localStorage.getItem("Token");return a&&(t.headers.token=a),t},t=>(console.error(t),Promise.reject(t)));m.interceptors.response.use(t=>{var a;if(t.data.code===-1&&(t.data.msg=="登录过期"||t.data.msg=="登录超时,请重新登录"))throw r({message:t.data.msg,type:"error"}),setTimeout(()=>{const e=d();e.setUserInfo({}),e.setToken(""),g.push("/login")},500),new Error(t.data.msg);if(t.data.code===400)throw r({message:t.data.msg,type:"error"}),new Error(t.data.msg);if(t.data.show&&r({message:t.data.msg,type:"error"}),t.data.code===500)throw t.data.msg=JSON.parse(t.data.msg),r({message:((a=t.data.msg)==null?void 0:a.msg)||t.data.msg,type:"error"}),new Error(t.data.msg);return t.data.code===0?Promise.reject(t.data):t.data},t=>{var a,e;return console.error(t),r({message:((e=(a=t.response)==null?void 0:a.data)==null?void 0:e.msg)||t,type:"error"}),Promise.reject(t)});export{m as r};
|
||||
import{O as o,P as s,E as r,u as d,Q as g}from"./index-DcsjF_vo.js";const m=o.create({baseURL:s.api,timeout:6e4});m.interceptors.request.use(t=>{const a=localStorage.getItem("Token");return a&&(t.headers.token=a),t},t=>(console.error(t),Promise.reject(t)));m.interceptors.response.use(t=>{var a;if(t.data.code===-1&&(t.data.msg=="登录过期"||t.data.msg=="登录超时,请重新登录"))throw r({message:t.data.msg,type:"error"}),setTimeout(()=>{const e=d();e.setUserInfo({}),e.setToken(""),g.push("/login")},500),new Error(t.data.msg);if(t.data.code===400)throw r({message:t.data.msg,type:"error"}),new Error(t.data.msg);if(t.data.show&&r({message:t.data.msg,type:"error"}),t.data.code===500)throw t.data.msg=JSON.parse(t.data.msg),r({message:((a=t.data.msg)==null?void 0:a.msg)||t.data.msg,type:"error"}),new Error(t.data.msg);return t.data.code===0?Promise.reject(t.data):t.data},t=>{var a,e;return console.error(t),r({message:((e=(a=t.response)==null?void 0:a.data)==null?void 0:e.msg)||t,type:"error"}),Promise.reject(t)});export{m as r};
|
|
@ -1 +1 @@
|
|||
import{_ as I,u as U,r as u,o as R,b as n,c as S,k as b,e as v,f as e,w as t,i as m,g as L,q as B,s as C,I as E,E as w}from"./index-BlCcmI7_.js";import{l as K}from"./user-DIpwgLs2.js";const N=l=>(B("data-v-f9ff2ce9"),l=l(),C(),l),M={class:"body"},T={class:"login"},q=N(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__name:"index",setup(l){const d=U(),y=E(),k=u(null),p=u(null),s=u({account:"",password:"",terminal:1}),_=()=>{if(!s.value.account)return w({message:"请填写账号",type:"error"});if(!s.value.password)return w({message:"请填写密码",type:"error"});K(s.value).then(a=>{var o;(o=a.data)!=null&&o.token&&(d.setToken(a.data.token),d.setUserInfo(a.data),y.push("/"))}).catch(a=>{})};return R(()=>{}),(a,o)=>{const h=n("User"),f=n("el-icon"),i=n("el-input"),c=n("el-form-item"),x=n("Lock"),V=n("el-button"),g=n("el-form");return S(),b("div",M,[v("div",T,[q,e(g,null,{default:t(()=>[e(c,null,{default:t(()=>[e(i,{ref_key:"accRef",ref:k,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",onKeydown:o[1]||(o[1]=m(r=>p.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(h)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(i,{ref_key:"pwdRef",ref:p,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:m(_,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(x)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:_},{default:t(()=>[L("登录")]),_:1})]),_:1})]),_:1})])])}}},A=I($,[["__scopeId","data-v-f9ff2ce9"]]);export{A as default};
|
||||
import{_ as I,u as U,r as u,o as R,b as n,c as S,k as b,e as v,f as e,w as t,i as m,g as L,q as B,s as C,I as E,E as w}from"./index-DcsjF_vo.js";import{l as K}from"./user-An8JmJCJ.js";const N=l=>(B("data-v-f9ff2ce9"),l=l(),C(),l),M={class:"body"},T={class:"login"},q=N(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__name:"index",setup(l){const d=U(),y=E(),k=u(null),p=u(null),s=u({account:"",password:"",terminal:1}),_=()=>{if(!s.value.account)return w({message:"请填写账号",type:"error"});if(!s.value.password)return w({message:"请填写密码",type:"error"});K(s.value).then(a=>{var o;(o=a.data)!=null&&o.token&&(d.setToken(a.data.token),d.setUserInfo(a.data),y.push("/"))}).catch(a=>{})};return R(()=>{}),(a,o)=>{const h=n("User"),f=n("el-icon"),i=n("el-input"),c=n("el-form-item"),x=n("Lock"),V=n("el-button"),g=n("el-form");return S(),b("div",M,[v("div",T,[q,e(g,null,{default:t(()=>[e(c,null,{default:t(()=>[e(i,{ref_key:"accRef",ref:k,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",onKeydown:o[1]||(o[1]=m(r=>p.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(h)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(i,{ref_key:"pwdRef",ref:p,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:m(_,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(x)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:_},{default:t(()=>[L("登录")]),_:1})]),_:1})]),_:1})])])}}},A=I($,[["__scopeId","data-v-f9ff2ce9"]]);export{A 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
|
@ -1 +1 @@
|
|||
import{b as t,c,k as a,e,f as o,w as d,g as l}from"./index-BlCcmI7_.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"}},p=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),h=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,[p,h,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default};
|
||||
import{b as t,c,k as a,e,f as o,w as d,g as l}from"./index-DcsjF_vo.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"}},p=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),h=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,[p,h,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{a as B,b as L}from"./shop-BHA70lJe.js";import{r as f,b as s,h as v,c as i,k as b,f as e,w as a,j as N,g as r,d,p as y,E as A}from"./index-BlCcmI7_.js";import"./axiosAPI-DIkvDLxY.js";const D={class:"my-card put-storage"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},U={__name:"index",setup(S){const u=f([]),t=f({page_no:1,page_size:20,loadend:!1,type:1}),_=f(!1),c=()=>{t.value.loadend||(_.value=!0,B({page_no:t.value.page_no,page_size:t.value.page_size,type:t.value.type}).then(n=>{u.value=[...u.value,...n.data.lists],n.data.lists.length<t.value.page_size&&(t.value.loadend=!0),t.value.page_no++,_.value=!1}))};c();const h=()=>{t.value.page_no=1,t.value.loadend=!1,u.value=[],c()},k=async n=>{L({id:n.id}).then(p=>{n.status=1,A.success("入库成功")})};return(n,p)=>{const g=s("el-radio-button"),x=s("el-radio-group"),o=s("el-table-column"),C=s("el-image"),m=s("el-tag"),V=s("el-button"),E=s("el-table"),w=v("loading"),z=v("infinite-scroll");return i(),b("div",D,[e(x,{style:{"margin-bottom":"20px"},modelValue:t.value.type,"onUpdate:modelValue":p[0]||(p[0]=l=>t.value.type=l),onChange:h},{default:a(()=>[e(g,{label:1,value:1},{default:a(()=>[r("售卖库存")]),_:1}),e(g,{label:2,value:2},{default:a(()=>[r("兑换库存")]),_:1})]),_:1},8,["modelValue"]),N((i(),b("div",I,[e(E,{data:u.value},{default:a(()=>[e(o,{label:"导入人员",prop:"admin_name"}),e(o,{label:"门店确认人员",prop:"staff_name"}),e(o,{label:"商品图",prop:"image"},{default:a(({row:l})=>[e(C,{class:"image",src:l.image},null,8,["src"])]),_:1}),e(o,{label:"商品",prop:"store_name"}),e(o,{label:"数量",prop:"nums"}),e(o,{label:"状态",prop:"status"},{default:a(({row:l})=>[l.status===1?(i(),d(m,{key:0,type:"success"},{default:a(()=>[r("已入库")]),_:1})):l.status===0?(i(),d(m,{key:1,type:"warning"},{default:a(()=>[r("待确认")]),_:1})):l.status===-1?(i(),d(m,{key:2,type:"danger"},{default:a(()=>[r("库存不足")]),_:1})):y("",!0)]),_:1}),e(o,{label:"备注",prop:"mark"}),e(o,{label:"操作",width:"120",fixed:"right"},{default:a(({row:l})=>[l.status==0?(i(),d(V,{key:0,type:"success",onClick:j=>k(l)},{default:a(()=>[r(" 确认入库 ")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"])])),[[w,_.value],[z,c]])])}}};export{U as default};
|
||||
import{a as B,b as L}from"./shop-BpSxsDCM.js";import{r as f,b as s,h as v,c as i,k as b,f as e,w as a,j as N,g as r,d,p as y,E as A}from"./index-DcsjF_vo.js";import"./axiosAPI-D4twWwIZ.js";const D={class:"my-card put-storage"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},U={__name:"index",setup(S){const u=f([]),t=f({page_no:1,page_size:20,loadend:!1,type:1}),_=f(!1),c=()=>{t.value.loadend||(_.value=!0,B({page_no:t.value.page_no,page_size:t.value.page_size,type:t.value.type}).then(n=>{u.value=[...u.value,...n.data.lists],n.data.lists.length<t.value.page_size&&(t.value.loadend=!0),t.value.page_no++,_.value=!1}))};c();const h=()=>{t.value.page_no=1,t.value.loadend=!1,u.value=[],c()},k=async n=>{L({id:n.id}).then(p=>{n.status=1,A.success("入库成功")})};return(n,p)=>{const g=s("el-radio-button"),x=s("el-radio-group"),o=s("el-table-column"),C=s("el-image"),m=s("el-tag"),V=s("el-button"),E=s("el-table"),w=v("loading"),z=v("infinite-scroll");return i(),b("div",D,[e(x,{style:{"margin-bottom":"20px"},modelValue:t.value.type,"onUpdate:modelValue":p[0]||(p[0]=l=>t.value.type=l),onChange:h},{default:a(()=>[e(g,{label:1,value:1},{default:a(()=>[r("售卖库存")]),_:1}),e(g,{label:2,value:2},{default:a(()=>[r("兑换库存")]),_:1})]),_:1},8,["modelValue"]),N((i(),b("div",I,[e(E,{data:u.value},{default:a(()=>[e(o,{label:"导入人员",prop:"admin_name"}),e(o,{label:"门店确认人员",prop:"staff_name"}),e(o,{label:"商品图",prop:"image"},{default:a(({row:l})=>[e(C,{class:"image",src:l.image},null,8,["src"])]),_:1}),e(o,{label:"商品",prop:"store_name"}),e(o,{label:"数量",prop:"nums"}),e(o,{label:"状态",prop:"status"},{default:a(({row:l})=>[l.status===1?(i(),d(m,{key:0,type:"success"},{default:a(()=>[r("已入库")]),_:1})):l.status===0?(i(),d(m,{key:1,type:"warning"},{default:a(()=>[r("待确认")]),_:1})):l.status===-1?(i(),d(m,{key:2,type:"danger"},{default:a(()=>[r("库存不足")]),_:1})):y("",!0)]),_:1}),e(o,{label:"备注",prop:"mark"}),e(o,{label:"操作",width:"120",fixed:"right"},{default:a(({row:l})=>[l.status==0?(i(),d(V,{key:0,type:"success",onClick:j=>k(l)},{default:a(()=>[r(" 确认入库 ")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"])])),[[w,_.value],[z,c]])])}}};export{U as default};
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
@charset "UTF-8";.my-order[data-v-44031ac3]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-44031ac3]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-44031ac3]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-44031ac3]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-44031ac3]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-44031ac3]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-44031ac3]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-lists .item[data-v-44031ac3]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-44031ac3]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-44031ac3]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-44031ac3]: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-lists .item .top .cahier2[data-v-44031ac3]: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-lists .item .top .create-time[data-v-44031ac3]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-44031ac3]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-44031ac3]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-44031ac3]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-44031ac3]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-44031ac3]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-44031ac3]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-44031ac3]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-lists .item .bottom[data-v-44031ac3]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-44031ac3]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-44031ac3]{background-color:#efefef}.my-order .load-end[data-v-44031ac3]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-065ffd6b]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-065ffd6b]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-065ffd6b]{padding:1rem;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-065ffd6b]{font-weight:700}.my-order .detail .table .table-info[data-v-065ffd6b]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-065ffd6b]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-065ffd6b]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-065ffd6b]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-065ffd6b]{position:absolute;bottom:0;left:0;z-index:1;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.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}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{r as m,b as n,h,c as r,k as V,e as w,f as l,i as K,w as t,j as P,g as s,d as v,p as b}from"./index-BlCcmI7_.js";import{c as U}from"./shop-BHA70lJe.js";import"./axiosAPI-DIkvDLxY.js";const j={class:"my-card put-storage"},A={class:"storage-header"},E={class:"flex"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},q={__name:"index",setup(O){const d=m([]),e=m({page_no:1,page_size:20,loadend:!1,store_name:"",status:null,stock:null}),f=m(!1),g=()=>{e.value.loadend||(f.value=!0,U({page_no:e.value.page_no,page_size:e.value.page_size,store_name:e.value.store_name,stock:e.value.stock,status:e.value.status}).then(o=>{d.value=[...d.value,...o.data.lists],o.data.lists.length<e.value.page_size&&(e.value.loadend=!0),e.value.page_no++,f.value=!1}))};g();const _=()=>{e.value.page_no=1,e.value.loadend=!1,d.value=[],g()},k=m(0),x=o=>{o==0?(e.value.status=null,e.value.stock=null):o==1?(e.value.status=1,e.value.stock=null):o==2?(e.value.status=0,e.value.stock=null):o==3?(e.value.status=null,e.value.stock=10):o==4&&(e.value.status=null,e.value.stock=0),_()};return(o,i)=>{const C=n("el-input"),y=n("el-button"),c=n("el-radio-button"),z=n("el-radio-group"),u=n("el-table-column"),B=n("el-image"),p=n("el-tag"),L=n("el-table"),N=h("loading"),D=h("infinite-scroll");return r(),V("div",j,[w("div",A,[w("div",E,[l(C,{placeholder:"请输入商品名称",style:{width:"20rem"},modelValue:e.value.store_name,"onUpdate:modelValue":i[0]||(i[0]=a=>e.value.store_name=a),onKeydown:K(_,["enter"])},null,8,["modelValue"]),l(y,{style:{"margin-left":"1rem"},type:"primary",onClick:_},{default:t(()=>[s("搜索")]),_:1}),l(y,{style:{"margin-left":"1rem"},onClick:i[1]||(i[1]=a=>{e.value.store_name="",_()})},{default:t(()=>[s("重置")]),_:1})]),l(z,{style:{"margin-bottom":"20px"},modelValue:k.value,"onUpdate:modelValue":i[2]||(i[2]=a=>k.value=a),onChange:x},{default:t(()=>[l(c,{label:0,value:0},{default:t(()=>[s("全部")]),_:1}),l(c,{label:1,value:1},{default:t(()=>[s("上架")]),_:1}),l(c,{label:2,value:2},{default:t(()=>[s("下架")]),_:1}),l(c,{label:3,value:3},{default:t(()=>[s("库存预警")]),_:1}),l(c,{label:4,value:4},{default:t(()=>[s("已售罄")]),_:1})]),_:1},8,["modelValue"])]),P((r(),V("div",I,[l(L,{data:d.value},{default:t(()=>[l(u,{label:"ID",prop:"id","min-width":"55"}),l(u,{label:"商品图",prop:"image",width:"100"},{default:t(({row:a})=>[l(B,{class:"image",src:a.image},null,8,["src"])]),_:1}),l(u,{label:"商品名",prop:"store_name","min-width":"200"}),l(u,{label:"分类",prop:"cate_name"}),l(u,{label:"销量",prop:"sales"}),l(u,{label:"库存",prop:"stock"}),l(u,{label:"状态",prop:"status"},{default:t(({row:a})=>[a.status==1?(r(),v(p,{key:0,class:"el-tag",type:"success"},{default:t(()=>[s("上架")]),_:1})):a.status==0?(r(),v(p,{key:1,class:"el-tag",type:"info"},{default:t(()=>[s("下架")]),_:1})):b("",!0),a.stock<=10&&a.stock>0?(r(),v(p,{key:2,class:"el-tag",type:"warning"},{default:t(()=>[s("库存预警")]),_:1})):b("",!0),a.stock==0?(r(),v(p,{key:3,class:"el-tag",type:"danger"},{default:t(()=>[s("已售罄")]),_:1})):b("",!0)]),_:1})]),_:1},8,["data"])])),[[N,f.value],[D,g]])])}}};export{q as default};
|
||||
import{r as m,b as n,h,c as r,k as V,e as w,f as l,i as K,w as t,j as P,g as s,d as v,p as b}from"./index-DcsjF_vo.js";import{c as U}from"./shop-BpSxsDCM.js";import"./axiosAPI-D4twWwIZ.js";const j={class:"my-card put-storage"},A={class:"storage-header"},E={class:"flex"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},q={__name:"index",setup(O){const d=m([]),e=m({page_no:1,page_size:20,loadend:!1,store_name:"",status:null,stock:null}),f=m(!1),g=()=>{e.value.loadend||(f.value=!0,U({page_no:e.value.page_no,page_size:e.value.page_size,store_name:e.value.store_name,stock:e.value.stock,status:e.value.status}).then(o=>{d.value=[...d.value,...o.data.lists],o.data.lists.length<e.value.page_size&&(e.value.loadend=!0),e.value.page_no++,f.value=!1}))};g();const _=()=>{e.value.page_no=1,e.value.loadend=!1,d.value=[],g()},k=m(0),x=o=>{o==0?(e.value.status=null,e.value.stock=null):o==1?(e.value.status=1,e.value.stock=null):o==2?(e.value.status=0,e.value.stock=null):o==3?(e.value.status=null,e.value.stock=10):o==4&&(e.value.status=null,e.value.stock=0),_()};return(o,i)=>{const C=n("el-input"),y=n("el-button"),c=n("el-radio-button"),z=n("el-radio-group"),u=n("el-table-column"),B=n("el-image"),p=n("el-tag"),L=n("el-table"),N=h("loading"),D=h("infinite-scroll");return r(),V("div",j,[w("div",A,[w("div",E,[l(C,{placeholder:"请输入商品名称",style:{width:"20rem"},modelValue:e.value.store_name,"onUpdate:modelValue":i[0]||(i[0]=a=>e.value.store_name=a),onKeydown:K(_,["enter"])},null,8,["modelValue"]),l(y,{style:{"margin-left":"1rem"},type:"primary",onClick:_},{default:t(()=>[s("搜索")]),_:1}),l(y,{style:{"margin-left":"1rem"},onClick:i[1]||(i[1]=a=>{e.value.store_name="",_()})},{default:t(()=>[s("重置")]),_:1})]),l(z,{style:{"margin-bottom":"20px"},modelValue:k.value,"onUpdate:modelValue":i[2]||(i[2]=a=>k.value=a),onChange:x},{default:t(()=>[l(c,{label:0,value:0},{default:t(()=>[s("全部")]),_:1}),l(c,{label:1,value:1},{default:t(()=>[s("上架")]),_:1}),l(c,{label:2,value:2},{default:t(()=>[s("下架")]),_:1}),l(c,{label:3,value:3},{default:t(()=>[s("库存预警")]),_:1}),l(c,{label:4,value:4},{default:t(()=>[s("已售罄")]),_:1})]),_:1},8,["modelValue"])]),P((r(),V("div",I,[l(L,{data:d.value},{default:t(()=>[l(u,{label:"ID",prop:"id","min-width":"55"}),l(u,{label:"商品图",prop:"image",width:"100"},{default:t(({row:a})=>[l(B,{class:"image",src:a.image},null,8,["src"])]),_:1}),l(u,{label:"商品名",prop:"store_name","min-width":"200"}),l(u,{label:"分类",prop:"cate_name"}),l(u,{label:"销量",prop:"sales"}),l(u,{label:"库存",prop:"stock"}),l(u,{label:"状态",prop:"status"},{default:t(({row:a})=>[a.status==1?(r(),v(p,{key:0,class:"el-tag",type:"success"},{default:t(()=>[s("上架")]),_:1})):a.status==0?(r(),v(p,{key:1,class:"el-tag",type:"info"},{default:t(()=>[s("下架")]),_:1})):b("",!0),a.stock<=10&&a.stock>0?(r(),v(p,{key:2,class:"el-tag",type:"warning"},{default:t(()=>[s("库存预警")]),_:1})):b("",!0),a.stock==0?(r(),v(p,{key:3,class:"el-tag",type:"danger"},{default:t(()=>[s("已售罄")]),_:1})):b("",!0)]),_:1})]),_:1},8,["data"])])),[[N,f.value],[D,g]])])}}};export{q as default};
|
|
@ -1 +0,0 @@
|
|||
import{f as i}from"./merchant-D3hveOek.js";import{_ as d,r as a,b as l,h as p,j as m,c as u,k as h,e as f,f as e,w as v}from"./index-BlCcmI7_.js";const b={"element-loading-text":"加载中",class:"my-order"},g={class:"table"},x={__name:"indexCount",setup(w){const o=a([]),n=a({page_no:1,page_size:15}),r=a(!1);return(()=>{i(n.value).then(s=>{o.value=s.data.lists})})(),(s,k)=>{const t=l("el-table-column"),c=l("el-table"),_=p("loading");return m((u(),h("div",b,[f("div",g,[e(c,{data:o.value,style:{width:"100%"}},{default:v(()=>[e(t,{prop:"record_date",label:"时间",width:"260"}),e(t,{prop:"cashier_cash_total_amount",label:"现金收银金额(元)"}),e(t,{prop:"cashier_total_amount",label:"线上收银金额(元)"}),e(t,{prop:"platofrm_total_amount",label:"平台订单金额(元)"}),e(t,{prop:"total_amount",label:"总金额(元)"})]),_:1},8,["data"])])])),[[_,r.value]])}}},y=d(x,[["__scopeId","data-v-d25755c6"]]);export{y as default};
|
|
@ -1 +0,0 @@
|
|||
@charset "UTF-8";.my-order[data-v-d25755c6]{box-sizing:border-box}.my-order .from[data-v-d25755c6]{width:100%;padding-bottom:1.25rem;display:grid;grid-template-columns:repeat(5,1fr);gap:1.25rem}.my-order .from .form-card[data-v-d25755c6]{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-d25755c6]{font-size:.9rem;color:#999;font-weight:400}.my-order .from .red[data-v-d25755c6]{color:#ff4a00}.my-order .from .green[data-v-d25755c6]{color:#01c86f}.my-order .table[data-v-d25755c6]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll}[data-v-d25755c6]::-webkit-scrollbar{width:.315rem}[data-v-d25755c6]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}[data-v-d25755c6]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}[data-v-d25755c6]::-webkit-scrollbar-thumb:hover{background-color:#999}
|
|
@ -1 +0,0 @@
|
|||
import{K as a}from"./index-BlCcmI7_.js";function i(){return a.get("/merchant/Merchant/amount_account")}function r(n){return a.get("/merchant/Merchant/taking_lists",{params:n})}function c(){return a.get("/merchant/Merchant/taking_info")}function e(n){return a.post("/merchant/Merchant/withdraw",n)}function o(n){return a.get("/financial/FinancialRecord/lists",{params:n})}function s(n){return a.get("/financial/FinancialRecord/api_lists",{params:n})}export{i as a,c as b,e as c,r as d,s as e,o as f};
|
|
@ -1 +1 @@
|
|||
import{_ as e,c as t,k as c}from"./index-BlCcmI7_.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};
|
||||
import{_ as e,c as t,k as c}from"./index-DcsjF_vo.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
|
@ -1 +1 @@
|
|||
import{K as s}from"./index-BlCcmI7_.js";import{r}from"./axiosAPI-DIkvDLxY.js";function a(t){return r.get("/product/product/lists",{params:t})}function i(t){return s.get("/cate/cate/lists",{params:t})}function n(t){return s.get("/system_store_storage/systemstorestorage/lists",{params:t})}function u(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}function p(t){return s.get("/store_product/storeProduct/lists",{params:t})}export{n as a,u as b,p as c,i as m,a as s};
|
||||
import{K as s}from"./index-DcsjF_vo.js";import{r}from"./axiosAPI-D4twWwIZ.js";function a(t){return r.get("/product/product/lists",{params:t})}function i(t){return s.get("/cate/cate/lists",{params:t})}function n(t){return s.get("/system_store_storage/systemstorestorage/lists",{params:t})}function u(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}function p(t){return s.get("/store_product/storeProduct/lists",{params:t})}export{n as a,u as b,p as c,i as m,a as s};
|
|
@ -0,0 +1 @@
|
|||
import{K as e}from"./index-DcsjF_vo.js";function o(r){return e.post("/cart/cart/create",r)}function s(r){return e.get("/cart/cart/list",{params:r})}function a(r){return e.post("/store_order/storeOrder/checkInventory",r)}function n(r){return e.post("/store_order/StoreOrder/checkOrder",r)}function i(r){return e.post("/cart/cart/delete",r)}function u(r){return e.post("/store_order/StoreOrder/createOrder",r)}function c(r){return e.post("/store_order/StoreOrder/pay",r)}function d(r){return e.get("/store_order/StoreOrder/lists",{params:r})}function p(r){return e.get("/user_product_storage_log/UserProductStorageLog/lists",{params:r})}function f(r){return e.get("/store_order/storeOrder/detail",{params:r})}function g(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function _(r){return e.post("/store_order/StoreOrder/writeoff_order",r)}function O(r){return e.post("/store_order/StoreOrder/checkSms",r)}function A(r){return e.get("/store_order/StoreOrder/print",{params:r})}function S(r){return e.get("/user_product_storage/UserProductStorage/lists",{params:r})}function l(r){return e.post("/user_product_storage/UserProductStorage/supply",r)}export{s as a,o as b,i as c,d,f as e,u as f,c as g,O as h,A as i,g as j,S as k,l,n as o,a as s,p as u,_ as w};
|
|
@ -1 +0,0 @@
|
|||
import{K as e}from"./index-BlCcmI7_.js";function o(r){return e.post("/cart/cart/create",r)}function s(r){return e.get("/cart/cart/list",{params:r})}function a(r){return e.post("/store_order/storeOrder/checkInventory",r)}function n(r){return e.post("/store_order/StoreOrder/checkOrder",r)}function i(r){return e.post("/cart/cart/delete",r)}function c(r){return e.post("/store_order/StoreOrder/createOrder",r)}function u(r){return e.post("/store_order/StoreOrder/pay",r)}function d(r){return e.get("/store_order/StoreOrder/lists",{params:r})}function p(r){return e.get("/store_order/storeOrder/detail",{params:r})}function f(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function O(r){return e.post("/store_order/StoreOrder/writeoff_order",r)}function _(r){return e.post("/store_order/StoreOrder/checkSms",r)}function A(r){return e.get("/store_order/StoreOrder/print",{params:r})}function S(r){return e.get("/user_product_storage/UserProductStorage/lists",{params:r})}function g(r){return e.post("/user_product_storage/UserProductStorage/supply",r)}export{s as a,o as b,i as c,d,p as e,c as f,u as g,_ as h,A as i,f as j,g as k,n as o,a as s,S as u,O as w};
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{K as r}from"./index-BlCcmI7_.js";function t(s){return r.post("/login/account",s)}function u(s){return r.get("/user/UserShip/lists",{params:s})}function i(s){return r.post("/user/user/add",s)}function n(s){return r.post("/user/user/archives_sms",s)}function a(s){return r.get("/user/user/lists",{params:s})}function o(s){return r.get("/user/user/detail",{params:s})}function p(s){return r.get("/user/Address/detail",{params:s})}function c(s){return r.post("/user/Address/edit",s)}function d(s){return r.post("/store_order/StoreOrder/rechange_amount",s)}function A(s){return r.post("/user/user/user_ship",s)}function f(s){return r.post("/user/User/recharge_list",s)}export{u as a,i as b,n as c,d,o as e,A as f,f as g,p as h,c as i,t as l,a as u};
|
||||
import{K as r}from"./index-DcsjF_vo.js";function t(s){return r.post("/login/account",s)}function u(s){return r.get("/user/UserShip/lists",{params:s})}function i(s){return r.post("/user/user/add",s)}function n(s){return r.post("/user/user/archives_sms",s)}function a(s){return r.get("/user/user/lists",{params:s})}function o(s){return r.get("/user/user/detail",{params:s})}function p(s){return r.get("/user/Address/detail",{params:s})}function c(s){return r.post("/user/Address/edit",s)}function d(s){return r.post("/store_order/StoreOrder/rechange_amount",s)}function A(s){return r.post("/user/user/user_ship",s)}function f(s){return r.post("/user/User/recharge_list",s)}export{i as a,n as b,u as c,d,o as e,A as f,f as g,p as h,c as i,t as l,a as u};
|
|
@ -56,8 +56,8 @@
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<script type="module" crossorigin src="./assets/index-BlCcmI7_.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-BnsIvD5f.css">
|
||||
<script type="module" crossorigin src="./assets/index-DcsjF_vo.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-CyMjiDv3.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
|
|
@ -121,6 +121,13 @@ export function saleOrderListApi(data) {
|
|||
return request.get(`/store_order/StoreOrder/lists`, { params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 预约订单列表
|
||||
*/
|
||||
export function userProductStorageListApi(data) {
|
||||
return request.get(`/user_product_storage_log/UserProductStorageLog/lists`, { params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 采购订单提交
|
||||
*/
|
||||
|
|
|
@ -88,7 +88,7 @@ defineExpose({
|
|||
</div>
|
||||
<div class="flex-between">
|
||||
<div class="mr-2">手机号: {{ item.mobile || item.account }}</div>
|
||||
<el-tag type="primary" v-if="item.user_ship == 0 || item.user_ship == 4">{{ item.user_ship_name }}</el-tag>
|
||||
<el-tag type="primary" v-if="item.user_ship == 0">{{ item.user_ship_name }}</el-tag>
|
||||
<el-tag type="success" v-else>{{ item.user_ship_name }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -65,6 +65,12 @@ const list = ref([
|
|||
ico: "DataAnalysis",
|
||||
count: 0,
|
||||
},
|
||||
// {
|
||||
// name: "subOrder",
|
||||
// title: "预约取货",
|
||||
// ico: "Clock",
|
||||
// count: 0,
|
||||
// },
|
||||
{
|
||||
name: "convert",
|
||||
title: "订单核销",
|
||||
|
|
|
@ -30,10 +30,16 @@ const routes = [
|
|||
component: () => import('@/views/order/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/orderCount',
|
||||
name: 'orderCount',
|
||||
path: '/subOrder',
|
||||
name: 'subOrder',
|
||||
meta: { title: '订单统计' },
|
||||
component: () => import('@/views/saleOrder/indexCount.vue'),
|
||||
component: () => import('@/views/subOrder/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/order',
|
||||
name: 'order',
|
||||
meta: { title: '预约取货' },
|
||||
component: () => import('@/views/order/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/wallet',
|
||||
|
|
|
@ -38,12 +38,24 @@ const deleteShop = (arr) => {
|
|||
});
|
||||
};
|
||||
|
||||
const userInfo = ref({
|
||||
uid: ''
|
||||
})
|
||||
const setUser = (row) => {
|
||||
userInfo.value = row;
|
||||
userInfo.value.uid = row.id;
|
||||
getList();
|
||||
emit("getStoreList", {uid: row.id}, true);
|
||||
}
|
||||
|
||||
const extend = ref({});
|
||||
const getList = () => {
|
||||
allPrice.value = 0;
|
||||
costPrice.value = 0;
|
||||
discounts.value = 0;
|
||||
cartListApi().then((res) => {
|
||||
cartListApi({
|
||||
uid: userInfo.value.uid
|
||||
}).then((res) => {
|
||||
extend.value = res.data.extend;
|
||||
list.value = res.data.lists || [];
|
||||
// if (!extend.value?.pay_price) userInfo.value.uid = "";
|
||||
|
@ -58,7 +70,7 @@ const getList = () => {
|
|||
};
|
||||
getList();
|
||||
|
||||
const emit = defineEmits(["goPay", "editAttr"]);
|
||||
const emit = defineEmits(["goPay", "editAttr", "getStoreList"]);
|
||||
|
||||
const goPay = () => {
|
||||
emit("goPay");
|
||||
|
@ -104,14 +116,6 @@ const showPrice = (type = true) => {
|
|||
priceRef.value.show(type, costPrice.value);
|
||||
};
|
||||
|
||||
const userInfo = ref({
|
||||
uid: ''
|
||||
})
|
||||
const setUser = (row) => {
|
||||
userInfo.value = row;
|
||||
userInfo.value.uid = row.id;
|
||||
}
|
||||
|
||||
const is_storage = ref(false)
|
||||
|
||||
const resetView = () => {
|
||||
|
@ -169,7 +173,7 @@ onUnmounted(() => {
|
|||
}}</span></div>
|
||||
<div>余额: <span style="color: #f70;">{{ userInfo.now_money }}</span></div>
|
||||
</div>
|
||||
<el-button style="margin-top:0.2rem;" link @click="userInfo.uid = ''">
|
||||
<el-button style="margin-top:0.2rem;" link @click="setUser({id: ''})">
|
||||
重置<el-icon>
|
||||
<RefreshLeft />
|
||||
</el-icon>
|
||||
|
|
|
@ -67,7 +67,7 @@ const close = () => {
|
|||
<div class="shop-info-right-top">{{ form.store_name }}</div>
|
||||
<div>
|
||||
<div class="shop-info-right-price" v-if="priceKey.off_activity == 1">
|
||||
<span class="unit-name">活动价:</span> ¥<span>{{ form[priceKey.price] }}</span>
|
||||
<span class="unit-name">商户价:</span> ¥<span>{{ form[priceKey.price] }}</span>
|
||||
<span class="unit-name" v-if="form.unit_name">/{{ form.unit_name }}</span>
|
||||
</div>
|
||||
<div class="shop-info-right-price" v-if="priceKey.off_activity == 1">
|
||||
|
@ -76,9 +76,13 @@ const close = () => {
|
|||
/{{ form.unit_name }}</span>
|
||||
</div>
|
||||
<div class="shop-info-right-price" v-else>
|
||||
¥<span>{{ form[priceKey.op_price] }}</span>
|
||||
¥<span>{{ form[priceKey.price] }}</span>
|
||||
<span class="unit-name">/{{ form.unit_name }}</span>
|
||||
</div>
|
||||
<!-- <div class="shop-info-right-price">
|
||||
¥<span>{{ form[priceKey.price] }}</span>
|
||||
<span class="unit-name">/{{ form.unit_name }}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -108,7 +108,7 @@ onUnmounted(() => {
|
|||
<el-image loading="lazy" :src="item.image"></el-image>
|
||||
<div class="shop-name">{{ item.store_name }}</div>
|
||||
<div class="shop-price" v-if="priceKey.off_activity == 1">
|
||||
<span class="unit-name">活动价:</span> ¥<span>{{ item[priceKey.price] }}</span>
|
||||
<span class="unit-name">商户价:</span> ¥<span>{{ item[priceKey.price] }}</span>
|
||||
<span class="unit-name" v-if="item.unit_name">/{{ item.unit_name }}</span>
|
||||
</div>
|
||||
<div class="shop-price" v-if="priceKey.off_activity == 1">
|
||||
|
@ -116,9 +116,13 @@ onUnmounted(() => {
|
|||
/{{ item.unit_name }}</span>
|
||||
</div>
|
||||
<div class="shop-price" v-else>
|
||||
¥<span>{{ item[priceKey.op_price] }}</span>
|
||||
¥<span>{{ item[priceKey.price] }}</span>
|
||||
<span class="unit-name">/{{ item.unit_name }}</span>
|
||||
</div>
|
||||
<!-- <div class="shop-price">
|
||||
¥<span>{{ item[priceKey.price] }}</span>
|
||||
<span class="unit-name">/{{ item.unit_name }}</span>
|
||||
</div> -->
|
||||
<div class="no-stock-re" v-if="item.stock <= 0">
|
||||
<div>
|
||||
<span>次日提</span>
|
||||
|
|
|
@ -43,7 +43,7 @@ const getStoreList = (data = {}, reload = false) => {
|
|||
...where.value,
|
||||
...data,
|
||||
};
|
||||
console.log("===", data, where.value);
|
||||
console.log("===", data, reload);
|
||||
if (reload) {
|
||||
storeList.value = [];
|
||||
where.value.page_no = 1;
|
||||
|
@ -87,10 +87,11 @@ function isAllDigits(str) {
|
|||
}
|
||||
|
||||
const cartAddInfo = (item, change = "") => {
|
||||
console.log(item, change);
|
||||
// console.log(item, change);
|
||||
let q = {
|
||||
product_id: item.product_id,
|
||||
cart_num: item.cart_num,
|
||||
uid: where.value.uid || null
|
||||
};
|
||||
cartCreateApi(q).then((res) => {
|
||||
orderRef.value.getList();
|
||||
|
@ -218,7 +219,7 @@ onUnmounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="my-card">
|
||||
<order ref="orderRef" @goPay="goPay" @editPupop="editPupop" />
|
||||
<order ref="orderRef" @goPay="goPay" @editPupop="editPupop" @getStoreList="getStoreList" />
|
||||
<padding />
|
||||
<shop ref="shopRef" style="flex: 1" :storeList="storeList" :priceKey="priceKey" :loading="loading" @getStoreList="getStoreList"
|
||||
@changeItem="changeItem" @loadMore="loadMore" />
|
||||
|
|
|
@ -0,0 +1,316 @@
|
|||
<script setup>
|
||||
import { onMounted, onUnmounted, ref } from "vue";
|
||||
import {
|
||||
orderListApi,
|
||||
orderStatusApi,
|
||||
orderLadingApi,
|
||||
cartListApi,
|
||||
cashierinfoListApi,
|
||||
cashierinfoDetailsApi
|
||||
} 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({
|
||||
id: "",
|
||||
});
|
||||
|
||||
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 = () => {
|
||||
payRef.value.setForm({
|
||||
isRePay: true,
|
||||
data: formData.value
|
||||
});
|
||||
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-sale-order-detail", {});
|
||||
formData.value.paid = 1;
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => { });
|
||||
};
|
||||
|
||||
const where = ref({
|
||||
page_no: 1,
|
||||
page_size: 15,
|
||||
loadend: false,
|
||||
loading: false,
|
||||
});
|
||||
const goods_list = ref([]);
|
||||
const getOrderList = () => {
|
||||
return console.log("触底");
|
||||
if (formData.value.id && !where.value.loadend) {
|
||||
console.log("加载");
|
||||
where.value.loading = true;
|
||||
cashierinfoListApi({
|
||||
pid: formData.value.id,
|
||||
page_no: where.value.page_no,
|
||||
page_size: where.value.page_size,
|
||||
}).then((res) => {
|
||||
goods_list.value = [...goods_list.value, ...res.data.lists];
|
||||
if (res.data.lists.length < where.value.page_size)
|
||||
where.value.loadend = true;
|
||||
where.value.loading = false;
|
||||
where.value.page_no++;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const getDetail = () => {
|
||||
loading.value = true;
|
||||
cashierinfoDetailsApi({
|
||||
id: formData.value.oid,
|
||||
}).then(res => {
|
||||
formData.value = res.data;
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 200)
|
||||
})
|
||||
}
|
||||
|
||||
const emit = defineEmits(['rePaySuccess'])
|
||||
const paySuccess = (data = null) => {
|
||||
// data = {
|
||||
// out_trade_no: "PF171568087790938356", //单号
|
||||
// create_time: "2024-05-14 17:59:05", //下单时间
|
||||
// trade_type: "MICROPAY", //支付方式
|
||||
// transaction_id: "4200002159202405159003084211", //支付单号
|
||||
// }
|
||||
// if(data) onPrint(data);
|
||||
setTimeout(()=>{
|
||||
emit('rePaySuccess');
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
mitt.on("set-sale-order-detail", (res) => {
|
||||
console.log("===", res);
|
||||
formData.value = res;
|
||||
where.value.page_no = 1;
|
||||
where.value.loadend = false;
|
||||
where.value.loading = false;
|
||||
goods_list.value = [];
|
||||
getDetail();
|
||||
// getOrderList();
|
||||
});
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
mitt.off("set-sale-order-detail");
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-order">
|
||||
<div class="detail" v-if="formData.id" v-loading="loading">
|
||||
<div class="table" v-infinite-scroll="getOrderList" :infinite-scroll-distance="300"
|
||||
:infinite-scroll-delay="300" style="overflow: auto" :infinite-scroll-immediate="false">
|
||||
<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.order_id }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">商品款数:</div>
|
||||
<div class="info-item-info">{{ formData.total_num || 0 }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">商品总价:</div>
|
||||
<!-- <div class="info-item-info">¥{{ formData.total_price }}</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">{{ 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">{{ formData.pay_time }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">支付方式:</div>
|
||||
<div class="info-item-info">
|
||||
<span v-if="formData.pay_type_name">{{ formData.pay_type_name }}</span>
|
||||
<span v-else-if="formData.pay_type == 9">微信收款</span>
|
||||
<span v-else-if="formData.pay_type == 17">现金支付</span>
|
||||
<span v-else-if="formData.pay_type == 13">支付宝收款</span>
|
||||
<span v-else-if="formData.pay_type == 3">余额支付</span>
|
||||
<span v-else-if="formData.pay_type == 1">微信支付</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-title" v-if="formData.uid">用户信息</div>
|
||||
<div class="table-info" v-if="formData.uid">
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">用户ID:</div>
|
||||
<div class="info-item-info">{{ formData.uid }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">用户昵称:</div>
|
||||
<div class="info-item-info">{{ formData.nickname }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-title">用户电话:</div>
|
||||
<div class="info-item-info">{{ formData.mobile }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 0.9rem">
|
||||
共计
|
||||
<span style="color: #ff4a00">{{ formData.product?.length || " " }}</span> 款商品
|
||||
</div>
|
||||
<el-table :data="formData.product">
|
||||
<el-table-column label="商品信息">
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-image style="height: 3rem; width: 3rem;flex-shrink: 0;" :src="row.cart_info?.image"></el-image>
|
||||
<span style="margin-left: 0.5rem">{{ row.cart_info?.name }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cart_info.price" label="单价" width="150" />
|
||||
<el-table-column prop="cart_info.cart_num" label="数量" width="150" />
|
||||
<el-table-column prop="cart_info.pay_price" label="总价" width="150">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="height: 8rem;"></div>
|
||||
</div>
|
||||
<div class="footer" v-if="!formData.paid">
|
||||
<el-button type="primary" size="large" @click="rePay">重新支付</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-empty></el-empty>
|
||||
</div>
|
||||
<pay ref="payRef" @paySuccess="paySuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.my-order {
|
||||
border-radius: 1.2rem;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.detail {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
.table {
|
||||
padding: 1rem;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
|
||||
.table-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.table-info {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
color: #777;
|
||||
font-size: 0.9rem;
|
||||
padding-bottom: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
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 {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 6rem;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding: 0 2rem;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,360 @@
|
|||
<script setup>
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
import {
|
||||
orderListApi,
|
||||
orderStatusApi,
|
||||
orderLadingApi,
|
||||
cartListApi,
|
||||
userProductStorageListApi,
|
||||
} 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 moment from "moment";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const props = defineProps({
|
||||
isSystem: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
source: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
});
|
||||
|
||||
const lists = ref([]);
|
||||
|
||||
const tabPosition = ref(1); // 1-全部, 2-未支付
|
||||
const changeTabPosition = (e) => {
|
||||
where.value.page_no = 1;
|
||||
loadEnd.value = false;
|
||||
loading.value = false;
|
||||
orderList.value = [];
|
||||
getOrderList(true);
|
||||
};
|
||||
|
||||
const payRef = ref(null);
|
||||
|
||||
const date = ref("");
|
||||
const changeDate = () => {
|
||||
where.value.start_time = moment(date.value[0]).format('YYYY-MM-DD 00:00:00');
|
||||
where.value.end_time = moment(date.value[1]).format('YYYY-MM-DD 23:59:59');
|
||||
getOrderList(true);
|
||||
};
|
||||
|
||||
const disabledDate = (time) => {
|
||||
return time.getTime() > Date.now();
|
||||
}
|
||||
|
||||
|
||||
const where = ref({
|
||||
page_no: 1,
|
||||
page_size: 20,
|
||||
order_id: "",
|
||||
start_time: "",
|
||||
end_time: "",
|
||||
});
|
||||
|
||||
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_no = 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;
|
||||
userProductStorageListApi(where.value)
|
||||
.then((res) => {
|
||||
if (reload) orderList.value = res.data.lists;
|
||||
else orderList.value = [...orderList.value, ...res.data.lists];
|
||||
if (where.value.page_no == 1 && orderList.value.length > 0) mitt.emit("set-sale-order-detail", orderList.value[0]);
|
||||
if (res.data.lists.length < where.value.page_size) loadEnd.value = true;
|
||||
else where.value.page_no++;
|
||||
activeStore.value = 0;
|
||||
console.log(where.value.page_no);
|
||||
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-sale-order-detail", item);
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
getOrderList
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
mitt.on("update-sale-order-detail", (item) => {
|
||||
console.log("===");
|
||||
orderList.value[activeStore.value].paid = 1;
|
||||
});
|
||||
});
|
||||
onUnmounted(() => {
|
||||
mitt.off("update-sale-order-detail");
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-order">
|
||||
<div class="header-nav">
|
||||
<div class="nav-item">
|
||||
{{ "收银订单" }}
|
||||
</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" :disabled-date="disabledDate" @change="changeDate"
|
||||
:clearable="false" style="width: 14rem; margin-left: 1rem" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-input">
|
||||
<el-input v-model="where.order_id" placeholder="请输入订单编号" @keydown.enter="getOrderList(true)"
|
||||
@clear="getOrderList(true)">
|
||||
<template #suffix>
|
||||
<el-icon v-if="where.order_id != ''" size="18" @click="where.order_id = '';getOrderList(true)" style="cursor: pointer;margin-right: 0.5rem;">
|
||||
<CircleClose />
|
||||
</el-icon>
|
||||
</template>
|
||||
<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-lists" v-loading="loading" v-infinite-scroll="getOrderList" :infinite-scroll-distance="300"
|
||||
:infinite-scroll-delay="500" style="overflow: auto">
|
||||
<div class="item" :class="{ 'item-active': activeStore == index }" v-for="(item, index) in orderList"
|
||||
:key="index" @click="setForm(item, index)">
|
||||
<div class="top">
|
||||
<div class="sn" :class="'cahier'">单号: {{ item.order_id }}</div>
|
||||
<div class="create-time">{{ item.update_time }}</div>
|
||||
</div>
|
||||
<div class="shop">
|
||||
<!-- <div class="left" v-if="item.product_info">
|
||||
<el-image v-for="(shop, imgkey) in item.product_info.slice(0, 5)" :key="imgkey"
|
||||
:src="shop.image" class="shop-img"></el-image>
|
||||
<div v-if="item.product_info.length == 1" class="shop-name">
|
||||
{{ item.product_info[0].store_name }}
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="left" >
|
||||
<el-image
|
||||
:src="item.store_name_img" class="shop-img"></el-image>
|
||||
<div class="shop-name">
|
||||
{{ item.store_name }}
|
||||
<br />
|
||||
<span style=" display: block; font-size: 0.8rem; color: #777;">{{ item.store_info }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="money">¥{{ item.price }}</div>
|
||||
<div class="count">共{{ item.nums }}款商品</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="pay">
|
||||
<div v-if="item.paid">
|
||||
{{ item.paid_name }}
|
||||
<spna v-if="item.pay_type_name">({{ item.pay_type_name }})</spna>
|
||||
<span v-else-if="item.pay_type == 9">(微信收款)</span>
|
||||
<span v-else-if="item.pay_type == 17">(现金支付)</span>
|
||||
<span v-else-if="item.pay_type == 13">(支付宝收款)</span>
|
||||
<span v-else-if="item.pay_type == 3">(余额支付)</span>
|
||||
<span v-else-if="item.pay_type == 1">(微信支付)</span>
|
||||
</div>
|
||||
<div v-else style="color: #ff4a00">{{ item.paid_name }}</div>
|
||||
</div>
|
||||
<!-- <div class="cashier" v-if="item.service_info">
|
||||
收银员: {{ item.service_info.nickname }}
|
||||
</div>
|
||||
<div class="cashier" v-else>平台订单</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="loadEnd" class="load-end">没有更多了</div>
|
||||
<div v-if="loading" class="load-end">加载中...</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.my-order {
|
||||
border-radius: 1.2rem;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
width: 30rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.header-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 1rem;
|
||||
height: 3.5rem;
|
||||
|
||||
span {
|
||||
color: #ff4a00;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.nav-item-btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.header-input {
|
||||
padding: 1rem;
|
||||
padding-top: 0;
|
||||
height: 2.5rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.order-lists {
|
||||
height: calc(100vh - 100px - 10.2rem);
|
||||
overflow-y: auto;
|
||||
|
||||
.item {
|
||||
padding: 1rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
|
||||
.sn {
|
||||
font-weight: bold;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.cahier {
|
||||
&::before {
|
||||
content: "收银";
|
||||
font-weight: 400;
|
||||
font-size: 0.7rem;
|
||||
padding: 0.1rem 0.1rem;
|
||||
margin-right: 0.2rem;
|
||||
border: 1px solid #2ec479;
|
||||
color: #2ec479;
|
||||
border-radius: 0.187rem;
|
||||
}
|
||||
}
|
||||
|
||||
.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 {
|
||||
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;
|
||||
|
||||
.manage-btn {
|
||||
color: #fff;
|
||||
background-color: #e6a23c;
|
||||
border-radius: 0.2rem;
|
||||
padding: 0 0.2rem;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-active {
|
||||
background-color: #efefef;
|
||||
}
|
||||
}
|
||||
|
||||
.load-end {
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
color: #333;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,46 @@
|
|||
<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";
|
||||
|
||||
const orderRef = ref(null);
|
||||
const rePaySuccess = ()=>{
|
||||
orderRef.value?.getOrderList(true);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-card">
|
||||
<order style="flex-shrink: 0;" ref="orderRef"/>
|
||||
<padding />
|
||||
<detail ref="detailRef" @rePaySuccess="rePaySuccess"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.my-card {
|
||||
display: flex;
|
||||
}
|
||||
/* 修改滚动条的样式 */
|
||||
::-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>
|
|
@ -12,7 +12,7 @@ const formDataInfo = reactive({
|
|||
mobile: '',
|
||||
code: '',
|
||||
real_name: '',
|
||||
user_ship: '',
|
||||
user_ship: 0,
|
||||
selectedValues: [],
|
||||
})
|
||||
|
||||
|
@ -119,13 +119,13 @@ const props = {
|
|||
|
||||
const userShip = ref([])
|
||||
const getUserShip = () => {
|
||||
userShipApi({
|
||||
type_id: 4
|
||||
}).then(res => {
|
||||
userShip.value = res.data.lists?.filter((item) => {
|
||||
return item.id == 0 || item.id == 4
|
||||
});
|
||||
})
|
||||
// userShipApi({
|
||||
// type_id: 4
|
||||
// }).then(res => {
|
||||
// userShip.value = res.data.lists?.filter((item) => {
|
||||
// return item.id == 0 || item.id == 4
|
||||
// });
|
||||
// })
|
||||
}
|
||||
getUserShip()
|
||||
|
||||
|
@ -148,7 +148,7 @@ const addUser = () => {
|
|||
userAddApi(forms).then(res=>{
|
||||
formDataInfo.mobile = '';
|
||||
formDataInfo.code = '';
|
||||
formDataInfo.user_ship = '';
|
||||
formDataInfo.user_ship = 0;
|
||||
formDataInfo.real_name = '';
|
||||
formDataInfo.selectedValues = [];
|
||||
formDataRef.value.resetFields();
|
||||
|
@ -196,11 +196,11 @@ defineExpose({
|
|||
<el-form-item label="用户姓名" prop="real_name">
|
||||
<el-input v-model="formDataInfo.real_name" placeholder="请输入用户姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户类型" prop="user_ship">
|
||||
<!-- <el-form-item label="用户类型" prop="user_ship">
|
||||
<el-select v-model="formDataInfo.user_ship" placeholder="请选择用户类型" style="width: 100%;">
|
||||
<el-option v-for="item in userShip" :key="item.id" :label="item.title" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="用户地址" prop="selectedValues">
|
||||
<el-cascader style="width: 100%;" v-model="formDataInfo.selectedValues" :options="options"
|
||||
:props="props" :load="loadOptions" class="w-full" />
|
||||
|
|
|
@ -373,7 +373,7 @@ const changeShip = (e) => {
|
|||
}
|
||||
}
|
||||
const shipRecharge = () => {
|
||||
if (shipForm.value.user_ship === '' || shipForm.value.user_ship === null || shipForm.value.user_ship === undefined || shipForm.value.user_ship === 0 || shipForm.value.user_ship === 4) return ElMessage.error("请选择会员类型");
|
||||
if (shipForm.value.user_ship === '' || shipForm.value.user_ship === null || shipForm.value.user_ship === undefined || shipForm.value.user_ship === 0) return ElMessage.error("请选择会员类型");
|
||||
if (shipForm.value.money == 0 || shipForm.value.money == '') return ElMessage.error(shipForm.value.type == 'add' ? "请输入充值金额" : "请选择金额");
|
||||
if (shipForm.value.type == 'add' && (+shipForm.value.money < +shipForm.value.limit || +shipForm.value.money > 10000)) {
|
||||
+shipForm.value.limit > 0 ? shipForm.value.money = shipForm.value.limit : shipForm.value.money = '';
|
||||
|
@ -508,12 +508,12 @@ onUnmounted(() => {
|
|||
<div class="info-item-info">
|
||||
<template v-if="updateShip == false">
|
||||
<el-tag type="primary" size="large"
|
||||
v-if="formData.user_ship == 0 || formData.user_ship == 4">{{
|
||||
v-if="formData.user_ship == 0">{{
|
||||
formData.user_ship_name
|
||||
}}</el-tag>
|
||||
<el-tag type="success" size="large" v-else>{{ formData.user_ship_name }}</el-tag>
|
||||
<el-button type="primary" v-if="formData.user_ship == 0 || formData.user_ship == 4"
|
||||
style="margin-left: 1rem;" @click="updateShip = true">修改</el-button>
|
||||
<!-- <el-button type="primary" v-if="formData.user_ship == 0 || formData.user_ship == 4"
|
||||
style="margin-left: 1rem;" @click="updateShip = true">修改</el-button> -->
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-select v-model="formData.user_ship" placeholder="请选择用户类型" style="width: 10rem;">
|
||||
|
@ -660,7 +660,7 @@ onUnmounted(() => {
|
|||
<el-form-item label="会员类型:" v-else required>
|
||||
<el-select v-model="shipForm.user_ship" placeholder="请选择用户类型" style="flex: 1" @change="changeShip">
|
||||
<el-option v-for="item in userShip" :key="item.id" :label="item.title" :value="item.id"
|
||||
:disabled="item.id == 0 || item.id == 4" />
|
||||
:disabled="item.id == 0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="充值金额:" required v-if="shipForm.type == 'add'">
|
||||
|
|
|
@ -259,7 +259,7 @@ onUnmounted(() => {
|
|||
<div>返还金: <span class="red">{{ item.return_money?.toFixed(2) }}</span></div>
|
||||
<div>礼品券: <span class="red">{{ item.integral }}</span></div>
|
||||
<div>
|
||||
<el-tag type="primary" v-if="item.user_ship == 0 || item.user_ship == 4">{{ item.user_ship_name }}</el-tag>
|
||||
<el-tag type="primary" v-if="item.user_ship == 0">{{ item.user_ship_name }}</el-tag>
|
||||
<el-tag type="success" v-else>{{ item.user_ship_name }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue