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

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

parents c215700a ff3fc969
......@@ -87,12 +87,17 @@ const contracRoute = {
name: '合同查询详情',
hideInMenu: true,
component: '@/pages/contract/manage/QueryList/QueryListdetails',
},
{
path: '/memberCenter/contract/manage/add',
path: '/memberCenter/contract/manage/add/addList',
name: '待新增合同',
component: '@/pages/contract/manage/add',
component: '@/pages/contract/manage/add/addList',
},
{
path: '/memberCenter/contract/manage/add/addList/contracAdd',
name: '待新增合同详情',
hideInMenu: true,
component: '@/pages/contract/manage/add/contracAdd',
},
// 待提交审核合同
{
......@@ -100,9 +105,74 @@ const contracRoute = {
name: '待提交审核合同',
component: '@/pages/contract/manage/examine',
},
// 待提交审核合同
{
path: '/memberCenter/contract/manage/levelexamine',
name: '待审核合同(一级)',
component: '@/pages/contract/manage/levelexamine',
},
{
path: '/memberCenter/contract/manage/secondaryexamine',
name: '待审核合同(二级)',
component: '@/pages/contract/manage/secondaryexamine',
},
{
path: '/memberCenter/contract/manage/signacontract',
name: '合同执行查询',
component: '@/pages/contract/manage/signacontract',
},
],
},
/* 合同执行 */
{
path: '/memberCenter/contract/contractexecution',
name: '合同执行',
routes: [
{
path: '/memberCenter/contract/contractexecution/contractexecutionList',
name: '合同执行',
component: '@/pages/contract/contractexecution/contractexecutionList',
},
{
path: '/memberCenter/contract/contractexecution/contractexecutionList/details',
name: '合同执行详情',
hideInMenu: true,
noMargin: true,
component: '@/pages/contract/contractexecution/details',
},
],
},
/* 合同请款 */
{
path: '/memberCenter/contract/funds',
name: '合同请款',
routes: [
{
path: '/memberCenter/contract/funds/bill',
name: '请款单查询',
component: '@/pages/contract/funds/bill',
},
{
path: '/memberCenter/contract/funds/bill/details',
name: '请款单查询详情',
hideInMenu: true,
noMargin: true,
component: '@/pages/contract/funds/bill/details',
},
{
path: '/memberCenter/contract/funds/addbill',
name: '待新增请款单',
component: '@/pages/contract/funds/addbill',
},
{
path: '/memberCenter/contract/funds/addbill/Details',
name: '待新增请款单',
hideInMenu: true,
component: '@/pages/contract/funds/addbill/Details',
},
],
},
],
};
export default contracRoute;
......@@ -4,12 +4,12 @@
* @return {type}
*/
export const callForBidsRoute = [
export const callForBidsRoute = [
// 招标
{
path:'/memberCenter/procurementAbility/callForBids',
name:'招标',
routes:[
path: '/memberCenter/procurementAbility/callForBids',
name: '招标',
routes: [
// 招标查询
{
path: '/memberCenter/procurementAbility/callForBids/callForBidsSearch',
......@@ -242,8 +242,8 @@ export const callForBidsRoute = [
name: '评标模板',
component: '@/pages/procurement/callForBids/remarkBidTemplate',
},
// 评标模板-新建
{
// 评标模板-新建
{
path: '/memberCenter/procurementAbility/callForBids/remarkBidTemplate/add',
name: '评标模板',
component: '@/pages/procurement/callForBids/addRemarkBidTemplate',
......
......@@ -23,6 +23,14 @@ export const confirmOfferRoute = [
component: '@/pages/transaction/purchaseAbility/confirmOffer/toComparePrices'
},
{
/** 比价 */
path: '/memberCenter/procurementAbility/confirmOffer/detail',
name: '待比价',
component: '@/pages/transaction/purchaseAbility/confirmOffer/detail',
hideInMenu: true,
noMargin: true,
},
{
/** 待审核授标结果(一级) */
path: '/memberCenter/procurementAbility/confirmOffer/auditResultsOne',
name: '待审核授标结果(一级)',
......
......@@ -8,9 +8,9 @@ import { tenderRoute } from './tender';
* 采购能力路由
*/
const ProcurementRoute = {
path:"/memberCenter/procurementAbility",
name:"采购能力",
icon:"commodity",
path: "/memberCenter/procurementAbility",
name: "采购能力",
icon: "commodity",
routes: [
// // 招标
...callForBidsRoute,
......
......@@ -169,8 +169,8 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
console.log('onRouteChange')
// 路由切换时, 自动回到顶部
document.body.scrollTop = document.documentElement.scrollTop = 0;
if(location.pathname.includes("memberCenter")) {
// 路由切换的时候记住,使用LRU算法,为首页使用,就是要找到面包屑对应的url衔接,这个算法需要修改一下
if (location.pathname.includes("memberCenter")) {
// 路由切换的时候记住,使用LRU算法,为首页使用,就是要找到面包屑对应的url衔接,这个算法需要修改一下
const breadCrumb = matchedRoutes.slice(2).reduce((prev, current) => {
return prev += "." + current.route.name
}, 'menu')
......
This diff is collapsed.
import React, { ReactText, useRef, useEffect, useLayoutEffect } from 'react';
import {StandardTable} from 'god';
import { StandardTable } from 'god';
import NestTable from '@/components/NestTable';
import { IStandardTableProps } from 'god/dist/src/standard-table';
import { Row, Col, Drawer, Space, Button } from 'antd';
......@@ -31,7 +31,7 @@ export interface DrawerTableProps extends IStandardTableProps<any> {
formilyProps?: any,
}
const DrawerTable:React.FC<DrawerTableProps> = (props) => {
const DrawerTable: React.FC<DrawerTableProps> = (props) => {
const {
width = 1000,
drawerTitle,
......@@ -47,7 +47,7 @@ const DrawerTable:React.FC<DrawerTableProps> = (props) => {
searchName,
formilyProps,
...resetTable
} = props
} = props
const selfRef = currentRef || useRef<any>({})
......@@ -84,15 +84,15 @@ const DrawerTable:React.FC<DrawerTableProps> = (props) => {
rowClassName={(_, index) => (index % 2) === 0 && "tb_bg"}
{...nestTableProps}
/>
) : (
<StandardTable
currentRef={selfRef}
formilyProps={formilyProps}
{...resetTable}
/>
) : (
<StandardTable
currentRef={selfRef}
formilyProps={formilyProps}
{...resetTable}
/>
)
}
<div style={{height: 56, width: '100%'}}></div>
<div style={{ height: 56, width: '100%' }}></div>
<Row className={styles.footer}>
<Col span={24}>
<Space size={[16, 0]}>
......
......@@ -15,16 +15,16 @@ const EyePreview:React.FC<EyePreviewProps> = (props) => {
<Link to={props.url || ''}>
{props.children} <EyeOutlined />
</Link>
:
:
<Button onClick={props.handleClick} type='link'>
{props.children} <EyeOutlined />
</Button>
)
}
EyePreview.defaultProps = {
type: 'link'
}
export default EyePreview
\ No newline at end of file
export default EyePreview
......@@ -375,3 +375,9 @@ a {
// width: 100%;
// z-index: 8;
// }
.rate_style {
.ant-rate-star {
margin-right: 0px !important;
}
}
import React, { useRef } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { tableListSchema } from '../schema'
import StatusTag from '@/components/StatusTag';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
const contractexecutionList = () => {
const ref = useRef<any>({});
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'No',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/contractexecution/contractexecutionList/details?id=${record.id}`}
>
{text}
</EyePreview>
<p>{record.name}</p>
</div>
}, {
title: '合同生效/失效时间',
dataIndex: 'number',
align: 'center',
}, {
title: '合同乙方',
dataIndex: 'memberName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'time',
align: 'center',
defaultSortOrder: 'descend',
sorter: (a, b) => a.age - b.age,
},
{
title: '已执行金额',
dataIndex: 'Price',
align: 'center',
},
{
title: '已付款',
dataIndex: 'Price',
align: 'center',
},
{
title: '已请款待付款',
dataIndex: 'Price',
align: 'center',
},
{
title: '未请款',
dataIndex: 'Price',
align: 'center',
},
{
title: '外部状态',
dataIndex: 'state',
align: 'center',
render: (record) => {
return (
<span style={statuStyle.success}>已完成签约</span>
)
}
}]
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
let data = {
totalCount: 1,
data: [
{
id: '1',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
},
{
id: '2',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
}
]
}
resolve(data)
})
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
}
}}
/>
</Card>
</PageHeaderWrapper>
)
}
export default contractexecutionList
.anchorWrap :global .ant-anchor {
display: flex;
}
.anchorWrap :global .ant-anchor .ant-anchor-ink {
display: none;
}
.anchorWrap :global .ant-anchor .ant-anchor-link {
padding: 14px 0 !important;
margin: 0 16px;
}
.anchorWrap :global .ant-anchor .ant-anchor-link .ant-anchor-link-title {
font-size: 14px;
color: #909399;
}
.anchorWrap :global .ant-anchor .ant-anchor-link-active {
position: relative;
border-bottom: 2px solid #00B37A;
box-sizing: border-box;
}
.anchorWrap :global .ant-anchor .ant-anchor-link-active .ant-anchor-link-title {
font-weight: 500;
color: #303133;
}
.anchorWrap .titleBox {
padding: 8px 16px;
}
.anchorWrap .anchorBox {
display: flex;
padding: 0 16px;
}
/** 卡片样式 */
.card {
margin: 24px;
}
.card :global .ant-card {
margin-bottom: 24px;
}
.card :global .ant-card .ant-card-head > .ant-card-head-wrapper {
padding: 12px 0;
}
.card :global .ant-card .ant-card-extra {
padding: 0 0;
}
.card :global .ant-card .ant-card-extra .ant-radio-button-wrapper {
height: 24px;
line-height: 23px;
}
.card :global .ant-card .ant-card-extra .ant-radio-button-wrapper:hover {
color: #606266;
}
.card :global .ant-card .ant-card-extra .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
color: #fff;
background: #6B778C;
border-color: #6B778C;
}
.card :global .god-table-control {
margin-bottom: 0;
}
.card .list {
display: flex;
}
.card .list h5 {
margin-bottom: 2em;
}
.card .list .listLable {
flex: 0 0 25%;
color: #909399;
}
.listItem {
display: flex;
}
.listItem .label {
flex: 0.2;
padding: 0 16px;
background: linear-gradient(270deg, #ffffff 0%, #daf2e7 100%);
}
.listItem .text {
padding: 0px 0px;
flex: 1;
}
.listItem p {
margin-bottom: 0;
}
.warp {
display: flex;
width: 100%;
}
.warp .warp_item {
width: 20%;
border: 1px solid #F4F5F7;
border-radius: 10px;
padding: 16px;
margin-right: 10px;
}
.warp .warp_item .title {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #909399;
}
.warp .warp_item .proportion {
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #303133;
padding: 12px 0;
}
.warp .warp_item .Price {
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #303133;
}
.warp .warp_item .warp_List {
margin-top: 32px;
}
.warp .warp_item .warp_List .warp_ListItem {
display: flex;
margin-bottom: 16px;
}
.warp .warp_item .warp_List .warp_ListItem .label {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #909399;
flex: 0.5;
}
.warp .warp_item .warp_List .warp_ListItem .text {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #303133;
flex: 1;
}
.upload_item {
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
.upload_item .upload_left {
display: flex;
align-items: center;
color: #303133;
background-color: #fafbfc;
}
.upload_item .upload_left :global .anticon-file-word {
color: #4279df;
font-size: 18px;
margin-right: 8px;
}
.upload_item .upload_right {
color: #00b37a;
cursor: pointer;
}
.upload_item .upload_right :global .anticon-delete {
margin-left: 19px;
color: #c0c4cc;
}
.anchorWrap {
:global {
.ant-anchor {
display: flex;
.ant-anchor-ink {
display: none;
}
.ant-anchor-link {
padding: 14px 0 !important;
margin: 0 16px;
.ant-anchor-link-title {
font-size: 14px;
color: #909399;
}
}
.ant-anchor-link-active {
position: relative;
border-bottom: 2px solid #00B37A;
box-sizing: border-box;
.ant-anchor-link-title {
font-weight: 500;
color: #303133;
}
}
}
}
.titleBox {
padding: 8px 16px;
}
.anchorBox {
display: flex;
padding: 0 16px;
}
}
/** 卡片样式 */
.card {
margin: 24px;
:global {
.ant-card {
margin-bottom: 24px;
.ant-card-head {
> .ant-card-head-wrapper {
padding: 12px 0;
}
}
.ant-card-extra {
padding: 0 0;
.ant-radio-button-wrapper {
height: 24px;
line-height: 23px;
}
.ant-radio-button-wrapper:hover {
color: #606266;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
color: #fff;
background: #6B778C;
border-color: #6B778C;
}
}
}
.god-table-control {
margin-bottom: 0;
}
}
.list {
display: flex;
h5 {
margin-bottom: 2em;
}
.listLable {
flex: 0 0 25%;
color: #909399;
}
}
}
.listItem {
display: flex;
.label {
flex: 0.2;
padding: 0 16px;
background: linear-gradient(270deg, #ffffff 0%, #daf2e7 100%);
}
.text {
padding: 0px 0px;
flex: 1;
}
p {
margin-bottom: 0;
}
}
.warp{
display: flex;
width: 100%;
.warp_item{
width: 20%;
border: 1px solid #F4F5F7;
border-radius: 10px;
padding: 16px;
margin-right: 10px;
.title{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #909399;
}
.proportion{
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #303133;
padding: 12px 0;
}
.Price{
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #303133;
}
.warp_List{
margin-top: 32px;
.warp_ListItem{
display: flex;
margin-bottom: 16px;
.label{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #909399;
flex: 0.5;
}
.text{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #303133;
flex: 1;
}
}
}
}
}
.upload_item {
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
.upload_left {
display: flex;
align-items: center;
color: #303133;
background-color: #fafbfc;
:global {
.anticon-file-word {
color: #4279df;
font-size: 18px;
margin-right: 8px;
}
}
}
.upload_right {
color: #00b37a;
cursor: pointer;
:global {
.anticon-delete {
margin-left: 19px;
color: #c0c4cc;
}
}
}
}
This diff is collapsed.
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: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入订单编号',
align: 'flex-end',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginRight: 20
}
},
properties: {
orderThe: {
type: 'string',
'x-component-props': {
placeholder: '请输入订单摘要',
}
},
"memberName": {
type: 'string',
"x-component-props": {
placeholder: '请输入采购会员名称'
}
},
"type": {
type: 'string',
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: Object.keys(OrderTypeMap).map(item => ({
label: OrderTypeMap[item],
value: item,
}))
},
// "externalState": {
// type: 'string',
// "x-component-props": {
// placeholder: '请选择外部状态'
// },
// enum: Object.keys(PurchaseOrderOutWorkStateTexts).map(item => ({
// label: PurchaseOrderOutWorkStateTexts[item],
// value: item,
// }))
// },
// "interiorState": {
// type: 'string',
// "x-component-props": {
// placeholder: '请选择内部状态'
// },
// enum: Object.keys(PurchaseOrderInsideWorkStateTexts).map(item => ({
// label: PurchaseOrderInsideWorkStateTexts[item],
// value: item,
// }))
// },
"[startCreateTime,endCreateTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
This diff is collapsed.
.box {
width: 100%;
}
.box :global .ant-table-expanded-row-level-1 .ant-table-cell {
padding: 0px !important;
background-color: #ffffff;
}
.box :global .ant-btn-primary {
background: #6B778C;
}
.box .listItem {
display: flex;
}
.box .listItem .label {
flex: 0.2;
padding: 0 16px;
background: linear-gradient(270deg, #ffffff 0%, #daf2e7 100%);
}
.box .listItem .text {
padding: 0px 0px;
flex: 1;
}
.box .listItem p {
margin-bottom: 0;
}
.flex {
display: flex;
align-items: center;
justify-content: center;
}
.flex span {
background: #e4e6eb;
padding: 7px 12px;
color: #c0c4cc;
}
.upload_item {
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
.upload_item .upload_left {
display: flex;
align-items: center;
color: #303133;
background-color: #fafbfc;
}
.upload_item .upload_left :global .anticon-file-word {
color: #4279df;
font-size: 18px;
margin-right: 8px;
}
.upload_item .upload_right {
color: #00b37a;
cursor: pointer;
}
.upload_item .upload_right :global .anticon-delete {
margin-left: 19px;
color: #c0c4cc;
}
.tagAtive {
padding: 5px 15px;
background: #6B778C;
color: #fff;
}
.tag {
padding: 5px 15px;
border-top: 1px solid #E4E6EB;
border-right: 1px solid #E4E6EB;
border-bottom: 1px solid #E4E6EB;
}
.box {
width: 100%;
:global {
.ant-table-expanded-row-level-1 .ant-table-cell {
padding: 0px !important;
background-color: #ffffff;
}
.ant-btn-primary{
background: #6B778C;
}
}
.listItem {
display: flex;
.label {
flex: 0.2;
padding: 0 16px;
background: linear-gradient(270deg, #ffffff 0%, #daf2e7 100%);
}
.text {
padding: 0px 0px;
flex: 1;
}
p {
margin-bottom: 0;
}
}
}
.flex {
display: flex;
align-items: center;
justify-content: center;
span {
background: #e4e6eb;
padding: 7px 12px;
color: #c0c4cc;
}
}
.upload_item {
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
.upload_left {
display: flex;
align-items: center;
color: #303133;
background-color: #fafbfc;
:global {
.anticon-file-word {
color: #4279df;
font-size: 18px;
margin-right: 8px;
}
}
}
.upload_right {
color: #00b37a;
cursor: pointer;
:global {
.anticon-delete {
margin-left: 19px;
color: #c0c4cc;
}
}
}
}
.tagAtive{
padding: 5px 15px;
background: #6B778C;
color: #fff;
}
.tag{
padding: 5px 15px;
border-top: 1px solid #E4E6EB;
border-right: 1px solid #E4E6EB;
border-bottom: 1px solid #E4E6EB;
}
import React, { useState, useRef, ReactNode } from 'react'
import { history, Link } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Button, Space } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { createFormActions } from '@formily/antd';
import EyePreview from '@/components/EyePreview';
import { PlusOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api'
const formActions = createFormActions();
const Addbilldetails: React.FC<{}> = () => {
const ref = useRef<any>({});
//表头
const columns: ColumnType<any>[] = [{
title: '请款单号/摘要',
dataIndex: 'No',
render: (text: any, record: any) => {
return (
<div>
<EyePreview
url={`/memberCenter/contract/funds/addbill/Details?id=${record.id}`}
>
{text}
</EyePreview>
<p>{record.name}</p>
</div>
);
},
}, {
title: '单据时间',
dataIndex: 'time',
}, {
title: '收款方',
dataIndex: 'NikName',
},
{
title: '合同编号',
dataIndex: 'PyNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/contract/funds/addbill/details/?id=${record.id}`}
>
{text}
</EyePreview>
},
{
title: '合同总金额',
dataIndex: 'totalPrice',
},
{
title: '请款金额',
dataIndex: 'Price',
},
{
title: '内部状态',
dataIndex: 'description',
}, {
title: '操作',
dataIndex: 'action',
render: (text: any, record: any) => {
let component: ReactNode = null
component = (
<>
<span style={statuStyle.success}>已完成签约</span>
</>
)
return component
}
}]
// 模拟请求
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
let data = {
code: 1000,
data: [
{
id: 1,
No: 'QPTY12',
name: '进口头层黄牛皮荔枝纹采购请款',
time: '2020-10-25 08:49',
NikName: '广州白马皮具交易中心',
PyNo: 'H-13-00001',
totalPrice: '¥100,000.00',
Price: '¥10,000.00',
status: 1,
type: 1,
description: '待提交审核',
},
{
id: 2,
No: 'QPTY12',
name: '进口头层黄牛皮荔枝纹采购请款',
time: '2020-10-25 08:49',
NikName: '广州白马皮具交易中心',
PyNo: 'H-13-00001',
totalPrice: '¥100,000.00',
Price: '¥10,000.00',
status: 1,
type: 1,
description: '待提交审核',
}
]
}
resolve(data)
})
}
const handleJumpAdd = () => {
};
const Actions = (
<Space>
<Button
type="primary"
icon={<PlusOutlined />}
onClick={handleJumpAdd}
>
新建
</Button>
</Space>
);
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{
Actions,
}}
effects={($, actions) => {
}}
schema={{
type: 'object',
properties: {
searchWrap: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
grid: true,
},
properties: {
actions: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{Actions}}',
},
},
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '合同模板名称',
advanced: false,
},
},
},
},
},
}}
onSubmit={values => ref.current.reload(values)}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default Addbilldetails
This diff is collapsed.
.anchorWrap :global .ant-pro-basicLayout-content {
margin: 0 !important;
}
.anchorWrap :global .ant-anchor {
display: flex;
align-items: center;
}
.anchorWrap :global .ant-anchor .ant-anchor-ink {
display: none;
}
.anchorWrap :global .ant-anchor .ant-anchor-link {
padding: 14px 0 !important;
margin: 0 16px;
}
.anchorWrap :global .ant-anchor .ant-anchor-link .ant-anchor-link-title {
font-size: 14px;
color: #909399;
}
.anchorWrap :global .ant-anchor .ant-anchor-link-active {
position: relative;
border-bottom: 2px solid #00B37A;
box-sizing: border-box;
}
.anchorWrap :global .ant-anchor .ant-anchor-link-active .ant-anchor-link-title {
font-weight: 500;
color: #303133;
}
.anchorWrap .titleBox {
padding: 8px 16px;
}
.anchorWrap .anchorBox {
display: flex;
padding: 0 16px;
}
/** 卡片样式 */
.card {
margin: 24px;
}
.card :global .ant-card {
margin-bottom: 24px;
}
.card :global .ant-card .ant-card-head > .ant-card-head-wrapper {
padding: 12px 0;
}
.card :global .ant-card .ant-card-extra {
padding: 0 0;
}
.card :global .ant-card .ant-card-extra .ant-radio-button-wrapper {
height: 24px;
line-height: 23px;
}
.card :global .ant-card .ant-card-extra .ant-radio-button-wrapper:hover {
color: #606266;
}
.card :global .ant-card .ant-card-extra .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
color: #fff;
background: #6B778C;
border-color: #6B778C;
}
.card :global .god-table-control {
margin-bottom: 0;
}
.card .list {
display: flex;
}
.card .list h5 {
margin-bottom: 2em;
}
.card .list .listLable {
flex: 0 0 25%;
color: #909399;
}
.listItem {
display: flex;
}
.listItem .label {
flex: 0.2;
padding: 0 16px;
background: linear-gradient(270deg, #ffffff 0%, #daf2e7 100%);
}
.listItem .text {
padding: 0px 0px;
flex: 1;
}
.listItem p {
margin-bottom: 0;
}
.warp {
display: flex;
width: 100%;
}
.warp .warp_item {
width: 20%;
border: 1px solid #F4F5F7;
border-radius: 10px;
padding: 16px;
margin-right: 10px;
}
.warp .warp_item .title {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #909399;
}
.warp .warp_item .proportion {
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #303133;
padding: 12px 0;
}
.warp .warp_item .Price {
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #303133;
}
.warp .warp_item .warp_List {
margin-top: 32px;
}
.warp .warp_item .warp_List .warp_ListItem {
display: flex;
margin-bottom: 16px;
}
.warp .warp_item .warp_List .warp_ListItem .label {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #909399;
flex: 0.5;
}
.warp .warp_item .warp_List .warp_ListItem .text {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #303133;
flex: 1;
}
.upload_item {
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
.upload_item .upload_left {
display: flex;
align-items: center;
color: #303133;
background-color: #fafbfc;
}
.upload_item .upload_left :global .anticon-file-word {
color: #4279df;
font-size: 18px;
margin-right: 8px;
}
.upload_item .upload_right {
color: #00b37a;
cursor: pointer;
}
.upload_item .upload_right :global .anticon-delete {
margin-left: 19px;
color: #c0c4cc;
}
.anchorWrap {
:global {
.ant-pro-basicLayout-content{
margin: 0 !important;
}
.ant-anchor {
display: flex;
align-items: center;
.ant-anchor-ink {
display: none;
}
.ant-anchor-link {
padding: 14px 0 !important;
margin: 0 16px;
.ant-anchor-link-title {
font-size: 14px;
color: #909399;
}
}
.ant-anchor-link-active {
position: relative;
border-bottom: 2px solid #00B37A;
box-sizing: border-box;
.ant-anchor-link-title {
font-weight: 500;
color: #303133;
}
}
}
}
.titleBox {
padding: 8px 16px;
}
.anchorBox {
display: flex;
padding: 0 16px;
}
}
/** 卡片样式 */
.card {
margin: 24px;
:global {
.ant-card {
margin-bottom: 24px;
.ant-card-head {
> .ant-card-head-wrapper {
padding: 12px 0;
}
}
.ant-card-extra {
padding: 0 0;
.ant-radio-button-wrapper {
height: 24px;
line-height: 23px;
}
.ant-radio-button-wrapper:hover {
color: #606266;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
color: #fff;
background: #6B778C;
border-color: #6B778C;
}
}
}
.god-table-control {
margin-bottom: 0;
}
}
.list {
display: flex;
h5 {
margin-bottom: 2em;
}
.listLable {
flex: 0 0 25%;
color: #909399;
}
}
}
.listItem {
display: flex;
.label {
flex: 0.2;
padding: 0 16px;
background: linear-gradient(270deg, #ffffff 0%, #daf2e7 100%);
}
.text {
padding: 0px 0px;
flex: 1;
}
p {
margin-bottom: 0;
}
}
.warp{
display: flex;
width: 100%;
.warp_item{
width: 20%;
border: 1px solid #F4F5F7;
border-radius: 10px;
padding: 16px;
margin-right: 10px;
.title{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #909399;
}
.proportion{
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #303133;
padding: 12px 0;
}
.Price{
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #303133;
}
.warp_List{
margin-top: 32px;
.warp_ListItem{
display: flex;
margin-bottom: 16px;
.label{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #909399;
flex: 0.5;
}
.text{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #303133;
flex: 1;
}
}
}
}
}
.upload_item {
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
.upload_left {
display: flex;
align-items: center;
color: #303133;
background-color: #fafbfc;
:global {
.anticon-file-word {
color: #4279df;
font-size: 18px;
margin-right: 8px;
}
}
}
.upload_right {
color: #00b37a;
cursor: pointer;
:global {
.anticon-delete {
margin-left: 19px;
color: #c0c4cc;
}
}
}
}
import React, { useRef } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { tableListSchema } from '../schema'
import StatusTag from '@/components/StatusTag';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
const bill = () => {
const ref = useRef<any>({});
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'No',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/funds/bill/details?id=${record.id}`}
>
{text}
</EyePreview>
<p>{record.name}</p>
</div>
}, {
title: '合同生效/失效时间',
dataIndex: 'number',
align: 'center',
}, {
title: '合同乙方',
dataIndex: 'memberName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'time',
align: 'center',
defaultSortOrder: 'descend',
sorter: (a, b) => a.age - b.age,
},
{
title: '已执行金额',
dataIndex: 'Price',
align: 'center',
},
{
title: '已付款',
dataIndex: 'Price',
align: 'center',
},
{
title: '已请款待付款',
dataIndex: 'Price',
align: 'center',
},
{
title: '未请款',
dataIndex: 'Price',
align: 'center',
},
{
title: '外部状态',
dataIndex: 'state',
align: 'center',
render: (record) => {
return (
<span style={statuStyle.success}>已完成签约</span>
)
}
}]
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
let data = {
totalCount: 1,
data: [
{
id: '1',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
},
{
id: '2',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
}
]
}
resolve(data)
})
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
}
}}
/>
</Card>
</PageHeaderWrapper>
)
}
export default bill
import { ISchema } from '@formily/antd';
import Search from '@/components/NiceForm/components/Search';
import Submit from '@/components/NiceForm/components/Submit';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { OrderTypeMap, PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkStateTexts } from '@/constants';
// 供应会员列表列
const supplierColumns = [
{
title: '会员ID',
dataIndex: 'memberId',
align: 'center',
},
{
title: '会员名称',
dataIndex: 'name',
align: 'center',
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
align: 'center',
},
{
title: '会员角色',
dataIndex: 'roleName',
align: 'center',
},
{
title: '会员等级',
dataIndex: 'levelTag',
align: 'center',
},
];
// 获取供应会员
const getSupplier = async params => {
const res = await PublicApi.getMemberManageAftersaleReplacePage({
...params,
});
if (res.code === 1000) {
return res.data;
}
return { totalCount: 0, data: [] };
};
const supplierSchema: ISchema = {
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
orderNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入订单编号',
align: 'flex-end',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginRight: 20
}
},
properties: {
name: {
orderThe: {
type: 'string',
'x-component': 'Search',
'x-mega-props': {},
'x-component-props': {
placeholder: '搜索',
align: 'flex-start',
advanced: false,
tip: '输入 会员名称 进行搜索',
placeholder: '请输入订单摘要',
}
},
"memberName": {
type: 'string',
"x-component-props": {
placeholder: '请输入采购会员名称'
}
},
"type": {
type: 'string',
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: Object.keys(OrderTypeMap).map(item => ({
label: OrderTypeMap[item],
value: item,
}))
},
// "externalState": {
// type: 'string',
// "x-component-props": {
// placeholder: '请选择外部状态'
// },
// enum: Object.keys(PurchaseOrderOutWorkStateTexts).map(item => ({
// label: PurchaseOrderOutWorkStateTexts[item],
// value: item,
// }))
// },
// "interiorState": {
// type: 'string',
// "x-component-props": {
// placeholder: '请选择内部状态'
// },
// enum: Object.keys(PurchaseOrderInsideWorkStateTexts).map(item => ({
// label: PurchaseOrderInsideWorkStateTexts[item],
// value: item,
// }))
// },
"[startCreateTime,endCreateTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
},
};
}
}
export const addBillSchema: ISchema = {
type: 'object',
......@@ -163,7 +183,7 @@ export const addBillSchema: ISchema = {
Search,
Submit,
},
effects: ($, actions) => {},
effects: ($, actions) => { },
inline: false,
},
},
......@@ -201,7 +221,7 @@ export const addBillSchema: ISchema = {
Search,
Submit,
},
effects: ($, actions) => {},
effects: ($, actions) => { },
inline: false,
},
},
......
......@@ -58,8 +58,6 @@
}
.card .list {
display: flex;
}
.card .list h5 {
margin-bottom: 2em;
}
.card .list .listLable {
......@@ -72,6 +70,7 @@
.listItem .label {
flex: 0.2;
padding: 0 16px;
color: #00b37a;
background: linear-gradient(270deg, #ffffff 0%, #daf2e7 100%);
}
.listItem .text {
......@@ -157,3 +156,7 @@
margin-left: 19px;
color: #c0c4cc;
}
.box :global .ant-table-expanded-row-level-1 .ant-table-cell {
padding: 0px !important;
background-color: #ffffff;
}
......@@ -65,8 +65,9 @@
}
.list {
display: flex;
margin-bottom: 2em;
h5 {
margin-bottom: 2em;
// margin-bottom: 2em;
}
.listLable {
flex: 0 0 25%;
......@@ -80,6 +81,7 @@
.label {
flex: 0.2;
padding: 0 16px;
color: #00b37a;
background: linear-gradient(270deg, #ffffff 0%, #daf2e7 100%);
}
.text {
......@@ -174,3 +176,12 @@
}
}
}
.box{
:global {
.ant-table-expanded-row-level-1 .ant-table-cell {
padding: 0px !important;
background-color: #ffffff;
}
}
}
......@@ -6,76 +6,119 @@ import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { tableListSchema } from '../schema'
import { QueryListSchema } from '../schema'
import StatusTag from '@/components/StatusTag';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
const QueryList = () => {
const ref = useRef<any>({});
//表头
const columns: ColumnType<any>[] = [{
title: '需求单号/摘要',
dataIndex: 'No',
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails`}
url={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`}
>
{text}
</EyePreview>
<p>{record.name}</p>
<p>{record.contractAbstract}</p>
</div>
}, {
title: '投标编号',
dataIndex: 'number',
title: '合同生效/失效时间',
dataIndex: 'startTime',
align: 'center',
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
</div>
}, {
title: '中标会员',
dataIndex: 'memberName',
title: '合同乙方',
dataIndex: 'partyBName',
align: 'center',
},
{
title: '中标通知时间',
dataIndex: 'time',
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '中标金额',
dataIndex: 'Price',
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
render: (text, record) => {
let sourceTypeList = [
"",
"采购询价",
"采购招标"
]
return (
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails`}
>
{text}
</EyePreview>
<p>{sourceTypeList[record.sourceType]}</p>
</div>
)
}
},
{
title: '外部状态',
dataIndex: 'status',
dataIndex: 'outerStatus',
align: 'center',
render: (text) => {
let title: any = [
{},
{ name: '已完成', type: "success" },
{ name: '未完成', type: "primary" },
]
render: (text, record) => {
// let outerStatusList: any = [
// { label: '所有状态', type: 'success' },
// { label: '待提交乙方签订合同', type: 'success' },
// { label: '待乙方签订合同', type: 'success' },
// { label: '乙方不同意签订合同', type: 'success' },
// { label: '待甲方签订合同', type: 'success' },
// { label: '甲方不同意签订合同', type: 'success' },
// { label: '已完成签约', type: 'success' },
// { label: '已作废', type: 'warning' },
// { label: '已作废', type: 'warning' },
// { label: '已作废', type: 'danger' },
// ]
return (
<StatusTag type={title[text].type} title={title[text].name} />
<StatusTag type="warning" title={record.outerStatusName} />
)
}
},
{
title: '内部状态',
dataIndex: 'insidestatus',
dataIndex: 'innerStatus',
align: 'center',
render: (text) => {
let title: any = [
{},
{ name: '已完成', type: "success" },
{ name: '未完成', type: "primary" },
]
render: (text, record) => {
// let innerStatusList: any = [
// { label: '所有状态', type: 'danger' },
// { label: '待提交乙方签订合同', type: 'danger' },
// { label: '待乙方签订合同', type: 'danger' },
// { label: '待提交审核合同', type: 'danger' },
// { label: '待审核合同(一级)', type: 'danger' },
// { label: '待审核合同(二级)', type: 'danger' },
// { label: '合同审核不通过(一级)', type: 'danger' },
// { label: '合同审核通过(二级)', type: 'danger' },
// { label: '合同审核不通过(二级)', type: 'danger' },
// { label: '同意签订合同', type: 'danger' },
// { label: '不同意签订合同', type: 'danger' },
// ]
return (
<div>
<span style={statuStyle.point}> </span>
<span>{title[text].name}</span>
<span>{record.innerStatusName}</span>
</div>
)
}
......@@ -83,50 +126,29 @@ const QueryList = () => {
title: '操作',
dataIndex: 'state',
align: 'center',
render: (record) => {
console.log(record)
render: (text, record) => {
return (
<span style={statuStyle.success}>创建采购招标合同</span>
<div>
{
record.outerStatus == 6 ? <span style={{ color: '#00B37A', marginRight: 20 }}>合同变更</span> : <span> </span>
}
<span style={{ color: '#00B37A' }}>作废</span>
</div>
)
}
}]
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
let data = {
totalCount: 1,
data: [
{
id: '1',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
},
{
id: '2',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
}
]
}
resolve(data)
PublicApi.getContractManagePageList({
...params,
innerStatus: params.innerStatus || 0,
outerStatus: params.outerStatus || 0,
}).then(res => {
resolve(res.data)
}).catch(err => {
reject(err)
})
})
}
return (
......@@ -142,7 +164,7 @@ const QueryList = () => {
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
schema: QueryListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
......
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Button, Space } from 'antd'
import { history } from 'umi'
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const';
import StatusTag from '@/components/StatusTag';
import { addListSchema } from '../schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
import { PlusCircleOutlined } from '@ant-design/icons'
const addList = () => {
const ref = useRef<any>({});
//表头
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`}
>
{text}
</EyePreview>
<p>{record.contractAbstract}</p>
</div>
}, {
title: '合同生效/失效时间',
dataIndex: 'startTime',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
</div>
}, {
title: '合同乙方',
dataIndex: 'partyBName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
filters: [
{ text: '采购询价', value: 1 },
{ text: '采购招标', value: 2 },
{ text: '采购竞价', value: 3 },
],
render: (text, record) => {
let sourceTypeList = [
"",
"采购询价",
"采购招标"
]
return (
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails`}
>
{text}
</EyePreview>
<p>{sourceTypeList[record.sourceType]}</p>
</div>
)
}
},
{
title: '外部状态',
dataIndex: 'outerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<StatusTag type="warning" title={record.outerStatusName} />
)
}
},
{
title: '内部状态',
dataIndex: 'innerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<div>
<span style={statuStyle.point}> </span>
<span>{record.innerStatusName}</span>
</div>
)
}
}, {
title: '操作',
dataIndex: 'state',
align: 'center',
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A' }}>修改</span>
</div>
)
}
}]
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
PublicApi.getContractManagePageToBeAdd({
...params,
}).then(res => {
resolve(res.data)
})
})
}
const rowSelection: any = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
}
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: addListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button
icon={<PlusCircleOutlined />}
type='primary'
onClick={() => history.push('/memberCenter/contract/manage/add/addList/contracAdd')}
>
新建
</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
)
}
export default addList
import React, { useState } from 'react'
import { Button, Card, message, Table, Input, Select, DatePicker, Form, Checkbox } from 'antd'
import { ArrayTable } from '@formily/antd-components';
import { Button, Card, Tabs, Table, Input, Select, DatePicker, Form, Checkbox } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag';
import styles from './index.less'
import AddressFormItem from '../../components/AddressFormItem';
import { createFormActions } from '@formily/antd';
import {
SaveOutlined,
PlusOutlined,
FileWordFilled
FileWordFilled,
LinkOutlined
} from '@ant-design/icons'
import { addBillSchema } from './schema';
const addSchemaAction = createFormActions();
const { Option } = Select;
const { TextArea } = Input
const { TextArea, Search } = Input
const { TabPane } = Tabs;
const { RangePicker } = DatePicker;
const Add: React.FC<{}> = (props) => {
const [attrValueForm] = Form.useForm();
const [formValue, setFormValue] = useState<any>({})
const [checkNick, setCheckNick] = useState(true);
// ArrayTable自定义渲染
const renderListTableRemove = (index: number) => (
<>
<a
style={{
color: '#ff4d4f',
}}
>
删除
</a>
</>
);
const OuterStatus = (
<StatusTag type="primary" title='外部状态' />
);
const InnerStatus = (
<p>111111</p>
);
const columns: any = [
{ title: '物料编号/名称', dataIndex: 'name', key: 'name', align: 'center', },
{ title: '规格型号', dataIndex: 'age', key: 'age', align: 'center', },
......@@ -145,7 +122,143 @@ const Add: React.FC<{}> = (props) => {
description: 'My name is Joe Black, I am 32 years old, living in Sidney No. 1 Lake Park.',
},
];
const onCheckboxChange = (e: { target: { checked: boolean } }) => {
setCheckNick(e.target.checked);
};
/**
* 第一个内容
*/
const Formcontent = () => {
return (
<div>
<Form.Item
label="合同编号"
labelAlign="left"
name="contractNo"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
rules={[
{
required: true,
message: '请输入合同编号',
},
]}
>
<Input placeholder='请输入合同编号' />
</Form.Item>
<Form.Item
label="合同摘要"
labelAlign="left"
name="contractAbstract"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
rules={[
{
required: true,
message: '请输入合同摘要',
},
]}
>
<Input placeholder='请输入合同编号' />
</Form.Item>
<Form.Item
label="寻源类型"
labelAlign="left"
name="sourceType"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
rules={[
{
required: true,
message: '请输入合同摘要',
},
]}
>
<Select>
<Option value="是" key='1'>采购询价</Option>
<Option value="否" key='2'>采购招标</Option>
<Option value="否" key='3'>采购竞价</Option>
</Select>
</Form.Item>
<Form.Item
name="range-picker"
label="合同有效期"
labelAlign="left"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
rules={
[{
type: 'array' as const, required: true, message: '请选择合同合同有效期'
}]
}
>
<RangePicker style={{ width: '100%' }} />
</Form.Item>
<Form.Item
label="对应单据"
labelAlign="left"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
>
<Search placeholder="最长60个字符,30个汉字" defaultValue="" readOnly enterButton={<div onClick={() => onSearch()} ><LinkOutlined /> 选择</div>} onSearch={onSearch} />
</Form.Item>
<Form.Item
label="授标会员"
labelAlign="left"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
>
<Search placeholder="最长60个字符,30个汉字" defaultValue="" readOnly enterButton={<div onClick={() => onSearch()} ><LinkOutlined /> 选择</div>} />
</Form.Item>
<Form.Item
label="授标金额"
labelAlign="left"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
>
<p>¥ 10000</p>
</Form.Item>
<Form.Item
label="外部状态"
labelAlign="left"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
>
<p>待提交乙方签订合同</p>
</Form.Item>
<Form.Item
label="内部状态"
labelAlign="left"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
>
<p>待提交乙方签订合同</p>
</Form.Item>
</div>
)
}
/**
* 第二个内容
*/
const FormList = () => (
<div className={styles.box}>
<div style={{ paddingTop: 12, paddingBottom: 12, }}>
<Button block type='dashed'><PlusOutlined />选择采购物料</Button>
</div>
<Table
columns={columns}
expandable={{
expandedRowRender: record => listItem(record),
}}
dataSource={data}
style={{
width: "100%"
}}
/>
</div>
)
/* 下拉的子元素 */
const listItem = (record) => (
<div className={styles.listItem}>
......@@ -168,24 +281,6 @@ const Add: React.FC<{}> = (props) => {
)
/* 列表 */
const List: any = (
<div className={styles.box}>
<div style={{ paddingTop: 12, paddingBottom: 12, }}>
<Button block type='dashed'><PlusOutlined />选择采购物料</Button>
</div>
<Table
columns={columns}
expandable={{
expandedRowRender: record => listItem(record),
}}
dataSource={data}
style={{
width: "100%"
}}
/>
</div>
)
/* 第三个tab */
const tabcolumns: any = [
{ title: '付款次数', dataIndex: 'name', key: 'name', align: 'center', },
......@@ -265,7 +360,7 @@ const Add: React.FC<{}> = (props) => {
description: 'My name is Joe Black, I am 32 years old, living in Sidney No. 1 Lake Park.',
},
];
const table: any = (
const table = () => (
<Table
columns={tabcolumns}
dataSource={datas}
......@@ -274,11 +369,8 @@ const Add: React.FC<{}> = (props) => {
}}
/>
)
const onCheckboxChange = (e: { target: { checked: boolean } }) => {
setCheckNick(e.target.checked);
};
/* 第四个tab */
const FromDom = (
const FromDom = () => (
<div
style={{
width: '100%',
......@@ -310,36 +402,58 @@ const Add: React.FC<{}> = (props) => {
</div>
)
/**
* @param name tag标签名
* @param components 显示内容
*/
const TabList = [
{ name: '基本信息', components: Formcontent() },
{ name: '采购物料', components: FormList() },
{ name: '付款计划', components: table() },
{ name: '合同文本', components: FromDom() },
]
/* 显示弹出 */
const onSearch = () => {
// alert(1111111111111)
}
/* 提交*/
const submit = () => {
attrValueForm.validateFields().then(values => {
console.log('====================================');
console.log(values);
console.log('====================================');
}).catch(error => {
console.error(error)
})
}
return (
<PageHeaderWrapper
title="新建合同"
extra={[
<Button key="1" type="primary" icon={<SaveOutlined />} > </Button>
<Button key="1" type="primary" icon={<SaveOutlined />} onClick={() => submit()} > 保存</Button>
]}
>
<Card>
<NiceForm
previewPlaceholder=" "
expressionScope={{
OuterStatus,
InnerStatus,
List,
table,
FromDom,
renderListTableRemove,
}}
components={{
ArrayTable,
AddressFormItem,
}}
effects={($, actions) => {
const { setFieldState } = actions;
}}
<Tabs defaultActiveKey="0" type="card" size="small">
{
TabList.map((item, index) => (
<TabPane tab={item.name} key={index}>
actions={addSchemaAction}
schema={addBillSchema}
/>
<Form
form={attrValueForm}
name="edit_infomation"
layout="horizontal"
labelAlign="left"
initialValues={formValue}
colon={false}
autoComplete="off"
>
{item.components}
</Form>
</TabPane>
))
}
</Tabs>
</Card>
</PageHeaderWrapper>
)
......
import React, { useRef } from 'react'
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { tableListSchema } from '../schema'
import { FORM_FILTER_PATH } from '@/formSchema/const';
import StatusTag from '@/components/StatusTag';
import { BidListSchema } from '../schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
const BiddingList = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
//表头
const columns: ColumnType<any>[] = [{
title: '需求单号/摘要',
dataIndex: 'No',
title: '招标编号/项目',
dataIndex: 'inviteBidNO',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/payandSettle/capitalAccounts/accountLists/detail?id=${record.id}`}
// url={`/memberCenter/payandSettle/capitalAccounts/accountLists/detail?id=${record.id}`}
>
{text}
</EyePreview>
<p>{record.name}</p>
<p>{record.inviteBidAbstract}</p>
</div>
}, {
title: '投标编号',
dataIndex: 'number',
dataIndex: 'bidNo',
align: 'center',
}, {
},
{
title: '中标会员',
dataIndex: 'memberName',
dataIndex: 'bidWinnerName',
align: 'center',
},
{
title: '中标通知时间',
dataIndex: 'time',
dataIndex: 'bidWinnerNoticeTime',
align: 'center',
sorter: {
compare: (a, b) => a.bidWinnerNoticeTime - b.bidWinnerNoticeTime,
multiple: 1,
},
},
{
title: '中标金额',
dataIndex: 'Price',
dataIndex: 'bidWinnerAmount',
align: 'center',
sorter: {
compare: (a, b) => a.bidWinnerAmount - b.bidWinnerAmount,
multiple: 1,
},
},
{
title: '外部状态',
dataIndex: 'status',
dataIndex: 'outerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text) => {
let title: any = [
{},
{ name: '已完成', type: "success" },
{ name: '未完成', type: "primary" },
]
return (
<StatusTag type={title[text].type} title={title[text].name} />
<StatusTag type="success" title={text} />
)
}
},
{
title: '内部状态',
dataIndex: 'insidestatus',
dataIndex: 'innerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text) => {
let title: any = [
{},
{ name: '已完成', type: "success" },
{ name: '未完成', type: "primary" },
]
return (
<div>
<span style={statuStyle.point}> </span>
<span>{title[text].name}</span>
<span>{text}</span>
</div>
)
}
......@@ -95,66 +106,21 @@ const BiddingList = () => {
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
let data = {
totalCount: 1,
data: [
{
id: '1',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
},
{
id: '2',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
},
{
id: '1',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
},
{
id: '3',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
},
]
}
resolve(data)
PublicApi.getContractPurchaseInviteBidPageToBeCreate({
...params,
}).then(res => {
resolve(res.data)
})
})
}
const rowSelection: any = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
}
};
return (
<PageHeaderWrapper>
<Card>
......@@ -164,16 +130,17 @@ const BiddingList = () => {
}}
columns={columns}
currentRef={ref}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
schema: BidListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
'inviteBidNO',
FORM_FILTER_PATH,
);
},
......
......@@ -8,11 +8,12 @@ import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { tableListSchema } from '../schema'
import { examineSchema } from '../schema'
import StatusTag from '@/components/StatusTag';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
const Examine = () => {
const ref = useRef<any>({});
......@@ -20,66 +21,105 @@ const Examine = () => {
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
//表头
const columns: ColumnType<any>[] = [{
title: '需求单号/摘要',
dataIndex: 'No',
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails`}
url={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`}
>
{text}
</EyePreview>
<p>{record.name}</p>
<p>{record.contractAbstract}</p>
</div>
}, {
title: '投标编号',
dataIndex: 'number',
title: '合同生效/失效时间',
dataIndex: 'startTime',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
</div>
}, {
title: '中标会员',
dataIndex: 'memberName',
title: '合同乙方',
dataIndex: 'partyBName',
align: 'center',
},
{
title: '中标通知时间',
dataIndex: 'time',
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '中标金额',
dataIndex: 'Price',
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
filters: [
{ text: '采购询价', value: 1 },
{ text: '采购招标', value: 2 },
{ text: '采购竞价', value: 3 },
],
render: (text, record) => {
let sourceTypeList = [
"",
"采购询价",
"采购招标"
]
return (
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails`}
>
{text}
</EyePreview>
<p>{sourceTypeList[record.sourceType]}</p>
</div>
)
}
},
{
title: '外部状态',
dataIndex: 'status',
dataIndex: 'outerStatus',
align: 'center',
render: (text) => {
let title: any = [
{},
{ name: '已完成', type: "success" },
{ name: '未完成', type: "primary" },
]
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<StatusTag type={title[text].type} title={title[text].name} />
<StatusTag type="warning" title={record.outerStatusName} />
)
}
},
{
title: '内部状态',
dataIndex: 'insidestatus',
dataIndex: 'innerStatus',
align: 'center',
render: (text) => {
let title: any = [
{},
{ name: '已完成', type: "success" },
{ name: '未完成', type: "primary" },
]
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<div>
<span style={statuStyle.point}> </span>
<span>{title[text].name}</span>
<span>{record.innerStatusName}</span>
</div>
)
}
......@@ -87,59 +127,25 @@ const Examine = () => {
title: '操作',
dataIndex: 'state',
align: 'center',
render: (record) => {
console.log(record)
render: (text, record) => {
return (
<span style={statuStyle.success}>创建采购招标合同</span>
<div>
<span style={{ color: '#00B37A' }}>提交审核</span>
</div>
)
}
}]
const handleSubmitBatch = async () => {
}
const controllerBtns = (
<Space>
<Button onClick={handleSubmitBatch}>
批量审核通过
</Button>
</Space>
);
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
let data = {
totalCount: 1,
data: [
{
id: '1',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
},
{
id: '2',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
}
]
}
resolve(data)
PublicApi.getContractManagePageToBeSubmitExamine({
...params,
}).then(res => {
resolve(res.data)
})
})
}
......@@ -148,56 +154,52 @@ const Examine = () => {
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
console.log(selectedRowKeys, selectedRows, 'rowSelection')
}
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
formilyLayouts={{
justify: 'space-between'
}}
fetchTableData={(params: any) => fetchData(params)}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
<Card>
<StandardTable
fetchTableData={params => fetchData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: examineSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
}}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button >批量提交审核</Button>
/>
</Card>
</PageHeaderWrapper>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
)
}
......
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space, Button } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { examineSchema } from '../schema'
import StatusTag from '@/components/StatusTag';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
const Levelexamine = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`}
>
{text}
</EyePreview>
<p>{record.contractAbstract}</p>
</div>
}, {
title: '合同生效/失效时间',
dataIndex: 'startTime',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
</div>
}, {
title: '合同乙方',
dataIndex: 'partyBName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
filters: [
{ text: '采购询价', value: 1 },
{ text: '采购招标', value: 2 },
{ text: '采购竞价', value: 3 },
],
render: (text, record) => {
let sourceTypeList = [
"",
"采购询价",
"采购招标"
]
return (
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails`}
>
{text}
</EyePreview>
<p>{sourceTypeList[record.sourceType]}</p>
</div>
)
}
},
{
title: '外部状态',
dataIndex: 'outerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<StatusTag type="warning" title={record.outerStatusName} />
)
}
},
{
title: '内部状态',
dataIndex: 'innerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<div>
<span style={statuStyle.point}> </span>
<span>{record.innerStatusName}</span>
</div>
)
}
}, {
title: '操作',
dataIndex: 'state',
align: 'center',
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A' }}>提交审核</span>
</div>
)
}
}]
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
PublicApi.getContractManagePageToBeExamineStepOne({
...params,
}).then(res => {
resolve(res.data)
})
})
}
const rowSelection: any = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
}
};
return (
<Card>
<StandardTable
fetchTableData={params => fetchData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: examineSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button >批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
)
}
export default Levelexamine
import React, { useRef } from 'react'
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd';
import statuStyle from '../../common/colorTag'
......@@ -6,76 +6,97 @@ import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { tableListSchema } from '../schema'
import StatusTag from '@/components/StatusTag';
import { purchaseSchema } from '../schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
import { history } from 'umi'
const PurchaseList = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
//表头
const columns: ColumnType<any>[] = [{
title: '需求单号/摘要',
dataIndex: 'No',
dataIndex: 'demandNO',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/payandSettle/capitalAccounts/accountLists/detail?id=${record.id}`}
// url={`/memberCenter/payandSettle/capitalAccounts/accountLists/detail?id=${record.id}`}
>
{text}
</EyePreview>
<p>{record.name}</p>
<p>{record.demandAbstract}</p>
</div>
}, {
title: '投标编号',
dataIndex: 'number',
title: '需求发布时间',
dataIndex: 'demandPublishTime',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
}, {
title: '标会员',
dataIndex: 'memberName',
title: '标会员',
dataIndex: 'awardName',
align: 'center',
},
{
title: '中标通知时间',
dataIndex: 'time',
title: '授标时间',
dataIndex: 'awardTime',
align: 'center',
sorter: {
compare: (a, b) => a.awardTime - b.awardTime,
multiple: 1,
},
},
{
title: '标金额',
dataIndex: 'Price',
title: '标金额',
dataIndex: 'awardAmount',
align: 'center',
sorter: {
compare: (a, b) => a.awardAmount - b.awardAmount,
multiple: 1,
},
render: (text) => {
return (
<div>
{text}
</div>
)
}
},
{
title: '外部状态',
dataIndex: 'status',
dataIndex: 'outerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text) => {
let title: any = [
{},
{ name: '已完成', type: "success" },
{ name: '未完成', type: "primary" },
]
return (
<StatusTag type={title[text].type} title={title[text].name} />
<StatusTag type="success" title={text} />
)
}
},
{
title: '内部状态',
dataIndex: 'insidestatus',
dataIndex: 'innerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text) => {
let title: any = [
{},
{ name: '已完成', type: "success" },
{ name: '未完成', type: "primary" },
]
return (
<div>
<span style={statuStyle.point}> </span>
<span>{title[text].name}</span>
<span>{text}</span>
</div>
)
}
......@@ -85,49 +106,30 @@ const PurchaseList = () => {
align: 'center',
render: (record) => {
return (
<span style={statuStyle.success}>创建采购招标合同</span>
<span style={{ color: '#00B37A' }} onClick={() => history.push('/memberCenter/contract/manage/add/addList/contracAdd')} >创建采购询价合同</span>
)
}
}]
const rowSelection: any = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
}
};
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
let data = {
totalCount: 1,
data: [
{
id: '1',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
},
{
id: '2',
No: 'ZPTY12',
name: '进口头层黄牛皮荔枝纹',
number: 'ZPTY12',
memberName: '温州龙昌手袋有限公司',
time: '2020-12-25 09:00',
Price: '¥50,000.00',
status: 1,
insidestatus: 1,
addText: '创建采购招标合同',
state: '',
}
]
}
resolve(data)
PublicApi.getContractPurchaseInquiryPageToBeCreate({
...params,
}).then(res => {
resolve(res.data)
})
})
}
return (
<PageHeaderWrapper>
<Card>
......@@ -137,16 +139,17 @@ const PurchaseList = () => {
}}
columns={columns}
currentRef={ref}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
schema: purchaseSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
'demandNO',
FORM_FILTER_PATH,
);
},
......
This diff is collapsed.
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space, Button } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { examineSchema } from '../schema'
import StatusTag from '@/components/StatusTag';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
const Secondaryexamine = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`}
>
{text}
</EyePreview>
<p>{record.contractAbstract}</p>
</div>
}, {
title: '合同生效/失效时间',
dataIndex: 'startTime',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
</div>
}, {
title: '合同乙方',
dataIndex: 'partyBName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
filters: [
{ text: '采购询价', value: 1 },
{ text: '采购招标', value: 2 },
{ text: '采购竞价', value: 3 },
],
render: (text, record) => {
let sourceTypeList = [
"",
"采购询价",
"采购招标"
]
return (
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails`}
>
{text}
</EyePreview>
<p>{sourceTypeList[record.sourceType]}</p>
</div>
)
}
},
{
title: '外部状态',
dataIndex: 'outerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<StatusTag type="warning" title={record.outerStatusName} />
)
}
},
{
title: '内部状态',
dataIndex: 'innerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<div>
<span style={statuStyle.point}> </span>
<span>{record.innerStatusName}</span>
</div>
)
}
}, {
title: '操作',
dataIndex: 'state',
align: 'center',
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A' }}>提交审核</span>
</div>
)
}
}]
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
PublicApi.getContractManagePageToBeExamineStepTwo({
...params,
}).then(res => {
resolve(res.data)
})
})
}
const rowSelection: any = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
}
};
return (
<Card>
<StandardTable
fetchTableData={params => fetchData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: examineSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button >批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
)
}
export default Secondaryexamine
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space, Button } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { examineSchema } from '../schema'
import StatusTag from '@/components/StatusTag';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
const Signacontract = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`}
>
{text}
</EyePreview>
<p>{record.contractAbstract}</p>
</div>
}, {
title: '合同生效/失效时间',
dataIndex: 'startTime',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
</div>
}, {
title: '合同乙方',
dataIndex: 'partyBName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
},
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
filters: [
{ text: '采购询价', value: 1 },
{ text: '采购招标', value: 2 },
{ text: '采购竞价', value: 3 },
],
render: (text, record) => {
let sourceTypeList = [
"",
"采购询价",
"采购招标"
]
return (
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails`}
>
{text}
</EyePreview>
<p>{sourceTypeList[record.sourceType]}</p>
</div>
)
}
},
{
title: '外部状态',
dataIndex: 'outerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<StatusTag type="warning" title={record.outerStatusName} />
)
}
},
{
title: '内部状态',
dataIndex: 'innerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<div>
<span style={statuStyle.point}> </span>
<span>{record.innerStatusName}</span>
</div>
)
}
}, {
title: '操作',
dataIndex: 'state',
align: 'center',
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A' }}>提交审核</span>
</div>
)
}
}]
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
PublicApi.getContractManagePageToBeSign({
...params,
}).then(res => {
resolve(res.data)
})
})
}
const rowSelection: any = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
}
};
return (
<Card>
<StandardTable
fetchTableData={params => fetchData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: examineSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button >批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
)
}
export default Signacontract
......@@ -24,7 +24,7 @@ export interface RelateProductDrawerProps {
const formActions = createFormActions();
export const RelevanceTenderProduct:React.FC<RelateProductDrawerProps> = ({
export const RelevanceTenderProduct: React.FC<RelateProductDrawerProps> = ({
type = 'checkbox',
title,
schemaAction,
......@@ -34,7 +34,7 @@ export const RelevanceTenderProduct:React.FC<RelateProductDrawerProps> = ({
...restProps
}) => {
const { visible, setVisible } = useModalTable({type, customKey: 'id'})
const { visible, setVisible } = useModalTable({ type, customKey: 'id' })
const [childVisible, setChildVisible] = useState<boolean>(false)
const [selectRow, setSelectRow] = useState<any[]>([]) // 子级抽屉选择的行数据
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
......@@ -49,7 +49,7 @@ export const RelevanceTenderProduct:React.FC<RelateProductDrawerProps> = ({
}, [])
// 注册virtual组件 一般用于布局
registerVirtualBox("CustomLayout", ({props, schema}) => {
registerVirtualBox("CustomLayout", ({ props, schema }) => {
const {
showStar = false,
......@@ -60,7 +60,7 @@ export const RelevanceTenderProduct:React.FC<RelateProductDrawerProps> = ({
return (
<div style={{ border: "1px solid #DAF2E7", marginBottom: 16 }}>
<p style={{paddingLeft: 8, fontSize: 12, backgroundColor: headerBackgroundColor, color: headerColor}}>{props['title']}<span style={{color: 'red'}}>{showStar?'*':null}</span></p>
<p style={{ paddingLeft: 8, fontSize: 12, backgroundColor: headerBackgroundColor, color: headerColor }}>{props['title']}<span style={{ color: 'red' }}>{showStar ? '*' : null}</span></p>
<div className={style['card-list']}>
{
whetherSelect ?
......@@ -82,7 +82,7 @@ export const RelevanceTenderProduct:React.FC<RelateProductDrawerProps> = ({
</Row>
</Col>
</Row>
}
}
</div>
</div>
);
......@@ -130,7 +130,7 @@ export const RelevanceTenderProduct:React.FC<RelateProductDrawerProps> = ({
// setVisible(false)
formActions.validate().then((res) => {
console.log(res)
if(res['errors']['length'] === 0) {
if (res['errors']['length'] === 0) {
formActions.submit(v => console.log(v))
}
})
......@@ -141,7 +141,7 @@ export const RelevanceTenderProduct:React.FC<RelateProductDrawerProps> = ({
textAlign: 'right',
}}
>
<Button onClick={()=>setVisible(false)} style={{ marginRight: 8 }}>
<Button onClick={() => setVisible(false)} style={{ marginRight: 8 }}>
取消
</Button>
<Button onClick={confirmSubmit} type="primary">
......@@ -180,7 +180,7 @@ export const RelevanceTenderProduct:React.FC<RelateProductDrawerProps> = ({
dataIdList={dataIdList}
footer={footer}
onClose={() => setVisible(false)}
isForm = {true}
isForm={true}
actions={formActions}
// effects={($, ctx) => {
// $('onFormMount').subscribe(() => {
......@@ -201,7 +201,7 @@ export const RelevanceTenderProduct:React.FC<RelateProductDrawerProps> = ({
{
ctx: {
schema: productSearch,
components: { ModalSearch: Search, Submit } ,
components: { ModalSearch: Search, Submit },
effects: ($, actions) => {
actions.reset()
useStateFilterSearchLinkageEffect(
......
import React from 'react';
import { Drawer, Anchor, Row, Col, Divider } from 'antd';
import { Drawer, Anchor, Row, Col, Divider, Typography } from 'antd';
import style from './index.less';
import { LinkOutlined } from '@ant-design/icons';
const { Link } = Anchor;
......@@ -49,7 +50,23 @@ const DetailDrawer: React.FC<IProps> = (props: any) => {
{ item.linkContent.map((items, keys) => (
<div key={`content${keys + 1}`} className={style.list}>
<h5 className={style.listLable} style={{ flex: '0 0 100px' }}>{items.label}</h5>
<h5 className={style.listContent}>{items.content}</h5>
{ !items.file && <h5 className={style.listContent}>{items.content}</h5>}
{
items.file
&& (
<div className={style.upload_data}>
{items.content.length > 0 && items.content.map((v, index) => (
<div key={index} className={style.upload_item}>
<div className={style.upload_left}>
<Typography.Link href={v.url} target="_blank">
<LinkOutlined />
{v.name}
</Typography.Link>
</div>
</div>
))}
</div>
)}
</div>
))}
</div>
......
import React from 'react';
import {
Typography,
} from 'antd';
const { Text } = Typography;
export interface IProps {
label: string,
text: React.ReactNode,
}
const Label: React.FC<IProps> = (props: any) => {
const { label, text } = props;
return (
<>
{ text &&
<div style={{ display: 'flex' }}>
<Text
style={{ width: '55px', display: 'inline-block' }}
type='secondary'
>
{label}:
</Text>
<Text>
{text}
</Text>
</div>
}
</>
)
}
export default Label;
import React from 'react';
import { Modal } from 'antd';
import React, { useState } from 'react';
import { Modal, Button, Popconfirm } from 'antd';
import {
SchemaForm, SchemaMarkupField as Field,
createFormActions,
FormEffectHooks
FormEffectHooks,
} from '@formily/antd'
import { Input, Radio, DatePicker } from '@formily/antd-components'
import moment from 'moment';
......@@ -14,7 +14,7 @@ export interface IProps {
title: string,
visible: boolean,
id: number,
modalType: 'audit' | 'abandon',
modalType: 'audit' | 'abandon' | 'date',
onCancel?: () => void,
onOk?: () => void,
fetch?: () => Promise<unknown>,
......@@ -51,28 +51,45 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
}
const modalText = modalType === 'audit' ? '审核不通过原因' : '作废原因';
const modalNode = modalType === 'audit' ?
<Field
enum={
[
{ label: '审核通过', value: 1 },
{ label: '审核不通过', value: 0 }
]}
name='state'
required
x-component="Radio"
x-component-props={{}}
/> :
<Field
title="作废时间"
name="reasonTime"
required
x-component="DatePicker"
x-component-props={{
format: 'YYYY-MM-DD HH:mm:ss',
disabledDate,
}}
/>
const modalNode = () => {
switch (modalType) {
case 'audit':
return <Field
enum={
[
{ label: '审核通过', value: 1 },
{ label: '审核不通过', value: 0 }
]}
name='state'
required
x-component="Radio"
x-component-props={{}}
/>
case 'abandon':
return <Field
title="作废时间"
name="reasonTime"
required
x-component="DatePicker"
x-component-props={{
format: 'YYYY-MM-DD HH:mm:ss',
disabledDate,
}}
/>
case 'date':
return <Field
title="报价截止时间"
name="quotedPriceTime"
required
x-component="DatePicker"
x-component-props={{
format: 'YYYY-MM-DD HH:mm:ss',
disabledDate,
}}
/>
}
}
const handleSubmit = (val: any) => {
let value = { ...val }
......@@ -80,11 +97,13 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
if (modalType === 'audit') {
params.state = value.state;
value.state !== 1 && (params.auditOpinion = value.auditOpinion);
} else {
} else if (modalType === 'abandon') {
params.reason = value.reason
params.reasonTime = new Date(value.reasonTime).getTime();
} else {
params.quotedPriceTime = new Date(value.quotedPriceTime).getTime();
}
fetch({id, ...params}).then(res => {
fetch({ id, ...params }).then(res => {
if (res.code === 1000) {
onOk()
}
......@@ -101,9 +120,27 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
width={600}
title={title}
visible={visible}
onCancel={handleClose}
onOk={() => actions.submit()}
afterClose={() => actions.reset()}
footer={
<>
<Button onClick={handleClose}>取消</Button>
{ modalType === 'date'
&& (
<Popconfirm
title="是否立即截止报价?点击确定后供应商不能再提交报价单。"
okText="是"
cancelText="否"
onConfirm={() => {
actions.setFieldValue('quotedPriceTime', moment().format());
actions.submit()
}}>
<Button type="primary">立即截止报价</Button>
</Popconfirm>
)}
<Button type="primary" onClick={() => actions.submit()}>确定</Button>
</>
}
>
<SchemaForm
layout="vertical"
......@@ -121,20 +158,21 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
state: 1
}}
>
{modalNode}
<Field
title={modalText}
name={modalType === 'audit' ? 'auditOpinion' : 'reason'}
x-component="TextArea"
required
x-component-props={{
placeholder: '在此输入你的内容,最多60个汉字'
}}
x-rules={{
max: 60,
message: '原因最多60个汉字'
}}
/>
{modalNode()}
{(modalType === 'audit' || modalType === 'abandon')
&& (<Field
title={modalText}
name={modalType === 'audit' ? 'auditOpinion' : 'reason'}
x-component="TextArea"
required
x-component-props={{
placeholder: '在此输入你的内容,最多60个汉字'
}}
x-rules={{
max: 60,
message: '原因最多60个汉字'
}}
/>)}
</SchemaForm>
</Modal>
)
......
......@@ -11,13 +11,25 @@ import { searchSelectGetSelectCategoryOptionEffect } from '@/pages/transaction/e
import {
PurchaseDemandSchema,
PurchaseDemandPublicSchema,
INQUIRYDEMANDORDER_SCHEMA,
INQUIRYWAITORDER_SCHEMA,
CONFIRMOFFERSERAH_SCHEMA,
CONFIRMOFFERSUBMITAPRICE_SCHEMA,
CONFIRMOFFERAUDIT_SCHEMA,
} from '../../schema';
interface Iprops {
fetch?: () => Promise<unknown>,
fetchRowkeys?(e: any),
controllerBtns?: React.ReactNode,
schemaType?: 'PurchaseDemand' | 'PurchaseDemandPublic',
schemaType?:
'PurchaseDemand' |
'PurchaseDemandPublic' |
'INQUIRYDEMANDORDER_SCHEMA' |
'INQUIRYWAITORDER_SCHEMA' |
'CONFIRMOFFERSERAH_SCHEMA' |
'CONFIRMOFFERSUBMITAPRICE_SCHEMA' |
'CONFIRMOFFERAUDIT_SCHEMA',
columns: ColumnType<any>[],
effects?: string,
selectedRow?: boolean,
......@@ -43,6 +55,16 @@ const Table: React.FC<Iprops> = (props:any) => {
return PurchaseDemandSchema
case 'PurchaseDemandPublic':
return PurchaseDemandPublicSchema
case 'INQUIRYDEMANDORDER_SCHEMA':
return INQUIRYDEMANDORDER_SCHEMA;
case 'INQUIRYWAITORDER_SCHEMA':
return INQUIRYWAITORDER_SCHEMA;
case 'CONFIRMOFFERSERAH_SCHEMA':
return CONFIRMOFFERSERAH_SCHEMA;
case 'CONFIRMOFFERSUBMITAPRICE_SCHEMA':
return CONFIRMOFFERSUBMITAPRICE_SCHEMA;
case 'CONFIRMOFFERAUDIT_SCHEMA':
return CONFIRMOFFERAUDIT_SCHEMA;
}
}
/** 列表数据 */
......@@ -70,6 +92,11 @@ const Table: React.FC<Iprops> = (props:any) => {
}
}));
// 搜索
const search = (values: any) => {
tableRef.current.reload(values)
}
return (
<PageHeaderWrapper>
<Card>
......@@ -83,6 +110,7 @@ const Table: React.FC<Iprops> = (props:any) => {
<NiceForm
actions={formActions}
expressionScope={{ controllerBtns }}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, effects, FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
......
import React from 'react';
import React, { useRef, useState } from 'react';
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 } from 'antd';
import { Row, Col, Button, Tag, Space, Typography, Rate } from 'antd';
import {
OFFTER_EXTERNALSTATE,
OFFTER_EXTERNALSTATE_COLOR,
OFFTER_INTERNALSTATE,
OFFTER_INTERNALSTATE_COLOR
OFFTER_INTERNALSTATE_COLOR,
CHNUM_TYPE
} from '../../constants';
const { Text } = Typography;
......@@ -19,13 +20,12 @@ const AuditResultsOne = () => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
title: '报价单号/摘要',
title: '需求单号/摘要',
key: 'purchaseInquiryNo',
dataIndex: 'purchaseInquiryNo',
render: (text: any, record: any) => (
<Space direction='vertical'>
<EyePreview
url={`/memberCenter/procurementAbility/offter/inquiry/preview?id=${record.id}&number=${record.purchaseInquiryNo}`}>{text}</EyePreview>
<EyePreview>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text>
</Space>
)
......@@ -48,6 +48,23 @@ const AuditResultsOne = () => {
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: 'count',
......@@ -69,16 +86,44 @@ const AuditResultsOne = () => {
render: (text: any, record: any) =>
<Button type='link'>审核</Button>
}];
/** 多选操作 */
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
schemaType="PurchaseDemandPublic"
selectedRow
reload={ref}
fetchRowkeys={(e) => setRowKeys(e)}
schemaType="CONFIRMOFFERAUDIT_SCHEMA"
columns={columns}
effects="requisitionFormNo"
effects="purchaseInquiryNo"
fetch={PublicApi.getPurchaseConfirmQuotedPriceStayExamineAward1List}
controllerBtns={
<Row>
<Col span={6}>
<Button>批量提交审核</Button>
<Button
loading={loading}
disabled={rowkeys.length === 0}
onClick={fetchSubmitBatch}
>
批量提交审核
</Button>
</Col>
</Row>
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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