Commit 156d708b authored by XieZhiXiong's avatar XieZhiXiong
parents 05dc8b11 c31dd1a9
......@@ -57,7 +57,7 @@ const ContractText = (props: any) => {
id: 0,
templateId: Templatel.id,
isUseElectronicContract: checkNick ? 1 : 0,
contractName: Templatel.name,
contractName: Templatel.fileName,
contractUrl: Templatel.fileUrl ? Templatel.fileUrl : Templatel.fileExampleUrl,
contractFlag: contractFlag,
}
......@@ -108,7 +108,6 @@ const ContractText = (props: any) => {
Templatel.name = fileList[0].name
Templatel.fileName = fileList[0].name
Templatel.fileUrl = fileList[0].response.data
console.log(Templatel, '上传成功执行的')
setTemplatel({ ...Templatel })
}
}
......@@ -137,7 +136,7 @@ const ContractText = (props: any) => {
<div className={styles.upload_item} style={{ width: 680 }}>
<div className={styles.upload_left} style={{ width: 600 }} onClick={() => onDownload()}>
<FileWordFilled />
<span>{Templatel.name}</span>
<span>{Templatel.fileName}</span>
</div>
<Upload
......
......@@ -56,7 +56,7 @@ const ContractText = (props: any) => {
id: Templatel.T_emplateId ? Templatel.T_emplateId : 0,
templateId: Templatel.templateId ? Templatel.templateId : Templatel.id,
isUseElectronicContract: checkNick ? 1 : 0,
contractName: Templatel.name,
contractName: Templatel.fileName,
contractUrl: Templatel.fileExampleUrl ? Templatel.fileExampleUrl : Templatel.contractUrl
}
resolve(contractText)
......@@ -68,7 +68,7 @@ const ContractText = (props: any) => {
}, [])
useEffect(() => {
if (ctText != null) {
ctText.name = ctText.contractName;
ctText.fileName = ctText.contractName;
ctText.T_emplateId = ctText.id;
ctText.id = ctText.templateId;
setCheckNick(ctText.isUseElectronicContract ? true : false)
......@@ -144,7 +144,7 @@ const ContractText = (props: any) => {
<div className={styles.upload_item} style={{ width: 680 }}>
<div className={styles.upload_left} style={{ width: 600 }}>
<FileWordFilled />
<span>{Templatel.name}</span>
<span>{Templatel.fileName}</span>
</div>
<Upload
action="/api/file/file/upload"
......
......@@ -86,8 +86,7 @@ const AddContract: React.FC<parmas> = (props) => {
/**提交数据 */
const onSubmit = async () => {
await form.validateFields().then(res => {
console.log(uploadFile.name)
if (uploadFile.name) {
if (uploadFile.name && uploadFile.file) {
const parmas = {
name: res.name,
version: res.version,
......
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