diff --git a/package1/address/addressList.vue b/package1/address/addressList.vue index 1e7bda4..b3fefc8 100644 --- a/package1/address/addressList.vue +++ b/package1/address/addressList.vue @@ -1,8 +1,10 @@ @@ -1415,53 +1415,41 @@ } return list; }, + getAppointmentEndTime(date) { + const endTime = new Date(date); + const fallbackEndTime = new Date(date); + fallbackEndTime.setHours(23, 0, 0, 0); + const endStr = this.shopItem.shopTakeaway && this.shopItem.shopTakeaway.businessHourEnd; + const parts = String(endStr || '').split(':').map(Number); + if (parts.length < 2 || isNaN(parts[0]) || isNaN(parts[1])) { + return fallbackEndTime; + } + endTime.setHours(parts[0], parts[1], 0, 0); + endTime.setMinutes(endTime.getMinutes() + 20); + return endTime > fallbackEndTime ? fallbackEndTime : endTime; + }, generateDeliveryTimes() { const now = new Date(); const today = new Date(now); - const tomorrow = new Date(now); - tomorrow.setDate(tomorrow.getDate() + 1); // 星期几 const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']; const todayWeekday = weekdays[today.getDay()]; const todayStr = `今天 (${todayWeekday})`; - // 明天的日期格式:月-日(不补零) - const month = tomorrow.getMonth() + 1; - const day = tomorrow.getDate(); - const tomorrowStr = `${month}-${day}`; - // ----- 生成今天的时间列表 ----- - const todayTimelist = [{ - timestr: '自动送达' - }]; - const earliestTime = new Date(now); earliestTime.setMinutes(earliestTime.getMinutes() + this.getEffectiveDeliveryDurationMinutes()); const todayStartTime = this.getNextDeliverySlot(earliestTime); - const todayEndTime = new Date(today); - todayEndTime.setHours(23, 40, 0, 0); - todayTimelist.push(...this.buildDeliveryTimeList(todayStartTime, todayEndTime)); - - // ----- 生成明天的时间列表(全天 00:00 ~ 23:40,每 20 分钟一档)----- - const tomorrowStartTime = new Date(tomorrow); - tomorrowStartTime.setHours(0, 0, 0, 0); - const tomorrowEndTime = new Date(tomorrow); - tomorrowEndTime.setHours(23, 40, 0, 0); - const tomorrowTimelist = this.buildDeliveryTimeList(tomorrowStartTime, tomorrowEndTime); + const todayEndTime = this.getAppointmentEndTime(today); + const todayTimelist = this.buildDeliveryTimeList(todayStartTime, todayEndTime); this.content = [{ - id: 'today', - timezh: todayStr, - timelist: todayTimelist - }, - { - id: 'tomorrow', - timezh: tomorrowStr, - timelist: tomorrowTimelist - } - ]; + id: 'today', + timezh: todayStr, + timelist: todayTimelist + }]; }, //时间选择器点击后 timeCallback(val) { diff --git a/package1/order/orderDetail.vue b/package1/order/orderDetail.vue index c4c5893..8d0e4c6 100644 --- a/package1/order/orderDetail.vue +++ b/package1/order/orderDetail.vue @@ -67,16 +67,18 @@ - - - - - + - + + + + + + + + @@ -187,7 +189,7 @@ - + @@ -444,12 +446,12 @@ {{orderDetail.shopAddress == undefined ? '' : orderDetail.shopAddress}} - - + 收件地址 - + {{orderDetail.receiverAddress == undefined ? '' : orderDetail.receiverAddress}} @@ -482,7 +484,7 @@ - 下单时间 + 创建时间 {{orderDetail.createTime | formatTime}} @@ -610,7 +612,7 @@ + v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.finishTime == null && (orderDetail.deliveryInfo.status == 0 || orderDetail.deliveryInfo.status == 1 || orderDetail.deliveryInfo.status == 2)"> 预计送达时间 @@ -973,6 +975,12 @@ payAmountText() { let amount = Number(this.orderDetail.totalAmount || 0); return amount ? amount.toFixed(2) : '0.00'; + }, + isStatusAddressLong() { + let address = this.orderDetail.deliveryInfo && this.orderDetail.deliveryInfo.receiverAddress + ? this.orderDetail.deliveryInfo.receiverAddress + : ''; + return String(address).length > 20; } }, components: { @@ -2200,6 +2208,10 @@ box-sizing: border-box; } + .order-detail-content-address-long { + padding-top: 456rpx; + } + .title-sreach { width: 100%; display: flex; @@ -2464,6 +2476,8 @@ color: #243f38; line-height: 40rpx; word-break: break-all; + max-height: 80rpx; + overflow: hidden; } .status-address-label { @@ -2476,6 +2490,10 @@ min-width: 0; word-break: break-all; overflow-wrap: break-word; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; } .status-btn { @@ -3166,27 +3184,44 @@ display: flex; align-items: center; justify-content: center; - flex-wrap: wrap; + flex-wrap: nowrap; width: 90%; margin: 40rpx auto; + overflow-x: auto; + overflow-y: hidden; + white-space: nowrap; + } + + .kaituan-member-list { + display: flex; + align-items: center; + justify-content: flex-start; + flex-wrap: nowrap; + } + + .kaituan-empty-list { + display: flex; + align-items: center; + flex-wrap: nowrap; } .kaituan221 { + flex: 0 0 90rpx; min-width: 90rpx; margin: 12rpx 18rpx; } - .kaituan-plus-list { - display: flex; - align-items: center; - justify-content: center; - flex-wrap: wrap; - gap: 14rpx; + .kaituan-member-icon { + width: 90rpx; + height: 90rpx; + border-radius: 90rpx; + margin: 0 auto; + display: block; } - .kaituan-plus-list .weipincheng1 { + .kaituan-member-list .weipincheng1 { flex: 0 0 90rpx; - margin: 0; + margin: 12rpx 18rpx; } .kaituan31 { diff --git a/package1/order/returnOrder.vue b/package1/order/returnOrder.vue index 4405155..5eae863 100644 --- a/package1/order/returnOrder.vue +++ b/package1/order/returnOrder.vue @@ -501,18 +501,28 @@ } return Number(((couponAmount + freeAmount) / allAmount).toFixed(4)) }, - updateRefundShowAmount() { - let refundAmount = this.toAmount(this.returnData.refundAmount) + isPartialRefundType() { + return this.sellTime == 0 || this.sellTime == 1 || this.returnData.refundType == 1 || this.returnData.refundType == 2 + }, + getRefundApplyAmount() { + let originRefundAmount = this.toAmount(this.returnData.refundAmount) + let refundAmount = originRefundAmount if (this.sellTime == 0 || this.sellTime == 1 || this.returnData.refundType == 1 || this.returnData.refundType == 2) { let ratio = this.getRefundRatio() refundAmount = refundAmount - refundAmount * ratio } let refundShowAmount = Number(refundAmount.toFixed(2)) + if (this.isPartialRefundType() && originRefundAmount > 0 && refundShowAmount <= 0.01) { + refundShowAmount = 0.01 + } let totalAmount = this.toAmount(this.orderDetail.totalAmount) if (this.orderDetail.totalAmount != null && refundShowAmount > totalAmount) { refundShowAmount = totalAmount } - this.refundShowAmount = refundShowAmount + return refundShowAmount + }, + updateRefundShowAmount() { + this.refundShowAmount = this.getRefundApplyAmount() }, pictureAdd(id, huan) { let that = this @@ -593,10 +603,13 @@ }); return; } + let submitData = Object.assign({}, this.returnData, { + refundAmount: this.getRefundApplyAmount() + }) uni.showLoading({ title: '提交售后中...' }); - this.tui.request("/mall/refund/create", "POST", this.returnData, false, false).then(res => { + this.tui.request("/mall/refund/create", "POST", submitData, false, false).then(res => { uni.hideLoading(); if (res.code == 200) { uni.redirectTo({