Commit 38072b6cfa378025909788866b6af1f45fbdc3c7
1 parent
ce9b0cfd
fix: 修改草稿箱未显示
Showing
1 changed file
with
41 additions
and
51 deletions
src/pages/Order/OrderList/OrderDrawer.tsx
@@ -768,57 +768,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -768,57 +768,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
768 | }> | 768 | }> |
769 | open | 769 | open |
770 | width={1000} | 770 | width={1000} |
771 | - title={drawerTitle} | ||
772 | - resize={{ | ||
773 | - onResize() { | ||
774 | - console.log('resize!'); | ||
775 | - }, | ||
776 | - maxWidth: window.innerWidth * 0.8, | ||
777 | - minWidth: 400, | ||
778 | - }} | ||
779 | - onFinishFailed={() => { | ||
780 | - message.error('表单项存在错误,请检查'); | ||
781 | - setSubmitBtnLoading(false); | ||
782 | - }} | ||
783 | - submitter={{ | ||
784 | - render: (props) => { | ||
785 | - return [ | ||
786 | - <Button | ||
787 | - key="cancel" | ||
788 | - onClick={() => { | ||
789 | - onClose(); | ||
790 | - }} | ||
791 | - > | ||
792 | - 取消 | ||
793 | - </Button>, | ||
794 | - <Button | ||
795 | - key="localSave" | ||
796 | - loading={localSaveLoading} | ||
797 | - hidden={!optType('add') && !optType('copy')} | ||
798 | - onClick={() => { | ||
799 | - setLocalSaveLoading(true); | ||
800 | - saveFormDataToLocal(); | ||
801 | - }} | ||
802 | - > | ||
803 | - 本地保存 | ||
804 | - </Button>, | ||
805 | - <Button | ||
806 | - key="ok" | ||
807 | - type="primary" | ||
808 | - loading={submitBtnLoading} | ||
809 | - disabled={optType('after-sales-check')} | ||
810 | - onClick={() => { | ||
811 | - setSubmitBtnLoading(true); | ||
812 | - props.submit(); | ||
813 | - }} | ||
814 | - > | ||
815 | - 提交 | ||
816 | - </Button>, | ||
817 | - ]; | ||
818 | - }, | ||
819 | - }} | ||
820 | - form={form} | ||
821 | - autoFocusFirstInput | ||
822 | modalProps={{ | 771 | modalProps={{ |
823 | destroyOnClose: true, | 772 | destroyOnClose: true, |
824 | maskClosable: true, | 773 | maskClosable: true, |
@@ -841,6 +790,47 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -841,6 +790,47 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
841 | </div> | 790 | </div> |
842 | ), | 791 | ), |
843 | }} | 792 | }} |
793 | + onFinishFailed={() => { | ||
794 | + message.error('表单项存在错误,请检查'); | ||
795 | + setSubmitBtnLoading(false); | ||
796 | + }} | ||
797 | + submitter={{ | ||
798 | + render: (props) => [ | ||
799 | + <Button | ||
800 | + key="cancel" | ||
801 | + onClick={() => { | ||
802 | + onClose(); | ||
803 | + }} | ||
804 | + > | ||
805 | + 取消 | ||
806 | + </Button>, | ||
807 | + <Button | ||
808 | + key="localSave" | ||
809 | + loading={localSaveLoading} | ||
810 | + hidden={!optType('add') && !optType('copy')} | ||
811 | + onClick={() => { | ||
812 | + setLocalSaveLoading(true); | ||
813 | + saveFormDataToLocal(); | ||
814 | + }} | ||
815 | + > | ||
816 | + 本地保存 | ||
817 | + </Button>, | ||
818 | + <Button | ||
819 | + key="ok" | ||
820 | + type="primary" | ||
821 | + loading={submitBtnLoading} | ||
822 | + disabled={optType('after-sales-check')} | ||
823 | + onClick={() => { | ||
824 | + setSubmitBtnLoading(true); | ||
825 | + props.submit(); | ||
826 | + }} | ||
827 | + > | ||
828 | + 提交 | ||
829 | + </Button>, | ||
830 | + ], | ||
831 | + }} | ||
832 | + form={form} | ||
833 | + autoFocusFirstInput | ||
844 | submitTimeout={2000} | 834 | submitTimeout={2000} |
845 | onFinish={async (values) => { | 835 | onFinish={async (values) => { |
846 | let res = {}; | 836 | let res = {}; |