forked from gxwebsoft/mp-10550
refactor(ticket): 重构订单管理界面和地址修改逻辑
- 移除30天地址修改冷却限制功能 - 删除相关的历史订单查询和地址锁定逻辑 - 将订单状态检查逻辑简化为统一的待配送检查函数 - 在编辑模式下验证订单是否可修改 - 调整按钮文本从"去购买水票"改为"确定下单" - 优化订单操作按钮的位置和显示逻辑 - 移除地址修改限制相关的UI提示和状态管理
This commit is contained in:
@@ -748,37 +748,6 @@ const UserTicketList = () => {
|
||||
<View className="mt-1">
|
||||
<Text className="text-xs text-gray-500">下单时间:{formatDateTime(item.createTime)}</Text>
|
||||
</View>
|
||||
{item.id ? (
|
||||
<View className="mt-3 flex justify-end gap-2">
|
||||
<Button
|
||||
size="small"
|
||||
disabled={
|
||||
!isTicketOrderPendingDelivery(item) ||
|
||||
!!orderCancelLoadingById[item.id as number]
|
||||
}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
void handleOrderModify(item);
|
||||
}}
|
||||
>
|
||||
修改订单
|
||||
</Button>
|
||||
<Button
|
||||
size="small"
|
||||
type="danger"
|
||||
disabled={
|
||||
!isTicketOrderPendingDelivery(item) ||
|
||||
!!orderCancelLoadingById[item.id as number]
|
||||
}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
void handleOrderCancel(item);
|
||||
}}
|
||||
>
|
||||
取消订单
|
||||
</Button>
|
||||
</View>
|
||||
) : null}
|
||||
{/*{item.storeName ? (*/}
|
||||
{/* <View className="mt-1 text-xs text-gray-500">*/}
|
||||
{/* <Text>门店:{item.storeName}</Text>*/}
|
||||
@@ -815,6 +784,38 @@ const UserTicketList = () => {
|
||||
</Button>
|
||||
</View>
|
||||
) : null}
|
||||
|
||||
{item.id ? (
|
||||
<View className="mt-3 flex justify-end gap-2">
|
||||
<Button
|
||||
size="small"
|
||||
disabled={
|
||||
!isTicketOrderPendingDelivery(item) ||
|
||||
!!orderCancelLoadingById[item.id as number]
|
||||
}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
void handleOrderModify(item);
|
||||
}}
|
||||
>
|
||||
修改订单
|
||||
</Button>
|
||||
<Button
|
||||
size="small"
|
||||
type="danger"
|
||||
disabled={
|
||||
!isTicketOrderPendingDelivery(item) ||
|
||||
!!orderCancelLoadingById[item.id as number]
|
||||
}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
void handleOrderCancel(item);
|
||||
}}
|
||||
>
|
||||
取消订单
|
||||
</Button>
|
||||
</View>
|
||||
) : null}
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user