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 { ...@@ -66,6 +66,10 @@ interface CustomizedModalProps {
* (非必填) 取消按钮文字自定义 * (非必填) 取消按钮文字自定义
*/ */
cancelText?: string, cancelText?: string,
/**
* 确定loading
*/
loading: boolean
} }
const CustomizedModal: React.FC<CustomizedModalProps> = (props) => { const CustomizedModal: React.FC<CustomizedModalProps> = (props) => {
...@@ -105,6 +109,7 @@ const CustomizedModal: React.FC<CustomizedModalProps> = (props) => { ...@@ -105,6 +109,7 @@ const CustomizedModal: React.FC<CustomizedModalProps> = (props) => {
cancelText={props?.okText || ModalCancelText} cancelText={props?.okText || ModalCancelText}
onOk={onOk} onOk={onOk}
onCancel={onCancel} onCancel={onCancel}
confirmLoading={props.loading}
> >
<Form form={form}> <Form form={form}>
<Form.Item <Form.Item
......
...@@ -68,10 +68,13 @@ const DeliveryNoticeAwaitDetails: React.FC = () => { ...@@ -68,10 +68,13 @@ const DeliveryNoticeAwaitDetails: React.FC = () => {
isPass: values.isPass === 1, isPass: values.isPass === 1,
remark: values.reason remark: values.reason
} }
setLoading(true)
postOrderDeliveryNoticeOrderConfirm(params).then(({ code }) => { postOrderDeliveryNoticeOrderConfirm(params).then(({ code }) => {
if (code === 1000) { if (code === 1000) {
history.goBack() history.goBack()
} }
}).finally(() => {
setLoading(false)
}) })
} }
...@@ -91,7 +94,7 @@ const DeliveryNoticeAwaitDetails: React.FC = () => { ...@@ -91,7 +94,7 @@ const DeliveryNoticeAwaitDetails: React.FC = () => {
<AuthButton btnCode='deliveryNoticeAwait.confirm'> <AuthButton btnCode='deliveryNoticeAwait.confirm'>
{ {
(type === PAGE_TYPE.CONFIRM && details.status === STATUS.WAIT_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> </AuthButton>
...@@ -153,6 +156,7 @@ const DeliveryNoticeAwaitDetails: React.FC = () => { ...@@ -153,6 +156,7 @@ const DeliveryNoticeAwaitDetails: React.FC = () => {
radioGroup={[{ label: '确认', value: 1, isReason: false }, { label: '不确认', value: 2, isReason: true }]} radioGroup={[{ label: '确认', value: 1, isReason: false }, { label: '不确认', value: 2, isReason: true }]}
onSubmit={(values) => modalSubmit(values)} onSubmit={(values) => modalSubmit(values)}
onCancel={(visible: boolean) => setModalVisible(visible)} onCancel={(visible: boolean) => setModalVisible(visible)}
loading={loading}
/> />
</AnchorPage> </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