From 7c9688f00163ae5aa69aa4c4c10c682efee7656f Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Sun, 12 Jul 2026 17:54:20 +0800 Subject: [PATCH] 1 --- package2/group/groupBuySingle.vue | 85 ++++++- package2/myCenter/partTimeJobRegister.vue | 46 +++- package2/myCenter/wallet.vue | 210 ++++++++++++---- package2/partTimeJob/partTimeJobCenter.vue | 16 ++ package2/shop/afterService.vue | 2 +- package2/shop/merchantCenter.vue | 4 +- package2/shop/orderDetail.vue | 266 ++++++++++++++++++++- package2/shop/shopOrderList.vue | 28 ++- 8 files changed, 578 insertions(+), 79 deletions(-) diff --git a/package2/group/groupBuySingle.vue b/package2/group/groupBuySingle.vue index 566c631..f381f90 100644 --- a/package2/group/groupBuySingle.vue +++ b/package2/group/groupBuySingle.vue @@ -582,6 +582,48 @@ 若1小时内拼团失败,将会为您自动退款 + + + + 搭配小食 + + + + + - + + + {{vModelValue}} + + + + + + + + + + + + + + + + ¥{{spec.attributeListPrice | sliceMsg}} + + + {{spec.productName}} + + + {{spec.quantity ? spec.quantity : ''}} + + + + + @@ -874,6 +916,10 @@ isMinimumPayAmount() { return this.formatMoney(this.getPayTotalAmount()) === '0.01'; }, + showPayPopupMoreBuy() { + return this.groupId && this.isFaceToFaceGroup && this.parsedSpecs.length === 0 && + this.moreBuyList.length > 0 && !this.currentOrderId; + }, stickyInnerHeight() { // 左侧分类条 sticky 吸顶时的可视区高度(像素)。 // 必须为像素值,避免百分比高度在大屏 iPhone 上无法解析导致菜单条无法滚动。 @@ -1200,6 +1246,14 @@ } this.selectedGroupRule.groupPriceAndMore = amount > 0 ? amount : 0.01; }, + syncCurrentItemMoreBuyData() { + this.currentItem.moreBuyData = []; + for (let i = 0; i < this.moreBuyData.length; i++) { + if (this.moreBuyData[i].quantity != undefined && this.moreBuyData[i].quantity > 0) { + this.currentItem.moreBuyData.push(this.moreBuyData[i]); + } + } + }, goPayOrderDetail() { if (!this.currentOrderId) return; this.navigatingFromPayPopup = true; @@ -1712,12 +1766,7 @@ } let packageFee = parseFloat(this.currentItem.lunchBox || 0); - this.currentItem.moreBuyData = [] - for (let i = 0; i < this.moreBuyData.length; i++) { - if (this.moreBuyData[i].quantity != undefined && this.moreBuyData[i].quantity > 0) { - this.currentItem.moreBuyData.push(this.moreBuyData[i]) - } - } + this.syncCurrentItemMoreBuyData(); if (this.groupId && this.isFaceToFaceGroup) { this.submitFTFJoinPay(specChoices); return @@ -1805,6 +1854,7 @@ createFTFJoinOrder(specChoices, autoPay) { if (this.isCreatingOrder) return; this.isCreatingOrder = true; + this.syncCurrentItemMoreBuyData(); let payload = this.buildFTFJoinPayload(specChoices); if (!payload) { this.isCreatingOrder = false; @@ -4073,6 +4123,29 @@ padding: 28rpx 30rpx 24rpx; } + .pay-more-buy-card { + padding: 20rpx 30rpx 28rpx; + } + + .pay-more-buy-title { + height: 78rpx; + line-height: 78rpx; + } + + .pay-more-buy-scroll { + width: 100%; + white-space: nowrap; + } + + .pay-more-buy-list { + display: inline-flex; + } + + .pay-more-buy-item { + float: none; + flex-shrink: 0; + } + .pay-countdown { display: flex; align-items: center; diff --git a/package2/myCenter/partTimeJobRegister.vue b/package2/myCenter/partTimeJobRegister.vue index 173481f..2ac42fb 100644 --- a/package2/myCenter/partTimeJobRegister.vue +++ b/package2/myCenter/partTimeJobRegister.vue @@ -15,7 +15,8 @@ * 姓名 - @@ -128,7 +129,8 @@ 备注(选填) - + @@ -172,7 +174,8 @@ 备注(选填) - + @@ -265,7 +268,8 @@ 统一备注 - @@ -439,6 +443,24 @@ this.defaultRoutePrice = value return value }, + limitText(value, maxLength) { + return String(value || '').slice(0, maxLength) + }, + onWorkerNameInput(e) { + const value = this.limitText(e.detail.value, 10) + this.formData.name = value + return value + }, + onDefaultRouteRemarkInput(e) { + const value = this.limitText(e.detail.value, 20) + this.defaultRouteRemark = value + return value + }, + onRuleRemarkInput(e, item) { + const value = this.limitText(e.detail.value, 20) + item.remark = value + return value + }, normalizeOrderBkge(item) { const value = this.formatMoneyInput(item.orderBkge); const amount = parseFloat(value); @@ -467,7 +489,7 @@ if (res.code == 200) { if (res.result != null) { let data = res.result; - if (data.workerName) that.formData.name = data.workerName; + if (data.workerName) that.formData.name = that.limitText(data.workerName, 10); if (data.cardPicture) that.formData.studentCard = data.cardPicture; if (data.mobile) that.formData.mobile = data.mobile; if (data.highFloorFee !== undefined && data.highFloorFee !== null) that.formData @@ -475,7 +497,11 @@ if (data.deliveryLocation !== undefined && data.deliveryLocation !== null) that.formData .deliveryLocation = data.deliveryLocation; - let list = data.workerRelaPriceList || []; + let list = (data.workerRelaPriceList || []).map(item => { + return Object.assign({}, item, { + remark: that.limitText(item.remark, 20) + }); + }); let waimaList = list.filter(item => item.orderType == 0); let paotuiList = list.filter(item => item.orderType == 1); @@ -585,7 +611,7 @@ putAreaName: s.title, orderBkge: this.formatMoneyInput(this.defaultRoutePrice), orderType: this.currentConfigType == 'waima' ? 0 : 1, - remark: this.defaultRouteRemark || '' + remark: this.limitText(this.defaultRouteRemark, 20) }); } }); @@ -645,6 +671,7 @@ } }, submit() { + this.formData.name = this.limitText(this.formData.name, 10) if (!this.formData.name) return uni.showToast({ title: '请填写姓名', icon: 'none' @@ -674,6 +701,7 @@ let workerRelaPriceList = []; if (this.formData.waima) { this.waimaRuleList.forEach(item => this.normalizeOrderBkge(item)); + this.waimaRuleList.forEach(item => item.remark = this.limitText(item.remark, 20)); let invalid = this.waimaRuleList.find(item => !this.isValidOrderBkge(item.orderBkge)); if (invalid) return uni.showToast({ title: '外卖最低配送费需大于0且不超过200', @@ -683,6 +711,7 @@ } if (this.formData.paotui) { this.paotuiRuleList.forEach(item => this.normalizeOrderBkge(item)); + this.paotuiRuleList.forEach(item => item.remark = this.limitText(item.remark, 20)); let invalid = this.paotuiRuleList.find(item => !this.isValidOrderBkge(item.orderBkge)); if (invalid) return uni.showToast({ title: '快递最低配送费需大于0且不超过200', @@ -718,6 +747,9 @@ title: '提交成功' }); } + let worker1 = uni.getStorageSync('worker') + worker1.workerName = this.formData.name + uni.setStorageSync('worker', worker1) uni.reLaunch({ url: '/pages/index/index?tabIndex=1&deliveryRuleEdited=1' }) diff --git a/package2/myCenter/wallet.vue b/package2/myCenter/wallet.vue index a0ce391..668ce43 100644 --- a/package2/myCenter/wallet.vue +++ b/package2/myCenter/wallet.vue @@ -7,7 +7,7 @@ - + @@ -29,7 +29,7 @@ WALLET - 用户余额(元) + 用户余额 🙈 @@ -45,7 +45,7 @@ 提现 - + @@ -53,23 +53,34 @@ - 配送兼职佣金(元)? + 配送可提现佣金 {{ showBalance ? formatMoney(balanceWorker.depoBalRel) : '••••' }} - 今日佣金 {{ showBalance ? formatMoney(balanceWorker.depoBal) : '••••' }} - 去查看 › + + 今日佣金{{ showBalance ? formatMoney(workerTodayCommission) : '••••' }}次日可提现 + + 提现 🛵 - 店铺余额(元)? - {{ showBalance ? formatMoney(shopTotalBalance) : '••••' }} - 去查看 › + {{currentShopName}}余额 + {{ showBalance ? formatMoney(currentShopBalance) : '••••' }} + 当前第 {{activeShopIndex + 1}} / {{shopWallets.length}} 个店铺 + 提现 + + + + {{getShopName(shop, index)}} + + + @@ -77,7 +88,7 @@ 余额明细 - 全部 + 点击不同身份查看余额明细 @@ -114,7 +125,7 @@ 📢 小提示:努力兼职,钱包会鼓鼓的哦 💪 - + @@ -166,6 +177,7 @@ totalPages: 1, commionUrl:'', commionAmount:0, + withdrawMaxAmount: 0, linkId:'', activeWalletType: 'user', activeShopIndex: 0, @@ -178,6 +190,10 @@ } }, computed: { + navSafeTop() { + const top = Number(this.menuButtonInfo && this.menuButtonInfo.top) + return top && top > 20 ? top : 44 + }, shopWallets() { if (Array.isArray(this.balanceShop)) return this.balanceShop return this.balanceShop && typeof this.balanceShop === 'object' ? [this.balanceShop] : [] @@ -197,6 +213,13 @@ currentShop() { return this.shopWallets[this.activeShopIndex] || this.shopWallets[0] || {} }, + currentShopName() { + return this.getShopName(this.currentShop, this.activeShopIndex) + }, + currentShopBalance() { + const shop = this.currentShop || {} + return shop.balance != null ? shop.balance : (shop.depoBal != null ? shop.depoBal : 0) + }, workerTodayCommission() { if (!this.balanceWorker) return 0 if (this.balanceWorker.todayCommission != null) return this.balanceWorker.todayCommission @@ -210,10 +233,10 @@ }, displayRewardLists() { return (this.rewardLists || []).map((item, index) => { - const amountClass = this.amountClass(item.amount) + const amountClass = this.amountClass(item) return Object.assign({}, item, { amountClass, - amountText: this.formatSignedAmount(item.amount), + amountText: this.formatSignedAmount(item), flowIconKey: this.flowIconKey(item.dealingsWay), flowEmoji: this.flowEmoji(item.dealingsWay), delay: (index * 0.04) + 's' @@ -249,7 +272,7 @@ this.balanceWorker = res.result.worker } if(res.result.shop){ - this.balanceShop = res.result.shop + this.balanceShop = Array.isArray(res.result.shop) ? res.result.shop : [res.result.shop] } this.syncActiveWallet() this.$forceUpdate(); @@ -266,15 +289,17 @@ }) }, userCommion(type,commion,item){ + const withdrawAmount = Number(commion) || 0 if(type=='user'){ this.commionUrl = '/app/returnCommission/handleReturnUser' }else if(type=='worker'){ this.commionUrl = '/app/returnCommission/handleReturnWorker' }else{ this.commionUrl = '/app/returnCommission/handleReturn' - this.shopId = item.id + this.shopId = item && item.id } - this.commionAmount = commion + this.commionAmount = this.formatMoney(withdrawAmount) + this.withdrawMaxAmount = withdrawAmount this.commionType = type this.submittingWithdraw = false this.withdrawRequestId = this.createWithdrawRequestId() @@ -298,6 +323,9 @@ if (this.activeWalletType === 'shop' && this.activeShopIndex >= this.shopWallets.length) { this.activeShopIndex = 0 } + if (this.activeWalletType !== 'shop') { + this.activeShopIndex = 0 + } this.setCurrentLinkId() }, setCurrentLinkId(){ @@ -319,13 +347,21 @@ switchWallet(type){ if (this.activeWalletType === type) return this.activeWalletType = type + if (type === 'shop' && this.activeShopIndex >= this.shopWallets.length) { + this.activeShopIndex = 0 + } this.setCurrentLinkId() }, switchShop(index){ if (this.activeShopIndex === index) return this.activeShopIndex = index + this.activeWalletType = 'shop' this.setCurrentLinkId() }, + getShopName(shop, index) { + if (!shop) return `店铺${index + 1}` + return shop.shopName || shop.name || shop.storeName || shop.merchantName || `店铺${index + 1}` + }, loadMoreFlow(){ if (this.searchForm.pageNum >= this.totalPages) return this.searchForm.pageNum += 1 @@ -338,8 +374,17 @@ return } const amount = Number(this.commionAmount) - if(!amount || amount < 1 || amount > 5000){ - that.tui.toast('单笔提现金额应在1-5000之间') + const maxAmount = Number(this.withdrawMaxAmount) || 0 + if(!amount || amount < 1){ + that.tui.toast('提现金额不能小于1元') + return + } + if(amount > 5000){ + that.tui.toast('单笔提现金额不能超过5000元') + return + } + if(amount > maxAmount){ + that.tui.toast('提现金额不能超过可提现金额') return } if(!this.aliName){ @@ -399,13 +444,16 @@ if (!isFinite(num)) return '0.00' return num.toFixed(2) }, - amountClass(amount){ - return Number(amount) < 0 ? 'outcome' : 'income' + isIncomeFlow(item){ + return item && Number(item.dealingsType) === 0 }, - formatSignedAmount(amount){ - const num = Number(amount) + amountClass(item){ + return this.isIncomeFlow(item) ? 'income' : 'outcome' + }, + formatSignedAmount(item){ + const num = Number(item && item.amount) if (!isFinite(num)) return '+0.00' - const prefix = num < 0 ? '-' : '+' + const prefix = this.isIncomeFlow(item) ? '+' : '-' return prefix + Math.abs(num).toFixed(2) }, flowIconKey(title) { @@ -452,8 +500,13 @@ rewardList(){ this.loadStatus = 'loading' let that = this - this.searchForm.linkUserId = this.linkId; - that.tui.request("/mall/coupon/selectRewardByRegionId", "POST", this.searchForm, false, false).then((res) => { + const params = Object.assign({}, this.searchForm, { + linkUserId: this.linkId + }) + if (this.activeWalletType === 'user') { + params.excludeDealingsWay = '免单奖励' + } + that.tui.request("/mall/coupon/selectRewardByRegionId", "POST", params, false, false).then((res) => { that.loadStatus = 'nomore'; if (res.code == 200) { that.totalPages = res.result.pages @@ -480,17 +533,20 @@