Commit 28c6681a authored by alwayOnlie's avatar alwayOnlie

dom站的bug

parent 94cd3f55
......@@ -260,6 +260,11 @@ const AddInfo = (props: any) => {
const disabledDate = (current) => {
return current && current < moment().endOf('day');
}
const onSetKey = (e, key) => {
const basicsData = basics;
basicsData[key] = e.target.value;
setBasics({ ...basicsData })
}
return (
<div className={style.revise_info}>
<Form
......@@ -294,7 +299,7 @@ const AddInfo = (props: any) => {
},
]}
>
<Input placeholder='请输入请款单摘要' />
<Input placeholder='请输入请款单摘要' onChange={(e) => onSetKey(e, 'applyAbstract')} />
</Form.Item>
<Form.Item
label="合同编号"
......@@ -445,7 +450,7 @@ const AddInfo = (props: any) => {
},
]}
>
<TextArea placeholder='最长160字符,80个汉字' maxLength={160} style={{ height: 72 }} />
<TextArea onChange={(e) => onSetKey(e, 'remark')} placeholder='最长160字符,80个汉字' maxLength={160} style={{ height: 72 }} />
</Form.Item>
<Form.Item label="单据时间" labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
......
......@@ -276,7 +276,6 @@ const FormList = (props: any) => {
width: 120,
}}
onChange={(e) => setInput(e, 'bidCount', index)}
addonBefore="¥"
defaultValue={text ? text : ''}
disabled={Object.keys(Row).length != 0 ? true : false}
/>
......@@ -287,7 +286,7 @@ const FormList = (props: any) => {
dataIndex: 'bidAmount',
key: 'bidAmount',
align: 'center',
render: (text: any, record: any) => <Text>{record.bidAmount}</Text>
render: (text: any, record: any) => <Text>{record.bidAmount}</Text>
},
];
......
......@@ -6,6 +6,7 @@ import styles from '../index.less'
import {
FileWordFilled,
} from '@ant-design/icons'
import { UPLOAD_TYPE } from '@/constants'
const ContractText = (props: any) => {
const { currentRef, memberId } = props;
......@@ -101,12 +102,13 @@ const ContractText = (props: any) => {
return isLt20M;
}
// 上传回调
const handleChange = ({ file }) => {
console.log(file.response)
if (file.response) {
if (file.response.code === 1000) {
Templatel.fileUrl = file.response.data
setTemplatel(Templatel)
const handleChange = ({ fileList }) => {
if (fileList[0].response) {
if (fileList[0].response.code === 1000) {
Templatel.name = fileList[0].name
Templatel.fileUrl = fileList[0].response.data
console.log(Templatel, '上传成功执行的')
setTemplatel({ ...Templatel })
}
}
}
......@@ -139,11 +141,11 @@ const ContractText = (props: any) => {
<Upload
action="/api/file/file/upload"
data={{ fileType: 1 }}
data={{ fileType: UPLOAD_TYPE }}
showUploadList={false}
accept='.doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx'
beforeUpload={beforeDocUpload}
onChange={handleChange}
accept='.doc,.docx'
>
<div className={styles.uploadIconBtn}>
<Button type='link' >上传合同</Button>
......
......@@ -132,12 +132,16 @@ const Details = (props: any) => {
* 流转进度点击
*/
const handleBatchChange = (e, key) => {
let StepList = e.target.value == 1 ? outerTaskStepList : innerTaskStepList;
setStepList(StepList)
console.log(key)
if (key == 'Steps') {
let StepList = e.target.value == 1 ? outerTaskStepList : innerTaskStepList;
setCurrentBatch(e.target.value);
setStepList(StepList)
return;
} else {
setTimeout(() => {
setlistIndex(e.target.value)
}, 100);
setTimeout(() => {
ref.current.reload();
}, 300);
......@@ -472,7 +476,7 @@ const Details = (props: any) => {
</div>
<div className={style.upload_left} onClick={() => onDownload(contractText)} style={{ width: 600, cursor: 'pointer' }}>
<FileWordFilled />
<span>{contractText.contractName}.pdf</span>
<span>{contractText.contractName}</span>
</div>
</div>
</div>
......
......@@ -123,7 +123,6 @@ const FormList = (props: any) => {
width: 120,
}}
onChange={(e) => setInput(e, 'bidCount', index)}
addonBefore="¥"
defaultValue={text ? text : ''}
disabled
/>
......@@ -134,7 +133,7 @@ const FormList = (props: any) => {
dataIndex: 'bidAmount',
key: 'bidAmount',
align: 'center',
render: (text: any, record: any) => <Text>{record.bidAmount}</Text>
render: (text: any, record: any) => <Text>¥{record.bidAmount}</Text>
},
];
useEffect(() => {
......
......@@ -5,6 +5,7 @@ import { Button, Select, Form, Checkbox, message, Upload } from 'antd'
import styles from '../index.less'
import { PublicApi } from '@/services/api';
import { UPLOAD_TYPE } from '@/constants'
import {
FileWordFilled,
} from '@ant-design/icons'
......@@ -85,12 +86,13 @@ const ContractText = (props: any) => {
return isLt20M;
}
// 上传回调
const handleChange = ({ file }) => {
console.log(file.response)
if (file.response) {
if (file.response.code === 1000) {
Templatel.fileUrl = file.response.data
setTemplatel(Templatel)
const handleChange = ({ fileList }) => {
if (fileList[0].response) {
if (fileList[0].response.code === 1000) {
Templatel.name = fileList[0].name
Templatel.fileUrl = fileList[0].response.data
console.log(Templatel, '上传成功执行的')
setTemplatel({ ...Templatel })
}
}
}
......@@ -146,11 +148,11 @@ const ContractText = (props: any) => {
</div>
<Upload
action="/api/file/file/upload"
data={{ fileType: 1 }}
data={{ fileType: UPLOAD_TYPE }}
showUploadList={false}
accept='.doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx'
beforeUpload={beforeDocUpload}
onChange={handleChange}
accept='.doc,.docx'
>
<div className={styles.uploadIconBtn}>
<Button type='link' >上传合同</Button>
......
......@@ -47,6 +47,7 @@ const AddContract: React.FC<parmas> = (props) => {
name: fileList[0].name,
file: fileList[0].response.data
}
console.log(file)
setloading(false);
setFileUrl(fileList[0].response.data);
setUploadFile(file);
......
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