Commit 28c6681a authored by alwayOnlie's avatar alwayOnlie

dom站的bug

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