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

feat: 采购计划管理

parent cb683124
......@@ -38,13 +38,13 @@ export const purchasePlanRoute = [
/** 待审核采购计划(二级) */
path: '/memberCenter/procurementAbility/purchasePlan/purchasePlanTwo',
name: '待审核采购计划(二级)',
compTwont: '@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanTwo'
component: '@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanTwo'
},
{
/** 待执行采购计划 */
path: '/memberCenter/procurementAbility/purchasePlan/purchasePlanPerform',
name: '待执行采购计划',
compTwont: '@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanPerform'
component: '@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanPerform'
},
]
......
......@@ -29,6 +29,9 @@ import {
DEMANDPLAN_SECHEMA
} from '../../schema/demandPlan';
import {
PURCHASEPLAN_SECHEMA
} from '../../schema/purchasePlan';
import {
PURCHASEBIDORDER_SCHEMA,
PURCHASEBIDREADYADD_SCHEMA,
PURCHASEBIDOSIGNUP_SCHEMA,
......@@ -58,6 +61,7 @@ interface Iprops {
'DEMANDPLANSERCH_SECHEMA' |
'DEMANDPLANADDED_SECHEMA' |
'DEMANDPLAN_SECHEMA' |
'PURCHASEPLAN_SECHEMA' |
'PURCHASEBIDORDER_SCHEMA' |
'PURCHASEBIDREADYADD_SCHEMA' |
'PURCHASEBIDOSIGNUP_SCHEMA' |
......@@ -115,6 +119,8 @@ const Table: React.FC<Iprops> = (props: any) => {
return DEMANDPLANADDED_SECHEMA;
case 'DEMANDPLAN_SECHEMA':
return DEMANDPLAN_SECHEMA;
case 'PURCHASEPLAN_SECHEMA':
return PURCHASEPLAN_SECHEMA;
case 'PURCHASEBIDORDER_SCHEMA':
return PURCHASEBIDORDER_SCHEMA;
case 'PURCHASEBIDREADYADD_SCHEMA':
......
import React from 'react';
import { Card, Tabs } from 'antd';
import { Card, Tabs, Button } from 'antd';
import { history } from 'umi';
import BasicInfo from './components/basicInfo';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import Material from './components/material';
const { TabPane } = Tabs;
const DemandPlanAddedForm = () => {
return (
<Card>
<Tabs>
<TabPane tab="基本信息" key="1">
<BasicInfo />
</TabPane>
<TabPane tab="采购物料" key="2">
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
extra={
<Button type="primary"> 保存</Button>
}
>
<Card>
<Tabs>
<TabPane tab="基本信息" key="1">
<BasicInfo />
</TabPane>
<TabPane tab="采购物料" key="2">
<Material />
</TabPane>
</Tabs>
</Card>
</PageHeaderWrapper>
</TabPane>
</Tabs>
</Card>
)
}
......
import React from 'react';
import { Form, Input, DatePicker } from 'antd';
import { Form, Input, DatePicker, Row, Col, Typography } from 'antd';
const layout: any = {
colon: false,
......@@ -15,38 +15,52 @@ const BasicInfo = () => {
<Form.Item label="需求计划摘要" rules={[{ required: true, message: '请输入需求计划摘要' }]} name="summary">
<Input />
</Form.Item>
<Form.Item label="需求计划周期" rules={[{ required: true, message: '请输入需求计划摘要' }]} style={{ marginBottom: 0 }}>
<Form.Item
name="startTime"
rules={[{ required: true }]}
style={{ display: 'inline-block', width: 'calc(50% - 8px)' }}
>
<DatePicker />
</Form.Item>
<Form.Item
name="endTime"
rules={[{ required: true }]}
style={{ display: 'inline-block', width: 'calc(50% - 8px)', margin: '0 8px' }}
>
<DatePicker />
</Form.Item>
<Form.Item required label="需求计划周期" rules={[{ required: true, message: '请输入需求计划摘要' }]} style={{ marginBottom: 0 }}>
<Row>
<Col span={11}>
<Form.Item
name="startTime"
rules={[{ required: true }]}
>
<DatePicker style={{ width: '100%' }} placeholder='选择开始日期' />
</Form.Item>
</Col>
<Col span={2}>
<span style={{
display: 'flex',
textAlign: 'center',
height: '45%',
width: '100%',
alignItems: 'center',
justifyContent: 'space-evenly',
}}>~</span>
</Col>
<Col span={11}>
<Form.Item
name="endTime"
rules={[{ required: true }]}
>
<DatePicker style={{ width: '100%' }} placeholder='选择结束日期' />
</Form.Item>
</Col>
</Row>
</Form.Item>
<Form.Item label="需求计划编号" name="needPlanNo">
<Input />
<Typography.Text>X2020025008</Typography.Text>
</Form.Item>
<Form.Item label="编制部门" name="department">
<Input />
<Typography.Text>业务部</Typography.Text>
</Form.Item>
<Form.Item label="编制人" name="userName">
<Input />
<Typography.Text>蒯美政</Typography.Text>
</Form.Item>
<Form.Item label="编制时间" name="createTime">
<Input />
<Typography.Text>2020-08-25 09:00:00</Typography.Text>
</Form.Item>
<Form.Item label="内部状态" name="innerStatus">
<Input />
<Typography.Text>待提交审核</Typography.Text>
</Form.Item>
</Form>
</Form >
)
}
......
import React from 'react';
import { Form, Radio, Button, Table } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import { ColumnType } from 'antd/lib/table/interface';
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 24 },
labelAlign: "left"
}
const Material = () => {
const [form] = Form.useForm();
const columns: ColumnType<Object>[] = [
{
title: '物料编号/名称',
key: 'number',
dataIndex: 'number'
},
{
title: '规格型号',
key: 'model',
dataIndex: 'model'
},
{
title: '品类',
key: 'category',
dataIndex: 'category'
},
{
title: '品牌',
key: 'brand',
dataIndex: 'brand'
},
{
title: '单位',
key: 'unit',
dataIndex: 'unit'
},
{
title: '需求数量',
key: 'needCount',
dataIndex: 'needCount'
},
{
title: '成本价',
key: 'costPrice',
dataIndex: 'costPrice'
},
{
title: '需求金额',
key: 'needPrice',
dataIndex: 'needPrice'
},
{
title: '到货日期',
key: 'arriveTime',
dataIndex: 'arriveTime'
},
{
title: '操作',
key: 'operate',
dataIndex: 'operate'
}
]
return (
<Form {...layout} form={form}>
<Form.Item
label='添加方式'
name='materielMode'
rules={[{ required: true, message: '请选择添加方式' }]}
>
<Radio.Group>
<Radio value={1}>选择货品生成</Radio>
<Radio value={2}>导入计划采购物料</Radio>
</Radio.Group>
</Form.Item>
<Button
type='dashed'
block
style={{
marginBottom: '24px',
}}
>
<PlusOutlined />
添加
</Button>
<Table
columns={columns}
dataSource={[]}
/>
</Form>
)
}
export default Material;
import React, { useRef, useState } from 'react';
import React from 'react';
import { history } from 'umi';
import Table from '../../components/table'
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { Row, Col, Button, Badge, Tag, Space, Typography, Rate } from 'antd';
import { Row, Col, Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_EXTERNALSTATE,
OFFTER_EXTERNALSTATE_COLOR,
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR,
CHNUM_TYPE
} from '../../constants';
import { PlayCircleOutlined, PlusOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const DemandPlanSummary = () => {
......@@ -21,68 +18,43 @@ const DemandPlanSummary = () => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
title: '报价单号/摘要',
key: 'quotedPriceNo',
dataIndex: 'quotedPriceNo',
title: '需求计划编号/摘要',
key: 'needPlanNo',
dataIndex: 'needPlanNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/offter/auditOffterOne/view?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
<Text type='secondary'>{record.summary}</Text>
</Space>
)
}, {
title: '需求单号/会员',
key: 'purchaseInquiryNo',
dataIndex: 'purchaseInquiryNo',
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview
url={`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`}
>{text}</EyePreview>
<Text type='secondary'>{record.memberName}</Text>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '报价截止时间',
key: 'offerEndTime',
dataIndex: 'offerEndTime',
render: (text: any, record: any) => format(text)
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '单据时间',
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => format(text)
}, {
title: '报价轮次',
key: 'turn',
dataIndex: 'turn',
render: (text: any, record: any) => (
<>
<Rate
count={3}
character='▌'
disabled
className='rate_style'
style={{
fontSize: '12px',
color: '#00B37A',
}}
value={text}
allowHalf
/>
<Text>{CHNUM_TYPE[text]}</Text>
</>
)
}, {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={OFFTER_EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag>
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.interiorStateName} />
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
......@@ -99,42 +71,21 @@ const DemandPlanSummary = () => {
)
}];
/** 多选操作 */
const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [loading, setLoading] = useState<boolean>(false)
/** 批量审核 */
const fetchSubmitBatch = async () => {
setLoading(true)
const res = await PublicApi.postPurchaseQuotedPriceExamine1Batch({ ids: rowkeys });
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
setLoading(false)
} else {
setLoading(false)
}
}
return (
<Table
selectedRow
reload={ref}
fetchRowkeys={(e) => setRowKeys(e)}
schemaType="OFFERSERAHAUDIT_SCHEMA"
schemaType="DEMANDPLANADDED_SECHEMA"
columns={columns}
effects="quotedPriceNo"
fetch={PublicApi.getPurchaseQuotedPriceStayExamineList1}
effects="needPlanNo"
fetch={PublicApi.getPurchaseNeedPlanList}
controllerBtns={
<Row>
<Col span={6}>
<Button
loading={loading}
onClick={fetchSubmitBatch}
disabled={rowkeys.length === 0}
onClick={() => history.push('/memberCenter/procurementAbility/purchaseInquiry/add')}
type="primary"
icon={<PlusOutlined />}
>
批量提交审核
新建
</Button>
</Col>
</Row>
......
import React, { useRef, useState } from 'react';
import React from 'react';
import { history } from 'umi';
import Table from '../../components/table'
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { Row, Col, Button, Badge, Tag, Space, Typography, Rate } from 'antd';
import { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_EXTERNALSTATE,
OFFTER_EXTERNALSTATE_COLOR,
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR,
CHNUM_TYPE
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const PurchasePlanOne = () => {
......@@ -21,68 +18,43 @@ const PurchasePlanOne = () => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
title: '报价单号/摘要',
key: 'quotedPriceNo',
dataIndex: 'quotedPriceNo',
title: '采购计划编号/摘要',
key: 'purchasePlanNo',
dataIndex: 'purchasePlanNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/offter/auditOffterOne/view?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
<Text type='secondary'>{record.summary}</Text>
</Space>
)
}, {
title: '需求单号/会员',
key: 'purchaseInquiryNo',
dataIndex: 'purchaseInquiryNo',
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview
url={`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`}
>{text}</EyePreview>
<Text type='secondary'>{record.memberName}</Text>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '报价截止时间',
key: 'offerEndTime',
dataIndex: 'offerEndTime',
render: (text: any, record: any) => format(text)
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '单据时间',
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => format(text)
}, {
title: '报价轮次',
key: 'turn',
dataIndex: 'turn',
render: (text: any, record: any) => (
<>
<Rate
count={3}
character='▌'
disabled
className='rate_style'
style={{
fontSize: '12px',
color: '#00B37A',
}}
value={text}
allowHalf
/>
<Text>{CHNUM_TYPE[text]}</Text>
</>
)
}, {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={OFFTER_EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag>
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.interiorStateName} />
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
......@@ -99,46 +71,12 @@ const PurchasePlanOne = () => {
)
}];
/** 多选操作 */
const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [loading, setLoading] = useState<boolean>(false)
/** 批量审核 */
const fetchSubmitBatch = async () => {
setLoading(true)
const res = await PublicApi.postPurchaseQuotedPriceExamine1Batch({ ids: rowkeys });
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
setLoading(false)
} else {
setLoading(false)
}
}
return (
<Table
selectedRow
reload={ref}
fetchRowkeys={(e) => setRowKeys(e)}
schemaType="OFFERSERAHAUDIT_SCHEMA"
schemaType="PURCHASEPLAN_SECHEMA"
columns={columns}
effects="quotedPriceNo"
fetch={PublicApi.getPurchaseQuotedPriceStayExamineList1}
controllerBtns={
<Row>
<Col span={6}>
<Button
loading={loading}
onClick={fetchSubmitBatch}
disabled={rowkeys.length === 0}
>
批量提交审核
</Button>
</Col>
</Row>
}
effects="purchasePlanNo"
fetch={PublicApi.getPurchasePurchasePlanList}
/>
)
}
......
import React, { useRef, useState } from 'react';
import React from 'react';
import { history } from 'umi';
import Table from '../../components/table'
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { Row, Col, Button, Badge, Tag, Space, Typography, Rate } from 'antd';
import { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_EXTERNALSTATE,
OFFTER_EXTERNALSTATE_COLOR,
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR,
CHNUM_TYPE
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const PurchasePlanPerform = () => {
......@@ -21,68 +18,43 @@ const PurchasePlanPerform = () => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
title: '报价单号/摘要',
key: 'quotedPriceNo',
dataIndex: 'quotedPriceNo',
title: '采购计划编号/摘要',
key: 'purchasePlanNo',
dataIndex: 'purchasePlanNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/offter/auditOffterOne/view?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
<Text type='secondary'>{record.summary}</Text>
</Space>
)
}, {
title: '需求单号/会员',
key: 'purchaseInquiryNo',
dataIndex: 'purchaseInquiryNo',
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview
url={`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`}
>{text}</EyePreview>
<Text type='secondary'>{record.memberName}</Text>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '报价截止时间',
key: 'offerEndTime',
dataIndex: 'offerEndTime',
render: (text: any, record: any) => format(text)
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '单据时间',
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => format(text)
}, {
title: '报价轮次',
key: 'turn',
dataIndex: 'turn',
render: (text: any, record: any) => (
<>
<Rate
count={3}
character='▌'
disabled
className='rate_style'
style={{
fontSize: '12px',
color: '#00B37A',
}}
value={text}
allowHalf
/>
<Text>{CHNUM_TYPE[text]}</Text>
</>
)
}, {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={OFFTER_EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag>
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.interiorStateName} />
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
......@@ -99,46 +71,12 @@ const PurchasePlanPerform = () => {
)
}];
/** 多选操作 */
const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [loading, setLoading] = useState<boolean>(false)
/** 批量审核 */
const fetchSubmitBatch = async () => {
setLoading(true)
const res = await PublicApi.postPurchaseQuotedPriceExamine1Batch({ ids: rowkeys });
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
setLoading(false)
} else {
setLoading(false)
}
}
return (
<Table
selectedRow
reload={ref}
fetchRowkeys={(e) => setRowKeys(e)}
schemaType="OFFERSERAHAUDIT_SCHEMA"
schemaType="PURCHASEPLAN_SECHEMA"
columns={columns}
effects="quotedPriceNo"
fetch={PublicApi.getPurchaseQuotedPriceStayExamineList1}
controllerBtns={
<Row>
<Col span={6}>
<Button
loading={loading}
onClick={fetchSubmitBatch}
disabled={rowkeys.length === 0}
>
批量提交审核
</Button>
</Col>
</Row>
}
effects="purchasePlanNo"
fetch={PublicApi.getPurchasePurchasePlanList}
/>
)
}
......
import React, { useRef, useState } from 'react';
import React from 'react';
import { history } from 'umi';
import Table from '../../components/table'
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { Row, Col, Button, Badge, Tag, Space, Typography, Rate } from 'antd';
import { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_EXTERNALSTATE,
OFFTER_EXTERNALSTATE_COLOR,
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR,
CHNUM_TYPE
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const PurchasePlanSearch = () => {
......@@ -21,68 +18,43 @@ const PurchasePlanSearch = () => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
title: '报价单号/摘要',
key: 'quotedPriceNo',
dataIndex: 'quotedPriceNo',
title: '采购计划编号/摘要',
key: 'purchasePlanNo',
dataIndex: 'purchasePlanNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/offter/auditOffterOne/view?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
<Text type='secondary'>{record.summary}</Text>
</Space>
)
}, {
title: '需求单号/会员',
key: 'purchaseInquiryNo',
dataIndex: 'purchaseInquiryNo',
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview
url={`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`}
>{text}</EyePreview>
<Text type='secondary'>{record.memberName}</Text>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '报价截止时间',
key: 'offerEndTime',
dataIndex: 'offerEndTime',
render: (text: any, record: any) => format(text)
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '单据时间',
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => format(text)
}, {
title: '报价轮次',
key: 'turn',
dataIndex: 'turn',
render: (text: any, record: any) => (
<>
<Rate
count={3}
character='▌'
disabled
className='rate_style'
style={{
fontSize: '12px',
color: '#00B37A',
}}
value={text}
allowHalf
/>
<Text>{CHNUM_TYPE[text]}</Text>
</>
)
}, {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={OFFTER_EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag>
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.interiorStateName} />
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
......@@ -99,47 +71,14 @@ const PurchasePlanSearch = () => {
)
}];
/** 多选操作 */
const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [loading, setLoading] = useState<boolean>(false)
/** 批量审核 */
const fetchSubmitBatch = async () => {
setLoading(true)
const res = await PublicApi.postPurchaseQuotedPriceExamine1Batch({ ids: rowkeys });
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
setLoading(false)
} else {
setLoading(false)
}
}
return (
<Table
selectedRow
reload={ref}
fetchRowkeys={(e) => setRowKeys(e)}
schemaType="OFFERSERAHAUDIT_SCHEMA"
schemaType="DEMANDPLAN_SECHEMA"
columns={columns}
effects="quotedPriceNo"
fetch={PublicApi.getPurchaseQuotedPriceStayExamineList1}
controllerBtns={
<Row>
<Col span={6}>
<Button
loading={loading}
onClick={fetchSubmitBatch}
disabled={rowkeys.length === 0}
>
批量提交审核
</Button>
</Col>
</Row>
}
effects="needPlanNo"
fetch={PublicApi.getPurchasePurchasePlanList}
/>
)
}
export default PurchasePlanSearch
import React, { useRef, useState } from 'react';
import React from 'react';
import { history } from 'umi';
import Table from '../../components/table'
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { Row, Col, Button, Badge, Tag, Space, Typography, Rate } from 'antd';
import { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_EXTERNALSTATE,
OFFTER_EXTERNALSTATE_COLOR,
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR,
CHNUM_TYPE
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const PurchasePlanSubmit = () => {
......@@ -21,68 +18,43 @@ const PurchasePlanSubmit = () => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
title: '报价单号/摘要',
key: 'quotedPriceNo',
dataIndex: 'quotedPriceNo',
title: '采购计划编号/摘要',
key: 'purchasePlanNo',
dataIndex: 'purchasePlanNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/offter/auditOffterOne/view?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
<Text type='secondary'>{record.summary}</Text>
</Space>
)
}, {
title: '需求单号/会员',
key: 'purchaseInquiryNo',
dataIndex: 'purchaseInquiryNo',
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview
url={`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`}
>{text}</EyePreview>
<Text type='secondary'>{record.memberName}</Text>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '报价截止时间',
key: 'offerEndTime',
dataIndex: 'offerEndTime',
render: (text: any, record: any) => format(text)
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '单据时间',
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => format(text)
}, {
title: '报价轮次',
key: 'turn',
dataIndex: 'turn',
render: (text: any, record: any) => (
<>
<Rate
count={3}
character='▌'
disabled
className='rate_style'
style={{
fontSize: '12px',
color: '#00B37A',
}}
value={text}
allowHalf
/>
<Text>{CHNUM_TYPE[text]}</Text>
</>
)
}, {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={OFFTER_EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag>
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.interiorStateName} />
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
......@@ -99,47 +71,14 @@ const PurchasePlanSubmit = () => {
)
}];
/** 多选操作 */
const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [loading, setLoading] = useState<boolean>(false)
/** 批量审核 */
const fetchSubmitBatch = async () => {
setLoading(true)
const res = await PublicApi.postPurchaseQuotedPriceExamine1Batch({ ids: rowkeys });
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
setLoading(false)
} else {
setLoading(false)
}
}
return (
<Table
selectedRow
reload={ref}
fetchRowkeys={(e) => setRowKeys(e)}
schemaType="OFFERSERAHAUDIT_SCHEMA"
schemaType="PURCHASEPLAN_SECHEMA"
columns={columns}
effects="quotedPriceNo"
fetch={PublicApi.getPurchaseQuotedPriceStayExamineList1}
controllerBtns={
<Row>
<Col span={6}>
<Button
loading={loading}
onClick={fetchSubmitBatch}
disabled={rowkeys.length === 0}
>
批量提交审核
</Button>
</Col>
</Row>
}
effects="purchasePlanNo"
fetch={PublicApi.getPurchasePurchasePlanList}
/>
)
}
export default PurchasePlanSubmit
import React, { useRef, useState } from 'react';
import React from 'react';
import { history } from 'umi';
import Table from '../../components/table'
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { Row, Col, Button, Badge, Tag, Space, Typography, Rate } from 'antd';
import { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_EXTERNALSTATE,
OFFTER_EXTERNALSTATE_COLOR,
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR,
CHNUM_TYPE
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const PurchasePlanTwo = () => {
......@@ -21,68 +18,43 @@ const PurchasePlanTwo = () => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
title: '报价单号/摘要',
key: 'quotedPriceNo',
dataIndex: 'quotedPriceNo',
title: '采购计划编号/摘要',
key: 'purchasePlanNo',
dataIndex: 'purchasePlanNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview url={`/memberCenter/procurementAbility/offter/auditOffterOne/view?id=${record.id}&number=${record.quotedPriceNo}&turn=${record.turn}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
<Text type='secondary'>{record.summary}</Text>
</Space>
)
}, {
title: '需求单号/会员',
key: 'purchaseInquiryNo',
dataIndex: 'purchaseInquiryNo',
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview
url={`/memberCenter/procurementAbility/offter/auditOffterOne/preview?id=${record.purchaseInquiryId}&number=${record.purchaseInquiryNo}`}
>{text}</EyePreview>
<Text type='secondary'>{record.memberName}</Text>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '报价截止时间',
key: 'offerEndTime',
dataIndex: 'offerEndTime',
render: (text: any, record: any) => format(text)
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '单据时间',
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => format(text)
}, {
title: '报价轮次',
key: 'turn',
dataIndex: 'turn',
render: (text: any, record: any) => (
<>
<Rate
count={3}
character='▌'
disabled
className='rate_style'
style={{
fontSize: '12px',
color: '#00B37A',
}}
value={text}
allowHalf
/>
<Text>{CHNUM_TYPE[text]}</Text>
</>
)
}, {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={OFFTER_EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag>
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.interiorStateName} />
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
......@@ -99,47 +71,15 @@ const PurchasePlanTwo = () => {
)
}];
/** 多选操作 */
const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [loading, setLoading] = useState<boolean>(false)
/** 批量审核 */
const fetchSubmitBatch = async () => {
setLoading(true)
const res = await PublicApi.postPurchaseQuotedPriceExamine1Batch({ ids: rowkeys });
if (res.code === 1000) {
ref.current.reload();
setRowKeys([])
setLoading(false)
} else {
setLoading(false)
}
}
return (
<Table
selectedRow
reload={ref}
fetchRowkeys={(e) => setRowKeys(e)}
schemaType="OFFERSERAHAUDIT_SCHEMA"
schemaType="PURCHASEPLAN_SECHEMA"
columns={columns}
effects="quotedPriceNo"
fetch={PublicApi.getPurchaseQuotedPriceStayExamineList1}
controllerBtns={
<Row>
<Col span={6}>
<Button
loading={loading}
onClick={fetchSubmitBatch}
disabled={rowkeys.length === 0}
>
批量提交审核
</Button>
</Col>
</Row>
}
effects="purchasePlanNo"
fetch={PublicApi.getPurchasePurchasePlanList}
/>
)
}
export default PurchasePlanTwo
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
/** 待提交审核采购计划(一级) & (二级) & 待提交审核采购计划 & 待执行采购计划 */
export const PURCHASEPLAN_SECHEMA: ISchema = {
type: 'object',
properties: {
megalayout: {
type: 'object',
"x-component": 'mega-layout',
properties: {
purchasePlanNo: {
type: 'string',
"x-component": "Search",
"x-mega-props": {
},
"x-component-props": {
placeholder: '采购计划编号',
align: 'flex-left',
}
}
}
},
[FORM_FILTER_PATH]: {
type: 'object',
"x-component": "flex-layout",
"x-component-props": {
rowStyle: {
justifyContent: 'flex-start',
flexWrap: 'nowrap'
},
colStyle: {//改变间隔
marginRight: 20
}
},
properties: {
PRO_LAYOUT: {
type: 'object',
"x-component": 'mega-layout',
"x-mega-props": {
span: 5
},
"x-component-props": {
inline: true
},
properties: {
summary: {
type: 'string',
"x-component-props": {
placeholder: '采购计划摘要',
}
},
"[startTime,endTime]": {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: '采购计划周期',
}
},
}
},
sumbit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
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