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

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

parents 2ba6b291 f17bb622
......@@ -198,7 +198,7 @@ const contracRoute = {
path: '/memberCenter/contract/funds/addbill/Details',
name: '待新增请款单',
hideInMenu: true,
component: '@/pages/contract/funds/addbill/Details',
component: '@/pages/contract/funds/details',
},
],
},
......
......@@ -344,8 +344,8 @@ const Details = (props: any) => {
}
/** 确定关联商品 */
const handleConfirm = (params: any) => {
console.log(params, 10086, index, ListData[index])
const data = [...ListData];
data[index].associatedCategory = params.product.customerCategoryName;
data[index].associatedBrand = params.product.brandName;
data[index].associatedGoods = params.product.name;
......@@ -366,6 +366,7 @@ const Details = (props: any) => {
associatedCategory,
associatedBrand
}
console.log(params, 10086, res_data)
const msg = message.loading({
content: '正在操作',
duration: 0,
......
......@@ -221,7 +221,7 @@ const pageToBeSubmitExamine = () => {
<Radio value={0}>不通过</Radio>
</Radio.Group>
</Form.Item>
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请选择作废日期' }]}>
<Form.Item label={isPass ? '审核通过原因' : '审不核通过原因'} rules={[{ required: true, message: '请输入原因' }]}>
</Form.Item>
<Form.Item label='' name="opinion" rules={[{ required: true, message: '审核通过意见' }]}>
......
import React, { useState, useRef, ReactNode } from 'react'
import { history, Link } from 'umi';
import React, { useState, useRef } from 'react'
import { history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Tabs } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { Card, Tabs, Button } from 'antd';
import { createFormActions } from '@formily/antd';
import EyePreview from '@/components/EyePreview';
import {
SaveOutlined,
} from '@ant-design/icons'
import ReutrnEle from '@/components/ReturnEle';
import AddInfo from './components/info'
import InfoTable from './components/table'
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
const { TabPane } = Tabs;
const Add: React.FC<{}> = () => {
const currentBasic = useRef<any>({});
const [basic, setbasic] = useState<any>({});
const [flag, setflag] = useState<any>(false)
/* 判断是不是手工单 */
const getflag = (flag) => {
setflag(flag)
}
const TabList = [
{ name: '基本信息', components: <AddInfo /> },
{ name: '采购物料', components: <InfoTable /> },
{
name: '基本信息', components:
<AddInfo
currentRef={currentBasic}
getcontractId={getflag}
/>
},
{ name: '采购物料', components: <InfoTable flag={flag} /> },
]
const submit = async () => {
const basicsVO = await currentBasic.current.get();
console.log(basicsVO)
let data = {
basics: basicsVO.data,
detailList: []
}
PublicApi.postContractApplyAmountSave(data).then(res => {
console.log(res);
})
}
return (
<PageHeaderWrapper
title="新建请款单"
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
extra={[
<Button key="1" type="primary" icon={<SaveOutlined />} onClick={() => submit()} > 保存</Button>
]}
>
<Card>
<Tabs defaultActiveKey="0" type="card" size="small">
......
import React, { useState } from 'react';
import { Button, Table, Input, Space, Typography } from 'antd'
import React, { useState, useRef } from 'react';
import { Button, Table, Input, Space, Drawer, Typography } from 'antd'
import styles from './index.less'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { StandardTable } from 'god';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { Schema } from "./schema"
import {
PlusOutlined
} from '@ant-design/icons'
import { PublicApi } from '@/services/api';
const { Text } = Typography;
const table: React.FC<{}> = () => {
const table = (props: any) => {
const { flag } = props;
const refs = useRef({});
const [visible, setvisible] = useState<boolean>(false);
const [rowSelection, RowCtl] = useRowSelectionTable({ customKey: 'id', type: 'radio' });
const tabcolumns: any = [
{
title: '单据号/摘要', dataIndex: 'payNum', align: 'center',
......@@ -83,12 +97,34 @@ const table: React.FC<{}> = () => {
payParam: '',
},
]);
const columnsList: any = [
]
/***
* @function fetchData 请求表格数据
**/
const fetchData = (params: any) => {
params.applyId = 0;
return new Promise(resolve => {
PublicApi.getContractApplyAmountPageDetailList({ ...params }).then(res => {
console.log(res)
// resolve(res.data)
})
})
}
const Confirm = () => {
}
return (
<div className="table">
<div style={{ padding: 15, }} >
<Button block type='dashed'><PlusOutlined />选择待请款单据</Button>
</div>
{
flag && <div style={{ padding: 15, }} onClick={() => setvisible(!visible)} >
<Button block type='dashed'><PlusOutlined />选择待请款单据</Button>
</div>
}
<Table
columns={tabcolumns}
dataSource={PlanList}
......@@ -99,6 +135,56 @@ const table: React.FC<{}> = () => {
pagination={false}
/>
{/* 选择弹出内容 */}
<Drawer
visible={visible}
onClose={() => setvisible(!visible)}
title="选择采购合同"
width={900}
footer={
<div
style={{
textAlign: 'right',
}}
>
<Button onClick={() => setvisible(!visible)} style={{ marginRight: 8 }}>
取消
</Button>
<Button type="primary" onClick={() => Confirm()} >
确定
</Button>
</div>
}
destroyOnClose
>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columnsList}
currentRef={refs}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: Schema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
}
}}
/>
</Drawer>
</div>
)
}
......
......@@ -46,7 +46,7 @@ const FormList = (props: any) => {
{
title: '品牌', dataIndex: 'brand', align: 'center',
render: (text, item) =>
<p>{item.brand ? item.brand.name : ''}</p>
<span>{item.brand ? item.brand.name : ''}</span>
},
{ title: '单位', dataIndex: 'unitName', align: 'center', },
{
......@@ -218,7 +218,24 @@ const FormList = (props: any) => {
}
PublicApi.getPurchaseQuotedPriceProductlistListContract(parmas).then(res => {
console.log(res);
// setData(res.data.data)
let data = res.data.data.map(item => {
return {
code: item.number, // 物料编号
name: item.name,
type: item.model,
customerCategory: { name: item.category, id: item.goodsId },
brand: { name: item.brand },
unitName: item.unit,
purchaseCount: item.purchaseCount,
isHasTax: item.isTax,
taxRate: item.taxProbability,
price: item.taxUnitPrice,
bidCount: item.awardCount,
bidAmount: item.awardPrice,
}
})
setData(data)
// console.log(data)
})
}
......@@ -248,6 +265,11 @@ const FormList = (props: any) => {
price: Number(item.price),
bidCount: item.bidCount,
bidAmount: item.bidCount && item.price ? Number(item.bidCount) * Number(item.price) : '',
associatedMaterielNo: item.id ? item.id : '',
associatedMaterielName: item.name ? item.name : '',
associatedType: item.type ? item.type : '',
associatedCategory: item.customerCategory != null ? item.customerCategory.name : '',
associatedBrand: item.brand != null ? item.brand.name : '',
})
})
resolve({
......@@ -295,7 +317,7 @@ const FormList = (props: any) => {
rowKey="id"
columns={columnsTab}
expandable={{
expandedRowRender: record => listItem(record),
expandedRowRender: record => Object.keys(Row).length === 0 ? null : listItem(record),
}}
dataSource={data}
style={{
......
......@@ -6,6 +6,7 @@ import FormList from './components/FormList'
import Fromtable from './components/fromtable'
import ContractText from './components/contractText'
import { PublicApi } from '@/services/api';
import { history } from 'umi'
import {
SaveOutlined,
} from '@ant-design/icons'
......@@ -99,12 +100,13 @@ const Add: React.FC<{}> = (props: any) => {
}
console.log(param)
PublicApi.postContractManageSave(param).then((res => {
console.log('====================================');
console.log(res);
console.log('====================================');
if (res.code === 1000) {
setTimeout(() => {
history.push('/memberCenter/contract/manage/add/addList')
}, 1000)
}
}))
}
useEffect(() => {
if (sourceType) {
setRow(JSON.parse(sessionStorage.getItem('record')))
......
......@@ -73,11 +73,18 @@
.select .setBox :global .ant-input-number {
border: none !important;
background: transparent;
box-shadow: none !important;
}
.select .setBox :global .select .ant-input-number:focus {
border: none !important;
background: transparent !important;
box-shadow: none !important;
}
.select .setBox :global .ant-input:focus,
.select .setBox :global .ant-input-focused {
border: none !important;
background: transparent !important;
box-shadow: none !important;
}
.select .setBox :global span {
margin-left: 10px;
......
......@@ -81,12 +81,21 @@
right: 140px;
:global {
.ant-input-number{
border: none !important;
border: none !important;
background: transparent;
}
box-shadow:none !important;
}
.select{
.ant-input-number:focus{
border: none !important;
background: transparent !important;
box-shadow:none !important;
}
}
.ant-input:focus, .ant-input-focused{
border: none !important;
background: transparent !important;
box-shadow:none !important;
}
span{
margin-left: 10px;
......
......@@ -54,6 +54,9 @@ const Details = (props: any) => {
const [associatedCategory, setassociatedCategory] = useState<string>('')
const [targetOffset, setTargetOffset] = useState<number | undefined>(undefined);
const [contractAbstract, setcontractAbstract] = useState('');
/* 总金额 */
const [tobidCount, settobidCount] = useState<number>(0);
const [bidAmount, setbidAmount] = useState<number>(0);
const [tabPane] = useState([
{ id: 'progress', title: '流转进度' },
{ id: 'process', title: '基本流程' },
......@@ -141,19 +144,21 @@ const Details = (props: any) => {
{ title: '单价(含税)', dataIndex: 'price', align: 'center', },
{
dataIndex: 'bidCount', align: 'center',
title: (
<Space direction='vertical'>
<Text>授标数量</Text>
<Text>合计: ¥156.000.00</Text>
</Space>
),
title: (item) => {
return (
<Space direction='vertical'>
<Text>授标数量</Text>
<Text>合计: ¥{tobidCount}</Text>
</Space>
)
}
},
{
dataIndex: 'bidAmount', align: 'center',
title: (
<Space direction='vertical'>
<Text>金额(不含税)</Text>
<Text>合计: ¥156.000.00</Text>
<Text>合计: ¥{bidAmount}</Text>
</Space>
),
},
......@@ -163,6 +168,15 @@ const Details = (props: any) => {
...params,
contractId
}).then(res => {
// bidCount
let tobidCount = 0;
let bidAmount = 0;
res.data.data.map(item => {
tobidCount += item.bidCount;
bidAmount += item.bidAmount;
})
settobidCount(tobidCount)
setbidAmount(bidAmount)
setListData(res.data.data)
setassociatedCategory(res.data.data[0].setassociatedCategory)
})
......
......@@ -31,7 +31,7 @@ const Examine = () => {
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`}
type="button"
>
{text}
</EyePreview>
......@@ -136,7 +136,7 @@ const Examine = () => {
<div>
{/* /memberCenter/contract/manage/examine/details */}
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>提交审核</span>
<span style={{ color: '#00B37A' }}>查看</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }}>查看</span>
</div >
)
}
......
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space, Button } from 'antd';
import { Card, Space, Button, Modal, Radio, Input, Form, message } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
......@@ -14,10 +14,17 @@ import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
const { TextArea } = Input;
const Levelexamine = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [isPass, setIsAllMember] = useState()
const [form] = Form.useForm();
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
......@@ -26,7 +33,7 @@ const Levelexamine = () => {
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`}
type="button"
>
{text}
</EyePreview>
......@@ -81,7 +88,7 @@ const Levelexamine = () => {
return (
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails`}
type="button"
>
{text}
</EyePreview>
......@@ -129,12 +136,40 @@ const Levelexamine = () => {
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A' }}>提交审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>提交审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer', }}>查看</span>
</div>
)
}
}]
/* 提交表单 */
const submitExamine = (id) => {
setid(id)
setIsModalVisible(!Visible)
}
const onFinish = (values: any) => {
values.contractId = id;
const msg = message.loading({
content: '正在操作',
duration: 0,
});
PublicApi.postContractManageExamineStepOne(values).then(res => {
console.log(res);
if (res.code === 1000) {
ref.current.reload();
setIsModalVisible(!Visible)
}
}).finally(() => {
msg();
});
};
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
// 列表数据
const fetchData = (params?: any) => {
......@@ -157,48 +192,76 @@ const Levelexamine = () => {
};
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,
);
<PageHeaderWrapper>
<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
}
},
components: {
DateRangePickerUnix,
Submit
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button >批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button >批量提交审核</Button>
}}
/>
</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: '请选择作废日期' }]}>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</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>
)
}
......
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space, Button } from 'antd';
import { Card, Space, Button, Modal, Radio, Input, Form, message } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
......@@ -13,11 +13,16 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
const { TextArea } = Input;
const Secondaryexamine = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [isPass, setIsAllMember] = useState()
const [form] = Form.useForm();
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
......@@ -129,12 +134,41 @@ const Secondaryexamine = () => {
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A' }}>提交审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>提交审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer', }}>查看</span>
</div>
)
}
}]
/* 提交表单 */
const submitExamine = (id) => {
setid(id)
setIsModalVisible(!Visible)
}
const onFinish = (values: any) => {
values.contractId = id;
const msg = message.loading({
content: '正在操作',
duration: 0,
});
PublicApi.postContractManageExamineStepTwo(values).then(res => {
console.log(res);
if (res.code === 1000) {
ref.current.reload();
setIsModalVisible(!Visible)
}
}).finally(() => {
msg();
});
};
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
// 列表数据
const fetchData = (params?: any) => {
......@@ -157,48 +191,76 @@ const Secondaryexamine = () => {
};
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,
);
<PageHeaderWrapper>
<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
}
},
components: {
DateRangePickerUnix,
Submit
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button >批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button >批量提交审核</Button>
}}
/>
</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: '请选择作废日期' }]}>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</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 >
)
}
......
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space, Button } from 'antd';
import { Card, Space, Button, Modal, Radio, Input, Form, message } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
......@@ -14,10 +14,16 @@ import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
const { TextArea } = Input;
const Signacontract = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
const [isPass, setIsAllMember] = useState()
const [form] = Form.useForm();
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
......@@ -129,7 +135,8 @@ const Signacontract = () => {
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A' }}>提交审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>签订合同</span>
{/* <span style={{ color: '#00B37A', cursor: 'pointer', }}></span> */}
</div>
)
}
......@@ -156,49 +163,106 @@ const Signacontract = () => {
}
};
/* 提交表单 */
const submitExamine = (id) => {
setid(id)
setIsModalVisible(!Visible)
}
const onFinish = (values: any) => {
values.contractId = id;
const msg = message.loading({
content: '正在操作',
duration: 0,
});
PublicApi.postContractManageSign(values).then(res => {
console.log(res);
if (res.code === 1000) {
ref.current.reload();
setIsModalVisible(!Visible)
}
}).finally(() => {
msg();
});
};
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
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,
);
<PageHeaderWrapper>
<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
}
},
components: {
DateRangePickerUnix,
Submit
layouts: {
order: 2,
span: 24
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button >批量提交审核</Button>
}}
formilyChilds={{
children: <Space>
<Button >批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</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: '请选择作废日期' }]}>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</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>
)
}
......
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