Commit fbd5e49e authored by alwayOnlie's avatar alwayOnlie

合同bug

parent 8ab10058
......@@ -200,6 +200,22 @@ const contracRoute = {
hideInMenu: true,
component: '@/pages/contract/funds/details',
},
{
path: '/memberCenter/contract/funds/levelpayment',
name: '待审核合同(一级)',
component: '@/pages/contract/funds/levelpayment',
},
{
path: '/memberCenter/contract/funds/secondpayment',
name: '待审核合同(二级)',
component: '@/pages/contract/funds/secondpayment',
},
{
path: '/memberCenter/contract/funds/submitpayment',
name: '待提交请款单',
component: '@/pages/contract/funds/submitpayment',
},
],
},
/* 合同协同 */
......
......@@ -12,107 +12,138 @@ 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 moment from 'moment';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { PublicApi } from '@/services/api'
const contractexecutionList = () => {
const ref = useRef<any>({});
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
dataIndex: 'No',
dataIndex: 'contractNo',
align: 'center',
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/contractexecution/contractexecutionList/details?id=${record.id}`}
url={`/memberCenter/contract/contractexecution/contractexecutionList/details?contractId=${record.id}`}
>
{text}
</EyePreview>
<p>{record.name}</p>
<p>{record.contractAbstract}</p>
</div>
}, {
title: '合同生效/失效时间',
dataIndex: 'number',
dataIndex: 'startTime',
align: 'center',
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
</div>
}, {
title: '合同乙方',
dataIndex: 'memberName',
dataIndex: 'partyBName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'time',
dataIndex: 'totalAmount',
align: 'center',
defaultSortOrder: 'descend',
sorter: (a, b) => a.age - b.age,
sorter: (a, b) => a.totalAmount - b.totalAmount,
render: (text) => {
return (
<div>
<p>{text}</p>
</div>
)
}
},
{
title: '已执行金额',
dataIndex: 'Price',
dataIndex: 'executeAmount',
align: 'center',
render: (text) => {
return (
<div>
<p>{text}</p>
</div>
)
}
},
{
title: '已付款',
dataIndex: 'Price',
dataIndex: 'payAmount',
align: 'center',
render: (text) => {
return (
<div>
<p>{text}</p>
</div>
)
}
},
{
title: '已请款待付款',
dataIndex: 'Price',
dataIndex: 'unPayApplyAmount',
align: 'center',
render: (text) => {
return (
<div>
<p>{text}</p>
</div>
)
}
},
{
title: '未请款',
dataIndex: 'Price',
dataIndex: 'unApplyAmount',
align: 'center',
render: (text) => {
return (
<div>
<p>{text}</p>
</div>
)
}
},
{
title: '外部状态',
dataIndex: 'state',
dataIndex: 'outerStatusName',
align: 'center',
render: (record) => {
render: (text) => {
return (
<span style={statuStyle.success}>已完成签约</span>
<span style={statuStyle.success}>{text}</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) => {
params.status = params.status ? params.status : 0;
params.startTime = params.startTime ? moment().format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment().format('YYYY-MM-DD') : '';
params.outerStatus = params.outerStatus ? params.outerStatus : 0
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.getContractExecutePageListByPartyA({
...params,
}).then(res => {
resolve(res.data)
})
})
}
return (
......@@ -133,9 +164,13 @@ const contractexecutionList = () => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractExecuteGetOuterStatusList)
)
},
components: {
DateRangePickerUnix,
......
......@@ -8,12 +8,12 @@ import { OrderTypeMap, PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkSt
export const tableListSchema: ISchema = {
type: 'object',
properties: {
orderNo: {
contractNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入订单编号',
align: 'flex-end',
placeholder: '请输入合同编号',
align: 'start',
},
},
[FORM_FILTER_PATH]: {
......@@ -26,54 +26,26 @@ export const tableListSchema: ISchema = {
}
},
properties: {
orderThe: {
contractAbstract: {
type: 'string',
'x-component-props': {
placeholder: '请输入订单摘要',
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]": {
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
placeholder: ['开始时间', '结束时间'],
},
},
outerStatus: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择外部状态'
},
title: '请选择外部状态',
},
submit: {
'x-component': 'Submit',
......
......@@ -99,7 +99,7 @@ const Sign = () => {
</div>
},
{
title: '外部状态',
title: '外部状态1',
dataIndex: 'outerStatusName',
align: 'center',
render: (text) => {
......@@ -171,12 +171,9 @@ const Sign = () => {
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
fetchOptions(PublicApi.getContractExecuteGetOuterStatusList)
)
},
components: {
DateRangePickerUnix,
......
......@@ -6,7 +6,7 @@ import { OrderTypeMap, PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkSt
* 请款
*/
export const CoordinationSchema: any = {
export const CoordinationSchema: ISchema = {
type: 'object',
properties: {
contractNo: {
......@@ -27,16 +27,10 @@ export const CoordinationSchema: any = {
}
},
properties: {
"contractAbstract": {
contractAbstract: {
type: 'string',
"x-component-props": {
placeholder: '请输入合同摘要'
}
},
"partyAName": {
type: 'string',
"x-component-props": {
placeholder: '请输入合同甲方'
'x-component-props': {
placeholder: '请输入合同摘要',
}
},
"[startTime,endTime]": {
......@@ -44,12 +38,8 @@ export const CoordinationSchema: any = {
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
disabledDate: current => {
// return current && current < moment().startOf('day')
}
},
},
outerStatus: {
type: 'string',
enum: [],
......@@ -58,14 +48,6 @@ export const CoordinationSchema: any = {
},
title: '请选择外部状态',
},
innerStatus: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择内部状态'
},
title: '请选择外部状态',
},
submit: {
'x-component': 'Submit',
'x-component-props': {
......
......@@ -17,11 +17,14 @@ const { TabPane } = Tabs;
const Add: React.FC<{}> = () => {
const currentBasic = useRef<any>({});
const [basic, setbasic] = useState<any>({});
const [flag, setflag] = useState<any>(false)
const [flag, setflag] = useState<any>(false);
const [id, setid] = useState('');
/* 判断是不是手工单 */
const getflag = (flag) => {
setflag(flag)
const getflag = (data) => {
setflag(data.flag)
setid(data.selectRow.id)
console.log(data)
}
const TabList = [
{
......@@ -31,7 +34,7 @@ const Add: React.FC<{}> = () => {
getcontractId={getflag}
/>
},
{ name: '采购物料', components: <InfoTable flag={flag} /> },
{ name: '请款明细', components: <InfoTable flag={flag} id={id} /> },
]
const submit = async () => {
const basicsVO = await currentBasic.current.get();
......
......@@ -92,6 +92,10 @@ const AddInfo = (props: any) => {
title: '合同剩余金额',
dataIndex: 'totalAmount',
align: 'center',
render: (text) =>
<div>
<p>{text}</p>
</div>
},
{
title: '对应单据/寻源类型',
......@@ -136,7 +140,7 @@ const AddInfo = (props: any) => {
// basicsData.applyAmount = res.data.payPlanList[0].applyAmount;
setpayPlanList(res.data.payPlanList)
setInfo(info)
getcontractId(true)
getcontractId({ flag: true, selectRow })
const auth = JSON.parse(localStorage.getItem('auth'));
setaccount(auth.account);
setBasics(basicsData)
......@@ -388,6 +392,7 @@ const AddInfo = (props: any) => {
tableProps={{
rowKey: 'id',
}}
rowKey="id"
columns={columnsList}
currentRef={refs}
rowSelection={rowSelection}
......
......@@ -18,7 +18,7 @@ import { PublicApi } from '@/services/api';
const { Text } = Typography;
const table = (props: any) => {
const { flag } = props;
const { flag, id } = props;
const refs = useRef({});
const [visible, setvisible] = useState<boolean>(false);
const [rowSelection, RowCtl] = useRowSelectionTable({ customKey: 'id', type: 'radio' });
......@@ -105,9 +105,9 @@ const table = (props: any) => {
* @function fetchData 请求表格数据
**/
const fetchData = (params: any) => {
params.applyId = 0;
params.contractId = id;
return new Promise(resolve => {
PublicApi.getContractApplyAmountPageDetailList({ ...params }).then(res => {
PublicApi.getContractApplyAmountContractOrderPageList({ ...params }).then(res => {
console.log(res)
// resolve(res.data)
})
......
......@@ -12,7 +12,7 @@ import { PlusOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api'
const formActions = createFormActions();
import moment from 'moment';
;
const Addbilldetails: React.FC<{}> = () => {
const ref = useRef<any>({});
......
import React, { useState, useRef, ReactNode } from 'react'
import { history, Link } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Anchor, Radio, Steps, Row, Col, Input, message, Modal, Card } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import { SchemaBli } from '../schema';
import EyePreview from '@/components/EyePreview';
import { PublicApi } from '@/services/api'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import moment from 'moment';
const { TextArea } = Input;
const Levelpayment: React.FC<{}> = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [id, setId] = useState('');
const [isModalVisible, setIsModalVisible] = useState(false);
const today = moment(); // 当天日期
const [isAllMember, setIsAllMember] = useState(true)
const [reason, setDatareason] = useState('')
;
//表头
const columns: ColumnType<any>[] = [{
title: '请款单号/摘要',
dataIndex: 'applyNo',
align: 'center',
render: (text: any, record: any) => {
return (
<div>
<EyePreview
type="button"
>
{text}
</EyePreview>
<p>{record.applyAbstract}</p>
</div>
);
},
}, {
title: '单据时间',
align: 'center',
dataIndex: 'orderTime',
}, {
title: '收款方',
align: 'center',
dataIndex: 'payeeMemberName',
},
{
title: '合同编号',
align: 'center',
dataIndex: 'contractNo',
render: (text: any, record: any) => <EyePreview
type="button"
>
{text}
</EyePreview>
},
{
title: '合同总金额',
align: 'center',
dataIndex: 'contractAmount',
render: (text: any, record: any) =>
<span>{text}</span>
},
{
title: '请款金额',
dataIndex: 'applyAmount',
align: 'center',
render: (text: any, record: any) =>
<span>{text}</span>
},
{
title: '内部状态',
dataIndex: 'statusName',
align: 'center',
render: (text: any, record: any) => {
let component: ReactNode = null
component = (
<>
<span style={statuStyle.success}>已完成签约</span>
</>
)
return component
}
}, {
title: '操作',
dataIndex: 'action',
align: 'center',
render: (text: any, record: any) => {
// 作废:待付款、已付款、待提交审核状态的不能作废
return (
<>
{
record.status != 9 || record.status != 7 || record.status != 8 || record.status != 1 && <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => invalid(record.id)}>作废</span>
}
<span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => history.push(`/memberCenter/contract/funds/bill/details?applyId=${record.id}&type=1`)}>查看</span>
</>
)
}
}]
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
const invalid = (id) => {
setId(id)
setIsModalVisible(!isModalVisible)
}
// 模拟请求
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
params.status = params.status ? params.status : 0;
params.startTime = params.startTime ? moment().format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment().format('YYYY-MM-DD') : '';
return new Promise((resolve, reject) => {
PublicApi.getContractApplyAmountPageList({
...params,
}).then(res => {
resolve(res.data)
})
})
}
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 rowSelection: any = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
}
};
/* 作废 */
const oninvalid = () => {
let res_data: any = {
applyId: id,
reason,
}
if (isAllMember) {
const msg = message.loading({
content: '正在操作',
duration: 0,
});
PublicApi.postContractApplyAmountInvalid(res_data).then(res => {
if (res.code === 1000) {
handleCancel()
ref.current.reload();
}
}).finally(() => {
msg();
})
} else {
handleCancel()
}
}
const setreason = (e) => {
setDatareason(e.target.value);
}
const handleCancel = () => {
setIsModalVisible(!isModalVisible);
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: SchemaBli,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"status",
fetchOptions(PublicApi.getContractApplyAmountGetStatusList)
)
},
components: {
DateRangePickerUnix,
Submit,
SearchSelect
}
}
}}
/>
</Card>
<Modal title="单据作废" visible={isModalVisible} onCancel={handleCancel} onOk={oninvalid}>
<Radio.Group onChange={handleIsAllMemberChange} defaultValue={isAllMember} value={isAllMember}>
<Radio value={true}>作废</Radio>
<Radio value={false}>不作废</Radio>
</Radio.Group>
<p style={{ padding: 10, margin: 0 }}>单据作废原因 <span style={{ color: 'red' }}>*</span></p>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} onChange={(e) => setreason(e)} />
</Modal>
</PageHeaderWrapper>
)
}
export default Levelpayment
import React, { useState, useRef, ReactNode } from 'react'
import { history, Link } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Anchor, Radio, Steps, Row, Col, Input, message, Modal, Card } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import { SchemaBli } from '../schema';
import EyePreview from '@/components/EyePreview';
import { PublicApi } from '@/services/api'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import moment from 'moment';
const { TextArea } = Input;
const Secondpayment: React.FC<{}> = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [id, setId] = useState('');
const [isModalVisible, setIsModalVisible] = useState(false);
const today = moment(); // 当天日期
const [isAllMember, setIsAllMember] = useState(true)
const [reason, setDatareason] = useState('')
;
//表头
const columns: ColumnType<any>[] = [{
title: '请款单号/摘要',
dataIndex: 'applyNo',
align: 'center',
render: (text: any, record: any) => {
return (
<div>
<EyePreview
type="button"
>
{text}
</EyePreview>
<p>{record.applyAbstract}</p>
</div>
);
},
}, {
title: '单据时间',
align: 'center',
dataIndex: 'orderTime',
}, {
title: '收款方',
align: 'center',
dataIndex: 'payeeMemberName',
},
{
title: '合同编号',
align: 'center',
dataIndex: 'contractNo',
render: (text: any, record: any) => <EyePreview
type="button"
>
{text}
</EyePreview>
},
{
title: '合同总金额',
align: 'center',
dataIndex: 'contractAmount',
render: (text: any, record: any) =>
<span>{text}</span>
},
{
title: '请款金额',
dataIndex: 'applyAmount',
align: 'center',
render: (text: any, record: any) =>
<span>{text}</span>
},
{
title: '内部状态',
dataIndex: 'statusName',
align: 'center',
render: (text: any, record: any) => {
let component: ReactNode = null
component = (
<>
<span style={statuStyle.success}>已完成签约</span>
</>
)
return component
}
}, {
title: '操作',
dataIndex: 'action',
align: 'center',
render: (text: any, record: any) => {
// 作废:待付款、已付款、待提交审核状态的不能作废
return (
<>
{
record.status != 9 || record.status != 7 || record.status != 8 || record.status != 1 && <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => invalid(record.id)}>作废</span>
}
<span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => history.push(`/memberCenter/contract/funds/bill/details?applyId=${record.id}&type=1`)}>查看</span>
</>
)
}
}]
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
const invalid = (id) => {
setId(id)
setIsModalVisible(!isModalVisible)
}
// 模拟请求
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
params.status = params.status ? params.status : 0;
params.startTime = params.startTime ? moment().format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment().format('YYYY-MM-DD') : '';
return new Promise((resolve, reject) => {
PublicApi.getContractApplyAmountPageList({
...params,
}).then(res => {
resolve(res.data)
})
})
}
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 rowSelection: any = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
}
};
/* 作废 */
const oninvalid = () => {
let res_data: any = {
applyId: id,
reason,
}
if (isAllMember) {
const msg = message.loading({
content: '正在操作',
duration: 0,
});
PublicApi.postContractApplyAmountInvalid(res_data).then(res => {
if (res.code === 1000) {
handleCancel()
ref.current.reload();
}
}).finally(() => {
msg();
})
} else {
handleCancel()
}
}
const setreason = (e) => {
setDatareason(e.target.value);
}
const handleCancel = () => {
setIsModalVisible(!isModalVisible);
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: SchemaBli,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"status",
fetchOptions(PublicApi.getContractApplyAmountGetStatusList)
)
},
components: {
DateRangePickerUnix,
Submit,
SearchSelect
}
}
}}
/>
</Card>
<Modal title="单据作废" visible={isModalVisible} onCancel={handleCancel} onOk={oninvalid}>
<Radio.Group onChange={handleIsAllMemberChange} defaultValue={isAllMember} value={isAllMember}>
<Radio value={true}>作废</Radio>
<Radio value={false}>不作废</Radio>
</Radio.Group>
<p style={{ padding: 10, margin: 0 }}>单据作废原因 <span style={{ color: 'red' }}>*</span></p>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} onChange={(e) => setreason(e)} />
</Modal>
</PageHeaderWrapper>
)
}
export default Secondpayment
import React, { useState, useRef, ReactNode } from 'react'
import { history, Link } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Anchor, Radio, Steps, Row, Col, Input, message, Modal, Card } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import { SchemaBli } from '../schema';
import EyePreview from '@/components/EyePreview';
import { PublicApi } from '@/services/api'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import moment from 'moment';
const { TextArea } = Input;
const Submitpayment: React.FC<{}> = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [id, setId] = useState('');
const [isModalVisible, setIsModalVisible] = useState(false);
const today = moment(); // 当天日期
const [isAllMember, setIsAllMember] = useState(true)
const [reason, setDatareason] = useState('')
;
//表头
const columns: ColumnType<any>[] = [{
title: '请款单号/摘要',
dataIndex: 'applyNo',
align: 'center',
render: (text: any, record: any) => {
return (
<div>
<EyePreview
type="button"
>
{text}
</EyePreview>
<p>{record.applyAbstract}</p>
</div>
);
},
}, {
title: '单据时间',
align: 'center',
dataIndex: 'orderTime',
}, {
title: '收款方',
align: 'center',
dataIndex: 'payeeMemberName',
},
{
title: '合同编号',
align: 'center',
dataIndex: 'contractNo',
render: (text: any, record: any) => <EyePreview
type="button"
>
{text}
</EyePreview>
},
{
title: '合同总金额',
align: 'center',
dataIndex: 'contractAmount',
render: (text: any, record: any) =>
<span>{text}</span>
},
{
title: '请款金额',
dataIndex: 'applyAmount',
align: 'center',
render: (text: any, record: any) =>
<span>{text}</span>
},
{
title: '内部状态',
dataIndex: 'statusName',
align: 'center',
render: (text: any, record: any) => {
let component: ReactNode = null
component = (
<>
<span style={statuStyle.success}>已完成签约</span>
</>
)
return component
}
}, {
title: '操作',
dataIndex: 'action',
align: 'center',
render: (text: any, record: any) => {
// 作废:待付款、已付款、待提交审核状态的不能作废
return (
<>
{
record.status != 9 || record.status != 7 || record.status != 8 || record.status != 1 && <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => invalid(record.id)}>作废</span>
}
<span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => history.push(`/memberCenter/contract/funds/bill/details?applyId=${record.id}&type=1`)}>查看</span>
</>
)
}
}]
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
const invalid = (id) => {
setId(id)
setIsModalVisible(!isModalVisible)
}
// 模拟请求
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
params.status = params.status ? params.status : 0;
params.startTime = params.startTime ? moment().format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment().format('YYYY-MM-DD') : '';
return new Promise((resolve, reject) => {
PublicApi.getContractApplyAmountPageList({
...params,
}).then(res => {
resolve(res.data)
})
})
}
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 rowSelection: any = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
}
};
/* 作废 */
const oninvalid = () => {
let res_data: any = {
applyId: id,
reason,
}
if (isAllMember) {
const msg = message.loading({
content: '正在操作',
duration: 0,
});
PublicApi.postContractApplyAmountInvalid(res_data).then(res => {
if (res.code === 1000) {
handleCancel()
ref.current.reload();
}
}).finally(() => {
msg();
})
} else {
handleCancel()
}
}
const setreason = (e) => {
setDatareason(e.target.value);
}
const handleCancel = () => {
setIsModalVisible(!isModalVisible);
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
ctx: {
inline: false,
schema: SchemaBli,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"status",
fetchOptions(PublicApi.getContractApplyAmountGetStatusList)
)
},
components: {
DateRangePickerUnix,
Submit,
SearchSelect
}
}
}}
/>
</Card>
<Modal title="单据作废" visible={isModalVisible} onCancel={handleCancel} onOk={oninvalid}>
<Radio.Group onChange={handleIsAllMemberChange} defaultValue={isAllMember} value={isAllMember}>
<Radio value={true}>作废</Radio>
<Radio value={false}>不作废</Radio>
</Radio.Group>
<p style={{ padding: 10, margin: 0 }}>单据作废原因 <span style={{ color: 'red' }}>*</span></p>
<TextArea placeholder="在此输入你的原因,最多60个汉字" maxLength={120} onChange={(e) => setreason(e)} />
</Modal>
</PageHeaderWrapper>
)
}
export default Submitpayment
......@@ -12,11 +12,18 @@ 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';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import { history } from 'umi';
import moment from 'moment';
const QueryList = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const getdate = (time) => {
return new Date(Date.parse(time.replace(/-/g, "/"))).getTime() / 1000;
}
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
......@@ -25,7 +32,7 @@ const QueryList = () => {
render: (text, record) =>
<div>
<EyePreview
type="button"
url={`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`}
>
{text}
</EyePreview>
......@@ -35,20 +42,29 @@ const QueryList = () => {
title: '合同生效/失效时间',
dataIndex: 'startTime',
align: 'center',
sorter: {
compare: (a, b) => getdate(a.startTime) - getdate(b.startTime),
multiple: 1,
},
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
<p><PlayCircleOutlined /> &nbsp;{text}</p>
<p><PoweroffOutlined /> &nbsp;{record.endTime}</p>
</div>
}, {
title: '合同乙方',
dataIndex: 'partyBName',
align: 'center',
},
{
title: '合同总金额',
dataIndex: 'totalAmount',
align: 'center',
sorter: {
compare: (a, b) => a.totalAmount - b.totalAmount,
multiple: 1,
},
render: (text) =>
<div>
<p>{text}</p>
......@@ -67,7 +83,8 @@ const QueryList = () => {
return (
<div>
<EyePreview
url={`/memberCenter/contract/manage/QueryList/QueryListdetails`}
type={record.sourceId ? 'link' : 'button'}
url={`/memberCenter/procurementAbility/offter/view?id${record.sourceId}&number${record.sourceNo}`}
>
{text}
</EyePreview>
......@@ -102,7 +119,7 @@ const QueryList = () => {
}, {
title: '操作',
dataIndex: 'state',
align: 'center',
align: 'left',
render: (text, record) => {
return (
<div>
......@@ -110,15 +127,29 @@ const QueryList = () => {
record.outerStatus != 7 ? <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => invalid(record.id)}>作废</span> : <span> </span>
}
{
record.outerStatus == 6 ? <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }}>合同变更</span> : <span> </span>
record.outerStatus == 6 ? <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => like(record)}>合同变更</span> : <span> </span>
}
{/* 已完成签约 */}
{/* url={} */}
<span style={{ color: '#00B37A', cursor: 'pointer', }} onClick={() => history.push(`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.id}`)}>查看</span>
</div>
)
}
}]
const rowSelection: any = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys)
setSelectRow(selectedRows)
}
};
const like = (record) => {
record.sourceId = record.demandId;
record.sourceNo = record.sourceNo;
record.totalAmount = record.totalAmount;
record.partyBMemberId = record.awardMemberId;
record.partyBRoleId = record.awardRoleId;
record.partyBName = record.awardName;
sessionStorage.setItem('record', JSON.stringify(record));
history.push(`/memberCenter/contract/manage/add/addList/contracAdd?contractId=${record.id}&sourceType=1`)
};
const [form] = Form.useForm();
const [id, setId] = useState('');
const [isModalVisible, setIsModalVisible] = useState(false);
......@@ -174,6 +205,7 @@ const QueryList = () => {
rowKey: 'id',
}}
columns={columns}
rowSelection={rowSelection}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
formilyProps={{
......
......@@ -15,10 +15,14 @@ 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';
import { PlusCircleOutlined } from '@ant-design/icons'
import { PlusCircleOutlined, PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import moment from 'moment';
const addList = () => {
const ref = useRef<any>({});
const getdate = (time) => {
return new Date(Date.parse(time.replace(/-/g, "/"))).getTime() / 1000;
}
//表头
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
......@@ -40,13 +44,13 @@ const addList = () => {
dataIndex: 'startTime',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
compare: (a, b) => getdate(a.startTime) - getdate(b.startTime),
multiple: 1,
},
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
<p><PlayCircleOutlined /> &nbsp;{text}</p>
<p><PoweroffOutlined /> &nbsp;{record.endTime}</p>
</div>
}, {
title: '合同乙方',
......@@ -58,7 +62,7 @@ const addList = () => {
dataIndex: 'totalAmount',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
compare: (a, b) => a.totalAmount - b.totalAmount,
multiple: 1,
},
render: (text) =>
......@@ -70,11 +74,6 @@ const addList = () => {
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
filters: [
{ text: '采购询价', value: 1 },
{ text: '采购招标', value: 2 },
{ text: '采购竞价', value: 3 },
],
render: (text, record) => {
let sourceTypeList = [
"",
......@@ -98,10 +97,10 @@ const addList = () => {
title: '外部状态',
dataIndex: 'outerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
// filters: [
// { text: 'Joe', value: 'Joe' },
// { text: 'Jim', value: 'Jim' },
// ],
render: (text, record) => {
return (
<StatusTag type="warning" title={record.outerStatusName} />
......@@ -112,10 +111,10 @@ const addList = () => {
title: '内部状态',
dataIndex: 'innerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
// filters: [
// { text: 'Joe', value: 'Joe' },
// { text: 'Jim', value: 'Jim' },
// ],
render: (text, record) => {
return (
......@@ -144,7 +143,6 @@ const addList = () => {
record.innerStatus == '1' ? <span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }}>删除</span> : ''
}
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submit(record.id)}>提交</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }}>修改</span>
</div >
)
}
......@@ -166,6 +164,8 @@ const addList = () => {
// 列表数据
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.getContractManagePageToBeAdd({
...params,
......
......@@ -232,6 +232,11 @@ const FormList = (props: any) => {
price: item.taxUnitPrice,
bidCount: item.awardCount,
bidAmount: item.awardPrice,
associatedDataId: item.productId,
associatedMaterielNo: item.number,
associatedMaterielName: item.name,
associatedGoods: item.productName
}
})
setData(data)
......@@ -265,8 +270,10 @@ 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 : '',
associatedMaterielName: item.associatedMaterielName ? item.associatedMaterielName : '',
associatedGoods: item.associatedGoods ? item.associatedGoods : '',
associatedDataId: item.associatedDataId ? item.associatedDataId : '',
associatedMaterielNo: item.associatedMaterielNo ? item.associatedMaterielNo : '',
associatedType: item.type ? item.type : '',
associatedCategory: item.customerCategory != null ? item.customerCategory.name : '',
associatedBrand: item.brand != null ? item.brand.name : '',
......@@ -292,8 +299,8 @@ const FormList = (props: any) => {
<p>报价商品</p>
</div>
<div className={styles.text}>
<p>商品ID:{record.customerCategory.id}</p>
<p>商品名称:{record.name}</p>
<p>商品ID:{record.associatedDataId}</p>
<p>商品名称:{record.associatedMaterielName}</p>
</div>
<div className={styles.text}>
<p>规格:{record.type}</p>
......
......@@ -92,7 +92,7 @@ const Information = (props: any) => {
/* 获取传入组建的值 */
useEffect(() => {
basicsVO.contractNo = basicsVO.contractNo ? basicsVO.contractNo : '';
basicsVO.sourceType = Row.sourceType ? Row.sourceType : '1';
basicsVO.sourceType = Row.sourceType ? Row.sourceType + '' : '1';
basicsVO.contractId = Row.contractId ? Row.contractId : 0;
basicsVO.partyBName = Row.partyBName ? Row.partyBName : '';
basicsVO.sourceNo = Row.sourceNo ? Row.sourceNo : '';
......
.anchorWrap :global .ant-anchor {
display: flex;
align-items: center;
}
.anchorWrap :global .ant-anchor .ant-anchor-ink {
display: none;
......
......@@ -2,6 +2,7 @@
:global {
.ant-anchor {
display: flex;
align-items: center;
.ant-anchor-ink {
display: none;
}
......
import React, { useEffect, useState, useRef } from 'react';
import { Anchor, Radio, Steps, Row, Col, Table, Space, Typography } from 'antd';
import { Anchor, Radio, Steps, Row, Col, Form, Input, Table, message, Space, Typography, Button, Modal } from 'antd';
import style from './index.less';
import { ArrowLeftOutlined } from '@ant-design/icons';
import { StandardTable } from 'god';
......@@ -12,6 +12,7 @@ import {
FileWordFilled
} from '@ant-design/icons'
const { TextArea } = Input;
const { Link } = Anchor;
const { Step } = Steps;
......@@ -20,9 +21,11 @@ const activeAnchorClassName = 'ant-anchor-link-active'
const Details = (props: any) => {
/* 合同id */
const { location: { query: { contractId } } } = props;
const { location: { query: { contractId, type } } } = props;
const ref = useRef({});
const [currLink, setCurrLink] = useState(activeAnchorClassName)
const [form] = Form.useForm();
const [isPass, setIsAllMember] = useState()
/**
* 渲染信息
* @param basics 基础信息
......@@ -47,7 +50,8 @@ const Details = (props: any) => {
const [outerTaskStepList, setouterTaskStepList] = useState<any>([])
const [innerTaskStepList, setinnerTaskStepList] = useState<any>([]);
const [currentBatch, setCurrentBatch] = useState('1');
const [listIndex, setlistIndex] = useState('1');;
const [listIndex, setlistIndex] = useState('1');
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [ListData, setListData] = useState<any>([])
const [payPlanList, setpayPlanList] = useState<any>([])
const [contractText, setcontractText] = useState<any>([])
......@@ -99,6 +103,9 @@ const Details = (props: any) => {
}
})
}
const onDownload = (file: any) => {
window.location.href = `/api/contract/contractTemplate/downloadContract?contractName=${file.contractName}&contractUrl=${file.contractUrl}`
}
/**
* 流转进度点击
*/
......@@ -244,7 +251,37 @@ const Details = (props: any) => {
{ title: '操作时间', dataIndex: 'operateTime', align: 'center', },
{ title: '审核意见', dataIndex: 'opinion', align: 'center', },
]
/* 提交 */
const onFinish = (values: any) => {
let fn;
switch (type) {
case 'examine':
fn = PublicApi.postContractManageSubmitExamine
break;
}
values.contractId = contractId;
const msg = message.loading({
content: '正在操作',
duration: 0,
});
console.log('Success:', values);
fn(values).then(res => {
console.log(res);
if (res.code === 1000) {
history.goBack()
setIsModalVisible(!Visible)
}
}).finally(() => {
msg();
});
};
/* 选中的值 */
const handleIsAllMemberChange = (v: any) => {
setIsAllMember(v.target.value)
}
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
return (
<div className={style.anchorWrap}>
<Anchor
......@@ -261,8 +298,10 @@ const Details = (props: any) => {
}}
>
<ArrowLeftOutlined
onClick={() => history.goBack()}
style={{
fontSize: '14px',
cursor: 'pointer',
color: '#909399',
}}
/>
......@@ -272,6 +311,7 @@ const Details = (props: any) => {
color: '#303133',
fontWeight: 500,
marginLeft: '8px',
}}
>
{contractAbstract}
......@@ -286,6 +326,12 @@ const Details = (props: any) => {
</div>
</div>
<div>
{
type && <Button type="primary" style={{ width: 80, marginRight: 16 }} onClick={() => setIsModalVisible(!Visible)}>审核 </Button>
}
</div>
</Anchor>
<div id='content' className={style.card}>
{/* 流转进度 */}
......@@ -447,7 +493,7 @@ const Details = (props: any) => {
<div className='ant-card-head-wrapper'>
电子合同
</div>
<div className={style.upload_left} style={{ width: 600 }}>
<div className={style.upload_left} onClick={() => onDownload(contractText)} style={{ width: 600, cursor: 'pointer' }}>
<FileWordFilled />
<span>{contractText.contractName}.pdf</span>
</div>
......@@ -481,6 +527,32 @@ const Details = (props: any) => {
</div>
</div>
</div>
<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>
</div>
)
}
......
......@@ -14,6 +14,7 @@ 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';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
const { TextArea } = Input;
const Examine = () => {
const ref = useRef<any>({});
......@@ -23,6 +24,9 @@ const Examine = () => {
const [isPass, setIsAllMember] = useState()
const [form] = Form.useForm();
const [id, setid] = useState("")
const getdate = (time) => {
return new Date(Date.parse(time.replace(/-/g, "/"))).getTime() / 1000;
}
//表头
const columns: ColumnType<any>[] = [{
title: '合同编号/摘要',
......@@ -31,7 +35,7 @@ const Examine = () => {
render: (text, record) =>
<div>
<EyePreview
type="button"
url={`/memberCenter/contract/manage/examine/details?contractId=${record.id}&type=examine`}
>
{text}
</EyePreview>
......@@ -42,13 +46,13 @@ const Examine = () => {
dataIndex: 'startTime',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
compare: (a, b) => getdate(a.startTime) - getdate(b.startTime),
multiple: 1,
},
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
<p><PlayCircleOutlined /> &nbsp;{text}</p>
<p><PoweroffOutlined /> &nbsp;{record.endTime}</p>
</div>
}, {
title: '合同乙方',
......@@ -60,7 +64,7 @@ const Examine = () => {
dataIndex: 'totalAmount',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
compare: (a, b) => a.totalAmount - b.totalAmount,
multiple: 1,
},
render: (text) =>
......@@ -72,11 +76,6 @@ const Examine = () => {
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
filters: [
{ text: '采购询价', value: 1 },
{ text: '采购招标', value: 2 },
{ text: '采购竞价', value: 3 },
],
render: (text, record) => {
let sourceTypeList = [
"",
......@@ -86,7 +85,8 @@ const Examine = () => {
return (
<div>
<EyePreview
type="button"
type={record.sourceId ? 'link' : 'button'}
url={`/memberCenter/procurementAbility/offter/view?id${record.sourceId}&number${record.sourceNo}`}
>
{text}
</EyePreview>
......@@ -100,10 +100,6 @@ const Examine = () => {
title: '外部状态',
dataIndex: 'outerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<StatusTag type="warning" title={record.outerStatusName} />
......@@ -114,12 +110,7 @@ const Examine = () => {
title: '内部状态',
dataIndex: 'innerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<div>
<span style={statuStyle.point}> </span>
......@@ -134,10 +125,8 @@ const Examine = () => {
render: (text, record) => {
return (
<div>
{/* /memberCenter/contract/manage/examine/details */}
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>提交审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }}>查看</span>
</div >
</div>
)
}
}]
......
......@@ -13,12 +13,15 @@ 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';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
const { TextArea } = Input;
const Levelexamine = () => {
const ref = useRef<any>({});
const getdate = (time) => {
return new Date(Date.parse(time.replace(/-/g, "/"))).getTime() / 1000;
}
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [Visible, setIsModalVisible] = useState<boolean>(false)
const [id, setid] = useState("")
......@@ -33,7 +36,7 @@ const Levelexamine = () => {
render: (text, record) =>
<div>
<EyePreview
type="button"
url={`/memberCenter/contract/manage/levelexamine/details?contractId=${record.id}&type=levelexamine`}
>
{text}
</EyePreview>
......@@ -44,13 +47,13 @@ const Levelexamine = () => {
dataIndex: 'startTime',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
multiple: 1,
compare: (a, b) => getdate(a.startTime) - getdate(b.startTime),
multiple: 2,
},
render: (text, record) =>
<div>
<p>{text}</p>
<p>{record.endTime}</p>
<p><PlayCircleOutlined /> &nbsp;{text}</p>
<p><PoweroffOutlined /> &nbsp;{record.endTime}</p>
</div>
}, {
title: '合同乙方',
......@@ -62,7 +65,7 @@ const Levelexamine = () => {
dataIndex: 'totalAmount',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
compare: (a, b) => a.totalAmount - b.totalAmount,
multiple: 1,
},
render: (text) =>
......@@ -74,11 +77,6 @@ const Levelexamine = () => {
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
filters: [
{ text: '采购询价', value: 1 },
{ text: '采购招标', value: 2 },
{ text: '采购竞价', value: 3 },
],
render: (text, record) => {
let sourceTypeList = [
"",
......@@ -102,10 +100,6 @@ const Levelexamine = () => {
title: '外部状态',
dataIndex: 'outerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
<StatusTag type="warning" title={record.outerStatusName} />
......@@ -116,10 +110,6 @@ const Levelexamine = () => {
title: '内部状态',
dataIndex: 'innerStatus',
align: 'center',
filters: [
{ text: 'Joe', value: 'Joe' },
{ text: 'Jim', value: 'Jim' },
],
render: (text, record) => {
return (
......@@ -136,8 +126,7 @@ const Levelexamine = () => {
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>提交审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer', }}>查看</span>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>审核</span>
</div>
)
}
......
......@@ -37,7 +37,7 @@ const PurchaseList = () => {
dataIndex: 'demandPublishTime',
align: 'center',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
compare: (a, b) => getdate(a.demandPublishTime) - getdate(b.demandPublishTime),
multiple: 1,
},
}, {
......@@ -50,7 +50,7 @@ const PurchaseList = () => {
dataIndex: 'awardTime',
align: 'center',
sorter: {
compare: (a, b) => a.awardTime - b.awardTime,
compare: (a, b) => getdate(a.awardTime) - getdate(b.awardTime),
multiple: 1,
},
},
......@@ -114,6 +114,9 @@ const PurchaseList = () => {
setSelectRow(selectedRows)
}
};
const getdate = (time) => {
return new Date(Date.parse(time.replace(/-/g, "/"))).getTime() / 1000;
}
const like = (record) => {
record.sourceId = record.demandId;
......
......@@ -385,7 +385,7 @@ export const addListSchema: ISchema = {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入订单编号',
placeholder: '请输入合同编号',
align: 'flex-end',
},
},
......
......@@ -250,7 +250,7 @@ const Signacontract = () => {
<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: '审核通过意见' }]}>
......
......@@ -126,7 +126,8 @@ const AddContract: React.FC<parmas> = (props) => {
/**下载 */
const onDownload = (file: any) => {
window.location.href = `/api/order/contractTemplate/downloadContract?contractName=${file.contractName}&contractUrl=${file.contractUrl}`
// contract/contractTemplate/downloadContract
window.location.href = `/api/contract/contractTemplate/downloadContract?contractName=${file.contractName}&contractUrl=${file.contractUrl}`
}
/**预览 */
const onView = async (file: any) => {
......
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