wangfukang 2 weeks ago
parent
commit
8aec58d463
  1. 6
      package2/myCenter/addGoods.vue
  2. 41
      package2/myCenter/wallet.vue
  3. 2
      package2/partTimeJob/partTimeJobCenter.vue
  4. 3
      package2/shop/orderDetail.vue
  5. 112
      package2/shop/shopOrderList.vue

6
package2/myCenter/addGoods.vue

@ -102,7 +102,7 @@
</view>
</view>
</uni-forms-item>
<view id="lunchBoxField" v-if="shop.merchantType == 1">
<view id="lunchBoxField" v-if="shopMerchantType == 1 && formData.isMoreBuy==0">
<uni-forms-item label="餐盒费" name="lunchBox">
<input type="digit" class="content-input" v-model="formData.lunchBox" placeholder="请输入餐盒费"
:adjust-position="false" :cursor-spacing="160" @focus="focusFormField('lunchBoxField')" @blur="blurFormField">
@ -186,7 +186,7 @@
editorIns: null,
typeItem: {},
menuButtonInfo: {},
shop:{},
shopMerchantType:0,
formData: {
id: '',
shopId: '',
@ -233,7 +233,7 @@
},
onShow() {
this.attrId = uni.getStorageSync('attrId');
this.shop = uni.getStorageSync('shop');
this.shopMerchantType = uni.getStorageSync('shopMerchantType');
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
uni.authorize({
scope: 'scope.writePhotosAlbum',

41
package2/myCenter/wallet.vue

@ -56,7 +56,7 @@
<view class="card-title">配送可提现佣金</view>
<view class="card-value">{{ showBalance ? formatMoney(balanceWorker.depoBalRel) : '••••' }}</view>
<view class="worker-today-line">
今日佣金{{ showBalance ? formatMoney(workerTodayCommission) : '••••' }}<text>次日可提现</text>
今日佣金{{ showBalance ? formatMoney(balanceWorker.depoBal) : '••••' }}<text>次日可提现</text>
</view>
<view class="card-link-btn" @tap.stop="userCommion('worker', balanceWorker.depoBalRel, balanceWorker)">提现</view>
<view class="card-illus">🛵</view>
@ -92,7 +92,7 @@
</view>
<view class="timeline-list">
<view class="flow-card" v-for="(item,index) in displayRewardLists" :key="index" :style="{animationDelay: item.delay}">
<view class="flow-card" :class="{clickable: canOpenShopOrder(item)}" v-for="(item,index) in displayRewardLists" :key="index" :style="{animationDelay: item.delay}" @tap="handleFlowTap(item)">
<view class="flow-icon" :class="'type-' + item.flowIconKey">
<text>{{item.flowEmoji}}</text>
</view>
@ -187,6 +187,8 @@
submittingWithdraw: false,
withdrawRequestId: '',
showBalance: true,
resolvingSettlementOrderId: false,
skipWalletRefreshOnShow: false,
}
},
computed: {
@ -251,6 +253,10 @@
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
if (this.skipWalletRefreshOnShow) {
this.skipWalletRefreshOnShow = false
return
}
this.balanceUser = 0
this.balanceWorker = 0
this.balanceShop = []
@ -497,6 +503,33 @@
toggleBalance() {
this.showBalance = !this.showBalance
},
canOpenShopOrder(item) {
if (this.activeWalletType !== 'shop' || !item || !item.linkId) return false
const text = item.dealingsWay || ''
return text.indexOf('商家结算') !== -1 || text.indexOf('商家退款') !== -1 || text.indexOf('售后扣款') !== -1
},
handleFlowTap(item) {
if (!this.canOpenShopOrder(item)) return
if (this.resolvingSettlementOrderId) return
this.resolvingSettlementOrderId = true
this.tui.request("/mall/order/orderIdBySettlementRecord/" + item.linkId, "GET", {}, false, true).then((res) => {
if (res.code == 200 && res.result) {
this.skipWalletRefreshOnShow = true
uni.navigateTo({
url: '/package2/shop/orderDetail?id=' + res.result,
fail: () => {
this.skipWalletRefreshOnShow = false
}
})
} else {
this.tui.toast(res.message || '未找到关联订单')
}
this.resolvingSettlementOrderId = false
}).catch((res) => {
this.tui.toast(res && res.message ? res.message : '未找到关联订单')
this.resolvingSettlementOrderId = false
})
},
rewardList(){
this.loadStatus = 'loading'
let that = this
@ -1136,6 +1169,10 @@
border-bottom: 0;
}
.flow-card.clickable:active {
opacity: 0.72;
}
.flow-icon {
flex: none;
width: 88rpx;

2
package2/partTimeJob/partTimeJobCenter.vue

@ -363,7 +363,7 @@
.shop-title {
width: 92%;
margin: -86rpx auto 0;
margin: -70rpx auto 0;
padding: 26rpx;
background:
radial-gradient(circle at 92% 14%, rgba(166, 255, 234, 0.5), rgba(166, 255, 234, 0) 150rpx),

3
package2/shop/orderDetail.vue

@ -516,7 +516,8 @@
return this.toAmount(shopTakeaway.commissionRateMore);
},
getSettlementNet(baseAmount, commissionBaseAmount, commissionRate) {
let commission = this.roundAmount(this.toAmount(commissionBaseAmount) * this.toAmount(commissionRate) / 100);
let commissionAmount = this.toAmount(commissionBaseAmount) * this.toAmount(commissionRate) / 100;
let commission = Math.round((commissionAmount + Number.EPSILON) * 100) / 100;
let settlement = this.roundAmount(this.toAmount(baseAmount) - commission);
return {
commission,

112
package2/shop/shopOrderList.vue

@ -21,6 +21,20 @@
</view>
</view>
</view>
<view class="date-filter">
<picker class="date-picker" mode="date" :value="searchForm.startDate" @change="handleStartDateChange">
<view class="date-picker-text" :class="{ 'placeholder': !searchForm.startDate }">
{{searchForm.startDate || '开始日期'}}
</view>
</picker>
<text class="date-separator"></text>
<picker class="date-picker" mode="date" :value="searchForm.endDate" @change="handleEndDateChange">
<view class="date-picker-text" :class="{ 'placeholder': !searchForm.endDate }">
{{searchForm.endDate || '结束日期'}}
</view>
</picker>
<view class="date-clear" v-if="searchForm.startDate || searchForm.endDate" @tap="clearDateFilter">重置</view>
</view>
</view>
<view class="shop-order-fixed-holder"></view>
<view class="box1" @tap="goDetail(item)" v-for="(item,index) in orderList" :key="index">
@ -142,6 +156,8 @@
pageSize: 10,
shopName: '',
searchStatus: 10,
startDate: '',
endDate: '',
shopId: uni.getStorageSync('shopId'),
regionId: JSON.parse(uni.getStorageSync('area')).id
},
@ -453,6 +469,35 @@
this.searchForm.searchStatus = index
this.getList()
},
handleStartDateChange(e) {
const value = e.detail.value
if (this.searchForm.endDate && value > this.searchForm.endDate) {
this.tui.toast('开始日期不能晚于结束日期')
return
}
this.searchForm.startDate = value
this.searchByDateRange()
},
handleEndDateChange(e) {
const value = e.detail.value
if (this.searchForm.startDate && value < this.searchForm.startDate) {
this.tui.toast('结束日期不能早于开始日期')
return
}
this.searchForm.endDate = value
this.searchByDateRange()
},
searchByDateRange() {
if (!this.searchForm.startDate || !this.searchForm.endDate) return
this.searchForm.pageNum = 1
this.getList()
},
clearDateFilter() {
this.searchForm.startDate = ''
this.searchForm.endDate = ''
this.searchForm.pageNum = 1
this.getList()
},
back() {
uni.navigateBack()
},
@ -486,20 +531,20 @@
}
.shop-order-fixed-holder {
height: 376rpx;
height: 356rpx;
}
.title {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat;
width: 100%;
height: 200rpx;
height: 176rpx;
background-size: 100% 100%;
}
.title-sreach {
width: 100%;
display: flex;
height: 200rpx;
height: 176rpx;
position: relative;
}
@ -519,7 +564,7 @@
.title-tab {
display: flex;
margin: 0 auto;
margin: 15 auto;
background: #F5F8F5;
}
@ -530,13 +575,13 @@
align-items: center;
padding: 0 0;
width: 100%;
min-height: 176rpx;
min-height: 112rpx;
}
.status-item {
flex: 0 0 20%;
text-align: center;
padding: 20rpx 0;
padding: 10rpx 0;
position: relative;
box-sizing: border-box;
transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
@ -545,10 +590,10 @@
}
.status-text {
font-size: 28rpx;
font-size: 26rpx;
color: #666666;
font-weight: normal;
line-height: 1.4;
line-height: 1.3;
transition: color 0.2s, font-weight 0.2s;
}
@ -572,6 +617,57 @@
transition: width 0.2s ease;
}
.date-filter {
display: flex;
align-items: center;
width: 92%;
height: 68rpx;
margin: 0 auto;
padding: 0 16rpx;
box-sizing: border-box;
border-radius: 18rpx;
background: #fff;
box-shadow: 0 8rpx 20rpx rgba(0, 35, 28, 0.06);
}
.date-picker {
flex: 1;
min-width: 0;
}
.date-picker-text {
width: 100%;
height: 48rpx;
line-height: 48rpx;
border-radius: 14rpx;
background: #F5F8F5;
color: #00231C;
font-size: 24rpx;
text-align: center;
}
.date-picker-text.placeholder {
color: #7a8582;
}
.date-separator {
margin: 0 16rpx;
color: #7a8582;
font-size: 24rpx;
}
.date-clear {
margin-left: auto;
padding: 0 14rpx;
height: 48rpx;
line-height: 48rpx;
border-radius: 14rpx;
background: rgba(255, 107, 53, 0.1);
color: #ff6b35;
font-size: 24rpx;
font-weight: 700;
}
.box1 {
width: 92%;
margin: 20rpx auto;

Loading…
Cancel
Save