Commit 736501b0 authored by alwayOnlie's avatar alwayOnlie

flx:待新增合同

parent d9772439
......@@ -2,7 +2,9 @@ export default {
'/api': {
'target': process.env.BACK_GATEWAY || 'http://10.0.0.25:8100/',
// 'target': 'http://10.0.0.17:8100/' || 'http://10.0.0.25:8100/',
// 'target': 'http://192.168.168.84:8700/' || 'http://10.0.0.25:8100/',
'changeOrigin': true,
'pathRewrite': { '^/api': '' },
}
}
......@@ -212,6 +212,61 @@ const contracRoute = {
name: '合同查询',
component: '@/pages/contract/coordination/coordinationList',
},
{
path: '/memberCenter/contract/coordination/coordinationList/details',
name: '合同查询详情',
hideInMenu: true,
component: '@/pages/contract/coordination/details',
},
{
path: '/memberCenter/contract/coordination/pageToBeSubmitExamine',
name: '待提交审核合同',
component: '@/pages/contract/coordination/pageToBeSubmitExamine',
},
{
path: '/memberCenter/contract/coordination/pageToBeSubmitExamine/details',
name: '合同查询详情',
hideInMenu: true,
component: '@/pages/contract/coordination/details',
},
{
path: '/memberCenter/contract/coordination/pageToBeExamineOne',
name: '待审核合同(一级)',
component: '@/pages/contract/coordination/pageToBeExamineOne',
},
{
path: '/memberCenter/contract/coordination/pageToBeExamineOne/details',
name: '合同查询详情',
hideInMenu: true,
component: '@/pages/contract/coordination/details',
},
{
path: '/memberCenter/contract/coordination/pageToBeExamineTwo',
name: '待审核合同(二级)',
component: '@/pages/contract/coordination/pageToBeExamineTwo',
},
{
path: '/memberCenter/contract/coordination/pageToBeExamineTwo/details',
name: '合同查询详情',
hideInMenu: true,
component: '@/pages/contract/coordination/details',
},
{
path: '/memberCenter/contract/coordination/Sign',
name: '待签订合同',
component: '@/pages/contract/coordination/Sign',
},
{
path: '/memberCenter/contract/coordination/implement',
name: '合同执行查询',
component: '@/pages/contract/coordination/implement',
},
{
path: '/memberCenter/contract/coordination/implement/details',
name: '合同查询详情',
hideInMenu: true,
component: '@/pages/contract/coordination/details',
},
],
}
],
......
import React, { useState } from 'react';
import {
Drawer,
Anchor,
Menu,
Layout,
Button,
Form,
Divider,
Typography,
} from 'antd';
import cx from 'classnames'
import style from './index.less';
import { PlusSquareOutlined } from '@ant-design/icons';
import SelectProduct from './selectProduct';
import { PublicApi } from '@/services/api';
const { Sider, Content } = Layout;
const { Text } = Typography;
const { Link } = Anchor;
const { SubMenu } = Menu;
export interface IProps {
visible: boolean,
record: any,
onClose?: () => void,
onClick?: (e: any) => void,
}
const layout: any = {
colon: false,
labelCol: { style: { width: '110px' } },
labelAlign: "left"
};
const CrossSellProducts: React.FC<IProps> = (props: any) => {
const {
visible,
record,
onClose,
onClick
} = props;
console.log(record)
const [flag, setFlag] = useState<boolean>(false);
const [product, setProduct] = useState<any>({});
const [attribute, setAttribute] = useState<any>([]);
const handleAnchorClick = (e) => {
e.preventDefault()
};
/**报价商品属性 */
const GetCommodityAttribute = (id) => {
PublicApi.getProductCommodityGetCommodityAttributeByUnitPriceAndPicId({ unitPriceAndPicId: id }).then(res => {
if (res.code === 1000) {
let { data } = res || {}
setAttribute(data)
}
})
}
/**选择报价商品回调 */
const handleSelectPrduct = (params: any) => {
setProduct(params);
GetCommodityAttribute(params.id);
setFlag(false);
}
/** 关闭 */
const handleClose = () => {
onClose()
}
/** 确定 */
const handleConfirm = () => {
onClick({
product,
attribute
})
}
return (
<>
<Drawer
title='关联报价商品'
placement='right'
width={800}
className={style.drawer}
visible={visible}
footer={
<div
style={{
textAlign: 'right',
}}
>
<Button onClick={handleClose} style={{ marginRight: 8 }}>
取消
</Button>
<Button onClick={handleConfirm} type="primary">
确定
</Button>
</div>
}
>
<Layout>
<Sider width={159}>
<Anchor
getContainer={() => document.getElementById('current')}
onClick={handleAnchorClick}
>
<Menu>
<Menu.Item key="1">
<Link href='#basic' title='基本信息' />
</Menu.Item>
{attribute.length > 0 && attribute.map((item: any, index: number) => (
<Menu.Item key={`attribute_${index + 1}`}>
<Link href={`attribute_${index + 1}`} title={item.customerAttribute.name} />
</Menu.Item>
))}
{/* <Menu.Item key="6">
<Link href='#file' title='附件' />
</Menu.Item> */}
</Menu>
</Anchor>
</Sider>
<Content id='current'>
<Form
{...layout}
>
{/* 基本信息 */}
<div id='basic'>
<Form.Item
style={{ marginBottom: '10px' }}
label={
<>
<Divider
type="vertical"
style={{
width: '2px',
height: '16px',
margin: '0px 5px 0px 0px',
backgroundColor: '#00B37A',
}}
/>
<span
style={{
fontSize: '14px',
color: '#909399',
}}
>
基本信息
</span>
</>
}
/>
{record
&& (
<div className={style.box}>
<div className={style.title}>对应采购物料</div>
<div className={style.content}>
<div className={style.row}>
<span className={style.label}>物料编号:</span>
<span className={style.col}>{record.materielNo}</span>
</div>
<div className={style.row}>
<span className={style.label}>品牌:</span>
<span className={style.col}>{record.brand}</span>
</div>
<div className={style.row}>
<span className={style.label}>物料名称:</span>
<span className={style.col}>{record.materielName}</span>
</div>
<div className={style.row}>
<span className={style.label}>品类:</span>
<span className={style.col}>{record.category}</span>
</div>
<div className={style.row}>
<span className={style.label}>规格型号:</span>
<span className={style.col}>{record.model}</span>
</div>
</div>
</div>
)}
<div className={cx(style.box, style.boxBlue)}>
<div className={cx(style.title, style.tagBlue)}>
报价商品
<Text type='danger'>*</Text>
</div>
<div className={style.content}>
{Object.keys(product).length > 0
&& (
<>
<div className={style.row}>
<span className={style.label}>商品名称:</span>
<span className={style.col}>{product.name}</span>
</div>
<div className={style.row}>
<span className={style.label}>品牌:</span>
<span className={style.col}>{product.brandName}</span>
</div>
<div className={style.row}>
<span className={style.label}>品类:</span>
<span className={style.col}>{product.customerCategoryName}</span>
</div>
</>
)}
<Button onClick={() => setFlag(true)} block type="dashed" style={{ margin: '16px 0px' }}>
<PlusSquareOutlined />
选择商品
</Button>
</div>
</div>
</div>
{attribute.length > 0 && attribute.map((item: any, index: number) => (
<div id={`attribute_${index + 1}`} key={`attribute_${index + 1}`}>
<Form.Item
style={{ marginBottom: '10px' }}
label={
<>
<Divider
type="vertical"
style={{
width: '2px',
height: '16px',
margin: '0px 5px 0px 0px',
backgroundColor: '#00B37A',
}}
/>
<span
style={{
fontSize: '14px',
color: '#909399',
}}
>
{item.customerAttribute.name}
</span>
</>
}
/>
{item.customerAttributeValueList.map((child: any, childIdx: number) => (
<Form.Item
key={childIdx}
label={item.customerAttribute.name}
style={{ marginBottom: 0 }}
>
<Text>{child.value}</Text>
</Form.Item>
))}
</div>
))}
{/* 附件 */}
<div id='file'>
<Form.Item
style={{ marginBottom: '10px' }}
label={
<>
<Divider
type="vertical"
style={{
width: '2px',
height: '16px',
margin: '0px 5px 0px 0px',
backgroundColor: '#00B37A',
}}
/>
<span
style={{
fontSize: '14px',
color: '#909399',
}}
>
附件
</span>
</>
}
/>
</div>
</Form>
</Content>
</Layout>
</Drawer>
<SelectProduct
visible={flag}
onclose={() => setFlag(false)}
confirm={handleSelectPrduct}
/>
</>
)
}
export default CrossSellProducts;
.drawer {
:global {
.ant-drawer-body {
padding: 0px;
.ant-layout {
height: 100%;
.ant-layout-sider {
background-color: #FFFFFF;
}
.ant-anchor-wrapper {
margin-left: 0 !important;
padding-left: 0 !important;
}
.ant-menu-item {
margin-top: 0 !important;
margin-bottom: 0 !important;
&:after {
left: 0;
border-right: none;
border-left: 2px solid #00B37A;
height: 80%;
margin: auto;
}
.ant-anchor-link {
padding: 0px !important;
line-height: 40px !important;
}
}
.ant-menu-item-selected {
color: #303133;
font-weight: 600;
background-color: transparent !important;
}
.ant-layout-content {
height: 100%;
padding: 24px;
background-color: #FFFFFF;
}
}
}
}
}
.box {
width: 100%;
border: 1px solid #DAF2E7;
.title {
width: 100%;
padding: 0px 7px;
font-size: 12px;
color: #00B37A;
background-color: #E4F7EF;
}
.tagBlue {
color: #3877FF;
background-color: #F0F7FF;
}
.content {
display: flex;
flex-wrap: wrap;
padding: 0px 7px;
.row {
margin: 2px 0px;
flex: 0 0 50%;
.label {
width: 64px;
font-size: 12px;
color: #909399;
}
.col {
font-size: 12px;
color: #303133;
}
}
}
}
.boxBlue {
margin-top: 16px;
border: 1px solid #F0F7FF;
}
import React, { useRef } from 'react';
import {
Drawer,
Button
} from 'antd';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import { PublicApi } from '@/services/api';
import NiceForm from '@/components/NiceForm';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { searchSelectGetSelectCategoryOptionEffect } from '@/pages/transaction/effect/index';
import {
OfferProductSchema,
} from '../../schema';
const formActions = createFormActions();
interface Iprops {
visible: boolean,
onclose?(),
confirm?(e: any),
}
const SelectProduct: React.FC<Iprops> = (props: any) => {
const ref = useRef({});
const { visible, onclose, confirm } = props;
const [rowSelection, RowCtl] = useRowSelectionTable({ customKey: 'id', type: 'radio' });
const columns: ColumnType<any>[] = [
{
title: 'ID',
key: 'id',
dataIndex: 'id'
},
{
title: '商品名称',
key: 'name',
dataIndex: 'name'
},
{
title: '品类',
key: 'customerCategoryName',
dataIndex: 'customerCategoryName'
},
{
title: '品牌',
key: 'brandName',
dataIndex: 'brandName',
render: (text: any) => <span>{(text && Object.keys(text).length > 0) && text.name}</span>
},
]
const fetchGoodsData = (params: any) => {
return new Promise(resolve => {
PublicApi.getProductCommodityCommonGetCommodityListBySeller({ ...params, environment: 1, shopType: 1 }).then(res => {
resolve(res.data)
})
})
}
/** 关闭 */
const onClose = () => {
onclose();
RowCtl.setSelectRow([]);
RowCtl.setSelectedRowKeys([]);
}
console.log(rowSelection, RowCtl)
return (
<Drawer
visible={visible}
onClose={onclose}
title='选择货品'
width={900}
footer={
<div
style={{
textAlign: 'right',
}}
>
<Button onClick={onClose} style={{ marginRight: 8 }}>
取消
</Button>
<Button onClick={() => confirm(RowCtl.selectRow[0])} type="primary">
确定
</Button>
</div>
}
>
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
rowSelection={rowSelection}
fetchTableData={(params) => fetchGoodsData(params)}
controlRender={
<NiceForm
actions={formActions}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'name', FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchSelectGetSelectCategoryOptionEffect(actions, 'category')
})
}}
schema={OfferProductSchema}
>
</NiceForm>
}
/>
</Drawer>
)
}
export default SelectProduct
......@@ -7,69 +7,110 @@ import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { ApplySchema } from '../schema'
import StatusTag from '@/components/StatusTag';
import { CoordinationSchema } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
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 { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { history } from 'umi';
const coordinationList = () => {
const ref = useRef<any>({});
//表头
const columns: ColumnType<any>[] = [{
title: '请款单号/摘要',
dataIndex: 'applyNo',
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/funds/bill/details?id=${record.id}`}
type="button"
>
{text}
</EyePreview>
<p>{record.applyAbstract}</p>
<p>{record.contractAbstract}</p>
</div>
}, {
title: '单据时间',
dataIndex: 'orderTime',
align: 'center',
}, {
title: '收款方',
dataIndex: 'payeeMemberName',
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: 'contractNo',
title: '合同甲方',
dataIndex: 'partyAName',
align: 'center',
defaultSortOrder: 'descend',
sorter: (a, b) => a.age - b.age,
},
{
title: '合同总金额',
dataIndex: 'contractAmount',
dataIndex: 'totalAmount',
align: 'center',
},
{
title: '请款金额',
dataIndex: 'applyAmount',
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
type="button"
>
{text}
</EyePreview>
<p>{record.sourceTypeName}</p>
</div>
},
{
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
render: (text) => {
return (
<span style={statuStyle.success}>{text}</span>
)
}
},
{
title: '内部状态',
dataIndex: 'statusName',
dataIndex: 'innerStatusName',
align: 'center',
render: (text) => {
return (
<span style={statuStyle.success}>{text}</span>
)
}
}]
},
{
title: '操作',
dataIndex: 'innerStatusName',
align: 'center',
render: (text, record) => {
return (
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/coordination/coordinationList/details?contractId=${record.id}`)}> 查看 </span>
)
}
}
]
const fetchOptions = (service) => {
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
}
return [];
}
}
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
......@@ -85,6 +126,7 @@ const coordinationList = () => {
})
})
}
return (
<PageHeaderWrapper>
<Card>
......@@ -98,18 +140,27 @@ const coordinationList = () => {
formilyProps={{
ctx: {
inline: false,
schema: ApplySchema,
schema: CoordinationSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
)
},
components: {
DateRangePickerUnix,
Submit
Submit,
SearchSelect
}
}
}}
......
.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;
margin-bottom: 2em;
}
.card .list .listLable {
flex: 0 0 25%;
color: #909399;
}
.listItem {
display: flex;
height: 40px;
}
.listItem .label {
flex: 0.2;
padding: 0 16px;
color: #00b37a;
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;
}
.box :global .ant-table-expanded-row-level-1 .ant-table-cell {
padding: 0px !important;
background-color: #ffffff;
}
.info .infoTitle {
border-left: 4px solid #00B37A;
padding-left: 8px;
}
.info .infoMian {
display: flex;
}
.info .infoMian .item {
flex: 1;
}
.info .infoMian .item .box {
display: flex;
margin-top: 15px;
}
.info .infoMian .item .box .lalbel {
width: 80px;
text-align: left;
color: #909399;
font-size: 12px;
}
.info .infoMian .item .box .text {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #303133;
}
.anchorWrap {
:global {
.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;
margin-bottom: 2em;
h5 {
// margin-bottom: 2em;
}
.listLable {
flex: 0 0 25%;
color: #909399;
}
}
}
.listItem {
display: flex;
height: 40px;
.label {
flex: 0.2;
padding: 0 16px;
color: #00b37a;
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;
}
}
}
}
.box{
:global {
.ant-table-expanded-row-level-1 .ant-table-cell {
padding: 0px !important;
background-color: #ffffff;
}
}
}
.info{
.infoTitle{
border-left:4px solid #00B37A ;
padding-left: 8px;
}
.infoMian{
display: flex;
.item{
flex: 1;
.box{
display: flex;
margin-top: 15px;
.lalbel{
width: 80px;
text-align: left;
color: #909399;
font-size: 12px;
}
.text{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #303133;
}
}
}
}
}
This diff is collapsed.
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 { CoordinationSchema } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
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 { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import moment from 'moment';
import { history } from 'umi';
const Sign = () => {
const ref = useRef<any>({});
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/coordination/implement/details?contractId=${record.id}&type=sign`}
>
{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: 'partyAName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '已执行金额',
dataIndex: 'executeAmount',
align: 'center',
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '已付款',
dataIndex: 'payAmount',
align: 'center',
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '已请款待付款',
dataIndex: 'unPayApplyAmount',
align: 'center',
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '未请款',
dataIndex: 'unApplyAmount',
align: 'center',
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
render: (text) => {
return (
<span style={statuStyle.success}>{text}</span>
)
}
},
// {
// title: '操作',
// dataIndex: 'innerStatusName',
// align: 'center',
// render: (text, record) => {
// return (
// <div>
// <span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}&type=submitExamine`)}>执行详情</span>
// </div>
// )
// }
// }
]
const fetchOptions = (service) => {
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
}
return [];
}
}
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
params.startTime = params.startTime ? moment().format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment().format('YYYY-MM-DD') : '';
return new Promise((resolve, reject) => {
PublicApi.getContractExecutePageListByPartyB({
...params,
outerStatus: params.outerStatus || 0,
innerStatus: params.innerStatus || 0,
}).then(res => {
resolve(res.data)
}).catch(err => {
reject(err)
})
})
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: CoordinationSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
)
},
components: {
DateRangePickerUnix,
Submit,
SearchSelect
}
}
}}
/>
</Card>
</PageHeaderWrapper>
)
}
export default Sign
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Modal, Form, Radio, message, Input, 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 { CoordinationSchema } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
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 { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import moment from 'moment';
const { TextArea } = Input;
import { history } from 'umi';
const pageToBeExamineOne = () => {
const ref = useRef<any>({});
const [form] = Form.useForm();
const [isPass, setIsAllMember] = useState()
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
type="button"
>
{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: 'partyAName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
},
{
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
type="button"
>
{text}
</EyePreview>
<p>{record.sourceTypeName}</p>
</div>
},
{
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
render: (text) => {
return (
<span style={statuStyle.success}>{text}</span>
)
}
},
{
title: '内部状态',
dataIndex: 'innerStatus',
align: 'center',
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', marginRight: 20, cursor: 'pointer', }} onClick={() => submitExamine(record.id)}>审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer', }} onClick={() => history.push(`/memberCenter/contract/coordination/pageToBeExamineOne/details?contractId=${record.id}&type=levelexamine`)}>查看</span>
</div>
)
}
}
]
const fetchOptions = (service) => {
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
}
return [];
}
}
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
params.startTime = params.startTime ? moment().format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment().format('YYYY-MM-DD') : '';
return new Promise((resolve, reject) => {
PublicApi.getContractCoordinationPageToBeExamineOne({
...params,
outerStatus: params.outerStatus || 0,
innerStatus: params.innerStatus || 0,
}).then(res => {
resolve(res.data)
}).catch(err => {
reject(err)
})
})
}
/* 提交表单 */
const submitExamine = (id) => {
setid(id)
setIsModalVisible(!Visible)
}
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
const onFinish = (values: any) => {
values.contractId = id;
const msg = message.loading({
content: '正在操作',
duration: 0,
});
console.log('Success:', values);
PublicApi.postContractCoordinationExamineStepOne(values).then(res => {
console.log(res);
if (res.code === 1000) {
ref.current.reload();
setIsModalVisible(!Visible)
}
}).finally(() => {
msg();
});
};
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: CoordinationSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
)
},
components: {
DateRangePickerUnix,
Submit,
SearchSelect
}
}
}}
/>
</Card>
<Modal footer={null} title="提交审核" visible={Visible} onOk={() => setIsModalVisible(!Visible)} onCancel={() => setIsModalVisible(!Visible)}>
<Form
name="basic"
form={form}
initialValues={{ remember: true }}
onFinish={onFinish}
onFinishFailed={onFinishFailed}
>
<Form.Item name="isPass" label="" rules={[{ required: true, message: '请选择作废日期' }]} initialValue={isPass} >
<Radio.Group onChange={handleIsAllMemberChange}>
<Radio value={1}>通过</Radio>
<Radio value={0}>不通过</Radio>
</Radio.Group>
</Form.Item>
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
</Form.Item>
<Form.Item label='' name="opinion" rules={[{ required: true, message: '审核通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Button onClick={() => setIsModalVisible(!Visible)} style={{ marginRight: 10 }}>取消</Button>
<Button type="primary" htmlType="submit">保存</Button>
</div>
</Form>
</Modal>
</PageHeaderWrapper>
)
}
export default pageToBeExamineOne
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Modal, Form, Radio, message, Input, 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 { CoordinationSchema } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
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 { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import moment from 'moment';
import { history } from 'umi';
const { TextArea } = Input;
const pageToBeExamineTwo = () => {
const ref = useRef<any>({});
const [form] = Form.useForm();
const [isPass, setIsAllMember] = useState()
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
type="button"
>
{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: 'partyAName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
},
{
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
type="button"
>
{text}
</EyePreview>
<p>{record.sourceTypeName}</p>
</div>
},
{
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
render: (text) => {
return (
<span style={statuStyle.success}>{text}</span>
)
}
},
{
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
render: (text) => {
return (
<div>
<span style={statuStyle.point}> </span>
<span>{text}</span>
</div>
)
}
},
{
title: '操作',
dataIndex: 'innerStatusName',
align: 'center',
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/coordination/pageToBeExamineTwo/details?contractId=${record.id}&type=pageToBeExamineTwo`)}>查看</span>
</div>
)
}
}
]
const fetchOptions = (service) => {
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
}
return [];
}
}
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
params.startTime = params.startTime ? moment().format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment().format('YYYY-MM-DD') : '';
return new Promise((resolve, reject) => {
PublicApi.getContractCoordinationPageToBeExamineTwo({
...params,
outerStatus: params.outerStatus || 0,
innerStatus: params.innerStatus || 0,
}).then(res => {
resolve(res.data)
}).catch(err => {
reject(err)
})
})
}
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
/* 提交表单 */
const submitExamine = (id) => {
setid(id)
setIsModalVisible(!Visible)
}
const onFinish = (values: any) => {
values.contractId = id;
const msg = message.loading({
content: '正在操作',
duration: 0,
});
console.log('Success:', values);
PublicApi.postContractCoordinationExamineStepTwo(values).then(res => {
console.log(res);
if (res.code === 1000) {
ref.current.reload();
setIsModalVisible(!Visible)
}
}).finally(() => {
msg();
});
};
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: CoordinationSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
)
},
components: {
DateRangePickerUnix,
Submit,
SearchSelect
}
}
}}
/>
</Card>
<Modal footer={null} title="提交审核" visible={Visible} onOk={() => setIsModalVisible(!Visible)} onCancel={() => setIsModalVisible(!Visible)}>
<Form
name="basic"
form={form}
initialValues={{ remember: true }}
onFinish={onFinish}
onFinishFailed={onFinishFailed}
>
<Form.Item name="isPass" label="" rules={[{ required: true, message: '请选择作废日期' }]} initialValue={isPass} >
<Radio.Group onChange={handleIsAllMemberChange}>
<Radio value={1}>通过</Radio>
<Radio value={0}>不通过</Radio>
</Radio.Group>
</Form.Item>
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
</Form.Item>
<Form.Item label='' name="opinion" rules={[{ required: true, message: '审核通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Button onClick={() => setIsModalVisible(!Visible)} style={{ marginRight: 10 }}>取消</Button>
<Button type="primary" htmlType="submit">保存</Button>
</div>
</Form>
</Modal>
</PageHeaderWrapper>
)
}
export default pageToBeExamineTwo
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Modal, Form, Radio, message, Input, 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 { CoordinationSchema } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
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 { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import moment from 'moment';
import { history } from 'umi';
const { TextArea } = Input;
const pageToBeSubmitExamine = () => {
const ref = useRef<any>({});
const [form] = Form.useForm();
const [isPass, setIsAllMember] = useState()
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?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: 'partyAName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
},
{
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
type="button"
>
{text}
</EyePreview>
<p>{record.sourceTypeName}</p>
</div>
},
{
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
render: (text) => {
return (
<span style={statuStyle.success}>{text}</span>
)
}
},
{
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
render: (text) => {
return (
<div>
<span style={statuStyle.point}> </span>
<span>{text}</span>
</div>
)
}
},
{
title: '操作',
dataIndex: 'innerStatusName',
align: 'center',
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>提交审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}&type=submitExamine`)}>查看</span>
</div>
)
}
}
]
const fetchOptions = (service) => {
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
}
return [];
}
}
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
params.startTime = params.startTime ? moment().format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment().format('YYYY-MM-DD') : '';
return new Promise((resolve, reject) => {
PublicApi.getContractCoordinationPageToBeSubmitExamine({
...params,
outerStatus: params.outerStatus || 0,
innerStatus: params.innerStatus || 0,
}).then(res => {
resolve(res.data)
}).catch(err => {
reject(err)
})
})
}
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
/* 提交表单 */
const submitExamine = (id) => {
setid(id)
setIsModalVisible(!Visible)
}
const onFinish = (values: any) => {
values.contractId = id;
const msg = message.loading({
content: '正在操作',
duration: 0,
});
console.log('Success:', values);
PublicApi.postContractCoordinationSubmitExamine(values).then(res => {
console.log(res);
if (res.code === 1000) {
ref.current.reload();
setIsModalVisible(!Visible)
}
}).finally(() => {
msg();
});
};
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: CoordinationSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
)
},
components: {
DateRangePickerUnix,
Submit,
SearchSelect
}
}
}}
/>
</Card>
<Modal footer={null} title="提交审核" visible={Visible} onOk={() => setIsModalVisible(!Visible)} onCancel={() => setIsModalVisible(!Visible)}>
<Form
name="basic"
form={form}
initialValues={{ remember: true }}
onFinish={onFinish}
onFinishFailed={onFinishFailed}
>
<Form.Item name="isPass" label="" rules={[{ required: true, message: '请选择作废日期' }]} initialValue={isPass} >
<Radio.Group onChange={handleIsAllMemberChange}>
<Radio value={1}>通过</Radio>
<Radio value={0}>不通过</Radio>
</Radio.Group>
</Form.Item>
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
</Form.Item>
<Form.Item label='' name="opinion" rules={[{ required: true, message: '审核通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Button onClick={() => setIsModalVisible(!Visible)} style={{ marginRight: 10 }}>取消</Button>
<Button type="primary" htmlType="submit">保存</Button>
</div>
</Form>
</Modal>
</PageHeaderWrapper>
)
}
export default pageToBeSubmitExamine
......@@ -5,14 +5,15 @@ import { OrderTypeMap, PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkSt
/**
* 请款
*/
export const ApplySchema: any = {
export const CoordinationSchema: any = {
type: 'object',
properties: {
applyNo: {
contractNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入招标单号',
placeholder: '请输入合同编号',
align: 'start',
},
},
......@@ -26,16 +27,16 @@ export const ApplySchema: any = {
}
},
properties: {
"inviteBidAbstract": {
"contractAbstract": {
type: 'string',
"x-component-props": {
placeholder: '请输入招标摘要'
placeholder: '请输入合同摘要'
}
},
"bidNo": {
"partyAName": {
type: 'string',
"x-component-props": {
placeholder: '请输入投标单号'
placeholder: '请输入合同甲方'
}
},
"[startTime,endTime]": {
......@@ -48,11 +49,22 @@ export const ApplySchema: any = {
}
},
},
"bidWinnerName": {
outerStatus: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请输入中标会员'
}
placeholder: '请选择外部状态'
},
title: '请选择外部状态',
},
innerStatus: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择内部状态'
},
title: '请选择外部状态',
},
submit: {
'x-component': 'Submit',
......@@ -64,3 +76,88 @@ export const ApplySchema: any = {
},
}
}
/** 选择报价商品 */
export const OfferProductSchema: ISchema = {
type: 'object',
properties: {
megalayout: {
type: 'object',
"x-component": 'mega-layout',
properties: {
name: {
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: {
code: {
type: 'string',
"x-component-props": {
placeholder: '货号'
}
},
customerCategory: {
type: 'string',
"x-component-props": {
placeholder: '品类'
}
},
brand: {
type: 'string',
"x-component-props": {
placeholder: '品牌'
}
},
type: {
type: 'string',
"x-component-props": {
placeholder: '规格型号'
}
},
}
},
sumbit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Modal, Form, Radio, message, Input, 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 { CoordinationSchema } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
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 { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import moment from 'moment';
import { history } from 'umi';
const { TextArea } = Input;
const Sign = () => {
const ref = useRef<any>({});
const [form] = Form.useForm();
const [isPass, setIsAllMember] = useState()
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?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: 'partyAName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
},
{
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
type="button"
>
{text}
</EyePreview>
<p>{record.sourceTypeName}</p>
</div>
},
{
title: '外部状态',
dataIndex: 'outerStatusName',
align: 'center',
render: (text) => {
return (
<span style={statuStyle.success}>{text}</span>
)
}
},
{
title: '内部状态',
dataIndex: 'innerStatusName',
align: 'center',
render: (text) => {
return (
<div>
<span style={statuStyle.point}> </span>
<span>{text}</span>
</div>
)
}
},
{
title: '操作',
dataIndex: 'innerStatusName',
align: 'center',
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>签订合同</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}&type=submitExamine`)}>查看</span>
</div>
)
}
}
]
const fetchOptions = (service) => {
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
}
return [];
}
}
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
params.startTime = params.startTime ? moment().format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment().format('YYYY-MM-DD') : '';
return new Promise((resolve, reject) => {
PublicApi.getContractCoordinationPageToBeSign({
...params,
outerStatus: params.outerStatus || 0,
innerStatus: params.innerStatus || 0,
}).then(res => {
resolve(res.data)
}).catch(err => {
reject(err)
})
})
}
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
/* 提交表单 */
const submitExamine = (id) => {
setid(id)
setIsModalVisible(!Visible)
}
const onFinish = (values: any) => {
values.contractId = id;
const msg = message.loading({
content: '正在操作',
duration: 0,
});
console.log('Success:', values);
PublicApi.postContractCoordinationSubmitExamine(values).then(res => {
console.log(res);
if (res.code === 1000) {
ref.current.reload();
setIsModalVisible(!Visible)
}
}).finally(() => {
msg();
});
};
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: CoordinationSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
)
},
components: {
DateRangePickerUnix,
Submit,
SearchSelect
}
}
}}
/>
</Card>
<Modal footer={null} title="提交审核" visible={Visible} onOk={() => setIsModalVisible(!Visible)} onCancel={() => setIsModalVisible(!Visible)}>
<Form
name="basic"
form={form}
initialValues={{ remember: true }}
onFinish={onFinish}
onFinishFailed={onFinishFailed}
>
<Form.Item name="isPass" label="" rules={[{ required: true, message: '请选择作废日期' }]} initialValue={isPass} >
<Radio.Group onChange={handleIsAllMemberChange}>
<Radio value={1}>通过</Radio>
<Radio value={0}>不通过</Radio>
</Radio.Group>
</Form.Item>
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
</Form.Item>
<Form.Item label='' name="opinion" rules={[{ required: true, message: '审核通过意见' }]}>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} />
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Button onClick={() => setIsModalVisible(!Visible)} style={{ marginRight: 10 }}>取消</Button>
<Button type="primary" htmlType="submit">保存</Button>
</div>
</Form>
</Modal>
</PageHeaderWrapper>
)
}
export default Sign
......@@ -77,17 +77,17 @@ export const columnsList: any = [
export const columnsGetList: any = [
{
title: '竞价单/摘要',
dataIndex: 'demandNO',
dataIndex: 'viePriceNO',
align: 'center',
render: (text, record) =>
<div>
<p> {text}</p>
<p>{record.demandAbstract}</p>
<p>{record.viePriceAbstract}</p>
</div>
},
{
title: '容需求发布时间',
dataIndex: 'demandPublishTime',
dataIndex: 'publishTime',
align: 'center',
},
{
......
This diff is collapsed.
......@@ -59,3 +59,26 @@
margin-left: 19px;
color: #c0c4cc;
}
.select {
position: relative;
}
.select .setBox {
width: 100px;
display: flex;
align-items: center;
position: absolute;
top: 1px;
right: 140px;
}
.select .setBox :global .ant-input-number {
border: none !important;
background: transparent;
}
.select .setBox :global .ant-input:focus,
.select .setBox :global .ant-input-focused {
border: none !important;
background: transparent !important;
}
.select .setBox :global span {
margin-left: 10px;
}
......@@ -8,6 +8,7 @@
.ant-form-item{
margin: 0 !important;
}
}
.listItem {
display: flex;
......@@ -69,3 +70,28 @@
}
}
}
.select{
position: relative;
.setBox{
width: 100px;
display: flex;
align-items: center;
position: absolute;
top: 1px;
right: 140px;
:global {
.ant-input-number{
border: none !important;
background: transparent;
}
.ant-input:focus, .ant-input-focused{
border: none !important;
background: transparent !important;
}
span{
margin-left: 10px;
}
}
}
}
......@@ -96,7 +96,7 @@ const Auction = () => {
render: (_, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => history.push('/memberCenter/contract/manage/add/addList/contracAdd')} >创建采购招标合同</span>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => history.push(`/memberCenter/contract/manage/add/addList/contracAdd?contractId=${record.id}&sourceType=3&sourceId=${record.viePriceId}&sourceNo=${record.viePriceNO}&totalAmount=${record.awardAmount}&partyBMemberId=${record.awardMemberId}&partyBName=${record.awardName}`)}>创建采购竞价合同</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/manage/Auction/details?contractId=${record.id}`)}> 查看 </span>
</div>
)
......
......@@ -92,7 +92,7 @@ const BiddingList = () => {
render: (_, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => history.push('/memberCenter/contract/manage/add/addList/contracAdd')} >创建采购招标合同</span>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => history.push(`/memberCenter/contract/manage/add/addList/contracAdd?contractId=${record.id}&sourceType=2&sourceId=${record.inviteBidId}&sourceNo=${record.inviteBidNO}&totalAmount=${record.bidWinnerAmount}&partyBMemberId=${record.bidWinnerMemberId}&partyBName=${record.bidWinnerName}`)}>创建采购招标合同</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/manage/bidding/details?contractId=${record.id}`)}> 查看 </span>
</div>
)
......
......@@ -20,7 +20,7 @@ const Examine = () => {
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [isPass, setIsAllMember] = useState(1)
const [isPass, setIsAllMember] = useState()
const [form] = Form.useForm();
const [id, setid] = useState("")
//表头
......
......@@ -101,7 +101,7 @@ const PurchaseList = () => {
render: (_, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => history.push('/memberCenter/contract/manage/add/addList/contracAdd')}>创建采购询价合同</span>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => history.push(`/memberCenter/contract/manage/add/addList/contracAdd?contractId=${record.id}&sourceType=1&sourceId=${record.demandId}&sourceNo=${record.demandNO}&totalAmount=${record.awardAmount}&partyBMemberId=${record.awardMemberId}&partyBName=${record.awardName}`)}>创建采购询价合同</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/manage/purchase/details?contractId=${record.id}`)}>查看</span>
</div>
)
......
......@@ -58,7 +58,7 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
shopType: 1,
// priceTypeList: [1]
}
PublicApi.getProductCommodityCommonGetCommodityListBySeller({ ...params, ...data}).then(res => {
PublicApi.getProductCommodityCommonGetCommodityListBySeller({ ...params, ...data }).then(res => {
resolve(res.data)
})
})
......@@ -69,8 +69,6 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
RowCtl.setSelectRow([]);
RowCtl.setSelectedRowKeys([]);
}
console.log(rowSelection, RowCtl)
return (
<Drawer
visible={visible}
......
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