Merge branch 'dev' of https://e.coding.net/tsteam/ai-rz-web/ai-copyright into dev
This commit is contained in:
commit
82d446ffe2
@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react'
|
||||
import {useState} from 'react'
|
||||
import {post, Axios, get} from "../../util/AjaxUtils.ts";
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
import {
|
||||
@ -8,6 +8,7 @@ import {
|
||||
} from 'antd';
|
||||
import ContractText from '../ContractText/ContractText'
|
||||
import {useDispatch} from 'react-redux'
|
||||
|
||||
export default function ContractModal(props: any) {
|
||||
const [messageApi, messageApiHolder] = useMessage();
|
||||
const [modalOpen, setModalOpen] = useState(false)
|
||||
@ -15,6 +16,7 @@ export default function ContractModal(props: any) {
|
||||
const [name, setName] = useState(''); // 甲方姓名状态
|
||||
const [phone, setPhone] = useState(''); // 电话状态
|
||||
const [address, setAddress] = useState(''); // 地址状态
|
||||
const [isSaving, setIsSaving] = useState(false);
|
||||
const onFinish = (values: any) => {
|
||||
setName(values.name);
|
||||
setPhone(values.phone);
|
||||
@ -48,6 +50,9 @@ export default function ContractModal(props: any) {
|
||||
})
|
||||
}
|
||||
const downContract = () => {
|
||||
if (isSaving) {
|
||||
return;
|
||||
}
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/contract/management/save`,
|
||||
@ -57,7 +62,7 @@ export default function ContractModal(props: any) {
|
||||
firstPartyPhone: phone
|
||||
},
|
||||
onBefore() {
|
||||
|
||||
setIsSaving(true);
|
||||
},
|
||||
onSuccess(data) {
|
||||
// console.log(data.data.data);
|
||||
@ -67,10 +72,9 @@ export default function ContractModal(props: any) {
|
||||
getContractArray(1)
|
||||
setModalOpen(false)
|
||||
props.closeModal()
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
setIsSaving(false);
|
||||
}
|
||||
})
|
||||
|
||||
@ -170,7 +174,6 @@ export default function ContractModal(props: any) {
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<Form.Item>
|
||||
<div className='refunModal-btn'>
|
||||
<Button type="primary" htmlType="submit" style={{
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import './ContractText.css'
|
||||
export default function ContractText(props: any) {
|
||||
const height = window.innerHeight - 200;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { // Table,
|
||||
Pagination,
|
||||
Table,
|
||||
|
Loading…
Reference in New Issue
Block a user