Merge branch 'reco' of gitea.51mars.com:Oak-Team/oak-pay-business into reco

This commit is contained in:
Xu Chang 2024-06-11 13:55:03 +08:00
commit 3a0e6d3035
4 changed files with 66 additions and 11 deletions

View File

@ -1,6 +1,17 @@
@import '../../../config/styles/mp/mixins.less';
@import '../../../config/styles/mp/index.less';
.errorContainer {
padding: 48rpx;
background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 40rpx;
}
.container {
height: 100%;
box-sizing: border-box;
@ -93,6 +104,16 @@
}
}
.gotoHistory {
font-size: 32rpx;
color: @oak-color-primary;
margin-top: 56rpx;
text-decoration: underline;
display: flex;
justify-content: flex-end;
align-items: center;
}
.footer {
position: fixed;
width: 100%;

View File

@ -83,6 +83,9 @@ export default OakComponent({
chooseWa: false,
withdrawAccountId: '',
waFilter: undefined as EntityDict['withdrawAccount']['Selection']['filter'],
pickWithdrawChannelMp(id: String) {
this.pickWithdrawChannel(id);
}
},
methods: {
setValue(valueYuan: string | number | null) {
@ -214,6 +217,10 @@ export default OakComponent({
},
goBack() {
this.navigateBack();
},
onGoToHistoryMp() {
const { onGoToHistory } = this.props;
onGoToHistory && onGoToHistory();
}
},
})

View File

@ -1,4 +1,21 @@
<block wx:if="{{withdrawCreate}}">
<block wx:if="{{!withdrawable}}">
<view class="errorContainer">
<oak-icon name="delete_fill" size="48" color="#FF3141" />
<view>{{t('notSetYet')}}</view>
<l-button bind:lintap="goBack">{{t('common::back')}}</l-button>
</view>
</block>
<block wx:elif="{{chooseWa && waFilter}}">
<withdrawAccount-picker
oakPath="$$opb-withdraw-create-wapicker"
oakFilters="{{[waFilter]}}"
onPicker="{{pickWithdrawChannelMp}}"
onCancel="{{restartAll}}"
entity="user"
entityId="{{userId}}"
/>
</block>
<block wx:elif="{{withdrawCreate}}">
<view class="container">
<withdraw-display
withdraw="{{withdrawCreate}}"
@ -10,7 +27,7 @@
size="long"
plain="true"
shape="square"
bind:lintap="clearWithdrawData"
bind:lintap="restartAll"
l-class="cancelBtn"
>
{{t('common::action.cancel')}}
@ -25,12 +42,13 @@
</view>
</view>
</block>
<block wx:elif="{{account && avail > 0}}">
<block wx:elif="{{account}}">
<view class="main">
<view class="label">{{t('label')}}</view>
<view class="input">
<span class="symbol">{{t('common::pay.symbol')}}</span>
<l-input
focus="{{true}}"
hide-label="{{true}}"
showRow="{{false}}"
type="number"
@ -38,16 +56,21 @@
value="{{valueYuan ? valueYuan : undefind}}"
l-input-class="my-input-class"
bind:lininput="InputValueMp"
bind:linconfirm="createWithdrawData"
/>
</view>
<view class="tips">
<view class="tipLine">
<span>{{t('tips.1-1')}}</span>
<span class="value">{{availYuan}}</span>
<span>{{t('tips.1-2')}}</span>
<block wx:if="{{avail > 0}}">
<span class="value" style="text-decoration: underline; margin-left: 16rpx;" bindtap="setValueMp" data-value="{{availYuan}}">{{t('tips.fill')}}</span>
<block wx:if="{{avail>0}}">
<span class="value" style="text-decoration: underline; margin-left: 16rpx;" bindtap="setValueMp" data-value="{{availYuan}}">
<span class="value">{{availYuan}}</span>
</span>
</block>
<block wx:else>
<span class="value">{{availYuan}}</span>
</block>
<span>{{t('tips.1-2')}}</span>
</view>
<view wx:if="{{refundAmount > 0}}" class="tipLine">
<span>{{t('tips.2-1')}}</span>
@ -56,7 +79,7 @@
</view>
<view wx:if="{{manualAmount > 0}}" class="tipLine">
<span>{{t('tips.3-1')}}</span>
<span class="value">{{manualAmountYuan}}</span>
<span class="value">{{manualAmountYuan}}</span>
<span>{{t('tips.3-2')}}</span>
</view>
</view>
@ -72,7 +95,11 @@
<oak-icon wx:else name="unfold" size="18" color="skyblue"/>
<span style="margin-left: 16rpx;color:{{showLossHelp ? 'blue' : 'skyblue'}};">{{t('helps.label.loss')}}</span>
</view>
<view wx:if="{{showLossHelp}}" class="content2">{{t('helps.content.loss')}}</view>
<view wx:if="{{showLossHelp}}" class="content2">{{withdrawLossText}}</view>
</view>
<view class="gotoHistory" bindtap="onGoToHistoryMp">
<oak-icon name="coupons" size="18" color="@oak-color-primary" style="margin-right:8rpx;"/>
<span>{{t('gotoHistory')}}</span>
</view>
<view class="footer">
<l-button

View File

@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { Form, Switch, Input, Select, Selector, Button, Divider } from 'antd-mobile';
import { Form, Switch, Input, Selector, Button, Divider } from 'antd-mobile';
import { PlusCircleOutlined } from '@ant-design/icons';
import { EntityDict } from "../../../oak-app-domain";
import { RowWithActions, WebComponentProps } from "oak-frontend-base";
@ -26,7 +26,7 @@ export default function render(props: WebComponentProps<EntityDict, 'withdrawAcc
{channels && <Form.Item
label={t('withdrawAccount:attr.channel')}
>
<Selector
<Selector
disabled={!channels}
options={channels}
value={channel ? [channel.id!] : undefined}