api 服务模块修改
This commit is contained in:
122
src/pages/BidEvaluation/components/SupplementFileUpload.tsx
Normal file
122
src/pages/BidEvaluation/components/SupplementFileUpload.tsx
Normal file
@ -0,0 +1,122 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Modal, Form, Spin, message } from 'antd';
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
import { saveSupplementFile } from '../../../services/bidev';
|
||||
|
||||
// 支持的文件格式
|
||||
const SUPPORTED_FILE_TYPES = {
|
||||
'zip': ['.zip'],
|
||||
'rar': ['.rar'],
|
||||
'pdf': ['.pdf'],
|
||||
'word': ['.doc', '.docx'],
|
||||
'excel': ['.xls', '.xlsx']
|
||||
};
|
||||
|
||||
const ACCEPT_TYPES = '.zip,.rar,.pdf,.doc,.docx,.xls,.xlsx';
|
||||
|
||||
// 文件格式验证函数
|
||||
const validateFileFormat = (file: File): boolean => {
|
||||
const fileName = file.name.toLowerCase();
|
||||
const fileExtension = fileName.substring(fileName.lastIndexOf('.'));
|
||||
const supportedExtensions = Object.values(SUPPORTED_FILE_TYPES).flat();
|
||||
return supportedExtensions.includes(fileExtension);
|
||||
};
|
||||
|
||||
interface SupplementFileUploadProps {
|
||||
modalVisible: boolean;
|
||||
onCancel: (fileId?: string) => void;
|
||||
onOk: (fileId: string) => void;
|
||||
fileId?: string;
|
||||
readOnly?: boolean;
|
||||
recordData?: any;
|
||||
}
|
||||
|
||||
const layout = {
|
||||
labelCol: { span: 4 },
|
||||
wrapperCol: { span: 20 },
|
||||
};
|
||||
|
||||
const modalHeight = window.innerHeight * 96 / 100;
|
||||
|
||||
/**
|
||||
* 补充评审文件上传组件
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
const SupplementFileUpload: React.FC<SupplementFileUploadProps> = (props) => {
|
||||
const { modalVisible, onCancel, onOk, fileId, readOnly, recordData } = props;
|
||||
const [form] = Form.useForm();
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const handleOk = async () => {
|
||||
const annexId = form.getFieldValue('annexId');
|
||||
const finalFileId = annexId || fileId || '';
|
||||
|
||||
if (!readOnly && !finalFileId) {
|
||||
message.warning('请先上传文件');
|
||||
return;
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
try {
|
||||
const params = {
|
||||
id: recordData?.id,
|
||||
supplementReviewFile: finalFileId,
|
||||
};
|
||||
|
||||
const res = await saveSupplementFile(params);
|
||||
if (res.code === 200 && res.success) {
|
||||
message.success('补充评审文件保存成功');
|
||||
onOk(finalFileId);
|
||||
} else {
|
||||
message.error(res.message || '保存失败');
|
||||
}
|
||||
} catch (error) {
|
||||
message.error('保存失败,请重试');
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
const annexId = form.getFieldValue('annexId');
|
||||
onCancel(annexId);
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose
|
||||
title={`${readOnly ? '查看' : '上传'}补充评审文件`}
|
||||
visible={modalVisible}
|
||||
onCancel={handleCancel}
|
||||
onOk={readOnly ? undefined : handleOk}
|
||||
okText={readOnly ? undefined : "保存"}
|
||||
cancelText="返回"
|
||||
okButtonProps={{ hidden: readOnly }}
|
||||
style={{ maxHeight: modalHeight }}
|
||||
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
|
||||
centered
|
||||
>
|
||||
<Spin spinning={loading}>
|
||||
<Form name="supplement-file-form" {...layout} form={form}>
|
||||
<Form.Item
|
||||
name="annexId"
|
||||
label="附件"
|
||||
extra={readOnly ? null : '支持zip、rar、PDF、Word、Excel格式文件,每个文件最大30MB,限制上传1个文件'}
|
||||
>
|
||||
<ExtendUpload
|
||||
bid={fileId}
|
||||
btnName="上传"
|
||||
maxSize={30}
|
||||
maxCount={1}
|
||||
formatValidator={validateFileFormat}
|
||||
uploadProps={{ name: "file", disabled: readOnly, accept: ACCEPT_TYPES }}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Spin>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default SupplementFileUpload;
|
@ -171,8 +171,8 @@ const Index: React.FC<{}> = () => {
|
||||
} else {
|
||||
if (record.tdocId) {
|
||||
return (
|
||||
// <Button type="link" danger onClick={() => lookFile(record.detailId, record.supplierRegisterId)}>查看</Button>
|
||||
<Button type="link" danger onClick={() => window.open("/viewOfTenderDocumentsSecond?id=" + record.tdocId + "&supplierId=" + record.supplierRegisterId + "&offerType=1")}>查看</Button>
|
||||
// <Button type="link" onClick={() => lookFile(record.detailId, record.supplierRegisterId)}>查看</Button>
|
||||
<Button type="link" onClick={() => window.open("/viewOfTenderDocumentsSecond?id=" + record.tdocId + "&supplierId=" + record.supplierRegisterId + "&offerType=1")}>查看</Button>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
@ -835,6 +835,16 @@ const Index: React.FC<{}> = () => {
|
||||
setCurrent(page)
|
||||
let currentDate = (page - 1) * 3
|
||||
let newColumns = [...columns];
|
||||
|
||||
// 辅助函数:优先获取scoreMap,如果不存在则获取managerScoreMap
|
||||
const getScoreData = (record: any, supplierRegisterId: string) => {
|
||||
if (record.scoreMap && record.scoreMap[supplierRegisterId]) {
|
||||
return { data: record.scoreMap[supplierRegisterId], hasData: true };
|
||||
} else if (record.managerScoreMap && record.managerScoreMap[supplierRegisterId]) {
|
||||
return { data: record.managerScoreMap[supplierRegisterId], hasData: true };
|
||||
}
|
||||
return { data: null, hasData: false };
|
||||
};
|
||||
totalSupplierColumns.slice(currentDate, currentDate + 3).map((item: any) => {
|
||||
supplierId.push(item.supplierRegisterId)
|
||||
newColumns.push({
|
||||
@ -847,17 +857,18 @@ const Index: React.FC<{}> = () => {
|
||||
record.standardList.map((item: any) => {
|
||||
radioOptions.push({ label: item.standardName + '(' + item.standardDetailScore + '分)', value: item.standardDetailScore + '-' + item.id })
|
||||
})
|
||||
if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) {
|
||||
const scoreResult = getScoreData(record, item.supplierRegisterId);
|
||||
if (scoreResult.hasData) {
|
||||
return (
|
||||
<div>
|
||||
<Radio.Group
|
||||
disabled={disabled || endProgress}
|
||||
value={record.scoreMap[item.supplierRegisterId].resultValue + '-' + record.scoreMap[item.supplierRegisterId].standardId}
|
||||
value={scoreResult.data.resultValue + '-' + scoreResult.data.standardId}
|
||||
options={radioOptions}
|
||||
onChange={e => onChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}
|
||||
onChange={e => onChange(e, scoreResult.data, item.supplierRegisterId)}
|
||||
/><br />
|
||||
<Button onClick={() => getRemark(record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)} type="link" danger>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button onClick={() => getRemark(scoreResult.data, item.supplierRegisterId)} type="link">备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
@ -869,8 +880,8 @@ const Index: React.FC<{}> = () => {
|
||||
options={radioOptions}
|
||||
onChange={e => onChange(e, record, item.supplierRegisterId)}
|
||||
/><br />
|
||||
<Button onClick={() => getRemark(record, item.supplierRegisterId)} type="link" danger>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button onClick={() => getRemark(record, item.supplierRegisterId)} type="link">备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -879,8 +890,9 @@ const Index: React.FC<{}> = () => {
|
||||
record.standardList.map((item: any) => {
|
||||
checkboxOptions.push({ label: item.standardName + '(' + item.standardDetailScore + '分)', value: item.standardDetailScore + '-' + item.id })
|
||||
})
|
||||
if (record?.scoreMap && record?.scoreMap[item.supplierRegisterId] && (record?.scoreMap[item.supplierRegisterId]?.standardId || record?.scoreMap[item.supplierRegisterId]?.id)) {
|
||||
let defaultArr = record.scoreMap[item.supplierRegisterId].standardId.split(",")
|
||||
const scoreResult = getScoreData(record, item.supplierRegisterId);
|
||||
if (scoreResult.hasData && (scoreResult.data?.standardId || scoreResult.data?.id)) {
|
||||
let defaultArr = scoreResult.data.standardId.split(",")
|
||||
let defaultValue: any = []
|
||||
record.standardList.map((item: any) => {
|
||||
defaultArr.map((val: any) => {
|
||||
@ -896,10 +908,10 @@ const Index: React.FC<{}> = () => {
|
||||
disabled={disabled || endProgress}
|
||||
options={checkboxOptions}
|
||||
value={defaultValue}
|
||||
onChange={e => checkChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}
|
||||
onChange={e => checkChange(e, scoreResult.data, item.supplierRegisterId)}
|
||||
/><br />
|
||||
<Button type="link" danger onClick={() => getRemark(record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(scoreResult.data, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
@ -912,27 +924,28 @@ const Index: React.FC<{}> = () => {
|
||||
value={[]}
|
||||
onChange={e => checkChange(e, record, item.supplierRegisterId)}
|
||||
/><br />
|
||||
<Button type="link" danger onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
} else if (record.scoreMethod == '2') { // 人工
|
||||
if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) {
|
||||
const scoreResult = getScoreData(record, item.supplierRegisterId);
|
||||
if (scoreResult.hasData) {
|
||||
return (
|
||||
<div>
|
||||
<Tooltip trigger={['focus']} title={<span>评分区间:{record.lowScore}分~{record.highScore}分</span>} placement="topLeft">
|
||||
<Input
|
||||
disabled={disabled || endProgress}
|
||||
min={1} max={record.highScore}
|
||||
value={record.scoreMap[item.supplierRegisterId].resultValue}
|
||||
value={scoreResult.data.resultValue}
|
||||
style={{ width: 160 }}
|
||||
onChange={e => inputChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId, record.highScore, record.lowScore)}
|
||||
onChange={e => inputChange(e, scoreResult.data, item.supplierRegisterId, record.highScore, record.lowScore)}
|
||||
/>
|
||||
</Tooltip>
|
||||
<br />
|
||||
<Button type="link" danger onClick={() => getRemark(record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(scoreResult.data, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
@ -942,8 +955,8 @@ const Index: React.FC<{}> = () => {
|
||||
<Input disabled={disabled || endProgress} min={1} max={record.highScore} onChange={e => inputChange(e, record, item.supplierRegisterId, record.highScore, record.lowScore)} style={{ width: 160 }} />
|
||||
</Tooltip>
|
||||
<br />
|
||||
<Button type="link" danger onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -953,14 +966,15 @@ const Index: React.FC<{}> = () => {
|
||||
for (let i = 1; i <= optionLength; i++) {
|
||||
optionArr.push(record.lowScore * i)
|
||||
}
|
||||
if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) {
|
||||
const scoreResult = getScoreData(record, item.supplierRegisterId);
|
||||
if (scoreResult.hasData) {
|
||||
return (
|
||||
<div>
|
||||
<Select
|
||||
disabled={disabled || endProgress}
|
||||
value={record.scoreMap[item.supplierRegisterId].resultValue}
|
||||
value={scoreResult.data.resultValue}
|
||||
style={{ width: 160 }}
|
||||
onChange={e => handleChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}
|
||||
onChange={e => handleChange(e, scoreResult.data, item.supplierRegisterId)}
|
||||
>
|
||||
{
|
||||
optionArr.map((item: any) => {
|
||||
@ -970,8 +984,8 @@ const Index: React.FC<{}> = () => {
|
||||
})
|
||||
}
|
||||
</Select><br />
|
||||
<Button type="link" danger onClick={() => getRemark(record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(scoreResult.data, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
|
||||
</div>
|
||||
)
|
||||
@ -987,8 +1001,8 @@ const Index: React.FC<{}> = () => {
|
||||
})
|
||||
}
|
||||
</Select><br />
|
||||
<Button type="link" danger onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -1513,12 +1527,12 @@ const Index: React.FC<{}> = () => {
|
||||
isDisabledOffer || isEndProgress ? null :
|
||||
<div>
|
||||
<Space>
|
||||
<Button onClick={setQuotation} type="primary" danger>确定</Button>
|
||||
<Button onClick={setQuotation} type="primary">确定</Button>
|
||||
{
|
||||
smallPrice ? <Button onClick={saveOfferSorce} type="primary" danger>保存</Button> : null
|
||||
smallPrice ? <Button onClick={saveOfferSorce} type="primary">保存</Button> : null
|
||||
}
|
||||
{
|
||||
smallPrice ? <Button onClick={submit} type="primary" danger>提交</Button> : null
|
||||
smallPrice ? <Button onClick={submit} type="primary">提交</Button> : null
|
||||
}
|
||||
</Space>
|
||||
</div>
|
||||
|
@ -207,7 +207,7 @@ const Index: React.FC<{}> = () => {
|
||||
} else {
|
||||
if (record.tdocId) {
|
||||
return (
|
||||
<Button type="link" danger onClick={() => window.open("/viewOfTenderDocumentsSecond?id=" + record.tdocId + "&supplierId=" + record.supplierRegisterId + "&offerType=1")}>查看</Button>
|
||||
<Button type="link" onClick={() => window.open("/viewOfTenderDocumentsSecond?id=" + record.tdocId + "&supplierId=" + record.supplierRegisterId + "&offerType=1")}>查看</Button>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
@ -875,6 +875,17 @@ const Index: React.FC<{}> = () => {
|
||||
setCurrent(page)
|
||||
let currentDate = (page - 1) * 3
|
||||
let newColumns = [...columns];
|
||||
|
||||
// 辅助函数:优先获取scoreMap,如果不存在则获取managerScoreMap
|
||||
const getScoreData = (record: any, supplierRegisterId: string) => {
|
||||
if (record.scoreMap && record.scoreMap[supplierRegisterId]) {
|
||||
return { data: record.scoreMap[supplierRegisterId], hasData: true };
|
||||
} else if (record.managerScoreMap && record.managerScoreMap[supplierRegisterId]) {
|
||||
return { data: record.managerScoreMap[supplierRegisterId], hasData: true };
|
||||
}
|
||||
return { data: null, hasData: false };
|
||||
};
|
||||
|
||||
totalSupplierColumns.slice(currentDate, currentDate + 3).map((item: any) => {
|
||||
supplierId.push(item.supplierRegisterId)
|
||||
newColumns.push({
|
||||
@ -887,17 +898,18 @@ const Index: React.FC<{}> = () => {
|
||||
record?.standardList?.map((item: any) => {
|
||||
radioOptions.push({ label: item.standardName + '(' + item.standardDetailScore + '分)', value: item.standardDetailScore + '-' + item.id })
|
||||
})
|
||||
if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) {
|
||||
const scoreResult = getScoreData(record, item.supplierRegisterId);
|
||||
if (scoreResult.hasData) {
|
||||
return (
|
||||
<div>
|
||||
<Radio.Group
|
||||
disabled={disabled || endProgress}
|
||||
value={record.scoreMap[item.supplierRegisterId].resultValue + '-' + record.scoreMap[item.supplierRegisterId].standardId}
|
||||
value={scoreResult.data.resultValue + '-' + scoreResult.data.standardId}
|
||||
options={radioOptions}
|
||||
onChange={e => onChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}
|
||||
onChange={e => onChange(e, scoreResult.data, item.supplierRegisterId)}
|
||||
/><br />
|
||||
<Button onClick={() => getRemark(record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)} type="link" danger>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button onClick={() => getRemark(scoreResult.data, item.supplierRegisterId)} type="link">备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
@ -909,8 +921,8 @@ const Index: React.FC<{}> = () => {
|
||||
options={radioOptions}
|
||||
onChange={e => onChange(e, record, item.supplierRegisterId)}
|
||||
/><br />
|
||||
<Button onClick={() => getRemark(record, item.supplierRegisterId)} type="link" danger>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button onClick={() => getRemark(record, item.supplierRegisterId)} type="link">备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -919,8 +931,9 @@ const Index: React.FC<{}> = () => {
|
||||
record?.standardList?.map((item: any) => {
|
||||
checkboxOptions.push({ label: item.standardName + '(' + item.standardDetailScore + '分)', value: item.standardDetailScore + '-' + item.id })
|
||||
})
|
||||
if (record?.scoreMap && record?.scoreMap[item.supplierRegisterId] && (record?.scoreMap[item.supplierRegisterId]?.standardId || record?.scoreMap[item.supplierRegisterId]?.id)) {
|
||||
let defaultArr = record.scoreMap[item.supplierRegisterId].standardId.split(",")
|
||||
const scoreResult = getScoreData(record, item.supplierRegisterId);
|
||||
if (scoreResult.hasData && (scoreResult.data?.standardId || scoreResult.data?.id)) {
|
||||
let defaultArr = scoreResult.data.standardId.split(",")
|
||||
let defaultValue: any = []
|
||||
record?.standardList?.map((item: any) => {
|
||||
defaultArr.map((val: any) => {
|
||||
@ -936,10 +949,10 @@ const Index: React.FC<{}> = () => {
|
||||
disabled={disabled || endProgress}
|
||||
options={checkboxOptions}
|
||||
value={defaultValue}
|
||||
onChange={e => checkChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}
|
||||
onChange={e => checkChange(e, scoreResult.data, item.supplierRegisterId)}
|
||||
/><br />
|
||||
<Button type="link" danger onClick={() => getRemark(record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}>备注</Button>
|
||||
<Button type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(scoreResult.data, item.supplierRegisterId)}>备注</Button>
|
||||
<Button type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
@ -952,27 +965,28 @@ const Index: React.FC<{}> = () => {
|
||||
value={[]}
|
||||
onChange={e => checkChange(e, record, item.supplierRegisterId)}
|
||||
/><br />
|
||||
<Button type="link" danger onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
} else if (record.scoreMethod == '2') { // 人工
|
||||
if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) {
|
||||
const scoreResult = getScoreData(record, item.supplierRegisterId);
|
||||
if (scoreResult.hasData) {
|
||||
return (
|
||||
<div>
|
||||
<Tooltip trigger={['focus']} title={<span>评分区间:{record.lowScore}分~{record.highScore}分</span>} placement="topLeft">
|
||||
<Input
|
||||
disabled={disabled || endProgress}
|
||||
value={record.scoreMap[item.supplierRegisterId].resultValue}
|
||||
value={scoreResult.data.resultValue}
|
||||
style={{ width: 160 }}
|
||||
onChange={e => inputChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId, record.highScore, record.lowScore)}
|
||||
onChange={e => inputChange(e, scoreResult.data, item.supplierRegisterId, record.highScore, record.lowScore)}
|
||||
// onFocus={e => inputFocus(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}
|
||||
/>
|
||||
</Tooltip>
|
||||
<br />
|
||||
<Button type="link" danger onClick={() => getRemark(record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(scoreResult.data, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
@ -982,8 +996,8 @@ const Index: React.FC<{}> = () => {
|
||||
<Input disabled={disabled || endProgress} onChange={e => inputChange(e, record, item.supplierRegisterId, record.highScore, record.lowScore)} style={{ width: 160 }} />
|
||||
</Tooltip>
|
||||
<br />
|
||||
<Button type="link" danger onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -993,14 +1007,15 @@ const Index: React.FC<{}> = () => {
|
||||
for (let i = 1; i <= optionLength; i++) {
|
||||
optionArr.push(record.lowScore * i)
|
||||
}
|
||||
if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) {
|
||||
const scoreResult = getScoreData(record, item.supplierRegisterId);
|
||||
if (scoreResult.hasData) {
|
||||
return (
|
||||
<div>
|
||||
<Select
|
||||
disabled={disabled || endProgress}
|
||||
value={record.scoreMap[item.supplierRegisterId].resultValue}
|
||||
value={scoreResult.data.resultValue}
|
||||
style={{ width: 160 }}
|
||||
onChange={e => handleChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}
|
||||
onChange={e => handleChange(e, scoreResult.data, item.supplierRegisterId)}
|
||||
>
|
||||
{
|
||||
optionArr.map((item: any) => {
|
||||
@ -1010,8 +1025,8 @@ const Index: React.FC<{}> = () => {
|
||||
})
|
||||
}
|
||||
</Select><br />
|
||||
<Button type="link" danger onClick={() => getRemark(record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(scoreResult.data, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
@ -1026,8 +1041,8 @@ const Index: React.FC<{}> = () => {
|
||||
})
|
||||
}
|
||||
</Select><br />
|
||||
<Button type="link" danger onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" danger onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
<Button type="link" onClick={() => getRemark(record, item.supplierRegisterId)}>备注</Button>
|
||||
<Button hidden={btnAuthority(['ebtp-expert'])} type="link" onClick={() => lookFile(record.id, item.supplierRegisterId)}>查看{showNameT.tb}文件</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -1718,12 +1733,12 @@ const Index: React.FC<{}> = () => {
|
||||
isDisabledOffer || isEndProgress ? null :
|
||||
<div>
|
||||
<Space>
|
||||
<Button onClick={setQuotation} type="primary" hidden={btnAuthority(['ebtp-expert'])} danger>确定</Button>
|
||||
<Button onClick={setQuotation} type="primary" hidden={btnAuthority(['ebtp-expert'])}>确定</Button>
|
||||
{
|
||||
smallPrice ? <Button hidden={btnAuthority(['ebtp-expert'])} onClick={saveOfferSorce} type="primary" danger>保存</Button> : null
|
||||
smallPrice ? <Button hidden={btnAuthority(['ebtp-expert'])} onClick={saveOfferSorce} type="primary">保存</Button> : null
|
||||
}
|
||||
{
|
||||
smallPrice ? <Button hidden={btnAuthority(['ebtp-expert'])} onClick={submit} type="primary" danger>提交</Button> : null
|
||||
smallPrice ? <Button hidden={btnAuthority(['ebtp-expert'])} onClick={submit} type="primary">提交</Button> : null
|
||||
}
|
||||
</Space>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user