Commit add727ad authored by XieZhiXiong's avatar XieZhiXiong

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

parents f8309c68 8c932c6e
......@@ -57,7 +57,7 @@ const memberCenterRoute = {
// ShopRoute,
// CommodityRoute,
// srm开发临时使用...
ProcurementRoute,
// ProcurementRoute,
// // 合同能力
// contracRoute,
//...
......
/**
* @description: 采购能力 需求计划管理
* @param {type}
* @return {type}
*/
export const demandPlanRoute = [
/** 需求计划管理 */
{
path: '/memberCenter/procurementAbility/demandPlan',
name: '需求计划管理',
routes: [
{
/** 需求计划查询 */
path: '/memberCenter/procurementAbility/demandPlan/demandPlanSearch',
name: '需求计划查询',
component: '@/pages/transaction/purchaseAbility/demandPlan/demandPlanSearch'
},
{
/** 待新增需求计划 */
path: '/memberCenter/procurementAbility/demandPlan/demandPlanAdded',
name: '待新增需求计划',
component: '@/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded'
},
{
/** 待新增需求计划 */
path: '/memberCenter/procurementAbility/demandPlan/demandPlanAdded/add',
name: '待新增需求计划',
component: '@/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/add'
},
{
/** 待审核需求计划(一级) */
path: '/memberCenter/procurementAbility/demandPlan/demandPlanOne',
name: '待审核需求计划(一级)',
component: '@/pages/transaction/purchaseAbility/demandPlan/demandPlanOne'
},
{
/** 待审核需求计划(二级) */
path: '/memberCenter/procurementAbility/demandPlan/demandPlanTwo',
name: '待审核需求计划(二级)',
component: '@/pages/transaction/purchaseAbility/demandPlan/demandPlanTwo'
},
{
/** 待提交需求计划 */
path: '/memberCenter/procurementAbility/demandPlan/demandPlanSubmit',
name: '待提交需求计划',
component: '@/pages/transaction/purchaseAbility/demandPlan/demandPlanSubmit'
}
]
}
]
......@@ -5,6 +5,8 @@ import { confirmOfferRoute } from './confirmOffer';
import { tenderRoute } from './tender';
import { purchaseBidRoute } from './purchaseBid';
import { onlineBidRoute } from './onlineBid';
import { demandPlanRoute } from './demamdPlan';
import { purchasePlanRoute } from './purchasePlan';
/**
* 采购能力路由
......@@ -14,6 +16,10 @@ const ProcurementRoute = {
name: "采购能力",
icon: "commodity",
routes: [
/** 需求采购计划 */
...demandPlanRoute,
/** 采购需求计划 */
...purchasePlanRoute,
// // 招标
...callForBidsRoute,
// // 投标
......
/**
* @description: 采购能力 采购计划管理
* @param {type}
* @return {type}
*/
export const purchasePlanRoute = [
/** 采购计划管理 */
{
path: '/memberCenter/procurementAbility/purchasePlan',
name: '采购计划管理',
routes: [
{
/** 待汇总需求计划 */
path: '/memberCenter/procurementAbility/purchasePlan/demandPlanSummary',
name: '待汇总需求计划',
component: '@/pages/transaction/purchaseAbility/purchasePlan/demandPlanSummary'
},
{
/** 采购计划查询 */
path: '/memberCenter/procurementAbility/purchasePlan/purchasePlanSearch',
name: '采购计划查询',
component: '@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanSearch'
},
{
/** 待提交审核采购计划 */
path: '/memberCenter/procurementAbility/purchasePlan/purchasePlanSubmit',
name: '待提交审核采购计划',
component: '@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanSubmit'
},
{
/** 待审核采购计划(一级) */
path: '/memberCenter/procurementAbility/purchasePlan/purchasePlanOne',
name: '待审核采购计划(一级)',
component: '@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanOne'
},
{
/** 待审核采购计划(二级) */
path: '/memberCenter/procurementAbility/purchasePlan/purchasePlanTwo',
name: '待审核采购计划(二级)',
component: '@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanTwo'
},
{
/** 待执行采购计划 */
path: '/memberCenter/procurementAbility/purchasePlan/purchasePlanPerform',
name: '待执行采购计划',
component: '@/pages/transaction/purchaseAbility/purchasePlan/purchasePlanPerform'
},
]
}
]
......@@ -38,7 +38,7 @@ const ResultItem: React.FC<ResultItemPrpos> = (props: any) => {
</div>
<div className={styles.resultItemRow}>
<div className={styles.money}>¥{detail.price}<span>(含税)</span></div>
<Button type='link' onClick={checkDetailFunc}>查看报价明细</Button>
<Button type='link' onClick={() => {checkDetailFunc(detail.id)}}>查看报价明细</Button>
</div>
<Divider dashed style={{ color: '#EBECF0', margin: '6px 0' }} />
<div className={styles.resultItemRow}><div className={styles.label}>联系人姓名:</div><div className={styles.title}>{detail.contacts}</div></div>
......
......@@ -64,7 +64,6 @@ const BidTable: React.FC<ReduxProps> = (props: any) => {
}
const bidDetailContext = useContext(BidDetailContext);
console.log(bidDetailContext, 10086)
const onChangeInput = (v, index, idx) => {
setAwardTaxProbability(v, index, idx)
......
.list {
display: flex;
h5 {
margin-bottom: 2em;
}
.listLable {
flex: 0 0 25%;
color: #909399;
}
}
\ No newline at end of file
import React, { useContext, useRef } from 'react';
import { Row, Col, Image, Tag, Tooltip, Switch, Typography } from 'antd';
import { StandardTable } from 'god';
import Card from '../../../card';
import { Context } from '../context';
import style from './index.less';
import { QuestionCircleOutlined } from '@ant-design/icons';
const TYPE = {
1: '发布至平台',
2: '系统匹配',
3: '邀请会员',
}
const ColStyle = {
display: 'flex',
alignItems: 'center',
border: '1px solid #1fbf87',
paddingTop: ' 6px',
paddingBottom: '6px',
margin: '5px',
borderRadius: '4px',
}
const TextStyle = {
color: '#1fbf87',
marginLeft: '10px',
}
export interface DemandLayoutIProps {
storeList?: any,
title?: string,
bidId: number,
number: string,
fetch?: () => Promise<unknown>
}
const DemandLayout: React.FC<DemandLayoutIProps> = (props: any) => {
const { storeList, title, bidId, number, fetch } = props;
const tableRef = useRef<any>({});
const context = useContext(Context);
const columns = [
{
title: '序号',
key: 'number',
dataIndex: 'number',
render: (text: any, record: any, index: number) => <>{index + 1}</>
},
{
title: '会员名称',
key: 'memberName',
dataIndex: 'memberName',
},
{
title: '会员类型',
key: 'memberTypeName',
dataIndex: 'memberTypeName',
},
{
title: '会员角色',
key: 'roleName',
dataIndex: 'roleName',
},
{
title: '会员等级',
key: 'levelTag',
dataIndex: 'levelTag',
},
{
title: '是否归属会员',
key: 'membershipOrNot',
dataIndex: 'membershipOrNot',
render: (text: any) => (<Tag color={text ? 'success' : 'error'}>{text ? '是' : '否'}</Tag>)
},
{
title: (
<>
<span>需求发送</span>
<Tooltip placement="top" title='打开开关,审核通过后,将发送需求至选择的归属会员'>
<QuestionCircleOutlined
style={{
marginLeft: '5px',
fontSize: '14px',
color: '#909399'
}}
/>
</Tooltip>
</>
),
key: 'state',
dataIndex: 'state',
render: (text: any) => (
<Switch checked={text} disabled={true} />
)
},
{
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (_text: any, _record: any) => (
<Typography.Link href={`/shop?shopId=${btoa(JSON.stringify({ roleId: _record.roleId, memberId: _record.memberId }))}`} target="_blank">
进入店铺
</Typography.Link>
)
},
]
/** 列表数据 */
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
fetch({ id: bidId, number: number, ...params }).then(res => {
resolve(res.data)
})
})
}
return (
<Card
id='demandLayout'
title='需求对接'
>
<div className={style.list}>
<h5 className={style.listLable} style={{ flex: '0 0 100px' }}>{title}</h5>
<h5 className={style.listContent}>{TYPE[context.type]}</h5>
</div>
{context.type === 1
&& (
<Row gutter={[16, 16]}>
{storeList.map(item => (
<Col
span={6}
key={item.id}
style={ColStyle}
>
<Image width={32} height={32} src={item.logoUrl} />
<span style={TextStyle}>{item.name}</span>
</Col>
))}
</Row>
)}
{context.type !== 1
&& (
<StandardTable
currentRef={tableRef}
columns={columns}
tableProps={{ rowKew: 'id' }}
fetchTableData={(params: any) => fetchData(params)}
/>
)}
</Card>
)
}
DemandLayout.defaultProps = {
title: '发布方式'
}
export default DemandLayout;
......@@ -88,7 +88,9 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
width: '100%'
},
format: 'YYYY-MM-DD HH:mm:ss',
disabledDate,
disabledDate: (current) => {
return moment().calendar();
},
}}
/>
case 'date':
......
......@@ -24,6 +24,14 @@ import {
CONFIRMOFFERAUDIT_SCHEMA,
} from '../../schema';
import {
DEMANDPLANSERCH_SECHEMA,
DEMANDPLANADDED_SECHEMA,
DEMANDPLAN_SECHEMA
} from '../../schema/demandPlan';
import {
PURCHASEPLAN_SECHEMA
} from '../../schema/purchasePlan';
import {
PURCHASEBIDORDER_SCHEMA,
PURCHASEBIDREADYADD_SCHEMA,
PURCHASEBIDOSIGNUP_SCHEMA,
......@@ -50,6 +58,10 @@ interface Iprops {
'CONFIRMOFFERSERAH_SCHEMA' |
'CONFIRMOFFERSUBMITAPRICE_SCHEMA' |
'CONFIRMOFFERAUDIT_SCHEMA' |
'DEMANDPLANSERCH_SECHEMA' |
'DEMANDPLANADDED_SECHEMA' |
'DEMANDPLAN_SECHEMA' |
'PURCHASEPLAN_SECHEMA' |
'PURCHASEBIDORDER_SCHEMA' |
'PURCHASEBIDREADYADD_SCHEMA' |
'PURCHASEBIDOSIGNUP_SCHEMA' |
......@@ -60,8 +72,8 @@ interface Iprops {
effects?: string,
selectedRow?: boolean,
reload?: any,
externalStatusFetch?: any,
interiorStatusFetch?: any,
externalStatusFetch?: Promise<unknown>,
interiorStatusFetch?: Promise<unknown>,
}
const formActions = createFormActions();
const Table: React.FC<Iprops> = (props: any) => {
......@@ -101,6 +113,14 @@ const Table: React.FC<Iprops> = (props: any) => {
return CONFIRMOFFERSUBMITAPRICE_SCHEMA;
case 'CONFIRMOFFERAUDIT_SCHEMA':
return CONFIRMOFFERAUDIT_SCHEMA;
case 'DEMANDPLANSERCH_SECHEMA':
return DEMANDPLANSERCH_SECHEMA;
case 'DEMANDPLANADDED_SECHEMA':
return DEMANDPLANADDED_SECHEMA;
case 'DEMANDPLAN_SECHEMA':
return DEMANDPLAN_SECHEMA;
case 'PURCHASEPLAN_SECHEMA':
return PURCHASEPLAN_SECHEMA;
case 'PURCHASEBIDORDER_SCHEMA':
return PURCHASEBIDORDER_SCHEMA;
case 'PURCHASEBIDREADYADD_SCHEMA':
......
......@@ -161,7 +161,7 @@ const ContrastPrice = () => {
})
setAuditDataSource(data)
}
Object.keys(dataSource).length > 0 && console.log(dataSource, 1008689)
const fetchLink = () => {
switch (path) {
case 'auditResultsOne':
......
import React, { Fragment, useEffect, useState } from 'react';
import { Tag, Badge, Tooltip } from 'antd';
import { Tag, Badge, Tooltip, Typography } from 'antd';
import { history } from 'umi';
import { PublicApi } from '@/services/api';
import { GlobalConfig } from '@/global/config'
......@@ -17,7 +17,7 @@ import {
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR
} from '../../constants';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { LinkOutlined, QuestionCircleOutlined } from '@ant-design/icons';
import MaterialLayout from '../../components/detail/components/materialLayout';
import DemandLayout from '../../components/detail/components/demandLayout';
......@@ -104,6 +104,22 @@ const DemandDetailed = () => {
{ label: '交付日期', extra: format(data.deliveryTime) },
{ label: '交付地址', extra: data.address },
{ label: '截止日期', extra: format(data.offerEndTime) },
{
label: '附件',
extra: <>
{data.transactionUurls.map((item: any, index: number) => (
<Typography.Link
style={{ display: 'block', paddingBottom: '8px' }}
key={`link_${index + 1}`}
href={`/api/contract/contractTemplate/downloadContract?contractName=${item.name}&contractUrl=${item.url}`}
target="_blank"
>
<LinkOutlined />
{item.name}
</Typography.Link>
))}
</>
},
]
},
{
......
......@@ -298,3 +298,34 @@ export enum PRICECONTRAST_TYPE {
/** 已解密 */
UNENCRYPTED
}
/** 筛选需求计划内部状态 */
export const DEMANDPLANINTERNALSTATE = [
{
label: '待提交审核', value: 1
},
{
label: '待审核(一级)', value: 2
},
{
label: '审核不通过(一级)', value: 3
},
{
label: '待审核(二级)', value: 4
},
{
label: '审核不通过(二级)', value: 5
},
{
label: '待提交采购汇总', value: 6
},
{
label: '待采购汇总', value: 7
},
{
label: '采购退回', value: 8
},
{
label: '已完成', value: 9
},
]
import React from 'react';
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 (
<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>
)
}
export default DemandPlanAddedForm;
import React from 'react';
import { Form, Input, DatePicker, Row, Col, Typography } from 'antd';
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 9 },
labelAlign: "left"
}
const BasicInfo = () => {
const [form] = Form.useForm();
return (
<Form {...layout} form={form}>
<Form.Item label="需求计划摘要" rules={[{ required: true, message: '请输入需求计划摘要' }]} name="summary">
<Input />
</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">
<Typography.Text>X2020025008</Typography.Text>
</Form.Item>
<Form.Item label="编制部门" name="department">
<Typography.Text>业务部</Typography.Text>
</Form.Item>
<Form.Item label="编制人" name="userName">
<Typography.Text>蒯美政</Typography.Text>
</Form.Item>
<Form.Item label="编制时间" name="createTime">
<Typography.Text>2020-08-25 09:00:00</Typography.Text>
</Form.Item>
<Form.Item label="内部状态" name="innerStatus">
<Typography.Text>待提交审核</Typography.Text>
</Form.Item>
</Form >
)
}
export default BasicInfo;
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 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, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PlusOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const DemandPlanAdded = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
</>
)
}];
return (
<Table
schemaType="DEMANDPLANADDED_SECHEMA"
columns={columns}
effects="needPlanNo"
fetch={PublicApi.getPurchaseNeedPlanList}
controllerBtns={
<Row>
<Col span={6}>
<Button
onClick={() => history.push('/memberCenter/procurementAbility/purchaseInquiry/add')}
type="primary"
icon={<PlusOutlined />}
>
新建
</Button>
</Col>
</Row>
}
/>
)
}
export default DemandPlanAdded
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 { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const DemandPlanOne = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
</>
)
}];
return (
<Table
schemaType="DEMANDPLAN_SECHEMA"
columns={columns}
effects="needPlanNo"
fetch={PublicApi.getPurchaseNeedPlanList}
/>
)
}
export default DemandPlanOne
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 { Badge, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const DemandPlanSearch = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}];
return (
<Table
schemaType="DEMANDPLANSERCH_SECHEMA"
columns={columns}
effects="needPlanNo"
fetch={PublicApi.getPurchaseNeedPlanList}
/>
)
}
export default DemandPlanSearch
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 { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const DemandPlanSubmit = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
</>
)
}];
return (
<Table
schemaType="DEMANDPLAN_SECHEMA"
columns={columns}
effects="needPlanNo"
fetch={PublicApi.getPurchaseNeedPlanList}
/>
)
}
export default DemandPlanSubmit
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 { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const DemanPlanTwo = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
</>
)
}];
return (
<Table
schemaType="DEMANDPLAN_SECHEMA"
columns={columns}
effects="needPlanNo"
fetch={PublicApi.getPurchaseNeedPlanList}
/>
)
}
export default DemanPlanTwo
......@@ -109,7 +109,7 @@ const DemandDetailed = () => {
style={{ display: 'block', paddingBottom: '8px' }}
key={`link_${index + 1}`}
target="_blank"
href={`/api/order/contractTemplate/downloadContract?contractName=${item.name}&contractUrl=${item.url}`}
href={`/api/contract/contractTemplate/downloadContract?contractName=${item.name}&contractUrl=${item.url}`}
>
<LinkOutlined />
{item.name}
......
......@@ -92,7 +92,7 @@ const QuoteDetails = () => {
<Typography.Link
target="_blank"
key={`link_${index + 1}`}
href={`/api/order/contractTemplate/downloadContract?contractName=${item.name}&contractUrl=${item.url}`}
href={`/api/contract/contractTemplate/downloadContract?contractName=${item.name}&contractUrl=${item.url}`}
>
<LinkOutlined />
{item.name}
......
......@@ -9,7 +9,6 @@ import EyePreview from '@/components/EyePreview';
import { PublicApi } from '@/services/api';
import Table from '../../components/table'
import ModalOperate from '../../components/modalOperate';
import {
BID_EXTERNALSTATE_COLOR,
......@@ -92,29 +91,15 @@ const ReadyBid = () => {
</>
}];
const handleSubmit = () => {
setVisible(false);
ref.current.reload();
}
return (
<>
<Table
schemaType="ONLINEBIDREADYBID_SCHEMA"
columns={columns}
effects="biddingNo"
fetch={PublicApi.getOnlineBiddingStayBiddingList}
fetch={PublicApi.getPurchaseOnlineBiddingStayBiddingList}
reload={ref}
/>
<ModalOperate
id={id}
title="作废原因"
visible={visible}
modalType='abandon'
onOk={() => handleSubmit()}
onCancel={() => setVisible(false)}
fetch={PublicApi.postPurchaseBiddingDiscard}
/>
</>
)
}
......
......@@ -9,7 +9,6 @@ import EyePreview from '@/components/EyePreview';
import { PublicApi } from '@/services/api';
import Table from '../../components/table'
import ModalOperate from '../../components/modalOperate';
import {
BID_EXTERNALSTATE_COLOR,
......@@ -57,7 +56,7 @@ const ReadySignUp = () => {
</>,
width: 180
}, {
title: '竞价开始/结束时间',
title: '报名开始/结束时间',
key: 'startSignUp',
dataIndex: 'startSignUp',
render: (text: any, record: any) => <>
......@@ -92,29 +91,15 @@ const ReadySignUp = () => {
</>
}];
const handleSubmit = () => {
setVisible(false);
ref.current.reload();
}
return (
<>
<Table
schemaType="ONLINEBIDREADYSIGN_SCHEMA"
columns={columns}
effects="biddingNo"
fetch={PublicApi.getOnlineBiddingStayExamineBiddingSignup}
fetch={PublicApi.getPurchaseOnlineBiddingStayExamineBiddingSignup}
reload={ref}
/>
<ModalOperate
id={id}
title="作废原因"
visible={visible}
modalType='abandon'
onOk={() => handleSubmit()}
onCancel={() => setVisible(false)}
fetch={PublicApi.postPurchaseBiddingDiscard}
/>
</>
)
}
......
......@@ -9,7 +9,6 @@ import EyePreview from '@/components/EyePreview';
import { PublicApi } from '@/services/api';
import Table from '../../components/table'
import ModalOperate from '../../components/modalOperate';
import {
BID_EXTERNALSTATE_COLOR,
......@@ -20,8 +19,6 @@ const { Text } = Typography;
const Search = () => {
const ref = useRef<any>({});
const [id, setId] = useState<number>();
const [visible, setVisible] = useState<boolean>(false);
const columns: ColumnType<any>[] = [{
title: '序号',
align: 'center',
......@@ -67,7 +64,7 @@ const Search = () => {
key: 'isPrize',
dataIndex: 'isPrize',
render: (text: any, record: any) => <>
{(text !== 1 || text !== 0) ? null : <Tag color={BID_EXTERNALSTATE_COLOR[text]}>{record.externalStateName}</Tag> }
{(text !== 1 && text !== 0) ? null : <Tag color={text ? 'success' : 'warning'}>{text ? '是' : '否'}</Tag> }
</>,
width: 180
}, {
......@@ -82,29 +79,15 @@ const Search = () => {
render: (text: any, record: any) => <Badge status={BID_INTERNALSTATE_COLOR[text]} text={record.interiorStateName} />
}];
const handleSubmit = () => {
setVisible(false);
ref.current.reload();
}
return (
<>
<Table
schemaType="ONLINEBIDORDER_SCHEMA"
columns={columns}
effects="biddingNo"
fetch={PublicApi.getOnlineBiddingList}
fetch={PublicApi.getPurchaseOnlineBiddingList}
reload={ref}
/>
<ModalOperate
id={id}
title="作废原因"
visible={visible}
modalType='abandon'
onOk={() => handleSubmit()}
onCancel={() => setVisible(false)}
fetch={PublicApi.postPurchaseBiddingDiscard}
/>
</>
)
}
......
......@@ -16,7 +16,7 @@ const { Text } = Typography;
const formActions = createFormActions();
const QuotationDetailsDrawer = (props: any) => {
const { visible, onClose, schemaType, effects, reload } = props;
const { visible, onClose, schemaType, effects, reload, fetch, quotationDetailsId, number } = props;
const tableRef = useRef<any>({});
const columns: ColumnType<any>[] = [{
title: '序号',
......@@ -74,7 +74,7 @@ const QuotationDetailsDrawer = (props: any) => {
/** 列表数据 */
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
fetch({ ...params }).then(res => {
fetch({ id: quotationDetailsId, number: number, ...params }).then(res => {
resolve(res.data)
})
})
......@@ -120,9 +120,9 @@ const QuotationDetailsDrawer = (props: any) => {
searchSelectGetSelectCategoryOptionEffect(actions, 'category')
})
}}
schema={
schemaType && SchemaRender()
}
// schema={
// schemaType && SchemaRender()
// }
>
</NiceForm>
}
......
......@@ -88,6 +88,11 @@ const ReadyExamineOne = () => {
setVisible(!visible);
}
const handleSubmit = () => {
setVisible(false);
ref.current.reload();
}
return (
<>
<Table
......@@ -119,6 +124,7 @@ const ReadyExamineOne = () => {
modalType="audit"
visible={visible}
fetch={PublicApi.postPurchaseBiddingExamine1}
onOk={() => handleSubmit()}
onCancel={() => setVisible(false)}
/>
</>
......
......@@ -87,6 +87,11 @@ const ReadyExamineTwo = () => {
setVisible(!visible);
}
const handleSubmit = () => {
setVisible(false);
ref.current.reload();
}
return (
<>
<Table
......@@ -118,6 +123,7 @@ const ReadyExamineTwo = () => {
modalType="audit"
visible={visible}
fetch={PublicApi.postPurchaseBiddingExamine2}
onOk={() => handleSubmit()}
onCancel={() => setVisible(false)}
/>
</>
......
......@@ -98,11 +98,11 @@ const DrawerWrite: React.FC<Iprops> = (props: any) => {
const handleSubmit = () => {
form.validateFields().then((res: any) => {
const data = {
goodsId: product.id,
itemNo: product.code || res.number,
number: product.code || res.number,
name: product.name || res.name,
category: product.customerCategory.name,
goodsId: Object.keys(product).length > 0 && product.id,
itemNo: Object.keys(product).length > 0 ? product.code : res.number,
number: Object.keys(product).length > 0 ? product.code : res.number,
name: Object.keys(product).length > 0 ? product.name : res.name,
category: Object.keys(product).length > 0 && product.customerCategory.name,
ids: res.ids,
brand: res.brand,
model: res.model,
......@@ -155,8 +155,9 @@ const DrawerWrite: React.FC<Iprops> = (props: any) => {
useEffect(() => {
form.resetFields();
searchCategoryTree('0');
}, [])
}, [flag])
return (
<>
<Drawer
......
......@@ -115,7 +115,7 @@ const DemandDetailed = () => {
<Typography.Link
style={{ display: 'block', paddingBottom: '8px' }}
key={`link_${index + 1}`}
href={`/api/order/contractTemplate/downloadContract?contractName=${item.name}&contractUrl=${item.url}`}
href={`/api/contract/contractTemplate/downloadContract?contractName=${item.name}&contractUrl=${item.url}`}
target="_blank"
>
<LinkOutlined />
......
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, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PlusOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const DemandPlanSummary = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
</>
)
}];
return (
<Table
schemaType="DEMANDPLANADDED_SECHEMA"
columns={columns}
effects="needPlanNo"
fetch={PublicApi.getPurchaseNeedPlanList}
controllerBtns={
<Row>
<Col span={6}>
<Button
onClick={() => history.push('/memberCenter/procurementAbility/purchaseInquiry/add')}
type="primary"
icon={<PlusOutlined />}
>
新建
</Button>
</Col>
</Row>
}
/>
)
}
export default DemandPlanSummary
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 { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const PurchasePlanOne = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
</>
)
}];
return (
<Table
schemaType="PURCHASEPLAN_SECHEMA"
columns={columns}
effects="purchasePlanNo"
fetch={PublicApi.getPurchasePurchasePlanList}
/>
)
}
export default PurchasePlanOne
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 { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const PurchasePlanPerform = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
</>
)
}];
return (
<Table
schemaType="PURCHASEPLAN_SECHEMA"
columns={columns}
effects="purchasePlanNo"
fetch={PublicApi.getPurchasePurchasePlanList}
/>
)
}
export default PurchasePlanPerform
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 { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const PurchasePlanSearch = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
</>
)
}];
return (
<Table
schemaType="DEMANDPLAN_SECHEMA"
columns={columns}
effects="needPlanNo"
fetch={PublicApi.getPurchasePurchasePlanList}
/>
)
}
export default PurchasePlanSearch
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 { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const PurchasePlanSubmit = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
</>
)
}];
return (
<Table
schemaType="PURCHASEPLAN_SECHEMA"
columns={columns}
effects="purchasePlanNo"
fetch={PublicApi.getPurchasePurchasePlanList}
/>
)
}
export default PurchasePlanSubmit
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 { Button, Badge, Space, Typography } from 'antd';
import {
OFFTER_INTERNALSTATE_COLOR,
} from '../../constants';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
const { Text } = Typography;
const PurchasePlanTwo = () => {
console.log('待新增采购需求单');
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
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.summary}</Text>
</Space>
)
}, {
title: '计划开始/截止时间',
key: 'startTime',
dataIndex: 'startTime',
render: (text: any, record: any) => (
<Space direction='vertical'>
<Text type='secondary'><PlayCircleOutlined />{format(text)}</Text>
<Text type='secondary'><PoweroffOutlined />{format(record.endTime)}</Text>
</Space>
)
}, {
title: '编制部门',
key: 'department',
dataIndex: 'department',
}, {
title: '编制人',
key: 'userName',
dataIndex: 'userName',
}, {
title: '编制时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => <Text type='secondary'>{format(text)}</Text>
}, {
title: '内部状态',
key: 'innerStatus',
dataIndex: 'innerStatus',
render: (text: any, record: any) => <Badge status={OFFTER_INTERNALSTATE_COLOR[text]} text={record.innerStatusName} />
}, {
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (text: any, record: any) => (
<>
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/offter/auditOffterOne/detail?id=${record.id}&number=${record.quotedPriceNo}`)}
>
审核
</Button>
</>
)
}];
return (
<Table
schemaType="PURCHASEPLAN_SECHEMA"
columns={columns}
effects="purchasePlanNo"
fetch={PublicApi.getPurchasePurchasePlanList}
/>
)
}
export default PurchasePlanTwo
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { DEMANDPLANINTERNALSTATE } from '../constants'
/** 采购需求查询 */
export const DEMANDPLANSERCH_SECHEMA: ISchema = {
type: 'object',
properties: {
megalayout: {
type: 'object',
"x-component": 'mega-layout',
properties: {
needPlanNo: {
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: '需求计划周期',
}
},
innerStatusList: {
type: 'string',
"x-component-props": {
placeholder: '内部状态',
style: {
width: 160
}
},
enum: DEMANDPLANINTERNALSTATE
},
}
},
sumbit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
/** 采购需求查询 */
export const DEMANDPLANADDED_SECHEMA: ISchema = {
type: 'object',
properties: {
megalayout: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
grid: true
},
properties: {
ctl: {
type: 'object',
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
},
needPlanNo: {
type: 'string',
"x-component": "Search",
"x-mega-props": {
},
"x-component-props": {
placeholder: '需求计划编号'
}
}
}
},
[FORM_FILTER_PATH]: {
type: 'object',
"x-component": "flex-layout",
"x-component-props": {
rowStyle: {
flexWrap: 'nowrap'
},
colStyle: {
marginLeft: 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: '查询'
}
}
}
}
}
}
/** 采购需求待审核(一级) & (二级) & 待提交需求计划 */
export const DEMANDPLAN_SECHEMA: ISchema = {
type: 'object',
properties: {
megalayout: {
type: 'object',
"x-component": 'mega-layout',
properties: {
needPlanNo: {
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: '查询'
}
}
}
}
}
}
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