Commit 20273a0c authored by leimo's avatar leimo

Merge branch '220418-fix' into 'v2-220418'

fix: 添加确认通知单的loading See merge request linkseeks-design/pro-platform!402
parents 54bea867 2e4acd49
......@@ -66,6 +66,10 @@ interface CustomizedModalProps {
* (非必填) 取消按钮文字自定义
*/
cancelText?: string,
/**
* 确定loading
*/
loading: boolean
}
const CustomizedModal: React.FC<CustomizedModalProps> = (props) => {
......@@ -105,6 +109,7 @@ const CustomizedModal: React.FC<CustomizedModalProps> = (props) => {
cancelText={props?.okText || ModalCancelText}
onOk={onOk}
onCancel={onCancel}
confirmLoading={props.loading}
>
<Form form={form}>
<Form.Item
......
......@@ -68,10 +68,13 @@ const DeliveryNoticeAwaitDetails: React.FC = () => {
isPass: values.isPass === 1,
remark: values.reason
}
setLoading(true)
postOrderDeliveryNoticeOrderConfirm(params).then(({ code }) => {
if (code === 1000) {
history.goBack()
}
}).finally(() => {
setLoading(false)
})
}
......@@ -91,7 +94,7 @@ const DeliveryNoticeAwaitDetails: React.FC = () => {
<AuthButton btnCode='deliveryNoticeAwait.confirm'>
{
(type === PAGE_TYPE.CONFIRM && details.status === STATUS.WAIT_CONFIRM) && (
<Button loading={loading} onClick={() => setModalVisible(true)} type='primary'>提交</Button>
<Button onClick={() => setModalVisible(true)} type='primary'>提交</Button>
)
}
</AuthButton>
......@@ -153,6 +156,7 @@ const DeliveryNoticeAwaitDetails: React.FC = () => {
radioGroup={[{ label: '确认', value: 1, isReason: false }, { label: '不确认', value: 2, isReason: true }]}
onSubmit={(values) => modalSubmit(values)}
onCancel={(visible: boolean) => setModalVisible(visible)}
loading={loading}
/>
</AnchorPage>
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment