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

fix: 投标待提交资格预审自定义文件上传样式

parent 8b534aa6
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { OrderTypeMap, PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkStateTexts } from '@/constants';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
......@@ -26,7 +22,7 @@ export const tableListSchema: ISchema = {
}
},
properties: {
inviteTenderProjectName: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
......
......@@ -23,8 +23,18 @@ export interface ReadyAddBidProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.postPurchaseInviteTenderGetInviteTenderList({
...params,
inviteTenderOutStatusList: [BidOuterWorkState.Submitted_Invite_Tender, BidOuterWorkState.Platform_Not_Check_Invite_Tender, BidOuterWorkState.Platform_Check_Not_Pass],
inviteTenderInStatusList: [BidInsideWorkState.Not_Submitted_Check_Invite_Tender, BidInsideWorkState.Tender_Check_Not_Pass]
inviteTenderOutStatusList: [
BidOuterWorkState.Submitted_Invite_Tender,
BidOuterWorkState.Platform_Not_Check_Invite_Tender,
BidOuterWorkState.Platform_Check_Not_Pass
],
inviteTenderInStatusList: [
BidInsideWorkState.Not_Submitted_Check_Invite_Tender,
BidInsideWorkState.Tender_Check_Not_Pass,
BidInsideWorkState.Not_Tender_Check,
BidInsideWorkState.Tender_Check_Pass,
BidInsideWorkState.Submitted_Invite_Tender,
]
}, { ctlType: "none" })
return data
}
......
......@@ -25,7 +25,7 @@ export const tableListSchema: ISchema = {
}
},
properties: {
inviteTenderProjectName: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
......
......@@ -26,7 +26,7 @@ export const tableListSchema: ISchema = {
}
},
properties: {
inviteTenderProjectName: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
......
......@@ -25,7 +25,7 @@ export const tableListSchema: ISchema = {
}
},
properties: {
inviteTenderProjectName: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
......@@ -28,7 +25,7 @@ export const tableListSchema: ISchema = {
}
},
properties: {
inviteTenderProjectName: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
......
......@@ -25,7 +25,7 @@ export const tableListSchema: ISchema = {
}
},
properties: {
inviteTenderProjectName: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
......
......@@ -7,3 +7,12 @@
font-size: 12px;
color: #909399;
}
.fileItem {
width: 424px;
display: flex;
justify-content: space-between;
span {
cursor: pointer;
}
}
......@@ -7,7 +7,7 @@ import OrderDetailWrapper from '@/pages/transaction/components/OrderDetailWrappe
import PreLoading from '@/components/PreLoading';
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import { useBidDetail } from '@/pages/procurement/_public/bid/effects/useBidDetail';
import { ArrowLeftOutlined, UploadOutlined } from '@ant-design/icons';
import { ArrowLeftOutlined, DeleteOutlined, FileFilled, UploadOutlined } from '@ant-design/icons';
import TransferProcess from '@/pages/procurement/components/transferProcess';
import { findLastIndexFlowState } from '@/utils';
import DescriptionsInfo from '@/pages/procurement/components/descriptionsInfo';
......@@ -74,15 +74,25 @@ const ReadyQualifityCheckedDetail: React.FC = () => {
fileType: 1,
prefix: '',
},
itemRender: () => null,
fileList,
onChange(info) {
if (info.file.status !== 'uploading') {
}
if (info.file.status === 'done') {
setFileList(() => info.fileList.map(item => ({
...item.response.data,
name: item.response.data.name.split('/').pop()
})))
setFileList(() => info.fileList.map(item => {
if(item?.response) {
return {
...item.response.data,
name: item.response.data.name.split('/').pop()
}
} else {
return {
...item,
}
}
}))
} else if (info.file.status === 'error') {
message.error(`${info.file.name} 上传失败`);
}
......@@ -99,6 +109,10 @@ const ReadyQualifityCheckedDetail: React.FC = () => {
},
}
const removeItem = (item) => {
setFileList(() => [...fileList].filter(ele => ele.url !== item.url))
}
// 提交资格预审
const handleSubmit = () => {
if(fileList.length) {
......@@ -202,6 +216,9 @@ const ReadyQualifityCheckedDetail: React.FC = () => {
<Row>
<Col span={2}><p className={style['card-list_title']}>资格证明文件:</p></Col>
<Col>
{
fileList.map(item => (<p className={style.fileItem}><a href={item.url}><FileFilled /> {item.name}</a> <span onClick={() => removeItem(item)}><DeleteOutlined /></span></p>))
}
<Upload
{...uploadProps}
>
......
import React, { useRef } from 'react';
import { history } from 'umi';
import { Button, Card, Space, Tooltip } from 'antd';
import { Button, Card, message, Space, Tooltip } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons';
import { StandardTable } from 'god';
......@@ -233,10 +233,13 @@ const Repositories: React.FC<{}> = () => {
}
const handleSubmit = async (value) => {
console.log(value, 'vvv')
const { code } = run({...value, inventory: value?.inventoryAmount || value?.inventoryRate})
if(!RowCtl.selectedRowKeys.length) {
return message.error('请先选择仓位')
}
const { code } = await run({...value, inventory: value?.inventoryAmount || value?.inventoryRate, idList: RowCtl.selectedRowKeys})
if(code === 1000) {
modalRef.current.setVisible(false)
RowCtl.setSelectedRowKeys([])
setTimeout(() => {
ref.current.reload()
}, 600)
......
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