master #1
@@ -98,7 +98,7 @@ const normalizeMoneyString = (money: unknown) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const DealerWithdraw: React.FC = () => {
|
const DealerWithdraw: React.FC = () => {
|
||||||
const [activeTab, setActiveTab] = useState<string | number>('0')
|
const [activeTab, setActiveTab] = useState<string>('0')
|
||||||
const [loading, setLoading] = useState<boolean>(false)
|
const [loading, setLoading] = useState<boolean>(false)
|
||||||
const [refreshing, setRefreshing] = useState<boolean>(false)
|
const [refreshing, setRefreshing] = useState<boolean>(false)
|
||||||
const [submitting, setSubmitting] = useState<boolean>(false)
|
const [submitting, setSubmitting] = useState<boolean>(false)
|
||||||
@@ -114,10 +114,11 @@ const DealerWithdraw: React.FC = () => {
|
|||||||
// Tab 切换处理函数
|
// Tab 切换处理函数
|
||||||
const handleTabChange = (value: string | number) => {
|
const handleTabChange = (value: string | number) => {
|
||||||
console.log('Tab切换到:', value)
|
console.log('Tab切换到:', value)
|
||||||
setActiveTab(value)
|
const next = String(value)
|
||||||
|
setActiveTab(next)
|
||||||
|
|
||||||
// 如果切换到提现记录页面,刷新数据
|
// 如果切换到提现记录页面,刷新数据
|
||||||
if (String(value) === '1') {
|
if (next === '1') {
|
||||||
fetchWithdrawRecords()
|
fetchWithdrawRecords()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -628,13 +629,12 @@ const DealerWithdraw: React.FC = () => {
|
|||||||
<View className="bg-gray-50 min-h-screen">
|
<View className="bg-gray-50 min-h-screen">
|
||||||
<Tabs value={activeTab} onChange={handleTabChange}>
|
<Tabs value={activeTab} onChange={handleTabChange}>
|
||||||
<Tabs.TabPane title="申请提现" value="0">
|
<Tabs.TabPane title="申请提现" value="0">
|
||||||
{renderWithdrawForm()}
|
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
|
|
||||||
<Tabs.TabPane title="提现记录" value="1">
|
<Tabs.TabPane title="提现记录" value="1">
|
||||||
{renderWithdrawRecords()}
|
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
{activeTab === '0' ? renderWithdrawForm() : renderWithdrawRecords()}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ const DealerIndex: React.FC = () => {
|
|||||||
{dealerUser && (
|
{dealerUser && (
|
||||||
<View className="mx-4 -mt-6 rounded-xl p-4 relative z-10" style={cardGradients.elevated}>
|
<View className="mx-4 -mt-6 rounded-xl p-4 relative z-10" style={cardGradients.elevated}>
|
||||||
<View className="mb-4">
|
<View className="mb-4">
|
||||||
<Text className="font-semibold text-gray-800">工资统计</Text>
|
<Text className="font-semibold text-gray-800">配送提成</Text>
|
||||||
</View>
|
</View>
|
||||||
<View className="grid grid-cols-3 gap-3">
|
<View className="grid grid-cols-3 gap-3">
|
||||||
<View className="text-center p-3 rounded-lg flex flex-col" style={{
|
<View className="text-center p-3 rounded-lg flex flex-col" style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user