From 376e7c16f4de424342d37065f6a2361d0a8d82a8 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 31 Jul 2024 13:33:15 +0800 Subject: [PATCH] 1 --- dist/assets/{authCode-CQcCWWpQ.js => authCode-p4DlY4hZ.js} | 2 +- dist/assets/{axiosAPI-CvHIP5YD.js => axiosAPI-m7QjxXd9.js} | 2 +- dist/assets/{index-SMf-FFTg.css => index-BJ5fek4I.css} | 2 +- dist/assets/{index-D4JTEzRG.css => index-BSYTbHMK.css} | 2 +- dist/assets/{index-B77lOgPy.js => index-BUc4IFgC.js} | 2 +- dist/assets/{index-BJyMI5XA.js => index-BoKKYodA.js} | 2 +- dist/assets/{index-IkG_7g88.js => index-BzqFTEfY.js} | 2 +- dist/assets/index-C3nn8uGl.js | 1 - dist/assets/{index-CJCLRir3.js => index-CQ53hTlw.js} | 2 +- dist/assets/{index-SeybCiti.js => index-DbTF6P8n.js} | 2 +- dist/assets/{index-Iipf9fR_.js => index-Df7OKyCV.js} | 2 +- dist/assets/{index-Ehny8k97.js => index-DwZFmrrS.js} | 2 +- dist/assets/{index-DZ-rs8qe.js => index-El3JpHtp.js} | 4 ++-- dist/assets/{index-BkeE1FsL.js => index-NZsfYC8a.js} | 2 +- dist/assets/{index-sgdN7oBe.js => index-fh-7oYYX.js} | 2 +- dist/assets/{index-DfjV6Hzh.js => index-gNE3niRs.js} | 2 +- dist/assets/index-rTWTv0oF.js | 1 + dist/assets/{padding-CFUD4Y80.js => padding-Cx5iHgRh.js} | 2 +- dist/assets/pay-DsODbiUT.js | 1 + dist/assets/pay-ZUyBpX9d.js | 1 - dist/assets/{shop-4Vi_GXIy.js => shop-DHOKo0Qh.js} | 2 +- dist/assets/{store-eKONkWfH.js => store-D17PfqyZ.js} | 2 +- dist/assets/{test-PoA383m7.js => test-2qMQQxfe.js} | 2 +- dist/assets/{user-C_IO-ELJ.js => user-BasTd-eJ.js} | 2 +- dist/index.html | 2 +- 25 files changed, 24 insertions(+), 24 deletions(-) rename dist/assets/{authCode-CQcCWWpQ.js => authCode-p4DlY4hZ.js} (93%) rename dist/assets/{axiosAPI-CvHIP5YD.js => axiosAPI-m7QjxXd9.js} (93%) rename dist/assets/{index-SMf-FFTg.css => index-BJ5fek4I.css} (84%) rename dist/assets/{index-D4JTEzRG.css => index-BSYTbHMK.css} (88%) rename dist/assets/{index-B77lOgPy.js => index-BUc4IFgC.js} (84%) rename dist/assets/{index-BJyMI5XA.js => index-BoKKYodA.js} (99%) rename dist/assets/{index-IkG_7g88.js => index-BzqFTEfY.js} (99%) delete mode 100644 dist/assets/index-C3nn8uGl.js rename dist/assets/{index-CJCLRir3.js => index-CQ53hTlw.js} (96%) rename dist/assets/{index-SeybCiti.js => index-DbTF6P8n.js} (94%) rename dist/assets/{index-Iipf9fR_.js => index-Df7OKyCV.js} (68%) rename dist/assets/{index-Ehny8k97.js => index-DwZFmrrS.js} (98%) rename dist/assets/{index-DZ-rs8qe.js => index-El3JpHtp.js} (99%) rename dist/assets/{index-BkeE1FsL.js => index-NZsfYC8a.js} (98%) rename dist/assets/{index-sgdN7oBe.js => index-fh-7oYYX.js} (96%) rename dist/assets/{index-DfjV6Hzh.js => index-gNE3niRs.js} (98%) create mode 100644 dist/assets/index-rTWTv0oF.js rename dist/assets/{padding-CFUD4Y80.js => padding-Cx5iHgRh.js} (65%) create mode 100644 dist/assets/pay-DsODbiUT.js delete mode 100644 dist/assets/pay-ZUyBpX9d.js rename dist/assets/{shop-4Vi_GXIy.js => shop-DHOKo0Qh.js} (73%) rename dist/assets/{store-eKONkWfH.js => store-D17PfqyZ.js} (80%) rename dist/assets/{test-PoA383m7.js => test-2qMQQxfe.js} (99%) rename dist/assets/{user-C_IO-ELJ.js => user-BasTd-eJ.js} (91%) diff --git a/dist/assets/authCode-CQcCWWpQ.js b/dist/assets/authCode-p4DlY4hZ.js similarity index 93% rename from dist/assets/authCode-CQcCWWpQ.js rename to dist/assets/authCode-p4DlY4hZ.js index 3d1943b..6120c25 100644 --- a/dist/assets/authCode-CQcCWWpQ.js +++ b/dist/assets/authCode-p4DlY4hZ.js @@ -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-DZ-rs8qe.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-El3JpHtp.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 _}; diff --git a/dist/assets/axiosAPI-CvHIP5YD.js b/dist/assets/axiosAPI-m7QjxXd9.js similarity index 93% rename from dist/assets/axiosAPI-CvHIP5YD.js rename to dist/assets/axiosAPI-m7QjxXd9.js index 92f7ea6..9db57af 100644 --- a/dist/assets/axiosAPI-CvHIP5YD.js +++ b/dist/assets/axiosAPI-m7QjxXd9.js @@ -1 +1 @@ -import{O as o,P as s,E as r,u as d,Q as g}from"./index-DZ-rs8qe.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-El3JpHtp.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}; diff --git a/dist/assets/index-SMf-FFTg.css b/dist/assets/index-BJ5fek4I.css similarity index 84% rename from dist/assets/index-SMf-FFTg.css rename to dist/assets/index-BJ5fek4I.css index 48f8deb..ad6e8b1 100644 --- a/dist/assets/index-SMf-FFTg.css +++ b/dist/assets/index-BJ5fek4I.css @@ -1 +1 @@ -@charset "UTF-8";.my-order[data-v-bf6504fc]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-bf6504fc]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-bf6504fc]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-bf6504fc]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-bf6504fc]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-bf6504fc]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-bf6504fc]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-lists .item[data-v-bf6504fc]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-bf6504fc]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-bf6504fc]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-bf6504fc]: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-bf6504fc]: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-bf6504fc]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-bf6504fc]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-bf6504fc]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-bf6504fc]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-bf6504fc]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-bf6504fc]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-bf6504fc]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-bf6504fc]{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-bf6504fc]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-bf6504fc]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-bf6504fc]{background-color:#efefef}.my-order .load-end[data-v-bf6504fc]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-b5c92dd9]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-b5c92dd9]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-b5c92dd9]{padding:1rem;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-b5c92dd9]{font-weight:700}.my-order .detail .table .table-info[data-v-b5c92dd9]{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-b5c92dd9]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-b5c92dd9]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-b5c92dd9]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-b5c92dd9]{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} +@charset "UTF-8";.my-order[data-v-bf6504fc]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-bf6504fc]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-bf6504fc]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-bf6504fc]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-bf6504fc]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-bf6504fc]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-bf6504fc]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-lists .item[data-v-bf6504fc]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-bf6504fc]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-bf6504fc]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-bf6504fc]: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-bf6504fc]: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-bf6504fc]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-bf6504fc]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-bf6504fc]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-bf6504fc]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-bf6504fc]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-bf6504fc]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-bf6504fc]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-bf6504fc]{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-bf6504fc]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-bf6504fc]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-bf6504fc]{background-color:#efefef}.my-order .load-end[data-v-bf6504fc]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-6197e97a]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-6197e97a]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-6197e97a]{padding:1rem;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-6197e97a]{font-weight:700}.my-order .detail .table .table-info[data-v-6197e97a]{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-6197e97a]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-6197e97a]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-6197e97a]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-6197e97a]{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} diff --git a/dist/assets/index-D4JTEzRG.css b/dist/assets/index-BSYTbHMK.css similarity index 88% rename from dist/assets/index-D4JTEzRG.css rename to dist/assets/index-BSYTbHMK.css index 6a633b4..1088e24 100644 --- a/dist/assets/index-D4JTEzRG.css +++ b/dist/assets/index-BSYTbHMK.css @@ -1 +1 @@ -@charset "UTF-8";.my-order[data-v-f1ecc2f9]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-f1ecc2f9]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav .nav-item[data-v-f1ecc2f9]{font-weight:700}.my-order .header-nav span[data-v-f1ecc2f9]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-f1ecc2f9]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-f1ecc2f9]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-f1ecc2f9]{flex:1;overflow-y:auto}.my-order .order-lists .item[data-v-f1ecc2f9]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-f1ecc2f9]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-f1ecc2f9]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-f1ecc2f9]: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-f1ecc2f9]: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-f1ecc2f9]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-f1ecc2f9]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-f1ecc2f9]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-f1ecc2f9]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-f1ecc2f9]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-f1ecc2f9]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-f1ecc2f9]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-f1ecc2f9]{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-f1ecc2f9]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-f1ecc2f9]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-f1ecc2f9]{background-color:#efefef}.my-order .load-end[data-v-f1ecc2f9]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-1950b4ed]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-1950b4ed]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-1950b4ed]{padding:1rem;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-1950b4ed]{font-weight:700}.my-order .detail .table .table-info[data-v-1950b4ed]{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-1950b4ed]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-1950b4ed]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-1950b4ed]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-1950b4ed]{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}.my-card .my-code{height:70%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-card .my-code .box{width:38rem;position:relative}.my-card .my-code .box .input{width:100%;height:3rem;box-sizing:border-box;border-radius:4rem;border:.0625rem solid #1890ff;padding:0 1rem;font-size:1.1rem}.my-card .my-code .box .input:focus{outline:none;box-shadow:0 0 .31rem #1890ff;transition:all .2s ease-in-out}.my-card .my-code .box .btn{position:absolute;right:0;top:0;width:5rem;height:100%;border-radius:0 4rem 4rem 0;background:#1890ff;color:#fff;display:flex;justify-content:center;align-items:center;cursor:pointer}.my-card .my-code .to-list{width:auto;color:#1890ff;font-size:1.1rem;margin-top:3rem;text-align:center;display:flex;align-items:center;cursor:pointer}::-webkit-scrollbar{width:.31rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.31rem}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.my-order[data-v-f1ecc2f9]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-f1ecc2f9]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav .nav-item[data-v-f1ecc2f9]{font-weight:700}.my-order .header-nav span[data-v-f1ecc2f9]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-f1ecc2f9]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-f1ecc2f9]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-f1ecc2f9]{flex:1;overflow-y:auto}.my-order .order-lists .item[data-v-f1ecc2f9]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-f1ecc2f9]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-f1ecc2f9]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-f1ecc2f9]: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-f1ecc2f9]: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-f1ecc2f9]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-f1ecc2f9]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-f1ecc2f9]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-f1ecc2f9]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-f1ecc2f9]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-f1ecc2f9]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-f1ecc2f9]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-f1ecc2f9]{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-f1ecc2f9]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-f1ecc2f9]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-f1ecc2f9]{background-color:#efefef}.my-order .load-end[data-v-f1ecc2f9]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-2bbc8641]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-2bbc8641]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-2bbc8641]{padding:1rem;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-2bbc8641]{font-weight:700}.my-order .detail .table .table-info[data-v-2bbc8641]{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-2bbc8641]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-2bbc8641]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-2bbc8641]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-2bbc8641]{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}.my-card .my-code{height:70%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-card .my-code .box{width:38rem;position:relative}.my-card .my-code .box .input{width:100%;height:3rem;box-sizing:border-box;border-radius:4rem;border:.0625rem solid #1890ff;padding:0 1rem;font-size:1.1rem}.my-card .my-code .box .input:focus{outline:none;box-shadow:0 0 .31rem #1890ff;transition:all .2s ease-in-out}.my-card .my-code .box .btn{position:absolute;right:0;top:0;width:5rem;height:100%;border-radius:0 4rem 4rem 0;background:#1890ff;color:#fff;display:flex;justify-content:center;align-items:center;cursor:pointer}.my-card .my-code .to-list{width:auto;color:#1890ff;font-size:1.1rem;margin-top:3rem;text-align:center;display:flex;align-items:center;cursor:pointer}::-webkit-scrollbar{width:.31rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.31rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/index-B77lOgPy.js b/dist/assets/index-BUc4IFgC.js similarity index 84% rename from dist/assets/index-B77lOgPy.js rename to dist/assets/index-BUc4IFgC.js index 050f67d..47c3092 100644 --- a/dist/assets/index-B77lOgPy.js +++ b/dist/assets/index-BUc4IFgC.js @@ -1 +1 @@ -import{b as t,c,k as a,e,f as o,w as d,g as l}from"./index-DZ-rs8qe.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-El3JpHtp.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}; diff --git a/dist/assets/index-BJyMI5XA.js b/dist/assets/index-BoKKYodA.js similarity index 99% rename from dist/assets/index-BJyMI5XA.js rename to dist/assets/index-BoKKYodA.js index a0cc2e7..a830864 100644 --- a/dist/assets/index-BJyMI5XA.js +++ b/dist/assets/index-BoKKYodA.js @@ -1,4 +1,4 @@ -var Np=Object.defineProperty;var Gp=(B,x,o)=>x in B?Np(B,x,{enumerable:!0,configurable:!0,writable:!0,value:o}):B[x]=o;var au=(B,x,o)=>(Gp(B,typeof x!="symbol"?x+"":x,o),o);import{c as Kp,a as Hp,b as Xo,s as zp,o as kp}from"./store-eKONkWfH.js";import{_ as ct,r as R,o as Dt,m as re,a as Nt,b as nn,c as D,d as Se,w as hn,e as v,f as M,g as un,t as G,n as _u,E as ke,u as Mr,h as Ft,i as Jo,j as du,k as J,F as Ut,l as Mt,p as te,q as pu,s as gu,v as Wt,x as qp,y as $r,z as Wr,A as Vp,B as at,C as Br,D as Zp,G as Yp,H as Xp}from"./index-DZ-rs8qe.js";import{u as Jp}from"./user-C_IO-ELJ.js";import"./moment-Cl4UOzQZ.js";import{p as Yo}from"./padding-CFUD4Y80.js";import"./axiosAPI-CvHIP5YD.js";import{m as cu,s as Qp}from"./shop-4Vi_GXIy.js";import{p as jp}from"./pay-ZUyBpX9d.js";import"./authCode-CQcCWWpQ.js";/* empty css */const ng={class:"price"},eg={class:"flex"},tg={style:{margin:"0.625rem","padding-bottom":"40px"}},rg={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},ig={class:"dialog-footer"},ug={__name:"price",emits:["changeAllPrice"],setup(B,{expose:x,emit:o}){const E=R(!1),q=R(null),Q=R(0),A=(H=!0,w=0)=>{X.value.nowPrice="",X.value.percentage="",E.value=H,Q.value=w,_u(()=>{setTimeout(()=>{var tn;(tn=q.value)==null||tn.focus()},150)})},X=R({nowPrice:"",percentage:""}),dn=H=>{X.value.percentage=(H/Q.value*100).toFixed(2)},ln=H=>{X.value.nowPrice=(Q.value*H/100).toFixed(2)},en=o,W=()=>{if(X.value.percentage>100)return X.value.nowPrice="",X.value.percentage="",ke.error("改价金额不能大于当前订单金额");if(X.value.nowPrice<=0)return X.value.nowPrice="",X.value.percentage="",ke.error("金额不能小于0");en("changeAllPrice",X.value.nowPrice)};x({show:A,dialogVisible:E});const Cn=()=>{E.value&&W()};return Dt(()=>{re.on("enter",Cn)}),Nt(()=>{re.off("enter",Cn)}),(H,w)=>{const tn=nn("el-input"),F=nn("el-button"),V=nn("el-dialog");return D(),Se(V,{modelValue:E.value,"onUpdate:modelValue":w[2]||(w[2]=fn=>E.value=fn),title:"订单改价",width:"650"},{footer:hn(()=>[v("div",ig,[M(F,{class:"ok-btn",type:"primary",onClick:W},{default:hn(()=>[un(" 确定 (Enter) ")]),_:1})])]),default:hn(()=>[v("div",ng,[v("div",eg,[M(tn,{ref_key:"priceRef",ref:q,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.nowPrice,"onUpdate:modelValue":w[0]||(w[0]=fn=>X.value.nowPrice=fn),type:"number",placeholder:"请输入改价后的价格",onInput:dn},{suffix:hn(()=>[un("元")]),_:1},8,["modelValue"]),M(tn,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.percentage,"onUpdate:modelValue":w[1]||(w[1]=fn=>X.value.percentage=fn),type:"number",placeholder:"请输入比例",onInput:ln},{suffix:hn(()=>[un("%")]),_:1},8,["modelValue"])]),v("div",tg,[un(" 改价后金额: "),v("span",rg,"¥"+G(X.value.nowPrice||Q.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},sg=ct(ug,[["__scopeId","data-v-924edcc0"]]),og={class:"check-user-list"},lg={class:"header-input"},fg={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ag=["onClick"],cg={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},hg={class:"top"},_g={class:"bold"},dg={class:"flex-between"},pg={class:"mr-2"},gg={class:"bottom flex",style:{"justify-content":"space-between"}},vg={class:"red"},mg={class:"red"},wg={class:"red"},yg={key:0,class:"load-end"},xg={key:1,class:"load-end"},Ag={__name:"userList",emits:["setUser"],setup(B,{expose:x,emit:o}){Mr();const E=R(!1),q=R({page_no:1,page_size:20,mobile:""}),Q=o,A=R(!1),X=R(0),dn=R(!1),ln=R([]),en=(H=!1)=>{if(H)q.value.page_no=1;else if(dn.value||A.value)return;A.value=!0,Jp(q.value).then(w=>{H?ln.value=w.data.lists:ln.value=[...ln.value,...w.data.lists],w.data.lists.length{dn.value=!0,A.value=!1})},W=(H,w)=>{Q("setUser",H),E.value=!1};return x({open:(H=null)=>{H||(q.value.mobile=""),E.value=!0,en(!0)}}),(H,w)=>{const tn=nn("el-button"),F=nn("el-input"),V=nn("el-avatar"),fn=nn("el-tag"),an=nn("el-dialog"),sn=Ft("loading"),cn=Ft("infinite-scroll");return D(),Se(an,{modelValue:E.value,"onUpdate:modelValue":w[4]||(w[4]=Z=>E.value=Z),title:"选择用户",width:"800"},{default:hn(()=>[v("div",og,[v("div",lg,[M(F,{modelValue:q.value.mobile,"onUpdate:modelValue":w[1]||(w[1]=Z=>q.value.mobile=Z),placeholder:"搜索手机号/ID",onKeydown:w[2]||(w[2]=Jo(Z=>en(!0),["enter"])),onClear:w[3]||(w[3]=Z=>en(!0)),clearable:""},{append:hn(()=>[M(tn,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:w[0]||(w[0]=Z=>en(!0))},{default:hn(()=>[un("搜索")]),_:1})]),_:1},8,["modelValue"])]),du((D(),J("div",fg,[(D(!0),J(Ut,null,Mt(ln.value,(Z,O)=>(D(),J("div",{class:"item",key:O,onClick:vn=>W(Z,O)},[M(V,{class:"avatar",src:Z.avatar},null,8,["src"]),v("div",cg,[v("div",hg,[v("div",null,[v("span",_g,G(Z.nickname),1),v("span",null,G(" (ID:"+Z.id+")"),1)]),v("div",dg,[v("div",pg,"手机号: "+G(Z.mobile||Z.account),1),Z.user_ship==0?(D(),Se(fn,{key:0,type:"primary"},{default:hn(()=>[un(G(Z.user_ship_name),1)]),_:2},1024)):(D(),Se(fn,{key:1,type:"success"},{default:hn(()=>[un(G(Z.user_ship_name),1)]),_:2},1024))])]),v("div",gg,[v("div",null,[un("采购款: "),v("span",vg,G(Z.purchase_funds),1)]),v("div",null,[un("礼品券: "),v("span",mg,G(Z.integral),1)]),v("div",null,[un("余额: "),v("span",wg,G(Z.now_money),1)])])])],8,ag))),128)),dn.value?(D(),J("div",yg,"没有更多了")):te("",!0),A.value?(D(),J("div",xg,"加载中...")):te("",!0)])),[[sn,A.value],[cn,en]])])]),_:1},8,["modelValue"])}}},Ig=ct(Ag,[["__scopeId","data-v-7ac34513"]]),Cg=B=>(pu("data-v-99f6f26d"),B=B(),gu(),B),Lg={class:"my-order"},Sg={class:"user-nav"},Rg={class:"user-info"},Eg={key:0,class:"info"},bg={class:"flex-bewteen"},Tg={class:"flex-bewteen",style:{"align-items":"flex-start"}},Og={class:"user-money"},Pg={style:{"margin-right":"0.5rem"}},$g={style:{color:"#f70"}},Bg={style:{"margin-right":"0.5rem"}},Wg={style:{color:"#f70"}},Fg={style:{color:"#f70"}},Ug={key:1,class:"info",style:{"align-items":"center",display:"flex","justify-content":"space-between"}},Mg={class:"flex-bewteen",style:{width:"100%"}},Dg=Cg(()=>v("div",{style:{"font-size":"1.2rem"}},"游客",-1)),Ng={class:"header-nav"},Gg={class:"nav-item"},Kg={class:"order-list"},Hg={class:"order-item-info"},zg={class:"order-item-title"},kg={class:"title"},qg=["onClick"],Vg={class:"order-item-sku"},Zg={class:"order-item-price"},Yg={class:"order-footer"},Xg={class:"order-total"},Jg={class:"price",style:{"flex-direction":"column","align-items":"flex-start"}},Qg={class:"total-item",style:{"flex-shrink":"0"}},jg={style:{"font-size":"1.4rem"}},nv={key:0,class:"total-item",style:{"padding-right":"0","line-height":"0.8rem"}},ev={style:{"font-size":"0.8rem"}},tv={class:"update-price"},rv={class:"order-btn"},iv={__name:"order",emits:["goPay","editAttr","getStoreList"],setup(B,{expose:x,emit:o}){const E=R([]),q=R(0),Q=R(0),A=R(0);Mr();const X=R(null),dn=()=>{let P=[];E.value.map(b=>{P.push(b.id)}),P.length!=0&&en(P)},ln=P=>{E.value=E.value.filter(b=>b.id!=P),en([P])},en=P=>{Kp({id:P}).then(b=>{w()})},W=R({uid:""}),Cn=P=>{W.value=P,W.value.uid=P.id,w(),tn("getStoreList",{uid:P.id},!0)},H=R({}),w=()=>{q.value=0,Q.value=0,A.value=0,Hp({uid:W.value.uid}).then(P=>{H.value=P.data.extend,E.value=P.data.lists||[]})};w();const tn=o,F=()=>{tn("goPay")},V=(P,b)=>{Xo({product_id:P.product_id,cart_num:P.cart_num}).then(Tn=>{w()}).catch(Tn=>{var Bn;let On=(Bn=Tn==null?void 0:Tn.msg)==null?void 0:Bn.match(/\b\d+(\.\d+)?\b/);On?P.cart_num=+On[0]:P.cart_num=1})},fn=P=>{A.value=Q.value-P,q.value=+P,_u(()=>{setTimeout(()=>{sn(!1)},150)})};R(0);const an=R(null),sn=(P=!0)=>{an.value.show(P,Q.value)},cn=R(!1);x({getList:w,resetView:()=>{cn.value=!1,w()},list:E,discounts:A,allPrice:q,userInfo:W,is_storage:cn});const O=()=>{an.value.dialogVisible?an.value.dialogVisible=!1:sn()},vn=()=>{E.value.length>0&&dn()};return Dt(()=>{re.on("insert",O),re.on("delete",vn)}),Nt(()=>{re.off("insert",O),re.off("delete",vn)}),(P,b)=>{const Tn=nn("el-avatar"),On=nn("ArrowRight"),Bn=nn("el-icon"),ae=nn("el-button"),qe=nn("RefreshLeft"),Nr=nn("Delete"),pe=nn("el-empty"),ce=nn("el-image"),Gr=nn("el-input-number"),Ve=nn("el-switch");return D(),J("div",Lg,[v("div",Sg,[v("div",Rg,[M(Tn,{class:"avatar",src:W.value.avatar},null,8,["src"]),W.value.uid?(D(),J("div",Eg,[v("div",bg,[v("div",null,"手机号: "+G(W.value.mobile||W.value.account),1),M(ae,{type:"primary",link:"",class:"change-user",onClick:b[0]||(b[0]=pn=>X.value.open(W.value.uid))},{default:hn(()=>[un("切换用户"),M(Bn,null,{default:hn(()=>[M(On)]),_:1})]),_:1})]),v("div",Tg,[v("div",Og,[v("div",Pg,[un("采购款: "),v("span",$g,G(W.value.purchase_funds),1)]),v("div",Bg,[un("礼品券: "),v("span",Wg,G(W.value.integral),1)]),v("div",null,[un("余额: "),v("span",Fg,G(W.value.now_money),1)])]),M(ae,{style:{"margin-top":"0.2rem"},link:"",onClick:b[1]||(b[1]=pn=>Cn({id:""}))},{default:hn(()=>[un(" 重置"),M(Bn,null,{default:hn(()=>[M(qe)]),_:1})]),_:1})])])):(D(),J("div",Ug,[v("div",Mg,[Dg,M(ae,{type:"primary",link:"",class:"change-user",onClick:b[2]||(b[2]=pn=>X.value.open())},{default:hn(()=>[un("切换用户"),M(Bn,null,{default:hn(()=>[M(On)]),_:1})]),_:1})])]))]),M(Ig,{ref_key:"userListRef",ref:X,onSetUser:Cn},null,512)]),v("div",Ng,[v("div",Gg,[un(" 已选购 "),v("span",null,G(E.value.length),1),un(" 款 ")]),v("div",{class:"nav-item-clear",onClick:dn},[M(Bn,null,{default:hn(()=>[M(Nr)]),_:1}),un("清空 (Delete) ")])]),v("div",Kg,[E.value.length==0?(D(),Se(pe,{key:0,description:"请点击右侧添加商品"})):(D(!0),J(Ut,{key:1},Mt(E.value,(pn,Kr)=>(D(),J("div",{class:"order-item",key:Kr},[M(ce,{loading:"lazy",class:"order-item-img",src:pn.image},null,8,["src"]),v("div",Hg,[v("div",zg,[v("div",kg,G(pn.store_name),1),v("div",{class:"delete",onClick:ht=>ln(pn.id)},"删除",8,qg)]),v("div",Vg,[v("span",null,G(pn.unit_name),1)]),v("div",Zg,[v("div",null,[un(" ¥"),v("span",null,G(pn.price),1)]),v("div",null,[M(Gr,{modelValue:pn.cart_num,"onUpdate:modelValue":ht=>pn.cart_num=ht,min:+pn.batch>0?+pn.batch:1,step:1,"step-strictly":"",onChange:ht=>V(pn)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])])])])]))),128))]),v("div",Yg,[v("div",Xg,[v("div",Jg,[v("div",Qg,[un(" 合计: "),v("span",null,[un("¥"),v("span",jg,G(H.value.pay_price||"0.00"),1)])]),H.value.msg?(D(),J("div",nv,[v("span",ev,G(H.value.msg),1)])):te("",!0)]),v("div",tv,[M(Ve,{modelValue:cn.value,"onUpdate:modelValue":b[3]||(b[3]=pn=>cn.value=pn),size:"large","inline-prompt":"","active-text":"存货","inactive-text":"不存"},null,8,["modelValue"])])]),v("div",rv,[M(ae,{class:"btn",type:"primary",onClick:F,disabled:E.value.length==0},{default:hn(()=>[un(G("立即结账 (F9)"))]),_:1},8,["disabled"])])]),M(sg,{ref_key:"priceRef",ref:an,onChangeAllPrice:fn},null,512)])}}},uv=ct(iv,[["__scopeId","data-v-99f6f26d"]]);var Fr={exports:{}};/** +var Np=Object.defineProperty;var Gp=(B,x,o)=>x in B?Np(B,x,{enumerable:!0,configurable:!0,writable:!0,value:o}):B[x]=o;var au=(B,x,o)=>(Gp(B,typeof x!="symbol"?x+"":x,o),o);import{c as Kp,a as Hp,b as Xo,s as zp,o as kp}from"./store-D17PfqyZ.js";import{_ as ct,r as R,o as Dt,m as re,a as Nt,b as nn,c as D,d as Se,w as hn,e as v,f as M,g as un,t as G,n as _u,E as ke,u as Mr,h as Ft,i as Jo,j as du,k as J,F as Ut,l as Mt,p as te,q as pu,s as gu,v as Wt,x as qp,y as $r,z as Wr,A as Vp,B as at,C as Br,D as Zp,G as Yp,H as Xp}from"./index-El3JpHtp.js";import{u as Jp}from"./user-BasTd-eJ.js";import"./moment-Cl4UOzQZ.js";import{p as Yo}from"./padding-Cx5iHgRh.js";import"./axiosAPI-m7QjxXd9.js";import{m as cu,s as Qp}from"./shop-DHOKo0Qh.js";import{p as jp}from"./pay-DsODbiUT.js";import"./authCode-p4DlY4hZ.js";/* empty css */const ng={class:"price"},eg={class:"flex"},tg={style:{margin:"0.625rem","padding-bottom":"40px"}},rg={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},ig={class:"dialog-footer"},ug={__name:"price",emits:["changeAllPrice"],setup(B,{expose:x,emit:o}){const E=R(!1),q=R(null),Q=R(0),A=(H=!0,w=0)=>{X.value.nowPrice="",X.value.percentage="",E.value=H,Q.value=w,_u(()=>{setTimeout(()=>{var tn;(tn=q.value)==null||tn.focus()},150)})},X=R({nowPrice:"",percentage:""}),dn=H=>{X.value.percentage=(H/Q.value*100).toFixed(2)},ln=H=>{X.value.nowPrice=(Q.value*H/100).toFixed(2)},en=o,W=()=>{if(X.value.percentage>100)return X.value.nowPrice="",X.value.percentage="",ke.error("改价金额不能大于当前订单金额");if(X.value.nowPrice<=0)return X.value.nowPrice="",X.value.percentage="",ke.error("金额不能小于0");en("changeAllPrice",X.value.nowPrice)};x({show:A,dialogVisible:E});const Cn=()=>{E.value&&W()};return Dt(()=>{re.on("enter",Cn)}),Nt(()=>{re.off("enter",Cn)}),(H,w)=>{const tn=nn("el-input"),F=nn("el-button"),V=nn("el-dialog");return D(),Se(V,{modelValue:E.value,"onUpdate:modelValue":w[2]||(w[2]=fn=>E.value=fn),title:"订单改价",width:"650"},{footer:hn(()=>[v("div",ig,[M(F,{class:"ok-btn",type:"primary",onClick:W},{default:hn(()=>[un(" 确定 (Enter) ")]),_:1})])]),default:hn(()=>[v("div",ng,[v("div",eg,[M(tn,{ref_key:"priceRef",ref:q,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.nowPrice,"onUpdate:modelValue":w[0]||(w[0]=fn=>X.value.nowPrice=fn),type:"number",placeholder:"请输入改价后的价格",onInput:dn},{suffix:hn(()=>[un("元")]),_:1},8,["modelValue"]),M(tn,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.percentage,"onUpdate:modelValue":w[1]||(w[1]=fn=>X.value.percentage=fn),type:"number",placeholder:"请输入比例",onInput:ln},{suffix:hn(()=>[un("%")]),_:1},8,["modelValue"])]),v("div",tg,[un(" 改价后金额: "),v("span",rg,"¥"+G(X.value.nowPrice||Q.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},sg=ct(ug,[["__scopeId","data-v-924edcc0"]]),og={class:"check-user-list"},lg={class:"header-input"},fg={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ag=["onClick"],cg={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},hg={class:"top"},_g={class:"bold"},dg={class:"flex-between"},pg={class:"mr-2"},gg={class:"bottom flex",style:{"justify-content":"space-between"}},vg={class:"red"},mg={class:"red"},wg={class:"red"},yg={key:0,class:"load-end"},xg={key:1,class:"load-end"},Ag={__name:"userList",emits:["setUser"],setup(B,{expose:x,emit:o}){Mr();const E=R(!1),q=R({page_no:1,page_size:20,mobile:""}),Q=o,A=R(!1),X=R(0),dn=R(!1),ln=R([]),en=(H=!1)=>{if(H)q.value.page_no=1;else if(dn.value||A.value)return;A.value=!0,Jp(q.value).then(w=>{H?ln.value=w.data.lists:ln.value=[...ln.value,...w.data.lists],w.data.lists.length{dn.value=!0,A.value=!1})},W=(H,w)=>{Q("setUser",H),E.value=!1};return x({open:(H=null)=>{H||(q.value.mobile=""),E.value=!0,en(!0)}}),(H,w)=>{const tn=nn("el-button"),F=nn("el-input"),V=nn("el-avatar"),fn=nn("el-tag"),an=nn("el-dialog"),sn=Ft("loading"),cn=Ft("infinite-scroll");return D(),Se(an,{modelValue:E.value,"onUpdate:modelValue":w[4]||(w[4]=Z=>E.value=Z),title:"选择用户",width:"800"},{default:hn(()=>[v("div",og,[v("div",lg,[M(F,{modelValue:q.value.mobile,"onUpdate:modelValue":w[1]||(w[1]=Z=>q.value.mobile=Z),placeholder:"搜索手机号/ID",onKeydown:w[2]||(w[2]=Jo(Z=>en(!0),["enter"])),onClear:w[3]||(w[3]=Z=>en(!0)),clearable:""},{append:hn(()=>[M(tn,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:w[0]||(w[0]=Z=>en(!0))},{default:hn(()=>[un("搜索")]),_:1})]),_:1},8,["modelValue"])]),du((D(),J("div",fg,[(D(!0),J(Ut,null,Mt(ln.value,(Z,O)=>(D(),J("div",{class:"item",key:O,onClick:vn=>W(Z,O)},[M(V,{class:"avatar",src:Z.avatar},null,8,["src"]),v("div",cg,[v("div",hg,[v("div",null,[v("span",_g,G(Z.nickname),1),v("span",null,G(" (ID:"+Z.id+")"),1)]),v("div",dg,[v("div",pg,"手机号: "+G(Z.mobile||Z.account),1),Z.user_ship==0?(D(),Se(fn,{key:0,type:"primary"},{default:hn(()=>[un(G(Z.user_ship_name),1)]),_:2},1024)):(D(),Se(fn,{key:1,type:"success"},{default:hn(()=>[un(G(Z.user_ship_name),1)]),_:2},1024))])]),v("div",gg,[v("div",null,[un("采购款: "),v("span",vg,G(Z.purchase_funds),1)]),v("div",null,[un("礼品券: "),v("span",mg,G(Z.integral),1)]),v("div",null,[un("余额: "),v("span",wg,G(Z.now_money),1)])])])],8,ag))),128)),dn.value?(D(),J("div",yg,"没有更多了")):te("",!0),A.value?(D(),J("div",xg,"加载中...")):te("",!0)])),[[sn,A.value],[cn,en]])])]),_:1},8,["modelValue"])}}},Ig=ct(Ag,[["__scopeId","data-v-7ac34513"]]),Cg=B=>(pu("data-v-99f6f26d"),B=B(),gu(),B),Lg={class:"my-order"},Sg={class:"user-nav"},Rg={class:"user-info"},Eg={key:0,class:"info"},bg={class:"flex-bewteen"},Tg={class:"flex-bewteen",style:{"align-items":"flex-start"}},Og={class:"user-money"},Pg={style:{"margin-right":"0.5rem"}},$g={style:{color:"#f70"}},Bg={style:{"margin-right":"0.5rem"}},Wg={style:{color:"#f70"}},Fg={style:{color:"#f70"}},Ug={key:1,class:"info",style:{"align-items":"center",display:"flex","justify-content":"space-between"}},Mg={class:"flex-bewteen",style:{width:"100%"}},Dg=Cg(()=>v("div",{style:{"font-size":"1.2rem"}},"游客",-1)),Ng={class:"header-nav"},Gg={class:"nav-item"},Kg={class:"order-list"},Hg={class:"order-item-info"},zg={class:"order-item-title"},kg={class:"title"},qg=["onClick"],Vg={class:"order-item-sku"},Zg={class:"order-item-price"},Yg={class:"order-footer"},Xg={class:"order-total"},Jg={class:"price",style:{"flex-direction":"column","align-items":"flex-start"}},Qg={class:"total-item",style:{"flex-shrink":"0"}},jg={style:{"font-size":"1.4rem"}},nv={key:0,class:"total-item",style:{"padding-right":"0","line-height":"0.8rem"}},ev={style:{"font-size":"0.8rem"}},tv={class:"update-price"},rv={class:"order-btn"},iv={__name:"order",emits:["goPay","editAttr","getStoreList"],setup(B,{expose:x,emit:o}){const E=R([]),q=R(0),Q=R(0),A=R(0);Mr();const X=R(null),dn=()=>{let P=[];E.value.map(b=>{P.push(b.id)}),P.length!=0&&en(P)},ln=P=>{E.value=E.value.filter(b=>b.id!=P),en([P])},en=P=>{Kp({id:P}).then(b=>{w()})},W=R({uid:""}),Cn=P=>{W.value=P,W.value.uid=P.id,w(),tn("getStoreList",{uid:P.id},!0)},H=R({}),w=()=>{q.value=0,Q.value=0,A.value=0,Hp({uid:W.value.uid}).then(P=>{H.value=P.data.extend,E.value=P.data.lists||[]})};w();const tn=o,F=()=>{tn("goPay")},V=(P,b)=>{Xo({product_id:P.product_id,cart_num:P.cart_num}).then(Tn=>{w()}).catch(Tn=>{var Bn;let On=(Bn=Tn==null?void 0:Tn.msg)==null?void 0:Bn.match(/\b\d+(\.\d+)?\b/);On?P.cart_num=+On[0]:P.cart_num=1})},fn=P=>{A.value=Q.value-P,q.value=+P,_u(()=>{setTimeout(()=>{sn(!1)},150)})};R(0);const an=R(null),sn=(P=!0)=>{an.value.show(P,Q.value)},cn=R(!1);x({getList:w,resetView:()=>{cn.value=!1,w()},list:E,discounts:A,allPrice:q,userInfo:W,is_storage:cn});const O=()=>{an.value.dialogVisible?an.value.dialogVisible=!1:sn()},vn=()=>{E.value.length>0&&dn()};return Dt(()=>{re.on("insert",O),re.on("delete",vn)}),Nt(()=>{re.off("insert",O),re.off("delete",vn)}),(P,b)=>{const Tn=nn("el-avatar"),On=nn("ArrowRight"),Bn=nn("el-icon"),ae=nn("el-button"),qe=nn("RefreshLeft"),Nr=nn("Delete"),pe=nn("el-empty"),ce=nn("el-image"),Gr=nn("el-input-number"),Ve=nn("el-switch");return D(),J("div",Lg,[v("div",Sg,[v("div",Rg,[M(Tn,{class:"avatar",src:W.value.avatar},null,8,["src"]),W.value.uid?(D(),J("div",Eg,[v("div",bg,[v("div",null,"手机号: "+G(W.value.mobile||W.value.account),1),M(ae,{type:"primary",link:"",class:"change-user",onClick:b[0]||(b[0]=pn=>X.value.open(W.value.uid))},{default:hn(()=>[un("切换用户"),M(Bn,null,{default:hn(()=>[M(On)]),_:1})]),_:1})]),v("div",Tg,[v("div",Og,[v("div",Pg,[un("采购款: "),v("span",$g,G(W.value.purchase_funds),1)]),v("div",Bg,[un("礼品券: "),v("span",Wg,G(W.value.integral),1)]),v("div",null,[un("余额: "),v("span",Fg,G(W.value.now_money),1)])]),M(ae,{style:{"margin-top":"0.2rem"},link:"",onClick:b[1]||(b[1]=pn=>Cn({id:""}))},{default:hn(()=>[un(" 重置"),M(Bn,null,{default:hn(()=>[M(qe)]),_:1})]),_:1})])])):(D(),J("div",Ug,[v("div",Mg,[Dg,M(ae,{type:"primary",link:"",class:"change-user",onClick:b[2]||(b[2]=pn=>X.value.open())},{default:hn(()=>[un("切换用户"),M(Bn,null,{default:hn(()=>[M(On)]),_:1})]),_:1})])]))]),M(Ig,{ref_key:"userListRef",ref:X,onSetUser:Cn},null,512)]),v("div",Ng,[v("div",Gg,[un(" 已选购 "),v("span",null,G(E.value.length),1),un(" 款 ")]),v("div",{class:"nav-item-clear",onClick:dn},[M(Bn,null,{default:hn(()=>[M(Nr)]),_:1}),un("清空 (Delete) ")])]),v("div",Kg,[E.value.length==0?(D(),Se(pe,{key:0,description:"请点击右侧添加商品"})):(D(!0),J(Ut,{key:1},Mt(E.value,(pn,Kr)=>(D(),J("div",{class:"order-item",key:Kr},[M(ce,{loading:"lazy",class:"order-item-img",src:pn.image},null,8,["src"]),v("div",Hg,[v("div",zg,[v("div",kg,G(pn.store_name),1),v("div",{class:"delete",onClick:ht=>ln(pn.id)},"删除",8,qg)]),v("div",Vg,[v("span",null,G(pn.unit_name),1)]),v("div",Zg,[v("div",null,[un(" ¥"),v("span",null,G(pn.price),1)]),v("div",null,[M(Gr,{modelValue:pn.cart_num,"onUpdate:modelValue":ht=>pn.cart_num=ht,min:+pn.batch>0?+pn.batch:1,step:1,"step-strictly":"",onChange:ht=>V(pn)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])])])])]))),128))]),v("div",Yg,[v("div",Xg,[v("div",Jg,[v("div",Qg,[un(" 合计: "),v("span",null,[un("¥"),v("span",jg,G(H.value.pay_price||"0.00"),1)])]),H.value.msg?(D(),J("div",nv,[v("span",ev,G(H.value.msg),1)])):te("",!0)]),v("div",tv,[M(Ve,{modelValue:cn.value,"onUpdate:modelValue":b[3]||(b[3]=pn=>cn.value=pn),size:"large","inline-prompt":"","active-text":"存货","inactive-text":"不存"},null,8,["modelValue"])])]),v("div",rv,[M(ae,{class:"btn",type:"primary",onClick:F,disabled:E.value.length==0},{default:hn(()=>[un(G("立即结账 (F9)"))]),_:1},8,["disabled"])])]),M(sg,{ref_key:"priceRef",ref:an,onChangeAllPrice:fn},null,512)])}}},uv=ct(iv,[["__scopeId","data-v-99f6f26d"]]);var Fr={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors diff --git a/dist/assets/index-IkG_7g88.js b/dist/assets/index-BzqFTEfY.js similarity index 99% rename from dist/assets/index-IkG_7g88.js rename to dist/assets/index-BzqFTEfY.js index c11f81f..ca525db 100644 --- a/dist/assets/index-IkG_7g88.js +++ b/dist/assets/index-BzqFTEfY.js @@ -1 +1 @@ -import{u as be,r as d,G as De,b as y,c as n,k as g,f as a,w as t,E as D,_ as ke,o as $e,m as K,a as Ve,h as fe,e,g as f,F as ne,l as re,d as O,p as oe,i as Ne,j as ge,z as ce,t as h,q as we,s as Ce,J as He,n as pe,I as Qe}from"./index-DZ-rs8qe.js";import{a as Xe,b as Ye,u as Ze,c as Ee,d as Ie,e as Pe,f as el,g as ll,h as al,i as tl}from"./user-C_IO-ELJ.js";import"./moment-Cl4UOzQZ.js";import{r as ye}from"./axiosAPI-CvHIP5YD.js";import{_ as je}from"./authCode-CQcCWWpQ.js";import{g as sl,k as ol,l as il}from"./store-eKONkWfH.js";import{p as nl}from"./padding-CFUD4Y80.js";function Se(C){return ye.get("/city",{params:C})}function Ue(C){return ye.get("/area",{params:C})}function xe(C){return ye.get("/street",{params:C})}function ze(C){return ye.get("/village",{params:C})}function Ae(C){return ye.get("/brigade",{params:C})}const ul={class:"add-user"},dl={__name:"add",emits:["close"],setup(C,{expose:r,emit:$}){const R=be(),F=d(null),c=De({mobile:"",code:"",real_name:"",user_ship:0,selectedValues:[]}),j=De({mobile:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}],real_name:[{required:!0,message:"请输入用户姓名",trigger:"blur"}],user_ship:[{required:!0,message:"请选择用户类型",trigger:"change"}],selectedValues:[{required:!0,message:"请选择用户地址",trigger:"change"}]}),Y=d([]),B=async(q,k)=>{const N=q.level;let b;if(N!==0&&!q.data.code)return k([]);N===0?(b=await Se({province_code:51e4}),b=b.data.map(A=>({code:A.city_code,name:A.city_name}))):N===1?(b=await Ue({city_code:q.data.code}),b=b.data.map(A=>({code:A.area_code,name:A.area_name}))):N===2?(b=await xe({area_code:q.data.code}),b=b.data.map(A=>({code:A.street_code,name:A.street_name}))):N===3?(b=await ze({street_code:q.data.code}),b=b.data.map(A=>({code:A.village_code,name:A.village_name}))):N===4&&(b=await Ae({village_code:q.data.code}),b=b.data.map(A=>({code:A.id,name:A.brigade_name,leaf:!0}))),k(b)},H={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:B};d([]);const V=$,w=()=>{F.value.validate(async q=>{if(q){let k={};k.mobile=c.mobile,k.code=c.code,k.user_ship=c.user_ship,k.real_name=c.real_name,k.province="510000",k.city=c.selectedValues[0],k.area=c.selectedValues[1],k.street=c.selectedValues[2],k.village=c.selectedValues[3],k.brigade=c.selectedValues[4],k.store_id=R.userInfo.store_id,Xe(k).then(N=>{c.mobile="",c.code="",c.user_ship=0,c.real_name="",c.selectedValues=[],F.value.resetFields(),V("close")})}})},z=d(null),P=()=>{F.value.validateField("mobile",q=>{q&&Ye({mobile:c.mobile}).then(k=>{D.success("发送成功"),z.value.startCountDown()}).catch(k=>{D.error("发送失败")})})};return r({addUser:w}),(q,k)=>{const N=y("el-input"),b=y("el-form-item"),A=y("el-cascader"),ae=y("el-form");return n(),g("div",ul,[a(ae,{model:c,rules:j,ref_key:"formDataRef",ref:F,"label-width":"80px"},{default:t(()=>[a(b,{label:"用户电话",prop:"mobile"},{default:t(()=>[a(N,{modelValue:c.mobile,"onUpdate:modelValue":k[0]||(k[0]=E=>c.mobile=E),placeholder:"请输入用户电话"},null,8,["modelValue"])]),_:1}),a(b,{label:"验证码",prop:"code"},{default:t(()=>[a(N,{modelValue:c.code,"onUpdate:modelValue":k[1]||(k[1]=E=>c.code=E),placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),a(je,{ref_key:"authCodeRef",ref:z,style:{"margin-left":"1rem"},onSendCode:P,start:!1},null,512)]),_:1}),a(b,{label:"用户姓名",prop:"real_name"},{default:t(()=>[a(N,{modelValue:c.real_name,"onUpdate:modelValue":k[2]||(k[2]=E=>c.real_name=E),placeholder:"请输入用户姓名"},null,8,["modelValue"])]),_:1}),a(b,{label:"用户地址",prop:"selectedValues"},{default:t(()=>[a(A,{style:{width:"100%"},modelValue:c.selectedValues,"onUpdate:modelValue":k[3]||(k[3]=E=>c.selectedValues=E),options:Y.value,props:H,load:B,class:"w-full"},null,8,["modelValue","options"])]),_:1})]),_:1},8,["model","rules"])])}}},Re=C=>(we("data-v-df06e4b9"),C=C(),Ce(),C),rl={class:"my-order"},cl={class:"header-nav"},vl=Re(()=>e("div",{class:"nav-item"},h("用户列表"),-1)),_l={class:"header-row"},ml=Re(()=>e("div",{class:"label"},"用户类型",-1)),pl={class:"header-row"},fl=Re(()=>e("div",{class:"label"},"用户地区",-1)),yl={class:"header-input"},hl={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},gl=["onClick"],bl={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},kl={class:"top flex"},$l={class:"r-1"},Vl={class:"bold"},wl={class:"bottom flex",style:{"justify-content":"space-between"}},Cl={class:"red"},Sl={class:"red"},Ul={class:"red"},xl={class:"red"},zl={key:0,class:"load-end"},Al={key:1,class:"load-end"},Rl={class:"dialog-footer"},Fl={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(C){const r=be();d([]);const $=d({page_no:1,page_size:20,mobile:"",user_ship:"",street:null}),R=d(!1),F=d(0),c=d(0),j=d(!1),Y=d([]),B=(U=!1)=>{if(U)$.value.page_no=1;else if(j.value||R.value)return;R.value=!0,$.value.mobile==""&&$.value.user_ship==""?$.value.store_id=r.userInfo.store_id:$.value.store_id=null,Ze($.value).then(u=>{U?Y.value=u.data.lists:Y.value=[...Y.value,...u.data.lists],$.value.page_no==1&&Y.value.length>0&&K.emit("set-user-detail",Y.value[0]),u.data.lists.length<$.value.page_size?j.value=!0:$.value.page_no++,c.value=0,F.value=u.data.count,R.value=!1}).catch(u=>{j.value=!0,R.value=!1})},H=(U,u)=>{c.value=u,K.emit("set-user-detail",U)},V=d(!1),w=d(null),z=()=>{var U;(U=w.value)==null||U.addUser()},P=()=>{V.value=!1,B(!0)},q=d([]);(()=>{Ee({type_id:4}).then(U=>{q.value=U.data.lists})})();const N=()=>{$.value.mobile="",$.value.user_ship="",$.value.street=null,b.value=[],B(!0)},b=d([]),A=d([]),ae=async(U,u)=>{const x=U.level;let _;if(x!==0&&!U.data.code)return u([]);x===0?(_=await Se({province_code:51e4}),_=_.data.map(p=>({code:p.city_code,name:p.city_name}))):x===1?(_=await Ue({city_code:U.data.code}),_=_.data.map(p=>({code:p.area_code,name:p.area_name}))):x===2?(_=await xe({area_code:U.data.code}),_=_.data.map(p=>({code:p.street_code,name:p.street_name,leaf:!0}))):x===3?(_=await ze({street_code:U.data.code}),_=_.data.map(p=>({code:p.village_code,name:p.village_name}))):x===4&&(_=await Ae({village_code:U.data.code}),_=_.data.map(p=>({code:p.id,name:p.brigade_name,leaf:!0}))),u(_)},E={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:ae},Z=()=>{b.value.length?$.value.street=b.value[b.value.length-1]:$.value.street="",B(!0)};return $e(()=>{K.on("re-load-user-list",U=>{U&&B(!0)})}),Ve(()=>{K.off("re-load-user-list")}),(U,u)=>{const x=y("Plus"),_=y("el-icon"),p=y("el-button"),ee=y("el-option"),W=y("el-select"),le=y("el-cascader"),J=y("CircleClose"),ve=y("el-input"),ue=y("el-avatar"),ie=y("el-tag"),te=y("el-dialog"),o=fe("loading"),m=fe("infinite-scroll");return n(),g("div",rl,[e("div",cl,[vl,a(p,{type:"primary",onClick:u[0]||(u[0]=l=>V.value=!0)},{default:t(()=>[a(_,null,{default:t(()=>[a(x)]),_:1}),f(" 添加用户")]),_:1})]),e("div",_l,[ml,a(W,{modelValue:$.value.user_ship,"onUpdate:modelValue":u[1]||(u[1]=l=>$.value.user_ship=l),onChange:u[2]||(u[2]=l=>B(!0)),placeholder:"请选择用户类型",style:{flex:"1"}},{default:t(()=>[(n(!0),g(ne,null,re(q.value,l=>(n(),O(ee,{key:l.id,label:l.title,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a(p,{onClick:N,style:{"margin-left":"1rem"}},{default:t(()=>[f("重置")]),_:1})]),e("div",pl,[fl,a(le,{style:{flex:"1"},options:A.value,modelValue:b.value,"onUpdate:modelValue":u[3]||(u[3]=l=>b.value=l),props:E,load:ae,class:"w-full",onChange:Z},null,8,["options","modelValue"])]),e("div",yl,[a(ve,{modelValue:$.value.mobile,"onUpdate:modelValue":u[6]||(u[6]=l=>$.value.mobile=l),placeholder:"搜索手机号",onKeydown:u[7]||(u[7]=Ne(l=>B(!0),["enter"])),onClear:u[8]||(u[8]=l=>B(!0))},{suffix:t(()=>[$.value.mobile!=""?(n(),O(_,{key:0,size:"18",onClick:u[4]||(u[4]=l=>{$.value.mobile="",B(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:t(()=>[a(J)]),_:1})):oe("",!0)]),append:t(()=>[a(p,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:u[5]||(u[5]=l=>B(!0))},{default:t(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),ge((n(),g("div",hl,[(n(!0),g(ne,null,re(Y.value,(l,S)=>{var Q;return n(),g("div",{class:ce(["item",{"item-active":c.value==S}]),key:S,onClick:v=>H(l,S)},[a(ue,{class:"avatar",src:l.avatar},null,8,["src"]),e("div",bl,[e("div",kl,[e("div",$l,[e("span",Vl,h(l.real_name||l.nickname),1),e("span",null,h(" (ID:"+l.id+")"),1)]),e("div",null,"手机号: "+h(l.mobile),1)]),e("div",wl,[e("div",null,[f("余额: "),e("span",Cl,h(l.now_money),1)]),e("div",null,[f("采购款: "),e("span",Sl,h(l.purchase_funds),1)]),e("div",null,[f("返还金: "),e("span",Ul,h((Q=l.return_money)==null?void 0:Q.toFixed(2)),1)]),e("div",null,[f("礼品券: "),e("span",xl,h(l.integral),1)]),e("div",null,[l.user_ship==0?(n(),O(ie,{key:0,type:"primary"},{default:t(()=>[f(h(l.user_ship_name),1)]),_:2},1024)):(n(),O(ie,{key:1,type:"success"},{default:t(()=>[f(h(l.user_ship_name),1)]),_:2},1024))])])])],10,gl)}),128)),j.value?(n(),g("div",zl,"没有更多了")):oe("",!0),R.value?(n(),g("div",Al,"加载中...")):oe("",!0)])),[[o,R.value],[m,B]]),a(te,{modelValue:V.value,"onUpdate:modelValue":u[10]||(u[10]=l=>V.value=l),title:"添加用户",width:"600"},{footer:t(()=>[e("div",Rl,[a(p,{onClick:u[9]||(u[9]=l=>V.value=!1)},{default:t(()=>[f("取消")]),_:1}),a(p,{type:"primary",onClick:z},{default:t(()=>[f(" 添加 ")]),_:1})])]),default:t(()=>[a(dl,{ref_key:"addRef",ref:w,onClose:P},null,512)]),_:1},8,["modelValue"])])}}},Ll=ke(Fl,[["__scopeId","data-v-df06e4b9"]]),_e=C=>(we("data-v-5ad4b8f5"),C=C(),Ce(),C),Ol=_e(()=>e("h4",null,"选择支付方式",-1)),Dl={class:"dra-body"},Il={class:"header"},Pl={style:{display:"inline-block"}},Nl=_e(()=>e("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),El={style:{color:"#f5222d","padding-bottom":"2rem"}},jl={style:{"font-size":"1.6rem"}},ql={key:0,"element-loading-text":"支付中",class:"card1"},Bl=_e(()=>e("div",{class:"tips"},null,-1)),Jl={key:1,class:"card2"},Tl={class:"drawer-body"},Kl={class:"counter"},Ml={class:"received"},Wl={key:0},Gl={key:1,style:{"font-size":"1rem",color:"#999"}},Hl={key:0,class:"balance"},Ql={class:"money"},Xl=_e(()=>e("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Yl={key:1,class:"balance"},Zl=_e(()=>e("div",null,"不够找零, 请支付更多金额",-1)),ea=_e(()=>e("div",{class:"tips"},"按下小键盘输入金额",-1)),la=[Zl,ea],aa={class:"keypad"},ta={class:"left"},sa={class:"right"},oa={style:{width:"100%",display:"flex","justify-content":"center"}},ia={__name:"payUser",emits:["paySuccess"],setup(C,{expose:r,emit:$}){const R=d(!1),F=d(1),c=d(""),j=d("");be();const Y=()=>{u()},B=()=>{pe(()=>{setTimeout(()=>{var m;x.value=!1,c.value="",N.value=!0,(m=j.value)==null||m.focus(),H(F.value)},300)})},H=m=>{m!=1&&j.value.blur(),F.value=m,console.log(F.value),F.value==2?window.addEventListener("keydown",ue):(window.removeEventListener("keydown",ue),pe(()=>{var l;c.value="",(l=j.value)==null||l.focus()}))},V=d({price:0,uid:"",user_ship:"",village:null,brigade:null}),w=d([]),z=d(!1),P=m=>{V.value=m.data,V.value.total=m.data.price,w.value=m.cart_id,z.value=m.isRePay||!1},q=m=>{V.value.total=m.price,E.value=m.order_id},k=$,N=d(!1),b=d(["1","2","3","4","5","6","7","8","9","0","00","."]),A=/^(10|11|12|13|14|15)\d{16}$/,ae=/^(25|26|27|28|29|30)\d{14,22}$/,E=d(""),Z=()=>{if(x.value=!0,j.value.blur(),z.value)U();else{let m;if(A.test(c.value))m="9";else if(ae.test(c.value))m="13";else return x.value=!1,c.value="",j.value.focus(),D.error("请输入正确的支付码");Ie({uid:V.value.uid,user_ship:V.value.user_ship,village:V.value.village,brigade:V.value.brigade,price:V.value.price,pay_type:m,auth_code:c.value}).then(l=>{l.data.out_trade_no&&l.msg=="支付成功"?(R.value=!1,D({message:"支付成功",type:"success"}),u(l.data)):l.msg=="用户支付中"&&l.code==1&&(D.warning(l.msg),K.on("pay_user_success",S=>{D({message:"支付成功",type:"success"}),setTimeout(()=>{K.off("pay_user_success")},200),R.value=!1,u(S)}))}).catch(l=>{x.value=!1,pe(()=>{var S;(S=j.value)==null||S.focus()})})}},U=()=>{let m=17;if(F.value==1)if(A.test(c.value))m="9";else if(ae.test(c.value))m="13";else return x.value=!1,c.value="",j.value.focus(),D.error("请输入正确的支付码");sl({order_id:V.value.order_id,pay_type:m,auth_code:c.value}).then(l=>{var S;(S=l.msg)!=null&&S.includes("成功")?(R.value=!1,D({message:"支付成功",type:"success"}),u({msg:"支付成功"})):l.msg=="用户支付中"&&l.code==1&&(D.warning(l.msg),K.on("pay_user_success",Q=>{D({message:"支付成功",type:"success"}),setTimeout(()=>{K.off("pay_user_success")},200),R.value=!1,u(Q)}))}).catch(l=>{c.value="",x.value=!1,pe(()=>{var S;(S=j.value)==null||S.focus()})})};d(0);const u=(m=null)=>{var l;window.removeEventListener("keydown",ue),N.value=!1,x.value=!1,c.value="",p.value="",_.value=[],(l=j.value)==null||l.blur(),typeof m=="function"&&(m=null),k("paySuccess",m),R.value=!1},x=d(!1);r({drawer:R,setForm:P,setRePay:q,beforeClose:u});const _=d([]),p=d(""),ee=He(()=>+p.value>0?(p.value-V.value.total).toFixed(2):-1),W=d(!1),le=m=>{m===-1?_.value=[]:_.value.pop(),p.value=_.value.length?_.value.join(""):0},J=m=>{W.value===!1&&(p.value="",W.value=!0);let l=String(p.value).indexOf(".")+1,S=String(p.value).length-l;console.log(l,S),(l===0||S<2)&&(_.value.join("")<=9999999&&_.value.push(m),p.value=_.value.join("")>99999999?99999999:_.value.join(""))},ve=()=>{if(ee.value===""||ee.value===null||ee.value===void 0||+p.value<+V.value.total)return D.error("收款金额应该大于等于应收金额");z.value?U():Ie({uid:V.value.uid,user_ship:V.value.user_ship,village:V.value.village,brigade:V.value.brigade,price:V.value.price,pay_type:17}).then(m=>{console.log("========"),R.value=!1,D({message:m.msg,type:"success"}),F.value=1,u({msg:"收款成功"})}).catch(m=>{x.value=!1})},ue=m=>{let S=(m||window.event).keyCode;if(S==37)return H(2);if(S==120)return K.emit("F9");if(S==27)return u();switch(m.stopPropagation(),m.preventDefault(),S){case 96:case 48:J(0);break;case 97:case 49:J(1);break;case 98:case 50:J(2);break;case 99:case 51:J(3);break;case 100:case 52:J(4);break;case 101:case 53:J(5);break;case 102:case 54:J(6);break;case 103:case 55:J(7);break;case 104:case 56:J(8);break;case 105:case 57:J(9);break;case 110:J(".");break;case 190:J(".");break;case 8:le();break;case 13:ve();break}},ie=d(!1),te=()=>{if(!(!R.value||ie.value&&c.value.length>0)&&F.value==2)return H(1)},o=()=>{if(!(!R.value||ie.value&&c.value.length>0)&&F.value==1)return H(2)};return $e(()=>{K.on("left",te),K.on("right",o)}),Ve(()=>{K.off("left",te),K.off("right",o)}),(m,l)=>{const S=y("el-input"),Q=y("el-button"),v=y("Delete"),s=y("el-icon"),G=y("el-drawer"),I=fe("loading");return n(),O(G,{size:"60rem",modelValue:R.value,"onUpdate:modelValue":l[6]||(l[6]=L=>R.value=L),direction:"rtl",onOpen:B,"before-close":u},{header:t(()=>[Ol]),default:t(()=>{var L;return[e("div",Dl,[e("div",Il,[e("div",{class:ce(["left",{active:F.value==1}]),onClick:l[0]||(l[0]=X=>H(1))}," 微信/支付宝 ",2),e("div",{class:ce(["right",{active:F.value==2}]),onClick:l[1]||(l[1]=X=>H(2))}," 现金收款 ",2)]),e("div",null,[e("div",Pl,[Nl,e("div",El,[f(" ¥"),e("span",jl,h((L=V.value)==null?void 0:L.price),1)])])]),F.value==1?ge((n(),g("div",ql,[a(S,{ref_key:"codeRef",ref:j,modelValue:c.value,"onUpdate:modelValue":l[2]||(l[2]=X=>c.value=X),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Ne(Z,["enter"]),onFocus:l[3]||(l[3]=X=>ie.value=!0),onBlur:l[4]||(l[4]=X=>ie.value=!1)},null,8,["modelValue"]),Bl])),[[I,x.value]]):(n(),g("div",Jl,[e("div",Tl,[e("div",Kl,[e("div",Ml,[p.value?(n(),g("span",Wl,h(p.value),1)):(n(),g("span",Gl,"按下键盘输入客户支付金额"))]),ee.value>=0?(n(),g("div",Hl,[e("div",null,[f(" 需找零(元):"),e("span",Ql,"¥"+h(ee.value),1)]),Xl])):(n(),g("div",Yl,la)),e("div",aa,[e("div",ta,[(n(!0),g(ne,null,re(b.value,X=>(n(),O(Q,{key:X,onClick:T=>J(X)},{default:t(()=>[f(h(X),1)]),_:2},1032,["onClick"]))),128))]),e("div",sa,[a(Q,{onClick:le},{default:t(()=>[a(s,null,{default:t(()=>[a(v)]),_:1})]),_:1}),a(Q,{onClick:l[5]||(l[5]=X=>le(-1))},{default:t(()=>[f("C")]),_:1}),a(Q,{class:ce(["enter",{"enter-disable":+p.value<+V.value.total}]),disabled:+p.value<+V.value.total,onClick:ve},{default:t(()=>[f(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]}),footer:t(()=>[e("div",oa,[a(Q,{class:"cancel-btn",onClick:Y},{default:t(()=>[f("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},na=ke(ia,[["__scopeId","data-v-5ad4b8f5"]]),M=C=>(we("data-v-d356fe09"),C=C(),Ce(),C),ua={class:"my-order"},da={class:"header-nav"},ra=["onClick"],ca={key:0,class:"detail"},va={class:"table"},_a=M(()=>e("div",{class:"table-title"},"用户信息",-1)),ma={class:"table-info"},pa={class:"info-item"},fa=M(()=>e("div",{class:"info-item-title"},"用户余额:",-1)),ya={class:"info-item-info red"},ha={class:"info-item"},ga=M(()=>e("div",{class:"info-item-title"},"采购款:",-1)),ba={class:"info-item-info red"},ka={class:"info-item"},$a=M(()=>e("div",{class:"info-item-title"},"返还金:",-1)),Va={class:"info-item-info red"},wa={class:"info-item"},Ca=M(()=>e("div",{class:"info-item-title"},"头像:",-1)),Sa={class:"info-item-info"},Ua={class:"info-item"},xa=M(()=>e("div",{class:"info-item-title"},"礼品券:",-1)),za={class:"info-item-info red"},Aa={class:"info-item"},Ra=M(()=>e("div",{class:"info-item-title"},"冻结礼品券:",-1)),Fa={class:"info-item-info red"},La={class:"info-item"},Oa=M(()=>e("div",{class:"info-item-title"},"ID:",-1)),Da={class:"info-item-info"},Ia={class:"info-item"},Pa=M(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Na={class:"info-item-info"},Ea={class:"info-item"},ja=M(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),qa={class:"info-item-info"},Ba={class:"info-item"},Ja=M(()=>e("div",{class:"info-item-title"},"用户账号:",-1)),Ta={class:"info-item-info"},Ka={class:"info-item"},Ma=M(()=>e("div",{class:"info-item-title"},"真实姓名:",-1)),Wa={class:"info-item-info"},Ga={class:"info-item"},Ha=M(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qa={class:"info-item-info"},Xa={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Ya=M(()=>e("div",{class:"info-item-title"},"用户类型:",-1)),Za={class:"info-item-info"},et={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},lt=M(()=>e("div",{class:"info-item-title"},"用户地址:",-1)),at={key:1,class:"detail"},tt={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},st={style:{display:"flex","align-items":"center"}},ot={style:{"margin-left":"0.5rem"}},it={key:0,style:{display:"flex","align-items":"center"}},nt={class:"footer"},ut={key:0},dt={key:1},rt={key:2},ct={class:"dialog-footer"},vt={key:0},_t={class:"ship-money-list"},mt=["onClick"],pt={class:"item1"},ft={class:"item2"},yt={class:"dialog-footer"},ht={__name:"detail",setup(C){be(),Qe();const r=d({id:""});d({price:"",type:1});const $=d(null),R=(v=null)=>{ie()},F=d(!1),c=d([]);(()=>{Ee({type_id:4}).then(v=>{c.value=v.data.lists})})();const Y=()=>{el({id:r.value.id,user_ship:r.value.user_ship}).then(v=>{var s;D.success("修改成功"),r.value.user_ship_name=(s=c.value.find(G=>G.id==r.value.user_ship))==null?void 0:s.title,F.value=!1})},B=()=>{F.value=!1},H=d([]);(()=>{ll().then(v=>{H.value=v.data,console.log(v)})})();const w=d({id:"",province:"",city:"",area:"",street:"",brigade:""}),z=d([]),P=d([]),q=()=>{al({uid:r.value.id}).then(v=>{var s;(s=v.data)!=null&&s.village?(z.value=[v.data.city,v.data.area,v.data.street,v.data.village,+v.data.brigade],P.value=JSON.parse(JSON.stringify(z.value)),w.value=v.data):(z.value=[],P.value=[],w.value={id:"",province:"",city:"",area:"",street:"",brigade:""})}).catch(v=>{z.value=[],P.value=[],w.value={id:"",province:"",city:"",area:"",street:"",brigade:""}})},k=d([]),N=async(v,s)=>{const G=v.level;let I;if(G!==0&&!v.data.code)return s([]);G===0?(I=await Se({province_code:51e4}),I=I.data.map(L=>({code:L.city_code,name:L.city_name}))):G===1?(I=await Ue({city_code:v.data.code}),I=I.data.map(L=>({code:L.area_code,name:L.area_name}))):G===2?(I=await xe({area_code:v.data.code}),I=I.data.map(L=>({code:L.street_code,name:L.street_name}))):G===3?(I=await ze({street_code:v.data.code}),I=I.data.map(L=>({code:L.village_code,name:L.village_name}))):G===4&&(I=await Ae({village_code:v.data.code}),I=I.data.map(L=>({code:L.id,name:L.brigade_name,leaf:!0}))),s(I)},b={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:N},A=async()=>{w.value.city=z.value[0],w.value.area=z.value[1],w.value.street=z.value[2],w.value.village=z.value[3],w.value.brigade=z.value[4],w.value.phone||(w.value.phone=r.value.account),w.value.real_name||(w.value.real_name=r.value.real_name||r.value.nickname),tl({...w.value,uid:r.value.id}).then(v=>{P.value=JSON.parse(JSON.stringify(z.value)),D.success("编辑成功"),E.value=!0}).catch(v=>{ae()})},ae=()=>{z.value=JSON.parse(JSON.stringify(P.value)),P.value.length>0&&(w.value.city=P.value[0],w.value.area=P.value[1],w.value.street=P.value[2],w.value.village=P.value[3],w.value.brigade=P.value[4]),E.value=!0},E=d(!0),Z=d(0),U=d(["基本信息","用户资产"]),u=d(!1),x=d([]),_=d({page_no:1,page_size:10,loading:!1,loadend:!1});let p=[];const ee=(v=!1)=>{v&&(x.value=[],_.value.page_no=1,_.value.loadend=!1),!(_.value.loadend||_.value.loading)&&(_.value.loading=!0,ol({uid:r.value.id,page_no:_.value.page_no,page_size:_.value.page_size}).then(s=>{x.value=[...x.value,...s.data.lists],_.value.loading=!1,_.value.page_no++,s.data.lists.length<_.value.page_size&&(_.value.loadend=!0)}))},W=d({mobile:"",code:""}),le=d(!1),J=()=>{if(W.value.mobile=r.value.phone,W.value.code="",p=x.value.filter(v=>v.n_num).map(v=>({product_id:v.product_id,nums:v.n_num})),p.length==0)return D.error("请选择商品");le.value=!0},ve=()=>{console.log("发送短信验证码"),D.success("验证码已发送")},ue=()=>{if(W.value.code=="")return D.error("请输入验证码");il({uid:r.value.id,info:p}).then(v=>{u.value=!1,D.success("出库成功"),le.value=!1,ee(!0)})},ie=()=>{Pe({id:r.value.id}).then(({data:v})=>{v.phone=v.mobile+"",delete v.mobile,r.value=Object.assign(r.value,v)})},te=d(!1),o=d({user_ship:"",user_ship_name:"",limit:"",money:"",type:""}),m=()=>{o.value.money=Number(o.value.money).toFixed(2),(+o.value.money<+o.value.limit||+o.value.money>1e4)&&(+o.value.limit>0?o.value.money=o.value.limit:o.value.money="")},l=v=>{if(o.value.type=="add"){let s=c.value.find(G=>G.id==v);s&&(o.value.limit=s.limit,o.value.user_ship_name=s.title,o.value.money=s.limit)}},S=()=>{if(o.value.user_ship===""||o.value.user_ship===null||o.value.user_ship===void 0||o.value.user_ship===0)return D.error("请选择会员类型");if(o.value.money==0||o.value.money=="")return D.error(o.value.type=="add"?"请输入充值金额":"请选择金额");if(o.value.type=="add"&&(+o.value.money<+o.value.limit||+o.value.money>1e4))return+o.value.limit>0?o.value.money=o.value.limit:o.value.money="",D.error(`该类型至少需要充值${o.value.limit}元`);$.value.setForm({data:{uid:r.value.id,price:o.value.money,user_ship:o.value.user_ship,village:w.value.village,brigade:w.value.brigade}}),$.value.drawer=!0,pe(()=>{te.value=!1})},Q=v=>{if(P.value.length==0)return D.error("请先选择用户地址");o.value.type=v,v=="add"&&(o.value.user_ship=r.value.user_ship,o.value.user_ship_name=r.value.user_ship_name,l(o.value.user_ship)),te.value=!0};return $e(()=>{K.on("set-user-detail",v=>{r.value=v,u.value=!1,Pe({id:r.value.id}).then(({data:s})=>{s.phone=s.mobile+"",delete s.mobile,r.value=Object.assign(v,s)}),z.value=[],P.value=[],q(),ee(!0),o.value={user_ship:"",user_ship_name:"",limit:"",money:"",type:""}})}),Ve(()=>{K.off("set-user-detail")}),(v,s)=>{var Oe;const G=y("el-avatar"),I=y("el-tag"),L=y("el-option"),X=y("el-select"),T=y("el-button"),qe=y("el-cascader"),Be=y("el-image"),he=y("el-table-column"),Je=y("el-input-number"),Te=y("el-table"),Ke=y("el-empty"),me=y("el-input"),de=y("el-form-item"),Fe=y("el-form"),Le=y("el-dialog"),Me=fe("infinite-scroll"),We=fe("loading");return n(),g("div",ua,[e("div",da,[(n(!0),g(ne,null,re(U.value,(i,se)=>(n(),g("div",{key:se,class:ce(["nav-item",{"nav-item-active":Z.value==se,"nav-item-radius1":Z.value==se+1,"nav-item-radius2":Z.value==se-1}]),onClick:Ge=>Z.value=se},h(i),11,ra))),128)),e("div",{class:ce(["nav-item",{"nav-item-radius2":Z.value==U.value.length-1}]),style:{flex:"1"}},null,2)]),r.value.id&&Z.value==0?(n(),g("div",ca,[e("div",va,[_a,e("div",ma,[e("div",pa,[fa,e("div",ya,"¥"+h(r.value.now_money),1)]),e("div",ha,[ga,e("div",ba,"¥"+h(r.value.purchase_funds),1)]),e("div",ka,[$a,e("div",Va,"¥"+h((Oe=r.value.return_money)==null?void 0:Oe.toFixed(2)),1)]),e("div",wa,[Ca,e("div",Sa,[a(G,{style:{width:"4rem",height:"4rem"},src:r.value.avatar},null,8,["src"])])]),e("div",Ua,[xa,e("div",za,"¥"+h(r.value.integral),1)]),e("div",Aa,[Ra,e("div",Fa,"¥"+h(r.value.get_frozen),1)]),e("div",La,[Oa,e("div",Da,h(r.value.id),1)]),e("div",Ia,[Pa,e("div",Na,h(r.value.nickname),1)]),e("div",Ea,[ja,e("div",qa,h(r.value.phone),1)]),e("div",Ba,[Ja,e("div",Ta,h(r.value.account),1)]),e("div",Ka,[Ma,e("div",Wa,h(r.value.real_name),1)]),e("div",Ga,[Ha,e("div",Qa,h(r.value.create_time),1)]),e("div",Xa,[Ya,e("div",Za,[F.value==!1?(n(),g(ne,{key:0},[r.value.user_ship==0?(n(),O(I,{key:0,type:"primary",size:"large"},{default:t(()=>[f(h(r.value.user_ship_name),1)]),_:1})):(n(),O(I,{key:1,type:"success",size:"large"},{default:t(()=>[f(h(r.value.user_ship_name),1)]),_:1}))],64)):(n(),g(ne,{key:1},[a(X,{modelValue:r.value.user_ship,"onUpdate:modelValue":s[0]||(s[0]=i=>r.value.user_ship=i),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:t(()=>[(n(!0),g(ne,null,re(c.value,i=>(n(),O(L,{key:i.id,label:i.title,value:i.id,disabled:i.id!=0&&i.id!=4},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"]),a(T,{type:"primary",style:{"margin-left":"1rem"},onClick:Y},{default:t(()=>[f("确认")]),_:1}),a(T,{style:{"margin-left":"1rem"},onClick:B},{default:t(()=>[f("取消")]),_:1})],64))])]),e("div",et,[lt,(n(),O(qe,{key:r.value.id,style:{flex:"1"},modelValue:z.value,"onUpdate:modelValue":s[1]||(s[1]=i=>z.value=i),options:k.value,props:b,load:N,class:"w-full",disabled:E.value},null,8,["modelValue","options","disabled"])),E.value&&!P.value.length?(n(),O(T,{key:0,type:"primary",style:{"margin-left":"1rem"},onClick:s[2]||(s[2]=i=>E.value=!1)},{default:t(()=>[f("修改")]),_:1})):oe("",!0),E.value?oe("",!0):(n(),O(T,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:A},{default:t(()=>[f("确认")]),_:1})),E.value?oe("",!0):(n(),O(T,{key:2,style:{"margin-left":"1rem"},onClick:ae},{default:t(()=>[f("取消")]),_:1}))]),r.value.user_ship!=0?(n(),O(T,{key:0,type:"success",class:"big-btn",size:"large",onClick:s[3]||(s[3]=i=>Q("add"))},{default:t(()=>[f("增加经营资金")]),_:1})):(n(),O(T,{key:1,type:"primary",class:"big-btn",size:"large",onClick:s[4]||(s[4]=i=>Q("recharge"))},{default:t(()=>[f("成为会员")]),_:1}))])])])):oe("",!0),r.value.id&&Z.value==1?ge((n(),g("div",at,[ge((n(),g("div",tt,[a(Te,{data:x.value},{default:t(()=>[a(he,{label:"商品信息"},{default:t(({row:i})=>[e("div",st,[a(Be,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:i.image},null,8,["src"]),e("span",ot,h(i.store_name),1)])]),_:1}),a(he,{prop:"price",label:"单价",width:u.value?130:200},null,8,["width"]),a(he,{prop:"nums",label:"存量",width:u.value?100:200},null,8,["width"]),u.value?(n(),O(he,{key:0,prop:"nums",label:"出库量",width:"250"},{default:t(({row:i})=>[i.nums?(n(),g("div",it,[a(Je,{modelValue:i.n_num,"onUpdate:modelValue":se=>i.n_num=se,"step-strictly":"",min:0,max:i.nums},null,8,["modelValue","onUpdate:modelValue","max"]),a(T,{type:"primary",style:{"margin-left":"1rem"},onClick:se=>i.n_num=i.nums},{default:t(()=>[f("全部")]),_:2},1032,["onClick"])])):oe("",!0)]),_:1})):oe("",!0)]),_:1},8,["data"])])),[[Me,ee]]),e("div",nt,[u.value?(n(),g("div",dt,[a(T,{type:"primary",size:"large",onClick:J},{default:t(()=>[f("确认出库")]),_:1}),a(T,{size:"large",onClick:s[6]||(s[6]=i=>u.value=!1)},{default:t(()=>[f("取消")]),_:1})])):(n(),g("div",ut,[a(T,{type:"warning",size:"large",onClick:s[5]||(s[5]=i=>u.value=!0),disabled:x.value.length==0},{default:t(()=>[f("商品出库")]),_:1},8,["disabled"])]))])])),[[We,_.value.loading]]):(n(),g("div",rt,[a(Ke)])),a(na,{ref_key:"payRef",ref:$,onPaySuccess:R},null,512),a(Le,{modelValue:le.value,"onUpdate:modelValue":s[10]||(s[10]=i=>le.value=i),title:"出库验证",width:"500"},{footer:t(()=>[e("div",ct,[a(T,{onClick:s[9]||(s[9]=i=>le.value=!1)},{default:t(()=>[f("取消")]),_:1}),a(T,{type:"primary",onClick:ue},{default:t(()=>[f(" 确认 ")]),_:1})])]),default:t(()=>[a(Fe,{model:W.value},{default:t(()=>[a(de,{label:"手机号:"},{default:t(()=>[a(me,{modelValue:W.value.mobile,"onUpdate:modelValue":s[7]||(s[7]=i=>W.value.mobile=i),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1}),a(de,{label:"验证码:"},{default:t(()=>[a(me,{modelValue:W.value.code,"onUpdate:modelValue":s[8]||(s[8]=i=>W.value.code=i),autocomplete:"off",placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),(n(),O(je,{style:{"margin-left":"1rem"},onSendCode:ve,key:W.value.mobile}))]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),a(Le,{modelValue:te.value,"onUpdate:modelValue":s[17]||(s[17]=i=>te.value=i),title:o.value.type=="add"?"增加经营资金":"成为会员",width:"500"},{footer:t(()=>[e("div",yt,[a(T,{onClick:s[16]||(s[16]=i=>te.value=!1)},{default:t(()=>[f("取消")]),_:1}),a(T,{type:"primary",onClick:S},{default:t(()=>[f(" 确认 ")]),_:1})])]),default:t(()=>[a(Fe,{model:o.value,"label-width":"100px"},{default:t(()=>[a(de,{label:"手机号:"},{default:t(()=>[a(me,{modelValue:r.value.phone,"onUpdate:modelValue":s[11]||(s[11]=i=>r.value.phone=i),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1}),o.value.type=="add"?(n(),O(de,{key:0,label:"会员类型:"},{default:t(()=>[a(me,{modelValue:o.value.user_ship_name,"onUpdate:modelValue":s[12]||(s[12]=i=>o.value.user_ship_name=i),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1})):(n(),O(de,{key:1,label:"会员类型:",required:""},{default:t(()=>[a(X,{modelValue:o.value.user_ship,"onUpdate:modelValue":s[13]||(s[13]=i=>o.value.user_ship=i),placeholder:"请选择用户类型",style:{flex:"1"},onChange:l},{default:t(()=>[(n(!0),g(ne,null,re(c.value,i=>(n(),O(L,{key:i.id,label:i.title,value:i.id,disabled:i.id==0},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})),o.value.type=="add"?(n(),O(de,{key:2,label:"充值金额:",required:""},{default:t(()=>[a(me,{modelValue:o.value.money,"onUpdate:modelValue":s[14]||(s[14]=i=>o.value.money=i),type:"number",onBlur:m,onFocus:s[15]||(s[15]=i=>o.value.money=""),autocomplete:"off"},{prepend:t(()=>[f("¥")]),append:t(()=>[f("元")]),_:1},8,["modelValue"]),o.value.limit?(n(),g("div",vt,h(`${o.value.user_ship_name}角色至少要充值${o.value.limit}元, 最大不超过10000元`),1)):oe("",!0)]),_:1})):(n(),O(de,{key:3,label:"充值金额:",required:""},{default:t(()=>[e("div",_t,[(n(!0),g(ne,null,re(H.value,(i,se)=>(n(),g("div",{class:ce(["ship-money-item",{"ship-money-item-active":i.money==o.value.money}]),onClick:Ge=>o.value.money=i.money,key:se},[e("div",pt,h(i.money)+h(i.money_string),1),e("div",ft,"送"+h(i.send)+h(i.send_string),1)],10,mt))),128))])]),_:1}))]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])}}},gt=ke(ht,[["__scopeId","data-v-d356fe09"]]),bt={class:"my-card"},xt={__name:"index",setup(C){return(r,$)=>(n(),g("div",bt,[a(Ll,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),a(nl),a(gt,{ref:"detailRef"},null,512)]))}};export{xt as default}; +import{u as be,r as d,G as De,b as y,c as n,k as g,f as a,w as t,E as D,_ as ke,o as $e,m as K,a as Ve,h as fe,e,g as f,F as ne,l as re,d as O,p as oe,i as Ne,j as ge,z as ce,t as h,q as we,s as Ce,J as He,n as pe,I as Qe}from"./index-El3JpHtp.js";import{a as Xe,b as Ye,u as Ze,c as Ee,d as Ie,e as Pe,f as el,g as ll,h as al,i as tl}from"./user-BasTd-eJ.js";import"./moment-Cl4UOzQZ.js";import{r as ye}from"./axiosAPI-m7QjxXd9.js";import{_ as je}from"./authCode-p4DlY4hZ.js";import{h as sl,l as ol,m as il}from"./store-D17PfqyZ.js";import{p as nl}from"./padding-Cx5iHgRh.js";function Se(C){return ye.get("/city",{params:C})}function Ue(C){return ye.get("/area",{params:C})}function xe(C){return ye.get("/street",{params:C})}function ze(C){return ye.get("/village",{params:C})}function Ae(C){return ye.get("/brigade",{params:C})}const ul={class:"add-user"},dl={__name:"add",emits:["close"],setup(C,{expose:r,emit:$}){const R=be(),F=d(null),c=De({mobile:"",code:"",real_name:"",user_ship:0,selectedValues:[]}),j=De({mobile:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}],real_name:[{required:!0,message:"请输入用户姓名",trigger:"blur"}],user_ship:[{required:!0,message:"请选择用户类型",trigger:"change"}],selectedValues:[{required:!0,message:"请选择用户地址",trigger:"change"}]}),Y=d([]),B=async(q,k)=>{const N=q.level;let b;if(N!==0&&!q.data.code)return k([]);N===0?(b=await Se({province_code:51e4}),b=b.data.map(A=>({code:A.city_code,name:A.city_name}))):N===1?(b=await Ue({city_code:q.data.code}),b=b.data.map(A=>({code:A.area_code,name:A.area_name}))):N===2?(b=await xe({area_code:q.data.code}),b=b.data.map(A=>({code:A.street_code,name:A.street_name}))):N===3?(b=await ze({street_code:q.data.code}),b=b.data.map(A=>({code:A.village_code,name:A.village_name}))):N===4&&(b=await Ae({village_code:q.data.code}),b=b.data.map(A=>({code:A.id,name:A.brigade_name,leaf:!0}))),k(b)},H={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:B};d([]);const V=$,w=()=>{F.value.validate(async q=>{if(q){let k={};k.mobile=c.mobile,k.code=c.code,k.user_ship=c.user_ship,k.real_name=c.real_name,k.province="510000",k.city=c.selectedValues[0],k.area=c.selectedValues[1],k.street=c.selectedValues[2],k.village=c.selectedValues[3],k.brigade=c.selectedValues[4],k.store_id=R.userInfo.store_id,Xe(k).then(N=>{c.mobile="",c.code="",c.user_ship=0,c.real_name="",c.selectedValues=[],F.value.resetFields(),V("close")})}})},z=d(null),P=()=>{F.value.validateField("mobile",q=>{q&&Ye({mobile:c.mobile}).then(k=>{D.success("发送成功"),z.value.startCountDown()}).catch(k=>{D.error("发送失败")})})};return r({addUser:w}),(q,k)=>{const N=y("el-input"),b=y("el-form-item"),A=y("el-cascader"),ae=y("el-form");return n(),g("div",ul,[a(ae,{model:c,rules:j,ref_key:"formDataRef",ref:F,"label-width":"80px"},{default:t(()=>[a(b,{label:"用户电话",prop:"mobile"},{default:t(()=>[a(N,{modelValue:c.mobile,"onUpdate:modelValue":k[0]||(k[0]=E=>c.mobile=E),placeholder:"请输入用户电话"},null,8,["modelValue"])]),_:1}),a(b,{label:"验证码",prop:"code"},{default:t(()=>[a(N,{modelValue:c.code,"onUpdate:modelValue":k[1]||(k[1]=E=>c.code=E),placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),a(je,{ref_key:"authCodeRef",ref:z,style:{"margin-left":"1rem"},onSendCode:P,start:!1},null,512)]),_:1}),a(b,{label:"用户姓名",prop:"real_name"},{default:t(()=>[a(N,{modelValue:c.real_name,"onUpdate:modelValue":k[2]||(k[2]=E=>c.real_name=E),placeholder:"请输入用户姓名"},null,8,["modelValue"])]),_:1}),a(b,{label:"用户地址",prop:"selectedValues"},{default:t(()=>[a(A,{style:{width:"100%"},modelValue:c.selectedValues,"onUpdate:modelValue":k[3]||(k[3]=E=>c.selectedValues=E),options:Y.value,props:H,load:B,class:"w-full"},null,8,["modelValue","options"])]),_:1})]),_:1},8,["model","rules"])])}}},Re=C=>(we("data-v-df06e4b9"),C=C(),Ce(),C),rl={class:"my-order"},cl={class:"header-nav"},vl=Re(()=>e("div",{class:"nav-item"},h("用户列表"),-1)),_l={class:"header-row"},ml=Re(()=>e("div",{class:"label"},"用户类型",-1)),pl={class:"header-row"},fl=Re(()=>e("div",{class:"label"},"用户地区",-1)),yl={class:"header-input"},hl={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},gl=["onClick"],bl={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},kl={class:"top flex"},$l={class:"r-1"},Vl={class:"bold"},wl={class:"bottom flex",style:{"justify-content":"space-between"}},Cl={class:"red"},Sl={class:"red"},Ul={class:"red"},xl={class:"red"},zl={key:0,class:"load-end"},Al={key:1,class:"load-end"},Rl={class:"dialog-footer"},Fl={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(C){const r=be();d([]);const $=d({page_no:1,page_size:20,mobile:"",user_ship:"",street:null}),R=d(!1),F=d(0),c=d(0),j=d(!1),Y=d([]),B=(U=!1)=>{if(U)$.value.page_no=1;else if(j.value||R.value)return;R.value=!0,$.value.mobile==""&&$.value.user_ship==""?$.value.store_id=r.userInfo.store_id:$.value.store_id=null,Ze($.value).then(u=>{U?Y.value=u.data.lists:Y.value=[...Y.value,...u.data.lists],$.value.page_no==1&&Y.value.length>0&&K.emit("set-user-detail",Y.value[0]),u.data.lists.length<$.value.page_size?j.value=!0:$.value.page_no++,c.value=0,F.value=u.data.count,R.value=!1}).catch(u=>{j.value=!0,R.value=!1})},H=(U,u)=>{c.value=u,K.emit("set-user-detail",U)},V=d(!1),w=d(null),z=()=>{var U;(U=w.value)==null||U.addUser()},P=()=>{V.value=!1,B(!0)},q=d([]);(()=>{Ee({type_id:4}).then(U=>{q.value=U.data.lists})})();const N=()=>{$.value.mobile="",$.value.user_ship="",$.value.street=null,b.value=[],B(!0)},b=d([]),A=d([]),ae=async(U,u)=>{const x=U.level;let _;if(x!==0&&!U.data.code)return u([]);x===0?(_=await Se({province_code:51e4}),_=_.data.map(p=>({code:p.city_code,name:p.city_name}))):x===1?(_=await Ue({city_code:U.data.code}),_=_.data.map(p=>({code:p.area_code,name:p.area_name}))):x===2?(_=await xe({area_code:U.data.code}),_=_.data.map(p=>({code:p.street_code,name:p.street_name,leaf:!0}))):x===3?(_=await ze({street_code:U.data.code}),_=_.data.map(p=>({code:p.village_code,name:p.village_name}))):x===4&&(_=await Ae({village_code:U.data.code}),_=_.data.map(p=>({code:p.id,name:p.brigade_name,leaf:!0}))),u(_)},E={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:ae},Z=()=>{b.value.length?$.value.street=b.value[b.value.length-1]:$.value.street="",B(!0)};return $e(()=>{K.on("re-load-user-list",U=>{U&&B(!0)})}),Ve(()=>{K.off("re-load-user-list")}),(U,u)=>{const x=y("Plus"),_=y("el-icon"),p=y("el-button"),ee=y("el-option"),W=y("el-select"),le=y("el-cascader"),J=y("CircleClose"),ve=y("el-input"),ue=y("el-avatar"),ie=y("el-tag"),te=y("el-dialog"),o=fe("loading"),m=fe("infinite-scroll");return n(),g("div",rl,[e("div",cl,[vl,a(p,{type:"primary",onClick:u[0]||(u[0]=l=>V.value=!0)},{default:t(()=>[a(_,null,{default:t(()=>[a(x)]),_:1}),f(" 添加用户")]),_:1})]),e("div",_l,[ml,a(W,{modelValue:$.value.user_ship,"onUpdate:modelValue":u[1]||(u[1]=l=>$.value.user_ship=l),onChange:u[2]||(u[2]=l=>B(!0)),placeholder:"请选择用户类型",style:{flex:"1"}},{default:t(()=>[(n(!0),g(ne,null,re(q.value,l=>(n(),O(ee,{key:l.id,label:l.title,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a(p,{onClick:N,style:{"margin-left":"1rem"}},{default:t(()=>[f("重置")]),_:1})]),e("div",pl,[fl,a(le,{style:{flex:"1"},options:A.value,modelValue:b.value,"onUpdate:modelValue":u[3]||(u[3]=l=>b.value=l),props:E,load:ae,class:"w-full",onChange:Z},null,8,["options","modelValue"])]),e("div",yl,[a(ve,{modelValue:$.value.mobile,"onUpdate:modelValue":u[6]||(u[6]=l=>$.value.mobile=l),placeholder:"搜索手机号",onKeydown:u[7]||(u[7]=Ne(l=>B(!0),["enter"])),onClear:u[8]||(u[8]=l=>B(!0))},{suffix:t(()=>[$.value.mobile!=""?(n(),O(_,{key:0,size:"18",onClick:u[4]||(u[4]=l=>{$.value.mobile="",B(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:t(()=>[a(J)]),_:1})):oe("",!0)]),append:t(()=>[a(p,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:u[5]||(u[5]=l=>B(!0))},{default:t(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),ge((n(),g("div",hl,[(n(!0),g(ne,null,re(Y.value,(l,S)=>{var Q;return n(),g("div",{class:ce(["item",{"item-active":c.value==S}]),key:S,onClick:v=>H(l,S)},[a(ue,{class:"avatar",src:l.avatar},null,8,["src"]),e("div",bl,[e("div",kl,[e("div",$l,[e("span",Vl,h(l.real_name||l.nickname),1),e("span",null,h(" (ID:"+l.id+")"),1)]),e("div",null,"手机号: "+h(l.mobile),1)]),e("div",wl,[e("div",null,[f("余额: "),e("span",Cl,h(l.now_money),1)]),e("div",null,[f("采购款: "),e("span",Sl,h(l.purchase_funds),1)]),e("div",null,[f("返还金: "),e("span",Ul,h((Q=l.return_money)==null?void 0:Q.toFixed(2)),1)]),e("div",null,[f("礼品券: "),e("span",xl,h(l.integral),1)]),e("div",null,[l.user_ship==0?(n(),O(ie,{key:0,type:"primary"},{default:t(()=>[f(h(l.user_ship_name),1)]),_:2},1024)):(n(),O(ie,{key:1,type:"success"},{default:t(()=>[f(h(l.user_ship_name),1)]),_:2},1024))])])])],10,gl)}),128)),j.value?(n(),g("div",zl,"没有更多了")):oe("",!0),R.value?(n(),g("div",Al,"加载中...")):oe("",!0)])),[[o,R.value],[m,B]]),a(te,{modelValue:V.value,"onUpdate:modelValue":u[10]||(u[10]=l=>V.value=l),title:"添加用户",width:"600"},{footer:t(()=>[e("div",Rl,[a(p,{onClick:u[9]||(u[9]=l=>V.value=!1)},{default:t(()=>[f("取消")]),_:1}),a(p,{type:"primary",onClick:z},{default:t(()=>[f(" 添加 ")]),_:1})])]),default:t(()=>[a(dl,{ref_key:"addRef",ref:w,onClose:P},null,512)]),_:1},8,["modelValue"])])}}},Ll=ke(Fl,[["__scopeId","data-v-df06e4b9"]]),_e=C=>(we("data-v-5ad4b8f5"),C=C(),Ce(),C),Ol=_e(()=>e("h4",null,"选择支付方式",-1)),Dl={class:"dra-body"},Il={class:"header"},Pl={style:{display:"inline-block"}},Nl=_e(()=>e("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),El={style:{color:"#f5222d","padding-bottom":"2rem"}},jl={style:{"font-size":"1.6rem"}},ql={key:0,"element-loading-text":"支付中",class:"card1"},Bl=_e(()=>e("div",{class:"tips"},null,-1)),Jl={key:1,class:"card2"},Tl={class:"drawer-body"},Kl={class:"counter"},Ml={class:"received"},Wl={key:0},Gl={key:1,style:{"font-size":"1rem",color:"#999"}},Hl={key:0,class:"balance"},Ql={class:"money"},Xl=_e(()=>e("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Yl={key:1,class:"balance"},Zl=_e(()=>e("div",null,"不够找零, 请支付更多金额",-1)),ea=_e(()=>e("div",{class:"tips"},"按下小键盘输入金额",-1)),la=[Zl,ea],aa={class:"keypad"},ta={class:"left"},sa={class:"right"},oa={style:{width:"100%",display:"flex","justify-content":"center"}},ia={__name:"payUser",emits:["paySuccess"],setup(C,{expose:r,emit:$}){const R=d(!1),F=d(1),c=d(""),j=d("");be();const Y=()=>{u()},B=()=>{pe(()=>{setTimeout(()=>{var m;x.value=!1,c.value="",N.value=!0,(m=j.value)==null||m.focus(),H(F.value)},300)})},H=m=>{m!=1&&j.value.blur(),F.value=m,console.log(F.value),F.value==2?window.addEventListener("keydown",ue):(window.removeEventListener("keydown",ue),pe(()=>{var l;c.value="",(l=j.value)==null||l.focus()}))},V=d({price:0,uid:"",user_ship:"",village:null,brigade:null}),w=d([]),z=d(!1),P=m=>{V.value=m.data,V.value.total=m.data.price,w.value=m.cart_id,z.value=m.isRePay||!1},q=m=>{V.value.total=m.price,E.value=m.order_id},k=$,N=d(!1),b=d(["1","2","3","4","5","6","7","8","9","0","00","."]),A=/^(10|11|12|13|14|15)\d{16}$/,ae=/^(25|26|27|28|29|30)\d{14,22}$/,E=d(""),Z=()=>{if(x.value=!0,j.value.blur(),z.value)U();else{let m;if(A.test(c.value))m="9";else if(ae.test(c.value))m="13";else return x.value=!1,c.value="",j.value.focus(),D.error("请输入正确的支付码");Ie({uid:V.value.uid,user_ship:V.value.user_ship,village:V.value.village,brigade:V.value.brigade,price:V.value.price,pay_type:m,auth_code:c.value}).then(l=>{l.data.out_trade_no&&l.msg=="支付成功"?(R.value=!1,D({message:"支付成功",type:"success"}),u(l.data)):l.msg=="用户支付中"&&l.code==1&&(D.warning(l.msg),K.on("pay_user_success",S=>{D({message:"支付成功",type:"success"}),setTimeout(()=>{K.off("pay_user_success")},200),R.value=!1,u(S)}))}).catch(l=>{x.value=!1,pe(()=>{var S;(S=j.value)==null||S.focus()})})}},U=()=>{let m=17;if(F.value==1)if(A.test(c.value))m="9";else if(ae.test(c.value))m="13";else return x.value=!1,c.value="",j.value.focus(),D.error("请输入正确的支付码");sl({order_id:V.value.order_id,pay_type:m,auth_code:c.value}).then(l=>{var S;(S=l.msg)!=null&&S.includes("成功")?(R.value=!1,D({message:"支付成功",type:"success"}),u({msg:"支付成功"})):l.msg=="用户支付中"&&l.code==1&&(D.warning(l.msg),K.on("pay_user_success",Q=>{D({message:"支付成功",type:"success"}),setTimeout(()=>{K.off("pay_user_success")},200),R.value=!1,u(Q)}))}).catch(l=>{c.value="",x.value=!1,pe(()=>{var S;(S=j.value)==null||S.focus()})})};d(0);const u=(m=null)=>{var l;window.removeEventListener("keydown",ue),N.value=!1,x.value=!1,c.value="",p.value="",_.value=[],(l=j.value)==null||l.blur(),typeof m=="function"&&(m=null),k("paySuccess",m),R.value=!1},x=d(!1);r({drawer:R,setForm:P,setRePay:q,beforeClose:u});const _=d([]),p=d(""),ee=He(()=>+p.value>0?(p.value-V.value.total).toFixed(2):-1),W=d(!1),le=m=>{m===-1?_.value=[]:_.value.pop(),p.value=_.value.length?_.value.join(""):0},J=m=>{W.value===!1&&(p.value="",W.value=!0);let l=String(p.value).indexOf(".")+1,S=String(p.value).length-l;console.log(l,S),(l===0||S<2)&&(_.value.join("")<=9999999&&_.value.push(m),p.value=_.value.join("")>99999999?99999999:_.value.join(""))},ve=()=>{if(ee.value===""||ee.value===null||ee.value===void 0||+p.value<+V.value.total)return D.error("收款金额应该大于等于应收金额");z.value?U():Ie({uid:V.value.uid,user_ship:V.value.user_ship,village:V.value.village,brigade:V.value.brigade,price:V.value.price,pay_type:17}).then(m=>{console.log("========"),R.value=!1,D({message:m.msg,type:"success"}),F.value=1,u({msg:"收款成功"})}).catch(m=>{x.value=!1})},ue=m=>{let S=(m||window.event).keyCode;if(S==37)return H(2);if(S==120)return K.emit("F9");if(S==27)return u();switch(m.stopPropagation(),m.preventDefault(),S){case 96:case 48:J(0);break;case 97:case 49:J(1);break;case 98:case 50:J(2);break;case 99:case 51:J(3);break;case 100:case 52:J(4);break;case 101:case 53:J(5);break;case 102:case 54:J(6);break;case 103:case 55:J(7);break;case 104:case 56:J(8);break;case 105:case 57:J(9);break;case 110:J(".");break;case 190:J(".");break;case 8:le();break;case 13:ve();break}},ie=d(!1),te=()=>{if(!(!R.value||ie.value&&c.value.length>0)&&F.value==2)return H(1)},o=()=>{if(!(!R.value||ie.value&&c.value.length>0)&&F.value==1)return H(2)};return $e(()=>{K.on("left",te),K.on("right",o)}),Ve(()=>{K.off("left",te),K.off("right",o)}),(m,l)=>{const S=y("el-input"),Q=y("el-button"),v=y("Delete"),s=y("el-icon"),G=y("el-drawer"),I=fe("loading");return n(),O(G,{size:"60rem",modelValue:R.value,"onUpdate:modelValue":l[6]||(l[6]=L=>R.value=L),direction:"rtl",onOpen:B,"before-close":u},{header:t(()=>[Ol]),default:t(()=>{var L;return[e("div",Dl,[e("div",Il,[e("div",{class:ce(["left",{active:F.value==1}]),onClick:l[0]||(l[0]=X=>H(1))}," 微信/支付宝 ",2),e("div",{class:ce(["right",{active:F.value==2}]),onClick:l[1]||(l[1]=X=>H(2))}," 现金收款 ",2)]),e("div",null,[e("div",Pl,[Nl,e("div",El,[f(" ¥"),e("span",jl,h((L=V.value)==null?void 0:L.price),1)])])]),F.value==1?ge((n(),g("div",ql,[a(S,{ref_key:"codeRef",ref:j,modelValue:c.value,"onUpdate:modelValue":l[2]||(l[2]=X=>c.value=X),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Ne(Z,["enter"]),onFocus:l[3]||(l[3]=X=>ie.value=!0),onBlur:l[4]||(l[4]=X=>ie.value=!1)},null,8,["modelValue"]),Bl])),[[I,x.value]]):(n(),g("div",Jl,[e("div",Tl,[e("div",Kl,[e("div",Ml,[p.value?(n(),g("span",Wl,h(p.value),1)):(n(),g("span",Gl,"按下键盘输入客户支付金额"))]),ee.value>=0?(n(),g("div",Hl,[e("div",null,[f(" 需找零(元):"),e("span",Ql,"¥"+h(ee.value),1)]),Xl])):(n(),g("div",Yl,la)),e("div",aa,[e("div",ta,[(n(!0),g(ne,null,re(b.value,X=>(n(),O(Q,{key:X,onClick:T=>J(X)},{default:t(()=>[f(h(X),1)]),_:2},1032,["onClick"]))),128))]),e("div",sa,[a(Q,{onClick:le},{default:t(()=>[a(s,null,{default:t(()=>[a(v)]),_:1})]),_:1}),a(Q,{onClick:l[5]||(l[5]=X=>le(-1))},{default:t(()=>[f("C")]),_:1}),a(Q,{class:ce(["enter",{"enter-disable":+p.value<+V.value.total}]),disabled:+p.value<+V.value.total,onClick:ve},{default:t(()=>[f(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]}),footer:t(()=>[e("div",oa,[a(Q,{class:"cancel-btn",onClick:Y},{default:t(()=>[f("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},na=ke(ia,[["__scopeId","data-v-5ad4b8f5"]]),M=C=>(we("data-v-d356fe09"),C=C(),Ce(),C),ua={class:"my-order"},da={class:"header-nav"},ra=["onClick"],ca={key:0,class:"detail"},va={class:"table"},_a=M(()=>e("div",{class:"table-title"},"用户信息",-1)),ma={class:"table-info"},pa={class:"info-item"},fa=M(()=>e("div",{class:"info-item-title"},"用户余额:",-1)),ya={class:"info-item-info red"},ha={class:"info-item"},ga=M(()=>e("div",{class:"info-item-title"},"采购款:",-1)),ba={class:"info-item-info red"},ka={class:"info-item"},$a=M(()=>e("div",{class:"info-item-title"},"返还金:",-1)),Va={class:"info-item-info red"},wa={class:"info-item"},Ca=M(()=>e("div",{class:"info-item-title"},"头像:",-1)),Sa={class:"info-item-info"},Ua={class:"info-item"},xa=M(()=>e("div",{class:"info-item-title"},"礼品券:",-1)),za={class:"info-item-info red"},Aa={class:"info-item"},Ra=M(()=>e("div",{class:"info-item-title"},"冻结礼品券:",-1)),Fa={class:"info-item-info red"},La={class:"info-item"},Oa=M(()=>e("div",{class:"info-item-title"},"ID:",-1)),Da={class:"info-item-info"},Ia={class:"info-item"},Pa=M(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Na={class:"info-item-info"},Ea={class:"info-item"},ja=M(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),qa={class:"info-item-info"},Ba={class:"info-item"},Ja=M(()=>e("div",{class:"info-item-title"},"用户账号:",-1)),Ta={class:"info-item-info"},Ka={class:"info-item"},Ma=M(()=>e("div",{class:"info-item-title"},"真实姓名:",-1)),Wa={class:"info-item-info"},Ga={class:"info-item"},Ha=M(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qa={class:"info-item-info"},Xa={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Ya=M(()=>e("div",{class:"info-item-title"},"用户类型:",-1)),Za={class:"info-item-info"},et={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},lt=M(()=>e("div",{class:"info-item-title"},"用户地址:",-1)),at={key:1,class:"detail"},tt={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},st={style:{display:"flex","align-items":"center"}},ot={style:{"margin-left":"0.5rem"}},it={key:0,style:{display:"flex","align-items":"center"}},nt={class:"footer"},ut={key:0},dt={key:1},rt={key:2},ct={class:"dialog-footer"},vt={key:0},_t={class:"ship-money-list"},mt=["onClick"],pt={class:"item1"},ft={class:"item2"},yt={class:"dialog-footer"},ht={__name:"detail",setup(C){be(),Qe();const r=d({id:""});d({price:"",type:1});const $=d(null),R=(v=null)=>{ie()},F=d(!1),c=d([]);(()=>{Ee({type_id:4}).then(v=>{c.value=v.data.lists})})();const Y=()=>{el({id:r.value.id,user_ship:r.value.user_ship}).then(v=>{var s;D.success("修改成功"),r.value.user_ship_name=(s=c.value.find(G=>G.id==r.value.user_ship))==null?void 0:s.title,F.value=!1})},B=()=>{F.value=!1},H=d([]);(()=>{ll().then(v=>{H.value=v.data,console.log(v)})})();const w=d({id:"",province:"",city:"",area:"",street:"",brigade:""}),z=d([]),P=d([]),q=()=>{al({uid:r.value.id}).then(v=>{var s;(s=v.data)!=null&&s.village?(z.value=[v.data.city,v.data.area,v.data.street,v.data.village,+v.data.brigade],P.value=JSON.parse(JSON.stringify(z.value)),w.value=v.data):(z.value=[],P.value=[],w.value={id:"",province:"",city:"",area:"",street:"",brigade:""})}).catch(v=>{z.value=[],P.value=[],w.value={id:"",province:"",city:"",area:"",street:"",brigade:""}})},k=d([]),N=async(v,s)=>{const G=v.level;let I;if(G!==0&&!v.data.code)return s([]);G===0?(I=await Se({province_code:51e4}),I=I.data.map(L=>({code:L.city_code,name:L.city_name}))):G===1?(I=await Ue({city_code:v.data.code}),I=I.data.map(L=>({code:L.area_code,name:L.area_name}))):G===2?(I=await xe({area_code:v.data.code}),I=I.data.map(L=>({code:L.street_code,name:L.street_name}))):G===3?(I=await ze({street_code:v.data.code}),I=I.data.map(L=>({code:L.village_code,name:L.village_name}))):G===4&&(I=await Ae({village_code:v.data.code}),I=I.data.map(L=>({code:L.id,name:L.brigade_name,leaf:!0}))),s(I)},b={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:N},A=async()=>{w.value.city=z.value[0],w.value.area=z.value[1],w.value.street=z.value[2],w.value.village=z.value[3],w.value.brigade=z.value[4],w.value.phone||(w.value.phone=r.value.account),w.value.real_name||(w.value.real_name=r.value.real_name||r.value.nickname),tl({...w.value,uid:r.value.id}).then(v=>{P.value=JSON.parse(JSON.stringify(z.value)),D.success("编辑成功"),E.value=!0}).catch(v=>{ae()})},ae=()=>{z.value=JSON.parse(JSON.stringify(P.value)),P.value.length>0&&(w.value.city=P.value[0],w.value.area=P.value[1],w.value.street=P.value[2],w.value.village=P.value[3],w.value.brigade=P.value[4]),E.value=!0},E=d(!0),Z=d(0),U=d(["基本信息","用户资产"]),u=d(!1),x=d([]),_=d({page_no:1,page_size:10,loading:!1,loadend:!1});let p=[];const ee=(v=!1)=>{v&&(x.value=[],_.value.page_no=1,_.value.loadend=!1),!(_.value.loadend||_.value.loading)&&(_.value.loading=!0,ol({uid:r.value.id,page_no:_.value.page_no,page_size:_.value.page_size}).then(s=>{x.value=[...x.value,...s.data.lists],_.value.loading=!1,_.value.page_no++,s.data.lists.length<_.value.page_size&&(_.value.loadend=!0)}))},W=d({mobile:"",code:""}),le=d(!1),J=()=>{if(W.value.mobile=r.value.phone,W.value.code="",p=x.value.filter(v=>v.n_num).map(v=>({product_id:v.product_id,nums:v.n_num})),p.length==0)return D.error("请选择商品");le.value=!0},ve=()=>{console.log("发送短信验证码"),D.success("验证码已发送")},ue=()=>{if(W.value.code=="")return D.error("请输入验证码");il({uid:r.value.id,info:p}).then(v=>{u.value=!1,D.success("出库成功"),le.value=!1,ee(!0)})},ie=()=>{Pe({id:r.value.id}).then(({data:v})=>{v.phone=v.mobile+"",delete v.mobile,r.value=Object.assign(r.value,v)})},te=d(!1),o=d({user_ship:"",user_ship_name:"",limit:"",money:"",type:""}),m=()=>{o.value.money=Number(o.value.money).toFixed(2),(+o.value.money<+o.value.limit||+o.value.money>1e4)&&(+o.value.limit>0?o.value.money=o.value.limit:o.value.money="")},l=v=>{if(o.value.type=="add"){let s=c.value.find(G=>G.id==v);s&&(o.value.limit=s.limit,o.value.user_ship_name=s.title,o.value.money=s.limit)}},S=()=>{if(o.value.user_ship===""||o.value.user_ship===null||o.value.user_ship===void 0||o.value.user_ship===0)return D.error("请选择会员类型");if(o.value.money==0||o.value.money=="")return D.error(o.value.type=="add"?"请输入充值金额":"请选择金额");if(o.value.type=="add"&&(+o.value.money<+o.value.limit||+o.value.money>1e4))return+o.value.limit>0?o.value.money=o.value.limit:o.value.money="",D.error(`该类型至少需要充值${o.value.limit}元`);$.value.setForm({data:{uid:r.value.id,price:o.value.money,user_ship:o.value.user_ship,village:w.value.village,brigade:w.value.brigade}}),$.value.drawer=!0,pe(()=>{te.value=!1})},Q=v=>{if(P.value.length==0)return D.error("请先选择用户地址");o.value.type=v,v=="add"&&(o.value.user_ship=r.value.user_ship,o.value.user_ship_name=r.value.user_ship_name,l(o.value.user_ship)),te.value=!0};return $e(()=>{K.on("set-user-detail",v=>{r.value=v,u.value=!1,Pe({id:r.value.id}).then(({data:s})=>{s.phone=s.mobile+"",delete s.mobile,r.value=Object.assign(v,s)}),z.value=[],P.value=[],q(),ee(!0),o.value={user_ship:"",user_ship_name:"",limit:"",money:"",type:""}})}),Ve(()=>{K.off("set-user-detail")}),(v,s)=>{var Oe;const G=y("el-avatar"),I=y("el-tag"),L=y("el-option"),X=y("el-select"),T=y("el-button"),qe=y("el-cascader"),Be=y("el-image"),he=y("el-table-column"),Je=y("el-input-number"),Te=y("el-table"),Ke=y("el-empty"),me=y("el-input"),de=y("el-form-item"),Fe=y("el-form"),Le=y("el-dialog"),Me=fe("infinite-scroll"),We=fe("loading");return n(),g("div",ua,[e("div",da,[(n(!0),g(ne,null,re(U.value,(i,se)=>(n(),g("div",{key:se,class:ce(["nav-item",{"nav-item-active":Z.value==se,"nav-item-radius1":Z.value==se+1,"nav-item-radius2":Z.value==se-1}]),onClick:Ge=>Z.value=se},h(i),11,ra))),128)),e("div",{class:ce(["nav-item",{"nav-item-radius2":Z.value==U.value.length-1}]),style:{flex:"1"}},null,2)]),r.value.id&&Z.value==0?(n(),g("div",ca,[e("div",va,[_a,e("div",ma,[e("div",pa,[fa,e("div",ya,"¥"+h(r.value.now_money),1)]),e("div",ha,[ga,e("div",ba,"¥"+h(r.value.purchase_funds),1)]),e("div",ka,[$a,e("div",Va,"¥"+h((Oe=r.value.return_money)==null?void 0:Oe.toFixed(2)),1)]),e("div",wa,[Ca,e("div",Sa,[a(G,{style:{width:"4rem",height:"4rem"},src:r.value.avatar},null,8,["src"])])]),e("div",Ua,[xa,e("div",za,"¥"+h(r.value.integral),1)]),e("div",Aa,[Ra,e("div",Fa,"¥"+h(r.value.get_frozen),1)]),e("div",La,[Oa,e("div",Da,h(r.value.id),1)]),e("div",Ia,[Pa,e("div",Na,h(r.value.nickname),1)]),e("div",Ea,[ja,e("div",qa,h(r.value.phone),1)]),e("div",Ba,[Ja,e("div",Ta,h(r.value.account),1)]),e("div",Ka,[Ma,e("div",Wa,h(r.value.real_name),1)]),e("div",Ga,[Ha,e("div",Qa,h(r.value.create_time),1)]),e("div",Xa,[Ya,e("div",Za,[F.value==!1?(n(),g(ne,{key:0},[r.value.user_ship==0?(n(),O(I,{key:0,type:"primary",size:"large"},{default:t(()=>[f(h(r.value.user_ship_name),1)]),_:1})):(n(),O(I,{key:1,type:"success",size:"large"},{default:t(()=>[f(h(r.value.user_ship_name),1)]),_:1}))],64)):(n(),g(ne,{key:1},[a(X,{modelValue:r.value.user_ship,"onUpdate:modelValue":s[0]||(s[0]=i=>r.value.user_ship=i),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:t(()=>[(n(!0),g(ne,null,re(c.value,i=>(n(),O(L,{key:i.id,label:i.title,value:i.id,disabled:i.id!=0&&i.id!=4},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"]),a(T,{type:"primary",style:{"margin-left":"1rem"},onClick:Y},{default:t(()=>[f("确认")]),_:1}),a(T,{style:{"margin-left":"1rem"},onClick:B},{default:t(()=>[f("取消")]),_:1})],64))])]),e("div",et,[lt,(n(),O(qe,{key:r.value.id,style:{flex:"1"},modelValue:z.value,"onUpdate:modelValue":s[1]||(s[1]=i=>z.value=i),options:k.value,props:b,load:N,class:"w-full",disabled:E.value},null,8,["modelValue","options","disabled"])),E.value&&!P.value.length?(n(),O(T,{key:0,type:"primary",style:{"margin-left":"1rem"},onClick:s[2]||(s[2]=i=>E.value=!1)},{default:t(()=>[f("修改")]),_:1})):oe("",!0),E.value?oe("",!0):(n(),O(T,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:A},{default:t(()=>[f("确认")]),_:1})),E.value?oe("",!0):(n(),O(T,{key:2,style:{"margin-left":"1rem"},onClick:ae},{default:t(()=>[f("取消")]),_:1}))]),r.value.user_ship!=0?(n(),O(T,{key:0,type:"success",class:"big-btn",size:"large",onClick:s[3]||(s[3]=i=>Q("add"))},{default:t(()=>[f("增加经营资金")]),_:1})):(n(),O(T,{key:1,type:"primary",class:"big-btn",size:"large",onClick:s[4]||(s[4]=i=>Q("recharge"))},{default:t(()=>[f("成为会员")]),_:1}))])])])):oe("",!0),r.value.id&&Z.value==1?ge((n(),g("div",at,[ge((n(),g("div",tt,[a(Te,{data:x.value},{default:t(()=>[a(he,{label:"商品信息"},{default:t(({row:i})=>[e("div",st,[a(Be,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:i.image},null,8,["src"]),e("span",ot,h(i.store_name),1)])]),_:1}),a(he,{prop:"price",label:"单价",width:u.value?130:200},null,8,["width"]),a(he,{prop:"nums",label:"存量",width:u.value?100:200},null,8,["width"]),u.value?(n(),O(he,{key:0,prop:"nums",label:"出库量",width:"250"},{default:t(({row:i})=>[i.nums?(n(),g("div",it,[a(Je,{modelValue:i.n_num,"onUpdate:modelValue":se=>i.n_num=se,"step-strictly":"",min:0,max:i.nums},null,8,["modelValue","onUpdate:modelValue","max"]),a(T,{type:"primary",style:{"margin-left":"1rem"},onClick:se=>i.n_num=i.nums},{default:t(()=>[f("全部")]),_:2},1032,["onClick"])])):oe("",!0)]),_:1})):oe("",!0)]),_:1},8,["data"])])),[[Me,ee]]),e("div",nt,[u.value?(n(),g("div",dt,[a(T,{type:"primary",size:"large",onClick:J},{default:t(()=>[f("确认出库")]),_:1}),a(T,{size:"large",onClick:s[6]||(s[6]=i=>u.value=!1)},{default:t(()=>[f("取消")]),_:1})])):(n(),g("div",ut,[a(T,{type:"warning",size:"large",onClick:s[5]||(s[5]=i=>u.value=!0),disabled:x.value.length==0},{default:t(()=>[f("商品出库")]),_:1},8,["disabled"])]))])])),[[We,_.value.loading]]):(n(),g("div",rt,[a(Ke)])),a(na,{ref_key:"payRef",ref:$,onPaySuccess:R},null,512),a(Le,{modelValue:le.value,"onUpdate:modelValue":s[10]||(s[10]=i=>le.value=i),title:"出库验证",width:"500"},{footer:t(()=>[e("div",ct,[a(T,{onClick:s[9]||(s[9]=i=>le.value=!1)},{default:t(()=>[f("取消")]),_:1}),a(T,{type:"primary",onClick:ue},{default:t(()=>[f(" 确认 ")]),_:1})])]),default:t(()=>[a(Fe,{model:W.value},{default:t(()=>[a(de,{label:"手机号:"},{default:t(()=>[a(me,{modelValue:W.value.mobile,"onUpdate:modelValue":s[7]||(s[7]=i=>W.value.mobile=i),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1}),a(de,{label:"验证码:"},{default:t(()=>[a(me,{modelValue:W.value.code,"onUpdate:modelValue":s[8]||(s[8]=i=>W.value.code=i),autocomplete:"off",placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),(n(),O(je,{style:{"margin-left":"1rem"},onSendCode:ve,key:W.value.mobile}))]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),a(Le,{modelValue:te.value,"onUpdate:modelValue":s[17]||(s[17]=i=>te.value=i),title:o.value.type=="add"?"增加经营资金":"成为会员",width:"500"},{footer:t(()=>[e("div",yt,[a(T,{onClick:s[16]||(s[16]=i=>te.value=!1)},{default:t(()=>[f("取消")]),_:1}),a(T,{type:"primary",onClick:S},{default:t(()=>[f(" 确认 ")]),_:1})])]),default:t(()=>[a(Fe,{model:o.value,"label-width":"100px"},{default:t(()=>[a(de,{label:"手机号:"},{default:t(()=>[a(me,{modelValue:r.value.phone,"onUpdate:modelValue":s[11]||(s[11]=i=>r.value.phone=i),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1}),o.value.type=="add"?(n(),O(de,{key:0,label:"会员类型:"},{default:t(()=>[a(me,{modelValue:o.value.user_ship_name,"onUpdate:modelValue":s[12]||(s[12]=i=>o.value.user_ship_name=i),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1})):(n(),O(de,{key:1,label:"会员类型:",required:""},{default:t(()=>[a(X,{modelValue:o.value.user_ship,"onUpdate:modelValue":s[13]||(s[13]=i=>o.value.user_ship=i),placeholder:"请选择用户类型",style:{flex:"1"},onChange:l},{default:t(()=>[(n(!0),g(ne,null,re(c.value,i=>(n(),O(L,{key:i.id,label:i.title,value:i.id,disabled:i.id==0},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})),o.value.type=="add"?(n(),O(de,{key:2,label:"充值金额:",required:""},{default:t(()=>[a(me,{modelValue:o.value.money,"onUpdate:modelValue":s[14]||(s[14]=i=>o.value.money=i),type:"number",onBlur:m,onFocus:s[15]||(s[15]=i=>o.value.money=""),autocomplete:"off"},{prepend:t(()=>[f("¥")]),append:t(()=>[f("元")]),_:1},8,["modelValue"]),o.value.limit?(n(),g("div",vt,h(`${o.value.user_ship_name}角色至少要充值${o.value.limit}元, 最大不超过10000元`),1)):oe("",!0)]),_:1})):(n(),O(de,{key:3,label:"充值金额:",required:""},{default:t(()=>[e("div",_t,[(n(!0),g(ne,null,re(H.value,(i,se)=>(n(),g("div",{class:ce(["ship-money-item",{"ship-money-item-active":i.money==o.value.money}]),onClick:Ge=>o.value.money=i.money,key:se},[e("div",pt,h(i.money)+h(i.money_string),1),e("div",ft,"送"+h(i.send)+h(i.send_string),1)],10,mt))),128))])]),_:1}))]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])}}},gt=ke(ht,[["__scopeId","data-v-d356fe09"]]),bt={class:"my-card"},xt={__name:"index",setup(C){return(r,$)=>(n(),g("div",bt,[a(Ll,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),a(nl),a(gt,{ref:"detailRef"},null,512)]))}};export{xt as default}; diff --git a/dist/assets/index-C3nn8uGl.js b/dist/assets/index-C3nn8uGl.js deleted file mode 100644 index 47550e0..0000000 --- a/dist/assets/index-C3nn8uGl.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as G,u as H,r as n,o as J,m as D,a as Q,b as u,h as I,c as s,k as o,e,f as d,w as p,g as b,d as F,p as m,i as oe,j as O,F as E,l as K,z as j,t as l,q as W,s as X,I as ae}from"./index-DZ-rs8qe.js";import{d as ie,e as le}from"./store-eKONkWfH.js";import{h as q}from"./moment-Cl4UOzQZ.js";import{p as ne}from"./pay-ZUyBpX9d.js";import{p as de}from"./padding-CFUD4Y80.js";import"./authCode-CQcCWWpQ.js";/* empty css */const _e=f=>(W("data-v-bf6504fc"),f=f(),X(),f),ce={class:"my-order"},re={class:"header-nav"},ue=_e(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),ve={class:"nav-item-btn"},pe={class:"header-input"},fe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},me=["onClick"],he={class:"top"},ye={class:"create-time"},ge={class:"shop"},ke={key:0,class:"left"},be={key:0,class:"shop-name"},$e={class:"right"},we={class:"money"},Ce={class:"count"},De={class:"bottom"},Se={class:"pay"},Ve={key:0},Ye={key:1},xe={key:2},ze={key:3},Pe={key:4},Ie={key:5},Re={key:1,style:{color:"#ff4a00"}},Me={key:0,class:"load-end"},Le={key:1,class:"load-end"},Be={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f,{expose:w}){H(),n([]);const t=n(1),h=r=>{_.value.page_no=1,$.value=!1,g.value=!1,c.value=[],k(!0)};n(null);const y=n(""),R=()=>{_.value.start_time=q(y.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=q(y.value[1]).format("YYYY-MM-DD 23:59:59"),k(!0)},S=r=>r.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),g=n(!1),M=n(0),C=n(0),$=n(!1),c=n([]),k=(r=!1)=>{if(r)_.value.page_no=1;else if($.value||g.value)return;g.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),ie(_.value).then(i=>{r?c.value=i.data.lists:c.value=[...c.value,...i.data.lists],_.value.page_no==1&&c.value.length>0&&D.emit("set-sale-order-detail",c.value[0]),i.data.lists.length<_.value.page_size?$.value=!0:_.value.page_no++,C.value=0,console.log(_.value.page_no),M.value=i.data.count,g.value=!1}).catch(i=>{$.value=!0,g.value=!1})},L=(r,i)=>{C.value=i,D.emit("set-sale-order-detail",r)};return w({getOrderList:k}),J(()=>{D.on("update-sale-order-detail",r=>{console.log("==="),c.value[C.value].paid=1})}),Q(()=>{D.off("update-sale-order-detail")}),(r,i)=>{const V=u("el-radio-button"),B=u("el-radio-group"),N=u("el-date-picker"),T=u("CircleClose"),Y=u("el-icon"),x=u("el-button"),z=u("el-input"),P=u("el-image"),Z=u("spna"),ee=I("loading"),te=I("infinite-scroll");return s(),o("div",ce,[e("div",re,[ue,e("div",ve,[d(B,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),onChange:h,size:"small"},{default:p(()=>[d(V,{value:1},{default:p(()=>[b("全部")]),_:1}),d(V,{value:2},{default:p(()=>[b("未支付")]),_:1})]),_:1},8,["modelValue"]),d(N,{modelValue:y.value,"onUpdate:modelValue":i[1]||(i[1]=a=>y.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":S,onChange:R,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",pe,[d(z,{modelValue:_.value.order_id,"onUpdate:modelValue":i[4]||(i[4]=a=>_.value.order_id=a),placeholder:"请输入订单编号",onKeydown:i[5]||(i[5]=oe(a=>k(!0),["enter"])),onClear:i[6]||(i[6]=a=>k(!0))},{suffix:p(()=>[_.value.order_id!=""?(s(),F(Y,{key:0,size:"18",onClick:i[2]||(i[2]=a=>{_.value.order_id="",k(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:p(()=>[d(T)]),_:1})):m("",!0)]),append:p(()=>[d(x,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[3]||(i[3]=a=>k(!0))},{default:p(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),O((s(),o("div",fe,[(s(!0),o(E,null,K(c.value,(a,U)=>(s(),o("div",{class:j(["item",{"item-active":C.value==U}]),key:U,onClick:A=>L(a,U)},[e("div",he,[e("div",{class:j(["sn","cahier"])},"单号: "+l(a.order_id),1),e("div",ye,l(a.pay_time),1)]),e("div",ge,[a.product_info?(s(),o("div",ke,[(s(!0),o(E,null,K(a.product_info.slice(0,5),(A,se)=>(s(),F(P,{key:se,src:A.image,class:"shop-img"},null,8,["src"]))),128)),a.product_info.length==1?(s(),o("div",be,l(a.product_info[0].store_name),1)):m("",!0)])):m("",!0),e("div",$e,[e("div",we,"¥"+l(a.pay_price),1),e("div",Ce,"共"+l(a.total_num)+"款商品",1)])]),e("div",De,[e("div",Se,[a.paid?(s(),o("div",Ve,[b(l(a.paid_name)+" ",1),a.pay_type_name?(s(),F(Z,{key:0},{default:p(()=>[b("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",Ye,"(微信收款)")):a.pay_type==17?(s(),o("span",xe,"(现金支付)")):a.pay_type==13?(s(),o("span",ze,"(支付宝收款)")):a.pay_type==3?(s(),o("span",Pe,"(余额支付)")):a.pay_type==1?(s(),o("span",Ie,"(微信支付)")):m("",!0)])):(s(),o("div",Re,l(a.paid_name),1))])])],10,me))),128)),$.value?(s(),o("div",Me,"没有更多了")):m("",!0),g.value?(s(),o("div",Le,"加载中...")):m("",!0)])),[[ee,g.value],[te,k]])])}}},Ne=G(Be,[["__scopeId","data-v-bf6504fc"]]),v=f=>(W("data-v-b5c92dd9"),f=f(),X(),f),Te={class:"my-order"},Ue={key:0,class:"detail"},Fe={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Oe=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Ae={class:"table-info"},Ee={class:"info-item"},Ke=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},Ge=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),He={class:"info-item-info"},Je={class:"info-item"},Qe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),We={class:"info-item-info"},Xe={class:"info-item"},Ze=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},rt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ut={class:"info-item-info"},vt={key:0},pt={key:1},ft={key:2},mt={key:3},ht={key:4},yt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info"},bt={class:"info-item"},$t=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),wt={class:"info-item-info"},Ct={class:"info-item"},Dt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),St={class:"info-item-info"},Vt={class:"info-item"},Yt=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),xt={class:"info-item-info"},zt={style:{"font-size":"0.9rem"}},Pt={style:{color:"#ff4a00"}},It={style:{display:"flex","align-items":"center"}},Rt={style:{"margin-left":"0.5rem"}},Mt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),Lt={key:0,class:"footer"},Bt={key:1},Nt={__name:"detail",emits:["rePaySuccess"],setup(f,{emit:w}){H(),ae();const t=n({id:""});n([]);const h=n(null),y=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const R=()=>{h.value.setForm({isRePay:!0,data:t.value}),h.value.drawer=!0},S=n({page_no:1,page_size:15,loadend:!1,loading:!1}),_=n([]),g=()=>console.log("触底"),M=()=>{y.value=!0,le({id:t.value.id}).then(c=>{t.value=c.data,setTimeout(()=>{y.value=!1},200)})},C=w,$=(c=null)=>{setTimeout(()=>{C("rePaySuccess")})};return J(()=>{D.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,S.value.page_no=1,S.value.loadend=!1,S.value.loading=!1,_.value=[],M()})}),Q(()=>{D.off("set-sale-order-detail")}),(c,k)=>{var Y;const L=u("el-image"),r=u("el-table-column"),i=u("el-table"),V=u("el-button"),B=u("el-empty"),N=I("infinite-scroll"),T=I("loading");return s(),o("div",Te,[t.value.id?O((s(),o("div",Ue,[O((s(),o("div",Fe,[Oe,e("div",Ae,[e("div",Ee,[Ke,e("div",je,l(t.value.order_id),1)]),e("div",qe,[Ge,e("div",He,l(t.value.total_num||0),1)]),e("div",Je,[Qe,e("div",We,"¥"+l(t.value.pay_price),1)]),e("div",Xe,[Ze,e("div",et,l(t.value.pay_time),1)]),e("div",tt,[st,e("div",ot,"¥"+l(t.value.deduction_price),1)]),e("div",at,[it,e("div",lt,"¥"+l(t.value.pay_price),1)]),e("div",nt,[dt,e("div",_t,l(t.value.pay_time),1)]),e("div",ct,[rt,e("div",ut,[t.value.pay_type_name?(s(),o("span",vt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",pt,"微信收款")):t.value.pay_type==17?(s(),o("span",ft,"现金支付")):t.value.pay_type==13?(s(),o("span",mt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ht,"余额支付")):t.value.pay_type==1?(s(),o("span",yt,"微信支付")):m("",!0)])])]),t.value.uid?(s(),o("div",gt,"用户信息")):m("",!0),t.value.uid?(s(),o("div",kt,[e("div",bt,[$t,e("div",wt,l(t.value.uid),1)]),e("div",Ct,[Dt,e("div",St,l(t.value.nickname),1)]),e("div",Vt,[Yt,e("div",xt,l(t.value.mobile),1)])])):m("",!0),e("div",zt,[b(" 共计 "),e("span",Pt,l(((Y=t.value.product)==null?void 0:Y.length)||" "),1),b(" 款商品 ")]),d(i,{data:t.value.product},{default:p(()=>[d(r,{label:"商品信息"},{default:p(({row:x})=>{var z,P;return[e("div",It,[d(L,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(z=x.cart_info)==null?void 0:z.image},null,8,["src"]),e("span",Rt,l((P=x.cart_info)==null?void 0:P.name),1)])]}),_:1}),d(r,{prop:"cart_info.price",label:"单价",width:"150"}),d(r,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(r,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Mt])),[[N,g]]),t.value.paid?m("",!0):(s(),o("div",Lt,[d(V,{type:"primary",size:"large",onClick:R},{default:p(()=>[b("重新支付")]),_:1})]))])),[[T,y.value]]):(s(),o("div",Bt,[d(B)])),d(ne,{ref_key:"payRef",ref:h,onPaySuccess:$},null,512)])}}},Tt=G(Nt,[["__scopeId","data-v-b5c92dd9"]]),Ut={class:"my-card"},Gt={__name:"index",setup(f){const w=n(null),t=()=>{var h;(h=w.value)==null||h.getOrderList(!0)};return(h,y)=>(s(),o("div",Ut,[d(Ne,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:w},null,512),d(de),d(Tt,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{Gt as default}; diff --git a/dist/assets/index-CJCLRir3.js b/dist/assets/index-CQ53hTlw.js similarity index 96% rename from dist/assets/index-CJCLRir3.js rename to dist/assets/index-CQ53hTlw.js index e526776..3b89cf3 100644 --- a/dist/assets/index-CJCLRir3.js +++ b/dist/assets/index-CQ53hTlw.js @@ -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-DZ-rs8qe.js";import{c as U}from"./shop-4Vi_GXIy.js";import"./axiosAPI-CvHIP5YD.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_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-El3JpHtp.js";import{c as U}from"./shop-DHOKo0Qh.js";import"./axiosAPI-m7QjxXd9.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_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}; diff --git a/dist/assets/index-SeybCiti.js b/dist/assets/index-DbTF6P8n.js similarity index 94% rename from dist/assets/index-SeybCiti.js rename to dist/assets/index-DbTF6P8n.js index bc2bc22..120a54b 100644 --- a/dist/assets/index-SeybCiti.js +++ b/dist/assets/index-DbTF6P8n.js @@ -1 +1 @@ -import{a as B,b as L}from"./shop-4Vi_GXIy.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-DZ-rs8qe.js";import"./axiosAPI-CvHIP5YD.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_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-DHOKo0Qh.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-El3JpHtp.js";import"./axiosAPI-m7QjxXd9.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_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}; diff --git a/dist/assets/index-Iipf9fR_.js b/dist/assets/index-Df7OKyCV.js similarity index 68% rename from dist/assets/index-Iipf9fR_.js rename to dist/assets/index-Df7OKyCV.js index 6bd2019..c39043f 100644 --- a/dist/assets/index-Iipf9fR_.js +++ b/dist/assets/index-Df7OKyCV.js @@ -1 +1 @@ -import{_ as q,u as W,r as l,b as f,h as E,c as s,k as o,e,t as a,f as _,w as y,g as w,i as G,j as $,F as P,l as T,p as u,m as b,E as F,z as j,d as N,I as X,o as H,a as Y,q as Z,s as ee,n as M,L as A,M as te}from"./index-DZ-rs8qe.js";import{e as se,j as oe,w as ie,i as ae}from"./store-eKONkWfH.js";/* empty css */import{p as le}from"./padding-CFUD4Y80.js";const ne={class:"my-order"},ce={class:"header-nav"},de={class:"nav-item"},_e={class:"nav-item-clear"},re={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},ue=["onClick"],fe={class:"top"},pe={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},me={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},we={class:"pay"},Ce={key:0},xe={key:1},Re={key:2},Ie={key:3},ze={key:4},Oe={key:5},Ve={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"cashier"},De={key:1,class:"cashier",style:{color:"#ff4a00"}},Le={key:0,class:"load-end"},Se={key:1,class:"load-end"},Ae={__name:"order",props:{type:{type:Number,default:2}},emits:["backOne"],setup(C,{expose:t,emit:h}){W(),l([]),l(null);const n=l({verify_code:"",page_no:1,page_size:15}),r=l(!1),m=l(0),k=l(0),I=l(!1),c=l([]),p=(x=!1)=>{r.value||(r.value=!0,n.value.verify_code?(n.value.verify_code=n.value.verify_code.replace("—","-"),n.value.verify_code=n.value.verify_code.replace(/\uFF0D/,"-"),n.value.verify_code=n.value.verify_code.replace(" ",""),se({verify_code:n.value.verify_code}).then(d=>{c.value=[d.data],k.value=0,b.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,r.value=!1,c.value[0].is_writeoff&&F.warning("订单已核销过")}).catch(d=>{r.value=!1,F.error(d.msg||"没有找到该订单"),c.value=[],b.emit("set-sale-order-detail",{})})):oe(n.value).then(d=>{c.value=[...c.value,...d.data.lists],n.value.page_no==1&&b.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,n.value.page_no++,r.value=!1}).catch(d=>{r.value=!1}))},z=(x,d)=>{k.value=d,b.emit("set-sale-order-detail",x)},g=x=>{n.value.verify_code=x,k.value=0,n.value.page_no=1,p(!0)},R=h,O=()=>{b.emit("set-sale-order-detail",{}),c.value=[],R("backOne")};return t({setCode:g}),(x,d)=>{const V=f("el-button"),B=f("el-input"),D=f("el-image"),L=f("spna"),S=E("loading"),J=E("infinite-scroll");return s(),o("div",ne,[e("div",ce,[e("div",de,a(C.type==2?"核销订单":"核销记录"),1),e("div",_e,[_(V,{type:"primary",size:"small",onClick:O},{default:y(()=>[w("返回上一页")]),_:1})])]),e("div",re,[_(B,{modelValue:n.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=i=>n.value.verify_code=i),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=G(i=>p(!0),["enter"])),clearable:""},{append:y(()=>[_(V,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=i=>p(!0))},{default:y(()=>[w("搜索")]),_:1})]),_:1},8,["modelValue"])]),$((s(),o("div",ve,[(s(!0),o(P,null,T(c.value,(i,K)=>(s(),o("div",{class:j(["item",{"item-active":k.value==K}]),key:K,onClick:U=>z(i,K)},[e("div",fe,[e("div",{class:j(["sn","cahier"])},"单号: "+a(i.order_id),1),e("div",pe,a(i.pay_time),1)]),e("div",he,[i.product?(s(),o("div",ye,[(s(!0),o(P,null,T(i.product.slice(0,5),(U,Q)=>(s(),N(D,{key:Q,src:U.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),i.product.length==1?(s(),o("div",me,a(i.product[0].store_name),1)):u("",!0)])):u("",!0),e("div",ke,[e("div",ge,"¥"+a(i.pay_price),1),e("div",$e,"共"+a(i.total_num)+"款商品",1)])]),e("div",be,[e("div",we,[i.paid?(s(),o("div",Ce,[w(a(i.paid_name)+" ",1),i.pay_type_name?(s(),N(L,{key:0},{default:y(()=>[w("("+a(i.pay_type_name)+")",1)]),_:2},1024)):i.pay_type==9?(s(),o("span",xe,"(微信收款)")):i.pay_type==17?(s(),o("span",Re,"(现金支付)")):i.pay_type==13?(s(),o("span",Ie,"(支付宝收款)")):i.pay_type==3?(s(),o("span",ze,"(余额支付)")):i.pay_type==1?(s(),o("span",Oe,"(微信支付)")):u("",!0)])):(s(),o("div",Ve,a(i.paid_name),1))]),i.is_writeoff==0?(s(),o("div",Be,"核销码:"+a(i.verify_code),1)):(s(),o("div",De,"已核销:"+a(i.verify_code),1))])],10,ue))),128)),I.value?(s(),o("div",Le,"没有更多了")):u("",!0),r.value?(s(),o("div",Se,"加载中...")):u("",!0)])),[[S,r.value],[J,p]])])}}},Ee=q(Ae,[["__scopeId","data-v-f1ecc2f9"]]),v=C=>(Z("data-v-1950b4ed"),C=C(),ee(),C),Fe={class:"my-order"},Ne={key:0,class:"detail"},Ke={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Me=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Ue={class:"table-info"},Pe={class:"info-item"},Te=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},We=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Qe={class:"info-item-info"},Xe={class:"info-item"},Ye=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),at={class:"info-item-info"},lt={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},_t=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),rt={class:"info-item-info"},vt={key:0},ut={key:1},ft={key:2},pt={key:3},ht={key:4},yt={key:5},mt={key:0,class:"table-title"},kt={key:1,class:"table-info"},gt={class:"info-item"},$t=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),bt={class:"info-item-info"},wt={class:"info-item"},Ct=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),xt={class:"info-item-info"},Rt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),zt={class:"info-item-info"},Ot={style:{"font-size":"0.9rem"}},Vt={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Dt={style:{"margin-left":"0.5rem"}},Lt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),St={class:"footer"},At={key:1},Et={key:1},Ft={__name:"detail",setup(C){W(),X();const t=l({id:""});l([]),l(null);const h=l(!1);l(0),l(0),l(["商品信息","订单详情"]),l(""),l(!1);const n=l({page_no:1,page_size:15,loadend:!1,loading:!1}),r=l([]),m=()=>console.log("触底"),k=()=>{ie({verify_code:t.value.verify_code}).then(c=>{c.show==0&&c.msg=="核销成功"&&F.success(c.msg),t.value.is_writeoff=1})},I=()=>{ae({id:t.value.id}).then(c=>{b.emit("letPrintReceipt",c.data)})};return H(()=>{b.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,n.value.page_no=1,n.value.loadend=!1,n.value.loading=!1,r.value=[]})}),Y(()=>{b.off("set-sale-order-detail")}),(c,p)=>{var B;const z=f("el-image"),g=f("el-table-column"),R=f("el-table"),O=f("el-button"),x=f("el-empty"),d=E("infinite-scroll"),V=E("loading");return s(),o("div",Fe,[t.value.id?$((s(),o("div",Ne,[$((s(),o("div",Ke,[Me,e("div",Ue,[e("div",Pe,[Te,e("div",je,a(t.value.order_id),1)]),e("div",qe,[We,e("div",Ge,a(t.value.total_num||0),1)]),e("div",He,[Je,e("div",Qe,"¥"+a(t.value.pay_price),1)]),e("div",Xe,[Ye,e("div",Ze,a(t.value.pay_time),1)]),e("div",et,[tt,e("div",st,"¥"+a(t.value.deduction_price),1)]),e("div",ot,[it,e("div",at,"¥"+a(t.value.pay_price),1)]),e("div",lt,[nt,e("div",ct,a(t.value.pay_time),1)]),e("div",dt,[_t,e("div",rt,[t.value.pay_type_name?(s(),o("span",vt,a(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ut,"微信收款")):t.value.pay_type==17?(s(),o("span",ft,"现金支付")):t.value.pay_type==13?(s(),o("span",pt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ht,"余额支付")):t.value.pay_type==1?(s(),o("span",yt,"微信支付")):u("",!0)])])]),t.value.uid?(s(),o("div",mt,"用户信息")):u("",!0),t.value.uid?(s(),o("div",kt,[e("div",gt,[$t,e("div",bt,a(t.value.uid),1)]),e("div",wt,[Ct,e("div",xt,a(t.value.nickname),1)]),e("div",Rt,[It,e("div",zt,a(t.value.mobile),1)])])):u("",!0),e("div",Ot,[w(" 共计 "),e("span",Vt,a(((B=t.value.product)==null?void 0:B.length)||" "),1),w(" 款商品 ")]),_(R,{data:t.value.product},{default:y(()=>[_(g,{label:"商品信息"},{default:y(({row:D})=>{var L,S;return[e("div",Bt,[_(z,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(L=D.cart_info)==null?void 0:L.image},null,8,["src"]),e("span",Dt,a((S=D.cart_info)==null?void 0:S.name),1)])]}),_:1}),_(g,{prop:"cart_info.price",label:"单价",width:"150"}),_(g,{prop:"cart_info.cart_num",label:"数量",width:"150"}),_(g,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Lt])),[[d,m]]),e("div",St,[t.value.is_writeoff==0?(s(),N(O,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:k},{default:y(()=>[w("立即核销")]),_:1},8,["disabled"])):u("",!0),t.value.is_writeoff==1?(s(),o("div",At,"该订单已核销")):u("",!0),t.value.is_writeoff==1?(s(),N(O,{key:2,style:{"margin-left":"1rem"},type:"warning",size:"large",onClick:I},{default:y(()=>[w("打印小票")]),_:1})):u("",!0)])])),[[V,h.value]]):(s(),o("div",Et,[_(x,{description:"没找到核销订单信息"})]))])}}},Nt=q(Ft,[["__scopeId","data-v-1950b4ed"]]),Kt={class:"my-card"},Mt={class:"my-code"},Ut=e("h2",null,"订单核销",-1),Pt={class:"box"},Tt=e("span",null,"查看核销记录",-1),Ht={__name:"index",setup(C){const t=l(1),h=l(""),n=l(null),r=l(null),m=()=>{if(h.value=="")return F.error("请输入订单编号");t.value=2,M(()=>{r.value.setCode(h.value)})},k=()=>{t.value=3,M(()=>{r.value.setCode("")})},I=()=>{m()};return H(()=>{M(()=>{n.value.focus()})}),(c,p)=>{const z=f("ArrowRightBold"),g=f("el-icon");return s(),o("div",Kt,[$(e("div",Mt,[Ut,e("div",Pt,[$(e("input",{ref_key:"inputRef",ref:n,"onUpdate:modelValue":p[0]||(p[0]=R=>h.value=R),placeholder:"请输入核销码",class:"input",onKeyup:G(m,["enter"])},null,544),[[te,h.value]]),e("div",{class:"btn",onClick:m},"查询")]),e("div",{class:"to-list",onClick:k},[Tt,_(g,null,{default:y(()=>[_(z)]),_:1})])],512),[[A,t.value==1]]),$(_(Ee,{type:t.value,style:{"flex-shrink":"0"},ref_key:"orderRef",ref:r,onBackOne:p[1]||(p[1]=R=>{t.value=1,h.value=""})},null,8,["type"]),[[A,t.value!=1]]),$(_(le,null,null,512),[[A,t.value!=1]]),$(_(Nt,{ref:"detailRef",onReInit:I},null,512),[[A,t.value!=1]])])}}};export{Ht as default}; +import{_ as q,u as W,r as l,b as f,h as E,c as s,k as o,e,t as a,f as _,w as m,g as w,i as G,j as $,F as P,l as T,p as u,m as b,E as F,z as j,d as N,I as X,o as H,a as Y,q as Z,s as ee,n as M,L as A,M as te}from"./index-El3JpHtp.js";import{f as se,k as oe,w as ie,j as ae}from"./store-D17PfqyZ.js";/* empty css */import{p as le}from"./padding-Cx5iHgRh.js";const ne={class:"my-order"},ce={class:"header-nav"},de={class:"nav-item"},_e={class:"nav-item-clear"},re={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},ue=["onClick"],fe={class:"top"},pe={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},me={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},we={class:"pay"},Ce={key:0},xe={key:1},Re={key:2},Ie={key:3},ze={key:4},Oe={key:5},Ve={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"cashier"},De={key:1,class:"cashier",style:{color:"#ff4a00"}},Le={key:0,class:"load-end"},Se={key:1,class:"load-end"},Ae={__name:"order",props:{type:{type:Number,default:2}},emits:["backOne"],setup(C,{expose:t,emit:h}){W(),l([]),l(null);const n=l({verify_code:"",page_no:1,page_size:15}),r=l(!1),k=l(0),g=l(0),I=l(!1),c=l([]),p=(x=!1)=>{r.value||(r.value=!0,n.value.verify_code?(n.value.verify_code=n.value.verify_code.replace("—","-"),n.value.verify_code=n.value.verify_code.replace(/\uFF0D/,"-"),n.value.verify_code=n.value.verify_code.replace(" ",""),se({verify_code:n.value.verify_code}).then(d=>{c.value=[d.data],g.value=0,b.emit("set-sale-order-detail",c.value[0]),k.value=d.data.count,r.value=!1,c.value[0].is_writeoff&&F.warning("订单已核销过")}).catch(d=>{r.value=!1,F.error(d.msg||"没有找到该订单"),c.value=[],b.emit("set-sale-order-detail",{})})):oe(n.value).then(d=>{c.value=[...c.value,...d.data.lists],n.value.page_no==1&&b.emit("set-sale-order-detail",c.value[0]),k.value=d.data.count,n.value.page_no++,r.value=!1}).catch(d=>{r.value=!1}))},z=(x,d)=>{g.value=d,b.emit("set-sale-order-detail",x)},y=x=>{n.value.verify_code=x,g.value=0,n.value.page_no=1,p(!0)},R=h,O=()=>{b.emit("set-sale-order-detail",{}),c.value=[],R("backOne")};return t({setCode:y}),(x,d)=>{const V=f("el-button"),B=f("el-input"),D=f("el-image"),L=f("spna"),S=E("loading"),J=E("infinite-scroll");return s(),o("div",ne,[e("div",ce,[e("div",de,a(C.type==2?"核销订单":"核销记录"),1),e("div",_e,[_(V,{type:"primary",size:"small",onClick:O},{default:m(()=>[w("返回上一页")]),_:1})])]),e("div",re,[_(B,{modelValue:n.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=i=>n.value.verify_code=i),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=G(i=>p(!0),["enter"])),clearable:""},{append:m(()=>[_(V,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=i=>p(!0))},{default:m(()=>[w("搜索")]),_:1})]),_:1},8,["modelValue"])]),$((s(),o("div",ve,[(s(!0),o(P,null,T(c.value,(i,K)=>(s(),o("div",{class:j(["item",{"item-active":g.value==K}]),key:K,onClick:U=>z(i,K)},[e("div",fe,[e("div",{class:j(["sn","cahier"])},"单号: "+a(i.order_id),1),e("div",pe,a(i.pay_time),1)]),e("div",he,[i.product?(s(),o("div",ye,[(s(!0),o(P,null,T(i.product.slice(0,5),(U,Q)=>(s(),N(D,{key:Q,src:U.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),i.product.length==1?(s(),o("div",me,a(i.product[0].store_name),1)):u("",!0)])):u("",!0),e("div",ke,[e("div",ge,"¥"+a(i.pay_price),1),e("div",$e,"共"+a(i.total_num)+"款商品",1)])]),e("div",be,[e("div",we,[i.paid?(s(),o("div",Ce,[w(a(i.paid_name)+" ",1),i.pay_type_name?(s(),N(L,{key:0},{default:m(()=>[w("("+a(i.pay_type_name)+")",1)]),_:2},1024)):i.pay_type==9?(s(),o("span",xe,"(微信收款)")):i.pay_type==17?(s(),o("span",Re,"(现金支付)")):i.pay_type==13?(s(),o("span",Ie,"(支付宝收款)")):i.pay_type==3?(s(),o("span",ze,"(余额支付)")):i.pay_type==1?(s(),o("span",Oe,"(微信支付)")):u("",!0)])):(s(),o("div",Ve,a(i.paid_name),1))]),i.is_writeoff==0?(s(),o("div",Be,"核销码:"+a(i.verify_code),1)):(s(),o("div",De,"已核销:"+a(i.verify_code),1))])],10,ue))),128)),I.value?(s(),o("div",Le,"没有更多了")):u("",!0),r.value?(s(),o("div",Se,"加载中...")):u("",!0)])),[[S,r.value],[J,p]])])}}},Ee=q(Ae,[["__scopeId","data-v-f1ecc2f9"]]),v=C=>(Z("data-v-2bbc8641"),C=C(),ee(),C),Fe={class:"my-order"},Ne={key:0,class:"detail"},Ke={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Me=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Ue={class:"table-info"},Pe={class:"info-item"},Te=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},We=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Qe={class:"info-item-info"},Xe={class:"info-item"},Ye=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),at={class:"info-item-info"},lt={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},_t=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),rt={class:"info-item-info"},vt={key:0},ut={key:1},ft={key:2},pt={key:3},ht={key:4},yt={key:5},mt={key:0,class:"table-title"},kt={key:1,class:"table-info"},gt={class:"info-item"},$t=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),bt={class:"info-item-info"},wt={class:"info-item"},Ct=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),xt={class:"info-item-info"},Rt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),zt={class:"info-item-info"},Ot={style:{"font-size":"0.9rem"}},Vt={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Dt={style:{"margin-left":"0.5rem"}},Lt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),St={class:"footer"},At={key:1},Et={key:1},Ft={__name:"detail",setup(C){W(),X();const t=l({id:""});l([]),l(null);const h=l(!1);l(0),l(0),l(["商品信息","订单详情"]),l(""),l(!1);const n=l({page_no:1,page_size:15,loadend:!1,loading:!1}),r=l([]),k=()=>console.log("触底"),g=()=>{ie({verify_code:t.value.verify_code}).then(c=>{c.show==0&&c.msg=="核销成功"&&F.success(c.msg),t.value.is_writeoff=1})},I=()=>{ae({id:t.value.id}).then(c=>{b.emit("letPrintReceipt",c.data)})};return H(()=>{b.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,n.value.page_no=1,n.value.loadend=!1,n.value.loading=!1,r.value=[]})}),Y(()=>{b.off("set-sale-order-detail")}),(c,p)=>{var B;const z=f("el-image"),y=f("el-table-column"),R=f("el-table"),O=f("el-button"),x=f("el-empty"),d=E("infinite-scroll"),V=E("loading");return s(),o("div",Fe,[t.value.id?$((s(),o("div",Ne,[$((s(),o("div",Ke,[Me,e("div",Ue,[e("div",Pe,[Te,e("div",je,a(t.value.order_id),1)]),e("div",qe,[We,e("div",Ge,a(t.value.total_num||0),1)]),e("div",He,[Je,e("div",Qe,"¥"+a(t.value.pay_price),1)]),e("div",Xe,[Ye,e("div",Ze,a(t.value.pay_time),1)]),e("div",et,[tt,e("div",st,"¥"+a(t.value.deduction_price),1)]),e("div",ot,[it,e("div",at,"¥"+a(t.value.pay_price),1)]),e("div",lt,[nt,e("div",ct,a(t.value.pay_time),1)]),e("div",dt,[_t,e("div",rt,[t.value.pay_type_name?(s(),o("span",vt,a(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ut,"微信收款")):t.value.pay_type==17?(s(),o("span",ft,"现金支付")):t.value.pay_type==13?(s(),o("span",pt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ht,"余额支付")):t.value.pay_type==1?(s(),o("span",yt,"微信支付")):u("",!0)])])]),t.value.uid?(s(),o("div",mt,"用户信息")):u("",!0),t.value.uid?(s(),o("div",kt,[e("div",gt,[$t,e("div",bt,a(t.value.uid),1)]),e("div",wt,[Ct,e("div",xt,a(t.value.nickname),1)]),e("div",Rt,[It,e("div",zt,a(t.value.mobile),1)])])):u("",!0),e("div",Ot,[w(" 共计 "),e("span",Vt,a(((B=t.value.product)==null?void 0:B.length)||" "),1),w(" 款商品 ")]),_(R,{data:t.value.product},{default:m(()=>[_(y,{label:"商品信息"},{default:m(({row:D})=>{var L,S;return[e("div",Bt,[_(z,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(L=D.cart_info)==null?void 0:L.image},null,8,["src"]),e("span",Dt,a((S=D.cart_info)==null?void 0:S.name),1)])]}),_:1}),_(y,{prop:"cart_info.store_info",label:"商品规格",width:"150"}),_(y,{prop:"cart_info.price",label:"单价",width:"150"}),_(y,{prop:"cart_info.cart_num",label:"数量",width:"150"}),_(y,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Lt])),[[d,k]]),e("div",St,[t.value.is_writeoff==0?(s(),N(O,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:g},{default:m(()=>[w("立即核销")]),_:1},8,["disabled"])):u("",!0),t.value.is_writeoff==1?(s(),o("div",At,"该订单已核销")):u("",!0),t.value.is_writeoff==1?(s(),N(O,{key:2,style:{"margin-left":"1rem"},type:"warning",size:"large",onClick:I},{default:m(()=>[w("打印小票")]),_:1})):u("",!0)])])),[[V,h.value]]):(s(),o("div",Et,[_(x,{description:"没找到核销订单信息"})]))])}}},Nt=q(Ft,[["__scopeId","data-v-2bbc8641"]]),Kt={class:"my-card"},Mt={class:"my-code"},Ut=e("h2",null,"订单核销",-1),Pt={class:"box"},Tt=e("span",null,"查看核销记录",-1),Ht={__name:"index",setup(C){const t=l(1),h=l(""),n=l(null),r=l(null),k=()=>{if(h.value=="")return F.error("请输入订单编号");t.value=2,M(()=>{r.value.setCode(h.value)})},g=()=>{t.value=3,M(()=>{r.value.setCode("")})},I=()=>{k()};return H(()=>{M(()=>{n.value.focus()})}),(c,p)=>{const z=f("ArrowRightBold"),y=f("el-icon");return s(),o("div",Kt,[$(e("div",Mt,[Ut,e("div",Pt,[$(e("input",{ref_key:"inputRef",ref:n,"onUpdate:modelValue":p[0]||(p[0]=R=>h.value=R),placeholder:"请输入核销码",class:"input",onKeyup:G(k,["enter"])},null,544),[[te,h.value]]),e("div",{class:"btn",onClick:k},"查询")]),e("div",{class:"to-list",onClick:g},[Tt,_(y,null,{default:m(()=>[_(z)]),_:1})])],512),[[A,t.value==1]]),$(_(Ee,{type:t.value,style:{"flex-shrink":"0"},ref_key:"orderRef",ref:r,onBackOne:p[1]||(p[1]=R=>{t.value=1,h.value=""})},null,8,["type"]),[[A,t.value!=1]]),$(_(le,null,null,512),[[A,t.value!=1]]),$(_(Nt,{ref:"detailRef",onReInit:I},null,512),[[A,t.value!=1]])])}}};export{Ht as default}; diff --git a/dist/assets/index-Ehny8k97.js b/dist/assets/index-DwZFmrrS.js similarity index 98% rename from dist/assets/index-Ehny8k97.js rename to dist/assets/index-DwZFmrrS.js index 1302d90..ae2c9e6 100644 --- a/dist/assets/index-Ehny8k97.js +++ b/dist/assets/index-DwZFmrrS.js @@ -1 +1 @@ -import{_ as K,u as j,r as n,o as q,m as D,a as G,b as u,h as I,c as s,k as a,e,f as d,w as p,g as k,d as O,p as $,i as ee,j as F,F as te,l as se,z as A,t as l,q as H,s as J,I as oe}from"./index-DZ-rs8qe.js";import{u as ae,e as ie}from"./store-eKONkWfH.js";import{h as E}from"./moment-Cl4UOzQZ.js";import{p as le}from"./pay-ZUyBpX9d.js";import{p as ne}from"./padding-CFUD4Y80.js";import"./authCode-CQcCWWpQ.js";/* empty css */const Q=f=>(H("data-v-44031ac3"),f=f(),J(),f),de={class:"my-order"},_e={class:"header-nav"},ce=Q(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),re={class:"nav-item-btn"},ue={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},pe=["onClick"],fe={class:"top"},me={class:"create-time"},he={class:"shop"},ye={class:"left"},ge={class:"shop-name"},ke=Q(()=>e("br",null,null,-1)),$e={style:{display:"block","font-size":"0.8rem",color:"#777"}},be={class:"right"},we={class:"money"},Ce={class:"count"},De={class:"bottom"},Se={class:"pay"},Ve={key:0},Ye={key:1},xe={key:2},ze={key:3},Pe={key:4},Ie={key:5},Re={key:1,style:{color:"#ff4a00"}},Me={key:0,class:"load-end"},Le={key:1,class:"load-end"},Be={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f,{expose:w}){j(),n([]);const t=n(1),m=r=>{_.value.page_no=1,b.value=!1,y.value=!1,c.value=[],g(!0)};n(null);const h=n(""),R=()=>{_.value.start_time=E(h.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=E(h.value[1]).format("YYYY-MM-DD 23:59:59"),g(!0)},S=r=>r.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:""}),y=n(!1),M=n(0),C=n(0),b=n(!1),c=n([]),g=(r=!1)=>{if(r)_.value.page_no=1;else if(b.value||y.value)return;y.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),ae(_.value).then(i=>{r?c.value=i.data.lists:c.value=[...c.value,...i.data.lists],_.value.page_no==1&&c.value.length>0&&D.emit("set-sale-order-detail",c.value[0]),i.data.lists.length<_.value.page_size?b.value=!0:_.value.page_no++,C.value=0,console.log(_.value.page_no),M.value=i.data.count,y.value=!1}).catch(i=>{b.value=!0,y.value=!1})},L=(r,i)=>{C.value=i,D.emit("set-sale-order-detail",r)};return w({getOrderList:g}),q(()=>{D.on("update-sale-order-detail",r=>{console.log("==="),c.value[C.value].paid=1})}),G(()=>{D.off("update-sale-order-detail")}),(r,i)=>{const V=u("el-radio-button"),B=u("el-radio-group"),N=u("el-date-picker"),T=u("CircleClose"),Y=u("el-icon"),x=u("el-button"),z=u("el-input"),P=u("el-image"),W=u("spna"),X=I("loading"),Z=I("infinite-scroll");return s(),a("div",de,[e("div",_e,[ce,e("div",re,[d(B,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=o=>t.value=o),onChange:m,size:"small"},{default:p(()=>[d(V,{value:1},{default:p(()=>[k("全部")]),_:1}),d(V,{value:2},{default:p(()=>[k("未支付")]),_:1})]),_:1},8,["modelValue"]),d(N,{modelValue:h.value,"onUpdate:modelValue":i[1]||(i[1]=o=>h.value=o),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":S,onChange:R,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ue,[d(z,{modelValue:_.value.order_id,"onUpdate:modelValue":i[4]||(i[4]=o=>_.value.order_id=o),placeholder:"请输入订单编号",onKeydown:i[5]||(i[5]=ee(o=>g(!0),["enter"])),onClear:i[6]||(i[6]=o=>g(!0))},{suffix:p(()=>[_.value.order_id!=""?(s(),O(Y,{key:0,size:"18",onClick:i[2]||(i[2]=o=>{_.value.order_id="",g(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:p(()=>[d(T)]),_:1})):$("",!0)]),append:p(()=>[d(x,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[3]||(i[3]=o=>g(!0))},{default:p(()=>[k("搜索")]),_:1})]),_:1},8,["modelValue"])]),F((s(),a("div",ve,[(s(!0),a(te,null,se(c.value,(o,U)=>(s(),a("div",{class:A(["item",{"item-active":C.value==U}]),key:U,onClick:Ft=>L(o,U)},[e("div",fe,[e("div",{class:A(["sn","cahier"])},"单号: "+l(o.order_id),1),e("div",me,l(o.update_time),1)]),e("div",he,[e("div",ye,[d(P,{src:o.store_name_img,class:"shop-img"},null,8,["src"]),e("div",ge,[k(l(o.store_name)+" ",1),ke,e("span",$e,l(o.store_info),1)])]),e("div",be,[e("div",we,"¥"+l(o.price),1),e("div",Ce,"共"+l(o.nums)+"款商品",1)])]),e("div",De,[e("div",Se,[o.paid?(s(),a("div",Ve,[k(l(o.paid_name)+" ",1),o.pay_type_name?(s(),O(W,{key:0},{default:p(()=>[k("("+l(o.pay_type_name)+")",1)]),_:2},1024)):o.pay_type==9?(s(),a("span",Ye,"(微信收款)")):o.pay_type==17?(s(),a("span",xe,"(现金支付)")):o.pay_type==13?(s(),a("span",ze,"(支付宝收款)")):o.pay_type==3?(s(),a("span",Pe,"(余额支付)")):o.pay_type==1?(s(),a("span",Ie,"(微信支付)")):$("",!0)])):(s(),a("div",Re,l(o.paid_name),1))])])],10,pe))),128)),b.value?(s(),a("div",Me,"没有更多了")):$("",!0),y.value?(s(),a("div",Le,"加载中...")):$("",!0)])),[[X,y.value],[Z,g]])])}}},Ne=K(Be,[["__scopeId","data-v-44031ac3"]]),v=f=>(H("data-v-065ffd6b"),f=f(),J(),f),Te={class:"my-order"},Ue={key:0,class:"detail"},Fe={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Oe=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Ae={class:"table-info"},Ee={class:"info-item"},Ke=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},Ge=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),He={class:"info-item-info"},Je={class:"info-item"},Qe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),We={class:"info-item-info"},Xe={class:"info-item"},Ze=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},rt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ut={class:"info-item-info"},vt={key:0},pt={key:1},ft={key:2},mt={key:3},ht={key:4},yt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info"},$t={class:"info-item"},bt=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),wt={class:"info-item-info"},Ct={class:"info-item"},Dt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),St={class:"info-item-info"},Vt={class:"info-item"},Yt=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),xt={class:"info-item-info"},zt={style:{"font-size":"0.9rem"}},Pt={style:{color:"#ff4a00"}},It={style:{display:"flex","align-items":"center"}},Rt={style:{"margin-left":"0.5rem"}},Mt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),Lt={key:0,class:"footer"},Bt={key:1},Nt={__name:"detail",emits:["rePaySuccess"],setup(f,{emit:w}){j(),oe();const t=n({id:""});n([]);const m=n(null),h=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const R=()=>{m.value.setForm({isRePay:!0,data:t.value}),m.value.drawer=!0},S=n({page_no:1,page_size:15,loadend:!1,loading:!1}),_=n([]),y=()=>console.log("触底"),M=()=>{h.value=!0,ie({id:t.value.oid}).then(c=>{t.value=c.data,setTimeout(()=>{h.value=!1},200)})},C=w,b=(c=null)=>{setTimeout(()=>{C("rePaySuccess")})};return q(()=>{D.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,S.value.page_no=1,S.value.loadend=!1,S.value.loading=!1,_.value=[],M()})}),G(()=>{D.off("set-sale-order-detail")}),(c,g)=>{var Y;const L=u("el-image"),r=u("el-table-column"),i=u("el-table"),V=u("el-button"),B=u("el-empty"),N=I("infinite-scroll"),T=I("loading");return s(),a("div",Te,[t.value.id?F((s(),a("div",Ue,[F((s(),a("div",Fe,[Oe,e("div",Ae,[e("div",Ee,[Ke,e("div",je,l(t.value.order_id),1)]),e("div",qe,[Ge,e("div",He,l(t.value.total_num||0),1)]),e("div",Je,[Qe,e("div",We,"¥"+l(t.value.pay_price),1)]),e("div",Xe,[Ze,e("div",et,l(t.value.pay_time),1)]),e("div",tt,[st,e("div",ot,"¥"+l(t.value.deduction_price),1)]),e("div",at,[it,e("div",lt,"¥"+l(t.value.pay_price),1)]),e("div",nt,[dt,e("div",_t,l(t.value.pay_time),1)]),e("div",ct,[rt,e("div",ut,[t.value.pay_type_name?(s(),a("span",vt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),a("span",pt,"微信收款")):t.value.pay_type==17?(s(),a("span",ft,"现金支付")):t.value.pay_type==13?(s(),a("span",mt,"支付宝收款")):t.value.pay_type==3?(s(),a("span",ht,"余额支付")):t.value.pay_type==1?(s(),a("span",yt,"微信支付")):$("",!0)])])]),t.value.uid?(s(),a("div",gt,"用户信息")):$("",!0),t.value.uid?(s(),a("div",kt,[e("div",$t,[bt,e("div",wt,l(t.value.uid),1)]),e("div",Ct,[Dt,e("div",St,l(t.value.nickname),1)]),e("div",Vt,[Yt,e("div",xt,l(t.value.mobile),1)])])):$("",!0),e("div",zt,[k(" 共计 "),e("span",Pt,l(((Y=t.value.product)==null?void 0:Y.length)||" "),1),k(" 款商品 ")]),d(i,{data:t.value.product},{default:p(()=>[d(r,{label:"商品信息"},{default:p(({row:x})=>{var z,P;return[e("div",It,[d(L,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(z=x.cart_info)==null?void 0:z.image},null,8,["src"]),e("span",Rt,l((P=x.cart_info)==null?void 0:P.name),1)])]}),_:1}),d(r,{prop:"cart_info.price",label:"单价",width:"150"}),d(r,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(r,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Mt])),[[N,y]]),t.value.paid?$("",!0):(s(),a("div",Lt,[d(V,{type:"primary",size:"large",onClick:R},{default:p(()=>[k("重新支付")]),_:1})]))])),[[T,h.value]]):(s(),a("div",Bt,[d(B)])),d(le,{ref_key:"payRef",ref:m,onPaySuccess:b},null,512)])}}},Tt=K(Nt,[["__scopeId","data-v-065ffd6b"]]),Ut={class:"my-card"},Ht={__name:"index",setup(f){const w=n(null),t=()=>{var m;(m=w.value)==null||m.getOrderList(!0)};return(m,h)=>(s(),a("div",Ut,[d(Ne,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:w},null,512),d(ne),d(Tt,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{Ht as default}; +import{_ as K,u as j,r as n,o as q,m as D,a as G,b as u,h as I,c as s,k as a,e,f as d,w as p,g as k,d as O,p as $,i as ee,j as F,F as te,l as se,z as A,t as l,q as H,s as J,I as oe}from"./index-El3JpHtp.js";import{u as ae,f as ie}from"./store-D17PfqyZ.js";import{h as E}from"./moment-Cl4UOzQZ.js";import{p as le}from"./pay-DsODbiUT.js";import{p as ne}from"./padding-Cx5iHgRh.js";import"./authCode-p4DlY4hZ.js";/* empty css */const Q=f=>(H("data-v-44031ac3"),f=f(),J(),f),de={class:"my-order"},_e={class:"header-nav"},ce=Q(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),re={class:"nav-item-btn"},ue={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},pe=["onClick"],fe={class:"top"},me={class:"create-time"},he={class:"shop"},ye={class:"left"},ge={class:"shop-name"},ke=Q(()=>e("br",null,null,-1)),$e={style:{display:"block","font-size":"0.8rem",color:"#777"}},be={class:"right"},we={class:"money"},Ce={class:"count"},De={class:"bottom"},Se={class:"pay"},Ve={key:0},Ye={key:1},xe={key:2},ze={key:3},Pe={key:4},Ie={key:5},Re={key:1,style:{color:"#ff4a00"}},Me={key:0,class:"load-end"},Le={key:1,class:"load-end"},Be={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f,{expose:w}){j(),n([]);const t=n(1),m=r=>{_.value.page_no=1,b.value=!1,y.value=!1,c.value=[],g(!0)};n(null);const h=n(""),R=()=>{_.value.start_time=E(h.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=E(h.value[1]).format("YYYY-MM-DD 23:59:59"),g(!0)},S=r=>r.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:""}),y=n(!1),M=n(0),C=n(0),b=n(!1),c=n([]),g=(r=!1)=>{if(r)_.value.page_no=1;else if(b.value||y.value)return;y.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),ae(_.value).then(i=>{r?c.value=i.data.lists:c.value=[...c.value,...i.data.lists],_.value.page_no==1&&c.value.length>0&&D.emit("set-sale-order-detail",c.value[0]),i.data.lists.length<_.value.page_size?b.value=!0:_.value.page_no++,C.value=0,console.log(_.value.page_no),M.value=i.data.count,y.value=!1}).catch(i=>{b.value=!0,y.value=!1})},L=(r,i)=>{C.value=i,D.emit("set-sale-order-detail",r)};return w({getOrderList:g}),q(()=>{D.on("update-sale-order-detail",r=>{console.log("==="),c.value[C.value].paid=1})}),G(()=>{D.off("update-sale-order-detail")}),(r,i)=>{const V=u("el-radio-button"),B=u("el-radio-group"),N=u("el-date-picker"),T=u("CircleClose"),Y=u("el-icon"),x=u("el-button"),z=u("el-input"),P=u("el-image"),W=u("spna"),X=I("loading"),Z=I("infinite-scroll");return s(),a("div",de,[e("div",_e,[ce,e("div",re,[d(B,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=o=>t.value=o),onChange:m,size:"small"},{default:p(()=>[d(V,{value:1},{default:p(()=>[k("全部")]),_:1}),d(V,{value:2},{default:p(()=>[k("未支付")]),_:1})]),_:1},8,["modelValue"]),d(N,{modelValue:h.value,"onUpdate:modelValue":i[1]||(i[1]=o=>h.value=o),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":S,onChange:R,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ue,[d(z,{modelValue:_.value.order_id,"onUpdate:modelValue":i[4]||(i[4]=o=>_.value.order_id=o),placeholder:"请输入订单编号",onKeydown:i[5]||(i[5]=ee(o=>g(!0),["enter"])),onClear:i[6]||(i[6]=o=>g(!0))},{suffix:p(()=>[_.value.order_id!=""?(s(),O(Y,{key:0,size:"18",onClick:i[2]||(i[2]=o=>{_.value.order_id="",g(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:p(()=>[d(T)]),_:1})):$("",!0)]),append:p(()=>[d(x,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[3]||(i[3]=o=>g(!0))},{default:p(()=>[k("搜索")]),_:1})]),_:1},8,["modelValue"])]),F((s(),a("div",ve,[(s(!0),a(te,null,se(c.value,(o,U)=>(s(),a("div",{class:A(["item",{"item-active":C.value==U}]),key:U,onClick:Ft=>L(o,U)},[e("div",fe,[e("div",{class:A(["sn","cahier"])},"单号: "+l(o.order_id),1),e("div",me,l(o.update_time),1)]),e("div",he,[e("div",ye,[d(P,{src:o.store_name_img,class:"shop-img"},null,8,["src"]),e("div",ge,[k(l(o.store_name)+" ",1),ke,e("span",$e,l(o.store_info),1)])]),e("div",be,[e("div",we,"¥"+l(o.price),1),e("div",Ce,"共"+l(o.nums)+"款商品",1)])]),e("div",De,[e("div",Se,[o.paid?(s(),a("div",Ve,[k(l(o.paid_name)+" ",1),o.pay_type_name?(s(),O(W,{key:0},{default:p(()=>[k("("+l(o.pay_type_name)+")",1)]),_:2},1024)):o.pay_type==9?(s(),a("span",Ye,"(微信收款)")):o.pay_type==17?(s(),a("span",xe,"(现金支付)")):o.pay_type==13?(s(),a("span",ze,"(支付宝收款)")):o.pay_type==3?(s(),a("span",Pe,"(余额支付)")):o.pay_type==1?(s(),a("span",Ie,"(微信支付)")):$("",!0)])):(s(),a("div",Re,l(o.paid_name),1))])])],10,pe))),128)),b.value?(s(),a("div",Me,"没有更多了")):$("",!0),y.value?(s(),a("div",Le,"加载中...")):$("",!0)])),[[X,y.value],[Z,g]])])}}},Ne=K(Be,[["__scopeId","data-v-44031ac3"]]),v=f=>(H("data-v-065ffd6b"),f=f(),J(),f),Te={class:"my-order"},Ue={key:0,class:"detail"},Fe={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Oe=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Ae={class:"table-info"},Ee={class:"info-item"},Ke=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},Ge=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),He={class:"info-item-info"},Je={class:"info-item"},Qe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),We={class:"info-item-info"},Xe={class:"info-item"},Ze=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},rt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ut={class:"info-item-info"},vt={key:0},pt={key:1},ft={key:2},mt={key:3},ht={key:4},yt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info"},$t={class:"info-item"},bt=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),wt={class:"info-item-info"},Ct={class:"info-item"},Dt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),St={class:"info-item-info"},Vt={class:"info-item"},Yt=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),xt={class:"info-item-info"},zt={style:{"font-size":"0.9rem"}},Pt={style:{color:"#ff4a00"}},It={style:{display:"flex","align-items":"center"}},Rt={style:{"margin-left":"0.5rem"}},Mt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),Lt={key:0,class:"footer"},Bt={key:1},Nt={__name:"detail",emits:["rePaySuccess"],setup(f,{emit:w}){j(),oe();const t=n({id:""});n([]);const m=n(null),h=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const R=()=>{m.value.setForm({isRePay:!0,data:t.value}),m.value.drawer=!0},S=n({page_no:1,page_size:15,loadend:!1,loading:!1}),_=n([]),y=()=>console.log("触底"),M=()=>{h.value=!0,ie({id:t.value.oid}).then(c=>{t.value=c.data,setTimeout(()=>{h.value=!1},200)})},C=w,b=(c=null)=>{setTimeout(()=>{C("rePaySuccess")})};return q(()=>{D.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,S.value.page_no=1,S.value.loadend=!1,S.value.loading=!1,_.value=[],M()})}),G(()=>{D.off("set-sale-order-detail")}),(c,g)=>{var Y;const L=u("el-image"),r=u("el-table-column"),i=u("el-table"),V=u("el-button"),B=u("el-empty"),N=I("infinite-scroll"),T=I("loading");return s(),a("div",Te,[t.value.id?F((s(),a("div",Ue,[F((s(),a("div",Fe,[Oe,e("div",Ae,[e("div",Ee,[Ke,e("div",je,l(t.value.order_id),1)]),e("div",qe,[Ge,e("div",He,l(t.value.total_num||0),1)]),e("div",Je,[Qe,e("div",We,"¥"+l(t.value.pay_price),1)]),e("div",Xe,[Ze,e("div",et,l(t.value.pay_time),1)]),e("div",tt,[st,e("div",ot,"¥"+l(t.value.deduction_price),1)]),e("div",at,[it,e("div",lt,"¥"+l(t.value.pay_price),1)]),e("div",nt,[dt,e("div",_t,l(t.value.pay_time),1)]),e("div",ct,[rt,e("div",ut,[t.value.pay_type_name?(s(),a("span",vt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),a("span",pt,"微信收款")):t.value.pay_type==17?(s(),a("span",ft,"现金支付")):t.value.pay_type==13?(s(),a("span",mt,"支付宝收款")):t.value.pay_type==3?(s(),a("span",ht,"余额支付")):t.value.pay_type==1?(s(),a("span",yt,"微信支付")):$("",!0)])])]),t.value.uid?(s(),a("div",gt,"用户信息")):$("",!0),t.value.uid?(s(),a("div",kt,[e("div",$t,[bt,e("div",wt,l(t.value.uid),1)]),e("div",Ct,[Dt,e("div",St,l(t.value.nickname),1)]),e("div",Vt,[Yt,e("div",xt,l(t.value.mobile),1)])])):$("",!0),e("div",zt,[k(" 共计 "),e("span",Pt,l(((Y=t.value.product)==null?void 0:Y.length)||" "),1),k(" 款商品 ")]),d(i,{data:t.value.product},{default:p(()=>[d(r,{label:"商品信息"},{default:p(({row:x})=>{var z,P;return[e("div",It,[d(L,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(z=x.cart_info)==null?void 0:z.image},null,8,["src"]),e("span",Rt,l((P=x.cart_info)==null?void 0:P.name),1)])]}),_:1}),d(r,{prop:"cart_info.price",label:"单价",width:"150"}),d(r,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(r,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Mt])),[[N,y]]),t.value.paid?$("",!0):(s(),a("div",Lt,[d(V,{type:"primary",size:"large",onClick:R},{default:p(()=>[k("重新支付")]),_:1})]))])),[[T,h.value]]):(s(),a("div",Bt,[d(B)])),d(le,{ref_key:"payRef",ref:m,onPaySuccess:b},null,512)])}}},Tt=K(Nt,[["__scopeId","data-v-065ffd6b"]]),Ut={class:"my-card"},Ht={__name:"index",setup(f){const w=n(null),t=()=>{var m;(m=w.value)==null||m.getOrderList(!0)};return(m,h)=>(s(),a("div",Ut,[d(Ne,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:w},null,512),d(ne),d(Tt,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{Ht as default}; diff --git a/dist/assets/index-DZ-rs8qe.js b/dist/assets/index-El3JpHtp.js similarity index 99% rename from dist/assets/index-DZ-rs8qe.js rename to dist/assets/index-El3JpHtp.js index 01f9a15..fc71f77 100644 --- a/dist/assets/index-DZ-rs8qe.js +++ b/dist/assets/index-El3JpHtp.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-BJyMI5XA.js","./store-eKONkWfH.js","./user-C_IO-ELJ.js","./moment-Cl4UOzQZ.js","./padding-CFUD4Y80.js","./axiosAPI-CvHIP5YD.js","./shop-4Vi_GXIy.js","./pay-ZUyBpX9d.js","./authCode-CQcCWWpQ.js","./pay-iBTP5sC1.css","./index-Bl7sBKmH.css","./index-C3nn8uGl.js","./index-SMf-FFTg.css","./index-DfjV6Hzh.js","./index-AtTGIc6u.css","./index-Ehny8k97.js","./index-N9EvKsCT.css","./index-BkeE1FsL.js","./index-ZYBKJJNc.css","./index-Iipf9fR_.js","./index-D4JTEzRG.css","./index-SeybCiti.js","./index-Bfak7bLR.css","./index-CJCLRir3.js","./index-DjJP7Zaf.css","./index-IkG_7g88.js","./index-CCSaqPZy.css","./test-PoA383m7.js","./test-CmC8-tN2.css","./index-sgdN7oBe.js","./index-BA6nwZsc.css"] + __vite__mapDeps.viteFileDeps = ["./index-BoKKYodA.js","./store-D17PfqyZ.js","./user-BasTd-eJ.js","./moment-Cl4UOzQZ.js","./padding-Cx5iHgRh.js","./axiosAPI-m7QjxXd9.js","./shop-DHOKo0Qh.js","./pay-DsODbiUT.js","./authCode-p4DlY4hZ.js","./pay-iBTP5sC1.css","./index-Bl7sBKmH.css","./index-rTWTv0oF.js","./index-BJ5fek4I.css","./index-gNE3niRs.js","./index-AtTGIc6u.css","./index-DwZFmrrS.js","./index-N9EvKsCT.css","./index-NZsfYC8a.js","./index-ZYBKJJNc.css","./index-Df7OKyCV.js","./index-BSYTbHMK.css","./index-DbTF6P8n.js","./index-Bfak7bLR.css","./index-CQ53hTlw.js","./index-DjJP7Zaf.css","./index-BzqFTEfY.js","./index-CCSaqPZy.css","./test-2qMQQxfe.js","./test-CmC8-tN2.css","./index-fh-7oYYX.js","./index-BA6nwZsc.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -102,4 +102,4 @@ function __vite__mapDeps(indexes) { `,n+=sl(" ")+` `,n+=T4()+`欢迎下次光临! `,n+=Yce(" ")+` -`,n+=Xce(),n},Sv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=e=>(Vw("data-v-fa9ee521"),e=e(),Bw(),e),Qce={class:"my-card"},ede={class:"card-header"},tde={style:{width:"4.5rem"}},nde=Ii(()=>k("div",{class:"card-title"},"泸优采收银系统",-1)),ode={style:{"margin-left":"1rem",display:"flex","flex-direction":"column","justify-content":"center",cursor:"pointer"}},rde={class:"card-body"},ade={style:{"margin-right":"1rem"}},lde=Ii(()=>k("span",null,"打印自检",-1)),sde={key:0,style:{"margin-right":"1rem"}},ide=Ii(()=>k("span",null,"点击自动连接打印机",-1)),ude=Ii(()=>k("div",null,"已连接打印机T58",-1)),cde={style:{"font-size":"0.7rem",color:"#ccc"}},dde=Ii(()=>k("span",null,"打印机已连接,是否重新连接",-1)),fde={class:"dialog-footer"},pde={class:"el-dropdown-link"},vde={class:"info"},hde={__name:"myHeader",setup(e){const t=bd(),n=qce(),o=L({});o.value=t.userInfo;const r=hb(),a=()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")},l=()=>{window.location.reload()},s=L(!1),u=()=>{console.log("连接打印机"),uni.getEnv(h=>{h.h5?no.error("请使用APP连接打印机"):(n.setConnect(!1),n.setPrintAddress(""),s.value=!1,uni.postMessage({data:{type:"connect"}}))})};let c=!1;const f=(h="")=>{console.log("预打印"),console.log(Ef(h,!0)),!c&&(c=!0,uni.getEnv(m=>{m.h5?(no.error("请使用APP打印小票"),c=!1):(p(h),setTimeout(()=>{c=!1},4e3))}))},d=(h="")=>{console.log("预打印");let m=Ef(h,!0);console.log(m),!c&&(c=!0,uni.getEnv(v=>{v.h5?(no.error("请使用APP打印小票"),c=!1):(p(m),setTimeout(()=>{c=!1},4e3))}))},p=(h="")=>{let m="";h===""?(m=Ef({},!0),console.log(m)):m=h,uni.postMessage({data:{type:"print",content:m}})};return et(()=>{Yt.on("printReceipt",f),Yt.on("letPrintReceipt",d),window.addEventListener("message",function(h){if(h.data.type==="connect"){let m=h.data.data.address;n.setConnect(!0),n.setPrintAddress(m),no.success("已连接打印机T58("+m+")")}},!1)}),xo(()=>{Yt.off("printReceipt",f),Yt.off("letPrintReceipt",d)}),(h,m)=>{const v=Ze("el-image"),_=Ze("Refresh"),g=Ze("el-icon"),w=Ze("el-button"),y=Ze("el-dialog"),C=Ze("el-avatar"),E=Ze("arrow-down"),x=Ze("el-dropdown-item"),A=Ze("el-dropdown-menu"),T=Ze("el-dropdown");return b(),M("div",Qce,[k("div",ede,[k("div",tde,[W(v,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),nde,k("div",ode,[W(g,{color:"#fff",size:"25",onClick:l},{default:X(()=>[W(_)]),_:1})])]),k("div",rde,[k("div",ade,[W(w,{onClick:m[0]||(m[0]=R=>i(Yt).emit("letPrintReceipt")),type:"primary"},{default:X(()=>[lde]),_:1})]),!i(n).is_connect||!i(n).printAddress?(b(),M("div",sde,[W(w,{onClick:u,type:"warning"},{default:X(()=>[ide]),_:1})])):(b(),M("div",{key:1,style:{"margin-right":"1rem","font-size":"0.9rem"},onClick:m[1]||(m[1]=R=>s.value=!0)},[ude,k("div",cde,"("+Te(i(n).printAddress)+")",1)])),W(y,{modelValue:s.value,"onUpdate:modelValue":m[3]||(m[3]=R=>s.value=R),title:"提示",width:"500"},{footer:X(()=>[k("div",fde,[W(w,{onClick:m[2]||(m[2]=R=>s.value=!1)},{default:X(()=>[mt("取消")]),_:1}),W(w,{type:"primary",onClick:u},{default:X(()=>[mt(" 重新连接 ")]),_:1})])]),default:X(()=>[dde]),_:1},8,["modelValue"]),W(T,{trigger:"hover"},{dropdown:X(()=>[W(A,null,{default:X(()=>[W(x,{onClick:a},{default:X(()=>[mt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",pde,[W(C,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",vde,[k("div",null,Te(o.value.name),1),k("div",null,"("+Te(o.value.role_name)+")",1)]),W(g,{class:"el-icon--right"},{default:X(()=>[W(E)]),_:1})])]),_:1})])])}}},mde=Sv(hde,[["__scopeId","data-v-fa9ee521"]]),gde=mv("order",()=>{const e=L(localStorage.getItem("orderCount")||0);return{orderCount:e,setOrderCount:n=>{e.value=n,localStorage.setItem("orderCount",n)}}}),yde={class:"my-card"},_de=["onClick"],bde={key:0,class:"badge"},wde={__name:"myAside",setup(e){const t=hb(),n=bue(),o=gde(),r=(d=1)=>{o.setOrderCount(d),u.value.forEach(p=>{p.name=="order"&&(p.count=d)})};let a=!1;const l=d=>{try{if(r(0),no.success("您有新的订单"),a)return;var p=new Audio("/public/order.mp3");p.play(),a=!0,console.log("播放中"),p.addEventListener("ended",function(){a=!1})}catch(h){console.error(h),a=!1,no.error("播放失败")}},s=d=>{t.push({name:d})},u=L([{name:"saleHome",title:"收银",ico:"Sell",count:0},{name:"saleOrder",title:"收银订单",ico:"DataLine",count:0},{name:"order",title:"线上订单",ico:"DataAnalysis",count:0},{name:"convert",title:"订单核销",ico:"FullScreen",count:0},{name:"putStorage",title:"入库登记",ico:"Van",count:0},{name:"stock",title:"商品库存",ico:"Box",count:0},{name:"user",title:"用户",ico:"User",count:0}]),c=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==0&&(d=u.value.length),d>0&&s(u.value[d-1].name)},f=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==u.value.length-1&&(d=-1),d{Yt.on("up",c),Yt.on("down",f),Yt.on("new_order",l),Yt.on("set-order-count-zero",()=>{r(0)}),r(0)}),xo(()=>{Yt.off("aup",c),Yt.off("adown",f),Yt.off("new_order",l),Yt.on("set-order-count-zero")}),(d,p)=>{const h=Ze("el-icon");return b(),M("div",yde,[(b(!0),M(Fe,null,ht(u.value,m=>(b(),M("div",{key:m.name,class:$(["list-item",{active:i(n).name==m.name}]),onClick:v=>s(m.name)},[W(h,{size:"2rem"},{default:X(()=>[(b(),le(st(m.ico)))]),_:2},1024),k("div",null,Te(m.title),1),m.count?(b(),M("div",bde,Te(m.count),1)):ne("",!0)],10,_de))),128))])}}},Cde=Sv(wde,[["__scopeId","data-v-24f75199"]]),Oo=function e(t){this.doNotConnect=0,t=t||{},t.heartbeat=t.heartbeat||25e3,t.pingTimeout=t.pingTimeout||1e4,this.config=t,this.uid=0,this.channels={},this.connection=null,this.pingTimeoutTimer=0,e.instances.push(this),this.createConnection()};Oo.prototype.checkoutPing=function(){var e=this;e.checkoutPingTimer&&clearTimeout(e.checkoutPingTimer),e.checkoutPingTimer=setTimeout(function(){e.checkoutPingTimer=0,e.connection.state==="connected"&&(e.connection.send('{"event":"pusher:ping","data":{}}'),e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),e.pingTimeoutTimer=setTimeout(function(){e.connection.closeAndClean(),e.connection.doNotConnect||e.connection.waitReconnect()},e.config.pingTimeout))},this.config.heartbeat)};Oo.prototype.channel=function(e){return this.channels.find(e)};Oo.prototype.allChannels=function(){return this.channels.all()};Oo.prototype.createConnection=function(){if(this.connection)throw Error("Connection already exist");var e=this,t=this.config.url;function n(){for(var o in e.channels)e.channels[o].subscribed=!1}this.connection=new Qa({url:t,app_key:this.config.app_key,onOpen:function(){e.connection.state="connecting",e.checkoutPing()},onMessage:function(o){e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),o=JSON.parse(o.data);var r=o.event,a=o.channel;if(r==="pusher:pong"){e.checkoutPing();return}if(r==="pusher:error")throw Error(o.data.message);var l=JSON.parse(o.data),s;if(r==="pusher_internal:subscription_succeeded"){s=e.channels[a],s.subscribed=!0,s.processQueue(),s.emit("pusher:subscription_succeeded");return}if(r==="pusher:connection_established"&&(e.connection.socket_id=l.socket_id,e.connection.updateNetworkState("connected"),e.subscribeAll()),r.indexOf("pusher_internal")!==-1){console.log("Event '"+r+"' not implement");return}s=e.channels[a],s&&s.emit(r,l)},onClose:function(){n()},onError:function(){n()}})};Oo.prototype.disconnect=function(){this.connection.doNotConnect=1,this.connection.close()};Oo.prototype.subscribeAll=function(){if(this.connection.state==="connected")for(var e in this.channels)this.channels[e].processSubscribe()};Oo.prototype.unsubscribe=function(e){this.channels[e]&&(delete this.channels[e],this.connection.state==="connected"&&this.connection.send(JSON.stringify({event:"pusher:unsubscribe",data:{channel:e}})))};Oo.prototype.unsubscribeAll=function(){var e=Object.keys(this.channels);if(e.length&&this.connection.state==="connected")for(var t in this.channels)this.unsubscribe(t);this.channels={}};Oo.prototype.subscribe=function(e){return this.channels[e]?this.channels[e]:e.indexOf("private-")===0?Kb(e,this):e.indexOf("presence-")===0?kde(e,this):Sde(e,this)};Oo.instances=[];function Sde(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){t.connection.send(JSON.stringify({event:"pusher:subscribe",data:{channel:e}}))},n.processSubscribe(),n}function Kb(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){xde({url:t.config.auth,type:"POST",data:{channel_name:e,socket_id:t.connection.socket_id},success:function(o){o=JSON.parse(o),o.channel=e,t.connection.send(JSON.stringify({event:"pusher:subscribe",data:o}))},error:function(o){throw Error(o)}})},n.processSubscribe(),n}function kde(e,t){return Kb(e,t)}function Qa(e){this.dispatcher=new jb,Wb(this,this.dispatcher);var t=["on","off","emit"];for(var n in t)this[t[n]]=this.dispatcher[t[n]];this.options=e,this.state="initialized",this.doNotConnect=0,this.reconnectInterval=1,this.connection=null,this.reconnectTimer=0,this.connect()}Qa.prototype.updateNetworkState=function(e){var t=this.state;this.state=e,t!==e&&this.emit("state_change",{previous:t,current:e})};Qa.prototype.connect=function(){if(this.doNotConnect=0,this.state==="connected"){console.log('networkState is "'+this.state+'" and do not need connect');return}this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=0),this.closeAndClean();var e=this.options,t=new WebSocket(e.url+"/app/"+e.app_key);this.updateNetworkState("connecting");var n=this;t.onopen=function(o){if(n.reconnectInterval=1,n.doNotConnect){n.updateNetworkState("disconnected"),t.close();return}e.onOpen&&e.onOpen(o)},e.onMessage&&(t.onmessage=e.onMessage),t.onclose=function(o){t.onmessage=t.onopen=t.onclose=t.onerror=null,n.updateNetworkState("disconnected"),n.doNotConnect||n.waitReconnect(),e.onClose&&e.onClose(o)},t.onerror=function(o){n.close(),n.doNotConnect||n.waitReconnect(),e.onError&&e.onError(o)},this.connection=t};Qa.prototype.closeAndClean=function(){if(this.connection){var e=this.connection;e.onmessage=e.onopen=e.onclose=e.onerror=null;try{e.close()}catch{}this.updateNetworkState("disconnected")}};Qa.prototype.waitReconnect=function(){if(!(this.state==="connected"||this.state==="connecting")&&!this.doNotConnect){this.updateNetworkState("connecting");var e=this;this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout(function(){e.connect()},this.reconnectInterval),this.reconnectInterval<1e3?this.reconnectInterval=1e3:this.reconnectInterval=this.reconnectInterval*2,this.reconnectInterval>2e3&&navigator.onLine&&(e.reconnectInterval=2e3)}};Qa.prototype.send=function(e){if(this.state!=="connected"){console.trace('networkState is "'+this.state+'", can not send '+e);return}this.connection.send(e)};Qa.prototype.close=function(){this.updateNetworkState("disconnected"),this.connection.close()};var Wb=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)};function Li(e,t){this.subscribed=!1,this.dispatcher=new jb,this.connection=e,this.channelName=t,this.subscribeCb=null,this.queue=[],Wb(this,this.dispatcher);var n=["on","off","emit"];for(var o in n)this[n[o]]=this.dispatcher[n[o]]}Li.prototype.processSubscribe=function(){this.connection.state==="connected"&&this.subscribeCb()};Li.prototype.processQueue=function(){if(!(this.connection.state!=="connected"||!this.subscribed)){for(var e in this.queue)this.queue[e]();this.queue=[]}};Li.prototype.trigger=function(e,t){if(e.indexOf("client-")!==0)throw new Error("Event '"+e+"' should start with 'client-'");var n=this;this.queue.push(function(){n.connection.send(JSON.stringify({event:e,data:t,channel:n.channelName}))}),this.processQueue()};var vu=function(){var e={};function t(y){for(var C=[],E=1;E0)for(o=0;o=200&&n<300?e.success&&e.success(t.responseText,t.responseXML):e.error&&e.error(n)}},e.type==="GET"?(t.open("GET",e.url+"?"+params,!0),t.send(null)):e.type==="POST"&&(t.open("POST",e.url,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(params))}function Mde(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}const Tde={class:"common-layout"},$de={__name:"index",setup(e){const t=bd(),o=new Oo({url:"wss://test-multi-store.lihaink.cn/pull",app_key:"2ce3ce22329517213caa7dad261f5695"}).subscribe(`store_merchant_${t.userInfo.store_id}`);o.on("message",function(a){var l,s,u,c,f,d,p,h,m;console.log("收到消息--",a);try{((l=a==null?void 0:a.content)==null?void 0:l.type)=="cash_register"&&((s=a==null?void 0:a.content)==null?void 0:s.msg)=="您有一笔订单已支付"&&Yt.emit("pay_success",(u=a==null?void 0:a.content)==null?void 0:u.data),((c=a==null?void 0:a.content)==null?void 0:c.type)=="store_merchant"&&((f=a==null?void 0:a.content)==null?void 0:f.msg)=="您有一笔新的订单"&&Yt.emit("new_order",a==null?void 0:a.content),((d=a==null?void 0:a.content)==null?void 0:d.type)=="platform_print"&&Yt.emit("letPrintReceipt",(p=a==null?void 0:a.content)==null?void 0:p.data),((h=a==null?void 0:a.content)==null?void 0:h.msg)=="订单支付成功"&&Yt.emit("pay_user_success",(m=a==null?void 0:a.content)==null?void 0:m.data)}catch{}}),o.on("close",function(){});const r=a=>{console.log("按下",a.keyCode),a.keyCode==16&&Yt.emit("shift"),a.keyCode==120&&Yt.emit("F9"),a.keyCode==13&&Yt.emit("enter"),a.keyCode==37&&Yt.emit("left"),a.keyCode==39&&Yt.emit("right"),a.keyCode==38&&Yt.emit("up"),a.keyCode==40&&Yt.emit("down"),a.keyCode==46&&Yt.emit("delete")};return et(()=>{window.addEventListener("keydown",r),console.log("开启键盘监听")}),xo(()=>{window.removeEventListener("keydown",r),console.log("关闭键盘监听")}),(a,l)=>{const s=Ze("el-header"),u=Ze("el-aside"),c=Ze("router-view"),f=Ze("el-main"),d=Ze("el-container");return b(),M("div",Tde,[W(d,null,{default:X(()=>[W(s,null,{default:X(()=>[W(mde)]),_:1}),W(d,null,{default:X(()=>[W(u,{width:"6.25rem"},{default:X(()=>[W(Cde)]),_:1}),W(f,{style:{color:"#333"}},{default:X(()=>[W(c,{class:"my-main"},{default:X(({Component:p})=>[W(nn,{name:"el-zoom-in-top"},{default:X(()=>[(b(),le(st(p)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Ode=Sv($de,[["__scopeId","data-v-6c618134"]]),Ade=[{path:"/",name:"layout",component:Ode,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>qn(()=>import("./index-BJyMI5XA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"收银订单"},component:()=>qn(()=>import("./index-C3nn8uGl.js"),__vite__mapDeps([11,1,3,7,8,9,4,12]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>qn(()=>import("./index-DfjV6Hzh.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/subOrder",name:"subOrder",meta:{title:"订单统计"},component:()=>qn(()=>import("./index-Ehny8k97.js"),__vite__mapDeps([15,1,3,7,8,9,4,16]),import.meta.url)},{path:"/order",name:"order",meta:{title:"预约取货"},component:()=>qn(()=>import("./index-DfjV6Hzh.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>qn(()=>import("./index-BkeE1FsL.js"),__vite__mapDeps([17,3,4,18]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>qn(()=>import("./index-Iipf9fR_.js"),__vite__mapDeps([19,1,4,20,9]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>qn(()=>import("./index-SeybCiti.js"),__vite__mapDeps([21,6,5,22]),import.meta.url)},{path:"/stock",name:"stock",meta:{title:"入库登记"},component:()=>qn(()=>import("./index-CJCLRir3.js"),__vite__mapDeps([23,6,5,24]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>qn(()=>import("./index-IkG_7g88.js"),__vite__mapDeps([25,2,3,5,8,1,4,26]),import.meta.url)},{path:"/test",name:"test",component:()=>qn(()=>import("./test-PoA383m7.js"),__vite__mapDeps([27,28]),import.meta.url)}]},{path:"/login",name:"login",component:()=>qn(()=>import("./index-sgdN7oBe.js"),__vite__mapDeps([29,2,30]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>qn(()=>import("./index-B77lOgPy.js"),__vite__mapDeps([]),import.meta.url)}],qb=yue({history:Uie(),routes:Ade});qb.beforeEach((e,t,n)=>{const o=bd();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ub=qb,Vi=Fg(g9);for(const[e,t]of Object.entries(qL))Vi.component(e,t);const Nde=Cue();Vi.use(Ub);Vi.use(Nde);Vi.use(fie,{locale:pie});Vi.mount("#app");export{cr as A,Jse as B,cie as C,Sse as D,no as E,Fe as F,wt as G,bue as H,hb as I,S as J,Db as K,bt as L,Op as M,De as N,un as O,Wce as P,Ub as Q,Sv as _,xo as a,Ze as b,b as c,le as d,k as e,W as f,mt as g,Pc as h,Mt as i,tt as j,M as k,ht as l,Yt as m,We as n,et as o,ne as p,Vw as q,L as r,Bw as s,Te as t,bd as u,kr as v,X as w,Er as x,i as y,$ as z}; +`,n+=Xce(),n},Sv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=e=>(Vw("data-v-fa9ee521"),e=e(),Bw(),e),Qce={class:"my-card"},ede={class:"card-header"},tde={style:{width:"4.5rem"}},nde=Ii(()=>k("div",{class:"card-title"},"泸优采收银系统",-1)),ode={style:{"margin-left":"1rem",display:"flex","flex-direction":"column","justify-content":"center",cursor:"pointer"}},rde={class:"card-body"},ade={style:{"margin-right":"1rem"}},lde=Ii(()=>k("span",null,"打印自检",-1)),sde={key:0,style:{"margin-right":"1rem"}},ide=Ii(()=>k("span",null,"点击自动连接打印机",-1)),ude=Ii(()=>k("div",null,"已连接打印机T58",-1)),cde={style:{"font-size":"0.7rem",color:"#ccc"}},dde=Ii(()=>k("span",null,"打印机已连接,是否重新连接",-1)),fde={class:"dialog-footer"},pde={class:"el-dropdown-link"},vde={class:"info"},hde={__name:"myHeader",setup(e){const t=bd(),n=qce(),o=L({});o.value=t.userInfo;const r=hb(),a=()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")},l=()=>{window.location.reload()},s=L(!1),u=()=>{console.log("连接打印机"),uni.getEnv(h=>{h.h5?no.error("请使用APP连接打印机"):(n.setConnect(!1),n.setPrintAddress(""),s.value=!1,uni.postMessage({data:{type:"connect"}}))})};let c=!1;const f=(h="")=>{console.log("预打印"),console.log(Ef(h,!0)),!c&&(c=!0,uni.getEnv(m=>{m.h5?(no.error("请使用APP打印小票"),c=!1):(p(h),setTimeout(()=>{c=!1},4e3))}))},d=(h="")=>{console.log("预打印");let m=Ef(h,!0);console.log(m),!c&&(c=!0,uni.getEnv(v=>{v.h5?(no.error("请使用APP打印小票"),c=!1):(p(m),setTimeout(()=>{c=!1},4e3))}))},p=(h="")=>{let m="";h===""?(m=Ef({},!0),console.log(m)):m=h,uni.postMessage({data:{type:"print",content:m}})};return et(()=>{Yt.on("printReceipt",f),Yt.on("letPrintReceipt",d),window.addEventListener("message",function(h){if(h.data.type==="connect"){let m=h.data.data.address;n.setConnect(!0),n.setPrintAddress(m),no.success("已连接打印机T58("+m+")")}},!1)}),xo(()=>{Yt.off("printReceipt",f),Yt.off("letPrintReceipt",d)}),(h,m)=>{const v=Ze("el-image"),_=Ze("Refresh"),g=Ze("el-icon"),w=Ze("el-button"),y=Ze("el-dialog"),C=Ze("el-avatar"),E=Ze("arrow-down"),x=Ze("el-dropdown-item"),A=Ze("el-dropdown-menu"),T=Ze("el-dropdown");return b(),M("div",Qce,[k("div",ede,[k("div",tde,[W(v,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),nde,k("div",ode,[W(g,{color:"#fff",size:"25",onClick:l},{default:X(()=>[W(_)]),_:1})])]),k("div",rde,[k("div",ade,[W(w,{onClick:m[0]||(m[0]=R=>i(Yt).emit("letPrintReceipt")),type:"primary"},{default:X(()=>[lde]),_:1})]),!i(n).is_connect||!i(n).printAddress?(b(),M("div",sde,[W(w,{onClick:u,type:"warning"},{default:X(()=>[ide]),_:1})])):(b(),M("div",{key:1,style:{"margin-right":"1rem","font-size":"0.9rem"},onClick:m[1]||(m[1]=R=>s.value=!0)},[ude,k("div",cde,"("+Te(i(n).printAddress)+")",1)])),W(y,{modelValue:s.value,"onUpdate:modelValue":m[3]||(m[3]=R=>s.value=R),title:"提示",width:"500"},{footer:X(()=>[k("div",fde,[W(w,{onClick:m[2]||(m[2]=R=>s.value=!1)},{default:X(()=>[mt("取消")]),_:1}),W(w,{type:"primary",onClick:u},{default:X(()=>[mt(" 重新连接 ")]),_:1})])]),default:X(()=>[dde]),_:1},8,["modelValue"]),W(T,{trigger:"hover"},{dropdown:X(()=>[W(A,null,{default:X(()=>[W(x,{onClick:a},{default:X(()=>[mt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",pde,[W(C,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",vde,[k("div",null,Te(o.value.name),1),k("div",null,"("+Te(o.value.role_name)+")",1)]),W(g,{class:"el-icon--right"},{default:X(()=>[W(E)]),_:1})])]),_:1})])])}}},mde=Sv(hde,[["__scopeId","data-v-fa9ee521"]]),gde=mv("order",()=>{const e=L(localStorage.getItem("orderCount")||0);return{orderCount:e,setOrderCount:n=>{e.value=n,localStorage.setItem("orderCount",n)}}}),yde={class:"my-card"},_de=["onClick"],bde={key:0,class:"badge"},wde={__name:"myAside",setup(e){const t=hb(),n=bue(),o=gde(),r=(d=1)=>{o.setOrderCount(d),u.value.forEach(p=>{p.name=="order"&&(p.count=d)})};let a=!1;const l=d=>{try{if(r(0),no.success("您有新的订单"),a)return;var p=new Audio("/public/order.mp3");p.play(),a=!0,console.log("播放中"),p.addEventListener("ended",function(){a=!1})}catch(h){console.error(h),a=!1,no.error("播放失败")}},s=d=>{t.push({name:d})},u=L([{name:"saleHome",title:"收银",ico:"Sell",count:0},{name:"saleOrder",title:"收银订单",ico:"DataLine",count:0},{name:"order",title:"线上订单",ico:"DataAnalysis",count:0},{name:"convert",title:"订单核销",ico:"FullScreen",count:0},{name:"putStorage",title:"入库登记",ico:"Van",count:0},{name:"stock",title:"商品库存",ico:"Box",count:0},{name:"user",title:"用户",ico:"User",count:0}]),c=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==0&&(d=u.value.length),d>0&&s(u.value[d-1].name)},f=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==u.value.length-1&&(d=-1),d{Yt.on("up",c),Yt.on("down",f),Yt.on("new_order",l),Yt.on("set-order-count-zero",()=>{r(0)}),r(0)}),xo(()=>{Yt.off("aup",c),Yt.off("adown",f),Yt.off("new_order",l),Yt.on("set-order-count-zero")}),(d,p)=>{const h=Ze("el-icon");return b(),M("div",yde,[(b(!0),M(Fe,null,ht(u.value,m=>(b(),M("div",{key:m.name,class:$(["list-item",{active:i(n).name==m.name}]),onClick:v=>s(m.name)},[W(h,{size:"2rem"},{default:X(()=>[(b(),le(st(m.ico)))]),_:2},1024),k("div",null,Te(m.title),1),m.count?(b(),M("div",bde,Te(m.count),1)):ne("",!0)],10,_de))),128))])}}},Cde=Sv(wde,[["__scopeId","data-v-24f75199"]]),Oo=function e(t){this.doNotConnect=0,t=t||{},t.heartbeat=t.heartbeat||25e3,t.pingTimeout=t.pingTimeout||1e4,this.config=t,this.uid=0,this.channels={},this.connection=null,this.pingTimeoutTimer=0,e.instances.push(this),this.createConnection()};Oo.prototype.checkoutPing=function(){var e=this;e.checkoutPingTimer&&clearTimeout(e.checkoutPingTimer),e.checkoutPingTimer=setTimeout(function(){e.checkoutPingTimer=0,e.connection.state==="connected"&&(e.connection.send('{"event":"pusher:ping","data":{}}'),e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),e.pingTimeoutTimer=setTimeout(function(){e.connection.closeAndClean(),e.connection.doNotConnect||e.connection.waitReconnect()},e.config.pingTimeout))},this.config.heartbeat)};Oo.prototype.channel=function(e){return this.channels.find(e)};Oo.prototype.allChannels=function(){return this.channels.all()};Oo.prototype.createConnection=function(){if(this.connection)throw Error("Connection already exist");var e=this,t=this.config.url;function n(){for(var o in e.channels)e.channels[o].subscribed=!1}this.connection=new Qa({url:t,app_key:this.config.app_key,onOpen:function(){e.connection.state="connecting",e.checkoutPing()},onMessage:function(o){e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),o=JSON.parse(o.data);var r=o.event,a=o.channel;if(r==="pusher:pong"){e.checkoutPing();return}if(r==="pusher:error")throw Error(o.data.message);var l=JSON.parse(o.data),s;if(r==="pusher_internal:subscription_succeeded"){s=e.channels[a],s.subscribed=!0,s.processQueue(),s.emit("pusher:subscription_succeeded");return}if(r==="pusher:connection_established"&&(e.connection.socket_id=l.socket_id,e.connection.updateNetworkState("connected"),e.subscribeAll()),r.indexOf("pusher_internal")!==-1){console.log("Event '"+r+"' not implement");return}s=e.channels[a],s&&s.emit(r,l)},onClose:function(){n()},onError:function(){n()}})};Oo.prototype.disconnect=function(){this.connection.doNotConnect=1,this.connection.close()};Oo.prototype.subscribeAll=function(){if(this.connection.state==="connected")for(var e in this.channels)this.channels[e].processSubscribe()};Oo.prototype.unsubscribe=function(e){this.channels[e]&&(delete this.channels[e],this.connection.state==="connected"&&this.connection.send(JSON.stringify({event:"pusher:unsubscribe",data:{channel:e}})))};Oo.prototype.unsubscribeAll=function(){var e=Object.keys(this.channels);if(e.length&&this.connection.state==="connected")for(var t in this.channels)this.unsubscribe(t);this.channels={}};Oo.prototype.subscribe=function(e){return this.channels[e]?this.channels[e]:e.indexOf("private-")===0?Kb(e,this):e.indexOf("presence-")===0?kde(e,this):Sde(e,this)};Oo.instances=[];function Sde(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){t.connection.send(JSON.stringify({event:"pusher:subscribe",data:{channel:e}}))},n.processSubscribe(),n}function Kb(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){xde({url:t.config.auth,type:"POST",data:{channel_name:e,socket_id:t.connection.socket_id},success:function(o){o=JSON.parse(o),o.channel=e,t.connection.send(JSON.stringify({event:"pusher:subscribe",data:o}))},error:function(o){throw Error(o)}})},n.processSubscribe(),n}function kde(e,t){return Kb(e,t)}function Qa(e){this.dispatcher=new jb,Wb(this,this.dispatcher);var t=["on","off","emit"];for(var n in t)this[t[n]]=this.dispatcher[t[n]];this.options=e,this.state="initialized",this.doNotConnect=0,this.reconnectInterval=1,this.connection=null,this.reconnectTimer=0,this.connect()}Qa.prototype.updateNetworkState=function(e){var t=this.state;this.state=e,t!==e&&this.emit("state_change",{previous:t,current:e})};Qa.prototype.connect=function(){if(this.doNotConnect=0,this.state==="connected"){console.log('networkState is "'+this.state+'" and do not need connect');return}this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=0),this.closeAndClean();var e=this.options,t=new WebSocket(e.url+"/app/"+e.app_key);this.updateNetworkState("connecting");var n=this;t.onopen=function(o){if(n.reconnectInterval=1,n.doNotConnect){n.updateNetworkState("disconnected"),t.close();return}e.onOpen&&e.onOpen(o)},e.onMessage&&(t.onmessage=e.onMessage),t.onclose=function(o){t.onmessage=t.onopen=t.onclose=t.onerror=null,n.updateNetworkState("disconnected"),n.doNotConnect||n.waitReconnect(),e.onClose&&e.onClose(o)},t.onerror=function(o){n.close(),n.doNotConnect||n.waitReconnect(),e.onError&&e.onError(o)},this.connection=t};Qa.prototype.closeAndClean=function(){if(this.connection){var e=this.connection;e.onmessage=e.onopen=e.onclose=e.onerror=null;try{e.close()}catch{}this.updateNetworkState("disconnected")}};Qa.prototype.waitReconnect=function(){if(!(this.state==="connected"||this.state==="connecting")&&!this.doNotConnect){this.updateNetworkState("connecting");var e=this;this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout(function(){e.connect()},this.reconnectInterval),this.reconnectInterval<1e3?this.reconnectInterval=1e3:this.reconnectInterval=this.reconnectInterval*2,this.reconnectInterval>2e3&&navigator.onLine&&(e.reconnectInterval=2e3)}};Qa.prototype.send=function(e){if(this.state!=="connected"){console.trace('networkState is "'+this.state+'", can not send '+e);return}this.connection.send(e)};Qa.prototype.close=function(){this.updateNetworkState("disconnected"),this.connection.close()};var Wb=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)};function Li(e,t){this.subscribed=!1,this.dispatcher=new jb,this.connection=e,this.channelName=t,this.subscribeCb=null,this.queue=[],Wb(this,this.dispatcher);var n=["on","off","emit"];for(var o in n)this[n[o]]=this.dispatcher[n[o]]}Li.prototype.processSubscribe=function(){this.connection.state==="connected"&&this.subscribeCb()};Li.prototype.processQueue=function(){if(!(this.connection.state!=="connected"||!this.subscribed)){for(var e in this.queue)this.queue[e]();this.queue=[]}};Li.prototype.trigger=function(e,t){if(e.indexOf("client-")!==0)throw new Error("Event '"+e+"' should start with 'client-'");var n=this;this.queue.push(function(){n.connection.send(JSON.stringify({event:e,data:t,channel:n.channelName}))}),this.processQueue()};var vu=function(){var e={};function t(y){for(var C=[],E=1;E0)for(o=0;o=200&&n<300?e.success&&e.success(t.responseText,t.responseXML):e.error&&e.error(n)}},e.type==="GET"?(t.open("GET",e.url+"?"+params,!0),t.send(null)):e.type==="POST"&&(t.open("POST",e.url,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(params))}function Mde(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}const Tde={class:"common-layout"},$de={__name:"index",setup(e){const t=bd(),o=new Oo({url:"wss://test-multi-store.lihaink.cn/pull",app_key:"2ce3ce22329517213caa7dad261f5695"}).subscribe(`store_merchant_${t.userInfo.store_id}`);o.on("message",function(a){var l,s,u,c,f,d,p,h,m;console.log("收到消息--",a);try{((l=a==null?void 0:a.content)==null?void 0:l.type)=="cash_register"&&((s=a==null?void 0:a.content)==null?void 0:s.msg)=="您有一笔订单已支付"&&Yt.emit("pay_success",(u=a==null?void 0:a.content)==null?void 0:u.data),((c=a==null?void 0:a.content)==null?void 0:c.type)=="store_merchant"&&((f=a==null?void 0:a.content)==null?void 0:f.msg)=="您有一笔新的订单"&&Yt.emit("new_order",a==null?void 0:a.content),((d=a==null?void 0:a.content)==null?void 0:d.type)=="platform_print"&&Yt.emit("letPrintReceipt",(p=a==null?void 0:a.content)==null?void 0:p.data),((h=a==null?void 0:a.content)==null?void 0:h.msg)=="订单支付成功"&&Yt.emit("pay_user_success",(m=a==null?void 0:a.content)==null?void 0:m.data)}catch{}}),o.on("close",function(){});const r=a=>{console.log("按下",a.keyCode),a.keyCode==16&&Yt.emit("shift"),a.keyCode==120&&Yt.emit("F9"),a.keyCode==13&&Yt.emit("enter"),a.keyCode==37&&Yt.emit("left"),a.keyCode==39&&Yt.emit("right"),a.keyCode==38&&Yt.emit("up"),a.keyCode==40&&Yt.emit("down"),a.keyCode==46&&Yt.emit("delete")};return et(()=>{window.addEventListener("keydown",r),console.log("开启键盘监听")}),xo(()=>{window.removeEventListener("keydown",r),console.log("关闭键盘监听")}),(a,l)=>{const s=Ze("el-header"),u=Ze("el-aside"),c=Ze("router-view"),f=Ze("el-main"),d=Ze("el-container");return b(),M("div",Tde,[W(d,null,{default:X(()=>[W(s,null,{default:X(()=>[W(mde)]),_:1}),W(d,null,{default:X(()=>[W(u,{width:"6.25rem"},{default:X(()=>[W(Cde)]),_:1}),W(f,{style:{color:"#333"}},{default:X(()=>[W(c,{class:"my-main"},{default:X(({Component:p})=>[W(nn,{name:"el-zoom-in-top"},{default:X(()=>[(b(),le(st(p)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Ode=Sv($de,[["__scopeId","data-v-6c618134"]]),Ade=[{path:"/",name:"layout",component:Ode,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>qn(()=>import("./index-BoKKYodA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"收银订单"},component:()=>qn(()=>import("./index-rTWTv0oF.js"),__vite__mapDeps([11,1,3,7,8,9,4,12]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>qn(()=>import("./index-gNE3niRs.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/subOrder",name:"subOrder",meta:{title:"订单统计"},component:()=>qn(()=>import("./index-DwZFmrrS.js"),__vite__mapDeps([15,1,3,7,8,9,4,16]),import.meta.url)},{path:"/order",name:"order",meta:{title:"预约取货"},component:()=>qn(()=>import("./index-gNE3niRs.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>qn(()=>import("./index-NZsfYC8a.js"),__vite__mapDeps([17,3,4,18]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>qn(()=>import("./index-Df7OKyCV.js"),__vite__mapDeps([19,1,4,20,9]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>qn(()=>import("./index-DbTF6P8n.js"),__vite__mapDeps([21,6,5,22]),import.meta.url)},{path:"/stock",name:"stock",meta:{title:"入库登记"},component:()=>qn(()=>import("./index-CQ53hTlw.js"),__vite__mapDeps([23,6,5,24]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>qn(()=>import("./index-BzqFTEfY.js"),__vite__mapDeps([25,2,3,5,8,1,4,26]),import.meta.url)},{path:"/test",name:"test",component:()=>qn(()=>import("./test-2qMQQxfe.js"),__vite__mapDeps([27,28]),import.meta.url)}]},{path:"/login",name:"login",component:()=>qn(()=>import("./index-fh-7oYYX.js"),__vite__mapDeps([29,2,30]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>qn(()=>import("./index-BUc4IFgC.js"),__vite__mapDeps([]),import.meta.url)}],qb=yue({history:Uie(),routes:Ade});qb.beforeEach((e,t,n)=>{const o=bd();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ub=qb,Vi=Fg(g9);for(const[e,t]of Object.entries(qL))Vi.component(e,t);const Nde=Cue();Vi.use(Ub);Vi.use(Nde);Vi.use(fie,{locale:pie});Vi.mount("#app");export{cr as A,Jse as B,cie as C,Sse as D,no as E,Fe as F,wt as G,bue as H,hb as I,S as J,Db as K,bt as L,Op as M,De as N,un as O,Wce as P,Ub as Q,Sv as _,xo as a,Ze as b,b as c,le as d,k as e,W as f,mt as g,Pc as h,Mt as i,tt as j,M as k,ht as l,Yt as m,We as n,et as o,ne as p,Vw as q,L as r,Bw as s,Te as t,bd as u,kr as v,X as w,Er as x,i as y,$ as z}; diff --git a/dist/assets/index-BkeE1FsL.js b/dist/assets/index-NZsfYC8a.js similarity index 98% rename from dist/assets/index-BkeE1FsL.js rename to dist/assets/index-NZsfYC8a.js index 8af38e4..cf3fe23 100644 --- a/dist/assets/index-BkeE1FsL.js +++ b/dist/assets/index-NZsfYC8a.js @@ -1 +1 @@ -import{K as V,_ as B,u as j,r as y,b as p,c as s,k as f,e as t,t as m,g as d,F as E,l as F,z as q,f as l,w as r,E as $,m as D,q as J,s as K,o as W,a as G,h as N,d as k,p as w,j as U}from"./index-DZ-rs8qe.js";import{h as T}from"./moment-Cl4UOzQZ.js";import{p as H}from"./padding-CFUD4Y80.js";function P(){return V.get("/merchant/Merchant/amount_account")}function Q(u){return V.get("/merchant/Merchant/taking_lists",{params:u})}function X(){return V.get("/merchant/Merchant/taking_info")}function Z(u){return V.post("/merchant/Merchant/withdraw",u)}function ee(u){return V.get("/financial/FinancialRecord/api_lists",{params:u})}const z=u=>(J("data-v-e01d9d71"),u=u(),K(),u),ae={class:"my-order"},te={class:"header-nav"},le=z(()=>t("div",{class:"nav-item"},m("提现"),-1)),ne={class:"nav-body"},oe={class:"my-money"},se=z(()=>t("div",null,"我的余额:",-1)),ie={style:{"text-align":"center",color:"#2ec479"}},re={class:"my-count"},de={class:"count"},ue={class:"money"},ce={style:{color:"#ff4a00"}},_e={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ve=["onClick"],me={style:{color:"#1890ff"}},pe={class:"own"},fe=z(()=>t("div",{style:{height:"8.2rem"}},null,-1)),he={class:"order-footer"},ge={class:"input-btn"},be={class:"order-btn"},ke={__name:"order",setup(u){j();const e=y({balance:0,count:0,total:0}),g=y([]),c=()=>{P().then(o=>{o.data.bank_list.forEach(i=>{i.is_check&&(a.value.merchant_bank_id=i.id)}),a.value.merchant_bank_id||(a.value.merchant_bank_id=o.data.bank_list[0].id),g.value=o.data.bank_list,e.value.balance=o.data.balance}),X().then(o=>{e.value=Object.assign(e.value,o.data)})};c();const a=y({merchant_bank_id:"",amount:""}),h=o=>{a.value.merchant_bank_id=o.id},x=()=>{if(a.value.amount=Math.floor(a.value.amount*100)/100,+a.value.amount<=0)return a.value.amount="",$.error("提现金额必须大于0");if(+a.value.amount>+e.value.balance)return a.value.amount=e.value.balance,$.error("提现金额不能大于余额");Z(a.value).then(o=>{a.value.amount="",$.success("提现成功,等待管理员审核"),D.emit("get-taking-lists"),c()})};return(o,i)=>{const b=p("el-input"),M=p("el-button");return s(),f("div",ae,[t("div",te,[le,t("div",ne,[t("div",oe,[se,t("div",ie,[t("span",null,m(e.value.balance),1),d("元 ")])]),t("div",re,[t("div",de,[d("提现次数: "),t("span",null,m(e.value.count),1),d("次")]),t("div",ue,[d("累计提现到账: "),t("span",ce,m(e.value.total),1),d("元")])])])]),t("div",_e,[(s(!0),f(E,null,F(g.value,(_,C)=>(s(),f("div",{class:q(["item",{"item-active":a.value.merchant_bank_id==_.id}]),key:C,onClick:v=>h(_)},[t("div",null,[d(" 提现至 "),t("span",me,m(_.bank_name)+"("+m(_.bank_code.slice(-4))+")",1),t("span",pe,m(_.is_own==1?"对公":"个人"),1)])],10,ve))),128))]),fe,t("div",he,[t("div",ge,[l(b,{modelValue:a.value.amount,"onUpdate:modelValue":i[0]||(i[0]=_=>a.value.amount=_),placeholder:"请输入提现金额",type:"number"},null,8,["modelValue"]),l(M,{class:"btn",type:"primary",onClick:i[1]||(i[1]=_=>a.value.amount=e.value.balance)},{default:r(()=>[d("全部")]),_:1})]),t("div",be,[l(M,{class:"btn",type:"primary",onClick:x,disabled:e.value.balance<=0||g.value.length==0},{default:r(()=>[d("立即提现")]),_:1},8,["disabled"])])])])}}},ye=B(ke,[["__scopeId","data-v-e01d9d71"]]),we={class:"my-order"},Ve={class:"date"},Me={class:"detail"},Ye={key:0,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},$e={key:0},xe={key:1},Ce={key:1,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},De={__name:"detail",setup(u){const e=y({page_no:1,page_size:15,loadend:!1,loading:!1,create_time:"",start_time:""}),g=()=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],h()},c=y(1),a=y([]),h=()=>{if(console.log("触底",!e.value.loadend,!e.value.loading),!e.value.loadend&&!e.value.loading&&(console.log("加载"),e.value.loading=!0,c.value==1&&Q({page_no:e.value.page_no,page_size:e.value.page_size,create_time:e.value.create_time}).then(o=>{a.value=[...a.value,...o.data.lists],o.data.lists.length=e.value.start_time[1])return e.value.loading=!1,$.error("开始时间不能大于等于结束时间");let o=e.value.start_time[0]?T(e.value.start_time[0]).format("YYYY-MM-DD"):"",i=e.value.start_time[1]?T(e.value.start_time[1]).format("YYYY-MM-DD"):"";ee({page_no:e.value.page_no,page_size:e.value.page_size,start_time:o,end_time:i}).then(b=>{a.value=[...a.value,...b.data.lists],b.data.lists.length{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],h()};return W(()=>{D.on("get-taking-lists",o=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],h()})}),G(()=>{D.off("get-taking-lists")}),(o,i)=>{const b=p("el-date-picker"),M=p("el-button"),_=p("el-radio-button"),C=p("el-radio-group"),v=p("el-table-column"),O=p("el-image"),Y=p("el-tag"),I=p("el-table"),S=N("loading"),A=N("infinite-scroll");return s(),f("div",we,[t("div",Ve,[t("div",null,[c.value==1?(s(),k(b,{key:0,modelValue:e.value.create_time,"onUpdate:modelValue":i[0]||(i[0]=n=>e.value.create_time=n),type:"month",placeholder:"请选择月份",onChange:g,clearable:!1},null,8,["modelValue"])):w("",!0),c.value==2?(s(),k(b,{key:1,modelValue:e.value.start_time,"onUpdate:modelValue":i[1]||(i[1]=n=>e.value.start_time=n),type:"daterange",placeholder:"请选择日期",onChange:g,format:"YYYY-MM-DD",clearable:!1},null,8,["modelValue"])):w("",!0),l(M,{type:"primary",style:{"margin-left":"1rem"}},{default:r(()=>[d("重置")]),_:1})]),l(C,{modelValue:c.value,"onUpdate:modelValue":i[2]||(i[2]=n=>c.value=n),onChange:x},{default:r(()=>[l(_,{label:"提现记录",value:1}),l(_,{label:"余额明细",value:2})]),_:1},8,["modelValue"])]),t("div",Me,[c.value==1?U((s(),f("div",Ye,[l(I,{data:a.value},{default:r(()=>[l(v,{prop:"merchant_bank_info.is_own",label:"账户类型",width:"100"},{default:r(({row:n})=>[t("div",null,m(n.merchant_bank_info.is_own?"对公账户":"个人账户"),1)]),_:1}),l(v,{prop:"price",label:"银行卡"},{default:r(({row:n})=>[t("div",null,m(n.merchant_bank_info.bank_info.name)+" ("+m(n.merchant_bank_info.bank_code.slice(-4))+") ",1)]),_:1}),l(v,{prop:"amount",label:"提现金额",width:"150"}),l(v,{label:"备注/凭证",width:"200"},{default:r(({row:n})=>[n.arrival_proof?(s(),f("div",$e,[(s(!0),f(E,null,F(JSON.parse(n.arrival_proof),(R,L)=>(s(),k(O,{style:{width:"3rem",height:"3rem","margin-right":"0.2rem"},key:L,src:R,"preview-src-list":JSON.parse(n.arrival_proof),"initial-index":L},null,8,["src","preview-src-list","initial-index"]))),128))])):(s(),f("div",xe,m(n.fail_msg),1))]),_:1}),l(v,{label:"提现状态",width:"100"},{default:r(({row:n})=>[n.arrival_proof?(s(),k(Y,{key:0,type:"success"},{default:r(()=>[d("已到账")]),_:1})):n.is_check==1?(s(),k(Y,{key:1,type:"primary"},{default:r(()=>[d("待转账")]),_:1})):n.is_check==0?(s(),k(Y,{key:2,type:"info"},{default:r(()=>[d("待审核")]),_:1})):n.is_check==2?(s(),k(Y,{key:3,type:"danger"},{default:r(()=>[d("提现失败")]),_:1})):w("",!0)]),_:1}),l(v,{prop:"create_time",label:"提现时间",width:"200"})]),_:1},8,["data"])])),[[S,e.value.loading],[A,h]]):w("",!0),c.value==2?U((s(),f("div",Ce,[l(I,{data:a.value},{default:r(()=>[l(v,{prop:"number_sn",label:"订单号",width:"250"}),l(v,{prop:"number",label:"变动金额",width:"180"}),l(v,{prop:"financial_type",label:"变动类型",width:"180"}),l(v,{prop:"create_time",label:"时间"})]),_:1},8,["data"])])),[[S,e.value.loading],[A,h]]):w("",!0)])])}}},ze=B(De,[["__scopeId","data-v-b27fe34a"]]),Ie={class:"my-card"},Ne={__name:"index",setup(u){return(e,g)=>(s(),f("div",Ie,[l(ye,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(H),l(ze,{ref:"detailRef"},null,512)]))}};export{Ne as default}; +import{K as V,_ as B,u as j,r as y,b as p,c as s,k as f,e as t,t as m,g as d,F as E,l as F,z as q,f as l,w as r,E as $,m as D,q as J,s as K,o as W,a as G,h as N,d as k,p as w,j as U}from"./index-El3JpHtp.js";import{h as T}from"./moment-Cl4UOzQZ.js";import{p as H}from"./padding-Cx5iHgRh.js";function P(){return V.get("/merchant/Merchant/amount_account")}function Q(u){return V.get("/merchant/Merchant/taking_lists",{params:u})}function X(){return V.get("/merchant/Merchant/taking_info")}function Z(u){return V.post("/merchant/Merchant/withdraw",u)}function ee(u){return V.get("/financial/FinancialRecord/api_lists",{params:u})}const z=u=>(J("data-v-e01d9d71"),u=u(),K(),u),ae={class:"my-order"},te={class:"header-nav"},le=z(()=>t("div",{class:"nav-item"},m("提现"),-1)),ne={class:"nav-body"},oe={class:"my-money"},se=z(()=>t("div",null,"我的余额:",-1)),ie={style:{"text-align":"center",color:"#2ec479"}},re={class:"my-count"},de={class:"count"},ue={class:"money"},ce={style:{color:"#ff4a00"}},_e={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ve=["onClick"],me={style:{color:"#1890ff"}},pe={class:"own"},fe=z(()=>t("div",{style:{height:"8.2rem"}},null,-1)),he={class:"order-footer"},ge={class:"input-btn"},be={class:"order-btn"},ke={__name:"order",setup(u){j();const e=y({balance:0,count:0,total:0}),g=y([]),c=()=>{P().then(o=>{o.data.bank_list.forEach(i=>{i.is_check&&(a.value.merchant_bank_id=i.id)}),a.value.merchant_bank_id||(a.value.merchant_bank_id=o.data.bank_list[0].id),g.value=o.data.bank_list,e.value.balance=o.data.balance}),X().then(o=>{e.value=Object.assign(e.value,o.data)})};c();const a=y({merchant_bank_id:"",amount:""}),h=o=>{a.value.merchant_bank_id=o.id},x=()=>{if(a.value.amount=Math.floor(a.value.amount*100)/100,+a.value.amount<=0)return a.value.amount="",$.error("提现金额必须大于0");if(+a.value.amount>+e.value.balance)return a.value.amount=e.value.balance,$.error("提现金额不能大于余额");Z(a.value).then(o=>{a.value.amount="",$.success("提现成功,等待管理员审核"),D.emit("get-taking-lists"),c()})};return(o,i)=>{const b=p("el-input"),M=p("el-button");return s(),f("div",ae,[t("div",te,[le,t("div",ne,[t("div",oe,[se,t("div",ie,[t("span",null,m(e.value.balance),1),d("元 ")])]),t("div",re,[t("div",de,[d("提现次数: "),t("span",null,m(e.value.count),1),d("次")]),t("div",ue,[d("累计提现到账: "),t("span",ce,m(e.value.total),1),d("元")])])])]),t("div",_e,[(s(!0),f(E,null,F(g.value,(_,C)=>(s(),f("div",{class:q(["item",{"item-active":a.value.merchant_bank_id==_.id}]),key:C,onClick:v=>h(_)},[t("div",null,[d(" 提现至 "),t("span",me,m(_.bank_name)+"("+m(_.bank_code.slice(-4))+")",1),t("span",pe,m(_.is_own==1?"对公":"个人"),1)])],10,ve))),128))]),fe,t("div",he,[t("div",ge,[l(b,{modelValue:a.value.amount,"onUpdate:modelValue":i[0]||(i[0]=_=>a.value.amount=_),placeholder:"请输入提现金额",type:"number"},null,8,["modelValue"]),l(M,{class:"btn",type:"primary",onClick:i[1]||(i[1]=_=>a.value.amount=e.value.balance)},{default:r(()=>[d("全部")]),_:1})]),t("div",be,[l(M,{class:"btn",type:"primary",onClick:x,disabled:e.value.balance<=0||g.value.length==0},{default:r(()=>[d("立即提现")]),_:1},8,["disabled"])])])])}}},ye=B(ke,[["__scopeId","data-v-e01d9d71"]]),we={class:"my-order"},Ve={class:"date"},Me={class:"detail"},Ye={key:0,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},$e={key:0},xe={key:1},Ce={key:1,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},De={__name:"detail",setup(u){const e=y({page_no:1,page_size:15,loadend:!1,loading:!1,create_time:"",start_time:""}),g=()=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],h()},c=y(1),a=y([]),h=()=>{if(console.log("触底",!e.value.loadend,!e.value.loading),!e.value.loadend&&!e.value.loading&&(console.log("加载"),e.value.loading=!0,c.value==1&&Q({page_no:e.value.page_no,page_size:e.value.page_size,create_time:e.value.create_time}).then(o=>{a.value=[...a.value,...o.data.lists],o.data.lists.length=e.value.start_time[1])return e.value.loading=!1,$.error("开始时间不能大于等于结束时间");let o=e.value.start_time[0]?T(e.value.start_time[0]).format("YYYY-MM-DD"):"",i=e.value.start_time[1]?T(e.value.start_time[1]).format("YYYY-MM-DD"):"";ee({page_no:e.value.page_no,page_size:e.value.page_size,start_time:o,end_time:i}).then(b=>{a.value=[...a.value,...b.data.lists],b.data.lists.length{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],h()};return W(()=>{D.on("get-taking-lists",o=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],h()})}),G(()=>{D.off("get-taking-lists")}),(o,i)=>{const b=p("el-date-picker"),M=p("el-button"),_=p("el-radio-button"),C=p("el-radio-group"),v=p("el-table-column"),O=p("el-image"),Y=p("el-tag"),I=p("el-table"),S=N("loading"),A=N("infinite-scroll");return s(),f("div",we,[t("div",Ve,[t("div",null,[c.value==1?(s(),k(b,{key:0,modelValue:e.value.create_time,"onUpdate:modelValue":i[0]||(i[0]=n=>e.value.create_time=n),type:"month",placeholder:"请选择月份",onChange:g,clearable:!1},null,8,["modelValue"])):w("",!0),c.value==2?(s(),k(b,{key:1,modelValue:e.value.start_time,"onUpdate:modelValue":i[1]||(i[1]=n=>e.value.start_time=n),type:"daterange",placeholder:"请选择日期",onChange:g,format:"YYYY-MM-DD",clearable:!1},null,8,["modelValue"])):w("",!0),l(M,{type:"primary",style:{"margin-left":"1rem"}},{default:r(()=>[d("重置")]),_:1})]),l(C,{modelValue:c.value,"onUpdate:modelValue":i[2]||(i[2]=n=>c.value=n),onChange:x},{default:r(()=>[l(_,{label:"提现记录",value:1}),l(_,{label:"余额明细",value:2})]),_:1},8,["modelValue"])]),t("div",Me,[c.value==1?U((s(),f("div",Ye,[l(I,{data:a.value},{default:r(()=>[l(v,{prop:"merchant_bank_info.is_own",label:"账户类型",width:"100"},{default:r(({row:n})=>[t("div",null,m(n.merchant_bank_info.is_own?"对公账户":"个人账户"),1)]),_:1}),l(v,{prop:"price",label:"银行卡"},{default:r(({row:n})=>[t("div",null,m(n.merchant_bank_info.bank_info.name)+" ("+m(n.merchant_bank_info.bank_code.slice(-4))+") ",1)]),_:1}),l(v,{prop:"amount",label:"提现金额",width:"150"}),l(v,{label:"备注/凭证",width:"200"},{default:r(({row:n})=>[n.arrival_proof?(s(),f("div",$e,[(s(!0),f(E,null,F(JSON.parse(n.arrival_proof),(R,L)=>(s(),k(O,{style:{width:"3rem",height:"3rem","margin-right":"0.2rem"},key:L,src:R,"preview-src-list":JSON.parse(n.arrival_proof),"initial-index":L},null,8,["src","preview-src-list","initial-index"]))),128))])):(s(),f("div",xe,m(n.fail_msg),1))]),_:1}),l(v,{label:"提现状态",width:"100"},{default:r(({row:n})=>[n.arrival_proof?(s(),k(Y,{key:0,type:"success"},{default:r(()=>[d("已到账")]),_:1})):n.is_check==1?(s(),k(Y,{key:1,type:"primary"},{default:r(()=>[d("待转账")]),_:1})):n.is_check==0?(s(),k(Y,{key:2,type:"info"},{default:r(()=>[d("待审核")]),_:1})):n.is_check==2?(s(),k(Y,{key:3,type:"danger"},{default:r(()=>[d("提现失败")]),_:1})):w("",!0)]),_:1}),l(v,{prop:"create_time",label:"提现时间",width:"200"})]),_:1},8,["data"])])),[[S,e.value.loading],[A,h]]):w("",!0),c.value==2?U((s(),f("div",Ce,[l(I,{data:a.value},{default:r(()=>[l(v,{prop:"number_sn",label:"订单号",width:"250"}),l(v,{prop:"number",label:"变动金额",width:"180"}),l(v,{prop:"financial_type",label:"变动类型",width:"180"}),l(v,{prop:"create_time",label:"时间"})]),_:1},8,["data"])])),[[S,e.value.loading],[A,h]]):w("",!0)])])}}},ze=B(De,[["__scopeId","data-v-b27fe34a"]]),Ie={class:"my-card"},Ne={__name:"index",setup(u){return(e,g)=>(s(),f("div",Ie,[l(ye,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(H),l(ze,{ref:"detailRef"},null,512)]))}};export{Ne as default}; diff --git a/dist/assets/index-sgdN7oBe.js b/dist/assets/index-fh-7oYYX.js similarity index 96% rename from dist/assets/index-sgdN7oBe.js rename to dist/assets/index-fh-7oYYX.js index f776ae4..695f863 100644 --- a/dist/assets/index-sgdN7oBe.js +++ b/dist/assets/index-fh-7oYYX.js @@ -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-DZ-rs8qe.js";import{l as K}from"./user-C_IO-ELJ.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-El3JpHtp.js";import{l as K}from"./user-BasTd-eJ.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}; diff --git a/dist/assets/index-DfjV6Hzh.js b/dist/assets/index-gNE3niRs.js similarity index 98% rename from dist/assets/index-DfjV6Hzh.js rename to dist/assets/index-gNE3niRs.js index 1769ea2..3162404 100644 --- a/dist/assets/index-DfjV6Hzh.js +++ b/dist/assets/index-gNE3niRs.js @@ -1 +1 @@ -import{_ as E,u as K,r as n,o as P,m as w,a as j,b as r,h as x,c as s,k as i,e,f as d,w as c,g,d as B,p as k,i as ie,j as L,F,l as O,z as R,t as l,q,s as G,I as le}from"./index-DZ-rs8qe.js";import{d as ne,e as de}from"./store-eKONkWfH.js";import{h as A}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as _e}from"./padding-CFUD4Y80.js";const H=m=>(q("data-v-d16a314c"),m=m(),G(),m),ce={class:"my-order"},re={class:"header-nav"},ue=H(()=>e("div",{class:"nav-item"},l("线上订单"),-1)),ve={class:"nav-item-btn"},pe={class:"header-input"},fe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},me=["onClick"],he={class:"top"},ye={class:"create-time"},ge={class:"shop"},ke={key:0,class:"left"},$e={key:0,class:"shop-name"},be={class:"right"},we={class:"money"},Ce={class:"count"},Ve={class:"bottom"},De={class:"pay"},Ye={key:0},xe={key:1},ze={key:2},Ie={key:3},Se={key:4},Me={key:5},Ue={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"load-end"},Le={key:1,class:"load-end"},Ne=H(()=>e("span",null,"您有新订单了, 是否立即刷新",-1)),Te={class:"dialog-footer"},Fe={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(m){K(),n([]);const o=n(1),C=p=>{_.value.page_no=1,f.value=!1,u.value=!1,h.value=[],y(!0)};n(null);const $=n(""),z=()=>{_.value.start_time=A($.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=A($.value[1]).format("YYYY-MM-DD 23:59:59"),y(!0)},I=p=>p.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:2}),u=n(!1),N=n(0),V=n(0),f=n(!1),h=n([]),y=(p=!1)=>{if(p)_.value.page_no=1;else if(f.value||u.value)return;u.value=!0,o.value==1&&(_.value.paid=null),o.value==2&&(_.value.paid=0),ne(_.value).then(a=>{p?h.value=a.data.lists:h.value=[...h.value,...a.data.lists],_.value.page_no==1&&h.value.length>0&&w.emit("set-sale-order-detail",h.value[0]),a.data.lists.length<_.value.page_size?f.value=!0:_.value.page_no++,V.value=0,N.value=a.data.count,u.value=!1}).catch(a=>{f.value=!0,u.value=!1})},S=(p,a)=>{V.value=a,w.emit("set-sale-order-detail",p)},b=n(!1);return P(()=>{w.on("update-sale-order-detail",p=>{console.log("==="),h.value[V.value].paid=1}),w.on("new_order",()=>{b.value||(b.value=!0)})}),j(()=>{w.off("update-sale-order-detail"),w.off("new_order")}),(p,a)=>{const D=r("el-radio-button"),Y=r("el-radio-group"),J=r("el-date-picker"),Q=r("CircleClose"),W=r("el-icon"),M=r("el-button"),X=r("el-input"),Z=r("el-image"),ee=r("spna"),te=r("el-dialog"),se=x("loading"),oe=x("infinite-scroll");return s(),i("div",ce,[e("div",re,[ue,e("div",ve,[d(Y,{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=t=>o.value=t),onChange:C,size:"small"},{default:c(()=>[d(D,{value:1},{default:c(()=>[g("全部")]),_:1}),d(D,{value:2},{default:c(()=>[g("未支付")]),_:1})]),_:1},8,["modelValue"]),d(J,{modelValue:$.value,"onUpdate:modelValue":a[1]||(a[1]=t=>$.value=t),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":I,onChange:z,clearable:!1,style:{width:"10rem",margin:"0 0 0 1rem"}},null,8,["modelValue"])])]),e("div",pe,[d(X,{modelValue:_.value.order_id,"onUpdate:modelValue":a[4]||(a[4]=t=>_.value.order_id=t),placeholder:"请输入订单编号",onKeydown:a[5]||(a[5]=ie(t=>y(!0),["enter"])),onClear:a[6]||(a[6]=t=>y(!0))},{suffix:c(()=>[_.value.order_id!=""?(s(),B(W,{key:0,size:"18",onClick:a[2]||(a[2]=t=>{_.value.order_id="",y(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:c(()=>[d(Q)]),_:1})):k("",!0)]),append:c(()=>[d(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[3]||(a[3]=t=>y(!0))},{default:c(()=>[g("搜索")]),_:1})]),_:1},8,["modelValue"])]),L((s(),i("div",fe,[(s(!0),i(F,null,O(h.value,(t,U)=>(s(),i("div",{class:R(["item",{"item-active":V.value==U}]),key:U,onClick:T=>S(t,U)},[e("div",he,[e("div",{class:R(["sn","cahier"])},"单号: "+l(t.order_id),1),e("div",ye,l(t.pay_time),1)]),e("div",ge,[t.product_info?(s(),i("div",ke,[(s(!0),i(F,null,O(t.product_info.slice(0,5),(T,ae)=>(s(),B(Z,{key:ae,src:T.image,class:"shop-img"},null,8,["src"]))),128)),t.product_info.length==1?(s(),i("div",$e,l(t.product_info[0].store_name),1)):k("",!0)])):k("",!0),e("div",be,[e("div",we,"¥"+l(t.pay_price),1),e("div",Ce,"共"+l(t.total_num)+"款商品",1)])]),e("div",Ve,[e("div",De,[t.paid?(s(),i("div",Ye,[g(l(t.paid_name)+" ",1),t.pay_type_name?(s(),B(ee,{key:0},{default:c(()=>[g("("+l(t.pay_type_name)+")",1)]),_:2},1024)):t.pay_type==9?(s(),i("span",xe,"(微信收款)")):t.pay_type==17?(s(),i("span",ze,"(现金支付)")):t.pay_type==13?(s(),i("span",Ie,"(支付宝收款)")):t.pay_type==3?(s(),i("span",Se,"(余额支付)")):t.pay_type==1?(s(),i("span",Me,"(微信支付)")):k("",!0)])):(s(),i("div",Ue,l(t.paid_name),1))])])],10,me))),128)),f.value?(s(),i("div",Be,"没有更多了")):k("",!0),u.value?(s(),i("div",Le,"加载中...")):k("",!0)])),[[se,u.value],[oe,y]]),d(te,{modelValue:b.value,"onUpdate:modelValue":a[9]||(a[9]=t=>b.value=t),title:"新订单提醒",width:"500"},{footer:c(()=>[e("div",Te,[d(M,{onClick:a[7]||(a[7]=t=>b.value=!1)},{default:c(()=>[g("稍后刷新")]),_:1}),d(M,{type:"primary",onClick:a[8]||(a[8]=t=>{y(!0),b.value=!1})},{default:c(()=>[g(" 立即刷新 ")]),_:1})])]),default:c(()=>[Ne]),_:1},8,["modelValue"])])}}},Oe=E(Fe,[["__scopeId","data-v-d16a314c"]]),v=m=>(q("data-v-697a3802"),m=m(),G(),m),Re={class:"my-order"},Ae={key:0,class:"detail"},Ee={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ke=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Pe={class:"table-info"},je={class:"info-item"},qe=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},ct=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),rt={class:"info-item-info"},ut={class:"info-item"},vt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),pt={class:"info-item-info"},ft={key:0},mt={key:1},ht={key:2},yt={key:3},gt={key:4},kt={key:5},$t={key:0,class:"table-title"},bt={key:1,class:"table-info"},wt={class:"info-item"},Ct=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),Vt={class:"info-item-info"},Dt={class:"info-item"},Yt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),xt={class:"info-item-info"},zt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),St={class:"info-item-info"},Mt={style:{"font-size":"0.9rem"}},Ut={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Lt={style:{"margin-left":"0.5rem"}},Nt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),Tt={key:1},Ft={__name:"detail",setup(m){K(),le();const o=n({id:""});n([]),n(null);const C=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const $=n({page_no:1,page_size:15,loadend:!1,loading:!1}),z=n([]),I=()=>console.log("触底"),_=()=>{C.value=!0,de({id:o.value.id}).then(u=>{o.value=u.data,setTimeout(()=>{C.value=!1},200)})};return P(()=>{w.on("set-sale-order-detail",u=>{console.log("===",u),o.value=u,$.value.page_no=1,$.value.loadend=!1,$.value.loading=!1,z.value=[],_()})}),j(()=>{w.off("set-sale-order-detail")}),(u,N)=>{var p;const V=r("el-image"),f=r("el-table-column"),h=r("el-table"),y=r("el-empty"),S=x("infinite-scroll"),b=x("loading");return s(),i("div",Re,[o.value.id?L((s(),i("div",Ae,[L((s(),i("div",Ee,[Ke,e("div",Pe,[e("div",je,[qe,e("div",Ge,l(o.value.order_id),1)]),e("div",He,[Je,e("div",Qe,l(o.value.total_num||0),1)]),e("div",We,[Xe,e("div",Ze,"¥"+l(o.value.pay_price),1)]),e("div",et,[tt,e("div",st,l(o.value.pay_time),1)]),e("div",ot,[at,e("div",it,"¥"+l(o.value.deduction_price),1)]),e("div",lt,[nt,e("div",dt,"¥"+l(o.value.pay_price),1)]),e("div",_t,[ct,e("div",rt,l(o.value.pay_time),1)]),e("div",ut,[vt,e("div",pt,[o.value.pay_type_name?(s(),i("span",ft,l(o.value.pay_type_name),1)):o.value.pay_type==9?(s(),i("span",mt,"微信收款")):o.value.pay_type==17?(s(),i("span",ht,"现金支付")):o.value.pay_type==13?(s(),i("span",yt,"支付宝收款")):o.value.pay_type==3?(s(),i("span",gt,"余额支付")):o.value.pay_type==1?(s(),i("span",kt,"微信支付")):k("",!0)])])]),o.value.uid?(s(),i("div",$t,"用户信息")):k("",!0),o.value.uid?(s(),i("div",bt,[e("div",wt,[Ct,e("div",Vt,l(o.value.uid),1)]),e("div",Dt,[Yt,e("div",xt,l(o.value.nickname),1)]),e("div",zt,[It,e("div",St,l(o.value.mobile),1)])])):k("",!0),e("div",Mt,[g(" 共计 "),e("span",Ut,l(((p=o.value.product)==null?void 0:p.length)||" "),1),g(" 款商品 ")]),d(h,{data:o.value.product},{default:c(()=>[d(f,{label:"商品信息"},{default:c(({row:a})=>{var D,Y;return[e("div",Bt,[d(V,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(D=a.cart_info)==null?void 0:D.image},null,8,["src"]),e("span",Lt,l((Y=a.cart_info)==null?void 0:Y.name),1)])]}),_:1}),d(f,{prop:"cart_info.store_info",label:"商品规格",width:"150"}),d(f,{prop:"cart_info.price",label:"单价",width:"150"}),d(f,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(f,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Nt])),[[S,I]])])),[[b,C.value]]):(s(),i("div",Tt,[d(y)]))])}}},Ot=E(Ft,[["__scopeId","data-v-697a3802"]]),Rt={class:"my-card"},qt={__name:"index",setup(m){return(o,C)=>(s(),i("div",Rt,[d(Oe,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(_e),d(Ot,{ref:"detailRef"},null,512)]))}};export{qt as default}; +import{_ as E,u as K,r as n,o as P,m as w,a as j,b as r,h as x,c as s,k as i,e,f as d,w as c,g,d as B,p as k,i as ie,j as L,F,l as O,z as R,t as l,q,s as G,I as le}from"./index-El3JpHtp.js";import{d as ne,f as de}from"./store-D17PfqyZ.js";import{h as A}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as _e}from"./padding-Cx5iHgRh.js";const H=m=>(q("data-v-d16a314c"),m=m(),G(),m),ce={class:"my-order"},re={class:"header-nav"},ue=H(()=>e("div",{class:"nav-item"},l("线上订单"),-1)),ve={class:"nav-item-btn"},pe={class:"header-input"},fe={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},me=["onClick"],he={class:"top"},ye={class:"create-time"},ge={class:"shop"},ke={key:0,class:"left"},$e={key:0,class:"shop-name"},be={class:"right"},we={class:"money"},Ce={class:"count"},Ve={class:"bottom"},De={class:"pay"},Ye={key:0},xe={key:1},ze={key:2},Ie={key:3},Se={key:4},Me={key:5},Ue={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"load-end"},Le={key:1,class:"load-end"},Ne=H(()=>e("span",null,"您有新订单了, 是否立即刷新",-1)),Te={class:"dialog-footer"},Fe={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(m){K(),n([]);const o=n(1),C=p=>{_.value.page_no=1,f.value=!1,u.value=!1,h.value=[],y(!0)};n(null);const $=n(""),z=()=>{_.value.start_time=A($.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=A($.value[1]).format("YYYY-MM-DD 23:59:59"),y(!0)},I=p=>p.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:2}),u=n(!1),N=n(0),V=n(0),f=n(!1),h=n([]),y=(p=!1)=>{if(p)_.value.page_no=1;else if(f.value||u.value)return;u.value=!0,o.value==1&&(_.value.paid=null),o.value==2&&(_.value.paid=0),ne(_.value).then(a=>{p?h.value=a.data.lists:h.value=[...h.value,...a.data.lists],_.value.page_no==1&&h.value.length>0&&w.emit("set-sale-order-detail",h.value[0]),a.data.lists.length<_.value.page_size?f.value=!0:_.value.page_no++,V.value=0,N.value=a.data.count,u.value=!1}).catch(a=>{f.value=!0,u.value=!1})},S=(p,a)=>{V.value=a,w.emit("set-sale-order-detail",p)},b=n(!1);return P(()=>{w.on("update-sale-order-detail",p=>{console.log("==="),h.value[V.value].paid=1}),w.on("new_order",()=>{b.value||(b.value=!0)})}),j(()=>{w.off("update-sale-order-detail"),w.off("new_order")}),(p,a)=>{const D=r("el-radio-button"),Y=r("el-radio-group"),J=r("el-date-picker"),Q=r("CircleClose"),W=r("el-icon"),M=r("el-button"),X=r("el-input"),Z=r("el-image"),ee=r("spna"),te=r("el-dialog"),se=x("loading"),oe=x("infinite-scroll");return s(),i("div",ce,[e("div",re,[ue,e("div",ve,[d(Y,{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=t=>o.value=t),onChange:C,size:"small"},{default:c(()=>[d(D,{value:1},{default:c(()=>[g("全部")]),_:1}),d(D,{value:2},{default:c(()=>[g("未支付")]),_:1})]),_:1},8,["modelValue"]),d(J,{modelValue:$.value,"onUpdate:modelValue":a[1]||(a[1]=t=>$.value=t),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":I,onChange:z,clearable:!1,style:{width:"10rem",margin:"0 0 0 1rem"}},null,8,["modelValue"])])]),e("div",pe,[d(X,{modelValue:_.value.order_id,"onUpdate:modelValue":a[4]||(a[4]=t=>_.value.order_id=t),placeholder:"请输入订单编号",onKeydown:a[5]||(a[5]=ie(t=>y(!0),["enter"])),onClear:a[6]||(a[6]=t=>y(!0))},{suffix:c(()=>[_.value.order_id!=""?(s(),B(W,{key:0,size:"18",onClick:a[2]||(a[2]=t=>{_.value.order_id="",y(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:c(()=>[d(Q)]),_:1})):k("",!0)]),append:c(()=>[d(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[3]||(a[3]=t=>y(!0))},{default:c(()=>[g("搜索")]),_:1})]),_:1},8,["modelValue"])]),L((s(),i("div",fe,[(s(!0),i(F,null,O(h.value,(t,U)=>(s(),i("div",{class:R(["item",{"item-active":V.value==U}]),key:U,onClick:T=>S(t,U)},[e("div",he,[e("div",{class:R(["sn","cahier"])},"单号: "+l(t.order_id),1),e("div",ye,l(t.pay_time),1)]),e("div",ge,[t.product_info?(s(),i("div",ke,[(s(!0),i(F,null,O(t.product_info.slice(0,5),(T,ae)=>(s(),B(Z,{key:ae,src:T.image,class:"shop-img"},null,8,["src"]))),128)),t.product_info.length==1?(s(),i("div",$e,l(t.product_info[0].store_name),1)):k("",!0)])):k("",!0),e("div",be,[e("div",we,"¥"+l(t.pay_price),1),e("div",Ce,"共"+l(t.total_num)+"款商品",1)])]),e("div",Ve,[e("div",De,[t.paid?(s(),i("div",Ye,[g(l(t.paid_name)+" ",1),t.pay_type_name?(s(),B(ee,{key:0},{default:c(()=>[g("("+l(t.pay_type_name)+")",1)]),_:2},1024)):t.pay_type==9?(s(),i("span",xe,"(微信收款)")):t.pay_type==17?(s(),i("span",ze,"(现金支付)")):t.pay_type==13?(s(),i("span",Ie,"(支付宝收款)")):t.pay_type==3?(s(),i("span",Se,"(余额支付)")):t.pay_type==1?(s(),i("span",Me,"(微信支付)")):k("",!0)])):(s(),i("div",Ue,l(t.paid_name),1))])])],10,me))),128)),f.value?(s(),i("div",Be,"没有更多了")):k("",!0),u.value?(s(),i("div",Le,"加载中...")):k("",!0)])),[[se,u.value],[oe,y]]),d(te,{modelValue:b.value,"onUpdate:modelValue":a[9]||(a[9]=t=>b.value=t),title:"新订单提醒",width:"500"},{footer:c(()=>[e("div",Te,[d(M,{onClick:a[7]||(a[7]=t=>b.value=!1)},{default:c(()=>[g("稍后刷新")]),_:1}),d(M,{type:"primary",onClick:a[8]||(a[8]=t=>{y(!0),b.value=!1})},{default:c(()=>[g(" 立即刷新 ")]),_:1})])]),default:c(()=>[Ne]),_:1},8,["modelValue"])])}}},Oe=E(Fe,[["__scopeId","data-v-d16a314c"]]),v=m=>(q("data-v-697a3802"),m=m(),G(),m),Re={class:"my-order"},Ae={key:0,class:"detail"},Ee={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ke=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Pe={class:"table-info"},je={class:"info-item"},qe=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Qe={class:"info-item-info"},We={class:"info-item"},Xe=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},ct=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),rt={class:"info-item-info"},ut={class:"info-item"},vt=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),pt={class:"info-item-info"},ft={key:0},mt={key:1},ht={key:2},yt={key:3},gt={key:4},kt={key:5},$t={key:0,class:"table-title"},bt={key:1,class:"table-info"},wt={class:"info-item"},Ct=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),Vt={class:"info-item-info"},Dt={class:"info-item"},Yt=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),xt={class:"info-item-info"},zt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),St={class:"info-item-info"},Mt={style:{"font-size":"0.9rem"}},Ut={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Lt={style:{"margin-left":"0.5rem"}},Nt=v(()=>e("div",{style:{height:"8rem"}},null,-1)),Tt={key:1},Ft={__name:"detail",setup(m){K(),le();const o=n({id:""});n([]),n(null);const C=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const $=n({page_no:1,page_size:15,loadend:!1,loading:!1}),z=n([]),I=()=>console.log("触底"),_=()=>{C.value=!0,de({id:o.value.id}).then(u=>{o.value=u.data,setTimeout(()=>{C.value=!1},200)})};return P(()=>{w.on("set-sale-order-detail",u=>{console.log("===",u),o.value=u,$.value.page_no=1,$.value.loadend=!1,$.value.loading=!1,z.value=[],_()})}),j(()=>{w.off("set-sale-order-detail")}),(u,N)=>{var p;const V=r("el-image"),f=r("el-table-column"),h=r("el-table"),y=r("el-empty"),S=x("infinite-scroll"),b=x("loading");return s(),i("div",Re,[o.value.id?L((s(),i("div",Ae,[L((s(),i("div",Ee,[Ke,e("div",Pe,[e("div",je,[qe,e("div",Ge,l(o.value.order_id),1)]),e("div",He,[Je,e("div",Qe,l(o.value.total_num||0),1)]),e("div",We,[Xe,e("div",Ze,"¥"+l(o.value.pay_price),1)]),e("div",et,[tt,e("div",st,l(o.value.pay_time),1)]),e("div",ot,[at,e("div",it,"¥"+l(o.value.deduction_price),1)]),e("div",lt,[nt,e("div",dt,"¥"+l(o.value.pay_price),1)]),e("div",_t,[ct,e("div",rt,l(o.value.pay_time),1)]),e("div",ut,[vt,e("div",pt,[o.value.pay_type_name?(s(),i("span",ft,l(o.value.pay_type_name),1)):o.value.pay_type==9?(s(),i("span",mt,"微信收款")):o.value.pay_type==17?(s(),i("span",ht,"现金支付")):o.value.pay_type==13?(s(),i("span",yt,"支付宝收款")):o.value.pay_type==3?(s(),i("span",gt,"余额支付")):o.value.pay_type==1?(s(),i("span",kt,"微信支付")):k("",!0)])])]),o.value.uid?(s(),i("div",$t,"用户信息")):k("",!0),o.value.uid?(s(),i("div",bt,[e("div",wt,[Ct,e("div",Vt,l(o.value.uid),1)]),e("div",Dt,[Yt,e("div",xt,l(o.value.nickname),1)]),e("div",zt,[It,e("div",St,l(o.value.mobile),1)])])):k("",!0),e("div",Mt,[g(" 共计 "),e("span",Ut,l(((p=o.value.product)==null?void 0:p.length)||" "),1),g(" 款商品 ")]),d(h,{data:o.value.product},{default:c(()=>[d(f,{label:"商品信息"},{default:c(({row:a})=>{var D,Y;return[e("div",Bt,[d(V,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(D=a.cart_info)==null?void 0:D.image},null,8,["src"]),e("span",Lt,l((Y=a.cart_info)==null?void 0:Y.name),1)])]}),_:1}),d(f,{prop:"cart_info.store_info",label:"商品规格",width:"150"}),d(f,{prop:"cart_info.price",label:"单价",width:"150"}),d(f,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(f,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Nt])),[[S,I]])])),[[b,C.value]]):(s(),i("div",Tt,[d(y)]))])}}},Ot=E(Ft,[["__scopeId","data-v-697a3802"]]),Rt={class:"my-card"},qt={__name:"index",setup(m){return(o,C)=>(s(),i("div",Rt,[d(Oe,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(_e),d(Ot,{ref:"detailRef"},null,512)]))}};export{qt as default}; diff --git a/dist/assets/index-rTWTv0oF.js b/dist/assets/index-rTWTv0oF.js new file mode 100644 index 0000000..ac54f09 --- /dev/null +++ b/dist/assets/index-rTWTv0oF.js @@ -0,0 +1 @@ +import{_ as G,u as H,r as n,o as J,m as D,a as W,b as r,h as M,c as s,k as o,e,f as d,w as p,g as $,d as I,p as f,i as oe,j as E,F as q,l as K,z as j,t as l,q as X,s as Z,I as ae,E as ie}from"./index-El3JpHtp.js";import{d as le,e as ne,f as de}from"./store-D17PfqyZ.js";import{h as Q}from"./moment-Cl4UOzQZ.js";import{p as _e}from"./pay-DsODbiUT.js";import{p as ce}from"./padding-Cx5iHgRh.js";import"./authCode-p4DlY4hZ.js";/* empty css */const re=m=>(X("data-v-bf6504fc"),m=m(),Z(),m),ue={class:"my-order"},pe={class:"header-nav"},ve=re(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),fe={class:"nav-item-btn"},me={class:"header-input"},he={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ye=["onClick"],ge={class:"top"},ke={class:"create-time"},$e={class:"shop"},be={key:0,class:"left"},we={key:0,class:"shop-name"},Ce={class:"right"},De={class:"money"},Se={class:"count"},Ve={class:"bottom"},Ye={class:"pay"},xe={key:0},ze={key:1},Pe={key:2},Ie={key:3},Me={key:4},Re={key:5},Le={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"load-end"},Ne={key:1,class:"load-end"},Oe={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(m,{expose:w}){H(),n([]);const t=n(1),y=v=>{_.value.page_no=1,b.value=!1,k.value=!1,h.value=[],c(!0)};n(null);const g=n(""),R=()=>{_.value.start_time=Q(g.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=Q(g.value[1]).format("YYYY-MM-DD 23:59:59"),c(!0)},L=v=>v.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),k=n(!1),B=n(0),C=n(0),b=n(!1),h=n([]),c=(v=!1)=>{if(v)_.value.page_no=1;else if(b.value||k.value)return;k.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),le(_.value).then(i=>{v?h.value=i.data.lists:h.value=[...h.value,...i.data.lists],_.value.page_no==1&&h.value.length>0&&D.emit("set-sale-order-detail",h.value[0]),i.data.lists.length<_.value.page_size?b.value=!0:_.value.page_no++,C.value=0,console.log(_.value.page_no),B.value=i.data.count,k.value=!1}).catch(i=>{b.value=!0,k.value=!1})},F=(v,i)=>{C.value=i,D.emit("set-sale-order-detail",v)};return w({getOrderList:c}),J(()=>{D.on("update-sale-order-detail",v=>{console.log("==="),h.value[C.value].paid=1})}),W(()=>{D.off("update-sale-order-detail")}),(v,i)=>{const S=r("el-radio-button"),V=r("el-radio-group"),N=r("el-date-picker"),O=r("CircleClose"),T=r("el-icon"),Y=r("el-button"),x=r("el-input"),z=r("el-image"),P=r("spna"),ee=M("loading"),te=M("infinite-scroll");return s(),o("div",ue,[e("div",pe,[ve,e("div",fe,[d(V,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),onChange:y,size:"small"},{default:p(()=>[d(S,{value:1},{default:p(()=>[$("全部")]),_:1}),d(S,{value:2},{default:p(()=>[$("未支付")]),_:1})]),_:1},8,["modelValue"]),d(N,{modelValue:g.value,"onUpdate:modelValue":i[1]||(i[1]=a=>g.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":L,onChange:R,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",me,[d(x,{modelValue:_.value.order_id,"onUpdate:modelValue":i[4]||(i[4]=a=>_.value.order_id=a),placeholder:"请输入订单编号",onKeydown:i[5]||(i[5]=oe(a=>c(!0),["enter"])),onClear:i[6]||(i[6]=a=>c(!0))},{suffix:p(()=>[_.value.order_id!=""?(s(),I(T,{key:0,size:"18",onClick:i[2]||(i[2]=a=>{_.value.order_id="",c(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:p(()=>[d(O)]),_:1})):f("",!0)]),append:p(()=>[d(Y,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[3]||(i[3]=a=>c(!0))},{default:p(()=>[$("搜索")]),_:1})]),_:1},8,["modelValue"])]),E((s(),o("div",he,[(s(!0),o(q,null,K(h.value,(a,U)=>(s(),o("div",{class:j(["item",{"item-active":C.value==U}]),key:U,onClick:A=>F(a,U)},[e("div",ge,[e("div",{class:j(["sn","cahier"])},"单号: "+l(a.order_id),1),e("div",ke,l(a.pay_time),1)]),e("div",$e,[a.product_info?(s(),o("div",be,[(s(!0),o(q,null,K(a.product_info.slice(0,5),(A,se)=>(s(),I(z,{key:se,src:A.image,class:"shop-img"},null,8,["src"]))),128)),a.product_info.length==1?(s(),o("div",we,l(a.product_info[0].store_name),1)):f("",!0)])):f("",!0),e("div",Ce,[e("div",De,"¥"+l(a.pay_price),1),e("div",Se,"共"+l(a.total_num)+"款商品",1)])]),e("div",Ve,[e("div",Ye,[a.paid?(s(),o("div",xe,[$(l(a.paid_name)+" ",1),a.pay_type_name?(s(),I(P,{key:0},{default:p(()=>[$("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",ze,"(微信收款)")):a.pay_type==17?(s(),o("span",Pe,"(现金支付)")):a.pay_type==13?(s(),o("span",Ie,"(支付宝收款)")):a.pay_type==3?(s(),o("span",Me,"(余额支付)")):a.pay_type==1?(s(),o("span",Re,"(微信支付)")):f("",!0)])):(s(),o("div",Le,l(a.paid_name),1))])])],10,ye))),128)),b.value?(s(),o("div",Be,"没有更多了")):f("",!0),k.value?(s(),o("div",Ne,"加载中...")):f("",!0)])),[[ee,k.value],[te,c]])])}}},Te=G(Oe,[["__scopeId","data-v-bf6504fc"]]),u=m=>(X("data-v-6197e97a"),m=m(),Z(),m),Ue={class:"my-order"},Ee={key:0,class:"detail"},Fe={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ae=u(()=>e("div",{class:"table-title"},"订单信息",-1)),qe={class:"table-info"},Ke={class:"info-item"},je=u(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Qe={class:"info-item-info"},Ge={class:"info-item"},He=u(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Je={class:"info-item-info"},We={class:"info-item"},Xe=u(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=u(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),st={class:"info-item-info"},ot={class:"info-item"},at=u(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),it={class:"info-item-info"},lt={class:"info-item"},nt=u(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),dt={class:"info-item-info"},_t={class:"info-item"},ct=u(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),rt={class:"info-item-info"},ut={class:"info-item"},pt=u(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),vt={class:"info-item-info"},ft={key:0},mt={key:1},ht={key:2},yt={key:3},gt={key:4},kt={key:5},$t={key:0,class:"table-title"},bt={key:1,class:"table-info"},wt={class:"info-item"},Ct=u(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),Dt={class:"info-item-info"},St={class:"info-item"},Vt=u(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Yt={class:"info-item-info"},xt={class:"info-item"},zt=u(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Pt={class:"info-item-info"},It={style:{"font-size":"0.9rem"}},Mt={style:{color:"#ff4a00"}},Rt={style:{display:"flex","align-items":"center"}},Lt={style:{"margin-left":"0.5rem"}},Bt=u(()=>e("div",{style:{height:"8rem"}},null,-1)),Nt={key:0,class:"footer"},Ot={key:1},Tt={__name:"detail",emits:["rePaySuccess"],setup(m,{emit:w}){H(),ae();const t=n({id:""});n([]);const y=n(null),g=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const R=()=>{y.value.setForm({isRePay:!0,data:t.value}),y.value.drawer=!0},L=()=>{t.value.order_id?ne({order_no:t.value.order_id}).then(c=>{console.log(c)}):ie({message:"订单号不能为空",type:"error"})},_=n({page_no:1,page_size:15,loadend:!1,loading:!1}),k=n([]),B=()=>console.log("触底"),C=()=>{g.value=!0,de({id:t.value.id}).then(c=>{t.value=c.data,setTimeout(()=>{g.value=!1},200)})},b=w,h=(c=null)=>{setTimeout(()=>{b("rePaySuccess")})};return J(()=>{D.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,_.value.page_no=1,_.value.loadend=!1,_.value.loading=!1,k.value=[],C()})}),W(()=>{D.off("set-sale-order-detail")}),(c,F)=>{var Y;const v=r("el-image"),i=r("el-table-column"),S=r("el-table"),V=r("el-button"),N=r("el-empty"),O=M("infinite-scroll"),T=M("loading");return s(),o("div",Ue,[t.value.id?E((s(),o("div",Ee,[E((s(),o("div",Fe,[Ae,e("div",qe,[e("div",Ke,[je,e("div",Qe,l(t.value.order_id),1)]),e("div",Ge,[He,e("div",Je,l(t.value.total_num||0),1)]),e("div",We,[Xe,e("div",Ze,"¥"+l(t.value.pay_price),1)]),e("div",et,[tt,e("div",st,l(t.value.pay_time),1)]),e("div",ot,[at,e("div",it,"¥"+l(t.value.deduction_price),1)]),e("div",lt,[nt,e("div",dt,"¥"+l(t.value.pay_price),1)]),e("div",_t,[ct,e("div",rt,l(t.value.pay_time),1)]),e("div",ut,[pt,e("div",vt,[t.value.pay_type_name?(s(),o("span",ft,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",mt,"微信收款")):t.value.pay_type==17?(s(),o("span",ht,"现金支付")):t.value.pay_type==13?(s(),o("span",yt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",gt,"余额支付")):t.value.pay_type==1?(s(),o("span",kt,"微信支付")):f("",!0)])])]),t.value.uid?(s(),o("div",$t,"用户信息")):f("",!0),t.value.uid?(s(),o("div",bt,[e("div",wt,[Ct,e("div",Dt,l(t.value.uid),1)]),e("div",St,[Vt,e("div",Yt,l(t.value.nickname),1)]),e("div",xt,[zt,e("div",Pt,l(t.value.mobile),1)])])):f("",!0),e("div",It,[$(" 共计 "),e("span",Mt,l(((Y=t.value.product)==null?void 0:Y.length)||" "),1),$(" 款商品 ")]),d(S,{data:t.value.product},{default:p(()=>[d(i,{label:"商品信息"},{default:p(({row:x})=>{var z,P;return[e("div",Rt,[d(v,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(z=x.cart_info)==null?void 0:z.image},null,8,["src"]),e("span",Lt,l((P=x.cart_info)==null?void 0:P.name),1)])]}),_:1}),d(i,{prop:"cart_info.store_info",label:"商品规格",width:"150"}),d(i,{prop:"cart_info.price",label:"单价",width:"150"}),d(i,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(i,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Bt])),[[O,B]]),t.value.paid?f("",!0):(s(),o("div",Nt,[d(V,{type:"primary",size:"large",onClick:R},{default:p(()=>[$("重新支付")]),_:1}),t.value.pay_type==9?(s(),I(V,{key:0,type:"primary",size:"large",onClick:L},{default:p(()=>[$("查询支付")]),_:1})):f("",!0)]))])),[[T,g.value]]):(s(),o("div",Ot,[d(N)])),d(_e,{ref_key:"payRef",ref:y,onPaySuccess:h},null,512)])}}},Ut=G(Tt,[["__scopeId","data-v-6197e97a"]]),Et={class:"my-card"},Ht={__name:"index",setup(m){const w=n(null),t=()=>{var y;(y=w.value)==null||y.getOrderList(!0)};return(y,g)=>(s(),o("div",Et,[d(Te,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:w},null,512),d(ce),d(Ut,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{Ht as default}; diff --git a/dist/assets/padding-CFUD4Y80.js b/dist/assets/padding-Cx5iHgRh.js similarity index 65% rename from dist/assets/padding-CFUD4Y80.js rename to dist/assets/padding-Cx5iHgRh.js index 7c83fd3..8aae0f4 100644 --- a/dist/assets/padding-CFUD4Y80.js +++ b/dist/assets/padding-Cx5iHgRh.js @@ -1 +1 @@ -import{_ as e,c as t,k as c}from"./index-DZ-rs8qe.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-El3JpHtp.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}; diff --git a/dist/assets/pay-DsODbiUT.js b/dist/assets/pay-DsODbiUT.js new file mode 100644 index 0000000..1fbdcde --- /dev/null +++ b/dist/assets/pay-DsODbiUT.js @@ -0,0 +1 @@ +import{_ as ye,r as o,u as me,J as ge,o as he,m,a as ke,b as D,h as be,c as _,d as O,w as g,e as s,z,k as w,g as C,t as S,p as Z,j as we,f as x,i as ee,F as Ce,l as xe,n as R,E as c,q as $e,s as Ve}from"./index-El3JpHtp.js";import{g as K,h as Se,i as Pe,j as Ee}from"./store-D17PfqyZ.js";import{_ as Fe}from"./authCode-p4DlY4hZ.js";/* empty css */const V=L=>($e("data-v-09cf2609"),L=L(),Ve(),L),je=V(()=>s("h4",null,"选择支付方式",-1)),ze={class:"dra-body"},Be={class:"header"},Ae={key:0,style:{display:"inline-block","margin-right":"20px"}},De={style:{display:"inline-block","margin-right":"20px"}},Le=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"原价:",-1)),Re={style:{color:"#f5222d","padding-bottom":"2rem"}},Te={style:{"font-size":"1.6rem"}},Ne={style:{display:"inline-block"}},Ue=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"活动折扣: ",-1)),Ie={style:{color:"#f5222d","padding-bottom":"2rem"}},Oe={style:{"font-size":"1.6rem"}},Ke={style:{display:"inline-block"}},Me=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),qe={style:{color:"#f5222d","padding-bottom":"2rem"}},Je={style:{"font-size":"1.6rem"}},We={key:0,"element-loading-text":"支付中",class:"card1"},Ge=V(()=>s("div",{class:"tips"},null,-1)),He={key:1,class:"card2"},Qe={class:"drawer-body"},Xe={class:"counter"},Ye={class:"received"},Ze={key:0},ea={key:1,style:{"font-size":"1rem",color:"#999"}},aa={key:0,class:"balance"},sa={class:"money"},ta=V(()=>s("div",{class:"tips"},"按回车(Enter)确认支付",-1)),la={key:1,class:"balance"},oa=V(()=>s("div",null,"不够找零, 请支付更多金额",-1)),na=V(()=>s("div",{class:"tips"},"按下小键盘输入金额",-1)),ia=[oa,na],ua={class:"keypad"},ca={class:"left"},ra={class:"right"},da={key:2,class:"card3"},va={class:"codes"},_a={style:{width:"100%",display:"flex","justify-content":"center"}},pa={__name:"pay",emits:["paySuccess"],setup(L,{expose:ae,emit:se}){const v=o(!1),t=o(1),i=o(""),h=o("");me(),o(0);const P=a=>{Ee({id:a}).then(e=>{m.emit("letPrintReceipt",e.data)})},te=()=>{y()},le=()=>{R(()=>{setTimeout(()=>{var a;k.value=!1,i.value="",M.value=!0,(a=h.value)==null||a.focus(),p(t.value)},300)})},p=a=>{t.value=a,t.value==2?window.addEventListener("keydown",U):(window.removeEventListener("keydown",U),R(()=>{var e;i.value="",(e=h.value)==null||e.focus()}))},u=o({}),B=o([]),f=o(""),E=o(null),T=o(!1);let F=0;const oe=a=>{u.value=a.data,B.value=a.cart_id,f.value=a.uid,E.value=a.reservation||null,F=a.is_storage||0,console.log("选择了用户==",f.value||"游客"),T.value=a.isRePay||!1},ne=a=>{u.value.pay_price=a.price,ce.value=a.order_id,F=a.is_storage||0},ie=se,M=o(!1),ue=o(["1","2","3","4","5","6","7","8","9","0","00","."]),q=/^(10|11|12|13|14|15)\d{16}$/,J=/^(25|26|27|28|29|30)\d{14,22}$/,ce=o(""),re=()=>{if(k.value=!0,h.value.blur(),T.value)W();else{let a;if(q.test(i.value))a="9";else if(J.test(i.value))a="13";else return k.value=!1,i.value="",h.value.focus(),c.error("请输入正确的支付码");K({key:u.value.key,cart_id:B.value,pay_type:a,is_storage:F,auth_code:i.value,reservation:E.value,uid:f.value}).then(e=>{e.data.out_trade_no&&e.msg=="支付成功"?(v.value=!1,c({message:"支付成功",type:"success"}),y(e.data),P(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",l=>{c({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y(l)}))}).catch(e=>{k.value=!1,R(()=>{var l;(l=h.value)==null||l.focus()})})}},W=()=>{let a=17;if(t.value==1)if(q.test(i.value))a="9";else if(J.test(i.value))a="13";else return k.value=!1,i.value="",h.value.focus(),c.error("请输入正确的支付码");Se({order_id:u.value.order_id,pay_type:a,is_storage:F,auth_code:i.value,reservation:E.value,uid:f.value}).then(e=>{var l;(l=e.msg)!=null&&l.includes("成功")?(v.value=!1,c({message:"支付成功",type:"success"}),P(e.data.id),y()):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",$=>{c({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y($)}))}).catch(e=>{i.value="",k.value=!1,R(()=>{var l;(l=h.value)==null||l.focus()})})};o(0);const y=a=>{var e;try{window.removeEventListener("keydown",U),M.value=!1,k.value=!1,i.value="",r.value="",b.value=[],(e=h.value)==null||e.blur(),ie("paySuccess",a),v.value=!1}catch{}},k=o(!1);ae({drawer:v,setForm:oe,setRePay:ne,beforeClose:y});const b=o([]),r=o(""),A=ge(()=>+r.value>0?(+r.value-u.value.pay_price).toFixed(2):-1),G=o(!1),N=a=>{a===-1?b.value=[]:b.value.pop(),r.value=b.value.length?b.value.join(""):0},d=a=>{G.value===!1&&(r.value="",G.value=!0);let e=String(r.value).indexOf(".")+1,l=String(r.value).length-e;console.log(e,l),(e===0||l<2)&&(b.value.join("")<=9999999&&b.value.push(a),r.value=b.value.join("")>99999999?99999999:b.value.join(""))},H=()=>{if(A.value===""||A.value===null||A.value===void 0||+r.value<+u.value.pay_price)return c.error("收款金额应该大于等于应收金额");T.value?W():K({cart_id:B.value,pay_type:"17",is_storage:F,reservation:E.value,uid:f.value}).then(a=>{v.value=!1,c({message:a.msg,type:"success"}),P(a.data.id),t.value=1,y()}).catch(a=>{k.value=!1})},U=a=>{let l=(a||window.event).keyCode;if(l==37)return p(2);if(l==120)return m.emit("F9");if(l==27)return y();switch(a.stopPropagation(),a.preventDefault(),l){case 96:case 48:d(0);break;case 97:case 49:d(1);break;case 98:case 50:d(2);break;case 99:case 51:d(3);break;case 100:case 52:d(4);break;case 101:case 53:d(5);break;case 102:case 54:d(6);break;case 103:case 55:d(7);break;case 104:case 56:d(8);break;case 105:case 57:d(9);break;case 110:d(".");break;case 190:d(".");break;case 8:N();break;case 13:H();break}},de=()=>{if(!f.value)return c.error("请先选择用户");let a=1;t.value==4&&(a=2),t.value==5&&(a=3),Pe({cart_id:B.value,reservation:E.value,uid:f.value,type:a}).then(e=>{c({message:"发送成功",type:"success"})})},I=o(""),Q=()=>{if(!f.value)return c.error("请先选择用户");let a=18;t.value==4&&(a=19),t.value==5&&(a=3),K({pay_type:a,is_storage:F,sms_code:I.value,cart_id:B.value,reservation:E.value,uid:f.value}).then(e=>{v.value=!1,c({message:e.msg,type:"success"}),P(e.data.id),p(1),y()})},j=o(!1),X=()=>{if(!(!v.value||j.value&&i.value.length>0)&&t.value!=1)return p(t.value-1)},Y=()=>{if(!(!v.value||j.value&&i.value.length>0)&&t.value!=5)return p(t.value+1)};return he(()=>{m.on("left",X),m.on("right",Y)}),ke(()=>{m.off("left",X),m.off("right",Y)}),(a,e)=>{const l=D("el-input"),$=D("el-button"),ve=D("Delete"),_e=D("el-icon"),pe=D("el-drawer"),fe=be("loading");return _(),O(pe,{size:"60rem",modelValue:v.value,"onUpdate:modelValue":e[12]||(e[12]=n=>v.value=n),direction:"rtl",onOpen:le,"before-close":y},{header:g(()=>[je]),default:g(()=>[s("div",ze,[s("div",Be,[s("div",{class:z(["left",{active:t.value==1}]),onClick:e[0]||(e[0]=n=>p(1))}," 微信/支付宝 ",2),s("div",{class:z(["center",{active:t.value==2}]),onClick:e[1]||(e[1]=n=>p(2))}," 现金收款 ",2),s("div",{class:z(["center",{active:t.value==3}]),style:{"border-left":"none"},onClick:e[2]||(e[2]=n=>p(3))}," 采购款 ",2),s("div",{class:z(["center",{active:t.value==4}]),style:{"border-left":"none"},onClick:e[3]||(e[3]=n=>p(4))}," 礼品券兑换 ",2),s("div",{class:z(["right",{active:t.value==5}]),onClick:e[4]||(e[4]=n=>p(5))}," 余额 ",2)]),s("div",null,[u.value.activities==1&&t.value!=4?(_(),w("div",Ae,[s("div",De,[Le,s("div",Re,[C(" ¥"),s("span",Te,S(u.value.total_price),1)])]),s("div",Ne,[Ue,s("div",Ie,[C(S(u.value.activity)+"¥",1),s("span",Oe,S(u.value.activity_price),1)])])])):Z("",!0),s("div",Ke,[Me,s("div",qe,[C(" ¥"),s("span",Je,S(t.value==4?u.value.total_price:u.value.pay_price),1)])])]),t.value==1?we((_(),w("div",We,[x(l,{ref_key:"codeRef",ref:h,modelValue:i.value,"onUpdate:modelValue":e[5]||(e[5]=n=>i.value=n),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ee(re,["enter"]),onFocus:e[6]||(e[6]=n=>j.value=!0),onBlur:e[7]||(e[7]=n=>j.value=!1)},null,8,["modelValue"]),Ge])),[[fe,k.value]]):t.value==2?(_(),w("div",He,[s("div",Qe,[s("div",Xe,[s("div",Ye,[r.value?(_(),w("span",Ze,S(r.value),1)):(_(),w("span",ea,"按下键盘输入客户支付金额"))]),A.value>=0?(_(),w("div",aa,[s("div",null,[C(" 需找零(元):"),s("span",sa,"¥"+S(A.value),1)]),ta])):(_(),w("div",la,ia)),s("div",ua,[s("div",ca,[(_(!0),w(Ce,null,xe(ue.value,n=>(_(),O($,{key:n,onClick:fa=>d(n)},{default:g(()=>[C(S(n),1)]),_:2},1032,["onClick"]))),128))]),s("div",ra,[x($,{onClick:N},{default:g(()=>[x(_e,null,{default:g(()=>[x(ve)]),_:1})]),_:1}),x($,{onClick:e[8]||(e[8]=n=>N(-1))},{default:g(()=>[C("C")]),_:1}),x($,{class:z(["enter",{"enter-disable":+r.value<+u.value.pay_price}]),disabled:+r.value<+u.value.pay_price,onClick:H},{default:g(()=>[C(" 确认 ")]),_:1},8,["class","disabled"])])])])])])):t.value==3||t.value==4||t.value==5?(_(),w("div",da,[s("div",va,[x(l,{modelValue:I.value,"onUpdate:modelValue":e[9]||(e[9]=n=>I.value=n),autofocus:"",class:"code-input",placeholder:"请输入验证码",onKeyup:ee(Q,["enter"]),onFocus:e[10]||(e[10]=n=>j.value=!0),onBlur:e[11]||(e[11]=n=>j.value=!1)},null,8,["modelValue"]),(_(),O(Fe,{style:{"margin-left":"1rem"},onSendCode:de,start:f.value>0,key:u.value.order_id,class:"get-code-btn"},null,8,["start"]))]),x($,{type:"primary",onClick:Q,class:"code-pay"},{default:g(()=>[C("确认支付")]),_:1})])):Z("",!0)])]),footer:g(()=>[s("div",_a,[x($,{class:"cancel-btn",onClick:te},{default:g(()=>[C("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ka=ye(pa,[["__scopeId","data-v-09cf2609"]]);export{ka as p}; diff --git a/dist/assets/pay-ZUyBpX9d.js b/dist/assets/pay-ZUyBpX9d.js deleted file mode 100644 index 0362a7e..0000000 --- a/dist/assets/pay-ZUyBpX9d.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as ye,r as o,u as me,J as ge,o as he,m,a as ke,b as D,h as be,c as _,d as O,w as g,e as s,z as B,k as w,g as C,t as S,p as Z,j as we,f as x,i as ee,F as Ce,l as xe,n as R,E as c,q as $e,s as Ve}from"./index-DZ-rs8qe.js";import{f as K,g as Se,h as Pe,i as Ee}from"./store-eKONkWfH.js";import{_ as Fe}from"./authCode-CQcCWWpQ.js";/* empty css */const V=L=>($e("data-v-09cf2609"),L=L(),Ve(),L),ze=V(()=>s("h4",null,"选择支付方式",-1)),Be={class:"dra-body"},je={class:"header"},Ae={key:0,style:{display:"inline-block","margin-right":"20px"}},De={style:{display:"inline-block","margin-right":"20px"}},Le=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"原价:",-1)),Re={style:{color:"#f5222d","padding-bottom":"2rem"}},Te={style:{"font-size":"1.6rem"}},Ne={style:{display:"inline-block"}},Ue=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"活动折扣: ",-1)),Ie={style:{color:"#f5222d","padding-bottom":"2rem"}},Oe={style:{"font-size":"1.6rem"}},Ke={style:{display:"inline-block"}},Me=V(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),qe={style:{color:"#f5222d","padding-bottom":"2rem"}},Je={style:{"font-size":"1.6rem"}},We={key:0,"element-loading-text":"支付中",class:"card1"},Ge=V(()=>s("div",{class:"tips"},null,-1)),He={key:1,class:"card2"},Qe={class:"drawer-body"},Xe={class:"counter"},Ye={class:"received"},Ze={key:0},ea={key:1,style:{"font-size":"1rem",color:"#999"}},aa={key:0,class:"balance"},sa={class:"money"},ta=V(()=>s("div",{class:"tips"},"按回车(Enter)确认支付",-1)),la={key:1,class:"balance"},oa=V(()=>s("div",null,"不够找零, 请支付更多金额",-1)),na=V(()=>s("div",{class:"tips"},"按下小键盘输入金额",-1)),ia=[oa,na],ua={class:"keypad"},ca={class:"left"},ra={class:"right"},da={key:2,class:"card3"},va={class:"codes"},_a={style:{width:"100%",display:"flex","justify-content":"center"}},pa={__name:"pay",emits:["paySuccess"],setup(L,{expose:ae,emit:se}){const v=o(!1),t=o(1),i=o(""),h=o("");me(),o(0);const P=a=>{Ee({id:a}).then(e=>{m.emit("letPrintReceipt",e.data)})},te=()=>{y()},le=()=>{R(()=>{setTimeout(()=>{var a;k.value=!1,i.value="",M.value=!0,(a=h.value)==null||a.focus(),p(t.value)},300)})},p=a=>{t.value=a,t.value==2?window.addEventListener("keydown",U):(window.removeEventListener("keydown",U),R(()=>{var e;i.value="",(e=h.value)==null||e.focus()}))},u=o({}),j=o([]),f=o(""),E=o(null),T=o(!1);let F=0;const oe=a=>{u.value=a.data,j.value=a.cart_id,f.value=a.uid,E.value=a.reservation||null,F=a.is_storage||0,console.log("选择了用户==",f.value||"游客"),T.value=a.isRePay||!1},ne=a=>{u.value.pay_price=a.price,ce.value=a.order_id,F=a.is_storage||0},ie=se,M=o(!1),ue=o(["1","2","3","4","5","6","7","8","9","0","00","."]),q=/^(10|11|12|13|14|15)\d{16}$/,J=/^(25|26|27|28|29|30)\d{14,22}$/,ce=o(""),re=()=>{if(k.value=!0,h.value.blur(),T.value)W();else{let a;if(q.test(i.value))a="9";else if(J.test(i.value))a="13";else return k.value=!1,i.value="",h.value.focus(),c.error("请输入正确的支付码");K({key:u.value.key,cart_id:j.value,pay_type:a,is_storage:F,auth_code:i.value,reservation:E.value,uid:f.value}).then(e=>{e.data.out_trade_no&&e.msg=="支付成功"?(v.value=!1,c({message:"支付成功",type:"success"}),y(e.data),P(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",l=>{c({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y(l)}))}).catch(e=>{k.value=!1,R(()=>{var l;(l=h.value)==null||l.focus()})})}},W=()=>{let a=17;if(t.value==1)if(q.test(i.value))a="9";else if(J.test(i.value))a="13";else return k.value=!1,i.value="",h.value.focus(),c.error("请输入正确的支付码");Se({order_id:u.value.order_id,pay_type:a,is_storage:F,auth_code:i.value,reservation:E.value,uid:f.value}).then(e=>{var l;(l=e.msg)!=null&&l.includes("成功")?(v.value=!1,c({message:"支付成功",type:"success"}),P(e.data.id),y()):e.msg=="用户支付中"&&e.code==1&&(c.warning(e.msg),m.on("pay_success",$=>{c({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y($)}))}).catch(e=>{i.value="",k.value=!1,R(()=>{var l;(l=h.value)==null||l.focus()})})};o(0);const y=a=>{var e;try{window.removeEventListener("keydown",U),M.value=!1,k.value=!1,i.value="",r.value="",b.value=[],(e=h.value)==null||e.blur(),ie("paySuccess",a),v.value=!1}catch{}},k=o(!1);ae({drawer:v,setForm:oe,setRePay:ne,beforeClose:y});const b=o([]),r=o(""),A=ge(()=>+r.value>0?(+r.value-u.value.pay_price).toFixed(2):-1),G=o(!1),N=a=>{a===-1?b.value=[]:b.value.pop(),r.value=b.value.length?b.value.join(""):0},d=a=>{G.value===!1&&(r.value="",G.value=!0);let e=String(r.value).indexOf(".")+1,l=String(r.value).length-e;console.log(e,l),(e===0||l<2)&&(b.value.join("")<=9999999&&b.value.push(a),r.value=b.value.join("")>99999999?99999999:b.value.join(""))},H=()=>{if(A.value===""||A.value===null||A.value===void 0||+r.value<+u.value.pay_price)return c.error("收款金额应该大于等于应收金额");T.value?W():K({cart_id:j.value,pay_type:"17",is_storage:F,reservation:E.value,uid:f.value}).then(a=>{v.value=!1,c({message:a.msg,type:"success"}),P(a.data.id),t.value=1,y()}).catch(a=>{k.value=!1})},U=a=>{let l=(a||window.event).keyCode;if(l==37)return p(2);if(l==120)return m.emit("F9");if(l==27)return y();switch(a.stopPropagation(),a.preventDefault(),l){case 96:case 48:d(0);break;case 97:case 49:d(1);break;case 98:case 50:d(2);break;case 99:case 51:d(3);break;case 100:case 52:d(4);break;case 101:case 53:d(5);break;case 102:case 54:d(6);break;case 103:case 55:d(7);break;case 104:case 56:d(8);break;case 105:case 57:d(9);break;case 110:d(".");break;case 190:d(".");break;case 8:N();break;case 13:H();break}},de=()=>{if(!f.value)return c.error("请先选择用户");let a=1;t.value==4&&(a=2),t.value==5&&(a=3),Pe({cart_id:j.value,reservation:E.value,uid:f.value,type:a}).then(e=>{c({message:"发送成功",type:"success"})})},I=o(""),Q=()=>{if(!f.value)return c.error("请先选择用户");let a=18;t.value==4&&(a=19),t.value==5&&(a=3),K({pay_type:a,is_storage:F,sms_code:I.value,cart_id:j.value,reservation:E.value,uid:f.value}).then(e=>{v.value=!1,c({message:e.msg,type:"success"}),P(e.data.id),p(1),y()})},z=o(!1),X=()=>{if(!(!v.value||z.value&&i.value.length>0)&&t.value!=1)return p(t.value-1)},Y=()=>{if(!(!v.value||z.value&&i.value.length>0)&&t.value!=5)return p(t.value+1)};return he(()=>{m.on("left",X),m.on("right",Y)}),ke(()=>{m.off("left",X),m.off("right",Y)}),(a,e)=>{const l=D("el-input"),$=D("el-button"),ve=D("Delete"),_e=D("el-icon"),pe=D("el-drawer"),fe=be("loading");return _(),O(pe,{size:"60rem",modelValue:v.value,"onUpdate:modelValue":e[12]||(e[12]=n=>v.value=n),direction:"rtl",onOpen:le,"before-close":y},{header:g(()=>[ze]),default:g(()=>[s("div",Be,[s("div",je,[s("div",{class:B(["left",{active:t.value==1}]),onClick:e[0]||(e[0]=n=>p(1))}," 微信/支付宝 ",2),s("div",{class:B(["center",{active:t.value==2}]),onClick:e[1]||(e[1]=n=>p(2))}," 现金收款 ",2),s("div",{class:B(["center",{active:t.value==3}]),style:{"border-left":"none"},onClick:e[2]||(e[2]=n=>p(3))}," 采购款 ",2),s("div",{class:B(["center",{active:t.value==4}]),style:{"border-left":"none"},onClick:e[3]||(e[3]=n=>p(4))}," 礼品券兑换 ",2),s("div",{class:B(["right",{active:t.value==5}]),onClick:e[4]||(e[4]=n=>p(5))}," 余额 ",2)]),s("div",null,[u.value.activities==1&&t.value!=4?(_(),w("div",Ae,[s("div",De,[Le,s("div",Re,[C(" ¥"),s("span",Te,S(u.value.total_price),1)])]),s("div",Ne,[Ue,s("div",Ie,[C(S(u.value.activity)+"¥",1),s("span",Oe,S(u.value.activity_price),1)])])])):Z("",!0),s("div",Ke,[Me,s("div",qe,[C(" ¥"),s("span",Je,S(t.value==4?u.value.total_price:u.value.pay_price),1)])])]),t.value==1?we((_(),w("div",We,[x(l,{ref_key:"codeRef",ref:h,modelValue:i.value,"onUpdate:modelValue":e[5]||(e[5]=n=>i.value=n),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ee(re,["enter"]),onFocus:e[6]||(e[6]=n=>z.value=!0),onBlur:e[7]||(e[7]=n=>z.value=!1)},null,8,["modelValue"]),Ge])),[[fe,k.value]]):t.value==2?(_(),w("div",He,[s("div",Qe,[s("div",Xe,[s("div",Ye,[r.value?(_(),w("span",Ze,S(r.value),1)):(_(),w("span",ea,"按下键盘输入客户支付金额"))]),A.value>=0?(_(),w("div",aa,[s("div",null,[C(" 需找零(元):"),s("span",sa,"¥"+S(A.value),1)]),ta])):(_(),w("div",la,ia)),s("div",ua,[s("div",ca,[(_(!0),w(Ce,null,xe(ue.value,n=>(_(),O($,{key:n,onClick:fa=>d(n)},{default:g(()=>[C(S(n),1)]),_:2},1032,["onClick"]))),128))]),s("div",ra,[x($,{onClick:N},{default:g(()=>[x(_e,null,{default:g(()=>[x(ve)]),_:1})]),_:1}),x($,{onClick:e[8]||(e[8]=n=>N(-1))},{default:g(()=>[C("C")]),_:1}),x($,{class:B(["enter",{"enter-disable":+r.value<+u.value.pay_price}]),disabled:+r.value<+u.value.pay_price,onClick:H},{default:g(()=>[C(" 确认 ")]),_:1},8,["class","disabled"])])])])])])):t.value==3||t.value==4||t.value==5?(_(),w("div",da,[s("div",va,[x(l,{modelValue:I.value,"onUpdate:modelValue":e[9]||(e[9]=n=>I.value=n),autofocus:"",class:"code-input",placeholder:"请输入验证码",onKeyup:ee(Q,["enter"]),onFocus:e[10]||(e[10]=n=>z.value=!0),onBlur:e[11]||(e[11]=n=>z.value=!1)},null,8,["modelValue"]),(_(),O(Fe,{style:{"margin-left":"1rem"},onSendCode:de,start:f.value>0,key:u.value.order_id,class:"get-code-btn"},null,8,["start"]))]),x($,{type:"primary",onClick:Q,class:"code-pay"},{default:g(()=>[C("确认支付")]),_:1})])):Z("",!0)])]),footer:g(()=>[s("div",_a,[x($,{class:"cancel-btn",onClick:te},{default:g(()=>[C("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ka=ye(pa,[["__scopeId","data-v-09cf2609"]]);export{ka as p}; diff --git a/dist/assets/shop-4Vi_GXIy.js b/dist/assets/shop-DHOKo0Qh.js similarity index 73% rename from dist/assets/shop-4Vi_GXIy.js rename to dist/assets/shop-DHOKo0Qh.js index 2846f4c..eb3707e 100644 --- a/dist/assets/shop-4Vi_GXIy.js +++ b/dist/assets/shop-DHOKo0Qh.js @@ -1 +1 @@ -import{K as s}from"./index-DZ-rs8qe.js";import{r}from"./axiosAPI-CvHIP5YD.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-El3JpHtp.js";import{r}from"./axiosAPI-m7QjxXd9.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}; diff --git a/dist/assets/store-eKONkWfH.js b/dist/assets/store-D17PfqyZ.js similarity index 80% rename from dist/assets/store-eKONkWfH.js rename to dist/assets/store-D17PfqyZ.js index 238c408..40d170b 100644 --- a/dist/assets/store-eKONkWfH.js +++ b/dist/assets/store-D17PfqyZ.js @@ -1 +1 @@ -import{K as e}from"./index-DZ-rs8qe.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}; +import{K as e}from"./index-El3JpHtp.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)}function m(r){return e.get("/store_order/StoreOrder/wechatQuery",{params:r})}export{s as a,o as b,i as c,d,m as e,f,u as g,c as h,O as i,A as j,g as k,S as l,l as m,n as o,a as s,p as u,_ as w}; diff --git a/dist/assets/test-PoA383m7.js b/dist/assets/test-2qMQQxfe.js similarity index 99% rename from dist/assets/test-PoA383m7.js rename to dist/assets/test-2qMQQxfe.js index c7e2078..aad29b9 100644 --- a/dist/assets/test-PoA383m7.js +++ b/dist/assets/test-2qMQQxfe.js @@ -1,4 +1,4 @@ -import{r as O,b as S,c as w,k as C,e as g,f as T,w as A,F as x,E as I,g as L}from"./index-DZ-rs8qe.js";var D={exports:{}};(function(j,M){(function(a,e){j.exports=e()})(window,function(){return function(h){var a={};function e(o){if(a[o])return a[o].exports;var d=a[o]={i:o,l:!1,exports:{}};return h[o].call(d.exports,d,d.exports,e),d.l=!0,d.exports}return e.m=h,e.c=a,e.d=function(o,d,f){e.o(o,d)||Object.defineProperty(o,d,{enumerable:!0,get:f})},e.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,d){if(d&1&&(o=e(o)),d&8||d&4&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(e.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),d&2&&typeof o!="string")for(var b in o)e.d(f,b,(function(i){return o[i]}).bind(null,b));return f},e.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(d,"a",d),d},e.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},e.p="",e(e.s=0)}({"./src/index.js":function(h,a,e){e.r(a),e("./src/sass/index.scss");var o=e("./src/js/init.js"),d=o.default.init;typeof window<"u"&&(window.printJS=d),a.default=d},"./src/js/browser.js":function(h,a,e){e.r(a);var o={isFirefox:function(){return typeof InstallTrigger<"u"},isIE:function(){return navigator.userAgent.indexOf("MSIE")!==-1||!!document.documentMode},isEdge:function(){return!o.isIE()&&!!window.StyleMedia},isChrome:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;return!!f.chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||navigator.userAgent.toLowerCase().indexOf("safari")!==-1},isIOSChrome:function(){return navigator.userAgent.toLowerCase().indexOf("crios")!==-1}};a.default=o},"./src/js/functions.js":function(h,a,e){e.r(a),e.d(a,"addWrapper",function(){return b}),e.d(a,"capitalizePrint",function(){return i}),e.d(a,"collectStyles",function(){return l}),e.d(a,"addHeader",function(){return n}),e.d(a,"cleanUp",function(){return u}),e.d(a,"isRawHTML",function(){return p});var o=e("./src/js/modal.js"),d=e("./src/js/browser.js");function f(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(c){return typeof c}:f=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},f(t)}function b(t,s){var c="font-family:"+s.font+" !important; font-size: "+s.font_size+" !important; width:100%;";return'
'+t+"
"}function i(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t,s){for(var c=document.defaultView||window,E="",y=c.getComputedStyle(t,""),m=0;m]*>(.*?)");return s.test(t)}},"./src/js/html.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(n){return typeof n}:f=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},f(l)}a.default={print:function(r,n){var u=i(r.printable)?r.printable:document.getElementById(r.printable);if(!u){window.console.error("Invalid HTML element id: "+r.printable);return}r.printableElement=b(u,r),r.header&&Object(o.addHeader)(r.printableElement,r),d.default.send(r,n)}};function b(l,r){for(var n=l.cloneNode(),u=Array.prototype.slice.call(l.childNodes),p=0;p"+t.documentTitle+"",t.css&&(Array.isArray(t.css)||(t.css=[t.css]),t.css.forEach(function(v){y.srcdoc+=''})),y.srcdoc+=""),t.type){case"pdf":if(o.default.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer.");var m=window.open(t.fallbackPrintable,"_blank");m.focus(),t.onIncompatibleBrowser()}catch(v){t.onError(v)}finally{t.showModal&&d.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}else f.default.print(t,y);break;case"image":l.default.print(t,y);break;case"html":b.default.print(t,y);break;case"raw-html":i.default.print(t,y);break;case"json":r.default.print(t,y);break}}}},"./src/js/json.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(r){return typeof r}:f=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(i)}a.default={print:function(l,r){if(f(l.printable)!=="object")throw new Error("Invalid javascript data object (JSON).");if(typeof l.repeatTableHeader!="boolean")throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!l.properties||!Array.isArray(l.properties))throw new Error("Invalid properties array for your JSON data.");l.properties=l.properties.map(function(n){return{field:f(n)==="object"?n.field:n,displayName:f(n)==="object"?n.displayName:n,columnSize:f(n)==="object"&&n.columnSize?n.columnSize+";":100/l.properties.length+"%;"}}),l.printableElement=document.createElement("div"),l.header&&Object(o.addHeader)(l.printableElement,l),l.printableElement.innerHTML+=b(l),d.default.send(l,r)}};function b(i){var l=i.printable,r=i.properties,n='';i.repeatTableHeader&&(n+=""),n+="";for(var u=0;u'+Object(o.capitalizePrint)(r[u].displayName)+"";n+="",i.repeatTableHeader&&(n+=""),n+="";for(var p=0;p";for(var t=0;t1)for(var E=0;E'+s+""}n+=""}return n+="
",n}},"./src/js/modal.js":function(h,a,e){e.r(a);var o={show:function(f){var b="font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;",i=document.createElement("div");i.setAttribute("style",b),i.setAttribute("id","printJS-Modal");var l=document.createElement("div");l.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var r=document.createElement("div");r.setAttribute("class","printClose"),r.setAttribute("id","printClose"),l.appendChild(r);var n=document.createElement("span");n.setAttribute("class","printSpinner"),l.appendChild(n);var u=document.createTextNode(f.modalMessage);l.appendChild(u),i.appendChild(l),document.getElementsByTagName("body")[0].appendChild(i),document.getElementById("printClose").addEventListener("click",function(){o.close()})},close:function(){var f=document.getElementById("printJS-Modal");f&&f.parentNode.removeChild(f)}};a.default=o},"./src/js/pdf.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js"),d=e("./src/js/functions.js");a.default={print:function(i,l){if(i.base64){var r=Uint8Array.from(atob(i.printable),function(u){return u.charCodeAt(0)});f(i,l,r);return}i.printable=/^(blob|http|\/\/)/i.test(i.printable)?i.printable:window.location.origin+(i.printable.charAt(0)!=="/"?"/"+i.printable:i.printable);var n=new window.XMLHttpRequest;n.responseType="arraybuffer",n.addEventListener("error",function(){Object(d.cleanUp)(i),i.onError(n.statusText,n)}),n.addEventListener("load",function(){if([200,201].indexOf(n.status)===-1){Object(d.cleanUp)(i),i.onError(n.statusText,n);return}f(i,l,n.response)}),n.open("GET",i.printable,!0),n.send()}};function f(b,i,l){var r=new window.Blob([l],{type:"application/pdf"});r=window.URL.createObjectURL(r),i.setAttribute("src",r),o.default.send(b,i)}},"./src/js/print.js":function(h,a,e){e.r(a);var o=e("./src/js/browser.js"),d=e("./src/js/functions.js"),f={send:function(n,u){document.getElementsByTagName("body")[0].appendChild(u);var p=document.getElementById(n.frameId);p.onload=function(){if(n.type==="pdf"){o.default.isFirefox()?setTimeout(function(){return b(p,n)},1e3):b(p,n);return}var t=p.contentWindow||p.contentDocument;if(t.document&&(t=t.document),t.body.appendChild(n.printableElement),n.type!=="pdf"&&n.style){var s=document.createElement("style");s.innerHTML=n.style,t.head.appendChild(s)}var c=t.getElementsByTagName("img");c.length>0?i(Array.from(c)).then(function(){return b(p,n)}):b(p,n)}}};function b(r,n){try{if(r.focus(),o.default.isEdge()||o.default.isIE())try{r.contentWindow.document.execCommand("print",!1,null)}catch{r.contentWindow.print()}else r.contentWindow.print()}catch(u){n.onError(u)}finally{o.default.isFirefox()&&(r.style.visibility="hidden",r.style.left="-1px"),Object(d.cleanUp)(n)}}function i(r){var n=r.map(function(u){if(u.src&&u.src!==window.location.href)return l(u)});return Promise.all(n)}function l(r){return new Promise(function(n){var u=function p(){!r||typeof r.naturalWidth>"u"||r.naturalWidth===0||!r.complete?setTimeout(p,500):n()};u()})}a.default=f},"./src/js/raw-html.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js");a.default={print:function(f,b){f.printableElement=document.createElement("div"),f.printableElement.setAttribute("style","width:100%"),f.printableElement.innerHTML=f.printable,o.default.send(f,b)}}},"./src/sass/index.scss":function(h,a,e){},0:function(h,a,e){h.exports=e("./src/index.js")}}).default})})(D);const B=g("h2",null,"小票标题",-1),U=g("p",null,"商品名称: 商品1",-1),R=g("p",null,"价格: ¥10.00",-1),W=g("p",null,"数量: 1",-1),H=g("p",null,"-------------------",-1),N=g("p",null,"总计: ¥10.00",-1),K=g("p",null,"-------------------",-1),z=[B,U,R,W,H,N,K],F={__name:"test",setup(j){const M=O(null),h=()=>{uni.getEnv(e=>{e.h5?I.error("请使用APP打印小票"):a()})},a=()=>{let e="";e+=`******************************** +import{r as O,b as S,c as w,k as C,e as g,f as T,w as A,F as x,E as I,g as L}from"./index-El3JpHtp.js";var D={exports:{}};(function(j,M){(function(a,e){j.exports=e()})(window,function(){return function(h){var a={};function e(o){if(a[o])return a[o].exports;var d=a[o]={i:o,l:!1,exports:{}};return h[o].call(d.exports,d,d.exports,e),d.l=!0,d.exports}return e.m=h,e.c=a,e.d=function(o,d,f){e.o(o,d)||Object.defineProperty(o,d,{enumerable:!0,get:f})},e.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,d){if(d&1&&(o=e(o)),d&8||d&4&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(e.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),d&2&&typeof o!="string")for(var b in o)e.d(f,b,(function(i){return o[i]}).bind(null,b));return f},e.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(d,"a",d),d},e.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},e.p="",e(e.s=0)}({"./src/index.js":function(h,a,e){e.r(a),e("./src/sass/index.scss");var o=e("./src/js/init.js"),d=o.default.init;typeof window<"u"&&(window.printJS=d),a.default=d},"./src/js/browser.js":function(h,a,e){e.r(a);var o={isFirefox:function(){return typeof InstallTrigger<"u"},isIE:function(){return navigator.userAgent.indexOf("MSIE")!==-1||!!document.documentMode},isEdge:function(){return!o.isIE()&&!!window.StyleMedia},isChrome:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;return!!f.chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||navigator.userAgent.toLowerCase().indexOf("safari")!==-1},isIOSChrome:function(){return navigator.userAgent.toLowerCase().indexOf("crios")!==-1}};a.default=o},"./src/js/functions.js":function(h,a,e){e.r(a),e.d(a,"addWrapper",function(){return b}),e.d(a,"capitalizePrint",function(){return i}),e.d(a,"collectStyles",function(){return l}),e.d(a,"addHeader",function(){return n}),e.d(a,"cleanUp",function(){return u}),e.d(a,"isRawHTML",function(){return p});var o=e("./src/js/modal.js"),d=e("./src/js/browser.js");function f(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(c){return typeof c}:f=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},f(t)}function b(t,s){var c="font-family:"+s.font+" !important; font-size: "+s.font_size+" !important; width:100%;";return'
'+t+"
"}function i(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t,s){for(var c=document.defaultView||window,E="",y=c.getComputedStyle(t,""),m=0;m]*>(.*?)");return s.test(t)}},"./src/js/html.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(n){return typeof n}:f=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},f(l)}a.default={print:function(r,n){var u=i(r.printable)?r.printable:document.getElementById(r.printable);if(!u){window.console.error("Invalid HTML element id: "+r.printable);return}r.printableElement=b(u,r),r.header&&Object(o.addHeader)(r.printableElement,r),d.default.send(r,n)}};function b(l,r){for(var n=l.cloneNode(),u=Array.prototype.slice.call(l.childNodes),p=0;p"+t.documentTitle+"",t.css&&(Array.isArray(t.css)||(t.css=[t.css]),t.css.forEach(function(v){y.srcdoc+=''})),y.srcdoc+=""),t.type){case"pdf":if(o.default.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer.");var m=window.open(t.fallbackPrintable,"_blank");m.focus(),t.onIncompatibleBrowser()}catch(v){t.onError(v)}finally{t.showModal&&d.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}else f.default.print(t,y);break;case"image":l.default.print(t,y);break;case"html":b.default.print(t,y);break;case"raw-html":i.default.print(t,y);break;case"json":r.default.print(t,y);break}}}},"./src/js/json.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(r){return typeof r}:f=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(i)}a.default={print:function(l,r){if(f(l.printable)!=="object")throw new Error("Invalid javascript data object (JSON).");if(typeof l.repeatTableHeader!="boolean")throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!l.properties||!Array.isArray(l.properties))throw new Error("Invalid properties array for your JSON data.");l.properties=l.properties.map(function(n){return{field:f(n)==="object"?n.field:n,displayName:f(n)==="object"?n.displayName:n,columnSize:f(n)==="object"&&n.columnSize?n.columnSize+";":100/l.properties.length+"%;"}}),l.printableElement=document.createElement("div"),l.header&&Object(o.addHeader)(l.printableElement,l),l.printableElement.innerHTML+=b(l),d.default.send(l,r)}};function b(i){var l=i.printable,r=i.properties,n='';i.repeatTableHeader&&(n+=""),n+="";for(var u=0;u'+Object(o.capitalizePrint)(r[u].displayName)+"";n+="",i.repeatTableHeader&&(n+=""),n+="";for(var p=0;p";for(var t=0;t1)for(var E=0;E'+s+""}n+=""}return n+="
",n}},"./src/js/modal.js":function(h,a,e){e.r(a);var o={show:function(f){var b="font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;",i=document.createElement("div");i.setAttribute("style",b),i.setAttribute("id","printJS-Modal");var l=document.createElement("div");l.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var r=document.createElement("div");r.setAttribute("class","printClose"),r.setAttribute("id","printClose"),l.appendChild(r);var n=document.createElement("span");n.setAttribute("class","printSpinner"),l.appendChild(n);var u=document.createTextNode(f.modalMessage);l.appendChild(u),i.appendChild(l),document.getElementsByTagName("body")[0].appendChild(i),document.getElementById("printClose").addEventListener("click",function(){o.close()})},close:function(){var f=document.getElementById("printJS-Modal");f&&f.parentNode.removeChild(f)}};a.default=o},"./src/js/pdf.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js"),d=e("./src/js/functions.js");a.default={print:function(i,l){if(i.base64){var r=Uint8Array.from(atob(i.printable),function(u){return u.charCodeAt(0)});f(i,l,r);return}i.printable=/^(blob|http|\/\/)/i.test(i.printable)?i.printable:window.location.origin+(i.printable.charAt(0)!=="/"?"/"+i.printable:i.printable);var n=new window.XMLHttpRequest;n.responseType="arraybuffer",n.addEventListener("error",function(){Object(d.cleanUp)(i),i.onError(n.statusText,n)}),n.addEventListener("load",function(){if([200,201].indexOf(n.status)===-1){Object(d.cleanUp)(i),i.onError(n.statusText,n);return}f(i,l,n.response)}),n.open("GET",i.printable,!0),n.send()}};function f(b,i,l){var r=new window.Blob([l],{type:"application/pdf"});r=window.URL.createObjectURL(r),i.setAttribute("src",r),o.default.send(b,i)}},"./src/js/print.js":function(h,a,e){e.r(a);var o=e("./src/js/browser.js"),d=e("./src/js/functions.js"),f={send:function(n,u){document.getElementsByTagName("body")[0].appendChild(u);var p=document.getElementById(n.frameId);p.onload=function(){if(n.type==="pdf"){o.default.isFirefox()?setTimeout(function(){return b(p,n)},1e3):b(p,n);return}var t=p.contentWindow||p.contentDocument;if(t.document&&(t=t.document),t.body.appendChild(n.printableElement),n.type!=="pdf"&&n.style){var s=document.createElement("style");s.innerHTML=n.style,t.head.appendChild(s)}var c=t.getElementsByTagName("img");c.length>0?i(Array.from(c)).then(function(){return b(p,n)}):b(p,n)}}};function b(r,n){try{if(r.focus(),o.default.isEdge()||o.default.isIE())try{r.contentWindow.document.execCommand("print",!1,null)}catch{r.contentWindow.print()}else r.contentWindow.print()}catch(u){n.onError(u)}finally{o.default.isFirefox()&&(r.style.visibility="hidden",r.style.left="-1px"),Object(d.cleanUp)(n)}}function i(r){var n=r.map(function(u){if(u.src&&u.src!==window.location.href)return l(u)});return Promise.all(n)}function l(r){return new Promise(function(n){var u=function p(){!r||typeof r.naturalWidth>"u"||r.naturalWidth===0||!r.complete?setTimeout(p,500):n()};u()})}a.default=f},"./src/js/raw-html.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js");a.default={print:function(f,b){f.printableElement=document.createElement("div"),f.printableElement.setAttribute("style","width:100%"),f.printableElement.innerHTML=f.printable,o.default.send(f,b)}}},"./src/sass/index.scss":function(h,a,e){},0:function(h,a,e){h.exports=e("./src/index.js")}}).default})})(D);const B=g("h2",null,"小票标题",-1),U=g("p",null,"商品名称: 商品1",-1),R=g("p",null,"价格: ¥10.00",-1),W=g("p",null,"数量: 1",-1),H=g("p",null,"-------------------",-1),N=g("p",null,"总计: ¥10.00",-1),K=g("p",null,"-------------------",-1),z=[B,U,R,W,H,N,K],F={__name:"test",setup(j){const M=O(null),h=()=>{uni.getEnv(e=>{e.h5?I.error("请使用APP打印小票"):a()})},a=()=>{let e="";e+=`******************************** `,e+=`泸优采-小票 `,e+=`单号: CG171565043141139102 `,e+=`测试商品1 * 1 1.00元 diff --git a/dist/assets/user-C_IO-ELJ.js b/dist/assets/user-BasTd-eJ.js similarity index 91% rename from dist/assets/user-C_IO-ELJ.js rename to dist/assets/user-BasTd-eJ.js index 3d7d921..104b1d5 100644 --- a/dist/assets/user-C_IO-ELJ.js +++ b/dist/assets/user-BasTd-eJ.js @@ -1 +1 @@ -import{K as r}from"./index-DZ-rs8qe.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}; +import{K as r}from"./index-El3JpHtp.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}; diff --git a/dist/index.html b/dist/index.html index 074af78..ef7ade7 100644 --- a/dist/index.html +++ b/dist/index.html @@ -56,7 +56,7 @@ } } - +