fix(ticket): 修复编辑模式下按钮文本显示问题

- 在无可用票据条件判断中添加编辑模式检查
- 根据编辑模式动态显示按钮文本为"确定修改"或"确定下单"
- 确保编辑模式下购买按钮也显示正确的操作文本
This commit is contained in:
2026-03-11 16:23:24 +08:00
parent e58a2fd915
commit 37ab933849

View File

@@ -1109,7 +1109,7 @@ const OrderConfirm = () => {
setTicketPopupVisible(true) setTicketPopupVisible(true)
}} }}
/> />
{noUsableTickets && ( {(noUsableTickets && !isEditMode) && (
<Cell <Cell
title={<Text className="text-gray-500"></Text>} title={<Text className="text-gray-500"></Text>}
description="购买水票后即可在这里直接下单送水" description="购买水票后即可在这里直接下单送水"
@@ -1186,7 +1186,7 @@ const OrderConfirm = () => {
<Empty description="暂无可用水票" /> <Empty description="暂无可用水票" />
<View className="mt-4 flex justify-center"> <View className="mt-4 flex justify-center">
<Button type="primary" onClick={goBuyTickets}> <Button type="primary" onClick={goBuyTickets}>
{isEditMode ? '确定修改' : '确定下单'}
</Button> </Button>
</View> </View>
</View> </View>
@@ -1268,13 +1268,13 @@ const OrderConfirm = () => {
</View> </View>
</div> </div>
<div className={'buy-btn mx-4'}> <div className={'buy-btn mx-4'}>
{noUsableTickets ? ( {noUsableTickets ? (
<Button type="primary" size="large" onClick={goBuyTickets}> <Button type="primary" size="large" onClick={goBuyTickets}>
{isEditMode ? '确定修改' : '确定下单'}
</Button> </Button>
) : ( ) : (
<Button <Button
type="success" type="success"
size="large" size="large"
loading={submitLoading || deliveryRangeChecking} loading={submitLoading || deliveryRangeChecking}
disabled={ disabled={