mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-14 17:41:45 +08:00
发票撤销申请
This commit is contained in:
@@ -83,6 +83,24 @@ function InvoiceDetail() {
|
||||
)
|
||||
}
|
||||
|
||||
const handleCancel = async () => {
|
||||
const { confirm } = await Taro.showModal({
|
||||
title: '提示',
|
||||
content: '确认撤销申请吗?',
|
||||
cancelText: '取消',
|
||||
confirmColor: colorPrimary,
|
||||
confirmText: '确认'
|
||||
})
|
||||
if (confirm) {
|
||||
api.trade.updateInvoice({
|
||||
invoice_id: info?.id,
|
||||
invoice_status: 'cancel'
|
||||
})
|
||||
Taro.eventCenter.trigger('onEventInvoiceStatusChange')
|
||||
Taro.navigateBack()
|
||||
}
|
||||
}
|
||||
|
||||
const renderStatus = () => {
|
||||
const statusMap = {
|
||||
'pending': '待开票',
|
||||
@@ -117,6 +135,12 @@ function InvoiceDetail() {
|
||||
</View>
|
||||
)}
|
||||
|
||||
{info?.invoice_status === 'pending' && (
|
||||
<View className='btn-wrap__item' onClick={() => handleCancel()}>
|
||||
撤销申请
|
||||
</View>
|
||||
)}
|
||||
|
||||
{info?.invoice_status === 'pending' && (
|
||||
<View
|
||||
className='btn-wrap__item'
|
||||
|
||||
Reference in New Issue
Block a user