Commit 39fdbc98 authored by xiexiuxing's avatar xiexiuxing

merge:合并合同功能调整

parent 865dad23
......@@ -145,8 +145,8 @@ export const supplierColumns = [
* 第二个内容
*/
export const goodcolumns: any = [
{ title: intl.formatMessage({id: 'contract.wuliaobianhao'}), dataIndex: 'code', align: 'left', },
{ title: intl.formatMessage({id: 'contract.wuliaomingcheng'}), dataIndex: 'name', key: 'name', align: 'left', },
{ title: intl.formatMessage({id: 'contract.huohao'}), dataIndex: 'code', align: 'left', },
{ title: intl.formatMessage({id: 'contract.huopinmingcheng'}), dataIndex: 'name', key: 'name', align: 'left', },
{ title: intl.formatMessage({id: 'contract.guigexinghao'}), dataIndex: 'type', align: 'left', },
{
title: intl.formatMessage({id: 'contract.pinlei'}), dataIndex: 'type', align: 'left',
......
......@@ -72,7 +72,7 @@ const ContractText = (props: any) => {
/* 生成电子合同 */
const generate = () => {
if (!Templatel.id) {
message.info(intl.formatMessage({ id: 'contract.qingxianxuanzehetongmoban' }))
message.info(intl.formatMessage({id: 'contract.qingxianxuanzehetongmoban'}))
} else {
const param = {
contractTemplateId: Templatel.id,
......@@ -98,14 +98,13 @@ const ContractText = (props: any) => {
const beforeDocUpload = (file: any) => {
const isLt20M = file.size / 1024 / 1024 < 20;
if (!isLt20M) {
message.error(intl.formatMessage({ id: 'contract.shangchuanwenjiandaxiaobuchao' }));
message.error(intl.formatMessage({id: 'contract.shangchuanwenjiandaxiaobuchao'}));
}
return isLt20M;
}
// 上传回调
const handleChange = ({ fileList }) => {
if (fileList[0].response) {
console.log(fileList[0])
if (fileList[0].response.code === 1000) {
Templatel.name = fileList[0].name
Templatel.fileName = fileList[0].name
......@@ -120,21 +119,21 @@ const ContractText = (props: any) => {
width: '100%',
}}
>
<Form.Item label={intl.formatMessage({ id: 'contract.hetongmuban' })} labelAlign="left" labelCol={{ span: 2 }}>
<Form.Item label={intl.formatMessage({id: 'contract.hetongmuban'})} labelAlign="left" labelCol={{ span: 2 }}>
<Select
style={{ width: 600 }}
options={TemplatePage}
placeholder={intl.formatMessage({ id: 'contract.qingxuanzehetongmuban' })}
placeholder={intl.formatMessage({id: 'contract.qingxuanzehetongmuban'})}
onChange={(e) => getTemplate(e)}
>
</Select>
{
checkNick && <Button type='link' onClick={() => generate()}>{intl.formatMessage({ id: 'contract.shengchenghetong' })}</Button>
checkNick && <Button type='link' onClick={() => generate()}>{intl.formatMessage({id: 'contract.shengchenghetong'})}</Button>
}
</Form.Item>
{
Object.keys(Templatel).length != 0 &&
<Form.Item label={intl.formatMessage({ id: 'contract.hetongwenben' })} labelAlign="left" labelCol={{ span: 2 }}>
<Form.Item label={intl.formatMessage({id: 'contract.hetongwenben'})} labelAlign="left" labelCol={{ span: 2 }}>
<div className={styles.upload_item} style={{ width: 680 }}>
<div className={styles.upload_left} style={{ width: 600 }} onClick={() => onDownload()}>
<FileWordFilled />
......@@ -148,18 +147,17 @@ const ContractText = (props: any) => {
beforeUpload={beforeDocUpload}
onChange={handleChange}
accept='.doc,.docx'
maxCount={1}
>
<div className={styles.uploadIconBtn}>
<Button type='link' >{intl.formatMessage({ id: 'contract.shangchuanhetong' })}</Button>
<Button type='link' >{intl.formatMessage({id: 'contract.shangchuanhetong'})}</Button>
</div>
</Upload>
</div>
</Form.Item>
}
<Form.Item label={intl.formatMessage({ id: 'contract.dianzihetong' })} labelAlign="left" labelCol={{ span: 2 }}>
<Form.Item label={intl.formatMessage({id: 'contract.dianzihetong'})} labelAlign="left" labelCol={{ span: 2 }}>
<Checkbox checked={checkNick} onChange={onCheckboxChange}>
{intl.formatMessage({ id: 'contract.shiyongdianzihetong' })}
{intl.formatMessage({id: 'contract.shiyongdianzihetong'})}
</Checkbox>
</Form.Item>
</div>
......
......@@ -432,14 +432,14 @@ const Details = (props: any) => {
<div className='ant-card-head'>
<div className='ant-card-head-wrapper'>
<div className='ant-card-head-wrapper'>
{contractText.isUseElectronicContract ? intl.formatMessage({ id: 'contract.dianzihetong' }) : intl.formatMessage({ id: 'contract.zhizhihetong' })}
{intl.formatMessage({ id: 'contract.dianzihetong' })}
</div>
</div>
</div>
<div className='ant-card-body'>
<div className={style.upload_item} style={{ width: 680 }}>
<div className='ant-card-head-wrapper'>
{contractText.isUseElectronicContract ? intl.formatMessage({ id: 'contract.dianzihetong' }) : intl.formatMessage({ id: 'contract.zhizhihetong' })}
{intl.formatMessage({ id: 'contract.dianzihetong' })}
</div>
<div className={style.upload_left} onClick={() => onDownload(contractText)} style={{ width: 600, cursor: 'pointer' }}>
<FileWordFilled />
......
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