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

fix: 接专家抽取管理

parent 210bd253
......@@ -15,7 +15,7 @@
// import AfterService from './afterServiceRoute' // 售后
// import HandlingRoute from './handlingRoute'; // 加工能力
import asyncRoutes from '../router.config.json';
// import ProcurementRoute from './procurementRoute';
import ProcurementRoute from './procurementRoute';
// import { callForBidsRoute } from './procurementRoute/callForBids';
// import { purchaseInquiryRoute } from './procurementRoute/purchaseInquiry';
// import contracRoute from './contracRoute';
......@@ -57,7 +57,7 @@ const memberCenterRoute = {
// ShopRoute,
// CommodityRoute,
// srm开发临时使用...
// ProcurementRoute,
ProcurementRoute,
// // 合同能力
// contracRoute,
//...
......
......@@ -324,6 +324,22 @@ export const callForBidsRoute = [
hideInMenu: true,
noMargin: true,
},
// 专家抽取管理-编辑
{
path: '/memberCenter/procurementAbility/callForBids/remarkBidCommittee/edit',
name: '编辑专家抽取',
component: '@/pages/procurement/callForBids/addRemarkBidCommittee',
hideInMenu: true,
noMargin: true,
},
// 专家抽取管理-详情
{
path: '/memberCenter/procurementAbility/callForBids/remarkBidCommittee/detail',
name: '专家抽取详情',
component: '@/pages/procurement/callForBids/addRemarkBidCommittee',
hideInMenu: true,
noMargin: true,
},
// 专家抽取通知管理
{
path: '/memberCenter/procurementAbility/callForBids/extractNoticeManage',
......
......@@ -2048,7 +2048,7 @@ export const CALLFORBID_TYPE = [
'邀请招标',
]
/** 专业类别 专家类型 */
/** 专业类别 */
export const SpecialityTypeMap = {
1: '工程类',
2: '货物类',
......@@ -2056,6 +2056,7 @@ export const SpecialityTypeMap = {
4: '其他类',
}
/** 专家类型 */
export const ExpertTypeMap = {
1: '招标人代表',
2: '技术类专家',
......@@ -2261,3 +2262,11 @@ export const TenderInOpeartTexts = {
10: "完成招标",
11: "已废标",
}
/** 专家抽取通知状态 */
export const ExpertRectractStatus = {
1: '待发送',
2: '待确认',
3: '已确认',
4: '已拒绝',
}
import React from 'react'
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ExpertTypeMap, SpecialityTypeMap } from '@/constants';
// 新增专家抽取
export const formSchema: ISchema = {
......@@ -58,7 +59,7 @@ export const formSchema: ISchema = {
},
required: true
},
inviteTenderInStatus: {
status: {
type: 'string',
title: '内部状态',
readOnly: true,
......@@ -83,6 +84,17 @@ export const formSchema: ISchema = {
title: '创建时间',
readOnly: true,
},
inviteTender: {
"type": "object",
properties: {
id: {
type: 'number',
title: '招标id',
visible: false,
readOnly: true,
}
}
}
}
}
}
......@@ -102,7 +114,7 @@ export const formSchema: ISchema = {
labelAlign: 'left'
},
properties: {
conditionLists: {
expertExtractQueryList: {
type: 'array:number',
"x-component": 'MultTable',
"x-component-props": {
......@@ -118,7 +130,7 @@ export const formSchema: ISchema = {
"type": "object",
"x-component": "tabpane",
"x-component-props": {
"tab": "委员会成员"
"tab": "专家抽取列表"
},
"properties": {
MEGA_LAYOUT3: {
......@@ -129,7 +141,7 @@ export const formSchema: ISchema = {
labelAlign: 'left'
},
properties: {
conditionLists: {
expertExtractRecordList: {
type: 'array:number',
"x-component": 'MultTable',
"x-component-props": {
......@@ -146,3 +158,216 @@ export const formSchema: ISchema = {
}
}
}
// 编辑组建条件schema
export const conditionSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT_0: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
labelCol: 6,
wrapperCol: 18,
labelAlign: 'left'
},
properties: {
currentIndex: {
type: 'number',
title: '当前编辑的索引',
visible: false,
readOnly: true,
},
speciality: {
type: 'number',
title: '专业类别',
enum: [
{ label: '工程类', value: 1 },
{ label: '货物类', value: 2 },
{ label: '服务类', value: 3 },
{ label: '其他类', value: 4 },
],
"x-component-props": {
placeholder: '请选择专业类别'
},
// required: true,
},
qualification: {
type: 'string',
title: '资格证书',
"x-component-props": {
placeholder: '请输入资格证书'
},
// required: true,
},
title: {
type: 'string',
title: '专业职称',
"x-component-props": {
placeholder: '请输入专业职称'
},
// required: true,
},
years: {
type: 'number',
title: '从事年限',
"x-component-props": {
placeholder: '请输入从事年限',
style: { width: '100%' },
},
// required: true,
},
trade: {
type: 'string',
title: '所属行业',
"x-component-props": {
placeholder: '请输入所属行业'
},
// required: true,
},
needArea: {
type: 'array',
title: '要求地区',
'x-component': 'CustomAddress',
'x-component-props': {
placeholder: '选择区域',
warningText: '请选择要求地区',
},
default: [{ provinceCode: null, province: null, cityCode: null, city: null, areaCode: null, area: null }],
// required: true,
},
excludeArea: {
type: 'array',
title: '排除地区',
'x-component': 'CustomAddress',
'x-component-props': {
placeholder: '选择区域',
warningText: '请选择排除地区',
},
default: [{ provinceCode: null, province: null, cityCode: null, city: null, areaCode: null, area: null }],
// required: true,
},
unit: {
type: 'string',
title: '工作单位',
"x-component-props": {
placeholder: '请输入工作单位'
},
// required: true,
},
type: {
type: 'number',
title: '专家类型',
enum: [
{ label: '招标人代表', value: 1 },
{ label: '技术类专家', value: 2 },
{ label: '特邀类专家', value: 3 },
{ label: '其他类专家', value: 4 },
],
"x-component-props": {
placeholder: '请输入所属行业'
},
// required: true,
},
count: {
type: 'number',
title: '抽取人数',
"x-component-props": {
placeholder: '请输入抽取人数',
style: {
width: '100%'
}
},
required: true,
}
}
}
}
}
// 选择评标专家schema
export const selectExpertSchema: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入专家名称',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'wrap',
width: '100%',
justifyContent: 'flex-start',
style: {
marginRight: 0,
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
userOrgName: {
type: 'string',
'x-component-props': {
placeholder: '所属机构'
},
},
userJobTitle: {
type: 'string',
'x-component-props': {
placeholder: '职位'
},
},
speciality: {
type: 'string',
enum: Object.keys(SpecialityTypeMap).map(item => ({
label: SpecialityTypeMap[item],
value: item,
})),
'x-component-props': {
placeholder: '专家专业类别'
},
},
qualification: {
type: 'string',
'x-component-props': {
placeholder: '专家资格证书'
},
},
title: {
type: 'string',
'x-component-props': {
placeholder: '专家专业职称'
},
},
type: {
type: 'number',
enum: Object.keys(ExpertTypeMap).map(item => ({
label: ExpertTypeMap[item],
value: item,
})),
'x-component-props': {
placeholder: '专家类型'
},
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
......@@ -134,6 +134,7 @@ const AddRemarkBidExpert:React.FC<AddRemarkBidExpertProps> = (props) => {
addSchemaAction.setFieldValue('userOrgName', selectRow[0]['orgName'])
addSchemaAction.setFieldValue('userJobTitle', selectRow[0]['roleName'])
addSchemaAction.setFieldValue('phone', selectRow[0]['phone'])
addSchemaAction.setFieldValue('expertUserId', selectRow[0]['userId'])
}
return (
......
......@@ -164,6 +164,12 @@ export const formSchema: ISchema = {
title: '移除日期',
readOnly: true,
},
expertUserId: {
type: 'number',
title: '用户id',
visible: false,
readOnly: true,
},
}
}
}
......
.cardListTitle {
padding: 0;
line-height: 20px;
margin-top: 24px;
color: #909399;
}
.cardListText {
line-height: 20px;
margin-top: 24px;
}
import React from 'react';
import React, { useState, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi'
import { Button, Row, Col, Card } from 'antd'
import ReutrnEle from '@/components/ReturnEle';
import { SaveOutlined } from '@ant-design/icons';
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import MellowCard from '@/components/MellowCard';
import ModalForm from '@/components/ModalForm';
import { createAsyncFormActions, createFormActions } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils';
import styles from './index.less'
import { BidInStateTexts } from '@/constants';
const approvedActions = createFormActions()
const ExtractNoticeManageDetail: React.FC = () => {
const {
id,
preview,
pageStatus,
status, // 1确认 2拒绝 null查看
action, // 1操作 null查看
} = usePageStatus()
const currentRef = useRef<any>({})
const [btnLoading, setBtnLoading] = useState<boolean>(false)
const [loading, setLoading] = useState<boolean>(false)
const [inviterInfo, setInviterInfo] = useState<any>({})
const [initValue, setInitValue] = useState<any>(() => {
if(Number(status)) {
return {
id,
status: true
}
} else {
return {
id,
status: false
}
}
})
useEffect(() => {
if(id) {
PublicApi.getPurchaseExpertExtractRecordGetExpertExtractRecord({id}).then(res => {
const { code, data } = res
if(code === 1000)
setInviterInfo(data.inviteTender)
})
}
}, [id])
const onSubmit = () => {
currentRef.current.setVisible(true)
}
const onConfirm = () => {
approvedActions.submit()
}
const handleSubmit = (value) => {
PublicApi.postPurchaseExpertExtractRecordUpdateExpertExtractRecordStatus({...value, id, status: status ? true :false}).then(res => {
const { code } = res
if(code === 1000) {
setTimeout(() => {
history.goBack()
}, 600)
}
})
}
return (
<div>
const clickPreviewDetail = () => {
history.push(`/memberCenter/procurementAbility/callForBids/callForBidsSearch/detail?id=${ inviterInfo['id'] }`)
}
</div>
return (<PageHeaderWrapper
style={{margin: 0}}
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回"/>}
title="专家抽取通知"
extra={action && [
<Button key="1" onClick={onSubmit} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
提交
</Button>,
]}
>
<MellowCard
title="招标基本信息"
style={{marginTop: 24}}
bordered={false}
fullHeight
>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>招标编号:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>
<Button type="link" onClick={clickPreviewDetail}>{inviterInfo?.code}</Button>
</p>
</Col>
</Row>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>内部状态:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>{BidInStateTexts[inviterInfo?.inviteTenderInStatus]}</p>
</Col>
</Row>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>招标会员:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>{inviterInfo?.memberName}</p>
</Col>
</Row>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>发布时间:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>{formatTimeString(inviterInfo?.createTime)}</p>
</Col>
</Row>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>招标项目:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>{inviterInfo?.projectName}</p>
</Col>
</Row>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>招标摘要:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>{inviterInfo?.remark}</p>
</Col>
</Row>
</MellowCard>
<MellowCard
title="评标要求"
style={{marginTop: 24}}
bordered={false}
fullHeight
>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>评标要求时间:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>{`${formatTimeString(inviterInfo?.evaluationStartTime)} ~ ${formatTimeString(inviterInfo?.evaluationEndTime)}`}</p>
</Col>
</Row>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>评标要求:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>{inviterInfo?.evaluationRequirement}</p>
</Col>
</Row>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>评标要求附件:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>{inviterInfo?.evaluationFile?.length ? inviterInfo.evaluationFile.map(item => (<div><a href={item.url}>{item.name}</a></div>)) : null}</p>
</Col>
</Row>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>是否在线评标:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>{inviterInfo?.isOnlineEvaluation ? '是' : '否'}</p>
</Col>
</Row>
<Row>
<Col span={6}>
<p className={styles.cardListTitle}>评标项模板:</p>
</Col>
<Col span={18}>
<p className={styles.cardListText}>{inviterInfo?.templateName}</p>
</Col>
</Row>
</MellowCard>
<ModalForm
modalTitle='提交原因'
currentRef={currentRef}
confirm={onConfirm}
onSubmit={handleSubmit}
initialValues={initValue}
actions={approvedActions}
schema={{
type: 'object',
properties: {
NO_SUBMIT: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
labelAlign: 'top',
},
properties: {
remark: {
type: 'textarea',
"x-component-props": {
rows: 4,
placeholder: '在此输入你的原因, 最多30个汉字'
},
title: '原因',
"x-rules": [
{
required: true,
message: '请输入原因'
},
{
limitByte: true,
maxByte: 30
}
]
},
status: {
type: 'boolean',
title: '状态',
visible: false
},
id: {
type: 'number',
title: 'ID',
visible: false
},
}
}
}
}}
effects={($, ctx) => {
$('onFieldValueChange', 'status').subscribe(async parentState => {
ctx.setFieldState('remark', state => state.props.title = parentState.initialValue ? '确认原因' : '拒绝原因')
})
}}
modalProps={{confirmLoading: loading}}
/>
</PageHeaderWrapper>
);
};
......
import React, { useRef } from 'react'
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space } from 'antd'
import { Card } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined } from '@ant-design/icons'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
......@@ -17,7 +16,8 @@ import '../../constants/index.less'
export interface ExtractNoticeManageProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementReviewedListOne(params)
const { data } = await PublicApi.getPurchaseExpertExtractRecordGetExpertExtractRecordList(params)
return data
}
......@@ -46,7 +46,7 @@ const ExtractNoticeManage:React.FC<ExtractNoticeManageProps> = (props) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
'inviteTenderCode',
FORM_FILTER_PATH,
);
},
......@@ -60,20 +60,6 @@ const ExtractNoticeManage:React.FC<ExtractNoticeManageProps> = (props) => {
span: 16
}
}}
// formilyChilds={{
// children: <Space>
// <Button
// icon={<PlusCircleOutlined/>}
// type='primary'
// onClick={() => history.push('/memberCenter/procurementAbility/callForBids/remarkBidCommittee/add')}
// >
// 新建
// </Button>
// </Space>,
// layouts: {
// span: 8
// }
// }}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -5,6 +5,7 @@ import StatusSwitch from '@/components/StatusSwitch'
import EyePreview from '@/components/EyePreview'
import { formatTimeString } from '@/utils'
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import { ExpertRectractStatus } from '@/constants'
// 评标委员会 招标
export const useSelfTable = () => {
......@@ -19,75 +20,48 @@ export const useSelfTable = () => {
render: (t, r, i) => ++i
},
{
title: '评标委员会名称',
title: '招标编号',
align: 'left',
dataIndex: 'receiverName',
key: 'receiverName',
dataIndex: ['inviteTender', 'code'],
key: ['inviteTender', 'code'],
render: (text, record) => <>
<EyePreview url={`${history.location.pathname}/detail?id=${record.id}`}>
<EyePreview url={`/memberCenter/procurementAbility/callForBids/callForBidsSearch/detail?id=${record.inviteTender.id}`}>
{text}
</EyePreview>
</>
},
{
title: '评标招标编号',
title: '专家编码',
align: 'left',
dataIndex: 'orderNo',
key: 'orderNo',
dataIndex: 'id',
key: 'id',
},
{
title: '开标时间',
title: '招标项目',
align: 'left',
dataIndex: 'createTime',
key: 'createTime',
render: (text, record) => formatTimeString(record.createTime),
width: 200
dataIndex: ['inviteTender', 'projectName'],
key: ['inviteTender', 'projectName'],
},
{
title: '评标开始/截止时间',
align: 'left',
dataIndex: 'createTime',
key: 'createTime',
dataIndex: ['inviteTender', 'evaluationStartTime'],
key: ['inviteTender', 'evaluationEndTime'],
render: (text, record) => <>
<div><PlayCircleOutlined />{formatTimeString(record.createTime)}</div>
<div><PoweroffOutlined />{formatTimeString(record.createTime)}</div>
<div><PlayCircleOutlined />{formatTimeString(record.inviteTender.evaluationStartTime)}</div>
<div><PoweroffOutlined />{formatTimeString(record.inviteTender.evaluationEndTime)}</div>
</>,
width: 200
},
{
title: '创建时间',
align: 'left',
dataIndex: 'createTime',
key: 'createTime',
render: (text, record) => formatTimeString(record.createTime),
width: 200
},
{
title: '参与评标人数',
title: '状态',
align: 'left',
dataIndex: 'sum',
key: 'sum',
dataIndex: 'status',
key: 'status',
render: (t, r) => ExpertRectractStatus[t]
},
// {
// title: '状态',
// align: 'left',
// dataIndex: 'externalState',
// key: 'externalState',
// render: (text: any, record: any) => (
// <StatusSwitch
// handleConfirm={() => handleUpdateState(record)}
// record={record}
// fieldNames="isEnable"
// expectTrueValue={true}
// />
// ),
// },
]
// const handleUpdateState = (record) => {
// console.log(record, 'update')
// }
const secondColumns: any[] = baseBidListColumns.concat([
{
......@@ -96,9 +70,9 @@ export const useSelfTable = () => {
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <>
<Button type='link'>编辑</Button>
<Button type='link'>发送通知</Button>
<Button type='link'>删除</Button>
{ record.status !== 3 && <Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/callForBids/extractNoticeManage/detail?id=${record.id}&action=1&status=1`)}>确认</Button> }
{ record.status !== 4 && <Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/callForBids/extractNoticeManage/detail?id=${record.id}&action=1&status=0`)}>拒绝</Button> }
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/callForBids/extractNoticeManage/detail?id=${record.id}`)}>查看</Button>
</>
}
])
......
......@@ -8,11 +8,11 @@ import { OrderTypeMap, PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkSt
export const tableListSchema: ISchema = {
type: 'object',
properties: {
orderNo: {
inviteTenderCode: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入订单编号',
placeholder: '请输入招标编号',
align: 'flex-end',
},
},
......@@ -26,34 +26,38 @@ export const tableListSchema: ISchema = {
}
},
properties: {
orderThe: {
inviteTenderProjectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入订单摘要',
placeholder: '请输入招标项目',
}
},
"supplyMembersName": {
type: 'string',
"x-component-props": {
placeholder: '请输入供应会员名称'
}
},
"type": {
type: 'string',
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: Object.keys(OrderTypeMap).map(item => ({
label: OrderTypeMap[item],
value: item,
}))
},
"[startCreateTime,endCreateTime]": {
"[evaluationStartTime, evaluationEndTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
placeholder: ['评标开始时间','评标结束时间'],
},
},
"status": {
type: 'number',
"x-component-props": {
placeholder: '请选择状态'
},
enum: [
{
label: '待确认',
value: 2,
},
{
label: '已确认',
value: 3,
},
{
label: '已拒绝',
value: 4,
},
]
},
submit: {
'x-component': 'Submit',
......
......@@ -46,7 +46,7 @@ const RemarkBidCommittee:React.FC<RemarkBidCommitteeProps> = (props) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
'name',
FORM_FILTER_PATH,
);
},
......
import React, { useRef } from 'react'
import { Button } from 'antd'
import { Button, Popconfirm } from 'antd'
import { history } from 'umi'
import StatusSwitch from '@/components/StatusSwitch'
import { PublicApi } from '@/services/api'
import EyePreview from '@/components/EyePreview'
import { formatTimeString } from '@/utils'
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
......@@ -10,6 +10,37 @@ import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
export const useSelfTable = () => {
const ref = useRef<any>({})
const handelEdit = (id) => {
history.push(`/memberCenter/procurementAbility/callForBids/remarkBidCommittee/edit?id=${id}`)
}
const handelSend = async (id) => {
const { code } = await PublicApi.postPurchaseExpertExtractSendExpertExtract({id})
if(code === 1000) {
setTimeout(() => {
ref.current.reload()
}, 600)
}
}
const handleAgainMessage = async (id) => {
const { code } = await PublicApi.postPurchaseExpertExtractSendExpertExtractAgain({id})
if(code === 1000) {
setTimeout(() => {
ref.current.reload()
}, 600)
}
}
const handleDelete = async (id) => {
const { code } = await PublicApi.postPurchaseExpertExtractDeleteExpertExtract({id})
if(code === 1000) {
setTimeout(() => {
ref.current.reload()
}, 600)
}
}
const baseBidListColumns: any[] = [
{
title: '序号',
......@@ -19,76 +50,62 @@ export const useSelfTable = () => {
render: (t, r, i) => ++i
},
{
title: '评标委员会名称',
title: '主题名称',
align: 'left',
dataIndex: 'receiverName',
key: 'receiverName',
dataIndex: 'name',
key: 'name',
render: (text, record) => <>
<EyePreview url={`${history.location.pathname}/detail?id=${record.id}`}>
<EyePreview url={`${history.location.pathname}/detail?id=${record.id}&preview=1`}>
{text}
</EyePreview>
</>
},
{
title: '评标招标编号',
title: '招标编号',
align: 'left',
dataIndex: 'orderNo',
key: 'orderNo',
dataIndex: ['inviteTender', 'code'],
key: ['inviteTender', 'code'],
},
{
title: '开标时间',
align: 'left',
dataIndex: 'createTime',
key: 'createTime',
render: (text, record) => formatTimeString(record.createTime),
dataIndex: ['inviteTender', 'openTenderTime'],
key: ['inviteTender', 'openTenderTime'],
render: (text, record) => formatTimeString(text),
width: 200
},
{
title: '评标开始/截止时间',
align: 'left',
dataIndex: 'createTime',
key: 'createTime',
dataIndex: ['inviteTender', 'evaluationStartTime'],
key: ['inviteTender', 'evaluationEndTime'],
render: (text, record) => <>
<div><PlayCircleOutlined />{formatTimeString(record.createTime)}</div>
<div><PoweroffOutlined />{formatTimeString(record.createTime)}</div>
<div><PlayCircleOutlined />{formatTimeString(text)}</div>
<div><PoweroffOutlined />{formatTimeString(record.inviteTender.evaluationEndTime)}</div>
</>,
width: 200
},
{
title: '创建时间',
title: '专家抽取数',
align: 'left',
dataIndex: 'createTime',
key: 'createTime',
render: (text, record) => formatTimeString(record.createTime),
width: 200
dataIndex: 'expertCount',
key: 'expertCount',
},
{
title: '专家确认数',
align: 'left',
dataIndex: 'expertConfirmCount',
key: 'expertConfirmCount',
},
{
title: '参与评标人数',
title: '状态',
align: 'left',
dataIndex: 'sum',
key: 'sum',
dataIndex: 'status',
key: 'status',
render: (t, r) => t ? '已发送' : '待发送'
},
// {
// title: '状态',
// align: 'left',
// dataIndex: 'externalState',
// key: 'externalState',
// render: (text: any, record: any) => (
// <StatusSwitch
// handleConfirm={() => handleUpdateState(record)}
// record={record}
// fieldNames="isEnable"
// expectTrueValue={true}
// />
// ),
// },
]
// const handleUpdateState = (record) => {
// console.log(record, 'update')
// }
const secondColumns: any[] = baseBidListColumns.concat([
{
title: '操作',
......@@ -96,9 +113,24 @@ export const useSelfTable = () => {
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <>
<Button type='link'>编辑</Button>
<Button type='link'>发送通知</Button>
<Button type='link'>删除</Button>
{
!record.status
?
<>
<Button type='link' onClick={() => handelSend(record.id)}>发送通知</Button>
<Popconfirm
title="确定要执行该操作?"
onConfirm={() => handleDelete(record.id)}
okText="是"
cancelText="否"
>
<Button type='link'>删除</Button>
</Popconfirm>
</>
:
<Button type='link' onClick={() => handleAgainMessage(record.id)}>再次发送通知</Button>
}
<Button type='link' onClick={() => handelEdit(record.id)}>编辑</Button>
</>
}
])
......
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: {
orderNo: {
name: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入订单编号',
placeholder: '请输入主题名称',
align: 'flex-end',
},
},
......@@ -26,35 +23,12 @@ export const tableListSchema: ISchema = {
}
},
properties: {
orderThe: {
inviteTenderCode: {
type: 'string',
'x-component-props': {
placeholder: '请输入订单摘要',
placeholder: '请输入招标编码',
}
},
"supplyMembersName": {
type: 'string',
"x-component-props": {
placeholder: '请输入供应会员名称'
}
},
"type": {
type: 'string',
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: Object.keys(OrderTypeMap).map(item => ({
label: OrderTypeMap[item],
value: item,
}))
},
"[startCreateTime,endCreateTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
......
......@@ -62,7 +62,7 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
}, [id])
const reloadPayList = (memberId, memberRoleId) => {
PublicApi.getPayPayWayList({memberId, memberRoleId}).then(res => {
PublicApi.getPayPayWayAccount({memberId, memberRoleId}).then(res => {
const { code, data } = res
if (code === 1000) {
setPaylist(data)
......
......@@ -48,7 +48,8 @@ const transformPayData = (originData, data): any => {
const formatting = (data, property) => {
let nweData = data.reduce(function (acc, obj) {
let key = obj[property];
// 兼顾id为-1的账期月结模式
let key = obj[property] || obj['id'];
if (!acc[key]) {
acc[key] = []
}
......@@ -56,12 +57,20 @@ const formatting = (data, property) => {
return acc
}, {})
for(let i in nweData){
nweData[i] = nweData[i].map(item => ({ value: item.id, label: item.way, channel: item.payType }))
nweData[i] = nweData[i].map(item => {
// 单独处理100账结 101月结
if(item.id === -1){
return { value: item.settlementWay, label: item.settlementWay === 100 ? `账期${item.settlementDays}天` : `月结${item.settlementDate}号`, channel: item.id }
} else {
return { value: item.id, label: item.way, channel: item.payType }
}
})
}
return nweData
}
const payTextList = ["",
const payTextList = [
"",
'线上支付',
'线下支付',
'授信支付',
......@@ -75,6 +84,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
const { id } = usePageStatus()
const { data, payList, currentPayInfoId } = useContext(OrderDetailContext)
const transformPayList: any = data ? formatting(payList, "payType") : []
console.log(transformPayList, 'trans')
const [visible, setVisible] = useState(false)
const [checked, setChecked] = useState<any>({})
const [current, setCurrent] = useState(0) // 0选择方式 1线下支付方式 2授信支付 3余额支付 4微信支付 5货到付款 6支付宝 1000清除
......@@ -170,6 +180,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}
const handleConfirm = () => {
console.log(current, checked, 'confirm')
if (current === 0) {
if (checked?.id) {
if (checked.id === 5) { // 线下支付
......@@ -405,7 +416,15 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
>
{current === 0 &&
transformPayList && Object.entries(transformPayList).map(([key, value]) => <Row key={key} style={{ marginBottom: 24 }}>
<Col span={6} style={{ color: '#909399', fontSize: 12, display: payOnReceived && Number(key)===4 ? 'none' : 'block' }}>{payTextList[key]}</Col>
<Col span={6} style={{ color: '#909399', fontSize: 12, display: payOnReceived && Number(key)===4 ? 'none' : 'block' }}>
{
payTextList[key]
?
payTextList[key]
:
( value[0]['value'] === 1 ? '账期' : '月结' )
}
</Col>
<Col style={{ flex: 1 }}>
<div className={style.radioBox}>
{
......
......@@ -100,15 +100,24 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
<Col className={style.fontGray} span={4}>支付环节: </Col>
<Col>{v.payNode}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{payTextList[v.payWay]}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付渠道: </Col>
{/* <Col>{payList.find(j => j.id === v.channel)?.way || (v.channel === 0 && '积分支付')}</Col> */}
<Col>{payChannel[v.channel]}</Col>
</Row>
{
v.payWay === -1 ?
<Row>
<Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{v.channel === 100 ? '账期' : '月结'}</Col>
</Row>
:
<>
<Row>
<Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{payTextList[v.payWay]}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付渠道: </Col>
<Col>{payChannel[v.channel]}</Col>
</Row>
</>
}
</TabPane>) }
</Tabs>
{/* </Row> */}
......
......@@ -42,14 +42,27 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
case 4:
payVal = "货到付款"
break
default:
// 不在上述范围之内 为100账结 101月结
if(item.settlementWay === 100) payVal = '账期'
if(item.settlementWay === 101) payVal = '月结'
break
}
result.push({
payVal,
payType: item.payType,
payList: [item]
payType: item.id === -1 ? item.id : item.payType,
payList: item.id === -1 ? [{
...item,
way: item.settlementWay === 100 ? `账期${item.settlementDays}天` : `月结${item.settlementDate}号`,
payType: item.id,
// 具体结算方式
wayId: item.settlementWay,
id: item.settlementWay,
}] : [item]
})
}
}
console.log(result, 'result')
return result
}
......
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