From 3258af7dc184a7015c8071aae1cdc5256a896394 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 30 Sep 2024 10:13:25 +0800 Subject: [PATCH] 1 --- .../assets/{authCode-Bkx2NvqR.js => authCode-BUZTOdZ4.js} | 2 +- .../assets/{axiosAPI-DDmlkTNA.js => axiosAPI-Ba6KY3fO.js} | 2 +- dist/assets/{index-v-x5NSMp.css => index-0AtzZ_LB.css} | 2 +- dist/assets/{index-C3HwVIuf.js => index-B2rt9Xnd.js} | 4 ++-- dist/assets/{index-D5ex3gGJ.js => index-Bq92yWb_.js} | 2 +- dist/assets/{index-Ep0mL_To.js => index-CdIMOsQu.js} | 2 +- dist/assets/{index-Dk5tVp6E.js => index-CfeE6Lk8.js} | 2 +- dist/assets/{index-DkHSvJyS.js => index-ChKKpaUM.js} | 2 +- dist/assets/{index-DU9U0S0M.js => index-Cwqi17Y_.js} | 2 +- dist/assets/{index-tHzK7TfH.js => index-DTn5H3kO.js} | 2 +- dist/assets/{index-CLb5_BTw.js => index-DVkq4v4f.js} | 2 +- dist/assets/{index-CCCsrSm6.js => index-Dc-r2OZr.js} | 2 +- dist/assets/{index-E14u6KMl.js => index-Dpgi2_W8.js} | 2 +- dist/assets/{index-BJtmEdhZ.js => index-DqYh8SjT.js} | 8 ++++---- dist/assets/{index-BWKNHFxA.js => index-xN5UowRa.js} | 2 +- dist/assets/{padding-C3oG-cSE.js => padding-DSO_pR_4.js} | 2 +- dist/assets/{pay-p0l28gLY.js => pay-CjxUscAC.js} | 2 +- dist/assets/{shop-BkcZJAaI.js => shop-Bb7RKZzc.js} | 2 +- dist/assets/{store-B0fbVdy5.js => store-BJuQ4A3H.js} | 2 +- dist/assets/{test-D-FiQV_n.js => test-B8jeWBDU.js} | 2 +- dist/assets/{user-lT_1UriU.js => user-BChXbsnq.js} | 2 +- dist/index.html | 2 +- src/views/home/component/shop.vue | 3 +-- src/views/saleHome/component/shop.vue | 2 +- 24 files changed, 28 insertions(+), 29 deletions(-) rename dist/assets/{authCode-Bkx2NvqR.js => authCode-BUZTOdZ4.js} (93%) rename dist/assets/{axiosAPI-DDmlkTNA.js => axiosAPI-Ba6KY3fO.js} (93%) rename dist/assets/{index-v-x5NSMp.css => index-0AtzZ_LB.css} (84%) rename dist/assets/{index-C3HwVIuf.js => index-B2rt9Xnd.js} (99%) rename dist/assets/{index-D5ex3gGJ.js => index-Bq92yWb_.js} (97%) rename dist/assets/{index-Ep0mL_To.js => index-CdIMOsQu.js} (98%) rename dist/assets/{index-Dk5tVp6E.js => index-CfeE6Lk8.js} (96%) rename dist/assets/{index-DkHSvJyS.js => index-ChKKpaUM.js} (84%) rename dist/assets/{index-DU9U0S0M.js => index-Cwqi17Y_.js} (96%) rename dist/assets/{index-tHzK7TfH.js => index-DTn5H3kO.js} (98%) rename dist/assets/{index-CLb5_BTw.js => index-DVkq4v4f.js} (94%) rename dist/assets/{index-CCCsrSm6.js => index-Dc-r2OZr.js} (98%) rename dist/assets/{index-E14u6KMl.js => index-Dpgi2_W8.js} (99%) rename dist/assets/{index-BJtmEdhZ.js => index-DqYh8SjT.js} (78%) rename dist/assets/{index-BWKNHFxA.js => index-xN5UowRa.js} (98%) rename dist/assets/{padding-C3oG-cSE.js => padding-DSO_pR_4.js} (65%) rename dist/assets/{pay-p0l28gLY.js => pay-CjxUscAC.js} (98%) rename dist/assets/{shop-BkcZJAaI.js => shop-Bb7RKZzc.js} (73%) rename dist/assets/{store-B0fbVdy5.js => store-BJuQ4A3H.js} (95%) rename dist/assets/{test-D-FiQV_n.js => test-B8jeWBDU.js} (99%) rename dist/assets/{user-lT_1UriU.js => user-BChXbsnq.js} (91%) diff --git a/dist/assets/authCode-Bkx2NvqR.js b/dist/assets/authCode-BUZTOdZ4.js similarity index 93% rename from dist/assets/authCode-Bkx2NvqR.js rename to dist/assets/authCode-BUZTOdZ4.js index 3135518..d2beb78 100644 --- a/dist/assets/authCode-Bkx2NvqR.js +++ b/dist/assets/authCode-BUZTOdZ4.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-C3HwVIuf.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-B2rt9Xnd.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-DDmlkTNA.js b/dist/assets/axiosAPI-Ba6KY3fO.js similarity index 93% rename from dist/assets/axiosAPI-DDmlkTNA.js rename to dist/assets/axiosAPI-Ba6KY3fO.js index 1152123..1a56c91 100644 --- a/dist/assets/axiosAPI-DDmlkTNA.js +++ b/dist/assets/axiosAPI-Ba6KY3fO.js @@ -1 +1 @@ -import{O as o,P as s,E as r,u as d,Q as g}from"./index-C3HwVIuf.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-B2rt9Xnd.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-v-x5NSMp.css b/dist/assets/index-0AtzZ_LB.css similarity index 84% rename from dist/assets/index-v-x5NSMp.css rename to dist/assets/index-0AtzZ_LB.css index a52ff46..ba028bd 100644 --- a/dist/assets/index-v-x5NSMp.css +++ b/dist/assets/index-0AtzZ_LB.css @@ -1 +1 @@ -@charset "UTF-8";.dialog-footer .ok-btn[data-v-924edcc0]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-924edcc0]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.check-user-list[data-v-7ac34513]{border-radius:1.2rem;height:70vh;background-color:#fff;width:100%;position:relative;overflow:hidden;display:flex;flex-direction:column}.check-user-list .header-nav[data-v-7ac34513]{display:flex;justify-content:space-between;padding:1rem}.check-user-list .header-nav span[data-v-7ac34513]{color:#ff4a00}.check-user-list .header-nav .nav-item[data-v-7ac34513]{font-weight:700}.check-user-list .header-input[data-v-7ac34513]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.check-user-list .order-lists[data-v-7ac34513]{flex:1;overflow-y:auto;display:flex;flex-wrap:wrap;justify-content:flex-start}.check-user-list .order-lists .item[data-v-7ac34513]{width:45%;height:7rem;border-radius:.5rem;cursor:pointer;box-sizing:border-box;padding:1rem;margin:.5rem;background-color:#f5f5f5;display:flex}.check-user-list .order-lists .item .avatar[data-v-7ac34513]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.check-user-list .order-lists .item .flex-between[data-v-7ac34513]{display:flex;justify-content:space-between;align-items:center}.check-user-list .order-lists .item .flex[data-v-7ac34513]{display:flex;flex-wrap:wrap}.check-user-list .order-lists .item .bold[data-v-7ac34513]{font-weight:700}.check-user-list .order-lists .item .r-1[data-v-7ac34513]{margin-right:1rem}.check-user-list .order-lists .item .bottom>div[data-v-7ac34513]{width:50%}.check-user-list .order-lists .item .red[data-v-7ac34513]{color:#ff4a00}.check-user-list .order-lists .item-active[data-v-7ac34513]{background-color:#efefef}.check-user-list .load-end[data-v-7ac34513]{text-align:center;padding:1rem;color:#333;font-size:.8rem;width:100%;height:100%}.my-order[data-v-baa96417]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .user-nav .user-info[data-v-baa96417]{padding:1rem;margin:1rem;margin-bottom:0;border:.125rem solid #f70;background-color:#ff77001a;border-radius:.5rem;display:flex}.my-order .user-nav .user-info .avatar[data-v-baa96417]{width:3rem;height:3rem;flex-shrink:0}.my-order .user-nav .user-info .info[data-v-baa96417]{flex:1;margin-left:1rem;color:#666}.my-order .user-nav .user-info .info .flex-bewteen[data-v-baa96417]{display:flex;justify-content:space-between}.my-order .user-nav .user-info .info .change-user[data-v-baa96417]{font-size:1rem}.my-order .user-nav .user-info .info .user-money[data-v-baa96417]{display:flex;flex:1;flex-wrap:wrap}.my-order .user-nav .user-info .info .user-money>div[data-v-baa96417]{flex-shrink:0}.my-order .header-nav[data-v-baa96417]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-baa96417]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-baa96417]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-baa96417]{flex:1;overflow-y:auto;padding-bottom:10rem}.my-order .order-list .order-item[data-v-baa96417]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-baa96417]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-baa96417]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-baa96417]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-baa96417]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-baa96417]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-baa96417]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-baa96417]{position:absolute;bottom:0;left:0;z-index:20;width:100%;box-shadow:0 -.0625rem .625rem #eee;background-color:#fff}.my-order .order-footer .order-total[data-v-baa96417]{height:3.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-baa96417]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-baa96417]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-baa96417]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-baa96417]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-baa96417]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-baa96417]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-b1bc33a8]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-b1bc33a8]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-b1bc33a8]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-b1bc33a8]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-b1bc33a8]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-b1bc33a8] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-b1bc33a8]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-b1bc33a8]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-b1bc33a8]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-b1bc33a8]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-b1bc33a8]{width:11.5rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.7rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-b1bc33a8]{border-radius:.5rem;width:11.5rem;height:11.5rem}.my-order .shop-list .shop-item .shop-name[data-v-b1bc33a8]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;margin-top:.5rem}.my-order .shop-list .shop-item .shop-price[data-v-b1bc33a8]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-b1bc33a8]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-b1bc33a8]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item .shop-price .del[data-v-b1bc33a8]{text-decoration:line-through}.my-order .shop-list .shop-item[data-v-b1bc33a8]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-b1bc33a8],.my-order .shop-list .shop-item:hover .unit-name[data-v-b1bc33a8]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-b1bc33a8]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-b1bc33a8]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.my-order .shop-list .shop-item .no-stock-re[data-v-b1bc33a8]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0000001a;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock-re div[data-v-b1bc33a8]{background-color:#1890ffcc;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-5707a0cd]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-5707a0cd]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-5707a0cd]{display:flex}.shop .shop-info .shop-info-left[data-v-5707a0cd]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-5707a0cd]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-5707a0cd]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-5707a0cd]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-5707a0cd]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-5707a0cd]{font-size:1.4rem;margin-left:.2rem}.shop .shop-info .shop-info-right .shop-info-right-price .unit-name[data-v-5707a0cd]{font-size:.9rem;color:#999;font-weight:400}.shop .shop-info .shop-info-right .shop-info-right-price .del[data-v-5707a0cd]{text-decoration:line-through}.shop .shop-sku[data-v-5707a0cd]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-4d5623b0]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-4d5623b0]{width:4rem;margin:1rem;padding:.5rem 1rem;text-align:center;border-radius:3rem;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classify .itemP-active[data-v-4d5623b0]{background-color:#1890ff;color:#fff}.active-card .title[data-v-4d5623b0]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-4d5623b0]{display:flex;flex-wrap:wrap}.active-card .list div[data-v-4d5623b0]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-4d5623b0]{color:#1890ff}[data-v-4d5623b0]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.dialog-footer .ok-btn[data-v-924edcc0]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-924edcc0]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.check-user-list[data-v-7ac34513]{border-radius:1.2rem;height:70vh;background-color:#fff;width:100%;position:relative;overflow:hidden;display:flex;flex-direction:column}.check-user-list .header-nav[data-v-7ac34513]{display:flex;justify-content:space-between;padding:1rem}.check-user-list .header-nav span[data-v-7ac34513]{color:#ff4a00}.check-user-list .header-nav .nav-item[data-v-7ac34513]{font-weight:700}.check-user-list .header-input[data-v-7ac34513]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.check-user-list .order-lists[data-v-7ac34513]{flex:1;overflow-y:auto;display:flex;flex-wrap:wrap;justify-content:flex-start}.check-user-list .order-lists .item[data-v-7ac34513]{width:45%;height:7rem;border-radius:.5rem;cursor:pointer;box-sizing:border-box;padding:1rem;margin:.5rem;background-color:#f5f5f5;display:flex}.check-user-list .order-lists .item .avatar[data-v-7ac34513]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.check-user-list .order-lists .item .flex-between[data-v-7ac34513]{display:flex;justify-content:space-between;align-items:center}.check-user-list .order-lists .item .flex[data-v-7ac34513]{display:flex;flex-wrap:wrap}.check-user-list .order-lists .item .bold[data-v-7ac34513]{font-weight:700}.check-user-list .order-lists .item .r-1[data-v-7ac34513]{margin-right:1rem}.check-user-list .order-lists .item .bottom>div[data-v-7ac34513]{width:50%}.check-user-list .order-lists .item .red[data-v-7ac34513]{color:#ff4a00}.check-user-list .order-lists .item-active[data-v-7ac34513]{background-color:#efefef}.check-user-list .load-end[data-v-7ac34513]{text-align:center;padding:1rem;color:#333;font-size:.8rem;width:100%;height:100%}.my-order[data-v-baa96417]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .user-nav .user-info[data-v-baa96417]{padding:1rem;margin:1rem;margin-bottom:0;border:.125rem solid #f70;background-color:#ff77001a;border-radius:.5rem;display:flex}.my-order .user-nav .user-info .avatar[data-v-baa96417]{width:3rem;height:3rem;flex-shrink:0}.my-order .user-nav .user-info .info[data-v-baa96417]{flex:1;margin-left:1rem;color:#666}.my-order .user-nav .user-info .info .flex-bewteen[data-v-baa96417]{display:flex;justify-content:space-between}.my-order .user-nav .user-info .info .change-user[data-v-baa96417]{font-size:1rem}.my-order .user-nav .user-info .info .user-money[data-v-baa96417]{display:flex;flex:1;flex-wrap:wrap}.my-order .user-nav .user-info .info .user-money>div[data-v-baa96417]{flex-shrink:0}.my-order .header-nav[data-v-baa96417]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-baa96417]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-baa96417]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-baa96417]{flex:1;overflow-y:auto;padding-bottom:10rem}.my-order .order-list .order-item[data-v-baa96417]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-baa96417]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-baa96417]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-baa96417]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-baa96417]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-baa96417]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-baa96417]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-baa96417]{position:absolute;bottom:0;left:0;z-index:20;width:100%;box-shadow:0 -.0625rem .625rem #eee;background-color:#fff}.my-order .order-footer .order-total[data-v-baa96417]{height:3.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-baa96417]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-baa96417]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-baa96417]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-baa96417]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-baa96417]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-baa96417]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-1ef8e327]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-1ef8e327]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-1ef8e327]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-1ef8e327]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-1ef8e327]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-1ef8e327] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-1ef8e327]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-1ef8e327]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-1ef8e327]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-1ef8e327]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-1ef8e327]{width:11.5rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.7rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-1ef8e327]{border-radius:.5rem;width:11.5rem;height:11.5rem}.my-order .shop-list .shop-item .shop-name[data-v-1ef8e327]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;margin-top:.5rem}.my-order .shop-list .shop-item .shop-price[data-v-1ef8e327]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-1ef8e327]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-1ef8e327]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item .shop-price .del[data-v-1ef8e327]{text-decoration:line-through}.my-order .shop-list .shop-item[data-v-1ef8e327]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-1ef8e327],.my-order .shop-list .shop-item:hover .unit-name[data-v-1ef8e327]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-1ef8e327]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-1ef8e327]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.my-order .shop-list .shop-item .no-stock-re[data-v-1ef8e327]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0000001a;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock-re div[data-v-1ef8e327]{background-color:#1890ffcc;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-5707a0cd]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-5707a0cd]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-5707a0cd]{display:flex}.shop .shop-info .shop-info-left[data-v-5707a0cd]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-5707a0cd]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-5707a0cd]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-5707a0cd]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-5707a0cd]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-5707a0cd]{font-size:1.4rem;margin-left:.2rem}.shop .shop-info .shop-info-right .shop-info-right-price .unit-name[data-v-5707a0cd]{font-size:.9rem;color:#999;font-weight:400}.shop .shop-info .shop-info-right .shop-info-right-price .del[data-v-5707a0cd]{text-decoration:line-through}.shop .shop-sku[data-v-5707a0cd]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-4d5623b0]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-4d5623b0]{width:4rem;margin:1rem;padding:.5rem 1rem;text-align:center;border-radius:3rem;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classify .itemP-active[data-v-4d5623b0]{background-color:#1890ff;color:#fff}.active-card .title[data-v-4d5623b0]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-4d5623b0]{display:flex;flex-wrap:wrap}.active-card .list div[data-v-4d5623b0]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-4d5623b0]{color:#1890ff}[data-v-4d5623b0]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/dist/assets/index-C3HwVIuf.js b/dist/assets/index-B2rt9Xnd.js similarity index 99% rename from dist/assets/index-C3HwVIuf.js rename to dist/assets/index-B2rt9Xnd.js index e7ee69b..99bff40 100644 --- a/dist/assets/index-C3HwVIuf.js +++ b/dist/assets/index-B2rt9Xnd.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-BJtmEdhZ.js","./store-B0fbVdy5.js","./user-lT_1UriU.js","./moment-Cl4UOzQZ.js","./padding-C3oG-cSE.js","./axiosAPI-DDmlkTNA.js","./shop-BkcZJAaI.js","./pay-p0l28gLY.js","./authCode-Bkx2NvqR.js","./pay-BedbwRTP.css","./index-v-x5NSMp.css","./index-D5ex3gGJ.js","./index-CZvKrq1a.css","./index-BWKNHFxA.js","./index-B26FQ8AP.css","./index-Ep0mL_To.js","./index-N9EvKsCT.css","./index-tHzK7TfH.js","./index-ZYBKJJNc.css","./index-CCCsrSm6.js","./index-C_3rt8cw.css","./index-CLb5_BTw.js","./index-Bfak7bLR.css","./index-DU9U0S0M.js","./index-DjJP7Zaf.css","./index-E14u6KMl.js","./index-CCSaqPZy.css","./test-D-FiQV_n.js","./test-CmC8-tN2.css","./index-Dk5tVp6E.js","./index-BA6nwZsc.css"] + __vite__mapDeps.viteFileDeps = ["./index-DqYh8SjT.js","./store-BJuQ4A3H.js","./user-BChXbsnq.js","./moment-Cl4UOzQZ.js","./padding-DSO_pR_4.js","./axiosAPI-Ba6KY3fO.js","./shop-Bb7RKZzc.js","./pay-CjxUscAC.js","./authCode-BUZTOdZ4.js","./pay-BedbwRTP.css","./index-0AtzZ_LB.css","./index-Bq92yWb_.js","./index-CZvKrq1a.css","./index-xN5UowRa.js","./index-B26FQ8AP.css","./index-CdIMOsQu.js","./index-N9EvKsCT.css","./index-DTn5H3kO.js","./index-ZYBKJJNc.css","./index-Dc-r2OZr.js","./index-C_3rt8cw.css","./index-DVkq4v4f.js","./index-Bfak7bLR.css","./index-Cwqi17Y_.js","./index-DjJP7Zaf.css","./index-Dpgi2_W8.js","./index-CCSaqPZy.css","./test-B8jeWBDU.js","./test-CmC8-tN2.css","./index-CfeE6Lk8.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-BJtmEdhZ.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-D5ex3gGJ.js"),__vite__mapDeps([11,1,3,7,8,9,4,12]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>qn(()=>import("./index-BWKNHFxA.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/subOrder",name:"subOrder",meta:{title:"订单统计"},component:()=>qn(()=>import("./index-Ep0mL_To.js"),__vite__mapDeps([15,1,3,7,8,9,4,16]),import.meta.url)},{path:"/order",name:"order",meta:{title:"预约取货"},component:()=>qn(()=>import("./index-BWKNHFxA.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>qn(()=>import("./index-tHzK7TfH.js"),__vite__mapDeps([17,3,4,18]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>qn(()=>import("./index-CCCsrSm6.js"),__vite__mapDeps([19,1,4,20,9]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>qn(()=>import("./index-CLb5_BTw.js"),__vite__mapDeps([21,6,5,22]),import.meta.url)},{path:"/stock",name:"stock",meta:{title:"入库登记"},component:()=>qn(()=>import("./index-DU9U0S0M.js"),__vite__mapDeps([23,6,5,24]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>qn(()=>import("./index-E14u6KMl.js"),__vite__mapDeps([25,2,3,5,8,1,4,26]),import.meta.url)},{path:"/test",name:"test",component:()=>qn(()=>import("./test-D-FiQV_n.js"),__vite__mapDeps([27,28]),import.meta.url)}]},{path:"/login",name:"login",component:()=>qn(()=>import("./index-Dk5tVp6E.js"),__vite__mapDeps([29,2,30]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>qn(()=>import("./index-DkHSvJyS.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-DqYh8SjT.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-Bq92yWb_.js"),__vite__mapDeps([11,1,3,7,8,9,4,12]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>qn(()=>import("./index-xN5UowRa.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/subOrder",name:"subOrder",meta:{title:"订单统计"},component:()=>qn(()=>import("./index-CdIMOsQu.js"),__vite__mapDeps([15,1,3,7,8,9,4,16]),import.meta.url)},{path:"/order",name:"order",meta:{title:"预约取货"},component:()=>qn(()=>import("./index-xN5UowRa.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>qn(()=>import("./index-DTn5H3kO.js"),__vite__mapDeps([17,3,4,18]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>qn(()=>import("./index-Dc-r2OZr.js"),__vite__mapDeps([19,1,4,20,9]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>qn(()=>import("./index-DVkq4v4f.js"),__vite__mapDeps([21,6,5,22]),import.meta.url)},{path:"/stock",name:"stock",meta:{title:"入库登记"},component:()=>qn(()=>import("./index-Cwqi17Y_.js"),__vite__mapDeps([23,6,5,24]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>qn(()=>import("./index-Dpgi2_W8.js"),__vite__mapDeps([25,2,3,5,8,1,4,26]),import.meta.url)},{path:"/test",name:"test",component:()=>qn(()=>import("./test-B8jeWBDU.js"),__vite__mapDeps([27,28]),import.meta.url)}]},{path:"/login",name:"login",component:()=>qn(()=>import("./index-CfeE6Lk8.js"),__vite__mapDeps([29,2,30]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>qn(()=>import("./index-ChKKpaUM.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-D5ex3gGJ.js b/dist/assets/index-Bq92yWb_.js similarity index 97% rename from dist/assets/index-D5ex3gGJ.js rename to dist/assets/index-Bq92yWb_.js index 1cfad9e..bcb6247 100644 --- a/dist/assets/index-D5ex3gGJ.js +++ b/dist/assets/index-Bq92yWb_.js @@ -1 +1 @@ -import{_ as W,u as X,r as d,o as Z,m as V,a as ee,b as r,h as R,c as s,k as o,e,f as n,w as u,g,d as M,p,i as ie,j as q,F as j,l as Q,z as G,t as l,q as te,s as se,I as ae,E as H}from"./index-C3HwVIuf.js";import{d as le,e as ne,f as de,g as _e}from"./store-B0fbVdy5.js";import{h as J}from"./moment-Cl4UOzQZ.js";import{p as ce}from"./pay-p0l28gLY.js";import{p as re}from"./padding-C3oG-cSE.js";import"./authCode-Bkx2NvqR.js";/* empty css */const ue=f=>(te("data-v-bf6504fc"),f=f(),se(),f),ve={class:"my-order"},pe={class:"header-nav"},fe=ue(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),me={class:"nav-item-btn"},he={class:"header-input"},ye={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ge=["onClick"],ke={class:"top"},be={class:"create-time"},$e={class:"shop"},we={key:0,class:"left"},Ce={key:0,class:"shop-name"},De={class:"right"},Se={class:"money"},Ve={class:"count"},ze={class:"bottom"},Ye={class:"pay"},xe={key:0},Pe={key:1},Ie={key:2},Me={key:3},Re={key:4},Le={key:5},Ne={key:1,style:{color:"#ff4a00"}},Te={key:0,class:"load-end"},Be={key:1,class:"load-end"},Oe={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f,{expose:D}){X(),d([]);const t=d(1),k=y=>{_.value.page_no=1,w.value=!1,$.value=!1,m.value=[],h(!0)};d(null);const b=d(""),L=()=>{_.value.start_time=J(b.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=J(b.value[1]).format("YYYY-MM-DD 23:59:59"),h(!0)},N=y=>y.getTime()>Date.now(),_=d({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),$=d(!1),T=d(0),S=d(0),w=d(!1),m=d([]),h=(y=!1)=>{if(y)_.value.page_no=1;else if(w.value||$.value)return;$.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),le(_.value).then(a=>{y?m.value=a.data.lists:m.value=[...m.value,...a.data.lists],_.value.page_no==1&&m.value.length>0&&V.emit("set-sale-order-detail",m.value[0]),a.data.lists.length<_.value.page_size?w.value=!0:_.value.page_no++,S.value=0,console.log(_.value.page_no),T.value=a.data.count,$.value=!1}).catch(a=>{w.value=!0,$.value=!1})},v=(y,a)=>{S.value=a,V.emit("set-sale-order-detail",y)};return D({getOrderList:h}),Z(()=>{V.on("update-sale-order-detail",y=>{console.log("==="),m.value[S.value].paid=1})}),ee(()=>{V.off("update-sale-order-detail")}),(y,a)=>{const C=r("el-radio-button"),B=r("el-radio-group"),z=r("el-date-picker"),O=r("CircleClose"),U=r("el-icon"),A=r("el-button"),E=r("el-input"),Y=r("el-image"),x=r("spna"),P=R("loading"),I=R("infinite-scroll");return s(),o("div",ve,[e("div",pe,[fe,e("div",me,[n(B,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=i=>t.value=i),onChange:k,size:"small"},{default:u(()=>[n(C,{value:1},{default:u(()=>[g("全部")]),_:1}),n(C,{value:2},{default:u(()=>[g("未支付")]),_:1})]),_:1},8,["modelValue"]),n(z,{modelValue:b.value,"onUpdate:modelValue":a[1]||(a[1]=i=>b.value=i),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":N,onChange:L,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",he,[n(E,{modelValue:_.value.order_id,"onUpdate:modelValue":a[4]||(a[4]=i=>_.value.order_id=i),placeholder:"请输入订单编号",onKeydown:a[5]||(a[5]=ie(i=>h(!0),["enter"])),onClear:a[6]||(a[6]=i=>h(!0))},{suffix:u(()=>[_.value.order_id!=""?(s(),M(U,{key:0,size:"18",onClick:a[2]||(a[2]=i=>{_.value.order_id="",h(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:u(()=>[n(O)]),_:1})):p("",!0)]),append:u(()=>[n(A,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[3]||(a[3]=i=>h(!0))},{default:u(()=>[g("搜索")]),_:1})]),_:1},8,["modelValue"])]),q((s(),o("div",ye,[(s(!0),o(j,null,Q(m.value,(i,F)=>(s(),o("div",{class:G(["item",{"item-active":S.value==F}]),key:F,onClick:K=>v(i,F)},[e("div",ke,[e("div",{class:G(["sn","cahier"])},"单号: "+l(i.order_id),1),e("div",be,l(i.pay_time),1)]),e("div",$e,[i.product_info?(s(),o("div",we,[(s(!0),o(j,null,Q(i.product_info.slice(0,5),(K,oe)=>(s(),M(Y,{key:oe,src:K.image,class:"shop-img"},null,8,["src"]))),128)),i.product_info.length==1?(s(),o("div",Ce,l(i.product_info[0].store_name),1)):p("",!0)])):p("",!0),e("div",De,[e("div",Se,"¥"+l(i.pay_price),1),e("div",Ve,"共"+l(i.total_num)+"款商品",1)])]),e("div",ze,[e("div",Ye,[i.paid?(s(),o("div",xe,[g(l(i.paid_name)+" ",1),i.pay_type_name?(s(),M(x,{key:0},{default:u(()=>[g("("+l(i.pay_type_name)+")",1)]),_:2},1024)):i.pay_type==9?(s(),o("span",Pe,"(微信收款)")):i.pay_type==17?(s(),o("span",Ie,"(现金支付)")):i.pay_type==13?(s(),o("span",Me,"(支付宝收款)")):i.pay_type==3?(s(),o("span",Re,"(余额支付)")):i.pay_type==1?(s(),o("span",Le,"(微信支付)")):p("",!0)])):(s(),o("div",Ne,l(i.paid_name),1))])])],10,ge))),128)),w.value?(s(),o("div",Te,"没有更多了")):p("",!0),$.value?(s(),o("div",Be,"加载中...")):p("",!0)])),[[P,$.value],[I,h]])])}}},Ue=W(Oe,[["__scopeId","data-v-bf6504fc"]]),c=f=>(te("data-v-81084524"),f=f(),se(),f),Ae={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},qe=c(()=>e("div",{class:"table-title"},"订单信息",-1)),Ke={class:"table-info"},je={class:"info-item"},Qe=c(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=c(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),We={class:"info-item-info"},Xe={class:"info-item"},Ze=c(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=c(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),ot={class:"info-item-info"},it={class:"info-item"},at=c(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=c(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},rt=c(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ut={class:"info-item-info"},vt={class:"info-item"},pt=c(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ft={class:"info-item-info"},mt={key:0},ht={key:1},yt={key:2},gt={key:3},kt={key:4},bt={key:5},$t=c(()=>e("div",{class:"info-item"},null,-1)),wt={class:"info-item"},Ct=c(()=>e("div",{class:"info-item-title"},"是否退款:",-1)),Dt={class:"info-item-info"},St={class:"info-item"},Vt=c(()=>e("div",{class:"info-item-title"},"退款金额:",-1)),zt={class:"info-item-info"},Yt={key:0,class:"table-title"},xt={key:1,class:"table-info"},Pt={class:"info-item"},It=c(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),Mt={class:"info-item-info"},Rt={class:"info-item"},Lt=c(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Nt={class:"info-item-info"},Tt={class:"info-item"},Bt=c(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Ot={class:"info-item-info"},Ut={style:{"font-size":"0.9rem"}},At={style:{color:"#ff4a00"}},Et={style:{display:"flex","align-items":"center"}},Ft={style:{"margin-left":"0.5rem"}},qt=c(()=>e("div",{style:{height:"8rem"}},null,-1)),Kt={key:0,class:"footer"},jt={key:1,class:"footer"},Qt={key:1},Gt={__name:"detail",emits:["rePaySuccess"],setup(f,{emit:D}){X(),ae();const t=d({id:""});d([]);const k=d(null),b=d(!1);d(0),d(0),d(["商品信息","订单详情"]),d(""),d(!1);const L=()=>{k.value.setForm({isRePay:!0,data:t.value}),k.value.drawer=!0},N=()=>{t.value.order_id?ne({order_no:t.value.order_id}).then(v=>{console.log(v)}):H({message:"订单号不能为空",type:"error"})},_=d({page_no:1,page_size:15,loadend:!1,loading:!1}),$=d([]),T=()=>console.log("触底"),S=()=>{b.value=!0,de({id:t.value.id}).then(v=>{t.value=v.data,setTimeout(()=>{b.value=!1},200)})},w=D,m=(v=null)=>{setTimeout(()=>{w("rePaySuccess")})},h=()=>{_e({id:t.value.id}).then(v=>{H({message:v.msg,type:"success"}),setTimeout(()=>{w("rePaySuccess")})})};return Z(()=>{V.on("set-sale-order-detail",v=>{console.log("===",v),t.value=v,_.value.page_no=1,_.value.loadend=!1,_.value.loading=!1,$.value=[],S()})}),ee(()=>{V.off("set-sale-order-detail")}),(v,y)=>{var Y;const a=r("el-image"),C=r("el-table-column"),B=r("el-table"),z=r("el-button"),O=r("el-alert"),U=r("el-empty"),A=R("infinite-scroll"),E=R("loading");return s(),o("div",Ae,[t.value.id?q((s(),o("div",Ee,[q((s(),o("div",Fe,[qe,e("div",Ke,[e("div",je,[Qe,e("div",Ge,l(t.value.order_id),1)]),e("div",He,[Je,e("div",We,l(t.value.total_num||0),1)]),e("div",Xe,[Ze,e("div",et,"¥"+l(t.value.total_price),1)]),e("div",tt,[st,e("div",ot,l(t.value.pay_time),1)]),e("div",it,[at,e("div",lt,"¥"+l(t.value.deduction_price),1)]),e("div",nt,[dt,e("div",_t,"¥"+l(t.value.pay_price),1)]),e("div",ct,[rt,e("div",ut,l(t.value.pay_time),1)]),e("div",vt,[pt,e("div",ft,[t.value.pay_type_name?(s(),o("span",mt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ht,"微信收款")):t.value.pay_type==17?(s(),o("span",yt,"现金支付")):t.value.pay_type==13?(s(),o("span",gt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",kt,"余额支付")):t.value.pay_type==1?(s(),o("span",bt,"微信支付")):p("",!0)])]),$t,e("div",wt,[Ct,e("div",Dt,[e("span",null,l(t.value.refund_status_name),1)])]),e("div",St,[Vt,e("div",zt,[e("span",null,"¥"+l(t.value.refund_price),1)])])]),t.value.uid?(s(),o("div",Yt,"用户信息")):p("",!0),t.value.uid?(s(),o("div",xt,[e("div",Pt,[It,e("div",Mt,l(t.value.uid),1)]),e("div",Rt,[Lt,e("div",Nt,l(t.value.nickname),1)]),e("div",Tt,[Bt,e("div",Ot,l(t.value.mobile),1)])])):p("",!0),e("div",Ut,[g(" 共计 "),e("span",At,l(((Y=t.value.product)==null?void 0:Y.length)||" "),1),g(" 款商品 ")]),n(B,{data:t.value.product},{default:u(()=>[n(C,{label:"商品信息"},{default:u(({row:x})=>{var P,I;return[e("div",Et,[n(a,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(P=x.cart_info)==null?void 0:P.image},null,8,["src"]),e("span",Ft,l((I=x.cart_info)==null?void 0:I.name),1)])]}),_:1}),n(C,{prop:"cart_info.store_info",label:"商品规格",width:"150"}),n(C,{prop:"cart_info.price",label:"单价",width:"150"}),n(C,{prop:"cart_info.cart_num",label:"数量",width:"150"}),n(C,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),qt])),[[A,T]]),t.value.paid?p("",!0):(s(),o("div",Kt,[n(z,{type:"primary",size:"large",onClick:L},{default:u(()=>[g("重新支付")]),_:1}),t.value.pay_type==9?(s(),M(z,{key:0,type:"primary",size:"large",onClick:N},{default:u(()=>[g("查询支付")]),_:1})):p("",!0)])),t.value.paid==1&&t.value.status==1?(s(),o("div",jt,[e("div",null,[n(O,{title:"当前订单将在16点时进行收单打包,如果不需配送,可点击右侧按钮",type:"error",closable:!1})]),n(z,{type:"primary",size:"large",onClick:h},{default:u(()=>[g("不配送")]),_:1})])):p("",!0)])),[[E,b.value]]):(s(),o("div",Qt,[n(U)])),n(ce,{ref_key:"payRef",ref:k,onPaySuccess:m},null,512)])}}},Ht=W(Gt,[["__scopeId","data-v-81084524"]]),Jt={class:"my-card"},is={__name:"index",setup(f){const D=d(null),t=()=>{var k;(k=D.value)==null||k.getOrderList(!0)};return(k,b)=>(s(),o("div",Jt,[n(Ue,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:D},null,512),n(re),n(Ht,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{is as default}; +import{_ as W,u as X,r as d,o as Z,m as V,a as ee,b as r,h as R,c as s,k as o,e,f as n,w as u,g,d as M,p,i as ie,j as q,F as j,l as Q,z as G,t as l,q as te,s as se,I as ae,E as H}from"./index-B2rt9Xnd.js";import{d as le,e as ne,f as de,g as _e}from"./store-BJuQ4A3H.js";import{h as J}from"./moment-Cl4UOzQZ.js";import{p as ce}from"./pay-CjxUscAC.js";import{p as re}from"./padding-DSO_pR_4.js";import"./authCode-BUZTOdZ4.js";/* empty css */const ue=f=>(te("data-v-bf6504fc"),f=f(),se(),f),ve={class:"my-order"},pe={class:"header-nav"},fe=ue(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),me={class:"nav-item-btn"},he={class:"header-input"},ye={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ge=["onClick"],ke={class:"top"},be={class:"create-time"},$e={class:"shop"},we={key:0,class:"left"},Ce={key:0,class:"shop-name"},De={class:"right"},Se={class:"money"},Ve={class:"count"},ze={class:"bottom"},Ye={class:"pay"},xe={key:0},Pe={key:1},Ie={key:2},Me={key:3},Re={key:4},Le={key:5},Ne={key:1,style:{color:"#ff4a00"}},Te={key:0,class:"load-end"},Be={key:1,class:"load-end"},Oe={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f,{expose:D}){X(),d([]);const t=d(1),k=y=>{_.value.page_no=1,w.value=!1,$.value=!1,m.value=[],h(!0)};d(null);const b=d(""),L=()=>{_.value.start_time=J(b.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=J(b.value[1]).format("YYYY-MM-DD 23:59:59"),h(!0)},N=y=>y.getTime()>Date.now(),_=d({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),$=d(!1),T=d(0),S=d(0),w=d(!1),m=d([]),h=(y=!1)=>{if(y)_.value.page_no=1;else if(w.value||$.value)return;$.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),le(_.value).then(a=>{y?m.value=a.data.lists:m.value=[...m.value,...a.data.lists],_.value.page_no==1&&m.value.length>0&&V.emit("set-sale-order-detail",m.value[0]),a.data.lists.length<_.value.page_size?w.value=!0:_.value.page_no++,S.value=0,console.log(_.value.page_no),T.value=a.data.count,$.value=!1}).catch(a=>{w.value=!0,$.value=!1})},v=(y,a)=>{S.value=a,V.emit("set-sale-order-detail",y)};return D({getOrderList:h}),Z(()=>{V.on("update-sale-order-detail",y=>{console.log("==="),m.value[S.value].paid=1})}),ee(()=>{V.off("update-sale-order-detail")}),(y,a)=>{const C=r("el-radio-button"),B=r("el-radio-group"),z=r("el-date-picker"),O=r("CircleClose"),U=r("el-icon"),A=r("el-button"),E=r("el-input"),Y=r("el-image"),x=r("spna"),P=R("loading"),I=R("infinite-scroll");return s(),o("div",ve,[e("div",pe,[fe,e("div",me,[n(B,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=i=>t.value=i),onChange:k,size:"small"},{default:u(()=>[n(C,{value:1},{default:u(()=>[g("全部")]),_:1}),n(C,{value:2},{default:u(()=>[g("未支付")]),_:1})]),_:1},8,["modelValue"]),n(z,{modelValue:b.value,"onUpdate:modelValue":a[1]||(a[1]=i=>b.value=i),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":N,onChange:L,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",he,[n(E,{modelValue:_.value.order_id,"onUpdate:modelValue":a[4]||(a[4]=i=>_.value.order_id=i),placeholder:"请输入订单编号",onKeydown:a[5]||(a[5]=ie(i=>h(!0),["enter"])),onClear:a[6]||(a[6]=i=>h(!0))},{suffix:u(()=>[_.value.order_id!=""?(s(),M(U,{key:0,size:"18",onClick:a[2]||(a[2]=i=>{_.value.order_id="",h(!0)}),style:{cursor:"pointer","margin-right":"0.5rem"}},{default:u(()=>[n(O)]),_:1})):p("",!0)]),append:u(()=>[n(A,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[3]||(a[3]=i=>h(!0))},{default:u(()=>[g("搜索")]),_:1})]),_:1},8,["modelValue"])]),q((s(),o("div",ye,[(s(!0),o(j,null,Q(m.value,(i,F)=>(s(),o("div",{class:G(["item",{"item-active":S.value==F}]),key:F,onClick:K=>v(i,F)},[e("div",ke,[e("div",{class:G(["sn","cahier"])},"单号: "+l(i.order_id),1),e("div",be,l(i.pay_time),1)]),e("div",$e,[i.product_info?(s(),o("div",we,[(s(!0),o(j,null,Q(i.product_info.slice(0,5),(K,oe)=>(s(),M(Y,{key:oe,src:K.image,class:"shop-img"},null,8,["src"]))),128)),i.product_info.length==1?(s(),o("div",Ce,l(i.product_info[0].store_name),1)):p("",!0)])):p("",!0),e("div",De,[e("div",Se,"¥"+l(i.pay_price),1),e("div",Ve,"共"+l(i.total_num)+"款商品",1)])]),e("div",ze,[e("div",Ye,[i.paid?(s(),o("div",xe,[g(l(i.paid_name)+" ",1),i.pay_type_name?(s(),M(x,{key:0},{default:u(()=>[g("("+l(i.pay_type_name)+")",1)]),_:2},1024)):i.pay_type==9?(s(),o("span",Pe,"(微信收款)")):i.pay_type==17?(s(),o("span",Ie,"(现金支付)")):i.pay_type==13?(s(),o("span",Me,"(支付宝收款)")):i.pay_type==3?(s(),o("span",Re,"(余额支付)")):i.pay_type==1?(s(),o("span",Le,"(微信支付)")):p("",!0)])):(s(),o("div",Ne,l(i.paid_name),1))])])],10,ge))),128)),w.value?(s(),o("div",Te,"没有更多了")):p("",!0),$.value?(s(),o("div",Be,"加载中...")):p("",!0)])),[[P,$.value],[I,h]])])}}},Ue=W(Oe,[["__scopeId","data-v-bf6504fc"]]),c=f=>(te("data-v-81084524"),f=f(),se(),f),Ae={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},qe=c(()=>e("div",{class:"table-title"},"订单信息",-1)),Ke={class:"table-info"},je={class:"info-item"},Qe=c(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ge={class:"info-item-info"},He={class:"info-item"},Je=c(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),We={class:"info-item-info"},Xe={class:"info-item"},Ze=c(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=c(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),ot={class:"info-item-info"},it={class:"info-item"},at=c(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=c(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},rt=c(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ut={class:"info-item-info"},vt={class:"info-item"},pt=c(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ft={class:"info-item-info"},mt={key:0},ht={key:1},yt={key:2},gt={key:3},kt={key:4},bt={key:5},$t=c(()=>e("div",{class:"info-item"},null,-1)),wt={class:"info-item"},Ct=c(()=>e("div",{class:"info-item-title"},"是否退款:",-1)),Dt={class:"info-item-info"},St={class:"info-item"},Vt=c(()=>e("div",{class:"info-item-title"},"退款金额:",-1)),zt={class:"info-item-info"},Yt={key:0,class:"table-title"},xt={key:1,class:"table-info"},Pt={class:"info-item"},It=c(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),Mt={class:"info-item-info"},Rt={class:"info-item"},Lt=c(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Nt={class:"info-item-info"},Tt={class:"info-item"},Bt=c(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Ot={class:"info-item-info"},Ut={style:{"font-size":"0.9rem"}},At={style:{color:"#ff4a00"}},Et={style:{display:"flex","align-items":"center"}},Ft={style:{"margin-left":"0.5rem"}},qt=c(()=>e("div",{style:{height:"8rem"}},null,-1)),Kt={key:0,class:"footer"},jt={key:1,class:"footer"},Qt={key:1},Gt={__name:"detail",emits:["rePaySuccess"],setup(f,{emit:D}){X(),ae();const t=d({id:""});d([]);const k=d(null),b=d(!1);d(0),d(0),d(["商品信息","订单详情"]),d(""),d(!1);const L=()=>{k.value.setForm({isRePay:!0,data:t.value}),k.value.drawer=!0},N=()=>{t.value.order_id?ne({order_no:t.value.order_id}).then(v=>{console.log(v)}):H({message:"订单号不能为空",type:"error"})},_=d({page_no:1,page_size:15,loadend:!1,loading:!1}),$=d([]),T=()=>console.log("触底"),S=()=>{b.value=!0,de({id:t.value.id}).then(v=>{t.value=v.data,setTimeout(()=>{b.value=!1},200)})},w=D,m=(v=null)=>{setTimeout(()=>{w("rePaySuccess")})},h=()=>{_e({id:t.value.id}).then(v=>{H({message:v.msg,type:"success"}),setTimeout(()=>{w("rePaySuccess")})})};return Z(()=>{V.on("set-sale-order-detail",v=>{console.log("===",v),t.value=v,_.value.page_no=1,_.value.loadend=!1,_.value.loading=!1,$.value=[],S()})}),ee(()=>{V.off("set-sale-order-detail")}),(v,y)=>{var Y;const a=r("el-image"),C=r("el-table-column"),B=r("el-table"),z=r("el-button"),O=r("el-alert"),U=r("el-empty"),A=R("infinite-scroll"),E=R("loading");return s(),o("div",Ae,[t.value.id?q((s(),o("div",Ee,[q((s(),o("div",Fe,[qe,e("div",Ke,[e("div",je,[Qe,e("div",Ge,l(t.value.order_id),1)]),e("div",He,[Je,e("div",We,l(t.value.total_num||0),1)]),e("div",Xe,[Ze,e("div",et,"¥"+l(t.value.total_price),1)]),e("div",tt,[st,e("div",ot,l(t.value.pay_time),1)]),e("div",it,[at,e("div",lt,"¥"+l(t.value.deduction_price),1)]),e("div",nt,[dt,e("div",_t,"¥"+l(t.value.pay_price),1)]),e("div",ct,[rt,e("div",ut,l(t.value.pay_time),1)]),e("div",vt,[pt,e("div",ft,[t.value.pay_type_name?(s(),o("span",mt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ht,"微信收款")):t.value.pay_type==17?(s(),o("span",yt,"现金支付")):t.value.pay_type==13?(s(),o("span",gt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",kt,"余额支付")):t.value.pay_type==1?(s(),o("span",bt,"微信支付")):p("",!0)])]),$t,e("div",wt,[Ct,e("div",Dt,[e("span",null,l(t.value.refund_status_name),1)])]),e("div",St,[Vt,e("div",zt,[e("span",null,"¥"+l(t.value.refund_price),1)])])]),t.value.uid?(s(),o("div",Yt,"用户信息")):p("",!0),t.value.uid?(s(),o("div",xt,[e("div",Pt,[It,e("div",Mt,l(t.value.uid),1)]),e("div",Rt,[Lt,e("div",Nt,l(t.value.nickname),1)]),e("div",Tt,[Bt,e("div",Ot,l(t.value.mobile),1)])])):p("",!0),e("div",Ut,[g(" 共计 "),e("span",At,l(((Y=t.value.product)==null?void 0:Y.length)||" "),1),g(" 款商品 ")]),n(B,{data:t.value.product},{default:u(()=>[n(C,{label:"商品信息"},{default:u(({row:x})=>{var P,I;return[e("div",Et,[n(a,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(P=x.cart_info)==null?void 0:P.image},null,8,["src"]),e("span",Ft,l((I=x.cart_info)==null?void 0:I.name),1)])]}),_:1}),n(C,{prop:"cart_info.store_info",label:"商品规格",width:"150"}),n(C,{prop:"cart_info.price",label:"单价",width:"150"}),n(C,{prop:"cart_info.cart_num",label:"数量",width:"150"}),n(C,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),qt])),[[A,T]]),t.value.paid?p("",!0):(s(),o("div",Kt,[n(z,{type:"primary",size:"large",onClick:L},{default:u(()=>[g("重新支付")]),_:1}),t.value.pay_type==9?(s(),M(z,{key:0,type:"primary",size:"large",onClick:N},{default:u(()=>[g("查询支付")]),_:1})):p("",!0)])),t.value.paid==1&&t.value.status==1?(s(),o("div",jt,[e("div",null,[n(O,{title:"当前订单将在16点时进行收单打包,如果不需配送,可点击右侧按钮",type:"error",closable:!1})]),n(z,{type:"primary",size:"large",onClick:h},{default:u(()=>[g("不配送")]),_:1})])):p("",!0)])),[[E,b.value]]):(s(),o("div",Qt,[n(U)])),n(ce,{ref_key:"payRef",ref:k,onPaySuccess:m},null,512)])}}},Ht=W(Gt,[["__scopeId","data-v-81084524"]]),Jt={class:"my-card"},is={__name:"index",setup(f){const D=d(null),t=()=>{var k;(k=D.value)==null||k.getOrderList(!0)};return(k,b)=>(s(),o("div",Jt,[n(Ue,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:D},null,512),n(re),n(Ht,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{is as default}; diff --git a/dist/assets/index-Ep0mL_To.js b/dist/assets/index-CdIMOsQu.js similarity index 98% rename from dist/assets/index-Ep0mL_To.js rename to dist/assets/index-CdIMOsQu.js index f86d1d6..9abdb7c 100644 --- a/dist/assets/index-Ep0mL_To.js +++ b/dist/assets/index-CdIMOsQu.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-C3HwVIuf.js";import{u as ae,f as ie}from"./store-B0fbVdy5.js";import{h as E}from"./moment-Cl4UOzQZ.js";import{p as le}from"./pay-p0l28gLY.js";import{p as ne}from"./padding-C3oG-cSE.js";import"./authCode-Bkx2NvqR.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-B2rt9Xnd.js";import{u as ae,f as ie}from"./store-BJuQ4A3H.js";import{h as E}from"./moment-Cl4UOzQZ.js";import{p as le}from"./pay-CjxUscAC.js";import{p as ne}from"./padding-DSO_pR_4.js";import"./authCode-BUZTOdZ4.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-Dk5tVp6E.js b/dist/assets/index-CfeE6Lk8.js similarity index 96% rename from dist/assets/index-Dk5tVp6E.js rename to dist/assets/index-CfeE6Lk8.js index e543d2e..df6b3c2 100644 --- a/dist/assets/index-Dk5tVp6E.js +++ b/dist/assets/index-CfeE6Lk8.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-C3HwVIuf.js";import{l as K}from"./user-lT_1UriU.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-B2rt9Xnd.js";import{l as K}from"./user-BChXbsnq.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-DkHSvJyS.js b/dist/assets/index-ChKKpaUM.js similarity index 84% rename from dist/assets/index-DkHSvJyS.js rename to dist/assets/index-ChKKpaUM.js index 725daad..e9c9c91 100644 --- a/dist/assets/index-DkHSvJyS.js +++ b/dist/assets/index-ChKKpaUM.js @@ -1 +1 @@ -import{b as t,c,k as a,e,f as o,w as d,g as l}from"./index-C3HwVIuf.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-B2rt9Xnd.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-DU9U0S0M.js b/dist/assets/index-Cwqi17Y_.js similarity index 96% rename from dist/assets/index-DU9U0S0M.js rename to dist/assets/index-Cwqi17Y_.js index f3a103c..9777211 100644 --- a/dist/assets/index-DU9U0S0M.js +++ b/dist/assets/index-Cwqi17Y_.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-C3HwVIuf.js";import{c as U}from"./shop-BkcZJAaI.js";import"./axiosAPI-DDmlkTNA.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-B2rt9Xnd.js";import{c as U}from"./shop-Bb7RKZzc.js";import"./axiosAPI-Ba6KY3fO.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-tHzK7TfH.js b/dist/assets/index-DTn5H3kO.js similarity index 98% rename from dist/assets/index-tHzK7TfH.js rename to dist/assets/index-DTn5H3kO.js index 5f36c02..2f36ad0 100644 --- a/dist/assets/index-tHzK7TfH.js +++ b/dist/assets/index-DTn5H3kO.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-C3HwVIuf.js";import{h as T}from"./moment-Cl4UOzQZ.js";import{p as H}from"./padding-C3oG-cSE.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-B2rt9Xnd.js";import{h as T}from"./moment-Cl4UOzQZ.js";import{p as H}from"./padding-DSO_pR_4.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-CLb5_BTw.js b/dist/assets/index-DVkq4v4f.js similarity index 94% rename from dist/assets/index-CLb5_BTw.js rename to dist/assets/index-DVkq4v4f.js index a214b58..2f30eb9 100644 --- a/dist/assets/index-CLb5_BTw.js +++ b/dist/assets/index-DVkq4v4f.js @@ -1 +1 @@ -import{a as B,b as L}from"./shop-BkcZJAaI.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-C3HwVIuf.js";import"./axiosAPI-DDmlkTNA.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-Bb7RKZzc.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-B2rt9Xnd.js";import"./axiosAPI-Ba6KY3fO.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-CCCsrSm6.js b/dist/assets/index-Dc-r2OZr.js similarity index 98% rename from dist/assets/index-CCCsrSm6.js rename to dist/assets/index-Dc-r2OZr.js index 45f84c2..147f056 100644 --- a/dist/assets/index-CCCsrSm6.js +++ b/dist/assets/index-Dc-r2OZr.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 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-C3HwVIuf.js";import{f as se,l as oe,w as ie,k as ae}from"./store-B0fbVdy5.js";/* empty css */import{p as le}from"./padding-C3oG-cSE.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-8ae10798"),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.total_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-8ae10798"]]),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}; +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-B2rt9Xnd.js";import{f as se,l as oe,w as ie,k as ae}from"./store-BJuQ4A3H.js";/* empty css */import{p as le}from"./padding-DSO_pR_4.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-8ae10798"),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.total_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-8ae10798"]]),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-E14u6KMl.js b/dist/assets/index-Dpgi2_W8.js similarity index 99% rename from dist/assets/index-E14u6KMl.js rename to dist/assets/index-Dpgi2_W8.js index b84f74a..7b52fa7 100644 --- a/dist/assets/index-E14u6KMl.js +++ b/dist/assets/index-Dpgi2_W8.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-C3HwVIuf.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-lT_1UriU.js";import"./moment-Cl4UOzQZ.js";import{r as ye}from"./axiosAPI-DDmlkTNA.js";import{_ as je}from"./authCode-Bkx2NvqR.js";import{i as sl,m as ol,n as il}from"./store-B0fbVdy5.js";import{p as nl}from"./padding-C3oG-cSE.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-B2rt9Xnd.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-BChXbsnq.js";import"./moment-Cl4UOzQZ.js";import{r as ye}from"./axiosAPI-Ba6KY3fO.js";import{_ as je}from"./authCode-BUZTOdZ4.js";import{i as sl,m as ol,n as il}from"./store-BJuQ4A3H.js";import{p as nl}from"./padding-DSO_pR_4.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-BJtmEdhZ.js b/dist/assets/index-DqYh8SjT.js similarity index 78% rename from dist/assets/index-BJtmEdhZ.js rename to dist/assets/index-DqYh8SjT.js index 3f70ff3..1d446a4 100644 --- a/dist/assets/index-BJtmEdhZ.js +++ b/dist/assets/index-DqYh8SjT.js @@ -1,13 +1,13 @@ -var Np=Object.defineProperty;var Gp=(B,A,o)=>A in B?Np(B,A,{enumerable:!0,configurable:!0,writable:!0,value:o}):B[A]=o;var fu=(B,A,o)=>(Gp(B,typeof A!="symbol"?A+"":A,o),o);import{c as Kp,a as Hp,b as Xo,s as zp,o as kp}from"./store-B0fbVdy5.js";import{_ as ht,r as b,o as Dt,m as re,a as Nt,b as tn,c as $,d as ae,w as _n,e as v,f as G,g as sn,t as D,n as hu,E as Fe,u as Dr,h as Ut,i as Jo,j as _u,k as Q,F as Ft,l as Mt,p as te,q as du,s as pu,v as Wt,x as qp,y as Br,z as Ur,A as Vp,B as ct,C as Wr,D as Zp,G as Yp,H as Xp}from"./index-C3HwVIuf.js";import{u as Jp}from"./user-lT_1UriU.js";import"./moment-Cl4UOzQZ.js";import{p as Yo}from"./padding-C3oG-cSE.js";import"./axiosAPI-DDmlkTNA.js";import{m as au,s as Qp}from"./shop-BkcZJAaI.js";import{p as jp}from"./pay-p0l28gLY.js";import"./authCode-Bkx2NvqR.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:A,emit:o}){const E=b(!1),V=b(null),j=b(0),x=(H=!0,y=0)=>{X.value.nowPrice="",X.value.percentage="",E.value=H,j.value=y,hu(()=>{setTimeout(()=>{var nn;(nn=V.value)==null||nn.focus()},150)})},X=b({nowPrice:"",percentage:""}),pn=H=>{X.value.percentage=(H/j.value*100).toFixed(2)},fn=H=>{X.value.nowPrice=(j.value*H/100).toFixed(2)},rn=o,W=()=>{if(X.value.percentage>100)return X.value.nowPrice="",X.value.percentage="",Fe.error("改价金额不能大于当前订单金额");if(X.value.nowPrice<=0)return X.value.nowPrice="",X.value.percentage="",Fe.error("金额不能小于0");rn("changeAllPrice",X.value.nowPrice)};A({show:x,dialogVisible:E});const Cn=()=>{E.value&&W()};return Dt(()=>{re.on("enter",Cn)}),Nt(()=>{re.off("enter",Cn)}),(H,y)=>{const nn=tn("el-input"),F=tn("el-button"),k=tn("el-dialog");return $(),ae(k,{modelValue:E.value,"onUpdate:modelValue":y[2]||(y[2]=an=>E.value=an),title:"订单改价",width:"650"},{footer:_n(()=>[v("div",ig,[G(F,{class:"ok-btn",type:"primary",onClick:W},{default:_n(()=>[sn(" 确定 (Enter) ")]),_:1})])]),default:_n(()=>[v("div",ng,[v("div",eg,[G(nn,{ref_key:"priceRef",ref:V,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.nowPrice,"onUpdate:modelValue":y[0]||(y[0]=an=>X.value.nowPrice=an),type:"number",placeholder:"请输入改价后的价格",onInput:pn},{suffix:_n(()=>[sn("元")]),_:1},8,["modelValue"]),G(nn,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.percentage,"onUpdate:modelValue":y[1]||(y[1]=an=>X.value.percentage=an),type:"number",placeholder:"请输入比例",onInput:fn},{suffix:_n(()=>[sn("%")]),_:1},8,["modelValue"])]),v("div",tg,[sn(" 改价后金额: "),v("span",rg,"¥"+D(X.value.nowPrice||j.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},sg=ht(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"},yg={class:"red"},wg={key:0,class:"load-end"},xg={key:1,class:"load-end"},Ag={__name:"userList",emits:["setUser"],setup(B,{expose:A,emit:o}){Dr();const E=b(!1),V=b({page_no:1,page_size:20,mobile:""}),j=o,x=b(!1),X=b(0),pn=b(!1),fn=b([]),rn=(H=!1)=>{if(H)V.value.page_no=1;else if(pn.value||x.value)return;x.value=!0,Jp(V.value).then(y=>{H?fn.value=y.data.lists:fn.value=[...fn.value,...y.data.lists],y.data.lists.length{pn.value=!0,x.value=!1})},W=(H,y)=>{j("setUser",H),E.value=!1};return A({open:(H=null)=>{H||(V.value.mobile=""),E.value=!0,rn(!0)}}),(H,y)=>{const nn=tn("el-button"),F=tn("el-input"),k=tn("el-avatar"),an=tn("el-tag"),cn=tn("el-dialog"),on=Ut("loading"),hn=Ut("infinite-scroll");return $(),ae(cn,{modelValue:E.value,"onUpdate:modelValue":y[4]||(y[4]=Z=>E.value=Z),title:"选择用户",width:"800"},{default:_n(()=>[v("div",og,[v("div",lg,[G(F,{modelValue:V.value.mobile,"onUpdate:modelValue":y[1]||(y[1]=Z=>V.value.mobile=Z),placeholder:"搜索手机号/ID",onKeydown:y[2]||(y[2]=Jo(Z=>rn(!0),["enter"])),onClear:y[3]||(y[3]=Z=>rn(!0)),clearable:""},{append:_n(()=>[G(nn,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:y[0]||(y[0]=Z=>rn(!0))},{default:_n(()=>[sn("搜索")]),_:1})]),_:1},8,["modelValue"])]),_u(($(),Q("div",fg,[($(!0),Q(Ft,null,Mt(fn.value,(Z,O)=>($(),Q("div",{class:"item",key:O,onClick:vn=>W(Z,O)},[G(k,{class:"avatar",src:Z.avatar},null,8,["src"]),v("div",cg,[v("div",hg,[v("div",null,[v("span",_g,D(Z.nickname),1),v("span",null,D(" (ID:"+Z.id+")"),1)]),v("div",dg,[v("div",pg,"手机号: "+D(Z.mobile||Z.account),1),Z.user_ship==0?($(),ae(an,{key:0,type:"primary"},{default:_n(()=>[sn(D(Z.user_ship_name),1)]),_:2},1024)):($(),ae(an,{key:1,type:"success"},{default:_n(()=>[sn(D(Z.user_ship_name),1)]),_:2},1024))])]),v("div",gg,[v("div",null,[sn("采购款: "),v("span",vg,D(Z.purchase_funds),1)]),v("div",null,[sn("礼品券: "),v("span",mg,D(Z.integral),1)]),v("div",null,[sn("余额: "),v("span",yg,D(Z.now_money),1)])])])],8,ag))),128)),pn.value?($(),Q("div",wg,"没有更多了")):te("",!0),x.value?($(),Q("div",xg,"加载中...")):te("",!0)])),[[on,x.value],[hn,rn]])])]),_:1},8,["modelValue"])}}},Ig=ht(Ag,[["__scopeId","data-v-7ac34513"]]),Cg=B=>(du("data-v-baa96417"),B=B(),pu(),B),Lg={class:"my-order"},Sg={class:"user-nav"},Rg={class:"user-info"},bg={key:0,class:"info"},Eg={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"}},Ug={style:{color:"#f70"}},Fg={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:A,emit:o}){const E=b([]),V=b(0),j=b(0),x=b(0);Dr();const X=b(null),pn=()=>{let U=[];E.value.map(R=>{U.push(R.id)}),U.length!=0&&rn(U)},fn=U=>{E.value=E.value.filter(R=>R.id!=U),rn([U])},rn=U=>{Kp({id:U}).then(R=>{y()})},W=b({uid:""}),Cn=U=>{W.value=U,W.value.uid=U.id,y(),nn("getStoreList",{uid:U.id},!0)},H=b({}),y=()=>{V.value=0,j.value=0,x.value=0,Hp({uid:W.value.uid}).then(U=>{H.value=U.data.extend,E.value=U.data.lists||[]})};y();const nn=o,F=()=>{nn("goPay")},k=(U,R)=>{Xo({product_id:U.product_id,cart_num:U.cart_num}).then(Tn=>{y()}).catch(Tn=>{var Bn;let On=(Bn=Tn==null?void 0:Tn.msg)==null?void 0:Bn.match(/\b\d+(\.\d+)?\b/);On?U.cart_num=+On[0]:U.cart_num=1})},an=U=>{x.value=j.value-U,V.value=+U,hu(()=>{setTimeout(()=>{on(!1)},150)})};b(0);const cn=b(null),on=(U=!0)=>{cn.value.show(U,j.value)},hn=b(!1);A({getList:y,resetView:()=>{hn.value=!1,y()},list:E,discounts:x,allPrice:V,userInfo:W,is_storage:hn});const O=()=>{cn.value.dialogVisible?cn.value.dialogVisible=!1:on()},vn=()=>{E.value.length>0&&pn()};return Dt(()=>{re.on("insert",O),re.on("delete",vn)}),Nt(()=>{re.off("insert",O),re.off("delete",vn)}),(U,R)=>{const Tn=tn("el-avatar"),On=tn("ArrowRight"),Bn=tn("el-icon"),ce=tn("el-button"),Ve=tn("RefreshLeft"),Nr=tn("Delete"),ge=tn("el-empty"),he=tn("el-image"),Gt=tn("el-input-number"),Ze=tn("el-switch");return $(),Q("div",Lg,[v("div",Sg,[v("div",Rg,[G(Tn,{class:"avatar",src:W.value.avatar},null,8,["src"]),W.value.uid?($(),Q("div",bg,[v("div",Eg,[v("div",null,"手机号: "+D(W.value.mobile||W.value.account),1),G(ce,{type:"primary",link:"",class:"change-user",onClick:R[0]||(R[0]=J=>X.value.open(W.value.uid))},{default:_n(()=>[sn("切换用户"),G(Bn,null,{default:_n(()=>[G(On)]),_:1})]),_:1})]),v("div",Tg,[v("div",Og,[v("div",Pg,[sn("采购款: "),v("span",$g,D(W.value.purchase_funds),1)]),v("div",Bg,[sn("礼品券: "),v("span",Wg,D(W.value.integral),1)]),v("div",null,[sn("余额: "),v("span",Ug,D(W.value.now_money),1)])]),G(ce,{style:{"margin-top":"0.2rem"},link:"",onClick:R[1]||(R[1]=J=>Cn({id:""}))},{default:_n(()=>[sn(" 重置"),G(Bn,null,{default:_n(()=>[G(Ve)]),_:1})]),_:1})])])):($(),Q("div",Fg,[v("div",Mg,[Dg,G(ce,{type:"primary",link:"",class:"change-user",onClick:R[2]||(R[2]=J=>X.value.open())},{default:_n(()=>[sn("切换用户"),G(Bn,null,{default:_n(()=>[G(On)]),_:1})]),_:1})])]))]),G(Ig,{ref_key:"userListRef",ref:X,onSetUser:Cn},null,512)]),v("div",Ng,[v("div",Gg,[sn(" 已选购 "),v("span",null,D(E.value.length),1),sn(" 款 ")]),v("div",{class:"nav-item-clear",onClick:pn},[G(Bn,null,{default:_n(()=>[G(Nr)]),_:1}),sn("清空 (Delete) ")])]),v("div",Kg,[E.value.length==0?($(),ae(ge,{key:0,description:"请点击右侧添加商品"})):($(!0),Q(Ft,{key:1},Mt(E.value,(J,Gr)=>($(),Q("div",{class:"order-item",key:Gr},[G(he,{loading:"lazy",class:"order-item-img",src:J.image},null,8,["src"]),v("div",Hg,[v("div",zg,[v("div",kg,D(J.store_name),1),v("div",{class:"delete",onClick:Re=>fn(J.id)},"删除",8,qg)]),v("div",Vg,[v("span",null,D(J.unit_name),1)]),v("div",Zg,[v("div",null,[sn(" ¥"),v("span",null,D(J.price),1)]),v("div",null,[J.is_bulk==0?($(),ae(Gt,{key:0,modelValue:J.cart_num,"onUpdate:modelValue":Re=>J.cart_num=Re,min:+J.batch>0?+J.batch:1,step:1,"step-strictly":"",onChange:Re=>k(J)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])):($(),ae(Gt,{key:1,modelValue:J.cart_num,"onUpdate:modelValue":Re=>J.cart_num=Re,min:+J.batch>0?+J.batch:.1,step:.01,precision:2,"step-strictly":"",onChange:Re=>k(J)},null,8,["modelValue","onUpdate:modelValue","min","onChange"]))])])])]))),128))]),v("div",Yg,[v("div",Xg,[v("div",Jg,[v("div",Qg,[sn(" 合计: "),v("span",null,[sn("¥"),v("span",jg,D(H.value.pay_price||"0.00"),1)])]),H.value.msg?($(),Q("div",nv,[v("span",ev,D(H.value.msg),1)])):te("",!0)]),v("div",tv,[G(Ze,{modelValue:hn.value,"onUpdate:modelValue":R[3]||(R[3]=J=>hn.value=J),size:"large","inline-prompt":"","active-text":"存货","inactive-text":"不存"},null,8,["modelValue"])])]),v("div",rv,[G(ce,{class:"btn",type:"primary",onClick:F,disabled:E.value.length==0},{default:_n(()=>[sn(D("立即结账 (F9)"))]),_:1},8,["disabled"])])]),G(sg,{ref_key:"priceRef",ref:cn,onChangeAllPrice:an},null,512)])}}},uv=ht(iv,[["__scopeId","data-v-baa96417"]]);var Fr={exports:{}};/** +var Np=Object.defineProperty;var Gp=(B,A,o)=>A in B?Np(B,A,{enumerable:!0,configurable:!0,writable:!0,value:o}):B[A]=o;var fu=(B,A,o)=>(Gp(B,typeof A!="symbol"?A+"":A,o),o);import{c as Kp,a as Hp,b as Xo,s as zp,o as kp}from"./store-BJuQ4A3H.js";import{_ as ht,r as E,o as Dt,m as re,a as Nt,b as tn,c as $,d as ae,w as _n,e as v,f as G,g as sn,t as D,n as hu,E as Fe,u as Dr,h as Ut,i as Jo,j as _u,k as Q,F as Ft,l as Mt,p as te,q as du,s as pu,v as Wt,x as qp,y as Br,z as Ur,A as Vp,B as ct,C as Wr,D as Zp,G as Yp,H as Xp}from"./index-B2rt9Xnd.js";import{u as Jp}from"./user-BChXbsnq.js";import"./moment-Cl4UOzQZ.js";import{p as Yo}from"./padding-DSO_pR_4.js";import"./axiosAPI-Ba6KY3fO.js";import{m as au,s as Qp}from"./shop-Bb7RKZzc.js";import{p as jp}from"./pay-CjxUscAC.js";import"./authCode-BUZTOdZ4.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:A,emit:o}){const b=E(!1),V=E(null),j=E(0),x=(H=!0,y=0)=>{X.value.nowPrice="",X.value.percentage="",b.value=H,j.value=y,hu(()=>{setTimeout(()=>{var nn;(nn=V.value)==null||nn.focus()},150)})},X=E({nowPrice:"",percentage:""}),pn=H=>{X.value.percentage=(H/j.value*100).toFixed(2)},fn=H=>{X.value.nowPrice=(j.value*H/100).toFixed(2)},rn=o,W=()=>{if(X.value.percentage>100)return X.value.nowPrice="",X.value.percentage="",Fe.error("改价金额不能大于当前订单金额");if(X.value.nowPrice<=0)return X.value.nowPrice="",X.value.percentage="",Fe.error("金额不能小于0");rn("changeAllPrice",X.value.nowPrice)};A({show:x,dialogVisible:b});const Cn=()=>{b.value&&W()};return Dt(()=>{re.on("enter",Cn)}),Nt(()=>{re.off("enter",Cn)}),(H,y)=>{const nn=tn("el-input"),F=tn("el-button"),k=tn("el-dialog");return $(),ae(k,{modelValue:b.value,"onUpdate:modelValue":y[2]||(y[2]=an=>b.value=an),title:"订单改价",width:"650"},{footer:_n(()=>[v("div",ig,[G(F,{class:"ok-btn",type:"primary",onClick:W},{default:_n(()=>[sn(" 确定 (Enter) ")]),_:1})])]),default:_n(()=>[v("div",ng,[v("div",eg,[G(nn,{ref_key:"priceRef",ref:V,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.nowPrice,"onUpdate:modelValue":y[0]||(y[0]=an=>X.value.nowPrice=an),type:"number",placeholder:"请输入改价后的价格",onInput:pn},{suffix:_n(()=>[sn("元")]),_:1},8,["modelValue"]),G(nn,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:X.value.percentage,"onUpdate:modelValue":y[1]||(y[1]=an=>X.value.percentage=an),type:"number",placeholder:"请输入比例",onInput:fn},{suffix:_n(()=>[sn("%")]),_:1},8,["modelValue"])]),v("div",tg,[sn(" 改价后金额: "),v("span",rg,"¥"+D(X.value.nowPrice||j.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},sg=ht(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"},yg={class:"red"},wg={key:0,class:"load-end"},xg={key:1,class:"load-end"},Ag={__name:"userList",emits:["setUser"],setup(B,{expose:A,emit:o}){Dr();const b=E(!1),V=E({page_no:1,page_size:20,mobile:""}),j=o,x=E(!1),X=E(0),pn=E(!1),fn=E([]),rn=(H=!1)=>{if(H)V.value.page_no=1;else if(pn.value||x.value)return;x.value=!0,Jp(V.value).then(y=>{H?fn.value=y.data.lists:fn.value=[...fn.value,...y.data.lists],y.data.lists.length{pn.value=!0,x.value=!1})},W=(H,y)=>{j("setUser",H),b.value=!1};return A({open:(H=null)=>{H||(V.value.mobile=""),b.value=!0,rn(!0)}}),(H,y)=>{const nn=tn("el-button"),F=tn("el-input"),k=tn("el-avatar"),an=tn("el-tag"),cn=tn("el-dialog"),on=Ut("loading"),hn=Ut("infinite-scroll");return $(),ae(cn,{modelValue:b.value,"onUpdate:modelValue":y[4]||(y[4]=Z=>b.value=Z),title:"选择用户",width:"800"},{default:_n(()=>[v("div",og,[v("div",lg,[G(F,{modelValue:V.value.mobile,"onUpdate:modelValue":y[1]||(y[1]=Z=>V.value.mobile=Z),placeholder:"搜索手机号/ID",onKeydown:y[2]||(y[2]=Jo(Z=>rn(!0),["enter"])),onClear:y[3]||(y[3]=Z=>rn(!0)),clearable:""},{append:_n(()=>[G(nn,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:y[0]||(y[0]=Z=>rn(!0))},{default:_n(()=>[sn("搜索")]),_:1})]),_:1},8,["modelValue"])]),_u(($(),Q("div",fg,[($(!0),Q(Ft,null,Mt(fn.value,(Z,O)=>($(),Q("div",{class:"item",key:O,onClick:vn=>W(Z,O)},[G(k,{class:"avatar",src:Z.avatar},null,8,["src"]),v("div",cg,[v("div",hg,[v("div",null,[v("span",_g,D(Z.nickname),1),v("span",null,D(" (ID:"+Z.id+")"),1)]),v("div",dg,[v("div",pg,"手机号: "+D(Z.mobile||Z.account),1),Z.user_ship==0?($(),ae(an,{key:0,type:"primary"},{default:_n(()=>[sn(D(Z.user_ship_name),1)]),_:2},1024)):($(),ae(an,{key:1,type:"success"},{default:_n(()=>[sn(D(Z.user_ship_name),1)]),_:2},1024))])]),v("div",gg,[v("div",null,[sn("采购款: "),v("span",vg,D(Z.purchase_funds),1)]),v("div",null,[sn("礼品券: "),v("span",mg,D(Z.integral),1)]),v("div",null,[sn("余额: "),v("span",yg,D(Z.now_money),1)])])])],8,ag))),128)),pn.value?($(),Q("div",wg,"没有更多了")):te("",!0),x.value?($(),Q("div",xg,"加载中...")):te("",!0)])),[[on,x.value],[hn,rn]])])]),_:1},8,["modelValue"])}}},Ig=ht(Ag,[["__scopeId","data-v-7ac34513"]]),Cg=B=>(du("data-v-baa96417"),B=B(),pu(),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"}},Ug={style:{color:"#f70"}},Fg={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:A,emit:o}){const b=E([]),V=E(0),j=E(0),x=E(0);Dr();const X=E(null),pn=()=>{let U=[];b.value.map(R=>{U.push(R.id)}),U.length!=0&&rn(U)},fn=U=>{b.value=b.value.filter(R=>R.id!=U),rn([U])},rn=U=>{Kp({id:U}).then(R=>{y()})},W=E({uid:""}),Cn=U=>{W.value=U,W.value.uid=U.id,y(),nn("getStoreList",{uid:U.id},!0)},H=E({}),y=()=>{V.value=0,j.value=0,x.value=0,Hp({uid:W.value.uid}).then(U=>{H.value=U.data.extend,b.value=U.data.lists||[]})};y();const nn=o,F=()=>{nn("goPay")},k=(U,R)=>{Xo({product_id:U.product_id,cart_num:U.cart_num}).then(Tn=>{y()}).catch(Tn=>{var Bn;let On=(Bn=Tn==null?void 0:Tn.msg)==null?void 0:Bn.match(/\b\d+(\.\d+)?\b/);On?U.cart_num=+On[0]:U.cart_num=1})},an=U=>{x.value=j.value-U,V.value=+U,hu(()=>{setTimeout(()=>{on(!1)},150)})};E(0);const cn=E(null),on=(U=!0)=>{cn.value.show(U,j.value)},hn=E(!1);A({getList:y,resetView:()=>{hn.value=!1,y()},list:b,discounts:x,allPrice:V,userInfo:W,is_storage:hn});const O=()=>{cn.value.dialogVisible?cn.value.dialogVisible=!1:on()},vn=()=>{b.value.length>0&&pn()};return Dt(()=>{re.on("insert",O),re.on("delete",vn)}),Nt(()=>{re.off("insert",O),re.off("delete",vn)}),(U,R)=>{const Tn=tn("el-avatar"),On=tn("ArrowRight"),Bn=tn("el-icon"),ce=tn("el-button"),Ve=tn("RefreshLeft"),Nr=tn("Delete"),ge=tn("el-empty"),he=tn("el-image"),Gt=tn("el-input-number"),Ze=tn("el-switch");return $(),Q("div",Lg,[v("div",Sg,[v("div",Rg,[G(Tn,{class:"avatar",src:W.value.avatar},null,8,["src"]),W.value.uid?($(),Q("div",Eg,[v("div",bg,[v("div",null,"手机号: "+D(W.value.mobile||W.value.account),1),G(ce,{type:"primary",link:"",class:"change-user",onClick:R[0]||(R[0]=J=>X.value.open(W.value.uid))},{default:_n(()=>[sn("切换用户"),G(Bn,null,{default:_n(()=>[G(On)]),_:1})]),_:1})]),v("div",Tg,[v("div",Og,[v("div",Pg,[sn("采购款: "),v("span",$g,D(W.value.purchase_funds),1)]),v("div",Bg,[sn("礼品券: "),v("span",Wg,D(W.value.integral),1)]),v("div",null,[sn("余额: "),v("span",Ug,D(W.value.now_money),1)])]),G(ce,{style:{"margin-top":"0.2rem"},link:"",onClick:R[1]||(R[1]=J=>Cn({id:""}))},{default:_n(()=>[sn(" 重置"),G(Bn,null,{default:_n(()=>[G(Ve)]),_:1})]),_:1})])])):($(),Q("div",Fg,[v("div",Mg,[Dg,G(ce,{type:"primary",link:"",class:"change-user",onClick:R[2]||(R[2]=J=>X.value.open())},{default:_n(()=>[sn("切换用户"),G(Bn,null,{default:_n(()=>[G(On)]),_:1})]),_:1})])]))]),G(Ig,{ref_key:"userListRef",ref:X,onSetUser:Cn},null,512)]),v("div",Ng,[v("div",Gg,[sn(" 已选购 "),v("span",null,D(b.value.length),1),sn(" 款 ")]),v("div",{class:"nav-item-clear",onClick:pn},[G(Bn,null,{default:_n(()=>[G(Nr)]),_:1}),sn("清空 (Delete) ")])]),v("div",Kg,[b.value.length==0?($(),ae(ge,{key:0,description:"请点击右侧添加商品"})):($(!0),Q(Ft,{key:1},Mt(b.value,(J,Gr)=>($(),Q("div",{class:"order-item",key:Gr},[G(he,{loading:"lazy",class:"order-item-img",src:J.image},null,8,["src"]),v("div",Hg,[v("div",zg,[v("div",kg,D(J.store_name),1),v("div",{class:"delete",onClick:Re=>fn(J.id)},"删除",8,qg)]),v("div",Vg,[v("span",null,D(J.unit_name),1)]),v("div",Zg,[v("div",null,[sn(" ¥"),v("span",null,D(J.price),1)]),v("div",null,[J.is_bulk==0?($(),ae(Gt,{key:0,modelValue:J.cart_num,"onUpdate:modelValue":Re=>J.cart_num=Re,min:+J.batch>0?+J.batch:1,step:1,"step-strictly":"",onChange:Re=>k(J)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])):($(),ae(Gt,{key:1,modelValue:J.cart_num,"onUpdate:modelValue":Re=>J.cart_num=Re,min:+J.batch>0?+J.batch:.1,step:.01,precision:2,"step-strictly":"",onChange:Re=>k(J)},null,8,["modelValue","onUpdate:modelValue","min","onChange"]))])])])]))),128))]),v("div",Yg,[v("div",Xg,[v("div",Jg,[v("div",Qg,[sn(" 合计: "),v("span",null,[sn("¥"),v("span",jg,D(H.value.pay_price||"0.00"),1)])]),H.value.msg?($(),Q("div",nv,[v("span",ev,D(H.value.msg),1)])):te("",!0)]),v("div",tv,[G(Ze,{modelValue:hn.value,"onUpdate:modelValue":R[3]||(R[3]=J=>hn.value=J),size:"large","inline-prompt":"","active-text":"存货","inactive-text":"不存"},null,8,["modelValue"])])]),v("div",rv,[G(ce,{class:"btn",type:"primary",onClick:F,disabled:b.value.length==0},{default:_n(()=>[sn(D("立即结账 (F9)"))]),_:1},8,["disabled"])])]),G(sg,{ref_key:"priceRef",ref:cn,onChangeAllPrice:an},null,512)])}}},uv=ht(iv,[["__scopeId","data-v-baa96417"]]);var Fr={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Fr.exports;(function(B,A){(function(){var o,E="4.17.21",V=200,j="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",x="Expected a function",X="Invalid `variable` option passed into `_.template`",pn="__lodash_hash_undefined__",fn=500,rn="__lodash_placeholder__",W=1,Cn=2,H=4,y=1,nn=2,F=1,k=2,an=4,cn=8,on=16,hn=32,Z=64,O=128,vn=256,U=512,R=30,Tn="...",On=800,Bn=16,ce=1,Ve=2,Nr=3,ge=1/0,he=9007199254740991,Gt=17976931348623157e292,Ze=NaN,J=4294967295,Gr=J-1,Re=J>>>1,jo=[["ary",O],["bind",F],["bindKey",k],["curry",cn],["curryRight",on],["flip",U],["partial",hn],["partialRight",Z],["rearg",vn]],Ye="[object Arguments]",Kt="[object Array]",nl="[object AsyncFunction]",_t="[object Boolean]",dt="[object Date]",el="[object DOMException]",Ht="[object Error]",zt="[object Function]",vu="[object GeneratorFunction]",ie="[object Map]",pt="[object Number]",tl="[object Null]",ve="[object Object]",mu="[object Promise]",rl="[object Proxy]",gt="[object RegExp]",ue="[object Set]",vt="[object String]",kt="[object Symbol]",il="[object Undefined]",mt="[object WeakMap]",ul="[object WeakSet]",yt="[object ArrayBuffer]",Xe="[object DataView]",Kr="[object Float32Array]",Hr="[object Float64Array]",zr="[object Int8Array]",kr="[object Int16Array]",qr="[object Int32Array]",Vr="[object Uint8Array]",Zr="[object Uint8ClampedArray]",Yr="[object Uint16Array]",Xr="[object Uint32Array]",sl=/\b__p \+= '';/g,ol=/\b(__p \+=) '' \+/g,ll=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yu=/&(?:amp|lt|gt|quot|#39);/g,wu=/[&<>"']/g,fl=RegExp(yu.source),al=RegExp(wu.source),cl=/<%-([\s\S]+?)%>/g,hl=/<%([\s\S]+?)%>/g,xu=/<%=([\s\S]+?)%>/g,_l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dl=/^\w*$/,pl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jr=/[\\^$.*+?()[\]{}|]/g,gl=RegExp(Jr.source),Qr=/^\s+/,vl=/\s/,ml=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,yl=/\{\n\/\* \[wrapped with (.+)\] \*/,wl=/,? & /,xl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Al=/[()=,{}\[\]\/\s]/,Il=/\\(\\)?/g,Cl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Au=/\w*$/,Ll=/^[-+]0x[0-9a-f]+$/i,Sl=/^0b[01]+$/i,Rl=/^\[object .+?Constructor\]$/,bl=/^0o[0-7]+$/i,El=/^(?:0|[1-9]\d*)$/,Tl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qt=/($^)/,Ol=/['\n\r\u2028\u2029\\]/g,Vt="\\ud800-\\udfff",Pl="\\u0300-\\u036f",$l="\\ufe20-\\ufe2f",Bl="\\u20d0-\\u20ff",Iu=Pl+$l+Bl,Cu="\\u2700-\\u27bf",Lu="a-z\\xdf-\\xf6\\xf8-\\xff",Wl="\\xac\\xb1\\xd7\\xf7",Ul="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Fl="\\u2000-\\u206f",Ml=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Su="A-Z\\xc0-\\xd6\\xd8-\\xde",Ru="\\ufe0e\\ufe0f",bu=Wl+Ul+Fl+Ml,jr="['’]",Dl="["+Vt+"]",Eu="["+bu+"]",Zt="["+Iu+"]",Tu="\\d+",Nl="["+Cu+"]",Ou="["+Lu+"]",Pu="[^"+Vt+bu+Tu+Cu+Lu+Su+"]",ni="\\ud83c[\\udffb-\\udfff]",Gl="(?:"+Zt+"|"+ni+")",$u="[^"+Vt+"]",ei="(?:\\ud83c[\\udde6-\\uddff]){2}",ti="[\\ud800-\\udbff][\\udc00-\\udfff]",Je="["+Su+"]",Bu="\\u200d",Wu="(?:"+Ou+"|"+Pu+")",Kl="(?:"+Je+"|"+Pu+")",Uu="(?:"+jr+"(?:d|ll|m|re|s|t|ve))?",Fu="(?:"+jr+"(?:D|LL|M|RE|S|T|VE))?",Mu=Gl+"?",Du="["+Ru+"]?",Hl="(?:"+Bu+"(?:"+[$u,ei,ti].join("|")+")"+Du+Mu+")*",zl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Nu=Du+Mu+Hl,ql="(?:"+[Nl,ei,ti].join("|")+")"+Nu,Vl="(?:"+[$u+Zt+"?",Zt,ei,ti,Dl].join("|")+")",Zl=RegExp(jr,"g"),Yl=RegExp(Zt,"g"),ri=RegExp(ni+"(?="+ni+")|"+Vl+Nu,"g"),Xl=RegExp([Je+"?"+Ou+"+"+Uu+"(?="+[Eu,Je,"$"].join("|")+")",Kl+"+"+Fu+"(?="+[Eu,Je+Wu,"$"].join("|")+")",Je+"?"+Wu+"+"+Uu,Je+"+"+Fu,kl,zl,Tu,ql].join("|"),"g"),Jl=RegExp("["+Bu+Vt+Iu+Ru+"]"),Ql=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nf=-1,mn={};mn[Kr]=mn[Hr]=mn[zr]=mn[kr]=mn[qr]=mn[Vr]=mn[Zr]=mn[Yr]=mn[Xr]=!0,mn[Ye]=mn[Kt]=mn[yt]=mn[_t]=mn[Xe]=mn[dt]=mn[Ht]=mn[zt]=mn[ie]=mn[pt]=mn[ve]=mn[gt]=mn[ue]=mn[vt]=mn[mt]=!1;var gn={};gn[Ye]=gn[Kt]=gn[yt]=gn[Xe]=gn[_t]=gn[dt]=gn[Kr]=gn[Hr]=gn[zr]=gn[kr]=gn[qr]=gn[ie]=gn[pt]=gn[ve]=gn[gt]=gn[ue]=gn[vt]=gn[kt]=gn[Vr]=gn[Zr]=gn[Yr]=gn[Xr]=!0,gn[Ht]=gn[zt]=gn[mt]=!1;var ef={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},tf={"&":"&","<":"<",">":">",'"':""","'":"'"},rf={"&":"&","<":"<",">":">",""":'"',"'":"'"},uf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},sf=parseFloat,of=parseInt,Gu=typeof Wt=="object"&&Wt&&Wt.Object===Object&&Wt,lf=typeof self=="object"&&self&&self.Object===Object&&self,bn=Gu||lf||Function("return this")(),ii=A&&!A.nodeType&&A,Me=ii&&!0&&B&&!B.nodeType&&B,Ku=Me&&Me.exports===ii,ui=Ku&&Gu.process,Zn=function(){try{var a=Me&&Me.require&&Me.require("util").types;return a||ui&&ui.binding&&ui.binding("util")}catch{}}(),Hu=Zn&&Zn.isArrayBuffer,zu=Zn&&Zn.isDate,ku=Zn&&Zn.isMap,qu=Zn&&Zn.isRegExp,Vu=Zn&&Zn.isSet,Zu=Zn&&Zn.isTypedArray;function Kn(a,_,h){switch(h.length){case 0:return a.call(_);case 1:return a.call(_,h[0]);case 2:return a.call(_,h[0],h[1]);case 3:return a.call(_,h[0],h[1],h[2])}return a.apply(_,h)}function ff(a,_,h,w){for(var T=-1,en=a==null?0:a.length;++T-1}function si(a,_,h){for(var w=-1,T=a==null?0:a.length;++w-1;);return h}function ts(a,_){for(var h=a.length;h--&&Qe(_,a[h],0)>-1;);return h}function mf(a,_){for(var h=a.length,w=0;h--;)a[h]===_&&++w;return w}var yf=ai(ef),wf=ai(tf);function xf(a){return"\\"+uf[a]}function Af(a,_){return a==null?o:a[_]}function je(a){return Jl.test(a)}function If(a){return Ql.test(a)}function Cf(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function di(a){var _=-1,h=Array(a.size);return a.forEach(function(w,T){h[++_]=[T,w]}),h}function rs(a,_){return function(h){return a(_(h))}}function Te(a,_){for(var h=-1,w=a.length,T=0,en=[];++h-1}function ca(n,e){var t=this.__data__,r=hr(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}me.prototype.clear=oa,me.prototype.delete=la,me.prototype.get=fa,me.prototype.has=aa,me.prototype.set=ca;function ye(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Qn(n,e,t,r,i,s){var l,f=e&W,c=e&Cn,d=e&H;if(t&&(l=i?t(n,r,i,s):t(n)),l!==o)return l;if(!wn(n))return n;var p=P(n);if(p){if(l=pc(n),!f)return Mn(n,l)}else{var g=$n(n),m=g==zt||g==vu;if(Ue(n))return Ds(n,f);if(g==ve||g==Ye||m&&!i){if(l=c||m?{}:io(n),!f)return c?ic(n,Ra(l,n)):rc(n,ps(l,n))}else{if(!gn[g])return i?n:{};l=gc(n,g,f)}}s||(s=new oe);var I=s.get(n);if(I)return I;s.set(n,l),Bo(n)?n.forEach(function(S){l.add(Qn(S,e,t,S,n,s))}):Po(n)&&n.forEach(function(S,z){l.set(z,Qn(S,e,t,z,n,s))});var L=d?c?Ni:Di:c?Nn:Rn,N=p?o:L(n);return Yn(N||n,function(S,z){N&&(z=S,S=n[z]),St(l,z,Qn(S,e,t,z,n,s))}),l}function ba(n){var e=Rn(n);return function(t){return gs(t,n,e)}}function gs(n,e,t){var r=t.length;if(n==null)return!r;for(n=dn(n);r--;){var i=t[r],s=e[i],l=n[i];if(l===o&&!(i in n)||!s(l))return!1}return!0}function vs(n,e,t){if(typeof n!="function")throw new Xn(x);return $t(function(){n.apply(o,t)},e)}function Rt(n,e,t,r){var i=-1,s=Yt,l=!0,f=n.length,c=[],d=e.length;if(!f)return c;t&&(e=yn(e,Hn(t))),r?(s=si,l=!1):e.length>=V&&(s=wt,l=!1,e=new Ge(e));n:for(;++ii?0:i+t),r=r===o||r>i?i:M(r),r<0&&(r+=i),r=t>r?0:Uo(r);t0&&t(f)?e>1?En(f,e-1,t,r,i):Ee(i,f):r||(i[i.length]=f)}return i}var xi=ks(),ws=ks(!0);function _e(n,e){return n&&xi(n,e,Rn)}function Ai(n,e){return n&&ws(n,e,Rn)}function dr(n,e){return be(e,function(t){return Ce(n[t])})}function He(n,e){e=Be(e,n);for(var t=0,r=e.length;n!=null&&te}function Oa(n,e){return n!=null&&ln.call(n,e)}function Pa(n,e){return n!=null&&e in dn(n)}function $a(n,e,t){return n>=Pn(e,t)&&n=120&&p.length>=120)?new Ge(l&&p):o}p=n[0];var g=-1,m=f[0];n:for(;++g-1;)f!==n&&ur.call(f,c,1),ur.call(n,c,1);return n}function Os(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==s){var s=i;Ie(i)?ur.call(n,i,1):Pi(n,i)}}return n}function Ei(n,e){return n+lr(cs()*(e-n+1))}function qa(n,e,t,r){for(var i=-1,s=Sn(or((e-n)/(t||1)),0),l=h(s);s--;)l[r?s:++i]=n,n+=t;return l}function Ti(n,e){var t="";if(!n||e<1||e>he)return t;do e%2&&(t+=n),e=lr(e/2),e&&(n+=n);while(e);return t}function K(n,e){return Vi(oo(n,e,Gn),n+"")}function Va(n){return ds(at(n))}function Za(n,e){var t=at(n);return Lr(t,Ke(e,0,t.length))}function Tt(n,e,t,r){if(!wn(n))return n;e=Be(e,n);for(var i=-1,s=e.length,l=s-1,f=n;f!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=h(i);++r>>1,l=n[s];l!==null&&!kn(l)&&(t?l<=e:l=V){var d=e?null:lc(n);if(d)return Jt(d);l=!1,i=wt,c=new Ge}else c=e?[]:f;n:for(;++r=r?n:jn(n,e,t)}var Ms=Df||function(n){return bn.clearTimeout(n)};function Ds(n,e){if(e)return n.slice();var t=n.length,r=ss?ss(t):new n.constructor(t);return n.copy(r),r}function Ui(n){var e=new n.constructor(n.byteLength);return new rr(e).set(new rr(n)),e}function ja(n,e){var t=e?Ui(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function nc(n){var e=new n.constructor(n.source,Au.exec(n));return e.lastIndex=n.lastIndex,e}function ec(n){return Lt?dn(Lt.call(n)):{}}function Ns(n,e){var t=e?Ui(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function Gs(n,e){if(n!==e){var t=n!==o,r=n===null,i=n===n,s=kn(n),l=e!==o,f=e===null,c=e===e,d=kn(e);if(!f&&!d&&!s&&n>e||s&&l&&c&&!f&&!d||r&&l&&c||!t&&c||!i)return 1;if(!r&&!s&&!d&&n=f)return c;var d=t[r];return c*(d=="desc"?-1:1)}}return n.index-e.index}function Ks(n,e,t,r){for(var i=-1,s=n.length,l=t.length,f=-1,c=e.length,d=Sn(s-l,0),p=h(c+d),g=!r;++f1?t[i-1]:o,l=i>2?t[2]:o;for(s=n.length>3&&typeof s=="function"?(i--,s):o,l&&Un(t[0],t[1],l)&&(s=i<3?o:s,i=1),e=dn(e);++r-1?i[s?e[l]:l]:o}}function Zs(n){return Ae(function(e){var t=e.length,r=t,i=Jn.prototype.thru;for(n&&e.reverse();r--;){var s=e[r];if(typeof s!="function")throw new Xn(x);if(i&&!l&&Ir(s)=="wrapper")var l=new Jn([],!0)}for(r=l?r:t;++r1&&Y.reverse(),p&&cf))return!1;var d=s.get(n),p=s.get(e);if(d&&p)return d==e&&p==n;var g=-1,m=!0,I=t&nn?new Ge:o;for(s.set(n,e),s.set(e,n);++g1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(ml,`{ + */Fr.exports;(function(B,A){(function(){var o,b="4.17.21",V=200,j="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",x="Expected a function",X="Invalid `variable` option passed into `_.template`",pn="__lodash_hash_undefined__",fn=500,rn="__lodash_placeholder__",W=1,Cn=2,H=4,y=1,nn=2,F=1,k=2,an=4,cn=8,on=16,hn=32,Z=64,O=128,vn=256,U=512,R=30,Tn="...",On=800,Bn=16,ce=1,Ve=2,Nr=3,ge=1/0,he=9007199254740991,Gt=17976931348623157e292,Ze=NaN,J=4294967295,Gr=J-1,Re=J>>>1,jo=[["ary",O],["bind",F],["bindKey",k],["curry",cn],["curryRight",on],["flip",U],["partial",hn],["partialRight",Z],["rearg",vn]],Ye="[object Arguments]",Kt="[object Array]",nl="[object AsyncFunction]",_t="[object Boolean]",dt="[object Date]",el="[object DOMException]",Ht="[object Error]",zt="[object Function]",vu="[object GeneratorFunction]",ie="[object Map]",pt="[object Number]",tl="[object Null]",ve="[object Object]",mu="[object Promise]",rl="[object Proxy]",gt="[object RegExp]",ue="[object Set]",vt="[object String]",kt="[object Symbol]",il="[object Undefined]",mt="[object WeakMap]",ul="[object WeakSet]",yt="[object ArrayBuffer]",Xe="[object DataView]",Kr="[object Float32Array]",Hr="[object Float64Array]",zr="[object Int8Array]",kr="[object Int16Array]",qr="[object Int32Array]",Vr="[object Uint8Array]",Zr="[object Uint8ClampedArray]",Yr="[object Uint16Array]",Xr="[object Uint32Array]",sl=/\b__p \+= '';/g,ol=/\b(__p \+=) '' \+/g,ll=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yu=/&(?:amp|lt|gt|quot|#39);/g,wu=/[&<>"']/g,fl=RegExp(yu.source),al=RegExp(wu.source),cl=/<%-([\s\S]+?)%>/g,hl=/<%([\s\S]+?)%>/g,xu=/<%=([\s\S]+?)%>/g,_l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dl=/^\w*$/,pl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jr=/[\\^$.*+?()[\]{}|]/g,gl=RegExp(Jr.source),Qr=/^\s+/,vl=/\s/,ml=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,yl=/\{\n\/\* \[wrapped with (.+)\] \*/,wl=/,? & /,xl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Al=/[()=,{}\[\]\/\s]/,Il=/\\(\\)?/g,Cl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Au=/\w*$/,Ll=/^[-+]0x[0-9a-f]+$/i,Sl=/^0b[01]+$/i,Rl=/^\[object .+?Constructor\]$/,El=/^0o[0-7]+$/i,bl=/^(?:0|[1-9]\d*)$/,Tl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qt=/($^)/,Ol=/['\n\r\u2028\u2029\\]/g,Vt="\\ud800-\\udfff",Pl="\\u0300-\\u036f",$l="\\ufe20-\\ufe2f",Bl="\\u20d0-\\u20ff",Iu=Pl+$l+Bl,Cu="\\u2700-\\u27bf",Lu="a-z\\xdf-\\xf6\\xf8-\\xff",Wl="\\xac\\xb1\\xd7\\xf7",Ul="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Fl="\\u2000-\\u206f",Ml=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Su="A-Z\\xc0-\\xd6\\xd8-\\xde",Ru="\\ufe0e\\ufe0f",Eu=Wl+Ul+Fl+Ml,jr="['’]",Dl="["+Vt+"]",bu="["+Eu+"]",Zt="["+Iu+"]",Tu="\\d+",Nl="["+Cu+"]",Ou="["+Lu+"]",Pu="[^"+Vt+Eu+Tu+Cu+Lu+Su+"]",ni="\\ud83c[\\udffb-\\udfff]",Gl="(?:"+Zt+"|"+ni+")",$u="[^"+Vt+"]",ei="(?:\\ud83c[\\udde6-\\uddff]){2}",ti="[\\ud800-\\udbff][\\udc00-\\udfff]",Je="["+Su+"]",Bu="\\u200d",Wu="(?:"+Ou+"|"+Pu+")",Kl="(?:"+Je+"|"+Pu+")",Uu="(?:"+jr+"(?:d|ll|m|re|s|t|ve))?",Fu="(?:"+jr+"(?:D|LL|M|RE|S|T|VE))?",Mu=Gl+"?",Du="["+Ru+"]?",Hl="(?:"+Bu+"(?:"+[$u,ei,ti].join("|")+")"+Du+Mu+")*",zl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Nu=Du+Mu+Hl,ql="(?:"+[Nl,ei,ti].join("|")+")"+Nu,Vl="(?:"+[$u+Zt+"?",Zt,ei,ti,Dl].join("|")+")",Zl=RegExp(jr,"g"),Yl=RegExp(Zt,"g"),ri=RegExp(ni+"(?="+ni+")|"+Vl+Nu,"g"),Xl=RegExp([Je+"?"+Ou+"+"+Uu+"(?="+[bu,Je,"$"].join("|")+")",Kl+"+"+Fu+"(?="+[bu,Je+Wu,"$"].join("|")+")",Je+"?"+Wu+"+"+Uu,Je+"+"+Fu,kl,zl,Tu,ql].join("|"),"g"),Jl=RegExp("["+Bu+Vt+Iu+Ru+"]"),Ql=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nf=-1,mn={};mn[Kr]=mn[Hr]=mn[zr]=mn[kr]=mn[qr]=mn[Vr]=mn[Zr]=mn[Yr]=mn[Xr]=!0,mn[Ye]=mn[Kt]=mn[yt]=mn[_t]=mn[Xe]=mn[dt]=mn[Ht]=mn[zt]=mn[ie]=mn[pt]=mn[ve]=mn[gt]=mn[ue]=mn[vt]=mn[mt]=!1;var gn={};gn[Ye]=gn[Kt]=gn[yt]=gn[Xe]=gn[_t]=gn[dt]=gn[Kr]=gn[Hr]=gn[zr]=gn[kr]=gn[qr]=gn[ie]=gn[pt]=gn[ve]=gn[gt]=gn[ue]=gn[vt]=gn[kt]=gn[Vr]=gn[Zr]=gn[Yr]=gn[Xr]=!0,gn[Ht]=gn[zt]=gn[mt]=!1;var ef={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},tf={"&":"&","<":"<",">":">",'"':""","'":"'"},rf={"&":"&","<":"<",">":">",""":'"',"'":"'"},uf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},sf=parseFloat,of=parseInt,Gu=typeof Wt=="object"&&Wt&&Wt.Object===Object&&Wt,lf=typeof self=="object"&&self&&self.Object===Object&&self,En=Gu||lf||Function("return this")(),ii=A&&!A.nodeType&&A,Me=ii&&!0&&B&&!B.nodeType&&B,Ku=Me&&Me.exports===ii,ui=Ku&&Gu.process,Zn=function(){try{var a=Me&&Me.require&&Me.require("util").types;return a||ui&&ui.binding&&ui.binding("util")}catch{}}(),Hu=Zn&&Zn.isArrayBuffer,zu=Zn&&Zn.isDate,ku=Zn&&Zn.isMap,qu=Zn&&Zn.isRegExp,Vu=Zn&&Zn.isSet,Zu=Zn&&Zn.isTypedArray;function Kn(a,_,h){switch(h.length){case 0:return a.call(_);case 1:return a.call(_,h[0]);case 2:return a.call(_,h[0],h[1]);case 3:return a.call(_,h[0],h[1],h[2])}return a.apply(_,h)}function ff(a,_,h,w){for(var T=-1,en=a==null?0:a.length;++T-1}function si(a,_,h){for(var w=-1,T=a==null?0:a.length;++w-1;);return h}function ts(a,_){for(var h=a.length;h--&&Qe(_,a[h],0)>-1;);return h}function mf(a,_){for(var h=a.length,w=0;h--;)a[h]===_&&++w;return w}var yf=ai(ef),wf=ai(tf);function xf(a){return"\\"+uf[a]}function Af(a,_){return a==null?o:a[_]}function je(a){return Jl.test(a)}function If(a){return Ql.test(a)}function Cf(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function di(a){var _=-1,h=Array(a.size);return a.forEach(function(w,T){h[++_]=[T,w]}),h}function rs(a,_){return function(h){return a(_(h))}}function Te(a,_){for(var h=-1,w=a.length,T=0,en=[];++h-1}function ca(n,e){var t=this.__data__,r=hr(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}me.prototype.clear=oa,me.prototype.delete=la,me.prototype.get=fa,me.prototype.has=aa,me.prototype.set=ca;function ye(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Qn(n,e,t,r,i,s){var l,f=e&W,c=e&Cn,d=e&H;if(t&&(l=i?t(n,r,i,s):t(n)),l!==o)return l;if(!wn(n))return n;var p=P(n);if(p){if(l=pc(n),!f)return Mn(n,l)}else{var g=$n(n),m=g==zt||g==vu;if(Ue(n))return Ds(n,f);if(g==ve||g==Ye||m&&!i){if(l=c||m?{}:io(n),!f)return c?ic(n,Ra(l,n)):rc(n,ps(l,n))}else{if(!gn[g])return i?n:{};l=gc(n,g,f)}}s||(s=new oe);var I=s.get(n);if(I)return I;s.set(n,l),Bo(n)?n.forEach(function(S){l.add(Qn(S,e,t,S,n,s))}):Po(n)&&n.forEach(function(S,z){l.set(z,Qn(S,e,t,z,n,s))});var L=d?c?Ni:Di:c?Nn:Rn,N=p?o:L(n);return Yn(N||n,function(S,z){N&&(z=S,S=n[z]),St(l,z,Qn(S,e,t,z,n,s))}),l}function Ea(n){var e=Rn(n);return function(t){return gs(t,n,e)}}function gs(n,e,t){var r=t.length;if(n==null)return!r;for(n=dn(n);r--;){var i=t[r],s=e[i],l=n[i];if(l===o&&!(i in n)||!s(l))return!1}return!0}function vs(n,e,t){if(typeof n!="function")throw new Xn(x);return $t(function(){n.apply(o,t)},e)}function Rt(n,e,t,r){var i=-1,s=Yt,l=!0,f=n.length,c=[],d=e.length;if(!f)return c;t&&(e=yn(e,Hn(t))),r?(s=si,l=!1):e.length>=V&&(s=wt,l=!1,e=new Ge(e));n:for(;++ii?0:i+t),r=r===o||r>i?i:M(r),r<0&&(r+=i),r=t>r?0:Uo(r);t0&&t(f)?e>1?bn(f,e-1,t,r,i):be(i,f):r||(i[i.length]=f)}return i}var xi=ks(),ws=ks(!0);function _e(n,e){return n&&xi(n,e,Rn)}function Ai(n,e){return n&&ws(n,e,Rn)}function dr(n,e){return Ee(e,function(t){return Ce(n[t])})}function He(n,e){e=Be(e,n);for(var t=0,r=e.length;n!=null&&te}function Oa(n,e){return n!=null&&ln.call(n,e)}function Pa(n,e){return n!=null&&e in dn(n)}function $a(n,e,t){return n>=Pn(e,t)&&n=120&&p.length>=120)?new Ge(l&&p):o}p=n[0];var g=-1,m=f[0];n:for(;++g-1;)f!==n&&ur.call(f,c,1),ur.call(n,c,1);return n}function Os(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==s){var s=i;Ie(i)?ur.call(n,i,1):Pi(n,i)}}return n}function bi(n,e){return n+lr(cs()*(e-n+1))}function qa(n,e,t,r){for(var i=-1,s=Sn(or((e-n)/(t||1)),0),l=h(s);s--;)l[r?s:++i]=n,n+=t;return l}function Ti(n,e){var t="";if(!n||e<1||e>he)return t;do e%2&&(t+=n),e=lr(e/2),e&&(n+=n);while(e);return t}function K(n,e){return Vi(oo(n,e,Gn),n+"")}function Va(n){return ds(at(n))}function Za(n,e){var t=at(n);return Lr(t,Ke(e,0,t.length))}function Tt(n,e,t,r){if(!wn(n))return n;e=Be(e,n);for(var i=-1,s=e.length,l=s-1,f=n;f!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=h(i);++r>>1,l=n[s];l!==null&&!kn(l)&&(t?l<=e:l=V){var d=e?null:lc(n);if(d)return Jt(d);l=!1,i=wt,c=new Ge}else c=e?[]:f;n:for(;++r=r?n:jn(n,e,t)}var Ms=Df||function(n){return En.clearTimeout(n)};function Ds(n,e){if(e)return n.slice();var t=n.length,r=ss?ss(t):new n.constructor(t);return n.copy(r),r}function Ui(n){var e=new n.constructor(n.byteLength);return new rr(e).set(new rr(n)),e}function ja(n,e){var t=e?Ui(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function nc(n){var e=new n.constructor(n.source,Au.exec(n));return e.lastIndex=n.lastIndex,e}function ec(n){return Lt?dn(Lt.call(n)):{}}function Ns(n,e){var t=e?Ui(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function Gs(n,e){if(n!==e){var t=n!==o,r=n===null,i=n===n,s=kn(n),l=e!==o,f=e===null,c=e===e,d=kn(e);if(!f&&!d&&!s&&n>e||s&&l&&c&&!f&&!d||r&&l&&c||!t&&c||!i)return 1;if(!r&&!s&&!d&&n=f)return c;var d=t[r];return c*(d=="desc"?-1:1)}}return n.index-e.index}function Ks(n,e,t,r){for(var i=-1,s=n.length,l=t.length,f=-1,c=e.length,d=Sn(s-l,0),p=h(c+d),g=!r;++f1?t[i-1]:o,l=i>2?t[2]:o;for(s=n.length>3&&typeof s=="function"?(i--,s):o,l&&Un(t[0],t[1],l)&&(s=i<3?o:s,i=1),e=dn(e);++r-1?i[s?e[l]:l]:o}}function Zs(n){return Ae(function(e){var t=e.length,r=t,i=Jn.prototype.thru;for(n&&e.reverse();r--;){var s=e[r];if(typeof s!="function")throw new Xn(x);if(i&&!l&&Ir(s)=="wrapper")var l=new Jn([],!0)}for(r=l?r:t;++r1&&Y.reverse(),p&&cf))return!1;var d=s.get(n),p=s.get(e);if(d&&p)return d==e&&p==n;var g=-1,m=!0,I=t&nn?new Ge:o;for(s.set(n,e),s.set(e,n);++g1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(ml,`{ /* [wrapped with `+e+`] */ -`)}function mc(n){return P(n)||qe(n)||!!(fs&&n&&n[fs])}function Ie(n,e){var t=typeof n;return e=e??he,!!e&&(t=="number"||t!="symbol"&&El.test(n))&&n>-1&&n%1==0&&n0){if(++e>=On)return arguments[0]}else e=0;return n.apply(o,arguments)}}function Lr(n,e){var t=-1,r=n.length,i=r-1;for(e=e===o?r:e;++t1?n[e-1]:o;return t=typeof t=="function"?(n.pop(),t):o,wo(n,t)});function xo(n){var e=u(n);return e.__chain__=!0,e}function Eh(n,e){return e(n),n}function Sr(n,e){return e(n)}var Th=Ae(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(s){return wi(s,n)};return e>1||this.__actions__.length||!(r instanceof q)||!Ie(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Sr,args:[i],thisArg:o}),new Jn(r,this.__chain__).thru(function(s){return e&&!s.length&&s.push(o),s}))});function Oh(){return xo(this)}function Ph(){return new Jn(this.value(),this.__chain__)}function $h(){this.__values__===o&&(this.__values__=Wo(this.value()));var n=this.__index__>=this.__values__.length,e=n?o:this.__values__[this.__index__++];return{done:n,value:e}}function Bh(){return this}function Wh(n){for(var e,t=this;t instanceof cr;){var r=_o(t);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Uh(){var n=this.__wrapped__;if(n instanceof q){var e=n;return this.__actions__.length&&(e=new q(this)),e=e.reverse(),e.__actions__.push({func:Sr,args:[Zi],thisArg:o}),new Jn(e,this.__chain__)}return this.thru(Zi)}function Fh(){return Us(this.__wrapped__,this.__actions__)}var Mh=mr(function(n,e,t){ln.call(n,t)?++n[t]:we(n,t,1)});function Dh(n,e,t){var r=P(n)?Yu:Ea;return t&&Un(n,e,t)&&(e=o),r(n,C(e,3))}function Nh(n,e){var t=P(n)?be:ys;return t(n,C(e,3))}var Gh=Vs(po),Kh=Vs(go);function Hh(n,e){return En(Rr(n,e),1)}function zh(n,e){return En(Rr(n,e),ge)}function kh(n,e,t){return t=t===o?1:M(t),En(Rr(n,e),t)}function Ao(n,e){var t=P(n)?Yn:Pe;return t(n,C(e,3))}function Io(n,e){var t=P(n)?af:ms;return t(n,C(e,3))}var qh=mr(function(n,e,t){ln.call(n,t)?n[t].push(e):we(n,t,[e])});function Vh(n,e,t,r){n=Dn(n)?n:at(n),t=t&&!r?M(t):0;var i=n.length;return t<0&&(t=Sn(i+t,0)),Pr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&Qe(n,e,t)>-1}var Zh=K(function(n,e,t){var r=-1,i=typeof e=="function",s=Dn(n)?h(n.length):[];return Pe(n,function(l){s[++r]=i?Kn(e,l,t):bt(l,e,t)}),s}),Yh=mr(function(n,e,t){we(n,t,e)});function Rr(n,e){var t=P(n)?yn:Ls;return t(n,C(e,3))}function Xh(n,e,t,r){return n==null?[]:(P(e)||(e=e==null?[]:[e]),t=r?o:t,P(t)||(t=t==null?[]:[t]),Es(n,e,t))}var Jh=mr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Qh(n,e,t){var r=P(n)?oi:ju,i=arguments.length<3;return r(n,C(e,4),t,i,Pe)}function jh(n,e,t){var r=P(n)?cf:ju,i=arguments.length<3;return r(n,C(e,4),t,i,ms)}function n_(n,e){var t=P(n)?be:ys;return t(n,Tr(C(e,3)))}function e_(n){var e=P(n)?ds:Va;return e(n)}function t_(n,e,t){(t?Un(n,e,t):e===o)?e=1:e=M(e);var r=P(n)?Ca:Za;return r(n,e)}function r_(n){var e=P(n)?La:Xa;return e(n)}function i_(n){if(n==null)return 0;if(Dn(n))return Pr(n)?nt(n):n.length;var e=$n(n);return e==ie||e==ue?n.size:Si(n).length}function u_(n,e,t){var r=P(n)?li:Ja;return t&&Un(n,e,t)&&(e=o),r(n,C(e,3))}var s_=K(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Un(n,e[0],e[1])?e=[]:t>2&&Un(e[0],e[1],e[2])&&(e=[e[0]]),Es(n,En(e,1),[])}),br=Nf||function(){return bn.Date.now()};function o_(n,e){if(typeof e!="function")throw new Xn(x);return n=M(n),function(){if(--n<1)return e.apply(this,arguments)}}function Co(n,e,t){return e=t?o:e,e=n&&e==null?n.length:e,xe(n,O,o,o,o,o,e)}function Lo(n,e){var t;if(typeof e!="function")throw new Xn(x);return n=M(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Xi=K(function(n,e,t){var r=F;if(t.length){var i=Te(t,lt(Xi));r|=hn}return xe(n,r,e,t,i)}),So=K(function(n,e,t){var r=F|k;if(t.length){var i=Te(t,lt(So));r|=hn}return xe(e,r,n,t,i)});function Ro(n,e,t){e=t?o:e;var r=xe(n,cn,o,o,o,o,o,e);return r.placeholder=Ro.placeholder,r}function bo(n,e,t){e=t?o:e;var r=xe(n,on,o,o,o,o,o,e);return r.placeholder=bo.placeholder,r}function Eo(n,e,t){var r,i,s,l,f,c,d=0,p=!1,g=!1,m=!0;if(typeof n!="function")throw new Xn(x);e=ee(e)||0,wn(t)&&(p=!!t.leading,g="maxWait"in t,s=g?Sn(ee(t.maxWait)||0,e):s,m="trailing"in t?!!t.trailing:m);function I(In){var fe=r,Se=i;return r=i=o,d=In,l=n.apply(Se,fe),l}function L(In){return d=In,f=$t(z,e),p?I(In):l}function N(In){var fe=In-c,Se=In-d,Zo=e-fe;return g?Pn(Zo,s-Se):Zo}function S(In){var fe=In-c,Se=In-d;return c===o||fe>=e||fe<0||g&&Se>=s}function z(){var In=br();if(S(In))return Y(In);f=$t(z,N(In))}function Y(In){return f=o,m&&r?I(In):(r=i=o,l)}function qn(){f!==o&&Ms(f),d=0,r=c=i=f=o}function Fn(){return f===o?l:Y(br())}function Vn(){var In=br(),fe=S(In);if(r=arguments,i=this,c=In,fe){if(f===o)return L(c);if(g)return Ms(f),f=$t(z,e),I(c)}return f===o&&(f=$t(z,e)),l}return Vn.cancel=qn,Vn.flush=Fn,Vn}var l_=K(function(n,e){return vs(n,1,e)}),f_=K(function(n,e,t){return vs(n,ee(e)||0,t)});function a_(n){return xe(n,U)}function Er(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Xn(x);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=t.cache;if(s.has(i))return s.get(i);var l=n.apply(this,r);return t.cache=s.set(i,l)||s,l};return t.cache=new(Er.Cache||ye),t}Er.Cache=ye;function Tr(n){if(typeof n!="function")throw new Xn(x);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function c_(n){return Lo(2,n)}var h_=Qa(function(n,e){e=e.length==1&&P(e[0])?yn(e[0],Hn(C())):yn(En(e,1),Hn(C()));var t=e.length;return K(function(r){for(var i=-1,s=Pn(r.length,t);++i=e}),qe=As(function(){return arguments}())?As:function(n){return xn(n)&&ln.call(n,"callee")&&!ls.call(n,"callee")},P=h.isArray,R_=Hu?Hn(Hu):Wa;function Dn(n){return n!=null&&Or(n.length)&&!Ce(n)}function An(n){return xn(n)&&Dn(n)}function b_(n){return n===!0||n===!1||xn(n)&&Wn(n)==_t}var Ue=Kf||lu,E_=zu?Hn(zu):Ua;function T_(n){return xn(n)&&n.nodeType===1&&!Bt(n)}function O_(n){if(n==null)return!0;if(Dn(n)&&(P(n)||typeof n=="string"||typeof n.splice=="function"||Ue(n)||ft(n)||qe(n)))return!n.length;var e=$n(n);if(e==ie||e==ue)return!n.size;if(Pt(n))return!Si(n).length;for(var t in n)if(ln.call(n,t))return!1;return!0}function P_(n,e){return Et(n,e)}function $_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?Et(n,e,o,t):!!r}function Qi(n){if(!xn(n))return!1;var e=Wn(n);return e==Ht||e==el||typeof n.message=="string"&&typeof n.name=="string"&&!Bt(n)}function B_(n){return typeof n=="number"&&as(n)}function Ce(n){if(!wn(n))return!1;var e=Wn(n);return e==zt||e==vu||e==nl||e==rl}function Oo(n){return typeof n=="number"&&n==M(n)}function Or(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=he}function wn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function xn(n){return n!=null&&typeof n=="object"}var Po=ku?Hn(ku):Ma;function W_(n,e){return n===e||Li(n,e,Ki(e))}function U_(n,e,t){return t=typeof t=="function"?t:o,Li(n,e,Ki(e),t)}function F_(n){return $o(n)&&n!=+n}function M_(n){if(xc(n))throw new T(j);return Is(n)}function D_(n){return n===null}function N_(n){return n==null}function $o(n){return typeof n=="number"||xn(n)&&Wn(n)==pt}function Bt(n){if(!xn(n)||Wn(n)!=ve)return!1;var e=ir(n);if(e===null)return!0;var t=ln.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&nr.call(t)==Uf}var ji=qu?Hn(qu):Da;function G_(n){return Oo(n)&&n>=-he&&n<=he}var Bo=Vu?Hn(Vu):Na;function Pr(n){return typeof n=="string"||!P(n)&&xn(n)&&Wn(n)==vt}function kn(n){return typeof n=="symbol"||xn(n)&&Wn(n)==kt}var ft=Zu?Hn(Zu):Ga;function K_(n){return n===o}function H_(n){return xn(n)&&$n(n)==mt}function z_(n){return xn(n)&&Wn(n)==ul}var k_=Ar(Ri),q_=Ar(function(n,e){return n<=e});function Wo(n){if(!n)return[];if(Dn(n))return Pr(n)?se(n):Mn(n);if(xt&&n[xt])return Cf(n[xt]());var e=$n(n),t=e==ie?di:e==ue?Jt:at;return t(n)}function Le(n){if(!n)return n===0?n:0;if(n=ee(n),n===ge||n===-ge){var e=n<0?-1:1;return e*Gt}return n===n?n:0}function M(n){var e=Le(n),t=e%1;return e===e?t?e-t:e:0}function Uo(n){return n?Ke(M(n),0,J):0}function ee(n){if(typeof n=="number")return n;if(kn(n))return Ze;if(wn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=wn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=ns(n);var t=Sl.test(n);return t||bl.test(n)?of(n.slice(2),t?2:8):Ll.test(n)?Ze:+n}function Fo(n){return de(n,Nn(n))}function V_(n){return n?Ke(M(n),-he,he):n===0?n:0}function un(n){return n==null?"":zn(n)}var Z_=st(function(n,e){if(Pt(e)||Dn(e)){de(e,Rn(e),n);return}for(var t in e)ln.call(e,t)&&St(n,t,e[t])}),Mo=st(function(n,e){de(e,Nn(e),n)}),$r=st(function(n,e,t,r){de(e,Nn(e),n,r)}),Y_=st(function(n,e,t,r){de(e,Rn(e),n,r)}),X_=Ae(wi);function J_(n,e){var t=ut(n);return e==null?t:ps(t,e)}var Q_=K(function(n,e){n=dn(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&Un(e[0],e[1],i)&&(r=1);++t1),s}),de(n,Ni(n),t),r&&(t=Qn(t,W|Cn|H,fc));for(var i=e.length;i--;)Pi(t,e[i]);return t});function gd(n,e){return No(n,Tr(C(e)))}var vd=Ae(function(n,e){return n==null?{}:za(n,e)});function No(n,e){if(n==null)return{};var t=yn(Ni(n),function(r){return[r]});return e=C(e),Ts(n,t,function(r,i){return e(r,i[0])})}function md(n,e,t){e=Be(e,n);var r=-1,i=e.length;for(i||(i=1,n=o);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=cs();return Pn(n+i*(e-n+sf("1e-"+((i+"").length-1))),e)}return Ei(n,e)}var Ed=ot(function(n,e,t){return e=e.toLowerCase(),n+(t?Ho(e):e)});function Ho(n){return tu(un(n).toLowerCase())}function zo(n){return n=un(n),n&&n.replace(Tl,yf).replace(Yl,"")}function Td(n,e,t){n=un(n),e=zn(e);var r=n.length;t=t===o?r:Ke(M(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function Od(n){return n=un(n),n&&al.test(n)?n.replace(wu,wf):n}function Pd(n){return n=un(n),n&&gl.test(n)?n.replace(Jr,"\\$&"):n}var $d=ot(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Bd=ot(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),Wd=qs("toLowerCase");function Ud(n,e,t){n=un(n),e=M(e);var r=e?nt(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return xr(lr(i),t)+n+xr(or(i),t)}function Fd(n,e,t){n=un(n),e=M(e);var r=e?nt(n):0;return e&&r>>0,t?(n=un(n),n&&(typeof e=="string"||e!=null&&!ji(e))&&(e=zn(e),!e&&je(n))?We(se(n),0,t):n.split(e,t)):[]}var zd=ot(function(n,e,t){return n+(t?" ":"")+tu(e)});function kd(n,e,t){return n=un(n),t=t==null?0:Ke(M(t),0,n.length),e=zn(e),n.slice(t,t+e.length)==e}function qd(n,e,t){var r=u.templateSettings;t&&Un(n,e,t)&&(e=o),n=un(n),e=$r({},e,r,js);var i=$r({},e.imports,r.imports,js),s=Rn(i),l=_i(i,s),f,c,d=0,p=e.interpolate||qt,g="__p += '",m=pi((e.escape||qt).source+"|"+p.source+"|"+(p===xu?Cl:qt).source+"|"+(e.evaluate||qt).source+"|$","g"),I="//# sourceURL="+(ln.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nf+"]")+` +`)}function mc(n){return P(n)||qe(n)||!!(fs&&n&&n[fs])}function Ie(n,e){var t=typeof n;return e=e??he,!!e&&(t=="number"||t!="symbol"&&bl.test(n))&&n>-1&&n%1==0&&n0){if(++e>=On)return arguments[0]}else e=0;return n.apply(o,arguments)}}function Lr(n,e){var t=-1,r=n.length,i=r-1;for(e=e===o?r:e;++t1?n[e-1]:o;return t=typeof t=="function"?(n.pop(),t):o,wo(n,t)});function xo(n){var e=u(n);return e.__chain__=!0,e}function bh(n,e){return e(n),n}function Sr(n,e){return e(n)}var Th=Ae(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(s){return wi(s,n)};return e>1||this.__actions__.length||!(r instanceof q)||!Ie(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Sr,args:[i],thisArg:o}),new Jn(r,this.__chain__).thru(function(s){return e&&!s.length&&s.push(o),s}))});function Oh(){return xo(this)}function Ph(){return new Jn(this.value(),this.__chain__)}function $h(){this.__values__===o&&(this.__values__=Wo(this.value()));var n=this.__index__>=this.__values__.length,e=n?o:this.__values__[this.__index__++];return{done:n,value:e}}function Bh(){return this}function Wh(n){for(var e,t=this;t instanceof cr;){var r=_o(t);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Uh(){var n=this.__wrapped__;if(n instanceof q){var e=n;return this.__actions__.length&&(e=new q(this)),e=e.reverse(),e.__actions__.push({func:Sr,args:[Zi],thisArg:o}),new Jn(e,this.__chain__)}return this.thru(Zi)}function Fh(){return Us(this.__wrapped__,this.__actions__)}var Mh=mr(function(n,e,t){ln.call(n,t)?++n[t]:we(n,t,1)});function Dh(n,e,t){var r=P(n)?Yu:ba;return t&&Un(n,e,t)&&(e=o),r(n,C(e,3))}function Nh(n,e){var t=P(n)?Ee:ys;return t(n,C(e,3))}var Gh=Vs(po),Kh=Vs(go);function Hh(n,e){return bn(Rr(n,e),1)}function zh(n,e){return bn(Rr(n,e),ge)}function kh(n,e,t){return t=t===o?1:M(t),bn(Rr(n,e),t)}function Ao(n,e){var t=P(n)?Yn:Pe;return t(n,C(e,3))}function Io(n,e){var t=P(n)?af:ms;return t(n,C(e,3))}var qh=mr(function(n,e,t){ln.call(n,t)?n[t].push(e):we(n,t,[e])});function Vh(n,e,t,r){n=Dn(n)?n:at(n),t=t&&!r?M(t):0;var i=n.length;return t<0&&(t=Sn(i+t,0)),Pr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&Qe(n,e,t)>-1}var Zh=K(function(n,e,t){var r=-1,i=typeof e=="function",s=Dn(n)?h(n.length):[];return Pe(n,function(l){s[++r]=i?Kn(e,l,t):Et(l,e,t)}),s}),Yh=mr(function(n,e,t){we(n,t,e)});function Rr(n,e){var t=P(n)?yn:Ls;return t(n,C(e,3))}function Xh(n,e,t,r){return n==null?[]:(P(e)||(e=e==null?[]:[e]),t=r?o:t,P(t)||(t=t==null?[]:[t]),bs(n,e,t))}var Jh=mr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Qh(n,e,t){var r=P(n)?oi:ju,i=arguments.length<3;return r(n,C(e,4),t,i,Pe)}function jh(n,e,t){var r=P(n)?cf:ju,i=arguments.length<3;return r(n,C(e,4),t,i,ms)}function n_(n,e){var t=P(n)?Ee:ys;return t(n,Tr(C(e,3)))}function e_(n){var e=P(n)?ds:Va;return e(n)}function t_(n,e,t){(t?Un(n,e,t):e===o)?e=1:e=M(e);var r=P(n)?Ca:Za;return r(n,e)}function r_(n){var e=P(n)?La:Xa;return e(n)}function i_(n){if(n==null)return 0;if(Dn(n))return Pr(n)?nt(n):n.length;var e=$n(n);return e==ie||e==ue?n.size:Si(n).length}function u_(n,e,t){var r=P(n)?li:Ja;return t&&Un(n,e,t)&&(e=o),r(n,C(e,3))}var s_=K(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Un(n,e[0],e[1])?e=[]:t>2&&Un(e[0],e[1],e[2])&&(e=[e[0]]),bs(n,bn(e,1),[])}),Er=Nf||function(){return En.Date.now()};function o_(n,e){if(typeof e!="function")throw new Xn(x);return n=M(n),function(){if(--n<1)return e.apply(this,arguments)}}function Co(n,e,t){return e=t?o:e,e=n&&e==null?n.length:e,xe(n,O,o,o,o,o,e)}function Lo(n,e){var t;if(typeof e!="function")throw new Xn(x);return n=M(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Xi=K(function(n,e,t){var r=F;if(t.length){var i=Te(t,lt(Xi));r|=hn}return xe(n,r,e,t,i)}),So=K(function(n,e,t){var r=F|k;if(t.length){var i=Te(t,lt(So));r|=hn}return xe(e,r,n,t,i)});function Ro(n,e,t){e=t?o:e;var r=xe(n,cn,o,o,o,o,o,e);return r.placeholder=Ro.placeholder,r}function Eo(n,e,t){e=t?o:e;var r=xe(n,on,o,o,o,o,o,e);return r.placeholder=Eo.placeholder,r}function bo(n,e,t){var r,i,s,l,f,c,d=0,p=!1,g=!1,m=!0;if(typeof n!="function")throw new Xn(x);e=ee(e)||0,wn(t)&&(p=!!t.leading,g="maxWait"in t,s=g?Sn(ee(t.maxWait)||0,e):s,m="trailing"in t?!!t.trailing:m);function I(In){var fe=r,Se=i;return r=i=o,d=In,l=n.apply(Se,fe),l}function L(In){return d=In,f=$t(z,e),p?I(In):l}function N(In){var fe=In-c,Se=In-d,Zo=e-fe;return g?Pn(Zo,s-Se):Zo}function S(In){var fe=In-c,Se=In-d;return c===o||fe>=e||fe<0||g&&Se>=s}function z(){var In=Er();if(S(In))return Y(In);f=$t(z,N(In))}function Y(In){return f=o,m&&r?I(In):(r=i=o,l)}function qn(){f!==o&&Ms(f),d=0,r=c=i=f=o}function Fn(){return f===o?l:Y(Er())}function Vn(){var In=Er(),fe=S(In);if(r=arguments,i=this,c=In,fe){if(f===o)return L(c);if(g)return Ms(f),f=$t(z,e),I(c)}return f===o&&(f=$t(z,e)),l}return Vn.cancel=qn,Vn.flush=Fn,Vn}var l_=K(function(n,e){return vs(n,1,e)}),f_=K(function(n,e,t){return vs(n,ee(e)||0,t)});function a_(n){return xe(n,U)}function br(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Xn(x);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=t.cache;if(s.has(i))return s.get(i);var l=n.apply(this,r);return t.cache=s.set(i,l)||s,l};return t.cache=new(br.Cache||ye),t}br.Cache=ye;function Tr(n){if(typeof n!="function")throw new Xn(x);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function c_(n){return Lo(2,n)}var h_=Qa(function(n,e){e=e.length==1&&P(e[0])?yn(e[0],Hn(C())):yn(bn(e,1),Hn(C()));var t=e.length;return K(function(r){for(var i=-1,s=Pn(r.length,t);++i=e}),qe=As(function(){return arguments}())?As:function(n){return xn(n)&&ln.call(n,"callee")&&!ls.call(n,"callee")},P=h.isArray,R_=Hu?Hn(Hu):Wa;function Dn(n){return n!=null&&Or(n.length)&&!Ce(n)}function An(n){return xn(n)&&Dn(n)}function E_(n){return n===!0||n===!1||xn(n)&&Wn(n)==_t}var Ue=Kf||lu,b_=zu?Hn(zu):Ua;function T_(n){return xn(n)&&n.nodeType===1&&!Bt(n)}function O_(n){if(n==null)return!0;if(Dn(n)&&(P(n)||typeof n=="string"||typeof n.splice=="function"||Ue(n)||ft(n)||qe(n)))return!n.length;var e=$n(n);if(e==ie||e==ue)return!n.size;if(Pt(n))return!Si(n).length;for(var t in n)if(ln.call(n,t))return!1;return!0}function P_(n,e){return bt(n,e)}function $_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?bt(n,e,o,t):!!r}function Qi(n){if(!xn(n))return!1;var e=Wn(n);return e==Ht||e==el||typeof n.message=="string"&&typeof n.name=="string"&&!Bt(n)}function B_(n){return typeof n=="number"&&as(n)}function Ce(n){if(!wn(n))return!1;var e=Wn(n);return e==zt||e==vu||e==nl||e==rl}function Oo(n){return typeof n=="number"&&n==M(n)}function Or(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=he}function wn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function xn(n){return n!=null&&typeof n=="object"}var Po=ku?Hn(ku):Ma;function W_(n,e){return n===e||Li(n,e,Ki(e))}function U_(n,e,t){return t=typeof t=="function"?t:o,Li(n,e,Ki(e),t)}function F_(n){return $o(n)&&n!=+n}function M_(n){if(xc(n))throw new T(j);return Is(n)}function D_(n){return n===null}function N_(n){return n==null}function $o(n){return typeof n=="number"||xn(n)&&Wn(n)==pt}function Bt(n){if(!xn(n)||Wn(n)!=ve)return!1;var e=ir(n);if(e===null)return!0;var t=ln.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&nr.call(t)==Uf}var ji=qu?Hn(qu):Da;function G_(n){return Oo(n)&&n>=-he&&n<=he}var Bo=Vu?Hn(Vu):Na;function Pr(n){return typeof n=="string"||!P(n)&&xn(n)&&Wn(n)==vt}function kn(n){return typeof n=="symbol"||xn(n)&&Wn(n)==kt}var ft=Zu?Hn(Zu):Ga;function K_(n){return n===o}function H_(n){return xn(n)&&$n(n)==mt}function z_(n){return xn(n)&&Wn(n)==ul}var k_=Ar(Ri),q_=Ar(function(n,e){return n<=e});function Wo(n){if(!n)return[];if(Dn(n))return Pr(n)?se(n):Mn(n);if(xt&&n[xt])return Cf(n[xt]());var e=$n(n),t=e==ie?di:e==ue?Jt:at;return t(n)}function Le(n){if(!n)return n===0?n:0;if(n=ee(n),n===ge||n===-ge){var e=n<0?-1:1;return e*Gt}return n===n?n:0}function M(n){var e=Le(n),t=e%1;return e===e?t?e-t:e:0}function Uo(n){return n?Ke(M(n),0,J):0}function ee(n){if(typeof n=="number")return n;if(kn(n))return Ze;if(wn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=wn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=ns(n);var t=Sl.test(n);return t||El.test(n)?of(n.slice(2),t?2:8):Ll.test(n)?Ze:+n}function Fo(n){return de(n,Nn(n))}function V_(n){return n?Ke(M(n),-he,he):n===0?n:0}function un(n){return n==null?"":zn(n)}var Z_=st(function(n,e){if(Pt(e)||Dn(e)){de(e,Rn(e),n);return}for(var t in e)ln.call(e,t)&&St(n,t,e[t])}),Mo=st(function(n,e){de(e,Nn(e),n)}),$r=st(function(n,e,t,r){de(e,Nn(e),n,r)}),Y_=st(function(n,e,t,r){de(e,Rn(e),n,r)}),X_=Ae(wi);function J_(n,e){var t=ut(n);return e==null?t:ps(t,e)}var Q_=K(function(n,e){n=dn(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&Un(e[0],e[1],i)&&(r=1);++t1),s}),de(n,Ni(n),t),r&&(t=Qn(t,W|Cn|H,fc));for(var i=e.length;i--;)Pi(t,e[i]);return t});function gd(n,e){return No(n,Tr(C(e)))}var vd=Ae(function(n,e){return n==null?{}:za(n,e)});function No(n,e){if(n==null)return{};var t=yn(Ni(n),function(r){return[r]});return e=C(e),Ts(n,t,function(r,i){return e(r,i[0])})}function md(n,e,t){e=Be(e,n);var r=-1,i=e.length;for(i||(i=1,n=o);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=cs();return Pn(n+i*(e-n+sf("1e-"+((i+"").length-1))),e)}return bi(n,e)}var bd=ot(function(n,e,t){return e=e.toLowerCase(),n+(t?Ho(e):e)});function Ho(n){return tu(un(n).toLowerCase())}function zo(n){return n=un(n),n&&n.replace(Tl,yf).replace(Yl,"")}function Td(n,e,t){n=un(n),e=zn(e);var r=n.length;t=t===o?r:Ke(M(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function Od(n){return n=un(n),n&&al.test(n)?n.replace(wu,wf):n}function Pd(n){return n=un(n),n&&gl.test(n)?n.replace(Jr,"\\$&"):n}var $d=ot(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Bd=ot(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),Wd=qs("toLowerCase");function Ud(n,e,t){n=un(n),e=M(e);var r=e?nt(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return xr(lr(i),t)+n+xr(or(i),t)}function Fd(n,e,t){n=un(n),e=M(e);var r=e?nt(n):0;return e&&r>>0,t?(n=un(n),n&&(typeof e=="string"||e!=null&&!ji(e))&&(e=zn(e),!e&&je(n))?We(se(n),0,t):n.split(e,t)):[]}var zd=ot(function(n,e,t){return n+(t?" ":"")+tu(e)});function kd(n,e,t){return n=un(n),t=t==null?0:Ke(M(t),0,n.length),e=zn(e),n.slice(t,t+e.length)==e}function qd(n,e,t){var r=u.templateSettings;t&&Un(n,e,t)&&(e=o),n=un(n),e=$r({},e,r,js);var i=$r({},e.imports,r.imports,js),s=Rn(i),l=_i(i,s),f,c,d=0,p=e.interpolate||qt,g="__p += '",m=pi((e.escape||qt).source+"|"+p.source+"|"+(p===xu?Cl:qt).source+"|"+(e.evaluate||qt).source+"|$","g"),I="//# sourceURL="+(ln.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nf+"]")+` `;n.replace(m,function(S,z,Y,qn,Fn,Vn){return Y||(Y=qn),g+=n.slice(d,Vn).replace(Ol,xf),z&&(f=!0,g+=`' + __e(`+z+`) + '`),Fn&&(c=!0,g+=`'; @@ -24,4 +24,4 @@ __p += '`),Y&&(g+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+g+`return __p -}`;var N=qo(function(){return en(s,I+"return "+g).apply(o,l)});if(N.source=g,Qi(N))throw N;return N}function Vd(n){return un(n).toLowerCase()}function Zd(n){return un(n).toUpperCase()}function Yd(n,e,t){if(n=un(n),n&&(t||e===o))return ns(n);if(!n||!(e=zn(e)))return n;var r=se(n),i=se(e),s=es(r,i),l=ts(r,i)+1;return We(r,s,l).join("")}function Xd(n,e,t){if(n=un(n),n&&(t||e===o))return n.slice(0,is(n)+1);if(!n||!(e=zn(e)))return n;var r=se(n),i=ts(r,se(e))+1;return We(r,0,i).join("")}function Jd(n,e,t){if(n=un(n),n&&(t||e===o))return n.replace(Qr,"");if(!n||!(e=zn(e)))return n;var r=se(n),i=es(r,se(e));return We(r,i).join("")}function Qd(n,e){var t=R,r=Tn;if(wn(e)){var i="separator"in e?e.separator:i;t="length"in e?M(e.length):t,r="omission"in e?zn(e.omission):r}n=un(n);var s=n.length;if(je(n)){var l=se(n);s=l.length}if(t>=s)return n;var f=t-nt(r);if(f<1)return r;var c=l?We(l,0,f).join(""):n.slice(0,f);if(i===o)return c+r;if(l&&(f+=c.length-f),ji(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=pi(i.source,un(Au.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var g=d.index;c=c.slice(0,g===o?f:g)}}else if(n.indexOf(zn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function jd(n){return n=un(n),n&&fl.test(n)?n.replace(yu,bf):n}var np=ot(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),tu=qs("toUpperCase");function ko(n,e,t){return n=un(n),e=t?o:e,e===o?If(n)?Of(n):df(n):n.match(e)||[]}var qo=K(function(n,e){try{return Kn(n,o,e)}catch(t){return Qi(t)?t:new T(t)}}),ep=Ae(function(n,e){return Yn(e,function(t){t=pe(t),we(n,t,Xi(n[t],n))}),n});function tp(n){var e=n==null?0:n.length,t=C();return n=e?yn(n,function(r){if(typeof r[1]!="function")throw new Xn(x);return[t(r[0]),r[1]]}):[],K(function(r){for(var i=-1;++ihe)return[];var t=J,r=Pn(n,J);e=C(e),n-=J;for(var i=hi(r,e);++t0||e<0)?new q(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=M(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},q.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},q.prototype.toArray=function(){return this.take(J)},_e(q.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],s=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,f=r?[1]:arguments,c=l instanceof q,d=f[0],p=c||P(l),g=function(z){var Y=i.apply(u,Ee([z],f));return r&&m?Y[0]:Y};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var m=this.__chain__,I=!!this.__actions__.length,L=s&&!m,N=c&&!I;if(!s&&p){l=N?l:new q(this);var S=n.apply(l,f);return S.__actions__.push({func:Sr,args:[g],thisArg:o}),new Jn(S,m)}return L&&N?n.apply(this,f):(S=this.thru(g),L?r?S.value()[0]:S.value():S)})}),Yn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Qt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var s=this.value();return e.apply(P(s)?s:[],i)}return this[t](function(l){return e.apply(P(l)?l:[],i)})}}),_e(q.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";ln.call(it,r)||(it[r]=[]),it[r].push({name:e,func:t})}}),it[yr(o,k).name]=[{name:"wrapper",func:o}],q.prototype.clone=jf,q.prototype.reverse=na,q.prototype.value=ea,u.prototype.at=Th,u.prototype.chain=Oh,u.prototype.commit=Ph,u.prototype.next=$h,u.prototype.plant=Wh,u.prototype.reverse=Uh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Fh,u.prototype.first=u.prototype.head,xt&&(u.prototype[xt]=Bh),u},et=Pf();Me?((Me.exports=et)._=et,ii._=et):bn._=et}).call(Wt)})(Fr,Fr.exports);var sv=Fr.exports;const ov=qp(sv),gu=B=>(du("data-v-b1bc33a8"),B=B(),pu(),B),lv={class:"my-order"},fv=gu(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),av={class:"nav-item-input"},cv={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},hv=["onClick"],_v={class:"shop-name"},dv={key:0,class:""},pv={key:1,class:"shop-price"},gv=gu(()=>v("span",{class:"unit-name"},"商户价:",-1)),vv={key:0,class:"unit-name"},mv={key:2,class:"shop-price"},yv=gu(()=>v("span",{class:"unit-name"},"原价: ",-1)),wv={class:"unit-name del"},xv={key:3,class:"shop-price"},Av={class:"unit-name"},Iv={key:4,class:"no-stock-re"},Cv={key:1,class:"no-data"},Lv={__name:"shop",props:{storeList:{type:Array,default:()=>[]},priceKey:{type:Object,default:()=>({})},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(B,{expose:A,emit:o}){const E=b(null),V=o,j=b(""),x=()=>{V("loadMore",{store_name:j.value})},X=y=>{if(y.is_lack==1)return Fe.warning("该商品缺货中,请购买其他商品");V("changeItem",{product_id:y.product_id,cart_num:y.batch})},pn=ov.throttle(()=>{let y={store_name:j.value};V("getStoreList",y,!0)},300);A({name:j,inputBlur:()=>{var y;(y=E.value)==null||y.blur()}});const rn=b(!1),W=()=>{rn.value=!0},Cn=()=>{rn.value=!1},H=()=>{var y;(y=E.value)==null||y.focus()};return Dt(()=>{hu(()=>{var y;(y=E.value)==null||y.focus(),W()}),re.on("shift",H)}),Nt(()=>{re.off("shift",H)}),(y,nn)=>{const F=tn("CircleClose"),k=tn("el-icon"),an=tn("el-input"),cn=tn("Search"),on=tn("el-button"),hn=tn("el-image"),Z=tn("el-space"),O=tn("el-empty"),vn=Ut("loading"),U=Ut("infinite-scroll");return $(),Q("div",lv,[v("div",{class:Ur(["header-nav",{"input-focus":rn.value}])},[fv,v("div",av,[G(an,{modelValue:j.value,"onUpdate:modelValue":nn[1]||(nn[1]=R=>j.value=R),placeholder:"搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",ref_key:"codeRef",ref:E,onFocus:W,onBlur:Cn,onKeyup:Jo(Br(pn),["enter"]),onClear:Br(pn),style:{"font-size":"1rem"}},{suffix:_n(()=>[j.value!=""?($(),ae(k,{key:0,size:"28",onClick:nn[0]||(nn[0]=R=>j.value=""),style:{cursor:"pointer","margin-right":"1rem"}},{default:_n(()=>[G(F)]),_:1})):te("",!0)]),_:1},8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:nn[2]||(nn[2]=(...R)=>Br(pn)&&Br(pn)(...R))},[G(on,{class:"btn",type:"primary"},{default:_n(()=>[G(k,null,{default:_n(()=>[G(cn)]),_:1})]),_:1})])],2),_u(($(),Q("div",cv,[B.storeList.length?($(),ae(Z,{key:0,wrap:"",size:14},{default:_n(()=>[($(!0),Q(Ft,null,Mt(B.storeList,(R,Tn)=>($(),Q("div",{class:"shop-item",key:Tn,onClick:On=>X(R)},[G(hn,{loading:"lazy",src:R.image},null,8,["src"]),v("div",_v,D(R.store_name),1),R.store_info!=""?($(),Q("div",dv,"规格:"+D(R.store_info),1)):te("",!0),B.priceKey.off_activity==1?($(),Q("div",pv,[gv,sn(" ¥"),v("span",null,D(R[B.priceKey.price]),1),R.unit_name?($(),Q("span",vv,"/"+D(R.unit_name),1)):te("",!0)])):te("",!0),B.priceKey.off_activity==1?($(),Q("div",mv,[yv,sn(),v("span",wv,"¥"+D(R[B.priceKey.op_price])+" /"+D(R.unit_name),1)])):($(),Q("div",xv,[sn(" ¥"),v("span",null,D(R[B.priceKey.price]),1),v("span",Av,"/"+D(R.unit_name),1)])),R.tag!=""?($(),Q("div",Iv,[v("div",null,[v("span",null,D(R.tag),1)])])):te("",!0)],8,hv))),128))]),_:1})):te("",!0),B.storeList.length?te("",!0):($(),Q("div",Cv,[G(O,{"image-size":200,description:"没有找到对应商品"})]))])),[[vn,B.loading],[U,x]])])}}},Sv=ht(Lv,[["__scopeId","data-v-b1bc33a8"]]),Qo=B=>(du("data-v-5707a0cd"),B=B(),pu(),B),Rv={class:"shop"},bv={class:"shop-info"},Ev={class:"shop-info-left"},Tv={class:"shop-info-right"},Ov={class:"shop-info-right-top"},Pv={key:0,class:"shop-info-right-price"},$v=Qo(()=>v("span",{class:"unit-name"},"商户价:",-1)),Bv={key:0,class:"unit-name"},Wv={key:1,class:"shop-info-right-price"},Uv=Qo(()=>v("span",{class:"unit-name"},"原价: ",-1)),Fv={class:"unit-name del"},Mv={key:2,class:"shop-info-right-price"},Dv={class:"unit-name"},Nv={class:"shop-sku"},Gv={class:"title"},Kv={class:"sku"},Hv={class:"dialog-footer"},zv={__name:"pupop",props:{priceKey:{type:Object,default:()=>({})}},emits:["changeItem"],setup(B,{expose:A,emit:o}){const E=b(!1),V=b(null),j=H=>{E.value=H},x=b({}),X=b(!1),pn=b("add"),fn=(H,y="add")=>{pn.value=y,x.value=JSON.parse(JSON.stringify(H))},rn=o,W=()=>{x.value.cart_num||(x.value.cart_num=x.value.batch>0?x.value.batch:1),rn("changeItem",x.value),E.value=!1};A({show:j,setForm:fn});const Cn=()=>{E.value&&W()};return Dt(()=>{re.on("enter",Cn)}),Nt(()=>{re.off("enter",Cn)}),(H,y)=>{const nn=tn("el-image"),F=tn("el-input-number"),k=tn("el-button"),an=tn("el-dialog"),cn=Ut("loading");return $(),ae(an,{modelValue:E.value,"onUpdate:modelValue":y[1]||(y[1]=on=>E.value=on),title:"购买数量",width:"650",onOpened:y[2]||(y[2]=on=>V.value.focus())},Vp({default:_n(()=>[_u(($(),Q("div",Rv,[v("div",bv,[v("div",Ev,[G(nn,{loading:"lazy",src:x.value.image},null,8,["src"])]),v("div",Tv,[v("div",Ov,D(x.value.store_name),1),v("div",null,[B.priceKey.off_activity==1?($(),Q("div",Pv,[$v,sn(" ¥"),v("span",null,D(x.value[B.priceKey.price]),1),x.value.unit_name?($(),Q("span",Bv,"/"+D(x.value.unit_name),1)):te("",!0)])):te("",!0),B.priceKey.off_activity==1?($(),Q("div",Wv,[Uv,sn(),v("span",Fv,"¥"+D(x.value[B.priceKey.op_price])+" /"+D(x.value.unit_name),1)])):($(),Q("div",Mv,[sn(" ¥"),v("span",null,D(x.value[B.priceKey.price]),1),v("span",Dv,"/"+D(x.value.unit_name),1)]))])])]),v("div",Nv,[v("div",Gv,"购买数量 ( "+D(x.value.unit_name)+" )",1),v("div",Kv,[G(F,{ref_key:"inputRef",ref:V,modelValue:x.value.cart_num,"onUpdate:modelValue":y[0]||(y[0]=on=>x.value.cart_num=on),placeholder:`请输入数量(默认为${+x.value.batch>0?x.value.batch:"1"})`,min:+x.value.batch>0?+x.value.batch:.1,"step-strictly":"",step:.1,style:{width:"20rem"},precision:2,size:"large"},null,8,["modelValue","placeholder","min"])])])])),[[cn,X.value]])]),_:2},[pn.value!="add"&&x.value.attr&&x.value.attr.length==1?void 0:{name:"footer",fn:_n(()=>[v("div",Hv,[G(k,{class:"ok-btn",type:"primary",onClick:W},{default:_n(()=>[sn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},kv=ht(zv,[["__scopeId","data-v-5707a0cd"]]),qv=["onClick","onMousemove"],Vv=["onMousemove"],Zv={class:"title"},Yv={class:"list"},Xv=["onClick"],Jv={__name:"classify",emits:["getStoreList"],setup(B,{emit:A}){const o=A,E=b([]),V=b([]),j=b([]),x=b(-1),X=b(-1),pn=b(-1),fn=b(-1),rn=b(!1),W=Dr();(()=>{au({pid:0,page_no:1,page_size:30,level:1,store_id:W.userInfo.store_id}).then(F=>{E.value=F.data.lists,x.value=-1})})();const H=F=>{au({pid:F,page_no:1,page_size:30,level:2,store_id:W.userInfo.store_id}).then(k=>{V.value=k.data.lists})},y=F=>{au({pid:F,page_no:1,page_size:30,level:3,store_id:W.userInfo.store_id}).then(k=>{j.value=k.data.lists})},nn=(F=-1,k=1)=>{fn.value=F,rn.value=!0;let an="";console.log(F,k),k==1?(x.value=F,X.value=-1,pn.value=-1,F!=-1&&(an=E.value[F].id),H(an),o("getStoreList",{top_cate_id:an,two_cate_id:null},!0)):k==2&&(X.value=F,pn.value=-1,F!=-1&&(an=V.value[F].id),y(an),o("getStoreList",{two_cate_id:an},!0))};return(F,k)=>{const an=tn("el-popover");return $(),Q("div",{class:"classify",onMouseout:k[2]||(k[2]=cn=>rn.value?rn.value=!1:rn.value=!0)},[v("div",{class:Ur(["itemP",{"itemP-active":x.value==-1}]),onClick:k[0]||(k[0]=cn=>nn(-1))},D("全部"),2),($(!0),Q(Ft,null,Mt(E.value,(cn,on)=>($(),ae(an,{placement:"left",width:"20rem",trigger:"click",key:on,visible:on==x.value&&fn.value==on},{reference:_n(()=>[v("div",{class:Ur(["itemP",{"itemP-active":on==x.value}]),onClick:hn=>nn(on),onMousemove:hn=>fn.value=on},D(cn.name),43,qv)]),default:_n(()=>[v("div",{class:"active-card",onMouseout:k[1]||(k[1]=hn=>fn.value=-1),onMousemove:hn=>fn.value=on},[v("div",Zv,D(cn.name),1),v("div",Yv,[($(!0),Q(Ft,null,Mt(V.value,(hn,Z)=>($(),Q("div",{class:Ur({"list-active":Z==X.value}),link:"",type:"primary",key:hn.id,onClick:O=>nn(Z,2)},D(hn.name),11,Xv))),128))])],40,Vv)]),_:2},1032,["visible"]))),128))],32)}}},Qv=ht(Jv,[["__scopeId","data-v-4d5623b0"]]),Mr=class Mr{constructor(){fu(this,"loadingInstance",null)}static getInstance(){return this.instance??(this.instance=new Mr)}msg(A){Fe.info(A)}msgError(A){A!=="Network Error"&&Fe.error(A)}msgSuccess(A){Fe.success(A)}msgWarning(A){Fe.warning(A)}alert(A){ct.alert(A,"系统提示")}alertError(A){ct.alert(A,"系统提示",{type:"error"})}alertSuccess(A){ct.alert(A,"系统提示",{type:"success"})}alertWarning(A){ct.alert(A,"系统提示",{type:"warning"})}notify(A){Wr.info(A)}notifyError(A){Wr.error(A)}notifySuccess(A){Wr.success(A)}notifyWarning(A){Wr.warning(A)}confirm(A){return ct.confirm(A,"温馨提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"})}prompt(A,o,E){return ct.prompt(A,o,{confirmButtonText:"确定",cancelButtonText:"取消",...E})}loading(A){this.loadingInstance=Zp.service({lock:!0,text:A})}closeLoading(){var A;(A=this.loadingInstance)==null||A.close()}};fu(Mr,"instance",null);let cu=Mr;cu.getInstance();const jv={class:"my-card"},c1={__name:"index",setup(B){const A=b(null),o=b(null),E=b(null),V=b(null),j=b([]),x=Yp({off_activity:"",op_price:"",price:""}),X=Dr(),pn=Xp(),fn=b({page_no:1,page_size:30}),rn=b(!1),W=(O={},vn=!1)=>{var U;fn.value={...fn.value,...O},console.log("===",O,vn),vn&&(j.value=[],fn.value.page_no=1,Cn.value=!1),O.top_cate_id===""&&(fn.value.store_name=null),rn.value=!0,Qp({...fn.value,store_id:(U=X.userInfo)==null?void 0:U.store_id}).then(R=>{var Tn,On;rn.value=!1;for(let Bn in R.data.extend)x[Bn]=R.data.extend[Bn];((On=(Tn=R.data)==null?void 0:Tn.lists)==null?void 0:On.length){Cn.value||W(O)};function y(O){return/^\d+$/.test(O)}const nn=(O,vn="")=>{let U={product_id:O.product_id,cart_num:O.cart_num||1,uid:fn.value.uid||null,type:"inc"};Xo(U).then(R=>{o.value.getList()})},F=(O,vn)=>{nn(O)},k=O=>{A.value.setForm(O,"edit"),A.value.show(!0)},an=b({}),cn=async()=>{var R,Tn;let O=o.value.list.map(On=>On.id),vn={cart_id:O,uid:((Tn=(R=o.value)==null?void 0:R.userInfo)==null?void 0:Tn.uid)||""},{data:U}=await zp(vn);o.value.discounts>0&&(vn.deduction_price=o.value.discounts.toFixed(2),vn.pay_type="micropay"),kp(vn).then(On=>{var Bn,ce,Ve;an.value=On.data.order,V.value.setForm({data:On.data.order,reservation:U.reservation,cart_id:O,uid:((ce=(Bn=o.value)==null?void 0:Bn.userInfo)==null?void 0:ce.uid)||"",is_storage:(Ve=o.value)!=null&&Ve.is_storage?1:0})}),V.value.drawer=!0},on=()=>{var O,vn,U;if((O=o.value)!=null&&O.is_storage&&!((U=(vn=o.value)==null?void 0:vn.userInfo)!=null&&U.uid))return Fe.error("选择用户才可以存货");cn()},hn=(O=null)=>{setTimeout(()=>{o.value.resetView()})},Z=()=>{pn.name=="saleHome"&&(!V.value.drawer&&o.value.list.length>0?on():V.value.beforeClose())};return Dt(()=>{W(),re.on("F9",Z)}),Nt(()=>{re.off("F9",Z)}),(O,vn)=>($(),Q("div",jv,[G(uv,{ref_key:"orderRef",ref:o,onGoPay:on,onEditPupop:k,onGetStoreList:W},null,512),G(Yo),G(Sv,{ref_key:"shopRef",ref:E,style:{flex:"1"},storeList:j.value,priceKey:x,loading:rn.value,onGetStoreList:W,onChangeItem:F,onLoadMore:H},null,8,["storeList","priceKey","loading"]),G(kv,{ref_key:"pupopRef",ref:A,priceKey:x,onChangeItem:nn},null,8,["priceKey"]),G(Yo),G(Qv,{ref:"classifyRef",onGetStoreList:W},null,512),G(jp,{ref_key:"payRef",ref:V,onPaySuccess:hn},null,512)]))}};export{c1 as default}; +}`;var N=qo(function(){return en(s,I+"return "+g).apply(o,l)});if(N.source=g,Qi(N))throw N;return N}function Vd(n){return un(n).toLowerCase()}function Zd(n){return un(n).toUpperCase()}function Yd(n,e,t){if(n=un(n),n&&(t||e===o))return ns(n);if(!n||!(e=zn(e)))return n;var r=se(n),i=se(e),s=es(r,i),l=ts(r,i)+1;return We(r,s,l).join("")}function Xd(n,e,t){if(n=un(n),n&&(t||e===o))return n.slice(0,is(n)+1);if(!n||!(e=zn(e)))return n;var r=se(n),i=ts(r,se(e))+1;return We(r,0,i).join("")}function Jd(n,e,t){if(n=un(n),n&&(t||e===o))return n.replace(Qr,"");if(!n||!(e=zn(e)))return n;var r=se(n),i=es(r,se(e));return We(r,i).join("")}function Qd(n,e){var t=R,r=Tn;if(wn(e)){var i="separator"in e?e.separator:i;t="length"in e?M(e.length):t,r="omission"in e?zn(e.omission):r}n=un(n);var s=n.length;if(je(n)){var l=se(n);s=l.length}if(t>=s)return n;var f=t-nt(r);if(f<1)return r;var c=l?We(l,0,f).join(""):n.slice(0,f);if(i===o)return c+r;if(l&&(f+=c.length-f),ji(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=pi(i.source,un(Au.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var g=d.index;c=c.slice(0,g===o?f:g)}}else if(n.indexOf(zn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function jd(n){return n=un(n),n&&fl.test(n)?n.replace(yu,Ef):n}var np=ot(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),tu=qs("toUpperCase");function ko(n,e,t){return n=un(n),e=t?o:e,e===o?If(n)?Of(n):df(n):n.match(e)||[]}var qo=K(function(n,e){try{return Kn(n,o,e)}catch(t){return Qi(t)?t:new T(t)}}),ep=Ae(function(n,e){return Yn(e,function(t){t=pe(t),we(n,t,Xi(n[t],n))}),n});function tp(n){var e=n==null?0:n.length,t=C();return n=e?yn(n,function(r){if(typeof r[1]!="function")throw new Xn(x);return[t(r[0]),r[1]]}):[],K(function(r){for(var i=-1;++ihe)return[];var t=J,r=Pn(n,J);e=C(e),n-=J;for(var i=hi(r,e);++t0||e<0)?new q(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=M(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},q.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},q.prototype.toArray=function(){return this.take(J)},_e(q.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],s=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,f=r?[1]:arguments,c=l instanceof q,d=f[0],p=c||P(l),g=function(z){var Y=i.apply(u,be([z],f));return r&&m?Y[0]:Y};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var m=this.__chain__,I=!!this.__actions__.length,L=s&&!m,N=c&&!I;if(!s&&p){l=N?l:new q(this);var S=n.apply(l,f);return S.__actions__.push({func:Sr,args:[g],thisArg:o}),new Jn(S,m)}return L&&N?n.apply(this,f):(S=this.thru(g),L?r?S.value()[0]:S.value():S)})}),Yn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Qt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var s=this.value();return e.apply(P(s)?s:[],i)}return this[t](function(l){return e.apply(P(l)?l:[],i)})}}),_e(q.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";ln.call(it,r)||(it[r]=[]),it[r].push({name:e,func:t})}}),it[yr(o,k).name]=[{name:"wrapper",func:o}],q.prototype.clone=jf,q.prototype.reverse=na,q.prototype.value=ea,u.prototype.at=Th,u.prototype.chain=Oh,u.prototype.commit=Ph,u.prototype.next=$h,u.prototype.plant=Wh,u.prototype.reverse=Uh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Fh,u.prototype.first=u.prototype.head,xt&&(u.prototype[xt]=Bh),u},et=Pf();Me?((Me.exports=et)._=et,ii._=et):En._=et}).call(Wt)})(Fr,Fr.exports);var sv=Fr.exports;const ov=qp(sv),gu=B=>(du("data-v-1ef8e327"),B=B(),pu(),B),lv={class:"my-order"},fv=gu(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),av={class:"nav-item-input"},cv={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},hv=["onClick"],_v={class:"shop-name"},dv={key:0,class:""},pv={key:1,class:"shop-price"},gv=gu(()=>v("span",{class:"unit-name"},"商户价:",-1)),vv={key:0,class:"unit-name"},mv={key:2,class:"shop-price"},yv=gu(()=>v("span",{class:"unit-name"},"原价: ",-1)),wv={class:"unit-name del"},xv={key:3,class:"shop-price"},Av={class:"unit-name"},Iv={key:4,class:"no-stock-re"},Cv={key:1,class:"no-data"},Lv={__name:"shop",props:{storeList:{type:Array,default:()=>[]},priceKey:{type:Object,default:()=>({})},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(B,{expose:A,emit:o}){const b=E(null),V=o,j=E(""),x=()=>{V("loadMore",{store_name:j.value})},X=y=>{if(y.is_lack==1)return Fe.warning("该商品缺货中,请购买其他商品");V("changeItem",{product_id:y.product_id,cart_num:y.batch})},pn=ov.throttle(()=>{let y={store_name:j.value};V("getStoreList",y,!0)},300);A({name:j,inputBlur:()=>{var y;(y=b.value)==null||y.focus()}});const rn=E(!1),W=()=>{rn.value=!0},Cn=()=>{rn.value=!1},H=()=>{var y;(y=b.value)==null||y.focus()};return Dt(()=>{hu(()=>{var y;(y=b.value)==null||y.focus(),W()}),re.on("shift",H)}),Nt(()=>{re.off("shift",H)}),(y,nn)=>{const F=tn("CircleClose"),k=tn("el-icon"),an=tn("el-input"),cn=tn("Search"),on=tn("el-button"),hn=tn("el-image"),Z=tn("el-space"),O=tn("el-empty"),vn=Ut("loading"),U=Ut("infinite-scroll");return $(),Q("div",lv,[v("div",{class:Ur(["header-nav",{"input-focus":rn.value}])},[fv,v("div",av,[G(an,{modelValue:j.value,"onUpdate:modelValue":nn[1]||(nn[1]=R=>j.value=R),placeholder:"搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",ref_key:"codeRef",ref:b,onFocus:W,onBlur:Cn,onKeyup:Jo(Br(pn),["enter"]),onClear:Br(pn),style:{"font-size":"1rem"}},{suffix:_n(()=>[j.value!=""?($(),ae(k,{key:0,size:"28",onClick:nn[0]||(nn[0]=R=>j.value=""),style:{cursor:"pointer","margin-right":"1rem"}},{default:_n(()=>[G(F)]),_:1})):te("",!0)]),_:1},8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:nn[2]||(nn[2]=(...R)=>Br(pn)&&Br(pn)(...R))},[G(on,{class:"btn",type:"primary"},{default:_n(()=>[G(k,null,{default:_n(()=>[G(cn)]),_:1})]),_:1})])],2),_u(($(),Q("div",cv,[B.storeList.length?($(),ae(Z,{key:0,wrap:"",size:14},{default:_n(()=>[($(!0),Q(Ft,null,Mt(B.storeList,(R,Tn)=>($(),Q("div",{class:"shop-item",key:Tn,onClick:On=>X(R)},[G(hn,{loading:"lazy",src:R.image},null,8,["src"]),v("div",_v,D(R.store_name),1),R.store_info!=""?($(),Q("div",dv,"规格:"+D(R.store_info),1)):te("",!0),B.priceKey.off_activity==1?($(),Q("div",pv,[gv,sn(" ¥"),v("span",null,D(R[B.priceKey.price]),1),R.unit_name?($(),Q("span",vv,"/"+D(R.unit_name),1)):te("",!0)])):te("",!0),B.priceKey.off_activity==1?($(),Q("div",mv,[yv,sn(),v("span",wv,"¥"+D(R[B.priceKey.op_price])+" /"+D(R.unit_name),1)])):($(),Q("div",xv,[sn(" ¥"),v("span",null,D(R[B.priceKey.price]),1),v("span",Av,"/"+D(R.unit_name),1)])),R.tag!=""?($(),Q("div",Iv,[v("div",null,[v("span",null,D(R.tag),1)])])):te("",!0)],8,hv))),128))]),_:1})):te("",!0),B.storeList.length?te("",!0):($(),Q("div",Cv,[G(O,{"image-size":200,description:"没有找到对应商品"})]))])),[[vn,B.loading],[U,x]])])}}},Sv=ht(Lv,[["__scopeId","data-v-1ef8e327"]]),Qo=B=>(du("data-v-5707a0cd"),B=B(),pu(),B),Rv={class:"shop"},Ev={class:"shop-info"},bv={class:"shop-info-left"},Tv={class:"shop-info-right"},Ov={class:"shop-info-right-top"},Pv={key:0,class:"shop-info-right-price"},$v=Qo(()=>v("span",{class:"unit-name"},"商户价:",-1)),Bv={key:0,class:"unit-name"},Wv={key:1,class:"shop-info-right-price"},Uv=Qo(()=>v("span",{class:"unit-name"},"原价: ",-1)),Fv={class:"unit-name del"},Mv={key:2,class:"shop-info-right-price"},Dv={class:"unit-name"},Nv={class:"shop-sku"},Gv={class:"title"},Kv={class:"sku"},Hv={class:"dialog-footer"},zv={__name:"pupop",props:{priceKey:{type:Object,default:()=>({})}},emits:["changeItem"],setup(B,{expose:A,emit:o}){const b=E(!1),V=E(null),j=H=>{b.value=H},x=E({}),X=E(!1),pn=E("add"),fn=(H,y="add")=>{pn.value=y,x.value=JSON.parse(JSON.stringify(H))},rn=o,W=()=>{x.value.cart_num||(x.value.cart_num=x.value.batch>0?x.value.batch:1),rn("changeItem",x.value),b.value=!1};A({show:j,setForm:fn});const Cn=()=>{b.value&&W()};return Dt(()=>{re.on("enter",Cn)}),Nt(()=>{re.off("enter",Cn)}),(H,y)=>{const nn=tn("el-image"),F=tn("el-input-number"),k=tn("el-button"),an=tn("el-dialog"),cn=Ut("loading");return $(),ae(an,{modelValue:b.value,"onUpdate:modelValue":y[1]||(y[1]=on=>b.value=on),title:"购买数量",width:"650",onOpened:y[2]||(y[2]=on=>V.value.focus())},Vp({default:_n(()=>[_u(($(),Q("div",Rv,[v("div",Ev,[v("div",bv,[G(nn,{loading:"lazy",src:x.value.image},null,8,["src"])]),v("div",Tv,[v("div",Ov,D(x.value.store_name),1),v("div",null,[B.priceKey.off_activity==1?($(),Q("div",Pv,[$v,sn(" ¥"),v("span",null,D(x.value[B.priceKey.price]),1),x.value.unit_name?($(),Q("span",Bv,"/"+D(x.value.unit_name),1)):te("",!0)])):te("",!0),B.priceKey.off_activity==1?($(),Q("div",Wv,[Uv,sn(),v("span",Fv,"¥"+D(x.value[B.priceKey.op_price])+" /"+D(x.value.unit_name),1)])):($(),Q("div",Mv,[sn(" ¥"),v("span",null,D(x.value[B.priceKey.price]),1),v("span",Dv,"/"+D(x.value.unit_name),1)]))])])]),v("div",Nv,[v("div",Gv,"购买数量 ( "+D(x.value.unit_name)+" )",1),v("div",Kv,[G(F,{ref_key:"inputRef",ref:V,modelValue:x.value.cart_num,"onUpdate:modelValue":y[0]||(y[0]=on=>x.value.cart_num=on),placeholder:`请输入数量(默认为${+x.value.batch>0?x.value.batch:"1"})`,min:+x.value.batch>0?+x.value.batch:.1,"step-strictly":"",step:.1,style:{width:"20rem"},precision:2,size:"large"},null,8,["modelValue","placeholder","min"])])])])),[[cn,X.value]])]),_:2},[pn.value!="add"&&x.value.attr&&x.value.attr.length==1?void 0:{name:"footer",fn:_n(()=>[v("div",Hv,[G(k,{class:"ok-btn",type:"primary",onClick:W},{default:_n(()=>[sn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},kv=ht(zv,[["__scopeId","data-v-5707a0cd"]]),qv=["onClick","onMousemove"],Vv=["onMousemove"],Zv={class:"title"},Yv={class:"list"},Xv=["onClick"],Jv={__name:"classify",emits:["getStoreList"],setup(B,{emit:A}){const o=A,b=E([]),V=E([]),j=E([]),x=E(-1),X=E(-1),pn=E(-1),fn=E(-1),rn=E(!1),W=Dr();(()=>{au({pid:0,page_no:1,page_size:30,level:1,store_id:W.userInfo.store_id}).then(F=>{b.value=F.data.lists,x.value=-1})})();const H=F=>{au({pid:F,page_no:1,page_size:30,level:2,store_id:W.userInfo.store_id}).then(k=>{V.value=k.data.lists})},y=F=>{au({pid:F,page_no:1,page_size:30,level:3,store_id:W.userInfo.store_id}).then(k=>{j.value=k.data.lists})},nn=(F=-1,k=1)=>{fn.value=F,rn.value=!0;let an="";console.log(F,k),k==1?(x.value=F,X.value=-1,pn.value=-1,F!=-1&&(an=b.value[F].id),H(an),o("getStoreList",{top_cate_id:an,two_cate_id:null},!0)):k==2&&(X.value=F,pn.value=-1,F!=-1&&(an=V.value[F].id),y(an),o("getStoreList",{two_cate_id:an},!0))};return(F,k)=>{const an=tn("el-popover");return $(),Q("div",{class:"classify",onMouseout:k[2]||(k[2]=cn=>rn.value?rn.value=!1:rn.value=!0)},[v("div",{class:Ur(["itemP",{"itemP-active":x.value==-1}]),onClick:k[0]||(k[0]=cn=>nn(-1))},D("全部"),2),($(!0),Q(Ft,null,Mt(b.value,(cn,on)=>($(),ae(an,{placement:"left",width:"20rem",trigger:"click",key:on,visible:on==x.value&&fn.value==on},{reference:_n(()=>[v("div",{class:Ur(["itemP",{"itemP-active":on==x.value}]),onClick:hn=>nn(on),onMousemove:hn=>fn.value=on},D(cn.name),43,qv)]),default:_n(()=>[v("div",{class:"active-card",onMouseout:k[1]||(k[1]=hn=>fn.value=-1),onMousemove:hn=>fn.value=on},[v("div",Zv,D(cn.name),1),v("div",Yv,[($(!0),Q(Ft,null,Mt(V.value,(hn,Z)=>($(),Q("div",{class:Ur({"list-active":Z==X.value}),link:"",type:"primary",key:hn.id,onClick:O=>nn(Z,2)},D(hn.name),11,Xv))),128))])],40,Vv)]),_:2},1032,["visible"]))),128))],32)}}},Qv=ht(Jv,[["__scopeId","data-v-4d5623b0"]]),Mr=class Mr{constructor(){fu(this,"loadingInstance",null)}static getInstance(){return this.instance??(this.instance=new Mr)}msg(A){Fe.info(A)}msgError(A){A!=="Network Error"&&Fe.error(A)}msgSuccess(A){Fe.success(A)}msgWarning(A){Fe.warning(A)}alert(A){ct.alert(A,"系统提示")}alertError(A){ct.alert(A,"系统提示",{type:"error"})}alertSuccess(A){ct.alert(A,"系统提示",{type:"success"})}alertWarning(A){ct.alert(A,"系统提示",{type:"warning"})}notify(A){Wr.info(A)}notifyError(A){Wr.error(A)}notifySuccess(A){Wr.success(A)}notifyWarning(A){Wr.warning(A)}confirm(A){return ct.confirm(A,"温馨提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"})}prompt(A,o,b){return ct.prompt(A,o,{confirmButtonText:"确定",cancelButtonText:"取消",...b})}loading(A){this.loadingInstance=Zp.service({lock:!0,text:A})}closeLoading(){var A;(A=this.loadingInstance)==null||A.close()}};fu(Mr,"instance",null);let cu=Mr;cu.getInstance();const jv={class:"my-card"},c1={__name:"index",setup(B){const A=E(null),o=E(null),b=E(null),V=E(null),j=E([]),x=Yp({off_activity:"",op_price:"",price:""}),X=Dr(),pn=Xp(),fn=E({page_no:1,page_size:30}),rn=E(!1),W=(O={},vn=!1)=>{var U;fn.value={...fn.value,...O},console.log("===",O,vn),vn&&(j.value=[],fn.value.page_no=1,Cn.value=!1),O.top_cate_id===""&&(fn.value.store_name=null),rn.value=!0,Qp({...fn.value,store_id:(U=X.userInfo)==null?void 0:U.store_id}).then(R=>{var Tn,On;rn.value=!1;for(let Bn in R.data.extend)x[Bn]=R.data.extend[Bn];((On=(Tn=R.data)==null?void 0:Tn.lists)==null?void 0:On.length){Cn.value||W(O)};function y(O){return/^\d+$/.test(O)}const nn=(O,vn="")=>{let U={product_id:O.product_id,cart_num:O.cart_num||1,uid:fn.value.uid||null,type:"inc"};Xo(U).then(R=>{o.value.getList()})},F=(O,vn)=>{nn(O)},k=O=>{A.value.setForm(O,"edit"),A.value.show(!0)},an=E({}),cn=async()=>{var R,Tn;let O=o.value.list.map(On=>On.id),vn={cart_id:O,uid:((Tn=(R=o.value)==null?void 0:R.userInfo)==null?void 0:Tn.uid)||""},{data:U}=await zp(vn);o.value.discounts>0&&(vn.deduction_price=o.value.discounts.toFixed(2),vn.pay_type="micropay"),kp(vn).then(On=>{var Bn,ce,Ve;an.value=On.data.order,V.value.setForm({data:On.data.order,reservation:U.reservation,cart_id:O,uid:((ce=(Bn=o.value)==null?void 0:Bn.userInfo)==null?void 0:ce.uid)||"",is_storage:(Ve=o.value)!=null&&Ve.is_storage?1:0})}),V.value.drawer=!0},on=()=>{var O,vn,U;if((O=o.value)!=null&&O.is_storage&&!((U=(vn=o.value)==null?void 0:vn.userInfo)!=null&&U.uid))return Fe.error("选择用户才可以存货");cn()},hn=(O=null)=>{setTimeout(()=>{o.value.resetView()})},Z=()=>{pn.name=="saleHome"&&(!V.value.drawer&&o.value.list.length>0?on():V.value.beforeClose())};return Dt(()=>{W(),re.on("F9",Z)}),Nt(()=>{re.off("F9",Z)}),(O,vn)=>($(),Q("div",jv,[G(uv,{ref_key:"orderRef",ref:o,onGoPay:on,onEditPupop:k,onGetStoreList:W},null,512),G(Yo),G(Sv,{ref_key:"shopRef",ref:b,style:{flex:"1"},storeList:j.value,priceKey:x,loading:rn.value,onGetStoreList:W,onChangeItem:F,onLoadMore:H},null,8,["storeList","priceKey","loading"]),G(kv,{ref_key:"pupopRef",ref:A,priceKey:x,onChangeItem:nn},null,8,["priceKey"]),G(Yo),G(Qv,{ref:"classifyRef",onGetStoreList:W},null,512),G(jp,{ref_key:"payRef",ref:V,onPaySuccess:hn},null,512)]))}};export{c1 as default}; diff --git a/dist/assets/index-BWKNHFxA.js b/dist/assets/index-xN5UowRa.js similarity index 98% rename from dist/assets/index-BWKNHFxA.js rename to dist/assets/index-xN5UowRa.js index 0bbc6d0..c124f84 100644 --- a/dist/assets/index-BWKNHFxA.js +++ b/dist/assets/index-xN5UowRa.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-C3HwVIuf.js";import{d as ne,f as de}from"./store-B0fbVdy5.js";import{h as A}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as _e}from"./padding-C3oG-cSE.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-b30acb5e"),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.total_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-b30acb5e"]]),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-B2rt9Xnd.js";import{d as ne,f as de}from"./store-BJuQ4A3H.js";import{h as A}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as _e}from"./padding-DSO_pR_4.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-b30acb5e"),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.total_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-b30acb5e"]]),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/padding-C3oG-cSE.js b/dist/assets/padding-DSO_pR_4.js similarity index 65% rename from dist/assets/padding-C3oG-cSE.js rename to dist/assets/padding-DSO_pR_4.js index beb9b40..cbb4ece 100644 --- a/dist/assets/padding-C3oG-cSE.js +++ b/dist/assets/padding-DSO_pR_4.js @@ -1 +1 @@ -import{_ as e,c as t,k as c}from"./index-C3HwVIuf.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-B2rt9Xnd.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-p0l28gLY.js b/dist/assets/pay-CjxUscAC.js similarity index 98% rename from dist/assets/pay-p0l28gLY.js rename to dist/assets/pay-CjxUscAC.js index 1b8fa6b..14f9be8 100644 --- a/dist/assets/pay-p0l28gLY.js +++ b/dist/assets/pay-CjxUscAC.js @@ -1 +1 @@ -import{_ as ye,r as o,u as me,J as ge,o as ke,m,a as he,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 r,q as $e,s as Ve}from"./index-C3HwVIuf.js";import{h as K,i as Se,j as Pe,k as Ee}from"./store-B0fbVdy5.js";import{_ as Fe}from"./authCode-Bkx2NvqR.js";/* empty css */const V=L=>($e("data-v-51aa72fd"),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(""),k=o("");me(),o(0);const P=a=>{Ee({id:a}).then(e=>{m.emit("letPrintReceipt",e.data)})},te=()=>{y()},le=()=>{R(()=>{setTimeout(()=>{var a;h.value=!1,i.value="",M.value=!0,(a=k.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=k.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(h.value=!0,k.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 h.value=!1,i.value="",k.value.focus(),r.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,r({message:"支付成功",type:"success"}),y(e.data),P(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(r.warning(e.msg),m.on("pay_success",l=>{r({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y(l)}))}).catch(e=>{h.value=!1,R(()=>{var l;(l=k.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 h.value=!1,i.value="",k.value.focus(),r.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,r({message:"支付成功",type:"success"}),P(e.data.id),y()):e.msg=="用户支付中"&&e.code==1&&(r.warning(e.msg),m.on("pay_success",$=>{r({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y($)}))}).catch(e=>{i.value="",h.value=!1,R(()=>{var l;(l=k.value)==null||l.focus()})})};o(0);const y=a=>{var e;try{window.removeEventListener("keydown",U),M.value=!1,h.value=!1,i.value="",c.value="",b.value=[],(e=k.value)==null||e.blur(),ie("paySuccess",a),v.value=!1}catch{}},h=o(!1);ae({drawer:v,setForm:oe,setRePay:ne,beforeClose:y});const b=o([]),c=o(""),A=ge(()=>+c.value>0?(+c.value-u.value.pay_price).toFixed(2):-1),G=o(!1),N=a=>{a===-1?b.value=[]:b.value.pop(),c.value=b.value.length?b.value.join(""):0},d=a=>{G.value===!1&&(c.value="",G.value=!0);let e=String(c.value).indexOf(".")+1,l=String(c.value).length-e;console.log(e,l),(e===0||l<2)&&(b.value.join("")<=9999999&&b.value.push(a),c.value=b.value.join("")>99999999?99999999:b.value.join(""))},H=()=>{if(A.value===""||A.value===null||A.value===void 0||+c.value<+u.value.pay_price)return r.error("收款金额应该大于等于应收金额");T.value?W():(c.value="",K({cart_id:B.value,pay_type:"17",is_storage:F,reservation:E.value,uid:f.value}).then(a=>{v.value=!1,r({message:a.msg,type:"success"}),P(a.data.id),t.value=1,y()}).catch(a=>{h.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 r.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=>{r({message:"发送成功",type:"success"})})},I=o(""),Q=()=>{if(!f.value)return r.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,r({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 ke(()=>{m.on("left",X),m.on("right",Y)}),he(()=>{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:k,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,h.value]]):t.value==2?(_(),w("div",He,[s("div",Qe,[s("div",Xe,[s("div",Ye,[c.value?(_(),w("span",Ze,S(c.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":+c.value<+u.value.pay_price}]),disabled:+c.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"])}}},ha=ye(pa,[["__scopeId","data-v-51aa72fd"]]);export{ha as p}; +import{_ as ye,r as o,u as me,J as ge,o as ke,m,a as he,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 r,q as $e,s as Ve}from"./index-B2rt9Xnd.js";import{h as K,i as Se,j as Pe,k as Ee}from"./store-BJuQ4A3H.js";import{_ as Fe}from"./authCode-BUZTOdZ4.js";/* empty css */const V=L=>($e("data-v-51aa72fd"),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(""),k=o("");me(),o(0);const P=a=>{Ee({id:a}).then(e=>{m.emit("letPrintReceipt",e.data)})},te=()=>{y()},le=()=>{R(()=>{setTimeout(()=>{var a;h.value=!1,i.value="",M.value=!0,(a=k.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=k.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(h.value=!0,k.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 h.value=!1,i.value="",k.value.focus(),r.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,r({message:"支付成功",type:"success"}),y(e.data),P(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(r.warning(e.msg),m.on("pay_success",l=>{r({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y(l)}))}).catch(e=>{h.value=!1,R(()=>{var l;(l=k.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 h.value=!1,i.value="",k.value.focus(),r.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,r({message:"支付成功",type:"success"}),P(e.data.id),y()):e.msg=="用户支付中"&&e.code==1&&(r.warning(e.msg),m.on("pay_success",$=>{r({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{m.off("pay_success")},200),v.value=!1,y($)}))}).catch(e=>{i.value="",h.value=!1,R(()=>{var l;(l=k.value)==null||l.focus()})})};o(0);const y=a=>{var e;try{window.removeEventListener("keydown",U),M.value=!1,h.value=!1,i.value="",c.value="",b.value=[],(e=k.value)==null||e.blur(),ie("paySuccess",a),v.value=!1}catch{}},h=o(!1);ae({drawer:v,setForm:oe,setRePay:ne,beforeClose:y});const b=o([]),c=o(""),A=ge(()=>+c.value>0?(+c.value-u.value.pay_price).toFixed(2):-1),G=o(!1),N=a=>{a===-1?b.value=[]:b.value.pop(),c.value=b.value.length?b.value.join(""):0},d=a=>{G.value===!1&&(c.value="",G.value=!0);let e=String(c.value).indexOf(".")+1,l=String(c.value).length-e;console.log(e,l),(e===0||l<2)&&(b.value.join("")<=9999999&&b.value.push(a),c.value=b.value.join("")>99999999?99999999:b.value.join(""))},H=()=>{if(A.value===""||A.value===null||A.value===void 0||+c.value<+u.value.pay_price)return r.error("收款金额应该大于等于应收金额");T.value?W():(c.value="",K({cart_id:B.value,pay_type:"17",is_storage:F,reservation:E.value,uid:f.value}).then(a=>{v.value=!1,r({message:a.msg,type:"success"}),P(a.data.id),t.value=1,y()}).catch(a=>{h.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 r.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=>{r({message:"发送成功",type:"success"})})},I=o(""),Q=()=>{if(!f.value)return r.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,r({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 ke(()=>{m.on("left",X),m.on("right",Y)}),he(()=>{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:k,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,h.value]]):t.value==2?(_(),w("div",He,[s("div",Qe,[s("div",Xe,[s("div",Ye,[c.value?(_(),w("span",Ze,S(c.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":+c.value<+u.value.pay_price}]),disabled:+c.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"])}}},ha=ye(pa,[["__scopeId","data-v-51aa72fd"]]);export{ha as p}; diff --git a/dist/assets/shop-BkcZJAaI.js b/dist/assets/shop-Bb7RKZzc.js similarity index 73% rename from dist/assets/shop-BkcZJAaI.js rename to dist/assets/shop-Bb7RKZzc.js index 2ccc8a7..b543088 100644 --- a/dist/assets/shop-BkcZJAaI.js +++ b/dist/assets/shop-Bb7RKZzc.js @@ -1 +1 @@ -import{K as s}from"./index-C3HwVIuf.js";import{r}from"./axiosAPI-DDmlkTNA.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-B2rt9Xnd.js";import{r}from"./axiosAPI-Ba6KY3fO.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-B0fbVdy5.js b/dist/assets/store-BJuQ4A3H.js similarity index 95% rename from dist/assets/store-B0fbVdy5.js rename to dist/assets/store-BJuQ4A3H.js index 0e9fc58..bd58022 100644 --- a/dist/assets/store-B0fbVdy5.js +++ b/dist/assets/store-BJuQ4A3H.js @@ -1 +1 @@ -import{K as e}from"./index-C3HwVIuf.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 _(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function g(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})}function h(r){return e.post("/store_order/StoreOrder/noDelivery",r)}export{s as a,o as b,i as c,d,m as e,f,h as g,u as h,c as i,O as j,A as k,_ as l,S as m,l as n,n as o,a as s,p as u,g as w}; +import{K as e}from"./index-B2rt9Xnd.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 _(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function g(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})}function h(r){return e.post("/store_order/StoreOrder/noDelivery",r)}export{s as a,o as b,i as c,d,m as e,f,h as g,u as h,c as i,O as j,A as k,_ as l,S as m,l as n,n as o,a as s,p as u,g as w}; diff --git a/dist/assets/test-D-FiQV_n.js b/dist/assets/test-B8jeWBDU.js similarity index 99% rename from dist/assets/test-D-FiQV_n.js rename to dist/assets/test-B8jeWBDU.js index 9daa9cb..ddcd5b9 100644 --- a/dist/assets/test-D-FiQV_n.js +++ b/dist/assets/test-B8jeWBDU.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-C3HwVIuf.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-B2rt9Xnd.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-lT_1UriU.js b/dist/assets/user-BChXbsnq.js similarity index 91% rename from dist/assets/user-lT_1UriU.js rename to dist/assets/user-BChXbsnq.js index aada4a3..f01db45 100644 --- a/dist/assets/user-lT_1UriU.js +++ b/dist/assets/user-BChXbsnq.js @@ -1 +1 @@ -import{K as r}from"./index-C3HwVIuf.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-B2rt9Xnd.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 4862cea..c95e18b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -56,7 +56,7 @@ } } - + diff --git a/src/views/home/component/shop.vue b/src/views/home/component/shop.vue index 3050ae5..9250760 100644 --- a/src/views/home/component/shop.vue +++ b/src/views/home/component/shop.vue @@ -253,5 +253,4 @@ onUnmounted(() => { } } } - -, nextTick + \ No newline at end of file diff --git a/src/views/saleHome/component/shop.vue b/src/views/saleHome/component/shop.vue index fcb4819..416bd75 100644 --- a/src/views/saleHome/component/shop.vue +++ b/src/views/saleHome/component/shop.vue @@ -50,7 +50,7 @@ const handleEnter = _.throttle(() => { }, 300) const inputBlur = () => { - codeRef.value?.blur(); + codeRef.value?.focus(); } defineExpose({