wangfukang 1 month ago
parent
commit
d4f2f90029
  1. 47
      package1/buyFood/buyFood.vue
  2. 33
      package1/order/orderDetail.vue
  3. 6
      package1/order/orderList.vue
  4. 25
      package1/order/returnOrder.vue
  5. 10
      package1/planet/adventure.vue
  6. 3
      package1/planet/pkHall.vue

47
package1/buyFood/buyFood.vue

@ -259,9 +259,9 @@
</view> </view>
<uni-icons type="right" size="14" color="#999" style="margin-left:10rpx;"></uni-icons> <uni-icons type="right" size="14" color="#999" style="margin-left:10rpx;"></uni-icons>
</view> </view>
<view class="fee-row" v-if="isPaotui"> <view class="fee-row" v-if="packageFee > 0">
<view class="fee-label"> <view class="fee-label">
打包 餐盒
</view> </view>
<view class="fee-value"> <view class="fee-value">
{{packageFee.toFixed(2)}} {{packageFee.toFixed(2)}}
@ -269,12 +269,20 @@
</view> </view>
<view class="fee-row" v-if="isPaotui"> <view class="fee-row" v-if="isPaotui">
<view class="fee-label"> <view class="fee-label">
配送费 <text class="fee-tip" v-if="isFaceToFace">(均摊 | 如超过2人每多一人配送费总额增加0.5)</text> 配送费
</view> </view>
<view class="fee-value"> <view class="fee-value">
{{deliveryFeeCalc.toFixed(2)}} {{deliveryFeeCalc.toFixed(2)}}
</view> </view>
</view> </view>
<view class="fee-row" v-if="isPaotui && isFaceToFace">
<view class="fee-label">
<text class="fee-tip">如指定配送员2人团以上每多一人配送费总额增加0.5</text>
</view>
<view class="fee-value">
配送费均摊
</view>
</view>
<view class="fee-row" v-if="isPaotui ==false && !isStoreGroupOrder"> <view class="fee-row" v-if="isPaotui ==false && !isStoreGroupOrder">
<view class="fee-label" style="color: #ff5722;font-size: 24rpx;padding: 14rpx 0 18rpx;"> <view class="fee-label" style="color: #ff5722;font-size: 24rpx;padding: 14rpx 0 18rpx;">
立即出餐-(拼团单拼团成功后立即出餐) 立即出餐-(拼团单拼团成功后立即出餐)
@ -290,13 +298,13 @@
用餐方式 用餐方式
</view> </view>
<view class="pack-options"> <view class="pack-options">
<view class="pack-option" @tap="isPack = 0"> <view class="pack-option" @tap="checkPack(0)">
<view :class="isPack === 0 ? 'radio-check' : 'radio-no-check'"> <view :class="isPack === 0 ? 'radio-check' : 'radio-no-check'">
<uni-icons v-if="isPack === 0" type="checkmarkempty" size="14"></uni-icons> <uni-icons v-if="isPack === 0" type="checkmarkempty" size="14"></uni-icons>
</view> </view>
堂食 堂食
</view> </view>
<view class="pack-option" @tap="isPack = 1"> <view class="pack-option" @tap="checkPack(1)">
<view :class="isPack === 1 ? 'radio-check' : 'radio-no-check'"> <view :class="isPack === 1 ? 'radio-check' : 'radio-no-check'">
<uni-icons v-if="isPack === 1" type="checkmarkempty" size="14"></uni-icons> <uni-icons v-if="isPack === 1" type="checkmarkempty" size="14"></uni-icons>
</view> </view>
@ -537,6 +545,8 @@
<script> <script>
import deliveryTimeOp from '@/package1/components/delivery-time-op/delivery-time-op.vue' import deliveryTimeOp from '@/package1/components/delivery-time-op/delivery-time-op.vue'
import addressList from '@/package1/address/addressList.vue' import addressList from '@/package1/address/addressList.vue'
import { requireLoginToCurrentPage } from '@/utils/authRedirect.js'
import { buildGroupHomeSharePath } from '@/utils/sharePath.js'
export default { export default {
data() { data() {
return { return {
@ -618,7 +628,6 @@
this.isPaotui = false; this.isPaotui = false;
this.nowMake = false; this.nowMake = false;
this.isPack = 0; this.isPack = 0;
this.totalPackageFee = 0;
} }
if (this.supportShopDelivery) { if (this.supportShopDelivery) {
this.selected = 'shopDelivery'; this.selected = 'shopDelivery';
@ -655,6 +664,7 @@
return 0; return 0;
}, },
packageFee() { packageFee() {
if (!this.isPaotui && this.isPack !== 1) return 0;
if (this.totalPackageFee > 0) return this.totalPackageFee; if (this.totalPackageFee > 0) return this.totalPackageFee;
let fee = 0; let fee = 0;
if (this.isGroupBuy && this.groupItem && this.groupItem.item) { if (this.isGroupBuy && this.groupItem && this.groupItem.item) {
@ -708,7 +718,7 @@
if(this.isPaotui==true){ if(this.isPaotui==true){
return this.goodsAmountCalc + this.packageFee + this.deliveryFeeCalc; return this.goodsAmountCalc + this.packageFee + this.deliveryFeeCalc;
}else{ }else{
return this.goodsAmountCalc; return this.goodsAmountCalc + this.packageFee;
} }
}, },
deliveryDurationMinutes() { deliveryDurationMinutes() {
@ -763,15 +773,18 @@
if (this.isPaymentSuccessGroupInitiate) { if (this.isPaymentSuccessGroupInitiate) {
let groupId = this.createdOrderInfo.groupInfo.id; let groupId = this.createdOrderInfo.groupInfo.id;
let targetMembers = this.groupItem?.groupRule?.groupCount || 2; let targetMembers = this.groupItem?.groupRule?.groupCount || 2;
let shopItemStr = encodeURIComponent(JSON.stringify(this.shopItem));
let isFTF = this.isFaceToFace ? 1 : 0; let isFTF = this.isFaceToFace ? 1 : 0;
let shopId = this.createdOrderInfo.shopId || this.shopItem.id || this.shopItem.shopId || '';
let sceneQuery = this.isStoreGroupOrder ? '&orderScene=storeGroup' : '';
let path = `/package2/group/groupBuySingle?type=shop&item=${shopItemStr}&groupId=${groupId}&targetMembers=${targetMembers}&isFaceToFace=${isFTF}${sceneQuery}`;
return { return {
title: '我发起了一个拼团,快来一起拼单吧!', title: '我发起了一个拼团,快来一起拼单吧!',
path: path, path: buildGroupHomeSharePath({
shopId: shopId,
groupId: groupId,
targetMembers: targetMembers,
isFaceToFace: isFTF,
orderScene: this.isStoreGroupOrder ? 'storeGroup' : ''
}),
imageUrl:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/62c9aa038b2541ad9c400a76ddae7ef8.png' imageUrl:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/62c9aa038b2541ad9c400a76ddae7ef8.png'
} }
} }
@ -788,6 +801,11 @@
nowMakeMethod(){ nowMakeMethod(){
this.nowMake = !this.nowMake this.nowMake = !this.nowMake
}, },
checkPack(type) {
if (this.isPack === type) return;
this.isPack = type;
this.fetchCoupons();
},
formatCommissionValue(value) { formatCommissionValue(value) {
let amount = parseFloat(value); let amount = parseFloat(value);
if (isNaN(amount) || amount < 0.1) { if (isNaN(amount) || amount < 0.1) {
@ -940,6 +958,7 @@
return arr.join(','); return arr.join(',');
}, },
submitPay() { submitPay() {
if (!requireLoginToCurrentPage()) return;
if (this.currentOrderId) { if (this.currentOrderId) {
uni.redirectTo({ uni.redirectTo({
url: '/package1/order/orderDetail?id=' + this.currentOrderId url: '/package1/order/orderDetail?id=' + this.currentOrderId
@ -1223,11 +1242,11 @@
let deliveryType = this.isStoreGroupOrder ? 2 : (this.isPaotui ? 1 : 2); let deliveryType = this.isStoreGroupOrder ? 2 : (this.isPaotui ? 1 : 2);
let payload = { let payload = {
userId: uni.getStorageSync('id') || 'test-user123', userId: uni.getStorageSync('id'),
shopId: this.shopItem.id, shopId: this.shopItem.id,
deliveryType: deliveryType, deliveryType: deliveryType,
isPack: this.isStoreGroupOrder ? 0 : (this.isPaotui ? 1 : this.isPack), isPack: this.isStoreGroupOrder ? 0 : (this.isPaotui ? 1 : this.isPack),
packageFee: this.isPaotui && !this.isStoreGroupOrder ? this.packageFee : 0, packageFee: this.packageFee,
remark: this.remark, remark: this.remark,
items: items, items: items,
receiverName: this.formData.address ? this.formData.address.receiverName : '', receiverName: this.formData.address ? this.formData.address.receiverName : '',

33
package1/order/orderDetail.vue

@ -184,7 +184,7 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<view class="order-flow"> <view class="order-flow" v-if="orderDetail.status != 6">
<view class="flow-item active"> <view class="flow-item active">
<view class="flow-dot"></view> <view class="flow-dot"></view>
<view class="flow-name">{{orderDetail.status == 0 ? '待支付' : '已下单'}}</view> <view class="flow-name">{{orderDetail.status == 0 ? '待支付' : '已下单'}}</view>
@ -280,7 +280,7 @@
<text>X{{item3.quantity}}</text> <text>X{{item3.quantity}}</text>
<text>{{item3.price}}</text> <text>{{item3.price}}</text>
</view> </view>
<view class="refund-goods-bottom" v-if="item3.packageFee != undefined && item3.packageFee > 0"> <view class="refund-goods-bottom" v-if="item3.packageFee != undefined && item3.packageFee > 0 && orderDetail.packageFee > 0">
<text>餐盒费</text> <text>餐盒费</text>
<text>{{item3.packageFee}}</text> <text>{{item3.packageFee}}</text>
</view> </view>
@ -407,10 +407,10 @@
</view> </view>
</view> </view>
</view> </view>
<view <view v-if="orderDetail.status != 6"
style="display: flex;height: 80rpx;line-height: 100rpx;border-top: 1px solid #eee;font-size: 32rpx;font-weight: 700;"> style="display: flex;height: 80rpx;line-height: 100rpx;border-top: 1px solid #eee;font-size: 32rpx;font-weight: 700;">
<view style="flex: 1;"> <view style="flex: 1;">
实付 {{orderDetail.status == 0 ? '待支付' : '实付'}}
</view> </view>
<view class=""> <view class="">
{{orderDetail.totalAmount == undefined ? '' : orderDetail.totalAmount}} {{orderDetail.totalAmount == undefined ? '' : orderDetail.totalAmount}}
@ -761,7 +761,8 @@
</view> </view>
<view class="cancel-section"> <view class="cancel-section">
<view class="cancel-section-title">取消原因</view> <view class="cancel-section-title">取消原因</view>
<textarea class="cancel-textarea" placeholder="请选择或填写取消原因" v-model="returnData.reason"></textarea> <textarea class="cancel-textarea" placeholder="请选择或填写取消原因" maxlength="50"
v-model="returnData.reason" @input="onReturnReasonInput"></textarea>
</view> </view>
<view class="cancel-section"> <view class="cancel-section">
<view class="cancel-section-title">上传图片</view> <view class="cancel-section-title">上传图片</view>
@ -898,6 +899,7 @@
</template> </template>
<script> <script>
import { buildGroupHomeSharePath } from '@/utils/sharePath.js'
export default { export default {
data() { data() {
return { return {
@ -1028,14 +1030,17 @@
let that = this let that = this
let groupId = that.orderDetail.groupInfo.id; let groupId = that.orderDetail.groupInfo.id;
let targetMembers = that.orderDetail.groupInfo.targetMembers; let targetMembers = that.orderDetail.groupInfo.targetMembers;
let shopItemStr = encodeURIComponent(JSON.stringify(that.shopItem));
let isFTF = that.orderDetail.orderType == 3 ? 1 : 0; let isFTF = that.orderDetail.orderType == 3 ? 1 : 0;
let path = let shopId = that.orderDetail.shopId || that.shopItem.id || '';
`/package2/group/groupBuySingle?type=shop&item=${shopItemStr}&groupId=${groupId}&targetMembers=${targetMembers}&isFaceToFace=${isFTF}`;
return { return {
title: '快来一起拼单吧!', title: '快来一起拼单吧!',
path: path, path: buildGroupHomeSharePath({
shopId: shopId,
groupId: groupId,
targetMembers: targetMembers,
isFaceToFace: isFTF
}),
imageUrl: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/62c9aa038b2541ad9c400a76ddae7ef8.png' imageUrl: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/62c9aa038b2541ad9c400a76ddae7ef8.png'
} }
}, },
@ -1190,7 +1195,14 @@
} else { } else {
this.selectedCancelReasonOptions.splice(index, 1); this.selectedCancelReasonOptions.splice(index, 1);
} }
this.returnData.reason = this.selectedCancelReasonOptions.join('、'); this.returnData.reason = this.limitReasonText(this.selectedCancelReasonOptions.join('、'));
},
limitReasonText(value) {
return String(value || '').slice(0, 50);
},
onReturnReasonInput(e) {
this.returnData.reason = this.limitReasonText(e.detail.value);
return this.returnData.reason;
}, },
makeCall(phone) { makeCall(phone) {
uni.makePhoneCall({ uni.makePhoneCall({
@ -1337,6 +1349,7 @@
this.$refs.returnPopup.close(); this.$refs.returnPopup.close();
let item = this.payData let item = this.payData
let that = this let that = this
this.returnData.reason = this.limitReasonText(this.returnData.reason)
that.tui.request("/mall/order/cancel", "POST", { that.tui.request("/mall/order/cancel", "POST", {
refundType: this.refundType, refundType: this.refundType,
refundTypeStatus: this.refundTypeStatus, refundTypeStatus: this.refundTypeStatus,

6
package1/order/orderList.vue

@ -162,12 +162,12 @@
</view> </view>
</view> </view>
</view> </view>
<view style="height: 80rpx;border-bottom: 1px solid rgba(247, 248, 248, 0.6);display: flex;line-height: 80rpx;"> <view v-if="item.status != 6" style="height: 80rpx;border-bottom: 1px solid rgba(247, 248, 248, 0.6);display: flex;line-height: 80rpx;">
<view v-if="item.otherOrder == null" style="flex: 1;font-weight: 700;"> <view v-if="item.otherOrder == null" style="flex: 1;font-weight: 700;">
<text v-if="tab1Checked != 'fantuan'">下单时间:</text>{{item.createTime | formatTime}} <text v-if="tab1Checked != 'fantuan'">创建时间:</text>{{item.createTime | formatTime}}
</view> </view>
<view style="font-weight: 700;"> <view style="font-weight: 700;">
<text style="font-size:28rpx;">实付</text><text v-if="tab1Checked == 'fantuan'" style="font-size: 20rpx;color: #777;">含包装/配送费</text> <text <text style="font-size:28rpx;">{{item.status == 0 ? '待支付' : '实付'}}</text><text v-if="tab1Checked == 'fantuan'" style="font-size: 20rpx;color: #777;">含包装/配送费</text> <text
style="color: red;">{{item.totalAmount}}</text> style="color: red;">{{item.totalAmount}}</text>
</view> </view>
</view> </view>

25
package1/order/returnOrder.vue

@ -256,7 +256,8 @@
</view> </view>
<view class="reason-section"> <view class="reason-section">
<view class="reason-section-title">售后原因</view> <view class="reason-section-title">售后原因</view>
<textarea class="reason-textarea" placeholder="请选择或填写售后原因" v-model="returnData.reason"></textarea> <textarea class="reason-textarea" placeholder="请选择或填写售后原因" maxlength="50"
v-model="returnData.reason" @input="onReturnReasonInput"></textarea>
</view> </view>
<view class="reason-section"> <view class="reason-section">
<view class="reason-section-title">上传图片</view> <view class="reason-section-title">上传图片</view>
@ -431,7 +432,14 @@
this.syncReasonText(); this.syncReasonText();
}, },
syncReasonText() { syncReasonText() {
this.returnData.reason = this.selectedReasonOptions.join('、'); this.returnData.reason = this.limitReasonText(this.selectedReasonOptions.join('、'));
},
limitReasonText(value) {
return String(value || '').slice(0, 50);
},
onReturnReasonInput(e) {
this.returnData.reason = this.limitReasonText(e.detail.value);
return this.returnData.reason;
}, },
changeProduct() { changeProduct() {
for (let i = 0; i < this.orderDetail.goodsList.length; i++) { for (let i = 0; i < this.orderDetail.goodsList.length; i++) {
@ -544,6 +552,7 @@
this.sellTime = type; this.sellTime = type;
}, },
submit() { submit() {
this.returnData.reason = this.limitReasonText(this.returnData.reason)
this.returnData.orderId = this.orderDetail.id this.returnData.orderId = this.orderDetail.id
this.returnData.userId = this.orderDetail.userId this.returnData.userId = this.orderDetail.userId
this.returnData.shopId = this.orderDetail.shopId this.returnData.shopId = this.orderDetail.shopId
@ -613,9 +622,13 @@
if ((this.orderDetail.goodsList[index].returnCount + 1) <= this.orderDetail.goodsList[index] if ((this.orderDetail.goodsList[index].returnCount + 1) <= this.orderDetail.goodsList[index]
.quantity) { .quantity) {
this.orderDetail.goodsList[index].returnCount += 1 this.orderDetail.goodsList[index].returnCount += 1
if (this.orderDetail.deliveryType == 1) { if (this.orderDetail.deliveryType == 1 || this.orderDetail.isPack == 1) {
if(this.orderDetail.packageFee > 0){
this.returnData.refundAmount += Number((this.toAmount(this.orderDetail.goodsList[index].price) + this this.returnData.refundAmount += Number((this.toAmount(this.orderDetail.goodsList[index].price) + this
.toAmount(this.orderDetail.goodsList[index].packageFee)).toFixed(2)) .toAmount(this.orderDetail.goodsList[index].packageFee)).toFixed(2))
}else{
this.returnData.refundAmount += this.toAmount(this.orderDetail.goodsList[index].price)
}
} else { } else {
this.returnData.refundAmount += this.toAmount(this.orderDetail.goodsList[index].price) this.returnData.refundAmount += this.toAmount(this.orderDetail.goodsList[index].price)
} }
@ -625,9 +638,13 @@
} }
} else { } else {
if (this.orderDetail.goodsList[index].returnCount > 0) { if (this.orderDetail.goodsList[index].returnCount > 0) {
if (this.orderDetail.deliveryType == 1) { if (this.orderDetail.deliveryType == 1 || this.orderDetail.isPack == 1) {
if(this.orderDetail.packageFee > 0){
this.returnData.refundAmount -= Number((this.toAmount(this.orderDetail.goodsList[index].price) + this this.returnData.refundAmount -= Number((this.toAmount(this.orderDetail.goodsList[index].price) + this
.toAmount(this.orderDetail.goodsList[index].packageFee)).toFixed(2)) .toAmount(this.orderDetail.goodsList[index].packageFee)).toFixed(2))
}else{
this.returnData.refundAmount -= this.toAmount(this.orderDetail.goodsList[index].price)
}
} else { } else {
this.returnData.refundAmount -= this.toAmount(this.orderDetail.goodsList[index].price) this.returnData.refundAmount -= this.toAmount(this.orderDetail.goodsList[index].price)
} }

10
package1/planet/adventure.vue

@ -29,7 +29,7 @@
<view class="rank-overview" v-if="isDailyMode"> <view class="rank-overview" v-if="isDailyMode">
<view class="section-head"> <view class="section-head">
<text>榜单速览</text> <text>今日榜单速览</text>
<text class="reward-record-btn" @tap="openYesterdayRewards">昨日获奖榜单</text> <text class="reward-record-btn" @tap="openYesterdayRewards">昨日获奖榜单</text>
</view> </view>
<view class="rank-mini-grid"> <view class="rank-mini-grid">
@ -229,6 +229,8 @@
</template> </template>
<script> <script>
import { requireLoginToCurrentPage } from '@/utils/authRedirect.js'
import { buildHomeSharePath } from '@/utils/sharePath.js'
export default { export default {
data() { data() {
return { return {
@ -492,13 +494,13 @@
const roomName = (this.pkInfo && this.pkInfo.roomName) || '星球擂台' const roomName = (this.pkInfo && this.pkInfo.roomName) || '星球擂台'
return { return {
title: `星球擂台开战:${roomName}`, title: `星球擂台开战:${roomName}`,
path: '/package1/planet/adventure?mode=pk&roomId=' + this.roomId path: buildHomeSharePath('/package1/planet/adventure?mode=pk&roomId=' + this.roomId)
} }
} }
const collegeParam = this.college ? ('?college=' + encodeURIComponent(this.college)) : '' const collegeParam = this.college ? ('?college=' + encodeURIComponent(this.college)) : ''
return { return {
title: this.college ? `来为${this.college}助力,冲学院排位榜!` : '学院排位赛,来帮学院冲榜', title: this.college ? `来为${this.college}助力,冲学院排位榜!` : '学院排位赛,来帮学院冲榜',
path: '/package1/planet/adventure' + collegeParam path: buildHomeSharePath('/package1/planet/adventure' + collegeParam)
} }
}, },
methods: { methods: {
@ -692,6 +694,7 @@
this.prebuildTimer = null this.prebuildTimer = null
}, },
startLevel() { startLevel() {
if (!requireLoginToCurrentPage()) return
if (this.cleared || this.playing) return if (this.cleared || this.playing) return
if (this.isDailyMode && this.actionLocked) return if (this.isDailyMode && this.actionLocked) return
if (this.isDailyMode) this.actionLocked = true if (this.isDailyMode) this.actionLocked = true
@ -739,6 +742,7 @@
}) })
}, },
startFixedMode() { startFixedMode() {
if (!requireLoginToCurrentPage()) return
if (!this.fixedSeed && this.isPkMode) { if (!this.fixedSeed && this.isPkMode) {
this.checkPkRoomAvailable(() => { this.checkPkRoomAvailable(() => {
this.joinPkRoom(res => { this.joinPkRoom(res => {

3
package1/planet/pkHall.vue

@ -93,6 +93,7 @@
</template> </template>
<script> <script>
import { buildHomeSharePath } from '@/utils/sharePath.js'
export default { export default {
data() { data() {
return { return {
@ -194,7 +195,7 @@
const roomId = room.id || '' const roomId = room.id || ''
return { return {
title: `星球擂台开战:${room.roomName || '同一关卡来PK'}`, title: `星球擂台开战:${room.roomName || '同一关卡来PK'}`,
path: '/package1/planet/adventure?mode=pk&roomId=' + roomId path: buildHomeSharePath('/package1/planet/adventure?mode=pk&roomId=' + roomId)
} }
}, },
methods: { methods: {

Loading…
Cancel
Save