This commit is contained in:
weipengfei 2024-04-10 11:36:40 +08:00
parent a52c9481e4
commit 9ed175c975
24 changed files with 143 additions and 94 deletions

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as U,u as I,r as u,o as R,b as n,c as S,h as b,e as w,f as e,w as t,k as v,g as L,s as B,v as C,z as E,E as d,G as K,H as N}from"./index-CDJP75me.js";const M=l=>(B("data-v-271611c3"),l=l(),C(),l),T={class:"body"},z={class:"login"},G=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),H={__name:"index",setup(l){const p=I(),y=E(),h=u(null),_=u(null),s=u({account:"",password:"",key:"",captchaVerification:"",code:""}),i=()=>{if(!s.value.account)return d({message:"请填写账号",type:"error"});if(!s.value.password)return d({message:"请填写密码",type:"error"});K(s.value).then(a=>{console.log(a),a.data&&(p.setToken(a.data.token),N().then(({data:o})=>{if(!o.service)return d({message:"请联系管理员开通服务",type:"error"});p.setUserInfo(o),y.push("/")}))}).catch(a=>{})};return R(()=>{}),(a,o)=>{const k=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),g=n("Lock"),V=n("el-button"),x=n("el-form");return S(),b("div",T,[w("div",z,[G,e(x,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[L("登录")]),_:1})]),_:1})]),_:1})])])}}},j=U(H,[["__scopeId","data-v-271611c3"]]);export{j as default}; import{_ as U,u as I,r as u,o as R,b as n,c as S,h as b,e as w,f as e,w as t,k as v,g as L,s as B,v as C,z as E,E as d,G as K,H as N}from"./index-3-ddzq9I.js";const M=l=>(B("data-v-271611c3"),l=l(),C(),l),T={class:"body"},z={class:"login"},G=M(()=>w("div",{class:"title"},"里海收银系统 - 登录",-1)),H={__name:"index",setup(l){const p=I(),y=E(),h=u(null),_=u(null),s=u({account:"",password:"",key:"",captchaVerification:"",code:""}),i=()=>{if(!s.value.account)return d({message:"请填写账号",type:"error"});if(!s.value.password)return d({message:"请填写密码",type:"error"});K(s.value).then(a=>{console.log(a),a.data&&(p.setToken(a.data.token),N().then(({data:o})=>{if(!o.service)return d({message:"请联系管理员开通服务",type:"error"});p.setUserInfo(o),y.push("/")}))}).catch(a=>{})};return R(()=>{}),(a,o)=>{const k=n("User"),f=n("el-icon"),m=n("el-input"),c=n("el-form-item"),g=n("Lock"),V=n("el-button"),x=n("el-form");return S(),b("div",T,[w("div",z,[G,e(x,null,{default:t(()=>[e(c,null,{default:t(()=>[e(m,{ref_key:"accRef",ref:h,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",autofocus:!0,onKeydown:o[1]||(o[1]=v(r=>_.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(k)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(m,{ref_key:"pwdRef",ref:_,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:v(i,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(g)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:i},{default:t(()=>[L("登录")]),_:1})]),_:1})]),_:1})])])}}},j=U(H,[["__scopeId","data-v-271611c3"]]);export{j as default};

1
dist/assets/index-CInbkgrA.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/assets/index-CWHs3HNs.js vendored Normal file

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{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-CDJP75me.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; import{b as t,c,h as a,e,f as o,w as d,g as l}from"./index-3-ddzq9I.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},h=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),p=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[h,p,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default};

View File

@ -1 +1 @@
import{e as F,a as G,p as J,g as K,f as Q}from"./pay-BajYk3t1.js";import{_ as W,u as X,r as s,b as d,j as Y,p as Z,c as u,h as v,f as t,w as o,g as r,t as ee,e as P,d as I,z as te,E as h,s as ae,v as oe}from"./index-CDJP75me.js";const le=m=>(ae("data-v-80048b20"),m=m(),oe(),m),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ue=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ce={class:"dialog-footer"},pe={__name:"indexList",setup(m){const k=X(),C=s([]),b=te(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),w=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(k.userInfo.service.mer_id,n.value).then(e=>{C.value=e.data.list,w.value=e.data.count,y.value=!1})};i();const x=s(0);(()=>{G({staff_id:k.userInfo.service.service_id}).then(e=>{var a;x.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},z=e=>{K({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),E=()=>{_.value=!1,Q({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),U=e=>{L.value=e,_.value=!0},O=()=>{b.push({name:"home"})};return(e,a)=>{const S=d("el-radio-button"),T=d("el-radio-group"),c=d("el-table-column"),p=d("el-button"),j=d("el-table"),H=d("el-pagination"),M=d("el-dialog"),q=Y("loading");return Z((u(),v("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(S,{value:1},{default:o(()=>[r("全部")]),_:1}),t(S,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(c,{prop:"group_order_id",label:"ID",width:"100"}),t(c,{prop:"order_sn",label:"订单号",width:"260"}),t(c,{prop:"total_price",label:"订单金额"}),t(c,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(u(),v("span",ne,"已支付")):(u(),v("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),v("span",ie,ee(l.row.pay_time),1)):(u(),v("div",de,[t(p,{type:"primary",link:"",onClick:V=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>U(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(H,{"page-size":n.value.limit,layout:"prev, pager, next",total:w.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(J,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(M,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ce,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(u(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(u(),I(p,{key:1,type:"primary",onClick:E},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ue]),_:1},8,["modelValue"])])),[[q,y.value]])}}},ge=W(pe,[["__scopeId","data-v-80048b20"]]);export{ge as default}; import{e as F,a as G,p as J,g as K,f as Q}from"./pay-DFmO-d88.js";import{_ as W,u as X,r as s,b as d,j as Y,p as Z,c as u,h as v,f as t,w as o,g as r,t as ee,e as P,d as I,z as te,E as h,s as ae,v as oe}from"./index-3-ddzq9I.js";const le=m=>(ae("data-v-80048b20"),m=m(),oe(),m),se={"element-loading-text":"加载中",class:"my-order"},ne={key:0},re={key:1,style:{color:"#ff4a00"}},ie={key:0},de={key:1,class:"flex"},ue=le(()=>P("span",null,"提单前请清空购物车, 避免提单的商品与购物车商品混合, 请确保购物车内无数据后再进行提单",-1)),ce={class:"dialog-footer"},pe={__name:"indexList",setup(m){const k=X(),C=s([]),b=te(),g=s(1),f=s(null),n=s({page:1,limit:20}),y=s(!1),w=s(0),i=()=>{y.value=!0,g.value==1&&(n.value.paid=null),g.value==2&&(n.value.paid=0),F(k.userInfo.service.mer_id,n.value).then(e=>{C.value=e.data.list,w.value=e.data.count,y.value=!1})};i();const x=s(0);(()=>{G({staff_id:k.userInfo.service.service_id}).then(e=>{var a;x.value=(a=e.data.list)==null?void 0:a.length})})();const A=e=>{n.value.page=1,i()},B=e=>{n.value.page=e,i()},D=e=>{n.value.page=e,i()},N=e=>{n.value.page=e,i()},R=()=>{i()},$=e=>{f.value.setRePay({price:e.pay_price,order_id:e.group_order_id}),f.value.drawer=!0},z=e=>{K({order_sn:e}).then(a=>{a.data.paid==1||a.message=="支付成功"?(h({message:a.message,type:"success"}),i()):h({message:a.message,type:"error"})}).catch(a=>{})},L=s(""),E=()=>{_.value=!1,Q({order_sn:L.value}).then(e=>{h({message:e.message,type:"success"}),b.push({name:"home"})})},_=s(!1),U=e=>{L.value=e,_.value=!0},O=()=>{b.push({name:"home"})};return(e,a)=>{const S=d("el-radio-button"),T=d("el-radio-group"),c=d("el-table-column"),p=d("el-button"),j=d("el-table"),H=d("el-pagination"),M=d("el-dialog"),q=Y("loading");return Z((u(),v("div",se,[t(T,{modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=l=>g.value=l),style:{"margin-bottom":"30px"},onChange:A},{default:o(()=>[t(S,{value:1},{default:o(()=>[r("全部")]),_:1}),t(S,{value:2},{default:o(()=>[r("未支付")]),_:1})]),_:1},8,["modelValue"]),t(j,{data:C.value,style:{width:"100%"}},{default:o(()=>[t(c,{prop:"group_order_id",label:"ID",width:"100"}),t(c,{prop:"order_sn",label:"订单号",width:"260"}),t(c,{prop:"total_price",label:"订单金额"}),t(c,{prop:"paid",label:"支付状态"},{default:o(l=>[l.row.paid==1?(u(),v("span",ne,"已支付")):(u(),v("span",re,"未支付"))]),_:1}),t(c,{prop:"create_time",label:"订单创建时间"}),t(c,{prop:"pay_time",label:"订单支付时间"},{default:o(l=>[l.row.pay_time?(u(),v("span",ie,ee(l.row.pay_time),1)):(u(),v("div",de,[t(p,{type:"primary",link:"",onClick:V=>$(l.row)},{default:o(()=>[r("重新支付")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>z(l.row.order_sn)},{default:o(()=>[r("检测状态")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:V=>U(l.row.order_sn)},{default:o(()=>[r("提单")]),_:2},1032,["onClick"])]))]),_:1})]),_:1},8,["data"]),t(H,{"page-size":n.value.limit,layout:"prev, pager, next",total:w.value,onPrevClick:B,onNextClick:D,onCurrentChange:N},null,8,["page-size","total"]),t(J,{ref_key:"payRef",ref:f,onPaySuccess:R},null,512),t(M,{modelValue:_.value,"onUpdate:modelValue":a[2]||(a[2]=l=>_.value=l),title:"提示",width:"500"},{footer:o(()=>[P("div",ce,[t(p,{onClick:a[1]||(a[1]=l=>_.value=!1)},{default:o(()=>[r("取消")]),_:1}),x.value>0?(u(),I(p,{key:0,onClick:O},{default:o(()=>[r(" 前去清空购物车 ")]),_:1})):(u(),I(p,{key:1,type:"primary",onClick:E},{default:o(()=>[r(" 确认提单 ")]),_:1}))])]),default:o(()=>[ue]),_:1},8,["modelValue"])])),[[q,y.value]])}}},ge=W(pe,[["__scopeId","data-v-80048b20"]]);export{ge as default};

View File

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

File diff suppressed because one or more lines are too long

1
dist/assets/pay-DFmO-d88.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

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

2
dist/index.html vendored
View File

@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="./vite.svg" /> <link rel="icon" type="image/svg+xml" href="./vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>里海收银系统</title> <title>里海收银系统</title>
<script type="module" crossorigin src="./assets/index-CDJP75me.js"></script> <script type="module" crossorigin src="./assets/index-3-ddzq9I.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DVUNn34X.css"> <link rel="stylesheet" crossorigin href="./assets/index-DVUNn34X.css">
</head> </head>
<body> <body>

View File

@ -83,4 +83,11 @@ export function groupOrderListApi(id, data) {
*/ */
export function orderLadingApi(data) { export function orderLadingApi(data) {
return request.get(`order_lading`, { params: data }) return request.get(`order_lading`, { params: data })
}
/**
* @description 核销
*/
export function verifierApi(mer_id, id, data) {
return request.post(`verifier/${mer_id}/${id}`, data)
} }

View File

@ -5,6 +5,7 @@ import {
orderStatusApi, orderStatusApi,
orderLadingApi, orderLadingApi,
cartListApi, cartListApi,
verifierApi,
} from "@/api/store.js"; } from "@/api/store.js";
import { useUserStore } from "@/store/user.js"; import { useUserStore } from "@/store/user.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
@ -77,6 +78,28 @@ const getOrderStatus = (id) => {
}) })
.catch((err) => {}); .catch((err) => {});
}; };
const tableRef = ref(null);
//
const convert = ()=>{
let query = {
data: [],
verify_code: formData.value.verify_code
}
let tableList = tableRef.value.getSelectionRows();
tableList.forEach(item => {
query.data.push({
id: item.order_product_id,
num: item.product_num
})
});
verifierApi(userStore.userInfo.service.mer_id, formData.value.order_id, query).then(res=>{
ElMessage.success(res.message);
}).catch(err=>{
ElMessage.error(err.message)
})
}
</script> </script>
<template> <template>
@ -112,7 +135,9 @@ const getOrderStatus = (id) => {
<el-table <el-table
style="height: calc(100vh - 100px - 14rem)" style="height: calc(100vh - 100px - 14rem)"
:data="formData.orderProduct" :data="formData.orderProduct"
ref="tableRef"
> >
<el-table-column type="selection" width="55" />
<el-table-column prop="cart_info.product.store_name" label="商品信息"> <el-table-column prop="cart_info.product.store_name" label="商品信息">
<template #default="{ row }"> <template #default="{ row }">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
@ -136,7 +161,7 @@ const getOrderStatus = (id) => {
/> />
<el-table-column prop="product_num" label="数量" width="180"> <el-table-column prop="product_num" label="数量" width="180">
<template #default="{ row }"> <template #default="{ row }">
<el-input-number v-model="row.product_num" placeholder="" size="small"></el-input-number> <el-input-number v-model="row.product_num" step-strictly :max="row.refund_num" :min="1" :step="1" size="small"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="total_price" label="总价" width="150" /> <el-table-column prop="total_price" label="总价" width="150" />
@ -219,7 +244,7 @@ const getOrderStatus = (id) => {
</div> </div>
</div> </div>
<div class="handle" v-if="formData.verify_status==0"> <div class="handle" v-if="formData.verify_status==0">
<el-button class="btn" type="warning" @click="rePay(formData)" <el-button class="btn" type="warning" @click="convert"
>核销</el-button >核销</el-button
> >
</div> </div>

View File

@ -6,7 +6,7 @@ import { ref, nextTick, onMounted } from "vue";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
const type = ref(1); const type = ref(1);
const code = ref("2439926081480600"); const code = ref("7905655999175400");
const inputRef = ref(null); const inputRef = ref(null);
const orderRef = ref(null); const orderRef = ref(null);

View File

@ -84,12 +84,13 @@ const editItem = (id, data)=>{
const changeAllPrice = (price)=>{ const changeAllPrice = (price)=>{
discounts.value = costPrice.value - price; discounts.value = costPrice.value - price;
allPrice.value = +price; allPrice.value = +price;
showPrice(false)
} }
const nowPrice = ref(0); const nowPrice = ref(0);
const priceRef = ref(null); const priceRef = ref(null);
const showPrice = ()=>{ const showPrice = (type=true)=>{
priceRef.value.show(true, costPrice.value); priceRef.value.show(type, costPrice.value);
} }
defineExpose({ defineExpose({
@ -193,7 +194,7 @@ onUnmounted(() => {
> >
</div> </div>
</div> </div>
<price ref="priceRef" @submit="changeAllPrice"></price> <price ref="priceRef" @changeAllPrice="changeAllPrice"></price>
</div> </div>
</template> </template>

View File

@ -1,56 +1,59 @@
<script setup> <script setup>
import { ref, nextTick, onMounted, onUnmounted } from 'vue' import { ref, nextTick, onMounted, onUnmounted } from "vue";
import { ElMessage } from 'element-plus' import { ElMessage } from "element-plus";
import mitt from "@/utils/mitt.js"; import mitt from "@/utils/mitt.js";
const dialogVisible = ref(false) const dialogVisible = ref(false);
const priceRef = ref(null) const priceRef = ref(null);
const allPrice = ref(0) const allPrice = ref(0);
const show = (e, p = 0)=>{ const show = (e=true, p = 0) => {
priceInfo.value.nowPrice = ""; priceInfo.value.nowPrice = "";
priceInfo.value.percentage = ""; priceInfo.value.percentage = "";
dialogVisible.value = e; dialogVisible.value = e;
allPrice.value = p; allPrice.value = p;
nextTick(()=>{ nextTick(() => {
setTimeout(()=>{ setTimeout(() => {
priceRef.value?.focus() priceRef.value?.focus();
},150) }, 150);
}) });
} };
const priceInfo = ref({ const priceInfo = ref({
nowPrice: '', nowPrice: "",
percentage: '', percentage: "",
}) });
const inputPrice = (e)=>{ const inputPrice = (e) => {
priceInfo.value.percentage = (e / allPrice.value * 100).toFixed(2); priceInfo.value.percentage = ((e / allPrice.value) * 100).toFixed(2);
} };
const inputPercentage = (e)=>{ const inputPercentage = (e) => {
priceInfo.value.nowPrice = (allPrice.value * e / 100).toFixed(2); priceInfo.value.nowPrice = ((allPrice.value * e) / 100).toFixed(2);
} };
const emit = defineEmits(['submit']) const emit = defineEmits(["changeAllPrice"]);
const submit = ()=>{ const submitPrice = () => {
if(priceInfo.value.nowPrice<=0){ if (priceInfo.value.percentage > 100) {
priceInfo.value.nowPrice = ""; priceInfo.value.nowPrice = "";
priceInfo.value.percentage = ""; priceInfo.value.percentage = "";
return ElMessage.error("金额不能小于0"); return ElMessage.error("改价金额不能大于当前订单金额");
} }
emit('submit', priceInfo.value.nowPrice); if (priceInfo.value.nowPrice <= 0) {
dialogVisible.value = false; priceInfo.value.nowPrice = "";
} priceInfo.value.percentage = "";
return ElMessage.error("金额不能小于0");
}
emit("changeAllPrice", priceInfo.value.nowPrice);
};
defineExpose({ defineExpose({
show, show,
dialogVisible dialogVisible,
}) });
// //
const aenter = () => { const aenter = () => {
if(!dialogVisible.value) return; if (dialogVisible.value) submitPrice();
else submit();
}; };
onMounted(() => { onMounted(() => {
mitt.on("enter", aenter); mitt.on("enter", aenter);
@ -59,29 +62,42 @@ onMounted(() => {
onUnmounted(() => { onUnmounted(() => {
mitt.off("enter", aenter); mitt.off("enter", aenter);
}); });
</script> </script>
<template> <template>
<el-dialog <el-dialog v-model="dialogVisible" title="订单改价" width="650">
v-model="dialogVisible"
title="订单改价"
width="650"
>
<div class="price"> <div class="price">
<div class="flex"> <div class="flex">
<el-input ref="priceRef" style="flex: 3;margin: 10px;height: 2.5rem;" v-model="priceInfo.nowPrice" type="number" placeholder="请输入改价后的价格" @input="inputPrice"> <el-input
<template #suffix></template> ref="priceRef"
</el-input> style="flex: 3; margin: 10px; height: 2.5rem"
<el-input style="flex: 2;margin: 10px;height: 2.5rem;" v-model="priceInfo.percentage" type="number" placeholder="请输入比例" @input="inputPercentage"> v-model="priceInfo.nowPrice"
<template #suffix>%</template> type="number"
</el-input> placeholder="请输入改价后的价格"
</div> @input="inputPrice"
<div style="margin: 10px;padding-bottom: 40px;">改价后金额: <span style="color: #f5222d;font-weight: bold;margin-left: 1rem;">¥{{ priceInfo.nowPrice || allPrice || ' - - ' }}</span></div> >
<template #suffix></template>
</el-input>
<el-input
style="flex: 2; margin: 10px; height: 2.5rem"
v-model="priceInfo.percentage"
type="number"
placeholder="请输入比例"
@input="inputPercentage"
>
<template #suffix>%</template>
</el-input>
</div>
<div style="margin: 10px; padding-bottom: 40px">
改价后金额:
<span style="color: #f5222d; font-weight: bold; margin-left: 1rem"
>¥{{ priceInfo.nowPrice || allPrice || " - - " }}</span
>
</div>
</div> </div>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button class="ok-btn" type="primary" @click="submit"> <el-button class="ok-btn" type="primary" @click="submitPrice">
确定 (Enter) 确定 (Enter)
</el-button> </el-button>
</div> </div>
@ -90,19 +106,18 @@ onUnmounted(() => {
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.dialog-footer{ .dialog-footer {
.ok-btn{ .ok-btn {
width: 100%; width: 100%;
height: 2.5rem; height: 2.5rem;
border-radius: 2.5rem; border-radius: 2.5rem;
} }
} }
.price{ .price {
border-top: 1px solid #eee; border-top: 1px solid #eee;
padding-top: 1rem; padding-top: 1rem;
.flex{ .flex {
display: flex; display: flex;
} }
} }
</style> </style>

View File

@ -28,7 +28,7 @@ const changeItem = (item) => {
const handleEnter = () => { const handleEnter = () => {
emit("getStoreList", { emit("getStoreList", {
bar_code: bar_code.value, bar_code: bar_code.value,
}); }, true);
}; };
defineExpose({ defineExpose({
@ -67,7 +67,7 @@ onUnmounted(() => {
<div class="nav-item-input"> <div class="nav-item-input">
<el-input <el-input
v-model="bar_code" v-model="bar_code"
placeholder=" 搜索商品名称/ID/唯一码或点击聚焦扫码, 按回车(Enter)搜索" placeholder=" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索"
clearable clearable
ref="codeRef" ref="codeRef"
@focus="focus" @focus="focus"

View File

@ -25,15 +25,16 @@ const where = ref({
page: 0, page: 0,
limit: 30, limit: 30,
}); });
const getStoreList = (data) => { const getStoreList = (data={}, reload=false) => {
where.value = { where.value = {
staff_id: userStore.userInfo.service.service_id, staff_id: userStore.userInfo.service.service_id,
...where.value, ...where.value,
...data, ...data,
}; };
if (data.bar_code) { if (reload) {
storeList.value = []; storeList.value = [];
where.value.page = 1; where.value.page = 1;
loadEnd.value = false;
} }
storeListApi(userStore.userInfo.service.mer_id, where.value).then((res) => { storeListApi(userStore.userInfo.service.mer_id, where.value).then((res) => {
if (res.data?.list?.length < where.value.limit) loadEnd.value = true; if (res.data?.list?.length < where.value.limit) loadEnd.value = true;