Commit c31dd1a9 authored by alwayOnlie's avatar alwayOnlie

强制上传合同模板修改字段

parent 86597f84
...@@ -57,7 +57,7 @@ const ContractText = (props: any) => { ...@@ -57,7 +57,7 @@ const ContractText = (props: any) => {
id: 0, id: 0,
templateId: Templatel.id, templateId: Templatel.id,
isUseElectronicContract: checkNick ? 1 : 0, isUseElectronicContract: checkNick ? 1 : 0,
contractName: Templatel.name, contractName: Templatel.fileName,
contractUrl: Templatel.fileUrl ? Templatel.fileUrl : Templatel.fileExampleUrl, contractUrl: Templatel.fileUrl ? Templatel.fileUrl : Templatel.fileExampleUrl,
contractFlag: contractFlag, contractFlag: contractFlag,
} }
...@@ -108,7 +108,6 @@ const ContractText = (props: any) => { ...@@ -108,7 +108,6 @@ const ContractText = (props: any) => {
Templatel.name = fileList[0].name Templatel.name = fileList[0].name
Templatel.fileName = fileList[0].name Templatel.fileName = fileList[0].name
Templatel.fileUrl = fileList[0].response.data Templatel.fileUrl = fileList[0].response.data
console.log(Templatel, '上传成功执行的')
setTemplatel({ ...Templatel }) setTemplatel({ ...Templatel })
} }
} }
...@@ -137,7 +136,7 @@ const ContractText = (props: any) => { ...@@ -137,7 +136,7 @@ const ContractText = (props: any) => {
<div className={styles.upload_item} style={{ width: 680 }}> <div className={styles.upload_item} style={{ width: 680 }}>
<div className={styles.upload_left} style={{ width: 600 }} onClick={() => onDownload()}> <div className={styles.upload_left} style={{ width: 600 }} onClick={() => onDownload()}>
<FileWordFilled /> <FileWordFilled />
<span>{Templatel.name}</span> <span>{Templatel.fileName}</span>
</div> </div>
<Upload <Upload
......
...@@ -56,7 +56,7 @@ const ContractText = (props: any) => { ...@@ -56,7 +56,7 @@ const ContractText = (props: any) => {
id: Templatel.T_emplateId ? Templatel.T_emplateId : 0, id: Templatel.T_emplateId ? Templatel.T_emplateId : 0,
templateId: Templatel.templateId ? Templatel.templateId : Templatel.id, templateId: Templatel.templateId ? Templatel.templateId : Templatel.id,
isUseElectronicContract: checkNick ? 1 : 0, isUseElectronicContract: checkNick ? 1 : 0,
contractName: Templatel.name, contractName: Templatel.fileName,
contractUrl: Templatel.fileExampleUrl ? Templatel.fileExampleUrl : Templatel.contractUrl contractUrl: Templatel.fileExampleUrl ? Templatel.fileExampleUrl : Templatel.contractUrl
} }
resolve(contractText) resolve(contractText)
...@@ -68,7 +68,7 @@ const ContractText = (props: any) => { ...@@ -68,7 +68,7 @@ const ContractText = (props: any) => {
}, []) }, [])
useEffect(() => { useEffect(() => {
if (ctText != null) { if (ctText != null) {
ctText.name = ctText.contractName; ctText.fileName = ctText.contractName;
ctText.T_emplateId = ctText.id; ctText.T_emplateId = ctText.id;
ctText.id = ctText.templateId; ctText.id = ctText.templateId;
setCheckNick(ctText.isUseElectronicContract ? true : false) setCheckNick(ctText.isUseElectronicContract ? true : false)
...@@ -144,7 +144,7 @@ const ContractText = (props: any) => { ...@@ -144,7 +144,7 @@ const ContractText = (props: any) => {
<div className={styles.upload_item} style={{ width: 680 }}> <div className={styles.upload_item} style={{ width: 680 }}>
<div className={styles.upload_left} style={{ width: 600 }}> <div className={styles.upload_left} style={{ width: 600 }}>
<FileWordFilled /> <FileWordFilled />
<span>{Templatel.name}</span> <span>{Templatel.fileName}</span>
</div> </div>
<Upload <Upload
action="/api/file/file/upload" action="/api/file/file/upload"
......
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