打包,新增按地区筛选用户
This commit is contained in:
commit
2fa53da4e2
|
@ -1 +0,0 @@
|
|||
.body[data-v-f9ff2ce9]{width:100vw;height:100vh;box-sizing:border-box;background-image:url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b84ef202404101425077785.png);background-size:100% 100%;background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.body .login[data-v-f9ff2ce9]{width:18rem;background-color:#fff;border-radius:2rem;padding:2rem 3rem}.body .login .title[data-v-f9ff2ce9]{text-align:center;font-size:1.3rem;padding-bottom:2rem;color:#333}
|
|
@ -1 +0,0 @@
|
|||
@charset "UTF-8";.put-storage{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;height:100%;display:flex;flex-direction:column}.put-storage .image{width:4rem;height:4rem}.put-storage .order-lists{flex:1;width:100%}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999}
|
|
@ -1 +0,0 @@
|
|||
@charset "UTF-8";.my-order[data-v-74a6e87a]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-74a6e87a]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-74a6e87a]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-74a6e87a]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-74a6e87a]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-74a6e87a]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-74a6e87a]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-lists .item[data-v-74a6e87a]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-74a6e87a]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-74a6e87a]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-74a6e87a]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #2ec479;color:#2ec479;border-radius:.187rem}.my-order .order-lists .item .top .cahier2[data-v-74a6e87a]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #ff4a00;color:#ff4a00;border-radius:.187rem}.my-order .order-lists .item .top .create-time[data-v-74a6e87a]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-74a6e87a]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-74a6e87a]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-74a6e87a]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-74a6e87a]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-74a6e87a]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-74a6e87a]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-74a6e87a]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-lists .item .bottom[data-v-74a6e87a]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-74a6e87a]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-74a6e87a]{background-color:#efefef}.my-order .load-end[data-v-74a6e87a]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-b5c92dd9]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-b5c92dd9]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-b5c92dd9]{padding:1rem;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-b5c92dd9]{font-weight:700}.my-order .detail .table .table-info[data-v-b5c92dd9]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-b5c92dd9]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-b5c92dd9]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-b5c92dd9]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-b5c92dd9]{position:absolute;bottom:0;left:0;z-index:1;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999}
|
|
@ -1 +0,0 @@
|
|||
@charset "UTF-8";.my-order[data-v-8d729586]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-8d729586]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem}.my-order .header-nav .nav-item[data-v-8d729586]{font-weight:700}.my-order .header-nav span[data-v-8d729586]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-8d729586]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .header-input[data-v-8d729586]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-8d729586]{flex:1;overflow-y:auto}.my-order .order-lists .item[data-v-8d729586]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-8d729586]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-8d729586]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-8d729586]:before{content:"收银";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #2ec479;color:#2ec479;border-radius:.187rem}.my-order .order-lists .item .top .cahier2[data-v-8d729586]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #ff4a00;color:#ff4a00;border-radius:.187rem}.my-order .order-lists .item .top .create-time[data-v-8d729586]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-8d729586]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-8d729586]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-8d729586]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-8d729586]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-8d729586]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-8d729586]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-8d729586]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-lists .item .bottom[data-v-8d729586]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-8d729586]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-8d729586]{background-color:#efefef}.my-order .load-end[data-v-8d729586]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-1950b4ed]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-1950b4ed]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-1950b4ed]{padding:1rem;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-1950b4ed]{font-weight:700}.my-order .detail .table .table-info[data-v-1950b4ed]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-1950b4ed]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-1950b4ed]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-1950b4ed]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-1950b4ed]{position:absolute;bottom:0;left:0;z-index:1;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.my-card{display:flex}.my-card .my-code{height:70%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-card .my-code .box{width:38rem;position:relative}.my-card .my-code .box .input{width:100%;height:3rem;box-sizing:border-box;border-radius:4rem;border:.0625rem solid #1890ff;padding:0 1rem;font-size:1.1rem}.my-card .my-code .box .input:focus{outline:none;box-shadow:0 0 .31rem #1890ff;transition:all .2s ease-in-out}.my-card .my-code .box .btn{position:absolute;right:0;top:0;width:5rem;height:100%;border-radius:0 4rem 4rem 0;background:#1890ff;color:#fff;display:flex;justify-content:center;align-items:center;cursor:pointer}.my-card .my-code .to-list{width:auto;color:#1890ff;font-size:1.1rem;margin-top:3rem;text-align:center;display:flex;align-items:center;cursor:pointer}::-webkit-scrollbar{width:.31rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.31rem}::-webkit-scrollbar-thumb:hover{background-color:#999}
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
@charset "UTF-8";.my-order[data-v-e01d9d71]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-e01d9d71]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:7.5rem}.my-order .header-nav .nav-item[data-v-e01d9d71]{font-weight:700}.my-order .header-nav .nav-body .my-money[data-v-e01d9d71]{padding:.4rem 0;height:4rem}.my-order .header-nav .nav-body .my-money span[data-v-e01d9d71]{font-size:1.5rem;font-weight:700}.my-order .header-nav .nav-body .my-count[data-v-e01d9d71]{height:1.4rem;display:flex;justify-content:space-between;color:#777}.my-order .order-lists[data-v-e01d9d71]{flex:1;overflow-y:auto}.my-order .order-lists .item[data-v-e01d9d71]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .own[data-v-e01d9d71]{font-size:.7rem;padding:.1rem .2rem;background-color:#2ec479;color:#fff;margin-left:1rem;border-radius:.2rem}.my-order .order-lists .item-active[data-v-e01d9d71]{background-color:#efefef}.my-order .order-footer[data-v-e01d9d71]{position:absolute;bottom:0;left:0;width:100%;box-shadow:0 -.0625rem .625rem #eee;background-color:#fff}.my-order .order-footer .input-btn[data-v-e01d9d71]{display:flex;padding:1rem 1.5rem;padding-bottom:0}.my-order .order-footer .input-btn .btn[data-v-e01d9d71]{margin-left:1rem}.my-order .order-footer .order-btn[data-v-e01d9d71]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-e01d9d71]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}input[data-v-e01d9d71]::-webkit-outer-spin-button,input[data-v-e01d9d71]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.my-order[data-v-b27fe34a]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .date[data-v-b27fe34a]{padding:1rem 1rem 0;display:flex;justify-content:space-between}.my-order .detail[data-v-b27fe34a]{height:calc(100vh - 10.25rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-b27fe34a]{padding:1rem 1rem 6rem;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-b27fe34a]{font-weight:700}.my-order .detail .table .table-info[data-v-b27fe34a]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-b27fe34a]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-b27fe34a]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-b27fe34a]{flex-shrink:0;padding-right:1rem}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999}
|
|
@ -1 +0,0 @@
|
|||
@charset "UTF-8";.my-order[data-v-d25755c6]{box-sizing:border-box}.my-order .from[data-v-d25755c6]{width:100%;padding-bottom:1.25rem;display:grid;grid-template-columns:repeat(5,1fr);gap:1.25rem}.my-order .from .form-card[data-v-d25755c6]{border-radius:.8rem;height:5rem;background-color:#fff;font-size:1.3rem;font-weight:700;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-order .from .form-card .tips[data-v-d25755c6]{font-size:.9rem;color:#999;font-weight:400}.my-order .from .red[data-v-d25755c6]{color:#ff4a00}.my-order .from .green[data-v-d25755c6]{color:#01c86f}.my-order .table[data-v-d25755c6]{background-color:#fff;border-radius:1.2rem;box-sizing:border-box;padding:1rem;overflow-y:scroll}[data-v-d25755c6]::-webkit-scrollbar{width:.315rem}[data-v-d25755c6]::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}[data-v-d25755c6]::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}[data-v-d25755c6]::-webkit-scrollbar-thumb:hover{background-color:#999}
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
.dra-body[data-v-a76a4ead]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-a76a4ead]{width:30rem;display:flex}.dra-body .header>div[data-v-a76a4ead]{flex:1;border:.0625rem solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-a76a4ead]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-a76a4ead]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-a76a4ead]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-a76a4ead]{width:100%;height:3rem;font-size:1.2rem}.dra-body .card1 .tips[data-v-a76a4ead]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.dra-body .card3 .codes[data-v-a76a4ead]{width:38rem;display:flex;align-items:center}.dra-body .card3 .codes .code-input[data-v-a76a4ead]{flex:1;height:3rem;font-size:1.2rem}.dra-body .card3 .codes .get-code-btn[data-v-a76a4ead]{height:3rem;margin-left:1rem}.dra-body .card3 .code-pay[data-v-a76a4ead]{margin-top:4rem;width:100%;height:3rem;border-radius:3rem}.cancel-btn[data-v-a76a4ead]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-a76a4ead]{width:100%;overflow-x:hidden}.counter[data-v-a76a4ead]{padding:1.25rem;border-radius:1.25rem;background-color:#f3f9ff}.counter .received[data-v-a76a4ead]{height:3rem;padding:0 1.25rem;border:.0625rem solid #1890ff;box-shadow:0 0 .18rem #1890ff;border-radius:.5rem;background-color:#fff;font-size:1.62rem;line-height:3rem;color:#333}.counter .balance[data-v-a76a4ead]{width:100%;box-sizing:border-box;padding:1.12rem 0 1.12rem .625rem;text-align:start;font-size:.95rem;color:#303133;display:flex;justify-content:space-between}.counter .balance .money[data-v-a76a4ead]{color:#ff4a00}.counter .balance .tips[data-v-a76a4ead]{font-size:.8rem;color:#999}.counter .keypad[data-v-a76a4ead]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:.625rem}.counter .keypad .left[data-v-a76a4ead]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:.625rem}.counter .keypad .right[data-v-a76a4ead]{display:grid;grid-template-columns:auto;grid-gap:.625rem}.counter .keypad .el-button[data-v-a76a4ead]{height:3.875rem;width:8.125rem;margin:0!important;border:0;border-radius:.5rem;font-weight:500;font-size:1.75rem!important;line-height:3.87rem;color:#1890ff}.counter .keypad .el-button[data-v-a76a4ead]:focus{box-shadow:none}.counter .keypad .enter[data-v-a76a4ead]{grid-row-end:span 4;height:8.37rem;line-height:8.37rem;background-color:#1890ff;font-weight:500;font-size:1.35rem!important;color:#fff;position:relative}.counter .keypad .enter-disable[data-v-a76a4ead]{background-color:#ccc}
|
Binary file not shown.
Before Width: | Height: | Size: 215 KiB |
|
@ -1 +0,0 @@
|
|||
#receipt{padding:.625rem .625rem 1.25rem;font-size:.75rem;border:.0625rem solid #ccc;width:12.5rem}
|
|
@ -1 +0,0 @@
|
|||
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31.92 32"><defs><style>.cls-1{fill:#333;fill-opacity:0;}.cls-2,.cls-3{fill:#1890ff;fill-rule:evenodd;isolation:isolate;}.cls-2{opacity:0.8;}</style></defs><title>cashier</title><rect class="cls-1" width="31.92" height="32"/><path class="cls-2" d="M23,12.36,12.28,23.11c-4.83,4.83,2.47,12.13,7.3,7.31L30.33,19.66C35.16,14.83,27.86,7.53,23,12.36Z"/><path class="cls-2" d="M19.64,23.11,8.89,12.36c-4.83-4.83-12.13,2.47-7.31,7.3L12.34,30.42c4.83,4.82,12.13-2.48,7.3-7.31Z"/><path class="cls-3" d="M20.58,11.16,16,15.79l-4.62-4.63a6.21,6.21,0,0,1,0-9.13A6.71,6.71,0,0,1,16,0C20.94.06,25.22,6.52,20.58,11.16Z"/></svg>
|
Before Width: | Height: | Size: 699 B |
BIN
build/order.mp3
BIN
build/order.mp3
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
Before Width: | Height: | Size: 1.5 KiB |
|
@ -99,4 +99,11 @@ export function storeStorageInfoListsApi(data) {
|
|||
*/
|
||||
export function storeStorageInfoEditApi(data) {
|
||||
return request.post('/system_store_storage/systemstorestorage/edit', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 门店库存列表
|
||||
*/
|
||||
export function storeProductListsApi(data) {
|
||||
return request.get('/store_product/storeProduct/lists', { params: data })
|
||||
}
|
|
@ -456,6 +456,7 @@ const handlecodeEnter = () => {
|
|||
if (!uid.value) return ElMessage.error('请先选择用户');
|
||||
let pay_type = 18; // 采购款支付
|
||||
if (active.value == 4) pay_type = 19; //礼品券兑换
|
||||
if (active.value == 5) pay_type = 3; //余额支付
|
||||
orderCreateApi({
|
||||
pay_type: pay_type,
|
||||
is_storage: is_storage,
|
||||
|
@ -483,7 +484,7 @@ const aleft = () => {
|
|||
};
|
||||
const aright = () => {
|
||||
if (!drawer.value || (isFocus.value && input.value.length > 0)) return;
|
||||
if (active.value != 4) return changeActive(active.value + 1);
|
||||
if (active.value != 5) return changeActive(active.value + 1);
|
||||
};
|
||||
onMounted(() => {
|
||||
mitt.on("left", aleft);
|
||||
|
@ -513,9 +514,12 @@ onUnmounted(() => {
|
|||
<div class="center" style="border-left: none;" :class="{ active: active == 3 }" @click="changeActive(3)">
|
||||
采购款
|
||||
</div>
|
||||
<div class="right" :class="{ active: active == 4 }" @click="changeActive(4)">
|
||||
<div class="center" style="border-left: none;" :class="{ active: active == 4 }" @click="changeActive(4)">
|
||||
礼品券兑换
|
||||
</div>
|
||||
<div class="right" :class="{ active: active == 5 }" @click="changeActive(5)">
|
||||
余额
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="form.activities == 1 && active != 4" style="display: inline-block;margin-right: 20px">
|
||||
|
@ -588,7 +592,7 @@ onUnmounted(() => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card3" v-else-if="active == 3 || active == 4">
|
||||
<div class="card3" v-else-if="active == 3 || active == 4 || active == 5">
|
||||
<div class="codes">
|
||||
<el-input v-model="smsCode" autofocus class="code-input" placeholder="请输入验证码"
|
||||
@keyup.enter="handlecodeEnter" @focus="isFocus = true" @blur="isFocus = false" />
|
||||
|
@ -617,7 +621,7 @@ onUnmounted(() => {
|
|||
text-align: center;
|
||||
|
||||
.header {
|
||||
width: 30rem;
|
||||
width: 35rem;
|
||||
display: flex;
|
||||
|
||||
&>div {
|
||||
|
|
|
@ -48,7 +48,8 @@ const changeActive = (e) => {
|
|||
|
||||
const form = ref({
|
||||
price: 0,
|
||||
uid: ''
|
||||
uid: '',
|
||||
user_ship: '',
|
||||
});
|
||||
const cart_id = ref([]);
|
||||
const isRePay = ref(false);
|
||||
|
@ -107,6 +108,7 @@ const handleEnter = () => {
|
|||
}
|
||||
userRechangeAmountApi({
|
||||
uid: form.value.uid,
|
||||
user_ship: form.value.user_ship,
|
||||
price: form.value.price,
|
||||
pay_type: pay_type,
|
||||
auth_code: input.value,
|
||||
|
@ -123,13 +125,13 @@ const handleEnter = () => {
|
|||
} else {
|
||||
if (res.msg == "用户支付中" && res.code == 1) {
|
||||
ElMessage.warning(res.msg);
|
||||
mitt.on("pay_success", (e) => {
|
||||
mitt.on("pay_user_success", (e) => {
|
||||
ElMessage({
|
||||
message: "支付成功",
|
||||
type: "success",
|
||||
});
|
||||
setTimeout(() => {
|
||||
mitt.off("pay_success");
|
||||
mitt.off("pay_user_success");
|
||||
}, 200);
|
||||
drawer.value = false;
|
||||
beforeClose(e);
|
||||
|
@ -175,13 +177,13 @@ const orderPay = () => {
|
|||
} else {
|
||||
if (res.msg == "用户支付中" && res.code == 1) {
|
||||
ElMessage.warning(res.msg);
|
||||
mitt.on("pay_success", (e) => {
|
||||
mitt.on("pay_user_success", (e) => {
|
||||
ElMessage({
|
||||
message: "支付成功",
|
||||
type: "success",
|
||||
});
|
||||
setTimeout(() => {
|
||||
mitt.off("pay_success");
|
||||
mitt.off("pay_user_success");
|
||||
}, 200);
|
||||
drawer.value = false;
|
||||
beforeClose(e);
|
||||
|
@ -323,6 +325,7 @@ const cashBnt = () => {
|
|||
else
|
||||
userRechangeAmountApi({
|
||||
uid: form.value.uid,
|
||||
user_ship: form.value.user_ship,
|
||||
price: form.value.price,
|
||||
pay_type: 17,
|
||||
})
|
||||
|
|
|
@ -94,7 +94,8 @@ defineExpose({
|
|||
</div>
|
||||
<div class="bottom flex" style="justify-content: space-between;">
|
||||
<div>采购款: <span class="red">{{ item.purchase_funds }}</span></div>
|
||||
<div>礼品券: <span class="red">{{ item.get_frozen }}</span></div>
|
||||
<div>礼品券: <span class="red">{{ item.get_frozen?.toFixed(2) || item.get_frozen }}</span></div>
|
||||
<div>余额: <span class="red">{{ item.now_money }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -147,7 +148,7 @@ defineExpose({
|
|||
|
||||
.item {
|
||||
width: 45%;
|
||||
height: 6rem;
|
||||
height: 7rem;
|
||||
border-radius: 0.5rem;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
|
@ -185,7 +186,7 @@ defineExpose({
|
|||
|
||||
.bottom {
|
||||
&>div{
|
||||
flex: 1;
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import { ref, nextTick, onMounted, onUnmounted } from "vue";
|
|||
import mitt from "@/utils/mitt.js";
|
||||
import { useUserStore } from "@/store/user.js";
|
||||
import { Push } from "@/common/push.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const connection = new Push({
|
||||
|
@ -30,6 +31,9 @@ user_channel.on('message', function (data) {
|
|||
if (data?.content?.type == 'platform_print') {
|
||||
mitt.emit('letPrintReceipt', data?.content?.data);
|
||||
}
|
||||
if (data?.content?.msg == '订单支付成功') {
|
||||
mitt.emit('pay_user_success', data?.content?.data);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
@ -45,6 +49,7 @@ user_channel.on('close', function () {
|
|||
|
||||
const KeyboardEvent = (e) => {
|
||||
console.log('按下', e.keyCode);
|
||||
// ElMessage.warning('按下', e.keyCode)
|
||||
if (e.keyCode == 16) mitt.emit('shift');
|
||||
if (e.keyCode == 120) mitt.emit('F9');
|
||||
if (e.keyCode == 13) mitt.emit('enter');
|
||||
|
|
|
@ -77,6 +77,12 @@ const list = ref([
|
|||
ico: "Van",
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
name: "stock",
|
||||
title: "商品库存",
|
||||
ico: "Box",
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
name: "user",
|
||||
title: "用户",
|
||||
|
|
|
@ -53,6 +53,12 @@ const routes = [
|
|||
meta: { title: '入库登记' },
|
||||
component: () => import('@/views/putStorage/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/stock',
|
||||
name: 'stock',
|
||||
meta: { title: '入库登记' },
|
||||
component: () => import('@/views/stock/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
name: 'user',
|
||||
|
|
|
@ -113,10 +113,10 @@ const testObj = {
|
|||
|
||||
export const printTicket = (obj = {}, test = false) => {
|
||||
let str = "";
|
||||
if(!obj || !obj.order_id) obj = testObj;
|
||||
if (!obj || !obj.order_id) obj = testObj;
|
||||
str += Esc.Size2(2) + Esc.Center() + Esc.boldFontOn() + obj.system_store_name + Esc.Size1() + "\n";
|
||||
str += Esc.fillLine(" ") + Esc.boldFontOff() + "\n";
|
||||
if(obj.shipping_type) str += Esc.Left() + "核销码: " + Esc.boldFontOn() + obj.verify_code + Esc.boldFontOff() + "\n";
|
||||
if (obj.shipping_type) str += Esc.Left() + "核销码: " + Esc.boldFontOn() + obj.verify_code + Esc.boldFontOff() + "\n";
|
||||
str += Esc.Left() + "单号: " + obj.order_id + "\n";
|
||||
str += Esc.Left() + "下单时间: " + obj.create_time + "\n";
|
||||
|
||||
|
@ -128,18 +128,22 @@ export const printTicket = (obj = {}, test = false) => {
|
|||
str += Esc.Left() + item.store_name + "\n";
|
||||
let total = +item.price || 0;
|
||||
total *= +item.cart_num;
|
||||
str += Esc.inline3(`${item.price || '0.00'}元`, `${item.cart_num}${item.unit_name||''}`, `${total}元`, " ", 1) + "\n";
|
||||
str += Esc.inline3(`${item.price || '0.00'}元`, `${item.cart_num}${item.unit_name || ''}`, `${total}元`, " ", 1) + "\n";
|
||||
})
|
||||
|
||||
str += Esc.fillLine("=") + "\n";
|
||||
|
||||
str += Esc.Left() + "合计: " + obj.total_price + "元" + "\n";
|
||||
if (obj.deduction_price) { // 有优惠
|
||||
str += Esc.Left() + "合计: " + obj.total_price + "元" + "\n";
|
||||
str += Esc.Left() + "优惠: " + obj.deduction_price + "元" + "\n";
|
||||
}
|
||||
else str += Esc.Left() + "合计: " + obj.pay_price + "元" + "\n";
|
||||
str += Esc.Left() + "实付款: " + obj.pay_price + "元" + "\n";
|
||||
str += Esc.Left() + "支付方式: " + obj.pay_type_name + "\n";
|
||||
// str += Esc.Left() + "支付单号: " + obj.order_id + "\n";
|
||||
str += Esc.Left() + "店铺电话: " + obj.system_store_phone + "\n";
|
||||
|
||||
if(obj.shipping_type == 1){ // 快递
|
||||
if (obj.shipping_type == 1) { // 快递
|
||||
str += Esc.fillLine("=") + "\n";
|
||||
str += Esc.Left() + "收货人: " + obj.real_name + "\n";
|
||||
str += Esc.Left() + "收货电话: " + obj.user_phone + "\n";
|
||||
|
|
|
@ -124,6 +124,10 @@ onUnmounted(() => {
|
|||
<el-date-picker v-model="date" type="daterange" start-placeholder="开始时间" end-placeholder="结束时间"
|
||||
size="small" value-format="YYYY/MM/DD" :disabled-date="disabledDate" @change="changeDate"
|
||||
:clearable="false" style="width: 10rem; margin: 0 0 0 1rem" />
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<!-- <el-button size="small">重置</el-button> -->
|
||||
>>>>>>> f5171c94984b274604989664d68b9df6dd1febf2
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-input">
|
||||
|
|
|
@ -46,7 +46,7 @@ const getList = () => {
|
|||
cartListApi().then((res) => {
|
||||
extend.value = res.data.extend;
|
||||
list.value = res.data.lists || [];
|
||||
if(!extend.value?.pay_price) userInfo.value.uid = "";
|
||||
if (!extend.value?.pay_price) userInfo.value.uid = "";
|
||||
// if (res.data?.lists?.length > 0) {
|
||||
// list.value = res.data.lists;
|
||||
// allPrice.value = res.data?.lists.reduce((previous, current) => {
|
||||
|
@ -114,7 +114,7 @@ const setUser = (row) => {
|
|||
|
||||
const is_storage = ref(false)
|
||||
|
||||
const resetView = ()=>{
|
||||
const resetView = () => {
|
||||
is_storage.value = false;
|
||||
getList();
|
||||
}
|
||||
|
@ -156,19 +156,24 @@ onUnmounted(() => {
|
|||
<div class="info" v-if="userInfo.uid">
|
||||
<div class="flex-bewteen">
|
||||
<div>手机号: {{ userInfo.mobile || userInfo.account }}</div>
|
||||
<el-button type="primary" link class="change-user" @click="userListRef.open(userInfo.uid)">切换用户<el-icon>
|
||||
<el-button type="primary" link class="change-user"
|
||||
@click="userListRef.open(userInfo.uid)">切换用户<el-icon>
|
||||
<ArrowRight />
|
||||
</el-icon></el-button>
|
||||
</div>
|
||||
<div class="flex-bewteen" style="align-items: flex-end;">
|
||||
<div style="display:flex;">
|
||||
<div class="flex-bewteen" style="align-items: flex-start;">
|
||||
<div class="user-money">
|
||||
<div style="margin-right: 0.5rem;">采购款: <span style="color: #f70;">{{
|
||||
userInfo.purchase_funds }}</span></div>
|
||||
<div>礼品券: <span style="color: #f70;">{{ userInfo.get_frozen }}</span></div>
|
||||
userInfo.purchase_funds }}</span></div>
|
||||
<div style="margin-right: 0.5rem;">礼品券: <span style="color: #f70;">{{ userInfo.get_frozen?.toFixed(2) || userInfo.get_frozen
|
||||
}}</span></div>
|
||||
<div>余额: <span style="color: #f70;">{{ userInfo.now_money }}</span></div>
|
||||
</div>
|
||||
<el-button link @click="userInfo.uid = ''">重置<el-icon>
|
||||
<el-button style="margin-top:0.2rem;" link @click="userInfo.uid = ''">
|
||||
重置<el-icon>
|
||||
<RefreshLeft />
|
||||
</el-icon></el-button>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info" v-else style="align-items: center;display:flex;justify-content: space-between;">
|
||||
|
@ -233,6 +238,7 @@ onUnmounted(() => {
|
|||
>
|
||||
</div> -->
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
<!-- <div class="update-price">
|
||||
<el-switch
|
||||
v-model="is_storage"
|
||||
|
@ -242,6 +248,11 @@ onUnmounted(() => {
|
|||
inactive-text="不存"
|
||||
/>
|
||||
</div> -->
|
||||
=======
|
||||
<div class="update-price">
|
||||
<el-switch v-model="is_storage" size="large" inline-prompt active-text="存货" inactive-text="不存" />
|
||||
</div>
|
||||
>>>>>>> f5171c94984b274604989664d68b9df6dd1febf2
|
||||
</div>
|
||||
<div class="order-btn">
|
||||
<el-button class="btn" type="primary" @click="goPay" :disabled="list.length == 0">{{ "立即结账 (F9)"
|
||||
|
@ -292,6 +303,16 @@ onUnmounted(() => {
|
|||
.change-user {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.user-money {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&>div {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,293 +0,0 @@
|
|||
<script setup>
|
||||
import { ref, watch, nextTick, computed, onMounted, onUnmounted } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import mitt from "@/utils/mitt.js";
|
||||
import { useUserStore } from "@/store/user.js";
|
||||
import config from "@/config";
|
||||
import {
|
||||
categoryListApi,
|
||||
productCreateApi,
|
||||
productDetailApi,
|
||||
productUpdateApi,
|
||||
} from "@/api/shop.js";
|
||||
|
||||
const drawer = ref(false);
|
||||
const table = {
|
||||
store_name: "",
|
||||
image: [],
|
||||
slider_image: [],
|
||||
attrValue: [
|
||||
{
|
||||
bar_code: "",
|
||||
price: "",
|
||||
stock: "",
|
||||
cost: "",
|
||||
ot_price: "",
|
||||
wholesale_price: "0",
|
||||
extension_one: "",
|
||||
extension_two: "",
|
||||
},
|
||||
],
|
||||
content: {
|
||||
image: [],
|
||||
},
|
||||
unit_name: "",
|
||||
delivery_way: ["1"],
|
||||
};
|
||||
const formData = ref(table);
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
const emit = defineEmits(["reload"]);
|
||||
|
||||
const dialogImgVisible = ref(false);
|
||||
const dialogImageUrl = ref("");
|
||||
|
||||
const handlePictureCardPreview = (uploadFile) => {
|
||||
dialogImageUrl.value = uploadFile.url;
|
||||
dialogImgVisible.value = true;
|
||||
};
|
||||
|
||||
const showType = ref("add");
|
||||
const show = (type, data) => {
|
||||
formData.value = table;
|
||||
showType.value = type;
|
||||
if (type == "add") {
|
||||
drawer.value = true;
|
||||
} else if (type == "edit") {
|
||||
drawer.value = true;
|
||||
getProductDetail(data.product_id);
|
||||
}
|
||||
};
|
||||
|
||||
const getProductDetail = (id) => {
|
||||
productDetailApi(userStore.userInfo.service.store_id, id).then((res) => {
|
||||
res.data.image = [
|
||||
{
|
||||
url: res.data.image,
|
||||
uid: res.data.image,
|
||||
},
|
||||
];
|
||||
if(res.data.content?.image) res.data.content.image = res.data.content.image.map((item) => {
|
||||
return {
|
||||
url: item,
|
||||
uid: res.data.image,
|
||||
};
|
||||
});
|
||||
else res.data.content = {
|
||||
image: []
|
||||
};
|
||||
res.data.slider_image = res.data.slider_image.map((item) => {
|
||||
return {
|
||||
url: item,
|
||||
uid: res.data.image,
|
||||
};
|
||||
});
|
||||
formData.value = res.data;
|
||||
console.log(formData.value);
|
||||
});
|
||||
};
|
||||
|
||||
const categoryList = ref([]);
|
||||
const getCategoryList = () => {
|
||||
categoryListApi(userStore.userInfo.service.store_id).then((res) => {
|
||||
categoryList.value = res.data;
|
||||
});
|
||||
};
|
||||
getCategoryList();
|
||||
|
||||
const uploadImage = (res) => {
|
||||
formData.value.image = res.data.path;
|
||||
};
|
||||
const uploadSliderImage = (res) => {
|
||||
console.log(formData.value.slider_image);
|
||||
};
|
||||
const handleRemove = (file) => {
|
||||
console.log(file);
|
||||
};
|
||||
|
||||
const formRef = ref(null);
|
||||
const submit = () => {
|
||||
let data = JSON.parse(JSON.stringify(formData.value));
|
||||
console.log(data.cate_id);
|
||||
if (data.cate_id && typeof data.cate_id == "object" && data.cate_id.length > 0)
|
||||
data.cate_id = data.cate_id[data.cate_id.length - 1] || '';
|
||||
else data.cate_id = data.cate_id || '';
|
||||
if (data.image == "") return ElMessage.error("请上传商品封面图");
|
||||
// if (data.content.image.length == 0)
|
||||
// return ElMessage.error("请上传商品详情图");
|
||||
if (data.slider_image.length == 0) return ElMessage.error("请上传商品轮播图");
|
||||
data.content.image = data.content.image.map((item) => {
|
||||
return item?.response?.data?.path ? item?.response?.data?.path : item.url;
|
||||
});
|
||||
data.image = data.image[0]?.response?.data?.path
|
||||
? data.image[0]?.response?.data?.path
|
||||
: data.image[0].url;
|
||||
data.slider_image = data.slider_image.map((item) => {
|
||||
return item?.response?.data?.path ? item?.response?.data?.path : item.url;
|
||||
});
|
||||
if (data.store_name == "") return ElMessage.error("请输入商品名称");
|
||||
if (data.cate_id == "") return ElMessage.error("请选择平台分类");
|
||||
if (data.attrValue[0].bar_code == "")
|
||||
return ElMessage.error("请输入商品条码");
|
||||
if (data.attrValue[0].stock<=0) return ElMessage.error("请输入商品库存");
|
||||
if (data.attrValue[0].price<=0) return ElMessage.error("请输入商品价格");
|
||||
if (showType.value == "add")
|
||||
productCreateApi(userStore.userInfo.service.store_id, data).then((res) => {
|
||||
ElMessage.success(res.message);
|
||||
emit("reload", true);
|
||||
beforeClose();
|
||||
});
|
||||
else
|
||||
productUpdateApi(
|
||||
userStore.userInfo.service.store_id,
|
||||
data.product_id,
|
||||
data
|
||||
).then((res) => {
|
||||
ElMessage.success(res.message);
|
||||
emit("reload", true);
|
||||
beforeClose();
|
||||
});
|
||||
};
|
||||
|
||||
const cancelClick = () => {
|
||||
beforeClose();
|
||||
};
|
||||
const beforeClose = () => {
|
||||
drawer.value = false;
|
||||
};
|
||||
const open = () => {};
|
||||
|
||||
defineExpose({
|
||||
drawer,
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-drawer
|
||||
size="60rem"
|
||||
v-model="drawer"
|
||||
direction="rtl"
|
||||
@open="open"
|
||||
:before-close="beforeClose"
|
||||
>
|
||||
<template #header>
|
||||
<h4 v-if="showType=='add'">添加商品</h4>
|
||||
<h4 v-else>编辑商品 [{{formData.product_id}}]</h4>
|
||||
</template>
|
||||
<template #default>
|
||||
<div class="dra-body">
|
||||
<el-form ref="formRef" :model="formData" label-width="150px">
|
||||
<el-form-item label="商品条码" required>
|
||||
<el-input
|
||||
v-model="formData.attrValue[0].bar_code"
|
||||
type="number"
|
||||
placeholder="请输入商品条码"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" required>
|
||||
<el-input
|
||||
v-model="formData.store_name"
|
||||
placeholder="请输入商品名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="平台分类" required>
|
||||
<el-cascader
|
||||
v-model="formData.cate_id"
|
||||
class="pageWidth"
|
||||
:options="categoryList"
|
||||
filterable
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品封面图" required>
|
||||
<el-upload
|
||||
v-model:file-list="formData.image"
|
||||
:action="config.upload"
|
||||
name="field"
|
||||
list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:page_size="1"
|
||||
>
|
||||
<el-icon><Plus /></el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品轮播图" required>
|
||||
<el-upload
|
||||
v-model:file-list="formData.slider_image"
|
||||
:action="config.upload"
|
||||
name="field"
|
||||
list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:page_size="9"
|
||||
>
|
||||
<el-icon><Plus /></el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品详情">
|
||||
<el-upload
|
||||
v-model:file-list="formData.content.image"
|
||||
:action="config.upload"
|
||||
name="field"
|
||||
list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:page_size="9"
|
||||
>
|
||||
<el-icon><Plus /></el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品单位" required>
|
||||
<el-input
|
||||
v-model="formData.unit_name"
|
||||
placeholder="请输入商品单位"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="零售价" required>
|
||||
<el-input
|
||||
v-model="formData.attrValue[0].price"
|
||||
type="number"
|
||||
placeholder="请输入零售价"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存" required>
|
||||
<el-input
|
||||
v-model="formData.attrValue[0].stock"
|
||||
type="number"
|
||||
placeholder="请输入库存"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-dialog v-model="dialogImgVisible">
|
||||
<img
|
||||
style="width: 100%; height: 100%"
|
||||
w-full
|
||||
:src="dialogImageUrl"
|
||||
alt="Preview Image"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button @click="cancelClick">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dra-body {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* align-items: center; */
|
||||
text-align: center;
|
||||
}
|
||||
::v-deep .el-upload--picture-card {
|
||||
--el-upload-picture-card-size: 60px !important;
|
||||
}
|
||||
::v-deep .el-upload-list--picture-card .el-upload-list__item {
|
||||
height: 60px !important;
|
||||
width: 60px !important;
|
||||
}
|
||||
</style>
|
|
@ -1,284 +0,0 @@
|
|||
<script setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import { storeListApi, userFreeTrialApi, productTitleApi, productStatusApi } from "@/api/shop.js";
|
||||
import { useUserStore } from "@/store/user.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import add from "./component/add.vue";
|
||||
|
||||
const orderList = ref([]);
|
||||
const userStore = useUserStore();
|
||||
|
||||
const where = ref({
|
||||
page_no: 1,
|
||||
page_size: 15,
|
||||
type: 1,
|
||||
keyword: "",
|
||||
staff_id: userStore.userInfo.service.service_id,
|
||||
});
|
||||
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
|
||||
|
||||
|
||||
const productTitle = ref([]);
|
||||
const getProductTitleApi = () => {
|
||||
productTitleApi(userStore.userInfo.service.store_id).then((res) => {
|
||||
productTitle.value = res.data;
|
||||
});
|
||||
};
|
||||
getProductTitleApi()
|
||||
|
||||
const getShopList = (loadmore = false) => {
|
||||
loading.value = true;
|
||||
getProductTitleApi();
|
||||
storeListApi(userStore.userInfo.service.store_id, where.value).then((res) => {
|
||||
orderList.value = res.data.list;
|
||||
total.value = res.data.count;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
getShopList();
|
||||
|
||||
const prevClick = (e) => {
|
||||
where.value.page_no = e;
|
||||
getShopList();
|
||||
};
|
||||
|
||||
const nextClick = (e) => {
|
||||
where.value.page_no = e;
|
||||
getShopList();
|
||||
};
|
||||
|
||||
const currentChange = (e) => {
|
||||
where.value.page_no = e;
|
||||
getShopList();
|
||||
};
|
||||
|
||||
const dialogFormVisible = ref(false);
|
||||
const form = ref({});
|
||||
const edit = (row) => {
|
||||
form.value = row;
|
||||
dialogFormVisible.value = true;
|
||||
};
|
||||
|
||||
const submitUpdate = () => {
|
||||
let obj = {
|
||||
attr: form.value.attr || [],
|
||||
attrValue: form.value.attrValue,
|
||||
mer_cate_id: form.value.merCateId || [],
|
||||
spec_type: form.value.spec_type,
|
||||
is_stock: 1,
|
||||
};
|
||||
userFreeTrialApi(form.value.product_id, obj)
|
||||
.then((res) => {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
dialogFormVisible.value = false;
|
||||
getShopList();
|
||||
})
|
||||
.catch((err) => {
|
||||
ElMessage({
|
||||
message: err,
|
||||
type: "error",
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const activeIndex = ref('1');
|
||||
|
||||
const handleSelect = (key) => {
|
||||
where.value.type = key;
|
||||
where.value.page_no = 1;
|
||||
getShopList();
|
||||
};
|
||||
|
||||
const updateShow = (row) => {
|
||||
productStatusApi(userStore.userInfo.service.store_id, row.product_id, {
|
||||
status: row.is_show ? 1 : 0
|
||||
}).then(res=>{
|
||||
ElMessage.success(res.message);
|
||||
getShopList(true);
|
||||
})
|
||||
}
|
||||
|
||||
const addRef = ref(null);
|
||||
const showAdd = (type='add', data)=>{
|
||||
addRef.value.show(type, data);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-loading="loading" element-loading-text="加载中" class="my-shop">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="关键字:">
|
||||
<el-input v-model="where.keyword" placeholder="请输入关键字搜索" style="width: 20rem;" clearable @clear="getShopList(true)" @keydown.enter="getShopList(true)"/>
|
||||
</el-form-item>
|
||||
<el-form-item >
|
||||
<el-button type="primary" @click="getShopList(true)">搜索</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item >
|
||||
<el-button type="primary" @click="showAdd('add')">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
class="el-menu-top"
|
||||
mode="horizontal"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<el-menu-item
|
||||
:index="item.type+''"
|
||||
v-for="(item, index) in productTitle"
|
||||
:key="index"
|
||||
>{{ `${item.name}(${item.count})` }}</el-menu-item
|
||||
>
|
||||
</el-menu>
|
||||
|
||||
<el-table :data="orderList" style="width: 100%">
|
||||
<el-table-column prop="product_id" label="ID" width="100" />
|
||||
<el-table-column prop="image" label="图片" width="120">
|
||||
<template #default="scope">
|
||||
<el-image
|
||||
loading="lazy"
|
||||
style="width: 3.75rem; height: 3.75rem;"
|
||||
:src="scope.row.image"
|
||||
></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="store_name" label="商品名称" width="500" />
|
||||
<el-table-column prop="price" label="售价" />
|
||||
<el-table-column prop="stock" label="库存" />
|
||||
<el-table-column label="上/下架" v-if="where.type<=2" width="100">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.is_show"
|
||||
:active-value="1"
|
||||
inline-prompt
|
||||
active-text="上架"
|
||||
inactive-text="下架"
|
||||
@click="updateShow(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品状态" v-if="where.type<=4" width="100">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.is_used" style="color: #ff4a00">平台关闭</span>
|
||||
<span v-else-if="scope.row.is_show">上架显示</span>
|
||||
<span v-else>下架</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="where.type != 5"
|
||||
link
|
||||
@click="edit(scope.row)"
|
||||
>修改库存</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="where.type != 1 && where.type != 5"
|
||||
link
|
||||
@click="showAdd('edit', scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
:page_no-size="where.page_size"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
@prev-click="prevClick"
|
||||
@next-click="nextClick"
|
||||
@current-change="currentChange"
|
||||
/>
|
||||
|
||||
<el-dialog v-model="dialogFormVisible" title="编辑商品库存" width="800">
|
||||
<el-table
|
||||
v-if="form.attrValue"
|
||||
:data="form.attrValue"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="image" label="图片" width="180">
|
||||
<template #default="scope">
|
||||
<el-image
|
||||
loading="lazy"
|
||||
style="width: 5rem; height: 5rem"
|
||||
:src="scope.row.image || form.image"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sku" label="名称" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.sku || form.store_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="价格" />
|
||||
<el-table-column prop="stock" label="库存">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.stock"
|
||||
step-strictly
|
||||
:min="0"
|
||||
:step="1"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitUpdate"> 确定 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<add ref="addRef" @reload="getShopList"></add>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my-shop {
|
||||
background-color: #fff;
|
||||
border-radius: 1.2rem;
|
||||
box-sizing: border-box;
|
||||
padding: 1rem;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
/* 修改滚动条的样式 */
|
||||
::-webkit-scrollbar {
|
||||
width: 0.315rem; /* 设置滚动条的宽度 */
|
||||
}
|
||||
|
||||
/* 设置滚动条的轨道样式 */
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #f1f1f1; /* 设置轨道的背景色 */
|
||||
margin: 1.25rem 0;
|
||||
}
|
||||
|
||||
/* 设置滚动条的滑块样式 */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #ccc; /* 设置滑块的背景色 */
|
||||
border-radius: 0.315rem; /* 设置滑块的圆角 */
|
||||
}
|
||||
|
||||
/* 设置滚动条鼠标悬停时的滑块样式 */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
|
||||
}
|
||||
.el-menu--horizontal {
|
||||
height: 2.5rem;
|
||||
}
|
||||
.el-form--inline .el-form-item{
|
||||
margin-right: 1rem;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,125 @@
|
|||
<script setup>
|
||||
import { ref, nextTick } from "vue";
|
||||
import { storeProductListsApi } from "@/api/shop.js"
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const orderList = ref([]);
|
||||
|
||||
const where = ref({
|
||||
page_no: 1,
|
||||
page_size: 20,
|
||||
loadend: false,
|
||||
type: 1
|
||||
});
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
const getOrderList = () => {
|
||||
if (where.value.loadend) return;
|
||||
loading.value = true;
|
||||
storeProductListsApi({
|
||||
page_no: where.value.page_no,
|
||||
page_size: where.value.page_size,
|
||||
type: where.value.type
|
||||
}).then((res) => {
|
||||
orderList.value = [...orderList.value, ...res.data.lists];
|
||||
if (res.data.lists.length < where.value.page_size) where.value.loadend = true;
|
||||
where.value.page_no++;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
getOrderList();
|
||||
|
||||
const reload = ()=>{
|
||||
where.value.page_no = 1;
|
||||
where.value.loadend = false;
|
||||
orderList.value = [];
|
||||
getOrderList();
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-card put-storage">
|
||||
<el-radio-group style="margin-bottom: 20px" v-model="where.type" @change="reload">
|
||||
<el-radio-button :label="1" :value="1">售卖库存</el-radio-button>
|
||||
<el-radio-button :label="2" :value="2">兑换库存</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div class="order-lists" v-loading="loading" v-infinite-scroll="getOrderList" :infinite-scroll-distance="300"
|
||||
:infinite-scroll-delay="500" :infinite-scroll-immediate="false" style="overflow: auto">
|
||||
<el-table :data="orderList">
|
||||
<el-table-column label="导入人员" prop="admin_name" />
|
||||
<el-table-column label="门店确认人员" prop="staff_name" />
|
||||
<el-table-column label="商品图" prop="image">
|
||||
<template #default="{ row }">
|
||||
<el-image class="image" :src="row.image" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品" prop="store_name" />
|
||||
<el-table-column label="数量" prop="nums" />
|
||||
<el-table-column label="状态" prop="status">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="success" v-if="row.status === 1">已入库</el-tag>
|
||||
<el-tag type="warning" v-else-if="row.status === 0">待确认</el-tag>
|
||||
<el-tag type="danger" v-else-if="row.status === -1">库存不足</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="mark" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.put-storage {
|
||||
background-color: #fff;
|
||||
border-radius: 1.2rem;
|
||||
box-sizing: border-box;
|
||||
padding: 1rem;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
.image {
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
}
|
||||
|
||||
.order-lists {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.my-card {}
|
||||
|
||||
/* 修改滚动条的样式 */
|
||||
::-webkit-scrollbar {
|
||||
width: 0.315rem;
|
||||
/* 设置滚动条的宽度 */
|
||||
}
|
||||
|
||||
/* 设置滚动条的轨道样式 */
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #f1f1f1;
|
||||
/* 设置轨道的背景色 */
|
||||
/* margin: 1.25rem 0; */
|
||||
}
|
||||
|
||||
/* 设置滚动条的滑块样式 */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #ccc;
|
||||
/* 设置滑块的背景色 */
|
||||
border-radius: 0.315rem;
|
||||
/* 设置滑块的圆角 */
|
||||
}
|
||||
|
||||
/* 设置滚动条鼠标悬停时的滑块样式 */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #999;
|
||||
/* 设置鼠标悬停时滑块的背景色 */
|
||||
}
|
||||
</style>
|
|
@ -120,7 +120,9 @@ const props = {
|
|||
const userShip = ref([])
|
||||
const getUserShip = () => {
|
||||
userShipApi().then(res => {
|
||||
userShip.value = res.data.lists;
|
||||
userShip.value = res.data.lists?.filter((item) => {
|
||||
return item.id == 0 || item.id == 4
|
||||
});
|
||||
})
|
||||
}
|
||||
getUserShip()
|
||||
|
@ -142,6 +144,12 @@ const addUser = () => {
|
|||
forms.brigade = formDataInfo.selectedValues[4]
|
||||
forms.store_id = userStore.userInfo.store_id;
|
||||
userAddApi(forms).then(res=>{
|
||||
formDataInfo.mobile = '';
|
||||
formDataInfo.code = '';
|
||||
formDataInfo.user_ship = '';
|
||||
formDataInfo.real_name = '';
|
||||
formDataInfo.selectedValues = [];
|
||||
formDataRef.value.resetFields();
|
||||
emit('close')
|
||||
})
|
||||
}
|
||||
|
@ -188,7 +196,7 @@ defineExpose({
|
|||
</el-form-item>
|
||||
<el-form-item label="用户类型" prop="user_ship">
|
||||
<el-select v-model="formDataInfo.user_ship" placeholder="请选择用户类型" style="width: 100%;">
|
||||
<el-option v-for="item in userShip" :key="item.id" :label="item.title" :value="item.id" :disabled="item.id==1||item.id==2||item.id==3" />
|
||||
<el-option v-for="item in userShip" :key="item.id" :label="item.title" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户地址" prop="selectedValues">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { onMounted, onUnmounted, ref } from "vue";
|
||||
import { nextTick, onMounted, onUnmounted, ref } from "vue";
|
||||
import { useUserStore } from "@/store/user.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
|
@ -35,11 +35,12 @@ const toPay = () => {
|
|||
data: {
|
||||
uid: formData.value.id,
|
||||
price: payInfo.value.price,
|
||||
user_ship: formData.value.user_ship
|
||||
}
|
||||
});
|
||||
payRef.value.drawer = true;
|
||||
}
|
||||
const paySuccess = (e=null) => {
|
||||
const paySuccess = (e = null) => {
|
||||
getUserInfo();
|
||||
// mitt.emit('re-load-user-list', e ? true : false);
|
||||
}
|
||||
|
@ -66,27 +67,27 @@ const cancelUserShip = () => {
|
|||
updateShip.value = false;
|
||||
}
|
||||
|
||||
const updateLable = ref(false);
|
||||
const userLable = ref([]);
|
||||
const getLableList = () => {
|
||||
userLabelListApi().then(res => {
|
||||
userLable.value = res.data.lists;
|
||||
})
|
||||
}
|
||||
getLableList()
|
||||
const updateUserLable = () => {
|
||||
userLabelUpdateApi({
|
||||
id: formData.value.id,
|
||||
label_id: formData.value.label_id
|
||||
}).then(res => {
|
||||
ElMessage.success('修改成功');
|
||||
formData.value.label_name = userLable.value.find(item => item.label_id == formData.value.label_id)?.label_name;
|
||||
updateLable.value = false;
|
||||
})
|
||||
}
|
||||
const cancelLable = () => {
|
||||
updateLable.value = false;
|
||||
}
|
||||
// const updateLable = ref(false);
|
||||
// const userLable = ref([]);
|
||||
// const getLableList = () => {
|
||||
// userLabelListApi().then(res => {
|
||||
// userLable.value = res.data.lists;
|
||||
// })
|
||||
// }
|
||||
// getLableList()
|
||||
// const updateUserLable = () => {
|
||||
// userLabelUpdateApi({
|
||||
// id: formData.value.id,
|
||||
// label_id: formData.value.label_id
|
||||
// }).then(res => {
|
||||
// ElMessage.success('修改成功');
|
||||
// formData.value.label_name = userLable.value.find(item => item.label_id == formData.value.label_id)?.label_name;
|
||||
// updateLable.value = false;
|
||||
// })
|
||||
// }
|
||||
// const cancelLable = () => {
|
||||
// updateLable.value = false;
|
||||
// }
|
||||
|
||||
|
||||
const addressInfo = ref({
|
||||
|
@ -272,14 +273,14 @@ const onOutAll = () => {
|
|||
// onOutPut();
|
||||
}
|
||||
// 发送短信验证码
|
||||
const onSendCode = ()=>{
|
||||
const onSendCode = () => {
|
||||
console.log('发送短信验证码');
|
||||
ElMessage.success("验证码已发送");
|
||||
}
|
||||
|
||||
// 出库
|
||||
const onOutPut = () => {
|
||||
if(outForm.value.code == '') return ElMessage.error("请输入验证码")
|
||||
if (outForm.value.code == '') return ElMessage.error("请输入验证码")
|
||||
userProductStorageSupplyApi({
|
||||
uid: formData.value.id,
|
||||
info: info
|
||||
|
@ -291,7 +292,7 @@ const onOutPut = () => {
|
|||
})
|
||||
}
|
||||
|
||||
const getUserInfo = ()=>{
|
||||
const getUserInfo = () => {
|
||||
userDetailApi({
|
||||
id: formData.value.id
|
||||
}).then(({ data }) => {
|
||||
|
@ -301,6 +302,59 @@ const getUserInfo = ()=>{
|
|||
})
|
||||
}
|
||||
|
||||
// 成为会员
|
||||
const dialogFormShip = ref(false);
|
||||
const shipForm = ref({
|
||||
user_ship: '',
|
||||
user_ship_name: '',
|
||||
limit: '',
|
||||
money: '',
|
||||
type: '',
|
||||
})
|
||||
const onUpdateShip = () => {
|
||||
shipForm.value.money = Number(shipForm.value.money).toFixed(2);
|
||||
if (+shipForm.value.money < +shipForm.value.limit || +shipForm.value.money > 10000) {
|
||||
+shipForm.value.limit > 0 ? shipForm.value.money = shipForm.value.limit : shipForm.value.money = '';
|
||||
// return ElMessage.error(`该类型至少需要充值${shipForm.value.limit}元`)
|
||||
}
|
||||
}
|
||||
const changeShip = (e) => {
|
||||
let t = userShip.value.find(item => item.id == e);
|
||||
if (t) {
|
||||
shipForm.value.limit = t.limit;
|
||||
shipForm.value.user_ship_name = t.title;
|
||||
shipForm.value.money = t.limit;
|
||||
}
|
||||
}
|
||||
const shipRecharge = () => {
|
||||
if (shipForm.value.user_ship === '' || shipForm.value.user_ship === null || shipForm.value.user_ship === undefined) return ElMessage.error("请选择会员类型");
|
||||
if (shipForm.value.money == 0 || shipForm.value.money == '') return ElMessage.error("请输入充值金额");
|
||||
if (+shipForm.value.money < +shipForm.value.limit || +shipForm.value.money > 10000) {
|
||||
+shipForm.value.limit > 0 ? shipForm.value.money = shipForm.value.limit : shipForm.value.money = '';
|
||||
return ElMessage.error(`该类型至少需要充值${shipForm.value.limit}元`)
|
||||
}
|
||||
payRef.value.setForm({
|
||||
data: {
|
||||
uid: formData.value.id,
|
||||
price: shipForm.value.money,
|
||||
user_ship: shipForm.value.user_ship
|
||||
}
|
||||
});
|
||||
payRef.value.drawer = true;
|
||||
nextTick(() => {
|
||||
dialogFormShip.value = false;
|
||||
})
|
||||
}
|
||||
const rechargeMoney = (type) => {
|
||||
shipForm.value.type = type;
|
||||
if (type == 'add') {
|
||||
shipForm.value.user_ship = formData.value.user_ship;
|
||||
shipForm.value.user_ship_name = formData.value.user_ship_name;
|
||||
changeShip(shipForm.value.user_ship)
|
||||
}
|
||||
dialogFormShip.value = true;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
mitt.on("set-user-detail", (res) => {
|
||||
formData.value = res;
|
||||
|
@ -315,6 +369,13 @@ onMounted(() => {
|
|||
})
|
||||
getAddress();
|
||||
initProduct(true);
|
||||
shipForm.value = {
|
||||
user_ship: '',
|
||||
user_ship_name: '',
|
||||
limit: '',
|
||||
money: '',
|
||||
type: ''
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -395,17 +456,18 @@ onUnmounted(() => {
|
|||
<div class="info-item-title">用户类型:</div>
|
||||
<div class="info-item-info">
|
||||
<template v-if="updateShip == false">
|
||||
<el-tag type="primary" size="large" v-if="formData.user_ship != 1">{{
|
||||
formData.user_ship_name
|
||||
}}</el-tag>
|
||||
<el-tag type="primary" size="large"
|
||||
v-if="formData.user_ship == 0 || formData.user_ship == 4">{{
|
||||
formData.user_ship_name
|
||||
}}</el-tag>
|
||||
<el-tag type="success" size="large" v-else>{{ formData.user_ship_name }}</el-tag>
|
||||
<el-button type="primary" v-if="formData.user_ship != 1" style="margin-left: 1rem;"
|
||||
@click="updateShip = true">修改</el-button>
|
||||
<el-button type="primary" v-if="formData.user_ship == 0 || formData.user_ship == 4"
|
||||
style="margin-left: 1rem;" @click="updateShip = true">修改</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-select v-model="formData.user_ship" placeholder="请选择用户类型" style="width: 10rem;">
|
||||
<el-option v-for="item in userShip" :key="item.id" :label="item.title"
|
||||
:value="item.id" :disabled="item.id==1||item.id==2||item.id==3" />
|
||||
:value="item.id" :disabled="item.id != 0 && item.id != 4" />
|
||||
</el-select>
|
||||
<el-button type="primary" style="margin-left: 1rem;"
|
||||
@click="updateUserShip">确认</el-button>
|
||||
|
@ -413,7 +475,7 @@ onUnmounted(() => {
|
|||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item" v-if="formData.user_ship == 1"
|
||||
<!-- <div class="info-item" v-if="formData.user_ship == 1"
|
||||
style="width: 100%;flex-shrink: 0;align-items: center;">
|
||||
<div class="info-item-title">用户标签:</div>
|
||||
<div class="info-item-info">
|
||||
|
@ -435,7 +497,7 @@ onUnmounted(() => {
|
|||
<el-button style="margin-left: 1rem;" @click="cancelLable">取消</el-button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="info-item" style="width: 100%;flex-shrink: 0;align-items: center;">
|
||||
<div class="info-item-title">用户地址:</div>
|
||||
<el-cascader :key="formData.id" style="flex: 1;" v-model="selectedValues" :options="options"
|
||||
|
@ -446,9 +508,13 @@ onUnmounted(() => {
|
|||
@click="updateAddress">确认</el-button>
|
||||
<el-button v-if="!isDisabled" style="margin-left: 1rem;" @click="cancelUpdate">取消</el-button>
|
||||
</div>
|
||||
<el-button v-if="formData.user_ship != 0 && formData.user_ship != 4" type="success" class="big-btn"
|
||||
size="large" @click="rechargeMoney('add')">增加经营资金</el-button>
|
||||
<el-button v-else type="primary" class="big-btn" size="large"
|
||||
@click="rechargeMoney('recharge')">成为会员</el-button>
|
||||
</div>
|
||||
<div class="table-title">供销经营礼包<span class="tips">首次购买1000元以上成为行业会员</span></div>
|
||||
<div class="table-info">
|
||||
<!-- <div class="table-title" v-if="formData.user_ship != 0 && formData.user_ship != 4">供销经营礼包</div>
|
||||
<div class="table-info" v-if="formData.user_ship != 0 && formData.user_ship != 4">
|
||||
<div class="pay-btn">
|
||||
<div class="pay-item" :class="{ 'pay-item-active': payInfo.type == 1 }"
|
||||
@click="payInfo.type = 1">
|
||||
|
@ -468,7 +534,7 @@ onUnmounted(() => {
|
|||
</div>
|
||||
</div>
|
||||
<el-button type="primary" size="large" class="pay" @click="toPay">立即支付</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail" v-if="formData.id && activeStore == 1" v-loading="whereProduct.loading">
|
||||
|
@ -483,8 +549,8 @@ onUnmounted(() => {
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="单价" :width="isOut?130:200" />
|
||||
<el-table-column prop="nums" label="存量" :width="isOut?100:200" />
|
||||
<el-table-column prop="price" label="单价" :width="isOut ? 130 : 200" />
|
||||
<el-table-column prop="nums" label="存量" :width="isOut ? 100 : 200" />
|
||||
<el-table-column prop="nums" v-if="isOut" label="出库量" width="250">
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; align-items: center" v-if="row.nums">
|
||||
|
@ -532,6 +598,40 @@ onUnmounted(() => {
|
|||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="dialogFormShip" :title="shipForm.type == 'add' ? '增加经营资金' : '成为会员'" width="500">
|
||||
<el-form :model="shipForm" label-width="80px">
|
||||
<el-form-item label="手机号:">
|
||||
<el-input v-model="formData.phone" autocomplete="off" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号:" v-if="shipForm.type == 'add'">
|
||||
<el-input v-model="shipForm.user_ship_name" autocomplete="off" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="会员类型:" v-else required>
|
||||
<el-select v-model="shipForm.user_ship" placeholder="请选择用户类型" style="flex: 1" @change="changeShip">
|
||||
<el-option v-for="item in userShip" :key="item.id" :label="item.title" :value="item.id"
|
||||
:disabled="item.id == 0 || item.id == 4" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="充值金额:" required>
|
||||
<!-- <input type="number" class="ship-input" v-model="payInfo.price" placeholder="自定义金额"> -->
|
||||
<el-input v-model="shipForm.money" type="number" @blur="onUpdateShip" @focus="shipForm.money = ''"
|
||||
autocomplete="off">
|
||||
<template #prepend>¥</template>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
<span v-if="shipForm.limit">{{ `${shipForm.user_ship_name}角色至少要充值${shipForm.limit}元, 最大不超过10000元`
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogFormShip = false">取消</el-button>
|
||||
<el-button type="primary" @click="shipRecharge">
|
||||
确认
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -681,6 +781,12 @@ onUnmounted(() => {
|
|||
margin: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.big-btn {
|
||||
margin-top: 1rem;
|
||||
width: 100%;
|
||||
border-radius: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
|
@ -717,5 +823,15 @@ onUnmounted(() => {
|
|||
/* 防止输入框在聚焦时出现阴影或特殊样式 */
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.ship-input {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 2rem;
|
||||
border: 0.2rem solid #67c23a !important;
|
||||
padding: 1rem 0 !important;
|
||||
color: #67c23a;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue