wangfukang 2 days ago
parent
commit
3905beaa9a
  1. 81
      package2/myCenter/partTimeJobRegister.vue
  2. 68
      package2/myCenter/wallet.vue
  3. 4
      package2/shop/shopBill.vue
  4. 8
      package2/shop/shopSettlementDetail.vue

81
package2/myCenter/partTimeJobRegister.vue

@ -18,6 +18,7 @@
<input type="text" v-model="formData.name" maxlength="10" placeholder="请填写姓名"
@input="onWorkerNameInput"
style="background: rgba(247, 248, 248, 0.6);height: 80rpx;line-height: 80rpx;padding: 18rpx 20rpx;border-radius: 20rpx;">
<view class="audit-tip" v-if="workerNameAuditTip">{{workerNameAuditTip}}</view>
</view>
</view>
@ -198,8 +199,10 @@
<view class="official-desc">关注后可提现佣金有新订单会及时通知下线后不再接收通知</view>
</view>
</view>
<view class="btn" @click="submit">
{{worker ? '保存规则' : '提交注册'}}
<view class="bottom-action">
<view class="btn" @click="submit">
{{worker ? '保存规则' : '提交注册'}}
</view>
</view>
</view>
<!-- 查看大图弹出层 -->
@ -419,7 +422,8 @@
dispatchPopupVisible: false,
dispatchSaving: false,
zhipaiCheck: false,
pendingNewDispatchRuleKeys: []
pendingNewDispatchRuleKeys: [],
workerNameAuditTip: ''
}
},
components: {
@ -534,8 +538,29 @@
onWorkerNameInput(e) {
const value = this.limitText(e.detail.value, 10)
this.formData.name = value
this.workerNameAuditTip = ''
return value
},
getResponseMessage(res, fallback) {
if (!res) return fallback
if (res.message) return res.message
if (res.msg) return res.msg
if (res.errMsg) return res.errMsg
if (res.data && res.data.message) return res.data.message
if (res.data && res.data.msg) return res.data.msg
return fallback
},
isWorkerNameAuditMessage(message) {
return !!message && (message.indexOf('审核') !== -1 || message.indexOf('不合适') !== -1)
},
showWorkerNameAuditTip(message) {
const tip = message || '姓名内容未通过审核,请修改后再提交'
this.workerNameAuditTip = tip
uni.showToast({
title: tip,
icon: 'none'
})
},
onDefaultRouteRemarkInput(e) {
const value = this.limitText(e.detail.value, 20)
this.defaultRouteRemark = value
@ -868,6 +893,7 @@
},
submit() {
this.formData.name = this.limitText(this.formData.name, 10)
this.workerNameAuditTip = ''
if (!this.formData.name) return uni.showToast({
title: '请填写姓名',
icon: 'none'
@ -948,14 +974,28 @@
if (hasNewRule) worker1.getPushOrder = 1
uni.setStorageSync('worker', worker1)
this.getWorkerMessage(true, hasNewRule)
} else {
const message = this.getResponseMessage(res, '提交失败')
if (this.isWorkerNameAuditMessage(message)) {
this.showWorkerNameAuditTip(message)
} else {
uni.showToast({
title: message,
icon: 'none'
});
}
}
}).catch(err => {
uni.hideLoading();
const message = this.getResponseMessage(err, '提交失败,请稍后再试')
if (this.isWorkerNameAuditMessage(message)) {
this.showWorkerNameAuditTip(message)
} else {
uni.showToast({
title: res.message,
title: message,
icon: 'none'
});
}
}).catch(err => {
uni.hideLoading();
});
},
pictureAdd() {
@ -1054,6 +1094,10 @@
border-radius: 40rpx;
background: #fff;
padding: 16rpx 20rpx;
padding-bottom: 220rpx;
padding-bottom: calc(220rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(220rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
}
.reg-name {
@ -1068,6 +1112,13 @@
margin-top: 10rpx;
}
.audit-tip {
margin-top: 12rpx;
color: #ff3b30;
font-size: 24rpx;
line-height: 34rpx;
}
.img-popup-content {
width: 500rpx;
height: 500rpx;
@ -1433,8 +1484,22 @@
font-weight: 700;
}
.bottom-action {
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 22rpx 20rpx 32rpx;
padding-bottom: calc(32rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(32rpx + env(safe-area-inset-bottom));
background: #fff;
box-shadow: 0 -10rpx 28rpx rgba(0, 35, 28, 0.08);
box-sizing: border-box;
z-index: 20;
}
.btn {
width: 95%;
width: 100%;
height: 100rpx;
font-size: 32rpx;
font-weight: 700;
@ -1442,7 +1507,7 @@
border-radius: 100rpx;
line-height: 100rpx;
text-align: center;
margin: 40rpx auto;
box-shadow: 0 16rpx 36rpx rgba(0, 35, 28, 0.18);
}
.guize-popup-content {

68
package2/myCenter/wallet.vue

@ -137,14 +137,14 @@
<input type="text" v-model="aliName" placeholder="请输入姓名" />
</view>
<view class="popup-field">
<text>支付宝认证手机</text>
<input type="digit" v-model="aliAccount" placeholder="请输入手机号" />
<text>支付宝</text>
<input type="text" v-model.trim="aliAccount" maxlength="64" placeholder="请输入手机号或邮箱" />
</view>
<view class="popup-field">
<text>提现金额</text>
<input type="digit" v-model="commionAmount" placeholder="请输入金额" />
</view>
<view class="popup-btn" :style="{opacity: submittingWithdraw ? 0.6 : 1}" @tap="wxPayment">
<view class="popup-btn" :class="{disabled: submittingWithdraw}" :style="{opacity: submittingWithdraw ? 0.6 : 1}" @tap="wxPayment">
{{submittingWithdraw ? '提现中...' : '确认提现'}}
</view>
</view>
@ -186,6 +186,8 @@
balanceShop:[],
submittingWithdraw: false,
withdrawRequestId: '',
withdrawClickLocked: false,
withdrawClickTimer: null,
showBalance: true,
resolvingSettlementOrderId: false,
skipWalletRefreshOnShow: false,
@ -267,6 +269,11 @@
this.searchForm.pageNum+=1;
this.rewardList();
},
beforeDestroy() {
if (this.withdrawClickTimer) {
clearTimeout(this.withdrawClickTimer)
}
},
methods: {
beginData(){
this.tui.request("/worker/getAllDepo/", "GET", {userId:uni.getStorageSync('id')}, false, true).then((res) => {
@ -295,6 +302,7 @@
})
},
userCommion(type,commion,item){
if (!this.lockWithdrawClick()) return
const withdrawAmount = Number(commion) || 0
if(type=='user'){
this.commionUrl = '/app/returnCommission/handleReturnUser'
@ -314,6 +322,18 @@
createWithdrawRequestId(){
return `${Date.now()}${Math.floor(Math.random() * 1000000)}`
},
lockWithdrawClick(){
if (this.withdrawClickLocked) return false
this.withdrawClickLocked = true
if (this.withdrawClickTimer) {
clearTimeout(this.withdrawClickTimer)
}
this.withdrawClickTimer = setTimeout(() => {
this.withdrawClickLocked = false
this.withdrawClickTimer = null
}, 800)
return true
},
syncActiveWallet(){
if (this.targetWalletType) {
const targetIndex = this.walletTabs.findIndex(tab => tab.key === this.targetWalletType)
@ -375,6 +395,7 @@
},
wxPayment(){
let that = this
if (!this.lockWithdrawClick()) return
if (this.submittingWithdraw) {
that.tui.toast('提现处理中,请勿重复提交')
return
@ -393,20 +414,26 @@
that.tui.toast('提现金额不能超过可提现金额')
return
}
if(!this.aliName){
const aliName = (this.aliName || '').trim()
const aliAccount = (this.aliAccount || '').trim()
if(!aliName){
that.tui.toast('支付宝实名名称不能为空')
return
}
if(!this.aliAccount){
that.tui.toast('支付宝手机号不能为空')
if(!aliAccount){
that.tui.toast('支付宝账号不能为空')
return
}
if(!this.isValidAliAccount(aliAccount)){
that.tui.toast('支付宝账号需为手机号或邮箱')
return
}
this.submittingWithdraw = true
let data = {
id:this.withdrawRequestId || this.createWithdrawRequestId(),
commission:amount,
aliName:this.aliName,
aliAccount:this.aliAccount
aliName:aliName,
aliAccount:aliAccount
}
if(this.commionType == 'user'){
data.userId = this.balanceUser.id
@ -417,12 +444,13 @@
}
that.tui.request(this.commionUrl, "POST", data, false, false).then((res) => {
that.loadStatus = 'nomore';
if (res.code == 200) {
const failMessage = that.getWithdrawErrorMessage(res)
if (res.code == 200 && !failMessage) {
this.$refs.payPopup.close();
this.withdrawRequestId = ''
this.beginData();
} else {
that.tui.toast(res.message)
that.tui.toast(failMessage || '提现失败,请稍后再试')
that.submittingWithdraw = false
return
}
@ -430,9 +458,23 @@
uni.hideLoading()
}).catch((res) => {
that.submittingWithdraw = false
that.tui.toast(res.message)
that.tui.toast(that.getWithdrawErrorMessage(res) || '提现失败,请稍后再试')
})
},
isValidAliAccount(account){
const value = (account || '').trim()
const phoneReg = /^1[3-9]\d{9}$/
const emailReg = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
return phoneReg.test(value) || emailReg.test(value)
},
getWithdrawErrorMessage(res){
if (!res) return ''
const message = res.message || res.msg || ''
const result = res.result || {}
const reason = result.failMessage || result.remark || message
if (res.code != 200 || res.success === false) return reason
return /失败|异常/.test(message) ? reason : ''
},
chooseLinkId(type,item){
if(type == 'user'){
this.linkId = this.balanceUser.id
@ -1375,6 +1417,10 @@
transition: transform 0.16s ease;
}
.popup-btn.disabled {
pointer-events: none;
}
/* ---------- 动画 ---------- */
.enter-card {
animation: cardIn 0.46s ease both;

4
package2/shop/shopBill.vue

@ -30,11 +30,11 @@
</view>
</view>
<view class="summary-card">
<!-- <view class="summary-card">
<view class="summary-title">{{searchForm.status === 0 ? '待结算金额' : '已结算金额'}}</view>
<view class="summary-amount">{{formatMoney(pageTotalAmount)}}</view>
<view class="summary-desc">当前列表共 {{total}} 个账单日</view>
</view>
</view> -->
<view class="bill-list">
<view class="bill-card" v-for="item in dataList" :key="item.billTime" @tap="goDetail(item)">

8
package2/shop/shopSettlementDetail.vue

@ -15,7 +15,7 @@
<view class="content">
<view class="summary-card">
<view class="summary-date">{{query.billTime || '-'}}</view>
<view class="summary-row">
<!-- <view class="summary-row">
<view>
<text>结算金额</text>
<view>{{formatMoney(query.totalSettlementAmount)}}</view>
@ -28,7 +28,7 @@
<view class="summary-mini">
<view>结算基数{{formatMoney(query.totalBaseAmount)}}</view>
<view>平台服务费{{formatMoney(query.totalCommissionAmount)}}</view>
</view>
</view> -->
</view>
<view class="record-list">
@ -43,11 +43,11 @@
</view>
</view>
<view class="record-grid">
<view>
<view v-if="item.type != 2">
<text>结算基数</text>
<view>{{formatMoney(item.baseAmount)}}</view>
</view>
<view>
<view v-if="item.type != 2">
<text>平台抽佣</text>
<view>{{formatMoney(item.commissionAmount)}}</view>
</view>

Loading…
Cancel
Save