Commit 2f60b260 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

parents 257c22c1 392194ba
......@@ -4,9 +4,9 @@
* @LastEditors: Please set LastEditors
* @LastEditTime: 2020-10-19 11:12:51
*/
import CommodityRoute from './commodityRoute' // 商品能力路由
// import CommodityRoute from './commodityRoute' // 商品能力路由
// import MemberRoute from './memberRoute' // 会员能力路由
import ShopRoute from './shopRoute' // 店铺能力路由
// import ShopRoute from './shopRoute' // 店铺能力路由
// import ChannelRoute from './channelRoute' // 渠道能力路由
// import TranactionRoute from './tranactionRoute' // 交易能力路由
// import LogisticsRoute from './logisticsRoutes' // 物流能力路由
......@@ -55,12 +55,12 @@ const memberCenterRoute = {
// // component: '@/pages/index',
// component: '@/pages/home',
// },
ShopRoute,
CommodityRoute,
// ShopRoute,
// CommodityRoute,
// srm开发临时使用...
ProcurementRoute,
// 合同能力
contracRoute,
// ProcurementRoute,
// // 合同能力
// contracRoute,
//...
...asyncRoutes,
{
......
......@@ -13,7 +13,7 @@
"start:dev": "umi dev ",
"start:analyze": "ANALYZE=1 umi dev",
"clean": "rimraf node_modules",
"start": "yarn api && yarn scripts:build && umi dev",
"start": "yarn api && yarn scripts:build && cross-env NODE_OPTIONS=--max_old_space_size=4096 umi dev",
"build": "yarn api && yarn scripts:build && yarn build:clean",
"build:yxc": "yarn api && yarn scripts:build-yxc && umi build",
"build:analyze": "cross-env NODE_OPTIONS=--max_old_space_size=4096 ANALYZE=1 umi build",
......
......@@ -2151,16 +2151,18 @@ export enum TenderInsideWorkState {
Not_Submitted_Qualifications_Check = 3,
/** 已提交资格预审 */
Submitted_Qualifications_Check = 4,
/** 待新增投标 */
Not_Save_Submit_Tender = 5,
/** 待提交审核投标 */
Not_Submitted_Check_Submit_Tender = 5,
Not_Submitted_Check_Submit_Tender = 6,
/** 已提交审核投标 */
Submitted_Check_Submit_Tender = 6,
Submitted_Check_Submit_Tender = 7,
/** 审核投标不通过 */
Check_Submit_Tender_Not_Pass = 7,
Check_Submit_Tender_Not_Pass = 8,
/** 待提交投标 */
Not_Submitted_Submit_Tender = 8,
Not_Submitted_Submit_Tender = 9,
/** 已提交投标 */
Submitted_Submit_Tender = 9,
Submitted_Submit_Tender = 10,
}
/** 投标 内部状态 */
......@@ -2169,11 +2171,12 @@ export const TenderInStateTexts = {
2: "已提交招标报名",
3: "待提交资格预审",
4: '已提交资格预审',
5: '待提交审核投标',
6: '已提交审核投标',
7: '审核投标不通过',
8: '待提交投标',
9: '已提交投标',
5: '待新增投标',
6: '待提交审核投标',
7: '已提交审核投标',
8: '审核投标不通过',
9: '待提交投标',
10: '已提交投标',
}
/** 投标 内部操作文本 */
......
......@@ -41,7 +41,7 @@ function RenderComponent({type, ...props}: {type: keyof typeof iconMap}){
}
const CustomIcon: FC<IconComponentProps> = ({type, ...props}: {type: keyof typeof iconMap}) => {
return <Icon component={() => <RenderComponent type={type} {...props}/>}/>
return type ? <Icon component={() => <RenderComponent type={type} {...props}/>}/> : null
}
export default CustomIcon
......@@ -16,6 +16,9 @@ export const useBidDetail = (options: OrderDetailHookProps) => {
// 流转记录数据(内/外)
const [interiorProcurementOrderLogResponses, setInteriorProcurementOrderLogResponses] = useState<any>(null)
const [externalProcurementOrderLogResponses, setExternalProcurementOrderLogResponses] = useState<any>(null)
// 流程状态数据(内/外)
const [interiorWorkflowFlowRecordLogResponses, setInteriorWorkflowFlowRecordLogResponses] = useState<any>(null)
const [externalWorkflowFlowRecordLogResponses, setExternalWorkflowFlowRecordLogResponses] = useState<any>(null)
// 地址
const [address, setAddress] = useState<string>(null)
......@@ -72,53 +75,57 @@ export const useBidDetail = (options: OrderDetailHookProps) => {
return field
}
const reloadFormData = useCallback(() => {
const reloadFormData = useCallback(async () => {
if (id) {
const fn = switchApi(type);
let params: any = {};
params[switchParamField(type)] = id
fn(params, { ctlType: "none" }).then(res => {
const { code, data, message: msg } = res
if (code === 1000) {
setFormData(data)
if(data?.deliverAddress) {
PublicApi.getLogisticsReceiverAddressGet({id: data.deliverAddress}).then(_res => {
const { data: _data } = _res
const { provinceName, cityName, districtName, address } = _data
if(res.code === 1000) {
setAddress(`${provinceName}/${cityName}/${districtName}/${address}`)
}
})
}
} else {
message.error(msg)
const { code, data, message: msg } = await fn(params, { ctlType: "none" })
if (code === 1000) {
setFormData(data)
if(data?.deliverAddress) {
PublicApi.getLogisticsReceiverAddressGet({id: data.deliverAddress}).then(_res => {
const { data: _data } = _res
const { provinceName, cityName, districtName, address } = _data
if(code === 1000) {
setAddress(`${provinceName}/${cityName}/${districtName}/${address}`)
}
})
}
})
} else {
message.error(msg)
}
// 有投标模式的情况下提取招标id
const searchId = type.indexOf('ender') !== -1 ? data.inviteTender.id : id
// 流转记录(内/外)
// 招标/投标
// 招投标
const inCheckRecordFn = !type.indexOf('c')
?
PublicApi.getPurchaseInviteTenderInCheckRecordGetInviteTenderInCheckRecord
:
PublicApi.getPurchaseSubmitTenderInCheckRecordGetSubmitTenderInCheckRecord
inCheckRecordFn({ inviteTenderId: id }, { ctlType: "none" }).then(res => {
const { code, data, message: msg } = res
if (code === 1000) {
setInteriorProcurementOrderLogResponses(data)
} else {
message.error(msg)
}
})
const inReocrdRes = await inCheckRecordFn({ inviteTenderId: searchId })
if (inReocrdRes.code === 1000) {
setInteriorProcurementOrderLogResponses(inReocrdRes.data)
}
const outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetTenderOutCheckRecord
outCheckRecordFn({ inviteTenderId: id }, { ctlType: "none" }).then(res => {
const { code, data, message: msg } = res
if (code === 1000) {
setExternalProcurementOrderLogResponses(data)
} else {
message.error(msg)
}
})
const outRecordRes = await outCheckRecordFn({ inviteTenderId: searchId })
if (outRecordRes.code === 1000) {
setExternalProcurementOrderLogResponses(outRecordRes.data)
}
// 流程状态(内/外)
// 招投标
const processRes = await PublicApi.getPurchaseInviteTenderGetInviteTenderProcess({ inviteTenderId: searchId })
if(processRes.code === 1000 && processRes.data) {
setInteriorWorkflowFlowRecordLogResponses(processRes.data.subProcess.userTaskList)
setExternalWorkflowFlowRecordLogResponses(processRes.data.userTaskList)
}
}
}, [id])
......@@ -127,6 +134,8 @@ export const useBidDetail = (options: OrderDetailHookProps) => {
data: formData,
interiorProcurementOrderLogResponses,
externalProcurementOrderLogResponses,
interiorWorkflowFlowRecordLogResponses,
externalWorkflowFlowRecordLogResponses,
address,
offsetTopList,
ctl: {
......@@ -134,7 +143,7 @@ export const useBidDetail = (options: OrderDetailHookProps) => {
setOffsetTopList,
},
reloadFormData,
apiType: type
apiType: type,
}
return {
......
import React from 'react'
import moment from 'moment'
import { BidInStateTexts, BidOutStateTexts } from '@/constants'
import { usePageStatus } from '@/hooks/usePageStatus'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
const { pageStatus, id } = usePageStatus()
......@@ -18,7 +18,7 @@ export const fileChangeStringArray = (arr) => arr.map(item => {
name: item.name.split('/').pop(),
url: item.url
}
if(!id) delete param.id
if(pageStatus === PageStatus.ADD || !item?.id) { delete param.id }
return param
})
......@@ -54,7 +54,7 @@ export const paramsConversionFn = (value) => {
name: _item.name.split('/').pop(),
url: _item['url']
}
if(!id) delete param.id
if(pageStatus === PageStatus.ADD || !_item?.id) { delete param.id }
return param
})
}
......@@ -71,7 +71,7 @@ export const paramsConversionFn = (value) => {
memberRoleName: item.roleName,
...item,
}
if(!id) delete param.id
if(pageStatus === PageStatus.ADD || !item?.id) { delete param.id }
return param
})
}
......@@ -87,7 +87,7 @@ export const paramsConversionFn = (value) => {
cityName: item.city,
isAllCity: item?.cityCode ? false : true
}
if(!id) delete param.id
if(pageStatus === PageStatus.ADD || !item?.id) { delete param.id }
return param
})
} else {
......
import React, { useEffect } from 'react'
import { PublicApi } from '@/services/api';
import { FormEffectHooks, ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd';
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus';
// 高级筛选schema中用于输入搜索品牌的Effect
......@@ -36,3 +38,11 @@ export const showAllUnitList = (context: any, fieldName: string) => {
})
})
}
// 监听附件列表字段变动 处理编辑情况下的id问题
export const useAttachmentChangeForEdit = (ctx: ISchemaFormActions | ISchemaFormAsyncActions) => {
// FormEffectHooks.onFieldValueChange$('orderProductRequests').subscribe(state => {
// })
}
......@@ -16,6 +16,7 @@ import PublicBidModal from './components/publicBidModal'
import RelevanceGoodDrawer from './components/relevanceGoodDrawer'
import { INVITE_BID, PUBLIC_BID, SYSTEM_BID } from '@/constants'
import MemberModal from './components/memberModal'
import { useAttachmentChangeForEdit } from './effects'
export interface AddNewBidProps {}
......@@ -38,7 +39,7 @@ const dataIdList = [
}
]
// 新增招标. 包含新增和编辑
// 新增招标. 包含新增和编辑. 还有复制招标跳转过来的数据回显
const AddNewBid:React.FC<AddNewBidProps> = (props) => {
const publicRef = useRef<any>({})
......@@ -64,9 +65,19 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
}).then(res => {
const { data } = res
setInitFormValue(paramsRenderFn(data))
console.log(paramsRenderFn(data), '67')
setFormLoading(false)
})
}
let currentCopyId = Number(sessionStorage.getItem('currentCopyId'))
if(currentCopyId) {
PublicApi.postPurchaseInviteTenderCopyInviteTender({ id: currentCopyId }).then(res => {
const { data } = res
setInitFormValue(paramsRenderFn(data))
console.log(paramsRenderFn(data), '特例 复制')
})
}
return () => sessionStorage.removeItem('currentCopyId')
}, [])
const { materialAddButton, materialColumns, materialComponents, ...sectionProps } = useMaterialTable(addSchemaAction, goodRef, drawerSchemaAction)
......@@ -83,13 +94,19 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
}
const handleSubmit = async (value) => {
console.log(value)
setBtnLoading(true)
console.log(value, '87')
// setBtnLoading(true)
const params = paramsConversionFn(value)
if(!(params.inviteTenderStartTime > params.registerEndTime || params.inviteTenderStartTime > params.preCheckEndTime)) {
console.log(params, '91')
if(!(params.inviteTenderStartTime > params.registerEndTime)) {
setBtnLoading(false)
return message.error('投标开始时间必须大于报名截止时间或资质预审截止时间')
return message.error('投标开始时间必须大于报名截止时间')
}
if(params.isQualificationCheck && !(params.inviteTenderStartTime > params.preCheckEndTime)) {
setBtnLoading(false)
return message.error('投标开始时间必须大于资质预审截止时间')
}
if(!(params.openTenderTime >= params.inviteTenderEndTime || params.openTenderTime < params.evaluationStartTime)) {
setBtnLoading(false)
......@@ -99,9 +116,9 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
setBtnLoading(false)
return message.error('报名截止时间必须小于投标开始时间')
}
if(!(params.preCheckStartTime >= params.registerEndTime && params.preCheckStartTime < params.inviteTenderStartTime)) {
if(params.isQualificationCheck && !(params.preCheckStartTime >= params.registerEndTime && params.preCheckStartTime < params.inviteTenderStartTime)) {
setBtnLoading(false)
return message.error('资格预审开始时间大于等于报名截止时间且资质预审截止时间小于投标开始时间')
return message.error('资格预审开始时间大于等于报名截止时间且资质预审截止时间小于投标开始时间')
}
if(!(params.evaluationStartTime > params.openTenderTime)) {
setBtnLoading(false)
......@@ -111,7 +128,7 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
if(id) {
params['id'] = id
}
let res = await PublicApi.postPurchaseInviteTenderSaveOrUpdateInviteTender(params)
// let res = await PublicApi.postPurchaseInviteTenderSaveOrUpdateInviteTender(params)
// if(res.code === 1000) {
// history.goBack()
// } else {
......@@ -140,8 +157,8 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 20) {
message.warning('附件大小超过20M');
return Promise.reject();
message.warning('附件大小超过20M')
return Promise.reject()
}
}
......@@ -191,7 +208,18 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
}
})
$('onFieldValueChange', 'isQualificationCheck').subscribe(state => {
if(state.value) {
ctx.setFieldValue('preCheckStartTime', null)
} else {
ctx.setFieldValue('preCheckEndTime', null)
}
})
})
// 监听附件列表字段变动 处理编辑情况下的id问题
useAttachmentChangeForEdit(ctx, )
}}
expressionScope={{
materialAddButton,
......
......@@ -446,7 +446,7 @@ const qualificationNeedInfo: ISchema = {
},
properties: {
isQualificationCheck: {
type: 'number',
type: 'boolean',
"x-component": 'CheckboxSingle',
"x-component-props": {
children: '需要资格预审',
......@@ -455,7 +455,7 @@ const qualificationNeedInfo: ISchema = {
}
},
title: '资格预审',
default: 0,
default: true,
"x-linkages": [
{
type: 'value:visible',
......@@ -466,15 +466,16 @@ const qualificationNeedInfo: ISchema = {
},
'[preCheckStartTime, preCheckEndTime]': {
type: 'string',
title: '资格预审时间',
"x-component": 'daterange',
title: ' ',
"x-component-props": {
disabledDate: current => {
return current && current < moment().startOf('second')
},
showTime: true,
style: { width: "100%" }
}
},
required: true,
},
preCheckRequirement: {
type: 'string',
......
import React, { useCallback, useRef, useState } from 'react'
import { Card, message} from 'antd'
import { Card, message, Button} from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { StandardTable } from 'god'
import { history } from 'umi'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { useSelfTable } from './model/useSelfTable'
......@@ -14,6 +15,7 @@ import ModalForm from '@/components/ModalForm'
import { createAsyncFormActions, createFormActions } from '@formily/antd'
import moment from 'moment'
import { dataChangeUnix } from '../addNewBid/constant'
import { BidOuterWorkState } from '@/constants'
const destroyActions = createAsyncFormActions()
const modifyActions = createAsyncFormActions()
......@@ -31,7 +33,30 @@ const callForBidsSearch: React.FC<{}> = () => {
const {
ref,
columns
} = useSelfTable(destoryRef, destroyActions, modifyRef, modifyActions, { setInviteTenderEndTime, setEvaluationEndTime })
} = useSelfTable()
const tableColumns: any[] = columns.concat([
{
title: '操作',
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
width: 240,
render: (text, record) => <>
<Button type='link' onClick={() => handleCopy(record.id)}>复制</Button>
{
record.tenderOutStatus <= BidOuterWorkState.Not_Open_Tender ? <Button type='link' onClick={() => handleChangeTime(record)}>修改开标时间</Button> : null
}
{
//@todo 大于等于报名开始时间&&小于评标截止时间&&未抽取专家&&未被废标
moment().valueOf() >= record.registerStartTime && moment().valueOf() < record.evaluationEndTime && record.isEnable ?
<Button type='link'>抽取专家</Button>
: null
}
<Button type='link' onClick={() => handleDestory(record.id)}>废标</Button>
</>
}
])
const fetchTableData = async (params) => {
let _params = params.inviteTenderInStatusList ? { ...params, inviteTenderInStatusList: [params.inviteTenderInStatusList] } : {...params}
......@@ -40,6 +65,34 @@ const callForBidsSearch: React.FC<{}> = () => {
return data
}
// 复制 id存入本地存储跳转至新增页
const handleCopy = (id) => {
// PublicApi.postPurchaseInviteTenderCopyInviteTender({id}).then(res => {
// if(res.code === 1000) {
// ref.current.reload()
// }
// })
sessionStorage.setItem('currentCopyId', id)
history.push('/memberCenter/procurementAbility/callForBids/readyAddBid/add')
}
// 废标
const handleDestory = (id) => {
destoryRef.current.setVisible(true)
destroyActions.setFieldValue('id', id)
}
// 修改开标时间
const handleChangeTime = (record) => {
modifyActions.setFieldValue('id', record.id)
setInviteTenderEndTime(record.inviteTenderEndTime)
setEvaluationEndTime(record.evaluationEndTime)
setTimeout(() => {
modifyActions.setFieldValue('openTenderTime', moment(record.openTenderTime).format('YYYY-MM-DD HH:mm:ss'))
}, 500)
modifyRef.current.setVisible(true)
}
// 提交废标
const handleSubmit = useCallback(() => {
destroyActions.submit().then(async ({values}: any) => {
......@@ -60,7 +113,6 @@ const callForBidsSearch: React.FC<{}> = () => {
id: values.id,
openTenderTime: dataChangeUnix(values.openTenderTime)
}
console.log(moment(inviteTenderEndTime).format('YYYY-MM-DD HH:mm:ss'), moment(evaluationEndTime).format('YYYY-MM-DD HH:mm:ss'))
if(!(params.openTenderTime >= inviteTenderEndTime && params.openTenderTime < evaluationEndTime)) {
return message.error('修改的开标时间必须大于等于投标截止时间且小于评标截止时间')
}
......@@ -81,7 +133,7 @@ const callForBidsSearch: React.FC<{}> = () => {
<StandardTable
fetchTableData={params => fetchTableData(params)}
currentRef={ref}
columns={columns}
columns={tableColumns}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
......
......@@ -11,29 +11,29 @@ import CustomBadge from '@/pages/procurement/components/customBadge'
import moment from 'moment'
// 招标查询
export const useSelfTable = (desRef: any, desActions: any, modRef: any, modActions: any, ctl: any) => {
export const useSelfTable = () => {
const ref = useRef<any>({})
const handleCopy = (id) => {
PublicApi.postPurchaseInviteTenderCopyInviteTender({id}).then(res => {
if(res.code === 1000) {
ref.current.reload()
}
})
}
// const handleCopy = (id) => {
// PublicApi.postPurchaseInviteTenderCopyInviteTender({id}).then(res => {
// if(res.code === 1000) {
// ref.current.reload()
// }
// })
// }
const handleDestory = (id) => {
desRef.current.setVisible(true)
desActions.setFieldValue('id', id)
}
// const handleDestory = (id) => {
// desRef.current.setVisible(true)
// desActions.setFieldValue('id', id)
// }
const handleChangeTime = (record) => {
modRef.current.setVisible(true)
modActions.setFieldValue('id', record.id)
ctl.setInviteTenderEndTime(record.inviteTenderEndTime)
ctl.setEvaluationEndTime(record.evaluationEndTime)
modActions.setFieldValue('openTenderTime', moment(record.openTenderTime).format('YYYY-MM-DD HH:mm:ss'))
}
// const handleChangeTime = (record) => {
// modRef.current.setVisible(true)
// modActions.setFieldValue('id', record.id)
// ctl.setInviteTenderEndTime(record.inviteTenderEndTime)
// ctl.setEvaluationEndTime(record.evaluationEndTime)
// modActions.setFieldValue('openTenderTime', moment(record.openTenderTime).format('YYYY-MM-DD HH:mm:ss'))
// }
const callForBidColumns: any[] = [
{
......@@ -124,26 +124,26 @@ export const useSelfTable = (desRef: any, desActions: any, modRef: any, modActio
key: 'inviteTenderInStatus',
render: (text) => <CustomBadge status={text} type='inside' />
},
{
title: '操作',
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
width: 240,
render: (text, record) => <>
<Button type='link' onClick={() => handleCopy(record.id)}>复制</Button>
{
record.tenderOutStatus <= BidOuterWorkState.Not_Open_Tender ? <Button type='link' onClick={() => handleChangeTime(record)}>修改开标时间</Button> : null
}
{
//@todo 大于等于报名开始时间&&小于评标截止时间&&未抽取专家&&未被废标
moment().valueOf() >= record.registerStartTime && moment().valueOf() < record.evaluationEndTime && record.isEnable ?
<Button type='link'>抽取专家</Button>
: null
}
<Button type='link' onClick={() => handleDestory(record.id)}>废标</Button>
</>
}
// {
// title: '操作',
// align: 'center',
// dataIndex: 'ctl',
// key: 'ctl',
// width: 240,
// render: (text, record) => <>
// <Button type='link' onClick={() => handleCopy(record.id)}>复制</Button>
// {
// record.tenderOutStatus <= BidOuterWorkState.Not_Open_Tender ? <Button type='link' onClick={() => handleChangeTime(record)}>修改开标时间</Button> : null
// }
// {
// //@todo 大于等于报名开始时间&&小于评标截止时间&&未抽取专家&&未被废标
// moment().valueOf() >= record.registerStartTime && moment().valueOf() < record.evaluationEndTime && record.isEnable ?
// <Button type='link'>抽取专家</Button>
// : null
// }
// <Button type='link' onClick={() => handleDestory(record.id)}>废标</Button>
// </>
// }
]
return {
......
......@@ -77,23 +77,23 @@ const BidDetailSection:React.FC<BidDetailSectionProps> = ({
case 'TransferProcess':
RcDom = (<TransferProcess
cardTitle={title}
customTitleKey='operationalProcess'
customKey='state'
outerVerifyCurrent={findLastIndexFlowState(formContext.data.externalWorkflowFlowRecordLogResponses)}
innerVerifyCurrent={findLastIndexFlowState(formContext.data.interiorWorkflowFlowRecordLogResponses)}
customTitleKey='name'
customKey='id'
outerVerifyCurrent={findLastIndexFlowState(formContext.externalWorkflowFlowRecordLogResponses)}
innerVerifyCurrent={findLastIndexFlowState(formContext.interiorWorkflowFlowRecordLogResponses)}
outerVerifySteps={
formContext.data.externalWorkflowFlowRecordLogResponses ?
formContext.data.externalWorkflowFlowRecordLogResponses.map(item => ({
formContext.externalWorkflowFlowRecordLogResponses ?
formContext.externalWorkflowFlowRecordLogResponses.map(item => ({
...item,
status: item.isExecute ? 'finish' : 'wait',
status: item.isActive ? 'finish' : 'wait',
})) :
[]
}
innerVerifySteps={
formContext.data.interiorWorkflowFlowRecordLogResponses ?
formContext.data.interiorWorkflowFlowRecordLogResponses.map(item => ({
formContext.interiorWorkflowFlowRecordLogResponses ?
formContext.interiorWorkflowFlowRecordLogResponses.map(item => ({
...item,
status: item.isExecute ? 'finish' : 'wait',
status: item.isActive ? 'finish' : 'wait',
})) :
[]
}
......
......@@ -17,13 +17,13 @@ interface TransferProcessProp {
outerVerifySteps?: {
step: number,
stepName: string,
roleName: string,
operationRole: string,
status?: 'wait' | 'process' | 'finish' | 'error',
}[];
innerVerifySteps?: {
step: number,
stepName: string,
roleName: string,
operationRole: string,
status?: 'wait' | 'process' | 'finish' | 'error',
}[];
customTitleKey?: string;
......@@ -83,7 +83,7 @@ const TransferProcess: React.FC<TransferProcessProp> = ({
<Steps.Step
key={customKey ? item[customKey] : item.step}
title={customTitleKey ? item[customTitleKey] : item.stepName}
description={item.roleName}
description={item.operationRole}
status={item.status}
/>
))}
......@@ -97,7 +97,7 @@ const TransferProcess: React.FC<TransferProcessProp> = ({
<Steps.Step
key={customKey ? item[customKey] : item.step}
title={customTitleKey ? item[customTitleKey] : item.stepName}
description={item.roleName}
description={item.operationRole}
status={item.status}
/>
))}
......
......@@ -16,108 +16,111 @@ export interface BidTransformRecordProps {
cardTitle?: string;
}
const outReocrdCols: any[] = [
{
title: '流转顺序号',
dataIndex: 'no',
align: 'center',
key: 'no',
render: (_, __, index: number) => index + 1
},
{
title: '操作角色',
dataIndex: 'memberRoleName',
align: 'center',
key: 'memberRoleName',
},
{
title: '状态',
dataIndex: 'status',
align: 'center',
key: 'status',
render: text => <CustomTag status={text} type='out'/>
},
{
title: '操作',
dataIndex: 'operation',
align: 'center',
key: 'operation',
render: text => BidOutOpeartTexts[text]
},
{
title: '操作时间',
dataIndex: 'createTime',
align: 'center',
key: 'createTime',
render: time => formatTimeString(time)
},
{
title: '审核意见',
dataIndex: 'checkRemark',
align: 'center',
key: 'checkRemark',
},
]
const insideRecordCols: any[] = [
{
title: '流转记录',
dataIndex: 'no',
align: 'center',
key: 'no',
render: (_, __, index: number) => index + 1
},
{
title: '操作人',
dataIndex: 'memberRoleName',
align: 'center',
key: 'memberRoleName',
},
{
title: '部门',
dataIndex: 'department',
align: 'center',
key: 'department',
},
{
title: '职位',
dataIndex: 'position',
align: 'center',
key: 'position',
},
{
title: '状态',
dataIndex: 'status',
align: 'center',
key: 'status',
render: text => <CustomTag status={text} type='inside'/>
},
{
title: '操作',
dataIndex: 'operation',
align: 'center',
key: 'operation',
render: text => BidInOpeartTexts[text]
},
{
title: '操作时间',
dataIndex: 'createTime',
align: 'center',
key: 'createTime',
render: text => formatTimeString(text)
},
{
title: '审核意见',
dataIndex: 'checkRemark',
align: 'center',
key: 'checkRemark',
},
]
const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
const { data, externalProcurementOrderLogResponses, interiorProcurementOrderLogResponses } = useContext(BidDetailContext)
const { data, externalProcurementOrderLogResponses, interiorProcurementOrderLogResponses, apiType } = useContext(BidDetailContext)
// 根据模式选择对应的状态映射
const insideModel = apiType.indexOf('ender') !== -1 ? 'tenderInside' : 'inside';
const [transferRadio, setTransferRadio] = useState<TransferEnum>(TransferEnum.Outer)
const outReocrdCols: any[] = [
{
title: '流转顺序号',
dataIndex: 'no',
align: 'center',
key: 'no',
render: (_, __, index: number) => index + 1
},
{
title: '操作角色',
dataIndex: 'memberRoleName',
align: 'center',
key: 'memberRoleName',
},
{
title: '状态',
dataIndex: 'status',
align: 'center',
key: 'status',
render: text => <CustomTag status={text} type='out'/>
},
{
title: '操作',
dataIndex: 'operation',
align: 'center',
key: 'operation',
render: text => BidOutOpeartTexts[text]
},
{
title: '操作时间',
dataIndex: 'createTime',
align: 'center',
key: 'createTime',
render: time => formatTimeString(time)
},
{
title: '审核意见',
dataIndex: 'checkRemark',
align: 'center',
key: 'checkRemark',
},
]
const insideRecordCols: any[] = [
{
title: '流转记录',
dataIndex: 'no',
align: 'center',
key: 'no',
render: (_, __, index: number) => index + 1
},
{
title: '操作人',
dataIndex: 'memberRoleName',
align: 'center',
key: 'memberRoleName',
},
{
title: '部门',
dataIndex: 'department',
align: 'center',
key: 'department',
},
{
title: '职位',
dataIndex: 'position',
align: 'center',
key: 'position',
},
{
title: '状态',
dataIndex: 'status',
align: 'center',
key: 'status',
render: text => <CustomTag status={text} type={insideModel}/>
},
{
title: '操作',
dataIndex: 'operation',
align: 'center',
key: 'operation',
render: text => BidInOpeartTexts[text]
},
{
title: '操作时间',
dataIndex: 'createTime',
align: 'center',
key: 'createTime',
render: text => formatTimeString(text)
},
{
title: '审核意见',
dataIndex: 'checkRemark',
align: 'center',
key: 'checkRemark',
},
]
useEffect(() => {
let judgeDefault = [externalProcurementOrderLogResponses?.length, interiorProcurementOrderLogResponses?.length].filter(Boolean)
if(judgeDefault.length === 1) {
......
......@@ -158,6 +158,12 @@ const AddTender:React.FC<AddTenderProps> = (props) => {
file: value['file'],
remark: value['remark'],
submitTenderMateriel: value['submitTenderMateriel'].map(item => {
if(!value?.id) {
item.file = item.file.map(_ => {
delete _.id
return _
})
}
let param = {
...item,
inviteTenderMateriel: { id: item.id },
......
......@@ -230,6 +230,7 @@ export const formSchema: ISchema = {
columns: "{{productColumns}}",
components: "{{productComponents}}",
expandable: "{{productChildren}}",
// pagination: { size: 'small' }
},
},
}
......
......@@ -19,7 +19,7 @@ export interface ReadyAddTenderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.postPurchaseSubmitTenderGetSubmitTenderList({
...params,
submitTenderInStatusList: [TenderInsideWorkState.Submitted_Qualifications_Check, TenderInsideWorkState.Not_Submitted_Check_Submit_Tender, TenderInsideWorkState.Check_Submit_Tender_Not_Pass],
submitTenderInStatusList: [TenderInsideWorkState.Not_Save_Submit_Tender, TenderInsideWorkState.Not_Submitted_Check_Submit_Tender, TenderInsideWorkState.Check_Submit_Tender_Not_Pass],
tenderOutStatusList: [ BidOuterWorkState.Not_Invite_Tender],
}, { ctlType: "none" })
return data
......
......@@ -15,7 +15,7 @@ const ReadySubmitTenderDetail: React.FC = () => {
const { formContext, id } = useBidDetail({type: 'tender'})
const { data } = formContext
const { run, loading } = useHttpRequest(PublicApi.postPurchaseSubmitTenderSubmitSubmitTender)
const { run, loading } = useHttpRequest(PublicApi.postPurchaseSubmitTenderSubmitSubmitTenderBatch)
const approvedRef = useRef<any>({})
const anchorTitleList = [
......@@ -27,25 +27,29 @@ const ReadySubmitTenderDetail: React.FC = () => {
{ title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" },
]
const handleClick = useCallback(() => {
approvedRef.current.setVisible(true)
const handleClick = useCallback(async () => {
// approvedRef.current.setVisible(true)
const result = await run({idList: [id]})
if (result.code === 1000) {
history.goBack()
}
}, [])
// 提交表单
const handleSubmit = useCallback(() => {
approvedRef.current.actions.submit().then(async ({values}) => {
const params = {
id: Number(id),
...values
}
const result = await run(params)
// // 提交表单
// const handleSubmit = useCallback(() => {
// approvedRef.current.actions.submit().then(async ({values}) => {
// const params = {
// id: Number(id),
// ...values
// }
// const result = await run(params)
if (result.code === 1000) {
approvedRef.current.setVisible(false)
history.goBack()
}
})
}, [])
// if (result.code === 1000) {
// approvedRef.current.setVisible(false)
// history.goBack()
// }
// })
// }, [])
return (
<div>
......@@ -66,12 +70,12 @@ const ReadySubmitTenderDetail: React.FC = () => {
</OrderDetailWrapper>
{/* 提交时触发的弹窗集合 */}
<ApprovedModal
{/* <ApprovedModal
currentRef={approvedRef}
onConfirm={handleSubmit}
loading={loading}
title="单据审核"
/>
/> */}
</BidDetailContext.Provider>
</div>
);
......
......@@ -33,7 +33,7 @@ const ReadySubmitTender:React.FC<ReadySubmitTenderProps> = (props) => {
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postPurchaseSubmitTenderCheckSubmitTenderBatch)
const { run, loading } = useHttpRequest(PublicApi.postPurchaseSubmitTenderSubmitSubmitTenderBatch)
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
......
......@@ -29,7 +29,7 @@ export const useSelfTable = () => {
dataIndex: 'inviteTender',
key: 'inviteTender',
render: (text, record) => <>
<EyePreview url={`/memberCenter/procurementAbility/tender/callForBidsSearch/detail?id=${record.id}`}>
<EyePreview url={`/memberCenter/procurementAbility/tender/callForBidsSearch/detail?id=${record.inviteTender.id}`}>
{record.inviteTender.code}
</EyePreview>
<div>{record.inviteTender.projectName}</div>
......@@ -41,7 +41,7 @@ export const useSelfTable = () => {
dataIndex: 'code',
key: 'code',
render: (text, record) => <>
{ text ? <EyePreview url={`/memberCenter/procurementAbility/callForBids/tenderSearch/detail?id=${record.id}`}>
{ text ? <EyePreview url={`/memberCenter/procurementAbility/tender/tenderSearch/detail?id=${record.id}`}>
{text}
</EyePreview> : null }
<div>{record.memberName}</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