Commit 45dc73a8 authored by 前端-许佳敏's avatar 前端-许佳敏

merge: 合并v2代码

parents 27a5fb45 aee7f089
# 新功能概况
1. 功能描述(必填)
2. 预期效果/行为是什么
3. 可能影响到的模块是什么
4. 禅道需求地址
# bug概况
1. 重现步骤(必填)
2. 目前的错误行为是什么
3. 预期效果/行为是什么
4. 相关日志/屏幕截图(如果可以提供的话,方便追踪)
5. 测试通过后希望同步的分支
6. 禅道bug地址
# 新功能概况
1. 功能描述(必填)
2. 预期效果/行为是什么
3. 可能影响到的模块是什么
4. 禅道需求地址
# bug概况
1. 重现步骤(必填)
2. 目前的错误行为是什么
3. 预期效果/行为是什么
4. 相关日志/屏幕截图(如果可以提供的话,方便追踪)
5. 测试通过后希望同步的分支
6. 禅道bug地址
......@@ -33,6 +33,7 @@ const Examine: React.FC<Iprops> = ({
}) => {
const [isPass, setIsAllMember] = useState(1)
const [state, setstate] = useState<any>(false);
const [contractUrl, setcontractUrl] = useState('');
/* 设置选中值 */
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
......@@ -91,11 +92,13 @@ const Examine: React.FC<Iprops> = ({
/* 合同协同签订-签订合同 */
case 'Signacontract':
fn = postContractManageSign
values.contractUrl = contractUrl;
values.contractId = applyId;
break;
}
console.log(values)
const msg = message.loading({
content: intl.formatMessage({id: 'contract.zhengzaicaozuo'}),
content: intl.formatMessage({ id: 'contract.zhengzaicaozuo' }),
duration: 0,
});
fn(values).then(res => {
......@@ -136,9 +139,10 @@ const Examine: React.FC<Iprops> = ({
},
onChange(info) {
if (info.file.response) {
const { code } = info.file.response;
const { code, data: { url } } = info.file.response;
console.log(code);
message.info(intl.formatMessage({id: 'contract.shangchuanchenggong'}));
setcontractUrl(url)
message.info(intl.formatMessage({ id: 'contract.shangchuanchenggong' }));
console.log(info.file)
setstate(true);
}
......@@ -148,12 +152,12 @@ const Examine: React.FC<Iprops> = ({
}
if (info.file.status === 'done') {
} else if (info.file.status === 'error') {
message.error(`${info.file.name} ${intl.formatMessage({id: 'contract.shangchuanshibai'})}`);
message.error(`${info.file.name} ${intl.formatMessage({ id: 'contract.shangchuanshibai' })}`);
}
},
beforeUpload(file) {
if (file.size / 1024 / 1024 > 20) {
message.warning(intl.formatMessage({id: 'contract.fujiandaxiaochaoguo20M'}));
message.warning(intl.formatMessage({ id: 'contract.fujiandaxiaochaoguo20M' }));
return Promise.reject();
}
},
......@@ -161,13 +165,14 @@ const Examine: React.FC<Iprops> = ({
const uploadNode = () => {
return (
<div>
<p style={{ paddingTop: 10, paddingBottom: 10, }}>{intl.formatMessage({id: 'contract.zhizhihetongyifangyi'})}</p>
<p style={{ paddingTop: 10, paddingBottom: 10, }}>{intl.formatMessage({ id: 'contract.zhizhihetongyifangyi' })}</p>
<Row style={{ marginBottom: 30, }}>
<Col>
<Upload
{...uploadProps}
maxCount={1}
>
<Button icon={<UploadOutlined />}>{intl.formatMessage({id: 'contract.shangchuanfujian'})}</Button>
<Button icon={<UploadOutlined />}>{intl.formatMessage({ id: 'contract.shangchuanfujian' })}</Button>
</Upload>
</Col>
</Row>
......@@ -176,7 +181,7 @@ const Examine: React.FC<Iprops> = ({
}
return (
<div>
<Modal footer={null} title={intl.formatMessage({id: 'contract.tijiaoshenhe'})} visible={ExamineFlag} onCancel={() => fetchData('onCancel')}>
<Modal footer={null} title={intl.formatMessage({ id: 'contract.tijiaoshenhe' })} visible={ExamineFlag} onCancel={() => fetchData('onCancel')}>
<Form
name="basic"
form={form}
......@@ -185,20 +190,20 @@ const Examine: React.FC<Iprops> = ({
onFinishFailed={onFinishFailed}
>
{type === 'Signacontract' ? uploadNode() : null}
<Form.Item name="isPass" label="" rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingxuanzetongguofangshi'}) }]} initialValue={isPass} >
<Form.Item name="isPass" label="" rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingxuanzetongguofangshi' }) }]} initialValue={isPass} >
<Radio.Group onChange={handleIsAllMemberChange}>
<Radio value={1}>{agreeText}</Radio>
<Radio value={0}>{disagree}</Radio>
</Radio.Group>
</Form.Item>
<Form.Item label={isPass ? intl.formatMessage({id: 'contract.shenhetongguoyuanyin'}) : intl.formatMessage({id: 'contract.shenbuhetongguoyuanyin'})} rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingxuanzezuofeiriqi'}) }]}>
<Form.Item label={isPass ? intl.formatMessage({ id: 'contract.shenhetongguoyuanyin' }) : intl.formatMessage({ id: 'contract.shenbuhetongguoyuanyin' })} rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingxuanzezuofeiriqi' }) }]}>
</Form.Item>
<Form.Item label='' name="opinion" rules={[{ required: isPass ? false : true, message: intl.formatMessage({id: 'contract.shenhetongguoyijian'}) }]}>
<TextArea placeholder={intl.formatMessage({id: 'contract.zaicishurunideyuanyin'})} maxLength={120} />
<Form.Item label='' name="opinion" rules={[{ required: isPass ? false : true, message: intl.formatMessage({ id: 'contract.shenhetongguoyijian' }) }]}>
<TextArea placeholder={intl.formatMessage({ id: 'contract.zaicishurunideyuanyin' })} maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Button onClick={() => fetchData('onCancel')} style={{ marginRight: 10 }}>{intl.formatMessage({id: 'contract.quxiao'})}</Button>
<Button type="primary" htmlType="submit">{intl.formatMessage({id: 'contract.baocun'})}</Button>
<Button onClick={() => fetchData('onCancel')} style={{ marginRight: 10 }}>{intl.formatMessage({ id: 'contract.quxiao' })}</Button>
<Button type="primary" htmlType="submit">{intl.formatMessage({ id: 'contract.baocun' })}</Button>
</div>
</Form>
</Modal>
......@@ -206,8 +211,8 @@ const Examine: React.FC<Iprops> = ({
)
}
Examine.defaultProps = {
agreeText: intl.formatMessage({id: 'contract.tongguo'}),
disagree: intl.formatMessage({id: 'contract.butongguo'}),
agreeText: intl.formatMessage({ id: 'contract.tongguo' }),
disagree: intl.formatMessage({ id: 'contract.butongguo' }),
uploadNode: null
}
export default Examine;
......@@ -65,6 +65,7 @@ const Details = (props: any) => {
const [basicData, setbasicData] = useState<any>({
invoiceProveVOList: [],
}) // 合同付款基本信息
const [contractUrl, setcontractUrl] = useState('');
/* 获取详情的数据 */
const getDetail = () => {
getContractCoordinationGetDetail({ contractId }).then(res => {
......
......@@ -310,6 +310,7 @@ const Details = (props: any) => {
window.open(res.data.url)
}
} else {
console.log(1111)
setIsModalVisible(!Visible)
}
}
......@@ -432,14 +433,14 @@ const Details = (props: any) => {
<div className='ant-card-head'>
<div className='ant-card-head-wrapper'>
<div className='ant-card-head-wrapper'>
{intl.formatMessage({ id: 'contract.dianzihetong' })}
{contractText.isUseElectronicContract ? intl.formatMessage({ id: 'contract.dianzihetong' }) : intl.formatMessage({ id: 'contract.zhizhihetong' })}
</div>
</div>
</div>
<div className='ant-card-body'>
<div className={style.upload_item} style={{ width: 680 }}>
<div className='ant-card-head-wrapper'>
{intl.formatMessage({ id: 'contract.dianzihetong' })}
{contractText.isUseElectronicContract ? intl.formatMessage({ id: 'contract.dianzihetong' }) : intl.formatMessage({ id: 'contract.zhizhihetong' })}
</div>
<div className={style.upload_left} onClick={() => onDownload(contractText)} style={{ width: 600, cursor: 'pointer' }}>
<FileWordFilled />
......
......@@ -88,9 +88,10 @@ const ContractText = (props: any) => {
// 上传回调
const handleChange = ({ fileList }) => {
if (fileList[0].response) {
console.log(fileList[0].name, fileList[0].response.data)
if (fileList[0].response.code === 1000) {
Templatel.name = fileList[0].name
Templatel.fileUrl = fileList[0].response.data
Templatel.fileName = fileList[0].name
Templatel.contractUrl = fileList[0].response.data
setTemplatel({ ...Templatel })
}
}
......
......@@ -23,7 +23,7 @@ const PurchaseList = () => {
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
//表头
const columns: ColumnType<any>[] = [{
title: intl.formatMessage({id: 'contract.xuqiudanhaozhaiyao'}),
title: intl.formatMessage({ id: 'contract.xuqiudanhaozhaiyao' }),
dataIndex: 'demandNO',
align: 'left',
render: (text, record) =>
......@@ -37,7 +37,7 @@ const PurchaseList = () => {
<p>{record.demandAbstract}</p>
</div>
}, {
title: intl.formatMessage({id: 'contract.xuqiufabushijian'}),
title: intl.formatMessage({ id: 'contract.xuqiufabushijian' }),
dataIndex: 'demandPublishTime',
align: 'left',
sorter: {
......@@ -45,12 +45,12 @@ const PurchaseList = () => {
multiple: 1,
},
}, {
title: intl.formatMessage({id: 'contract.shoubiaohuiyuan'}),
title: intl.formatMessage({ id: 'contract.shoubiaohuiyuan' }),
dataIndex: 'awardName',
align: 'left',
},
{
title: intl.formatMessage({id: 'contract.shoubiaoshijian'}),
title: intl.formatMessage({ id: 'contract.shoubiaoshijian' }),
dataIndex: 'awardTime',
align: 'left',
sorter: {
......@@ -59,7 +59,7 @@ const PurchaseList = () => {
},
},
{
title: intl.formatMessage({id: 'contract.shoubiaojine'}),
title: intl.formatMessage({ id: 'contract.shoubiaojine' }),
dataIndex: 'awardAmount',
align: 'left',
sorter: {
......@@ -75,7 +75,7 @@ const PurchaseList = () => {
}
},
{
title: intl.formatMessage({id: 'contract.waibuzhuangtai'}),
title: intl.formatMessage({ id: 'contract.waibuzhuangtai' }),
dataIndex: 'outerStatus',
align: 'left',
......@@ -87,7 +87,7 @@ const PurchaseList = () => {
}
},
{
title: intl.formatMessage({id: 'contract.neibuzhuangtai'}),
title: intl.formatMessage({ id: 'contract.neibuzhuangtai' }),
dataIndex: 'innerStatus',
align: 'left',
render: (text) => {
......@@ -99,13 +99,13 @@ const PurchaseList = () => {
)
}
}, {
title: intl.formatMessage({id: 'contract.caozuo'}),
title: intl.formatMessage({ id: 'contract.caozuo' }),
dataIndex: 'state',
align: 'left',
render: (_, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => like(record)}>{intl.formatMessage({id: 'contract.chuangjiancaigouxunjiahetong'})}</span>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => like(record)}>{intl.formatMessage({ id: 'contract.chuangjiancaigouxunjiahetong' })}</span>
</div>
)
}
......
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