Commit 82c581e5 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理招投标文件上传错误和修改id传参异常问题

parent 303322b7
...@@ -110,21 +110,18 @@ const MultAddress = (props) => { ...@@ -110,21 +110,18 @@ const MultAddress = (props) => {
} else if(num === 2) { } else if(num === 2) {
renderCity(result, val, idx) renderCity(result, val, idx)
} }
console.log(result, 'mutators')
mutators.change(result) mutators.change(result)
} }
// 渲染省份option // 渲染省份option
const renderProvice = async (result, val, idx) => { const renderProvice = async (result, val, idx) => {
// console.log(result, val, idx) console.log(result, val, idx, result[idx])
await province.forEach(item => { await province.forEach(item => {
if (item.code === val) { if (item.code === val) {
PublicApi.getManageAreaByPcodeAll({ pcode: val }).then((res: any) => { PublicApi.getManageAreaByPcodeAll({ pcode: val }).then((res: any) => {
if (res.code === 1000) { if (res.code === 1000) {
result[idx].provinceCode = val; result[idx].provinceCode = val;
result[idx].province = item.name; result[idx].province = item.name;
// 重新set下id值
result[idx]['id'] ? result[idx]['id'] = result[idx]['id'] : null
// @todo 编辑情况下 result[idx]存在id ?第一次渲染回填值的时候不清空 // @todo 编辑情况下 result[idx]存在id ?第一次渲染回填值的时候不清空
// if(result[idx]?.id&& ) { // if(result[idx]?.id&& ) {
// console.log(cityAfterRef.current, 1, item) // console.log(cityAfterRef.current, 1, item)
......
...@@ -2070,7 +2070,7 @@ export enum BidInsideWorkState { ...@@ -2070,7 +2070,7 @@ export enum BidInsideWorkState {
Not_Submitted_Check_Invite_Tender = 1, Not_Submitted_Check_Invite_Tender = 1,
/** 待审核招标 */ /** 待审核招标 */
Not_Tender_Check = 2, Not_Tender_Check = 2,
/** 招标审核通过 */ /** 待提交招标 */
Tender_Check_Pass = 3, Tender_Check_Pass = 3,
/** 招标审核不通过 */ /** 招标审核不通过 */
Tender_Check_Not_Pass = 4, Tender_Check_Not_Pass = 4,
...@@ -2110,7 +2110,7 @@ export enum BidInsideWorkState { ...@@ -2110,7 +2110,7 @@ export enum BidInsideWorkState {
export const BidInStateTexts = { export const BidInStateTexts = {
1: "待提交审核招标", 1: "待提交审核招标",
2: "待审核招标", 2: "待审核招标",
3: '招标审核通过', 3: '待提交招标',
4: '招标审核不通过', 4: '招标审核不通过',
5: '已提交招标', 5: '已提交招标',
6: '报名审核通过', 6: '报名审核通过',
...@@ -2224,7 +2224,7 @@ export const BidOutOpeartTexts = { ...@@ -2224,7 +2224,7 @@ export const BidOutOpeartTexts = {
export enum TenderInsideWorkState { export enum TenderInsideWorkState {
/** 待招标报名 */ /** 待招标报名 */
NotSubmitted_Invite_Tender_Register = 1, NotSubmitted_Invite_Tender_Register = 1,
/** 已提交招标报名 */ /** 待审核报名 */
Submitted_Invite_Tender_Register = 2, Submitted_Invite_Tender_Register = 2,
/** 待提交资格预审 */ /** 待提交资格预审 */
Not_Submitted_Qualifications_Check = 3, Not_Submitted_Qualifications_Check = 3,
...@@ -2247,7 +2247,7 @@ export enum TenderInsideWorkState { ...@@ -2247,7 +2247,7 @@ export enum TenderInsideWorkState {
/** 投标 内部状态 */ /** 投标 内部状态 */
export const TenderInStateTexts = { export const TenderInStateTexts = {
1: "待招标报名", 1: "待招标报名",
2: "已提交招标报名", 2: "待审核报名",
3: "待提交资格预审", 3: "待提交资格预审",
4: '已提交资格预审', 4: '已提交资格预审',
5: '待新增投标', 5: '待新增投标',
......
...@@ -18,7 +18,7 @@ export const fileChangeStringArray = (arr) => arr.map(item => { ...@@ -18,7 +18,7 @@ export const fileChangeStringArray = (arr) => arr.map(item => {
name: item.name.split('/').pop(), name: item.name.split('/').pop(),
url: item.url url: item.url
} }
if(pageStatus === PageStatus.ADD || !item?.id) { delete param.id } if(pageStatus === PageStatus.ADD) { delete param.id }
return param return param
}) })
...@@ -54,7 +54,7 @@ export const paramsConversionFn = (value) => { ...@@ -54,7 +54,7 @@ export const paramsConversionFn = (value) => {
name: _item.name.split('/').pop(), name: _item.name.split('/').pop(),
url: _item['url'] url: _item['url']
} }
if(pageStatus === PageStatus.ADD || !_item?.id) { delete param.id } if(pageStatus === PageStatus.ADD) { delete param.id }
return param return param
}) })
} }
...@@ -71,8 +71,7 @@ export const paramsConversionFn = (value) => { ...@@ -71,8 +71,7 @@ export const paramsConversionFn = (value) => {
memberRoleName: item.roleName, memberRoleName: item.roleName,
...item, ...item,
} }
if(pageStatus === PageStatus.ADD || !item?.id) { if(pageStatus === PageStatus.ADD) {
console.log('delelet')
delete param.id delete param.id
} }
return param return param
...@@ -90,7 +89,7 @@ export const paramsConversionFn = (value) => { ...@@ -90,7 +89,7 @@ export const paramsConversionFn = (value) => {
cityName: item.city, cityName: item.city,
isAllCity: item?.cityCode ? false : true isAllCity: item?.cityCode ? false : true
} }
if(pageStatus === PageStatus.ADD || !item?.id) { delete param.id } if(pageStatus === PageStatus.ADD) { delete param.id }
return param return param
}) })
} else { } else {
......
...@@ -67,7 +67,6 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => { ...@@ -67,7 +67,6 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
}).then(res => { }).then(res => {
const { data } = res const { data } = res
setInitFormValue(paramsRenderFn(data)) setInitFormValue(paramsRenderFn(data))
console.log(paramsRenderFn(data), '67')
setFormLoading(false) setFormLoading(false)
}) })
} }
...@@ -76,7 +75,6 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => { ...@@ -76,7 +75,6 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
PublicApi.postPurchaseInviteTenderCopyInviteTender({ id: currentCopyId }).then(res => { PublicApi.postPurchaseInviteTenderCopyInviteTender({ id: currentCopyId }).then(res => {
const { data } = res const { data } = res
setInitFormValue(paramsRenderFn(data)) setInitFormValue(paramsRenderFn(data))
console.log(paramsRenderFn(data), '特例 复制')
}) })
} }
return () => sessionStorage.removeItem('currentCopyId') return () => sessionStorage.removeItem('currentCopyId')
...@@ -97,9 +95,8 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => { ...@@ -97,9 +95,8 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
const handleSubmit = async (value) => { const handleSubmit = async (value) => {
setBtnLoading(true) setBtnLoading(true)
console.log(value, 'vvv')
const params = paramsConversionFn(value) const params = paramsConversionFn(value)
console.log(params, 'ppp') console.log(params, value, 'ppp')
if(!params.isQualificationCheck) { if(!params.isQualificationCheck) {
delete params.preCheckStartTime delete params.preCheckStartTime
delete params.preCheckEndTime delete params.preCheckEndTime
......
...@@ -42,7 +42,8 @@ const callForBidsSearch: React.FC<{}> = () => { ...@@ -42,7 +42,8 @@ const callForBidsSearch: React.FC<{}> = () => {
align: 'left', align: 'left',
dataIndex: 'ctl', dataIndex: 'ctl',
key: 'ctl', key: 'ctl',
width: 240, // width: 240,
// fixed: 'right',
render: (text, record) => <> render: (text, record) => <>
<Button type='link' onClick={() => handleCopy(record.id)}>复制</Button> <Button type='link' onClick={() => handleCopy(record.id)}>复制</Button>
{ {
...@@ -89,11 +90,11 @@ const callForBidsSearch: React.FC<{}> = () => { ...@@ -89,11 +90,11 @@ const callForBidsSearch: React.FC<{}> = () => {
// 修改开标时间 // 修改开标时间
const handleChangeTime = (record) => { const handleChangeTime = (record) => {
modifyActions.setFieldValue('id', record.id)
setInviteTenderEndTime(record.inviteTenderEndTime) setInviteTenderEndTime(record.inviteTenderEndTime)
setEvaluationStartTime(record.evaluationStartTime) setEvaluationStartTime(record.evaluationStartTime)
setTimeout(() => { setTimeout(() => {
modifyActions.setFieldValue('openTenderTime', moment(record.openTenderTime).format('YYYY-MM-DD HH:mm:ss')) modifyActions.setFieldValue('openTenderTime', moment(record.openTenderTime).format('YYYY-MM-DD HH:mm:ss'))
modifyActions.setFieldValue('id', record.id)
}, 500) }, 500)
modifyRef.current.setVisible(true) modifyRef.current.setVisible(true)
} }
......
...@@ -16,6 +16,7 @@ export const useSelfTable = () => { ...@@ -16,6 +16,7 @@ export const useSelfTable = () => {
align: 'left', align: 'left',
dataIndex: 'id', dataIndex: 'id',
key: 'id', key: 'id',
// width: 60,
render: (text, record, index) => index + 1 render: (text, record, index) => index + 1
}, },
{ {
...@@ -50,7 +51,7 @@ export const useSelfTable = () => { ...@@ -50,7 +51,7 @@ export const useSelfTable = () => {
dataIndex: 'createTime', dataIndex: 'createTime',
key: 'createTime', key: 'createTime',
render: (text, record) => formatTimeString(record.createTime), render: (text, record) => formatTimeString(record.createTime),
width: 180 // width: 180
}, },
{ {
title: '报名开始/截止时间', title: '报名开始/截止时间',
...@@ -61,7 +62,7 @@ export const useSelfTable = () => { ...@@ -61,7 +62,7 @@ export const useSelfTable = () => {
<div><PlayCircleOutlined />&nbsp;{formatTimeString(record.registerStartTime)}</div> <div><PlayCircleOutlined />&nbsp;{formatTimeString(record.registerStartTime)}</div>
<div><PoweroffOutlined />&nbsp;{formatTimeString(record.registerEndTime)}</div> <div><PoweroffOutlined />&nbsp;{formatTimeString(record.registerEndTime)}</div>
</>, </>,
width: 180 // width: 180
}, },
{ {
title: '资格预审开始/截止时间', title: '资格预审开始/截止时间',
...@@ -72,7 +73,7 @@ export const useSelfTable = () => { ...@@ -72,7 +73,7 @@ export const useSelfTable = () => {
{record.preCheckStartTime ? <div><PlayCircleOutlined />&nbsp;{formatTimeString(record.preCheckStartTime)}</div> : null} {record.preCheckStartTime ? <div><PlayCircleOutlined />&nbsp;{formatTimeString(record.preCheckStartTime)}</div> : null}
{record.preCheckEndTime ? <div><PoweroffOutlined />&nbsp;{formatTimeString(record.preCheckEndTime)}</div> : null} {record.preCheckEndTime ? <div><PoweroffOutlined />&nbsp;{formatTimeString(record.preCheckEndTime)}</div> : null}
</>, </>,
width: 180 // width: 180
}, },
{ {
title: '投标开始/截止时间', title: '投标开始/截止时间',
...@@ -83,7 +84,6 @@ export const useSelfTable = () => { ...@@ -83,7 +84,6 @@ export const useSelfTable = () => {
<div><PlayCircleOutlined />&nbsp;{formatTimeString(record.inviteTenderStartTime)}</div> <div><PlayCircleOutlined />&nbsp;{formatTimeString(record.inviteTenderStartTime)}</div>
<div><PoweroffOutlined />&nbsp;{formatTimeString(record.inviteTenderEndTime)}</div> <div><PoweroffOutlined />&nbsp;{formatTimeString(record.inviteTenderEndTime)}</div>
</>, </>,
width: 180
}, },
{ {
title: '外部状态', title: '外部状态',
......
...@@ -72,7 +72,7 @@ const FirstCheckedBid:React.FC<FirstCheckedBidProps> = (props) => { ...@@ -72,7 +72,7 @@ const FirstCheckedBid:React.FC<FirstCheckedBidProps> = (props) => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
actions, actions,
'code', 'inviteTenderCode',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
}, },
......
...@@ -7,7 +7,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const'; ...@@ -7,7 +7,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
export const tableListSchema: ISchema = { export const tableListSchema: ISchema = {
type: 'object', type: 'object',
properties: { properties: {
code: { inviteTenderCode: {
type: 'string', type: 'string',
"x-component": 'SearchFilter', "x-component": 'SearchFilter',
'x-component-props': { 'x-component-props': {
......
...@@ -100,53 +100,53 @@ export const productInfoColumns: any[] = [ ...@@ -100,53 +100,53 @@ export const productInfoColumns: any[] = [
{ {
title: 'ID', title: 'ID',
dataIndex: 'id', dataIndex: 'id',
align: 'center', align: 'left',
key: 'id', key: 'id',
className: 'commonHide', className: 'commonHide',
}, },
{ {
title: '物料编号/名称', title: '物料编号/名称',
dataIndex: 'code', dataIndex: 'code',
align: 'center', align: 'left',
key: 'code', key: 'code',
render: (t, r) => <><div>{t}</div><div>{r.name}</div></> render: (t, r) => <><div>{t}</div><div>{r.name}</div></>
}, },
{ {
title: '规格', title: '规格',
dataIndex: 'type', dataIndex: 'type',
align: 'center', align: 'left',
key: 'type', key: 'type',
}, },
{ {
title: '品类', title: '品类',
dataIndex: 'categoryName', dataIndex: 'categoryName',
align: 'center', align: 'left',
key: 'categoryName', key: 'categoryName',
}, },
{ {
title: '品牌', title: '品牌',
dataIndex: 'brandName', dataIndex: 'brandName',
align: 'center', align: 'left',
key: 'brandName', key: 'brandName',
}, },
{ {
title: '采购数量/单位', title: '采购数量/单位',
dataIndex: 'count', dataIndex: 'count',
align: 'center', align: 'left',
key: 'count', key: 'count',
render: (t, r) => <><div>{t}</div><div>{r.unitName}</div></> render: (t, r) => <><div>{t}</div><div>{r.unitName}</div></>
}, },
{ {
title: '含税', title: '含税',
dataIndex: 'isTax', dataIndex: 'isTax',
align: 'center', align: 'left',
key: 'isTax', key: 'isTax',
render: (t, r) => t ? '是' : '否' render: (t, r) => t ? '是' : '否'
}, },
{ {
title: '税率', title: '税率',
dataIndex: 'taxRate', dataIndex: 'taxRate',
align: 'center', align: 'left',
key: 'taxRate', key: 'taxRate',
formItem: 'input', formItem: 'input',
editable: true, editable: true,
...@@ -170,13 +170,13 @@ export const productInfoColumns: any[] = [ ...@@ -170,13 +170,13 @@ export const productInfoColumns: any[] = [
{ {
title: '金额(含税)', title: '金额(含税)',
dataIndex: 'money', dataIndex: 'money',
align: 'center', align: 'left',
key: 'money', key: 'money',
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'ctl', dataIndex: 'ctl',
align: 'center', align: 'left',
key: 'ctl', key: 'ctl',
}, },
] ]
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