Compare commits

...

7 Commits

Author SHA1 Message Date
weipengfei 7d9c302532 打包更新 2024-07-02 13:49:36 +08:00
weipengfei 5072f2dae1 更新 2024-07-02 13:47:20 +08:00
weipengfei 0d78d23088 更新,新增地区筛选用户 2024-07-02 13:45:58 +08:00
weipengfei 44c7223ca0 Merge branch 'master' into dev 2024-06-28 10:14:03 +08:00
weipengfei 2583f984d3 更新 2024-06-27 21:39:58 +08:00
weipengfei a16e229580 Merge branch 'master' into dev 2024-06-27 18:34:38 +08:00
weipengfei b94a4006e6 1 2024-06-27 17:31:39 +08:00
26 changed files with 304 additions and 31 deletions

View File

@ -1 +1 @@
import{K as o,L as s,E as r,u as d,M as g}from"./index-B8EEu-LB.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{K as o,L as s,E as r,u as d,M as g}from"./index-DNPYm-1T.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};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{a as B,b as L}from"./shop-Cwb0_dzb.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-B8EEu-LB.js";import"./axiosAPI-B5dawX3v.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-DBEPLafT.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-DNPYm-1T.js";import"./axiosAPI-CWnjWYA_.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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as U,u as I,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,D as E,E as w}from"./index-B8EEu-LB.js";import{l as K}from"./user-H5zoLVp6.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)),D={__name:"index",setup(l){const d=I(),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})])])}}},z=U(D,[["__scopeId","data-v-f9ff2ce9"]]);export{z as default};
import{_ as U,u as I,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,D as E,E as w}from"./index-DNPYm-1T.js";import{l as K}from"./user-DH5E0et8.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)),D={__name:"index",setup(l){const d=I(),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})])])}}},z=U(D,[["__scopeId","data-v-f9ff2ce9"]]);export{z as default};

View File

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

View File

@ -1 +1 @@
import{f as i}from"./merchant-CYZ4pJwa.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-B8EEu-LB.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};
import{f as i}from"./merchant-Bk0fEPuM.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-DNPYm-1T.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};

View File

@ -1 +1 @@
import{H as a}from"./index-B8EEu-LB.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};
import{H as a}from"./index-DNPYm-1T.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};

View File

@ -1 +1 @@
import{_ as e,c as t,k as c}from"./index-B8EEu-LB.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-DNPYm-1T.js";const n={},o={style:{width:"1rem",height:"100%"}};function r(s,_){return t(),c("div",o)}const i=e(n,[["render",r]]);export{i as p};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{H as s}from"./index-B8EEu-LB.js";import{r}from"./axiosAPI-B5dawX3v.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 m(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}export{n as a,m as b,i as m,a as s};
import{H as s}from"./index-DNPYm-1T.js";import{r}from"./axiosAPI-CWnjWYA_.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 m(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}export{n as a,m as b,i as m,a as s};

View File

@ -1 +1 @@
import{H as e}from"./index-B8EEu-LB.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/checkOrder",r)}function i(r){return e.post("/cart/cart/delete",r)}function n(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("/store_order/storeOrder/detail",{params:r})}function u(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function f(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})}export{s as a,o as b,i as c,p as d,n as e,c as f,O as g,A as h,u as i,a as o,d as s,f as w};
import{H as e}from"./index-DNPYm-1T.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/checkOrder",r)}function i(r){return e.post("/cart/cart/delete",r)}function n(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("/store_order/storeOrder/detail",{params:r})}function u(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function f(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})}export{s as a,o as b,i as c,p as d,n as e,c as f,O as g,A as h,u as i,a as o,d as s,f as w};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{H as e}from"./index-B8EEu-LB.js";function u(s){return e.post("/login/account",s)}function t(s){return e.get("/user/UserShip/lists",{params:s})}function i(s){return e.post("/user/user/add",s)}function n(s){return e.post("/user/user/archives_sms",s)}function a(s){return e.get("/user/user/lists",{params:s})}function p(s){return e.get("/user/user/detail",{params:s})}function o(s){return e.get("/user/Address/detail",{params:s})}function d(s){return e.post("/user/Address/edit",s)}function c(s){return e.post("/store_order/StoreOrder/rechange_amount",s)}function A(s){return e.post("/user/user/user_ship",s)}function l(s){return e.get("/user/UserLabel/lists",{params:s})}function f(s){return e.post("/user/user/user_label",s)}export{t as a,i as b,n as c,c as d,p as e,A as f,l as g,f as h,o as i,d as j,u as l,a as u};
import{H as e}from"./index-DNPYm-1T.js";function u(s){return e.post("/login/account",s)}function t(s){return e.get("/user/UserShip/lists",{params:s})}function i(s){return e.post("/user/user/add",s)}function n(s){return e.post("/user/user/archives_sms",s)}function a(s){return e.get("/user/user/lists",{params:s})}function p(s){return e.get("/user/user/detail",{params:s})}function o(s){return e.get("/user/Address/detail",{params:s})}function d(s){return e.post("/user/Address/edit",s)}function c(s){return e.post("/store_order/StoreOrder/rechange_amount",s)}function A(s){return e.post("/user/user/user_ship",s)}function l(s){return e.get("/user/UserLabel/lists",{params:s})}function f(s){return e.post("/user/user/user_label",s)}export{t as a,i as b,n as c,c as d,p as e,A as f,l as g,f as h,o as i,d as j,u as l,a as u};

View File

@ -56,7 +56,7 @@
}
}
</style>
<script type="module" crossorigin src="./assets/index-B8EEu-LB.js"></script>
<script type="module" crossorigin src="./assets/index-DNPYm-1T.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-F8CM97a-.css">
</head>
<body>

View File

@ -48,7 +48,7 @@ onMounted(() => {
<span>查看核销记录</span><el-icon><ArrowRightBold /></el-icon>
</div>
</div>
<order v-show="type != 1" :type="type" style="flex-shrink: 0" ref="orderRef" @backOne="type = 1" />
<order v-show="type != 1" :type="type" style="flex-shrink: 0" ref="orderRef" @backOne="type = 1;code = '';" />
<padding v-show="type != 1" />
<detail v-show="type != 1" ref="detailRef" @reInit="reInit" />
</div>

View File

@ -216,6 +216,85 @@ const cancelUpdate = () => {
const isDisabled = ref(true);
const activeStore = ref(0);
const activeStoreList = ref(["基本信息"]);
const isOut = ref(false); //
const productList = ref([]); //
const initProduct = ()=>{
productList.value = [
{
"id": 574,
"oid": 568,
"product_id": 44,
"cart_info": {
"product_id": 44,
"cart_num": 3,
"price": "56.00",
"cost": "56.00",
"total_price": "189.00",
"deduction_price": 0,
"vip": 0,
"purchase": "162.00",
"pay_price": "168.00",
"store_price": "168.00",
"old_cart_id": 766,
"verify_code": "8-12407",
"name": "陈醋",
"image": "https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240615/202406151511024463d0051.jpg"
}
},
{
"id": 575,
"oid": 568,
"product_id": 45,
"cart_info": {
"product_id": 45,
"cart_num": 2,
"price": "164.00",
"cost": "164.00",
"total_price": "368.00",
"deduction_price": 0,
"vip": 0,
"purchase": "312.00",
"pay_price": "328.00",
"store_price": "328.00",
"old_cart_id": 767,
"verify_code": "8-12407",
"name": "青花椒油",
"image": "https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240615/202406151511025ef012582.jpg"
}
},
{
"id": 576,
"oid": 568,
"product_id": 40,
"cart_info": {
"product_id": 40,
"cart_num": 2,
"price": "2.50",
"cost": "2.50",
"total_price": "5.60",
"deduction_price": 0,
"vip": 0,
"purchase": "48.00",
"pay_price": "5.00",
"store_price": "5.00",
"old_cart_id": 769,
"verify_code": "8-12407",
"name": "草果",
"image": "https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240615/20240615150435f2ea41542.jpg"
}
}
]
}
//
const onOutAll = ()=>{
ElMessage.error("未全部出库")
}
onMounted(() => {
mitt.on("set-user-detail", (res) => {
formData.value = res;
@ -226,6 +305,7 @@ onMounted(() => {
console.log(formData.value);
})
getAddress();
initProduct();
});
});
@ -236,7 +316,19 @@ onUnmounted(() => {
<template>
<div class="my-order">
<div class="detail" v-if="formData.id">
<div class="header-nav">
<div v-for="(item, index) in activeStoreList" :key="index" class="nav-item" :class="{
'nav-item-active': activeStore == index,
'nav-item-radius1': activeStore == index + 1,
'nav-item-radius2': activeStore == index - 1,
}" @click="activeStore = index">
{{ item }}
</div>
<div class="nav-item" :class="{
'nav-item-radius2': activeStore == activeStoreList.length - 1,
}" style="flex: 1"></div>
</div>
<div class="detail" v-if="formData.id && activeStore == 0">
<div class="table">
<div class="table-title">用户信息</div>
<div class="table-info">
@ -370,6 +462,41 @@ onUnmounted(() => {
</div>
</div>
</div>
<div class="detail" v-if="formData.id && activeStore == 1">
<div class="table">
<el-table :data="productList">
<el-table-column label="商品信息">
<template #default="{ row }">
<div style="display: flex; align-items: center">
<el-image style="height: 3rem; width: 3rem" :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" v-if="isOut" label="数量" width="250">
<template #default="{ row }">
<div style="display: flex; align-items: center">
<el-input-number v-model="row.cart_info.n_num" step-strictly :min="1" :max="row.cart_info.cart_num" />
<el-button type="primary" style="margin-left: 1rem;" @click="row.cart_info.n_num = row.cart_info.cart_num">全部</el-button>
</div>
</template>
</el-table-column>
<el-table-column prop="cart_info.cart_num" v-else label="数量" width="250" />
<!-- <el-table-column prop="cart_info.pay_price" label="总价" width="150" /> -->
</el-table>
</div>
<div class="footer">
<div v-if="!isOut">
<el-button type="warning" size="large" @click="isOut = true">部分出库</el-button>
<el-button type="primary" size="large" @click="onOutAll">全部出库</el-button>
</div>
<div v-else>
<el-button type="primary" size="large" @click="isOut = false">确认出库</el-button>
<el-button size="large" @click="isOut = false">取消</el-button>
</div>
</div>
</div>
<div v-else>
<el-empty></el-empty>
</div>
@ -386,8 +513,42 @@ onUnmounted(() => {
position: relative;
overflow: hidden;
.header-nav {
display: flex;
background: linear-gradient(to bottom,
#f5f5f5 50%,
#fff 50%);
/* 创建渐变背景 */
.nav-item {
height: 4rem;
width: 8rem;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.2rem;
background-color: #f5f5f5;
border-radius: 1rem 1rem 0 0;
}
.nav-item-active {
background-color: #fff;
position: relative;
transition: 300ms;
}
.nav-item-radius1 {
border-radius: 0 0 1rem 0;
}
.nav-item-radius2 {
border-radius: 0 0 0 1rem;
}
}
.detail {
height: 100%;
height: calc(100% - 4rem);
box-sizing: border-box;
position: relative;

View File

@ -10,6 +10,7 @@ import { useRouter } from "vue-router";
import mitt from "@/utils/mitt.js";
import moment from "moment";
import add from './add.vue';
import { apiProvince, apiCity, apiArea, apiStreet, apiVillage, apiBrigade } from '@/api/public'
const userStore = useUserStore();
const props = defineProps({
@ -29,7 +30,8 @@ const where = ref({
page_no: 1,
page_size: 20,
mobile: "",
user_ship: ""
user_ship: "",
street: null
});
const loading = ref(false);
@ -42,6 +44,9 @@ const getOrderList = (reload = false) => {
if (reload) where.value.page_no = 1;
else if (loadEnd.value || loading.value) return;
loading.value = true;
if(where.value.mobile == '' && where.value.user_ship == ''){
where.value.store_id = userStore.userInfo.store_id;
} else where.value.store_id = null;
userListsApi(where.value)
.then((res) => {
if (reload) orderList.value = res.data.lists;
@ -83,9 +88,110 @@ const getUserShip = () => {
}
getUserShip()
const resetWhere = ()=>{
where.value.mobile = "";
where.value.user_ship = "";
where.value.street = null;
selectedValues.value = [];
getOrderList(true);
}
const selectedValues = ref([])
const options = ref([]);
//
const loadOptions = async (node, resolve) => {
const level = node.level;
let response;
if (level !== 0 && !node.data.code) return resolve([]);
// if (level === 0) {
// response = await apiProvince();
// response = response.data.map((item) => {
// return {
// code: item.province_code,
// name: item.province_name
// }
// })
// } else
if (level === 0) {
response = await apiCity({
province_code: 510000 //
});
response = response.data.map((item) => {
return {
code: item.city_code,
name: item.city_name
}
})
} else if (level === 1) {
response = await apiArea({
city_code: node.data.code
});
response = response.data.map((item) => {
return {
code: item.area_code,
name: item.area_name
}
})
}
else if (level === 2) {
response = await apiStreet({
area_code: node.data.code
});
response = response.data.map((item) => {
return {
code: item.street_code,
name: item.street_name,
leaf: true
}
})
}
else if (level === 3) {
response = await apiVillage({
street_code: node.data.code
});
response = response.data.map((item) => {
return {
code: item.village_code,
name: item.village_name,
}
})
}
else if (level === 4) {
response = await apiBrigade({
village_code: node.data.code
});
response = response.data.map((item) => {
return {
code: item.id,
name: item.brigade_name,
leaf: true
}
})
}
resolve(response);
};
const propOptions = {
value: 'code',
label: 'name',
children: 'children',
multiple: false,
lazy: true,
lazyLoad: loadOptions
};
const changeAddress = ()=>{
if(selectedValues.value.length){
where.value.street = selectedValues.value[selectedValues.value.length - 1];
}else{
where.value.street = "";
}
getOrderList(true);
}
onMounted(() => {
mitt.on('re-load-user-list', () => {
getOrderList(true);
mitt.on('re-load-user-list', (e) => {
if(e) getOrderList(true);
})
})
onUnmounted(() => {
@ -108,9 +214,15 @@ onUnmounted(() => {
<el-select v-model="where.user_ship" @change="getOrderList(true)" placeholder="请选择用户类型" style="flex: 1">
<el-option v-for="item in userShip" :key="item.id" :label="item.title" :value="item.id" />
</el-select>
<el-button @click="resetWhere" style="margin-left: 1rem;">重置</el-button>
</div>
<div class="header-row">
<div class="label">用户地区</div>
<el-cascader style="flex: 1;" :options="options" v-model="selectedValues"
:props="propOptions" :load="loadOptions" class="w-full" @change="changeAddress" />
</div>
<div class="header-input">
<el-input v-model="where.mobile" placeholder="搜索手机号/ID" @keydown.enter="getOrderList(true)"
<el-input v-model="where.mobile" placeholder="搜索手机号" @keydown.enter="getOrderList(true)"
@clear="getOrderList(true)" clearable>
<template #append>
<el-button type="primary" style="
@ -128,7 +240,7 @@ onUnmounted(() => {
<el-avatar class="avatar" :src="item.avatar" />
<div style="display: flex; flex-direction: column; justify-content: space-around;flex:1;">
<div class="top flex">
<div class="r-1"><span class="bold">{{ item.nickname }}</span><span>{{ ' (ID:' + item.id
<div class="r-1"><span class="bold">{{ item.real_name || item.nickname }}</span><span>{{ ' (ID:' + item.id
+')'}}</span>
</div>
<div>手机号: {{ item.mobile }}</div>
@ -140,7 +252,7 @@ onUnmounted(() => {
<div>返还金: <span class="red">{{ item.return_money?.toFixed(2) }}</span></div>
<div>礼品券: <span class="red">{{ item.get_frozen?.toFixed(2) }}</span></div>
<div>
<el-tag type="primary" v-if="item.user_ship != 1">{{ item.user_ship_name }}</el-tag>
<el-tag type="primary" v-if="item.user_ship == 0 || item.user_ship == 4">{{ item.user_ship_name }}</el-tag>
<el-tag type="success" v-else>{{ item.user_ship_name }}</el-tag>
</div>
</div>