Commit eab76d4b authored by Bill's avatar Bill

refactor: 重构加工模块

parent 164db64d
......@@ -27,22 +27,23 @@ const HandlingRoute = {
path: '/memberCenter/handling/assign/query',
name: '指派生产通知单查询',
icon: 'smile',
component: '@/pages/handling/components/Query',
component: '@/pages/handling/assign/allQuery',
},
// // 指派生产通知单 -> 详情
{
path: '/memberCenter/handling/assign/query/detail',
name: '详情',
icon: 'smile',
component: '@/pages/handling/assign/detail',
hideInMenu: true
component: '@/pages/handling/assign/allQuery/detail',
hideInMenu: true,
noMargin: true,
},
// 指派生产通知单 -> 待新增生产通知单
{
path: '/memberCenter/handling/assign/tobeAddQuery',
name: '待新增生产通知单',
icon: 'smile',
component: '@/pages/handling/components/Query'
component: '@/pages/handling/assign/tobeAddQuery'
},
// 指派生产通知单 -> 新增成产通知单(新建)
{
......@@ -73,7 +74,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/assign/pendingFirst',
name: '待审核通知单(一级)',
icon: 'smile',
component: '@/pages/handling/components/Query'
component: '@/pages/handling/assign/tobeReviewI'
},
{
path: '/memberCenter/handling/assign/pendingFirst/detail',
......@@ -87,7 +88,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/assign/pendingSecond',
name: '待审核通知单(二级)',
icon: 'smile',
component: '@/pages/handling/components/Query'
component: '@/pages/handling/assign/tobeReviewII'
},
{
path: '/memberCenter/handling/assign/pendingSecond/detail',
......@@ -101,7 +102,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/assign/pendingSubmit',
name: '待提交生产通知单',
icon: 'smile',
component: '@/pages/handling/components/Query'
component: '@/pages/handling/assign/tobeSubmit'
},
// 指派生产通知单 -> 待提交生产通知单 详情
{
......@@ -116,7 +117,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/assign/pendingAddProcessing',
name: '待新增加工入库单',
icon: 'smile',
component: '@/pages/handling/assign/processStock',
component: '@/pages/handling/assign/tobeAddStock',
// hideInMenu: true
},
{
......@@ -131,7 +132,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/assign/pendingReceive',
name: '待收货生产通知单',
icon: 'smile',
component: '@/pages/handling/assign/processStock'
component: '@/pages/handling/assign/tobeReceive'
},
// 指派生产通知单 -> 待收货生产通知单
{
......@@ -154,7 +155,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/confirm/query',
name: '生产通知单',
icon: 'smile',
component: '@/pages/handling/confirm/Query',
component: '@/pages/handling/confirm/allQuery',
},
{
path: '/memberCenter/handling/confirm/query/detail',
......@@ -168,7 +169,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/confirm/pendingSubmit',
name: '待提交生产通知单',
icon: 'smile',
component: '@/pages/handling/confirm/Query'
component: '@/pages/handling/confirm/pendingSubmit'
},
// // 确认生产通知单 -> 待提交生产通知单详情
{
......@@ -183,7 +184,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/confirm/pendingFirst',
name: '待审核通知单(一级)',
icon: 'smile',
component: '@/pages/handling/confirm/Query'
component: '@/pages/handling/confirm/pendingLevelI'
},
{
path: '/memberCenter/handling/confirm/pendingFirst/detail',
......@@ -197,7 +198,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/confirm/pendingSecond',
name: '待审核通知单(二级)',
icon: 'smile',
component: '@/pages/handling/confirm/Query'
component: '@/pages/handling/confirm/pendingLevelII'
},
{
path: '/memberCenter/handling/confirm/pendingSecond/detail',
......@@ -211,7 +212,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/confirm/pendingConfirm',
name: '待确认生产通知单',
icon: 'smile',
component: '@/pages/handling/confirm/Query',
component: '@/pages/handling/confirm/pendingConfirm',
},
// // 确认生产通知单 -> 待确认生产通知单详情
{
......@@ -226,7 +227,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/confirm/processingInvoiceTobeAdd',
name: '待新增加工发货单',
icon: 'smile',
component: '@/pages/handling/assign/processStock',
component: '@/pages/handling/confirm/processingInvoiceTobeAdd',
},
// 待确认生产通知单 -> 待新增加工发货单详情
{
......@@ -241,7 +242,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/confirm/pendingAddLogistics',
name: '待新增物流单',
icon: 'smile',
component: '@/pages/handling/assign/processStock',
component: '@/pages/handling/confirm/pendingAddLogistics',
},
{
path: '/memberCenter/handling/confirm/pendingAddLogistics/detail',
......@@ -255,7 +256,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/confirm/pendingDelivered',
name: '待发货生产通知单',
icon: 'smile',
component: '@/pages/handling/assign/processStock',
component: '@/pages/handling/confirm/pendingDelivered',
},
{
path: '/memberCenter/handling/confirm/pendingDelivered/detail',
......@@ -269,7 +270,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/confirm/pendingReceipt',
name: '待确认回单生产通知单',
icon: 'smile',
component: '@/pages/handling/assign/processStock'
component: '@/pages/handling/confirm/pendingReceipt'
},
// 确认生产通知单 -> 待确认回单生产通知单
{
......
......@@ -58,13 +58,13 @@ const memberCenterRoute = {
noMargin: true,
name: '修改个人信息'
},
// {
// path: `/memberCenter/home`,
// name: 'home',
// icon: 'home',
// key: 'home',
// component: '@/pages/home',
// },
{
path: `/memberCenter/home`,
name: 'home',
icon: 'home',
key: 'home',
component: '@/pages/home',
},
// ShopRoute,
// CommodityRoute,
// srm开发临时使用...
......@@ -75,9 +75,9 @@ const memberCenterRoute = {
// contracRoute,
//...
// AuthConfigRoute,
// MemberRoute,
// HandlingRoute,
...asyncRoutes,
MemberRoute,
HandlingRoute,
// ...asyncRoutes,
{
path: '/memberCenter/noAuth',
auth: false,
......
......@@ -36,7 +36,9 @@
"start:10": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.10:9400 yarn start",
"start:study": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.207:9400 yarn start",
"start:25": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.25:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.25:9400 yarn start",
"start:v2": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.17:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.17:9400 yarn start"
"start:v2": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.17:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.17:9400 yarn start",
"start:v2Preview": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.220:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.220:9400 yarn start"
},
"lint-staged": {
"*.{js,jsx,less,md,json}": [
......
.button-switch {
display: inline-block;
:global {
.ant-radio-button-wrapper:hover {
color: #6B778C;
}
.ant-radio-group-solid {
.ant-radio-button-wrapper-checked {
background: #6B778C;
border-color: #6B778C;
&:hover {
background: #6B778C;
border-color: #6B778C;
}
}
}
}
}
\ No newline at end of file
.button-switch {
display: inline-block;
:global {
.ant-radio-button-wrapper:hover {
color: #6B778C;
}
.ant-radio-group-solid {
.ant-radio-button-wrapper-checked {
background: #6B778C;
border-color: #6B778C;
&:hover {
background: #6B778C;
border-color: #6B778C;
}
&::after {
background-color: #6B778C;
}
&::before {
background-color: #6B778C;
}
}
}
}
}
import React, { useEffect, useMemo, useState } from 'react';
import { Spin, Card, Table, Button, Drawer } from 'antd';
import AnchorPage from '@/layouts/AnchorPage';
import CustomizeColumn from '@/components/CustomizeColumn';
import AuditProcess from '@/components/AuditProcess';
import theme from '../../../../../config/lingxi.theme.config';
import useGetAnchorHeader from '../../common/hooks/useGetAnchorHeader';
import useInitialValue from '../../common/hooks/useInitialValue';
import { useBasicInfoColumnInDetail } from '../../common/hooks/useCommonsInDetail';
import { PublicApi } from '@/services/api';
import { GetEnhanceSupplierAllDetailsResponse } from '@/services/EnhanceApi';
import { usePageStatus } from '@/hooks/usePageStatus';
import { findLastIndexFlowState } from '@/utils';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { columns as orderColumns, productColumn } from '../../common/columns/detailNoticeInfoColumns';
import MellowCard from '@/components/MellowCard';
import DeliveryInfo from '../../components/DeliveryInfo';
import FlowRecords from '@/components/FlowRecords';
import { innerFlowColumns, outerWorkflowRecordsColumn } from '../../common/columns/recordFlowColumns'
const TobeEvaluateDetail = () => {
const { id } = usePageStatus();
// const { visible, toggle } = useModal()
const anchorColumn = useGetAnchorHeader({blackList: []})
const { loading, initialValue }= useInitialValue<GetEnhanceSupplierAllDetailsResponse, { id: string }>(PublicApi.getEnhanceSupplierAllDetails, { id: id.toString() })
const { basicInfoColumn, payInfoColumns, cacheOtherInfo, annexInfo} = useBasicInfoColumnInDetail({initialValue})
const defaultColumns = initialValue?.source === 1 ? orderColumns : productColumn;
const outerWorkflowRecordsList = initialValue?.outerWorkflowRecordsList || [];
const innerWorkflowRecordsList = initialValue?.innerWorkflowRecordsList || [];
const { columns } = useColumnWithFilter(defaultColumns, [
{
title: '操作',
render: (text, record) => {
return <a>查看加工明细</a>
}
}
]);
const cacheStyle = useMemo(() => ({ margin: `${theme["@margin-md"]} 0` }), [])
return (
<Spin spinning={loading}>
<AnchorPage
title={initialValue?.processName}
anchors={anchorColumn}
>
<AuditProcess
outerVerifySteps={
initialValue && initialValue.outerTaskList ?
initialValue.outerTaskList.map(item => ({
step: item.step,
stepName: item.taskName,
roleName: item.roleName,
status: item.isExecute ? 'finish' : 'wait',
})) :
[]
}
outerVerifyCurrent={findLastIndexFlowState(initialValue?.outerTaskList)}
innerVerifySteps={
initialValue && initialValue.innerTaskList ?
initialValue.innerTaskList.map(item => ({
step: item.step,
stepName: item.taskName,
roleName: item.roleName,
status: item.isExecute ? 'finish' : 'wait',
})) :
[]
}
innerVerifyCurrent={findLastIndexFlowState(initialValue?.innerTaskList)}
id="progress"
/>
<div style={cacheStyle} id="basicInfo" >
<CustomizeColumn data={basicInfoColumn} title="基本信息" column={3} />
</div>
{/* 通知单明细 */}
<div style={cacheStyle} id="noticeDetails">
<MellowCard title="通知单明细">
<Table rowKey={"id"} dataSource={initialValue?.details} columns={columns}/>
</MellowCard>
</div>
<div style={cacheStyle} id="deliveryDetail">
<DeliveryInfo source={initialValue?.source as 1 | 2} statisticsDataSource={initialValue?.details} infoDataSource={initialValue?.pnoReceiveDeliverDetailDOList} />
</div>
<div style={cacheStyle}>
<CustomizeColumn id="payInfo" data={payInfoColumns} title="交付信息" column={3} />
</div>
<div style={cacheStyle}>
<CustomizeColumn id="otherRequire" data={cacheOtherInfo} title="其他要求" column={3} />
</div>
<div style={cacheStyle}>
<CustomizeColumn id="annex" data={annexInfo} title="附件" column={3} />
</div>
<div id="record">
<FlowRecords
outerRowkey="id"
innerRowkey="id"
outerColumns={outerWorkflowRecordsColumn}
innerColumns={innerFlowColumns}
outerDataSource={outerWorkflowRecordsList}
innerDataSource={innerWorkflowRecordsList}
/>
</div>
{/* 收发货明细 */}
{/* <Card title="流转记录" id="record" extra={<Button>内部流转</Button>}>
<Table columns={recordColumn}></Table>
</Card> */}
</AnchorPage>
</Spin>
)
}
export default TobeEvaluateDetail
import React, { useCallback, useRef } from 'react';
import React, { useCallback, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd';
import { querySchema } from '../../common/schemas/query';
......@@ -9,18 +9,20 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { createFormActions } from '@formily/antd';
import { timeRange } from '@/utils';
import { queryColumns } from '../../common/columns/query';
import setColumnsByLinks from '../../common/columns/query';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData from '../../common/hooks/useFetchFilterData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
const formActions = createFormActions();
const queryColumns = setColumnsByLinks("/memberCenter/handling/assign/query/detail")
const AllQuery = () => {
const ref = useRef<any>({});
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const { columns } = useColumnWithFilter(queryColumns, [], filterRes);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
......@@ -37,11 +39,12 @@ const AllQuery = () => {
rowKey: 'id',
// rowSelection: selectRow
}}
columns={queryColumns}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceSupplierAllList, params)}
controlRender={
<NiceForm
schema={querySchema}
actions={formActions}
onSubmit={handleSearch}
effects={($, actions) => {
......@@ -51,7 +54,6 @@ const AllQuery = () => {
fetchSelectOptions,
);
}}
schema={querySchema}
/>
}
/>
......
......@@ -158,7 +158,7 @@ export const outerWorkflowRecordsColumn: ColumnsType = [
},
{
title: '状态',
dataIndex: 'roleName'
dataIndex: 'status'
},
{
title: '操作',
......
......@@ -11,7 +11,7 @@ import { PublicApi } from '@/services/api';
import StatusTag from '@/components/StatusTag';
import DeliveryInfomation from '../../components/DeliveryInformation';
import moment from 'moment';
import { ReceiptDeliveryDetailsCard, StatisticsTab, DetailTab } from '../../components/ReceiptDeliveryDetails';
import { StatisticsTab, DetailTab } from '../../components/ReceiptDeliveryDetails';
import { columns, orderDetailColumn, innerWorkFlowRecordColumn, outerWorkflowRecordsColumn, receiveColumns, pnoReceiveDeliverDetailDOListColumns } from './columns';
import ExamineModal from '../../components/ExamineModal';
import { FormOutlined, SaveOutlined } from '@ant-design/icons'
......
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Space, Card, Button } from 'antd';
import { tobeAddQuerySchema } from '../../common/schemas/query';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { createFormActions } from '@formily/antd';
import { timeRange } from '@/utils';
import setColumnsByLinks from '../../common/columns/query';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { PlusOutlined } from '@ant-design/icons';
import { history } from 'umi'
const formActions = createFormActions();
const queryColumns = setColumnsByLinks("/memberCenter/handling/assign/tobeAddQuery/detail")
const AllQuery = () => {
const ref = useRef<any>({});
const [batchLoading, setBatchLoading] = useState<boolean>(false);
const [submitLoadingID, setSubmitLoadingID] = useState<number[]>([])
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const [selectRow, selectRowFns] = useRowSelectionTable({
customKey: 'id',
extendsSelection: {
getCheckboxProps: (record: any) => ({
disabled: record.outerStatus === 0
}),
}
});
const { columns } = useColumnWithFilter(queryColumns, [
{
title: '操作',
render: (text, record) => {
const loading = submitLoadingID.includes(record.id);
return (
<Space>
<Button type="text" loading={loading} onClick={() => handleSingleReviewOrDelete("exam", {id: record.id})}>提交</Button>
<a>编辑</a>
<Button type="text" loading={loading} onClick={() => handleSingleReviewOrDelete("delete", {id: record.id})}>删除</Button>
</Space>
)
}
}
], filterRes);
const handleSingleReviewOrDelete = async (type: 'exam' | 'delete', postData: { id: number }) => {
const service = type === 'exam' ? PublicApi.postEnhanceSupplierToBeAddSubmitExam : PublicApi.postEnhanceSupplierToBeAddDelete;
const newSubmitLoadingID = [...submitLoadingID];
newSubmitLoadingID.push(postData.id);
setSubmitLoadingID(newSubmitLoadingID)
const { code, data, message } = await service(postData)
setSubmitLoadingID(() => newSubmitLoadingID.filter((_item) => _item !== postData.id))
if (code === 1000) {
formActions.submit();
}
}
const handleSubmitToReviewOrDelete = async (type: "exam" | "delete") => {
const selectedRowKeys = selectRowFns.selectedRowKeys;
if(selectedRowKeys.length === 0) {
return ;
}
setBatchLoading(true);
const service = type === 'exam' ? PublicApi.postEnhanceSupplierToBeAddBatchSubmitExam : PublicApi.postEnhanceSupplierToBeAddBatchDelete;
const { code, data, res } = await service({
idList: selectedRowKeys
})
setBatchLoading(false)
if (code === 1000) {
selectRowFns.setSelectedRowKeys([]);
formActions.submit();
}
}
const controllerBtns = () => (
<Space>
<Button
type="primary"
onClick={() => { history.push('/memberCenter/handling/assign/tobeAddQuery/add') }}
>
<PlusOutlined /> 新建
</Button>
<Button loading={batchLoading} onClick={() => handleSubmitToReviewOrDelete('exam')}>批量提交审核</Button>
<Button loading={batchLoading} onClick={() => handleSubmitToReviewOrDelete('delete')}>批量删除</Button>
</Space>
);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'生产通知单查询'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceSupplierToBeAddList, params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{controllerBtns: controllerBtns()}}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={tobeAddQuerySchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Space, Card, Button } from 'antd';
import { querySchema } from '../../common/schemas/query';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/stockQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { Link, useRouteMatch } from 'umi'
import { DEPENDENT_DOC_PRODUCTION, DOC_TYPE_PROCESS_INVOICE, DOC_TYPE_PROCESS_RECEIPT } from '@/constants';
const formActions = createFormActions();
const queryColumns = setColumnsByLinks({
detail: '/memberCenter/handling/assign/pendingAddProcessing/detail',
storage: '/memberCenter/tranactionAbility/stockSellStorage/bills/detail',
})
const ADD_PROCESS_PATH = "/memberCenter/tranactionAbility/stockSellStorage/bills/add"
const AllQuery = () => {
const ref = useRef<any>({});
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const { columns } = useColumnWithFilter(queryColumns, [
{
title: '操作',
render: (text, record) => {
return (
<Space>
<Link
to={`${ADD_PROCESS_PATH}?relevanceInvoicesId=${record.id}&invoicesTypeId=${DOC_TYPE_PROCESS_RECEIPT}&relevanceInvoices=${DEPENDENT_DOC_PRODUCTION}`}
>
新增加工入库单
</Link>
</Space>
)
}
}
], filterRes);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'生产通知单查询'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
// rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceSupplierToBeAddStorageList, params)}
controlRender={
<NiceForm
actions={formActions}
// expressionScope={{controllerBtns: controllerBtns()}}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={querySchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Space, Card, Button } from 'antd';
import { querySchema } from '../../common/schemas/query';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/stockQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { Link, useRouteMatch } from 'umi'
import { DEPENDENT_DOC_PRODUCTION, DOC_TYPE_PROCESS_INVOICE } from '@/constants';
import { ASSIGN_PENDING_RECEIVE } from '../../common';
const formActions = createFormActions();
const queryColumns = setColumnsByLinks({
detail: '/memberCenter/handling/assign/pendingAddProcessing/detail',
storage: '/memberCenter/tranactionAbility/stockSellStorage/bills/detail',
})
const AllQuery = () => {
const ref = useRef<any>({});
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const { columns } = useColumnWithFilter(queryColumns, [
{
title: '操作',
render: (text, record) => {
return (
<Space>
<Link to={`${ASSIGN_PENDING_RECEIVE}/detail?id=${record.id}`}>收货</Link>
</Space>
)
}
}
], filterRes);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'待收货生产通知单'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
// rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceSupplierToBeReceiveList, params)}
controlRender={
<NiceForm
actions={formActions}
// expressionScope={{controllerBtns: controllerBtns()}}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={querySchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Space, Card, Button } from 'antd';
import { tobeAddQuerySchema } from '../../common/schemas/query';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/query';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { Link, useRouteMatch } from 'umi'
const formActions = createFormActions();
const queryColumns = setColumnsByLinks("/memberCenter/handling/assign/pendingFirst/detail")
const AllQuery = () => {
const ref = useRef<any>({});
const match = useRouteMatch();
const prefix = match.path;
const [batchLoading, setBatchLoading] = useState<boolean>(false);
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const [selectRow, selectRowFns] = useRowSelectionTable({
customKey: 'id',
extendsSelection: {
getCheckboxProps: (record: any) => ({
disabled: record.outerStatus === 0
}),
}
});
const { columns, setColumnsWithFilterOption } = useColumnWithFilter(queryColumns, [
{
title: '操作',
render: (text, record) => {
return (
<Space>
<Link to={`${prefix}?id=${record.id}`}>审核</Link>
{/* <Button type="text" loading={loading} onClick={() => handleVerify({id: record.id})}>审核</Button> */}
</Space>
)
}
}
], filterRes);
const handleSubmitToReviewOrDelete = async () => {
const selectedRowKeys = selectRowFns.selectedRowKeys;
if(selectedRowKeys.length === 0) {
return ;
}
setBatchLoading(true);
const service = PublicApi.postEnhanceSupplierToBeFirstExamBatchExamPass;
const { code, data, res } = await service({
idList: selectedRowKeys
})
setBatchLoading(false)
if (code === 1000) {
selectRowFns.setSelectedRowKeys([]);
formActions.submit();
}
}
const controllerBtns = () => (
<Space>
<Button loading={batchLoading} onClick={handleSubmitToReviewOrDelete}>批量提交审核</Button>
</Space>
);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'生产通知单查询'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceSupplierToBeFirstExamList, params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{controllerBtns: controllerBtns()}}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={tobeAddQuerySchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Space, Card, Button } from 'antd';
import { tobeAddQuerySchema } from '../../common/schemas/query';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/query';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { Link, useRouteMatch } from 'umi'
const formActions = createFormActions();
const queryColumns = setColumnsByLinks("/memberCenter/handling/assign/pendingSecond/detail")
const AllQuery = () => {
const ref = useRef<any>({});
const match = useRouteMatch();
const prefix = match.path;
const [batchLoading, setBatchLoading] = useState<boolean>(false);
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const [selectRow, selectRowFns] = useRowSelectionTable({
customKey: 'id',
extendsSelection: {
getCheckboxProps: (record: any) => ({
disabled: record.outerStatus === 0
}),
}
});
const { columns } = useColumnWithFilter(queryColumns, [
{
title: '操作',
render: (text, record) => {
return (
<Space>
<Link to={`${prefix}?id=${record.id}`}>审核</Link>
{/* <Button type="text" loading={loading} onClick={() => handleVerify({id: record.id})}>审核</Button> */}
</Space>
)
}
}
], filterRes);
const handleSubmitToReviewOrDelete = async () => {
const selectedRowKeys = selectRowFns.selectedRowKeys;
if(selectedRowKeys.length === 0) {
return ;
}
setBatchLoading(true);
const service = PublicApi.postEnhanceSupplierToBeSecondExamBatchExamPass;
const { code, data, res } = await service({
idList: selectedRowKeys
})
setBatchLoading(false)
if (code === 1000) {
selectRowFns.setSelectedRowKeys([]);
formActions.submit();
}
}
const controllerBtns = () => (
<Space>
<Button loading={batchLoading} onClick={handleSubmitToReviewOrDelete}>批量提交审核</Button>
</Space>
);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'生产通知单查询'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceSupplierToBeSecondExamList, params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{controllerBtns: controllerBtns()}}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={tobeAddQuerySchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Space, Card, Button } from 'antd';
import { tobeAddQuerySchema } from '../../common/schemas/query';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/query';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { Link, useRouteMatch } from 'umi'
const formActions = createFormActions();
const queryColumns = setColumnsByLinks("/memberCenter/handling/assign/pendingSubmit/detail")
const TobeSubmit = () => {
const ref = useRef<any>({});
const match = useRouteMatch();
const prefix = match.path;
const [batchLoading, setBatchLoading] = useState<boolean>(false);
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const [selectRow, selectRowFns] = useRowSelectionTable({
customKey: 'id',
extendsSelection: {
getCheckboxProps: (record: any) => ({
disabled: record.outerStatus === 0
}),
}
});
const { columns } = useColumnWithFilter(queryColumns, [
{
title: '操作',
render: (text, record) => {
return (
<Space>
{/* <Link to={`${prefix}?id=${record.id}`}>审核</Link> */}
<Button type="text" onClick={() => handleVerify({id: record.id})}>审核</Button>
</Space>
)
}
}
], filterRes);
const handleVerify = async (postData: { id: number }) => {
const { data, code } = await PublicApi.postEnhanceSupplierToBeSubmitSubmit(postData);
if (code === 1000) {
formActions.submit();
}
}
const handleBatchSubmit = async () => {
const selectedRowKeys = selectRowFns.selectedRowKeys;
if(selectedRowKeys.length === 0) {
return ;
}
setBatchLoading(true);
const service = PublicApi.postEnhanceSupplierToBeSubmitBatchSubmit;
const { code, data, res } = await service({
idList: selectedRowKeys
})
setBatchLoading(false)
if (code === 1000) {
selectRowFns.setSelectedRowKeys([]);
formActions.submit();
}
}
const controllerBtns = () => (
<Space>
<Button loading={batchLoading} onClick={handleBatchSubmit}>批量提交</Button>
</Space>
);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'待提交生产通知单'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceSupplierToBeSubmitList, params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{controllerBtns: controllerBtns()}}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={tobeAddQuerySchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default TobeSubmit
export const innerStatusColor = [
'#d9d9d9',
'orange',
'blue',
'green',
'red',
'cyan',
'purple',
'geekblue',
'yellow',
'magenta',
'volcano',
'gold',
'lime',
];
export const outerStatusType = ['success', 'warning', 'default', 'danger', 'primary', 'nobility'];
import React from 'react';
import { ColumnsType } from 'antd/es/table';
import moment from 'moment';
import { Badge } from 'antd';
import EyePreview from '@/components/EyePreview';
/**
* 待新增加工发货单
*/
const commonColumns: ColumnsType<any> = [
{
title: '供应会员',
dataIndex: "supplierName"
},
{
title: '单据时间',
dataIndex: 'createTime',
sorter: (a, b) => a.createTime - b.createTime,
render: (text, record) => moment(text).format('YYYY-MM-DD'),
},
{
title: '外部状态',
dataIndex: 'outerStatus',
// render: (text, record: any) => {
// return <StatusTag title={text} type={SUPPLIER_OUTER_STATUS_COLOR[record.outerStatus]}></StatusTag>
// }
},
{
title: '内部状态',
dataIndex: 'innerStatus',
render: (text, record: any) => {
return (
<Badge status={"success"} text={text}></Badge>
)
}
}
]
/**
* 待新增加工入库单 以及 待收货生产通知单
* @param links
* @returns
*/
const setColumnsByLinks = (links: { [key: string]: string }) => {
// const isStorage: boolean = 'storage' in links;
// const type: "storage" | "deliver" = isStorage ? 'storage' : "deliver"
const linksColumns: ColumnsType<any> = [
{
title: '通知单号/摘要',
dataIndex: 'des',
render: (text, record) => {
return (
<div style={{ display: 'flex', flexDirection: 'column', }}>
<EyePreview url={`${links['detail']}?id=${record.id}`}>{text}</EyePreview>
<span style={{ marginTop: '8px' }}>{record.summary}</span>
</div>
)
}
},
]
const batchColum = {
title: '发货批次/发货单号',
dataIndex: 'batch',
render: (text: any, record: any) => {
const id: number = record.deliveryId;
return (
// <EyePreview url={`${url}?id=${id}`} >{record[`${type}No`]}</EyePreview>
<div>
<span>{record.deliveryBatch}批次</span>
<EyePreview url={`${links['delivery']}?id=${id}`} >{record[`deliveryNo`]}</EyePreview>
</div>
)
}
}
const tempColumns = [...commonColumns];
tempColumns.splice(2, 0, batchColum)
return linksColumns.concat(tempColumns);
}
export default setColumnsByLinks
import React from 'react';
import { ColumnsType } from 'antd/es/table';
import moment from 'moment';
import { Badge } from 'antd';
import EyePreview from '@/components/EyePreview';
const commonColumns: ColumnsType<any> = [
{
title: '供应会员',
dataIndex: "supplierName"
},
{
title: '单据时间',
dataIndex: 'createTime',
sorter: (a, b) => a.createTime - b.createTime,
render: (text, record) => moment(text).format('YYYY-MM-DD'),
},
{
title: '外部状态',
dataIndex: 'outerStatus',
// render: (text, record: any) => {
// return <StatusTag title={text} type={SUPPLIER_OUTER_STATUS_COLOR[record.outerStatus]}></StatusTag>
// }
},
{
title: '内部状态',
dataIndex: 'innerStatus',
render: (text, record: any) => {
return (
<Badge status={"success"} text={text}></Badge>
)
}
}
]
const setColumnsByLinks = (link: string) => {
const linksColumns: ColumnsType<any> = [
{
title: '通知单号/摘要',
dataIndex: 'des',
render: (text, record) => {
return (
<div style={{ display: 'flex', flexDirection: 'column', }}>
<EyePreview url={`${link}?id=${record.id}`}>{text}</EyePreview>
<span style={{ marginTop: '8px' }}>{record.summary}</span>
</div>
)
}
},
]
return linksColumns.concat(commonColumns);
}
export default setColumnsByLinks
import React from 'react';
import { ColumnsType } from 'antd/es/table';
import { Link } from 'umi';
import { GetEnhanceSupplierAllDetailsResponse } from '@/services/EnhanceApi';
import { numFormat } from '@/utils/numberFomat'
import moment from 'moment';
/**
* 通知单明细
*/
export const columns: ColumnsType<GetEnhanceSupplierAllDetailsResponse["details"][0] & { isHasTax: 0 | 1, taxRate: number }> = [
{
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => {
return (
<Link to={`/memberCenter/tranactionAbility/purchaseOrder/orderList/preview?id=${record.orderId}`}>{text}</Link>
)
}
},
{
title: 'ID / 商品名称',
dataIndex: 'id',
render: (text, record) => {
return (
<div style={{display: 'flex', flexDirection: 'column'}}>
<a>{record.productId}</a>
<span style={{marginTop: '8px'}}>{record.productName}</span>
</div>
)
}
},
{
title: '品类',
dataIndex: 'category',
},
{
title: '品牌',
dataIndex: 'brand',
},
{
title: '订单数量/单位',
dataIndex: 'unit',
render: (text, record) => {
const purchaseCount = +record.purchaseCount
return (
<div>
<p>{numFormat((purchaseCount))}</p>
<p>{record.unit}</p>
</div>
)
}
},
{
title: '剩余/加工数量',
dataIndex: 'processNum',
render: (text, record) => {
return (
<div>{record.surplusProcessNum} / {record.processNum}</div>
)
}
},
{
title: '含税/税率',
dataIndex: 'isHasTax',
render: (text, record) => {
return (
<div style={{display: 'flex', flexDirection: 'column'}}>
<a>{record.isHasTax ? '是' : '否'}</a>
<span style={{marginTop: '8px'}}>{record.taxRate}%</span>
</div>
)
}
},
{
title: '加工单价',
dataIndex: 'processPrice',
},
{
title: '加工费',
dataIndex: 'processTotalPrice',
},
{
title: '交期',
dataIndex: 'deliveryDate',
render: (text, record) => {
return moment(text).format('YYYY-MM-DD');
}
},
];
export const productColumn = [
{
title: 'ID / 商品名称',
dataIndex: 'id',
render: (text, record) => {
return (
<div style={{display: 'flex', flexDirection: 'column'}}>
<a>{record.productId}</a>
<span style={{marginTop: '8px'}}>{record.productName}</span>
</div>
)
}
},
{
title: '品类',
dataIndex: 'category',
},
{
title: '品牌',
dataIndex: 'brand',
},
{
title: '单位',
dataIndex: 'unit',
render: (text, record) => {
// const purchaseCount = +record.purchaseCount
return (
<div>
{/* <p>{numFormat((purchaseCount))}</p> */}
<p>{record.unit}</p>
</div>
)
}
},
{
title: '加工数量',
dataIndex: 'processNum',
render: (text, record) => {
return (
<div>{record.processNum}</div>
)
}
},
{
title: '含税/税率',
dataIndex: 'isHasTax',
render: (text, record) => {
return (
<div style={{display: 'flex', flexDirection: 'column'}}>
<span>{record.isHasTax ? '是' : '否'}</span>
<span style={{marginTop: '8px'}}>{record.taxRate}%</span>
</div>
)
}
},
{
title: '加工单价',
dataIndex: 'processPrice',
},
{
title: '加工费',
dataIndex: 'processTotalPrice',
},
{
title: '交期',
dataIndex: 'deliveryDate',
render: (text, record) => {
return moment(text).format('YYYY-MM-DD');
}
},
]
......@@ -2,20 +2,13 @@ import React from 'react';
import { ColumnsType } from 'antd/es/table';
import moment from 'moment';
import { Badge } from 'antd';
import EyePreview from '@/components/EyePreview';
// import EyePreview from '@/components/EyePreview';
import { Link } from 'umi';
import StatusTag from '@/components/StatusTag';
import { innerStatusColor, outerStatusType } from '../colors';
export const queryColumns: ColumnsType<any> = [
{
title: '通知单号/摘要',
dataIndex: 'des',
render: (text, record) => {
return (
<div>
<EyePreview url={`http://www.baidu.com?id=${record.id}`}>{text}</EyePreview>
</div>
)
}
},
const commonColumns: ColumnsType<any> = [
{
title: '加工企业名称',
dataIndex: "processName"
......@@ -28,18 +21,41 @@ export const queryColumns: ColumnsType<any> = [
},
{
title: '外部状态',
dataIndex: 'outerStatusName',
// render: (text, record: any) => {
// return <StatusTag title={text} type={SUPPLIER_OUTER_STATUS_COLOR[record.outerStatus]}></StatusTag>
// }
dataIndex: 'outerStatus',
render: (text, record: any) => {
const offset = record.outerStatus % 6;
return <StatusTag title={record.outerStatusName} type={outerStatusType[offset] as 'success'}></StatusTag>
}
},
{
title: '内部状态',
dataIndex: 'innerStatusName',
dataIndex: 'innerStatus',
render: (text, record: any) => {
return (
<Badge status={"success"} text={text}></Badge>
<Badge color={innerStatusColor[record.supplierInnerStatus]} text={record.innerStatusName}></Badge>
)
}
}
]
const setColumnsByLinks = (link: string) => {
const linksColumns: ColumnsType<any> = [
{
title: '通知单号/摘要',
dataIndex: 'des',
render: (text, record) => {
return (
<div style={{ display: 'flex', flexDirection: 'column', }}>
<Link to={`${link}?id=${record.id}`}>{record.noticeNo}</Link>
{/* <EyePreview url={`${link}?id=${record.id}`}>{</EyePreview> */}
<span style={{ marginTop: '8px' }}>{record.summary}</span>
</div>
)
}
},
]
return linksColumns.concat(commonColumns);
}
export default setColumnsByLinks
import React from 'react';
import { ColumnsType } from 'antd/es/table';
import moment from 'moment';
import { Badge } from 'antd';
import EyePreview from '@/components/EyePreview';
export const innerFlowColumns = [
{
title: '流转记录',
dataIndex: 'id'
},
{
title: '操作人',
dataIndex: 'operator',
},
{
title: '部门',
dataIndex: 'department'
},
{
title: '职位',
dataIndex: 'jobTitle'
},
{
title: '状态',
dataIndex: 'status'
},
{
title: '操作',
dataIndex: 'operate'
},
{
title: '操作时间',
dataIndex: 'operateTime',
render: (text, record) => {
return moment(text).format('YYYY-MM-DD HH:mm:ss')
}
},
{
title: '审核意见',
dataIndex: 'opinion'
}
]
/**
* 内部流转
*/
export const outerWorkflowRecordsColumn = [
{
title: '序号',
dataIndex: 'id'
},
{
title: '操作角色',
dataIndex: 'roleName',
},
{
title: '状态',
dataIndex: 'status'
},
{
title: '操作',
dataIndex: 'operate'
},
{
title: '操作时间',
dataIndex: 'operateTime',
render: (text, record) => {
return moment(text).format('YYYY-MM-DD HH:mm:ss');
}
},
{
title: '审核意见',
dataIndex: 'opinion'
}
]
import React from 'react';
import { ColumnsType } from 'antd/es/table';
import moment from 'moment';
import { Badge } from 'antd';
import EyePreview from '@/components/EyePreview';
const commonColumns: ColumnsType<any> = [
{
title: '加工企业名称',
dataIndex: "processName"
},
{
title: '单据时间',
dataIndex: 'createTime',
sorter: (a, b) => a.createTime - b.createTime,
render: (text, record) => moment(text).format('YYYY-MM-DD'),
},
{
title: '外部状态',
dataIndex: 'outerStatus',
// render: (text, record: any) => {
// return <StatusTag title={text} type={SUPPLIER_OUTER_STATUS_COLOR[record.outerStatus]}></StatusTag>
// }
},
{
title: '内部状态',
dataIndex: 'innerStatus',
render: (text, record: any) => {
return (
<Badge status={"success"} text={text}></Badge>
)
}
}
]
/**
* 待新增加工入库单 以及 待收货生产通知单
* @param links
* @returns
*/
const setColumnsByLinks = (links: { [key: string]: string }) => {
const isStorage: boolean = 'storage' in links;
const type: "storage" | "deliver" = isStorage ? 'storage' : "deliver"
const linksColumns: ColumnsType<any> = [
{
title: '通知单号/摘要',
dataIndex: 'des',
render: (text, record) => {
return (
<div style={{ display: 'flex', flexDirection: 'column', }}>
<EyePreview url={`${links['detail']}?id=${record.id}`}>{text}</EyePreview>
<span style={{ marginTop: '8px' }}>{record.summary}</span>
</div>
)
}
},
]
const batchColum = {
title: '发货批次/入库单号',
dataIndex: 'batch',
render: (text: any, record: any) => {
const id: number = isStorage ? record.storageId : record.deliveryId;
return (
// <EyePreview url={`${url}?id=${id}`} >{record[`${type}No`]}</EyePreview>
<div>
<span>{record.deliveryBatch}批次</span>
<EyePreview url={`${links[type]}?id=${id}`} >{record[`${type}No`]}</EyePreview>
</div>
)
}
}
const tempColumns = [...commonColumns];
tempColumns.splice(2, 0, batchColum)
return linksColumns.concat(tempColumns);
}
export default setColumnsByLinks
import React, { useCallback, useState } from 'react'
type ReturnRes = {
batchLoading: boolean,
handleAction: <T,>(keys: number[], api: (params: {idList: number[]}) => Promise<T>) => Promise<T>
}
/**
* 批量操作hook
* @returns
*/
function useBatchSubmit(): ReturnRes {
const [batchLoading, setBatchLoading] = useState<boolean>(false);
const handleAction = useCallback(async <T,>(keys: number[], api: (params: {idList: number[]}) => Promise<T> ) => {
const selectedRowKeys = keys;
if(selectedRowKeys.length === 0) {
return ;
}
setBatchLoading(true);
const res = await api({
idList: selectedRowKeys
})
setBatchLoading(false)
return res
}, [])
return { batchLoading, handleAction }
}
export default useBatchSubmit
import React, { useEffect, useState } from 'react';
import { ColumnsType } from 'antd/es/table';
import { FilterResType } from './useFetchFilterData';
function useColumns<T>(defaultColumns: ColumnsType<T>, actionsList: ColumnsType<T>, filterRes?: FilterResType) {
const [columns, setColumns] = useState<ColumnsType<T>>(() => defaultColumns.concat(actionsList));
/**
* 添加columns 的filter
*/
const setColumnsWithFilterOption = (optionMap: {[key: string]: {text: string, value: string}[]}) => {
const newColumns = [...columns];
const keys = Object.keys(optionMap);
newColumns.forEach((_item: ColumnsType<T>[0] & {dataIndex: string}) => {
if(_item.dataIndex && keys.includes(_item.dataIndex)) {
_item.filters = optionMap[_item.dataIndex];
}
})
setColumns(newColumns);
}
useEffect(() => {
const keys = filterRes && Object.keys(filterRes) || []
if (keys.length === 0) {
return;
}
const map = {};
keys.forEach((_item: keyof FilterResType) => {
map[_item] = filterRes[_item].map((_row) => ({ text: _row.label, ..._row }))
})
setColumnsWithFilterOption(map)
}, [defaultColumns, filterRes])
useEffect(() => {
setColumns(() => defaultColumns.concat(actionsList));
}, [defaultColumns])
return { columns, setColumnsWithFilterOption }
}
export default useColumns
import { useMemo } from "react";
import React from 'react';
import moment from "moment";
/**
* 详情页基本信息 列信息
*/
export const useBasicInfoColumnInDetail = <T extends object>(options: { initialValue: T }) => {
const { initialValue } = options;
const basicInfoColumn = useMemo(() => {
return [
{
title: '通知单号',
value: initialValue?.['noticeNo'],
},
{
title: '通知单来源',
value: initialValue?.['source'] === 1 ? '订单加工' : '商品加工'
},
{
title: "单据时间",
value: initialValue?.['createTime'],
},
{
title: "通知摘要",
value: initialValue?.['summary'],
span: 2,
},
{
title: '加工企业',
value: initialValue?.['processName']
},
{
title: '外部状态',
value: initialValue?.['outerStatusName'],
span: 3
},
{
title: '内部状态',
value: initialValue?.['innerStatusName'],
span: 3
}
]
}, [initialValue])
const payInfoColumns = useMemo(() => {
return [
{
title: '配送方式',
value: initialValue?.["deliveryType"] === 1 ? '物流' : '自提'
},
(
initialValue?.["deliveryType"] === 1
? {
title: "收货地址",
value: (
<div>
<div>
<span>{initialValue?.["receiveUserName"]}/ {initialValue?.["receiveUserTel"]}</span>
</div>
<span>{initialValue?.['receiveAddress']}</span>
</div>
)
}
: null
),
{
title: '发货地址',
value: (
<div>
<div>
<span>{initialValue?.["deliveryUserName"]}/ {initialValue?.["deliveryUserTel"]}</span>
</div>
<span>{initialValue?.['deliveryAddress']}</span>
</div>
)
},
{
title: "交期",
value: (
initialValue?.["deliveryDate"] && moment(initialValue?.["deliveryDate"]).format('YYYY-MM-DD HH:mm:ss')
)
}
].filter(Boolean)
}, [initialValue])
const cacheOtherInfo = useMemo(() => {
const explain = initialValue?.["otherAsk"]?.explain || [];
const list = explain.map((_item) => {
return {
title: _item.name,
value: _item.value,
}
})
return list;
}, [initialValue])
const annexInfo = useMemo(() => {
const annex = initialValue?.["otherAsk"]?.annex || [];
return [{
title: "附件",
value: (
<div>
{
annex.map((_item) => {
<a>{_item.name}</a>
})
}
</div>
)
}]
}, [initialValue])
return { basicInfoColumn, payInfoColumns, cacheOtherInfo, annexInfo };
}
import { PublicApi } from '@/services/api';
import React, { useCallback, useState } from 'react';
type FilterResType = {
export type FilterResType = {
innerStatus: {label: string, value: number}[],
outerStatus: {label: string, value: number}[],
}
......@@ -10,7 +10,7 @@ type FilterResType = {
* 获取列表页,搜索条件
* 暂时写死
*/
function useFetchFilterData() {
function useFetchFilterData(): { filterRes: FilterResType, fetchSelectOptions: () => Promise<FilterResType>} {
const [filterRes, setFilterRes] = useState<FilterResType>({
innerStatus: [],
outerStatus: [],
......
import { useMemo, useState } from "react";
function useGetAnchorHeader(options: { blackList: string[] }) {
const { blackList } = options;
const [headerColumn, setHeaderColumn] = useState(() => {
const temp = [
{
key: 'progress',
name: '流转进度',
},
{
key: 'basicInfo',
name: '基本信息',
},
{
key: 'noticeDetails',
name: '通知单明细'
},
{
key: 'deliveryDetail',
name: '收发货明细'
},
{
key: 'payInfo',
name: '交付信息'
},
{
key: 'otherRequire',
name: '其他要求'
},
{
key: 'annex',
name: '附件'
},
{
key: 'record',
name: '流转记录'
}
]
return temp.filter((item) => !blackList.includes(item.key));
});
const cacheColumns = useMemo(() => headerColumn, [headerColumn]);
return cacheColumns
}
export default useGetAnchorHeader
import React, { useEffect, useState } from 'react';
/**
* 获取详情
*/
type ParamsType = {
id: number,
}
type HeadersType = {
[key: string]: any,
}
type Ires = {
code: number,
data: { [key: string]: any },
message: string
}
function useInitialValue<T, P>(api: (params: P, headers?: HeadersType) => Promise<T & Ires>, params: P, headers?: HeadersType): { loading: boolean, initialValue: T} {
const [loading, setLoading] = useState<boolean>(false);
const [initialValue, setInitialValue] = useState<null | Ires["data"]>(null);
useEffect(() => {
async function init() {
setLoading(true)
const { data, code } = await api(params, headers);
setLoading(false)
if (code === 1000) {
setInitialValue(data)
}
}
init()
}, [])
return { loading, initialValue }
}
export default useInitialValue
import { useCallback, useState } from "react";
/**
* 批量列表页审核hook
* @returns
*/
function useSingleActionSubmit() {
const [submitLoadingID, setSubmitLoadingID] = useState<number[]>([]);
const onSingleAction = async <T,>(api: (params: {id: number}) => Promise<T>, params: { id: number }) => {
setSubmitLoadingID((prev) => {
prev.push(params.id);
return prev;
} )
const res = await api(params)
setSubmitLoadingID((prev: number[]) => prev.filter((_item) => _item !== params.id))
return res
}
return { submitLoadingID, onSingleAction }
}
export default useSingleActionSubmit
import { FORM_FILTER_PATH } from "@/formSchema/const";
import { ISchema } from "@formily/antd";
import { docTime } from "..";
export const basicSchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
noticeNo: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入通知单号进行搜索',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
full: true,
autoRow: true,
columns: 6,
},
properties: {
supplierName: {
type: 'string',
'x-component-props': {
placeholder: '供应会员',
allowClear: true,
},
},
summary: {
type: 'string',
'x-component-props': {
placeholder: '通知单摘要',
allowClear: true
}
},
docTime: {
type: 'string',
default: 0,
enum: docTime,
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
/**
* 指派生产通知单 - 待审核生产通知单(一级)
* - 待审核生产通知单 (二级)
*/
export const pendingFirstQuerySchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{batchUpdateBtn}}',
},
},
noticeNo: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
colStyle: {
marginLeft: 20,
},
},
properties: {
summary: {
type: 'string',
'x-component-props': {
placeholder: '通知单摘要',
allowClear: true,
},
},
supplierName: {
type: 'string',
'x-component-props': {
placeholder: '供应会员',
allowClear: true,
},
},
docTime: {
type: 'string',
default: 0,
enum: docTime,
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
import { FORM_FILTER_PATH } from "@/formSchema/const";
import { ISchema } from "@formily/antd";
/**
* 列表页schema,无创建按钮
*/
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { docTime } from '../../common';
export const querySchema: ISchema = {
type: 'object',
properties: {
......@@ -85,3 +84,102 @@ export const querySchema: ISchema = {
},
},
};
/**
* @description 待生产通知单列表页
*/
export const tobeAddQuerySchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{controllerBtns}}',
},
},
noticeNo: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索通知单号',
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
colStyle: {
marginLeft: 20,
},
},
properties: {
summary: {
type: 'string',
'x-component-props': {
placeholder: '通知单摘要',
allowClear: true,
},
},
processName: {
type: 'string',
'x-component-props': {
placeholder: '加工企业名称',
allowClear: true,
},
},
docTime: {
type: 'string',
default: 0,
enum: docTime,
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
// outerStatus: {
// type: 'string',
// default: undefined,
// enum: [],
// 'x-component-props': {
// placeholder: '外部状态(全部)',
// allowClear: true,
// },
// },
// innerStatus: {
// type: 'string',
// default: undefined,
// enum: [],
// 'x-component-props': {
// placeholder: '内部状态(全部)',
// allowClear: true,
// },
// },
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
import React from 'react';
import { Tabs, Steps } from 'antd';
/**
* v2弃用, 使用AuditProcess
*/
const TabPane = Tabs.TabPane;
const { Step } = Steps;
......
import React from 'react';
import { ColumnsType } from 'antd/es/table';
import moment from 'moment';
import { Badge } from 'antd';
import EyePreview from '@/components/EyePreview';
import { GetEnhanceSupplierAllDetailsResponse } from '@/services/EnhanceApi';
import { Link } from 'umi';
import DescProgress from '@/components/DescProgress';
/**
* 收发货统计, 订单
*/
const statisticsColumns: ColumnsType<GetEnhanceSupplierAllDetailsResponse["details"][0] & { isHasTax: 0 | 1, taxRate: number }> = [
{
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => {
return (
<Link to={`/memberCenter/tranactionAbility/purchaseOrder/orderList/preview?id=${record.orderId}`}>{text}</Link>
)
}
},
{
title: 'ID / 商品名称',
dataIndex: 'id',
render: (text, record) => {
return (
<div style={{display: 'flex', flexDirection: 'column'}}>
<a>{record.productId}</a>
<span style={{marginTop: '8px'}}>{record.productName}</span>
</div>
)
}
},
{
title: '品类',
dataIndex: 'category',
},
{
title: '品牌',
dataIndex: 'brand',
},
{
title: '加工数量/单位',
render: (text, record) => {
return (
<div style={{display: 'flex', flexDirection: 'column'}}>
<a>{record.processNum}</a>
<span style={{marginTop: '8px'}}>{record.unit}</span>
</div>
)
}
},
{
title: '交期',
dataIndex: 'deliveryDate',
render: (text, record) => {
return moment(text).format('YYYY-MM-DD');
}
},
{
title: '加工单价',
dataIndex: 'processPrice',
},
{
title: '加工费',
dataIndex: 'processTotalPrice',
},
{
title: '已发货',
dataIndex: 'deliverNum'
},
{
title: '已收货/未发货',
dataIndex: 'receiveNum',
render: (text, record) => {
const descOptions = [
{
title: "已发货",
value: record.receiveNum
},
{
title: '未发货',
value: record.notDeliverNum
}
]
return (
<DescProgress descriptions={descOptions} />
)
}
},
{
title: '差异数量',
dataIndex: 'differenceNum'
},
{
title: '未发货',
dataIndex: "notDeliverNum"
}
];
const productColumns = statisticsColumns.slice(1);
/**
* 收发货详情
*/
const infoOrderColumns = [
{
title: '订单号',
dataIndex: 'orderNo',
render: (text, record) => {
// orderId, orderDetailId
return (
<EyePreview url={`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${record.orderId}`}>
{text}
</EyePreview>
)
}
},
{
title: 'ID',
dataIndex: 'productId'
},
{
title: '商品名称',
dataIndex: 'productName'
},
{
title: '品类',
dataIndex: 'category'
},
{
title: '品牌',
dataIndex: 'brand'
},
{
title: '单位',
dataIndex: 'unit'
},
{
title: '加工数量',
dataIndex: 'processNum'
},
{
title: '发货数量',
dataIndex: 'deliverNum'
}
]
const infoProductColumns = infoOrderColumns.slice(1);
export {
statisticsColumns,
productColumns,
infoOrderColumns,
infoProductColumns
}
import MellowCard from '@/components/MellowCard'
import React, { useEffect, useMemo, useState } from 'react'
import { GetEnhanceSupplierAllDetailsResponse } from '@/services/EnhanceApi';
import { statisticsColumns as orderColumns, productColumns, infoOrderColumns, infoProductColumns } from './columns';
import ButtonSwitch from '@/components/ButtonSwitch';
import { Table, Button, Tabs } from 'antd';
import CustomizeColumn from '@/components/CustomizeColumn';
import { Link } from 'umi';
import moment from 'moment';
const TabPane = Tabs.TabPane;
type infoDataSourceType = GetEnhanceSupplierAllDetailsResponse["pnoReceiveDeliverDetailDOList"]
interface Iprops {
/**
* 通知单来源: 1-订单加工 2-商品加工
*/
source: 1 | 2,
/**
* 面板
*/
panelKey?: 'statistics' | 'info',
/**
* 收发货统计跟detail 一样
*/
statisticsDataSource: GetEnhanceSupplierAllDetailsResponse["details"],
/**
* 收发货明细
* infoDataSource
*/
infoDataSource: infoDataSourceType,
}
const format = 'YYYY-MM-DD HH:mm:ss';
const DeliveryInfo: React.FC<Iprops> = (props: Iprops) => {
const { statisticsDataSource, infoDataSource, source, panelKey } = props;
const [radioValue, setRadioValue] = useState<"statistics" | "info">(panelKey);
const statisticsColumns = useMemo(() => source === 1 ? orderColumns : productColumns, [source]);
const infoColumns = useMemo(() => source === 1 ? infoOrderColumns : infoProductColumns, [source]);
const [activeBatch, setActiveBatch] = useState<number>(1);
const [tabOptions, setTabOptions] = useState<number[]>([]);
useEffect(() => {
setRadioValue(panelKey)
}, [panelKey])
useEffect(() => {
const length = infoDataSource && infoDataSource.length || 0;
if (length === 0) {
return;
}
const options = new Array(length).fill(0).map((item, _key) => _key + 1);
setTabOptions(options);
}, [infoDataSource])
const options = [
{
label: '收发货统计',
value: 'statistics'
},
{
label: "收发货明细",
value: 'info'
}
]
const cacheOptions = useMemo(() => {
if (!infoDataSource || infoDataSource.length === 0) {
return options.filter((_row) => _row.value !== 'info')
}
return options;
}, [infoDataSource])
const handleRadioChange = (value: "statistics" | "info") => {
console.log(value);
setRadioValue(value);
}
const batchColumns = useMemo(() => {
const activeData: infoDataSourceType[0] | null = infoDataSource && infoDataSource.length > 1 && infoDataSource[activeBatch - 1] || null;
return [
{
title: '发货单号',
value: (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${activeData?.deliveryId}`}
>
{activeData?.deliveryNo}
</Link>
)
},
{
title: "物流单号",
value: (
<Link to={`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${activeData?.logisticsOrderId}`}>
{activeData?.logisticsOrderNo}
</Link>
)
},
{
title: "入库单号",
value: (
<Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${activeData?.storageId}`}>{activeData?.storageNo}</Link>
)
},
{
title: "内部状态",
value: '已确认回单'
},
{
title: "",
value: (
<Button>确认回单</Button>
)
},
{
title: '发货时间',
value: (
activeData?.deliveryTime
&& moment(activeData?.deliveryTime).format(format)
)
},
{
title: '物流公司',
value: (
activeData?.logisticsCompany
)
},
{
title: '入库时间',
value: (
activeData?.storageTime
&& moment(activeData?.storageTime).format(format)
),
}
]
} ,[infoDataSource, activeBatch])
const handleTabOnChange = (value: string) => {
setActiveBatch(+value);
}
return (
<MellowCard
title="收发货统计"
extra={
<ButtonSwitch options={cacheOptions} value={radioValue} onChange={handleRadioChange} />
}
>
{
radioValue === 'statistics' && (
<Table columns={statisticsColumns} rowKey="id" dataSource={statisticsDataSource} />
)
}
{
radioValue === 'info' && infoDataSource.length > 0 && (
<div>
<Tabs defaultActiveKey="1" activeKey={activeBatch.toString()} onChange={handleTabOnChange}>
{
tabOptions.map((_item) => {
return (
<TabPane tab={`第${_item}批次`} key={_item}>
<CustomizeColumn data={batchColumns} column={5} />
<Table columns={infoColumns} rowKey="id" dataSource={infoDataSource[activeBatch].pnoReceiveDeliverDetailProductBOList}></Table>
</TabPane>
)
})
}
</Tabs>
</div>
)
}
</MellowCard>
)
}
DeliveryInfo.defaultProps = {
panelKey: 'statistics'
}
export default DeliveryInfo;
/**
* @author Bill
* @description 加工通用列表页列表页, 用于 ["生产通知单","待生产通知单","待审核生产通知单(一级)", ""]等
* v2版本弃用, 根据路由分离每个列表页
*/
import React, { useRef, useState, useCallback } from 'react';
......
import React, { useCallback, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd';
import { basicSchema } from '../../common/schemas/confirmQuery';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/confirmQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
const formActions = createFormActions();
const queryColumns = setColumnsByLinks("/memberCenter/handling/confirm/query/detail")
const AllQuery = () => {
const ref = useRef<any>({});
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const { columns } = useColumnWithFilter(queryColumns, [], filterRes);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'生产通知单查询1'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
// rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceProcessAllList, params)}
controlRender={
<NiceForm
schema={basicSchema}
actions={formActions}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space } from 'antd';
import { basicSchema } from '../../common/schemas/confirmQuery';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/comfrimOtherQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { Link } from 'umi'
const ADD_LOGISTICS_PATH = '/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add';
const DETAIL_LOGISTICS_PATH = '/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail'
const formActions = createFormActions();
const queryColumns = setColumnsByLinks({
detail: "/memberCenter/handling/confirm/pendingAddLogistics/detail",
delivery: '/memberCenter/tranactionAbility/stockSellStorage/bills/detail'
})
const AllQuery = () => {
const ref = useRef<any>({});
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const { columns } = useColumnWithFilter(queryColumns,
[
{
title: '操作',
render: (text, record) => {
return (
<Space>
<Link to={`${ADD_LOGISTICS_PATH}?createType=3&id=${record.id}`}>新增物流单</Link>
{/* <Link to={`${DETAIL_LOGISTICS_PATH}?id=${record.logisticsOrderId}`}>查看物流单</Link> */}
</Space>
)
}
}
], filterRes);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'待新增物流单'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
// rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceProcessToBeAddLogisticsList, params)}
controlRender={
<NiceForm
schema={basicSchema}
actions={formActions}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd';
import { basicSchema } from '../../common/schemas/confirmQuery';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/confirmQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
const formActions = createFormActions();
const queryColumns = setColumnsByLinks("/memberCenter/handling/confirm/query/detail")
const AllQuery = () => {
const ref = useRef<any>({});
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const { columns } = useColumnWithFilter(queryColumns, [], filterRes);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'待确认生产通知单'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
// rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceProcessToBeConfirmList, params)}
controlRender={
<NiceForm
schema={basicSchema}
actions={formActions}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space } from 'antd';
import { basicSchema } from '../../common/schemas/confirmQuery';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/comfrimOtherQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { Link } from 'umi'
const formActions = createFormActions();
const queryColumns = setColumnsByLinks({
detail: "/memberCenter/handling/confirm/pendingDelivered/detail",
delivery: '/memberCenter/tranactionAbility/stockSellStorage/bills/detail'
})
const PENDING_DELIVERD_PATH = "/memberCenter/handling/confirm/pendingDelivered/detail";
const AllQuery = () => {
const ref = useRef<any>({});
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const { columns } = useColumnWithFilter(queryColumns,
[
{
title: '操作',
render: (text, record) => {
return (
<Space>
<Link to={`${PENDING_DELIVERD_PATH}/detail?id=${record.id}`}>发货</Link>
</Space>
)
}
}
], filterRes);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'待新增物流单'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
// rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceProcessToBeDeliveryList, params)}
controlRender={
<NiceForm
schema={basicSchema}
actions={formActions}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Space, Card, Button } from 'antd';
import { pendingFirstQuerySchema } from '../../common/schemas/confirmQuery';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/confirmQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import useBatchSubmit from '../../common/hooks/useBatchSubmit';
import { PostEnhanceProcessToBeFirstExamBatchExamPassResponse, PostEnhanceProcessToBeFirstExamExamResponse } from '@/services/EnhanceApi';
import useSingleActionSubmit from '../../common/hooks/useSingleAction';
const formActions = createFormActions();
const queryColumns = setColumnsByLinks("/memberCenter/handling/confirm/pendingSubmit/detail")
const AllQuery = () => {
const ref = useRef<any>({});
const { batchLoading, handleAction } = useBatchSubmit();
const { submitLoadingID, onSingleAction } = useSingleActionSubmit()
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const [selectRow, selectRowFns] = useRowSelectionTable({
customKey: 'id',
extendsSelection: {
getCheckboxProps: (record: any) => ({
disabled: record.outerStatus === 0
}),
}
});
const { columns } = useColumnWithFilter(queryColumns, [
{
title: '操作',
render: (text, record) => {
const isLoading = submitLoadingID.includes(record.id);
return (
<Space>
<Button type="text" loading={isLoading} onClick={() => handleSingleReviewOrDelete({id: record.id})}>审核</Button>
</Space>
)
}
}
], filterRes);
const handleSingleReviewOrDelete = async (postData: { id: number }) => {
const service = PublicApi.postEnhanceProcessToBeFirstExamExam
const { code } = await onSingleAction<PostEnhanceProcessToBeFirstExamExamResponse>(service, postData)
if (code === 1000) {
formActions.submit();
}
}
const handleSubmitToReviewOrDelete = async () => {
const selectedRowKeys = selectRowFns.selectedRowKeys;
const { code } = await handleAction<PostEnhanceProcessToBeFirstExamBatchExamPassResponse>(selectedRowKeys, PublicApi.postEnhanceProcessToBeFirstExamBatchExamPass)
if (code === 1000) {
selectRowFns.setSelectedRowKeys([]);
formActions.submit();
}
}
const controllerBtns = () => (
<Space>
<Button loading={batchLoading} onClick={handleSubmitToReviewOrDelete}>批量审核通过</Button>
</Space>
);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'待审核生产通知单(一级)'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceProcessToBeFirstExamList, params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{batchUpdateBtn: controllerBtns()}}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={pendingFirstQuerySchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Space, Card, Button } from 'antd';
import { pendingFirstQuerySchema } from '../../common/schemas/confirmQuery';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/confirmQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { Link, useRouteMatch } from 'umi'
import useBatchSubmit from '../../common/hooks/useBatchSubmit';
import { PostEnhanceProcessToBeSecondExamBatchExamPassResponse, PostEnhanceProcessToBeSecondExamExamResponse } from '@/services/EnhanceApi';
import useSingleActionSubmit from '../../common/hooks/useSingleAction';
const formActions = createFormActions();
const queryColumns = setColumnsByLinks("/memberCenter/handling/confirm/pendingSubmit/detail")
const AllQuery = () => {
const ref = useRef<any>({});
const { batchLoading, handleAction } = useBatchSubmit();
const { submitLoadingID, onSingleAction } = useSingleActionSubmit()
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const [selectRow, selectRowFns] = useRowSelectionTable({
customKey: 'id',
extendsSelection: {
getCheckboxProps: (record: any) => ({
disabled: record.outerStatus === 0
}),
}
});
const { columns } = useColumnWithFilter(queryColumns, [
{
title: '操作',
render: (text, record) => {
const isLoading = submitLoadingID.includes(record.id);
return (
<Space>
<Button type="text" loading={isLoading} onClick={() => handleSingleReviewOrDelete({id: record.id})}>审核</Button>
</Space>
)
}
}
], filterRes);
const handleSingleReviewOrDelete = async (postData: { id: number }) => {
const service = PublicApi.postEnhanceProcessToBeSecondExamExam
const { code } = await onSingleAction<PostEnhanceProcessToBeSecondExamExamResponse>(service, postData)
if (code === 1000) {
formActions.submit();
}
}
const handleSubmitToReviewOrDelete = async () => {
const selectedRowKeys = selectRowFns.selectedRowKeys;
const { code } = await handleAction<PostEnhanceProcessToBeSecondExamBatchExamPassResponse>(selectedRowKeys, PublicApi.postEnhanceProcessToBeSecondExamBatchExamPass)
if (code === 1000) {
selectRowFns.setSelectedRowKeys([]);
formActions.submit();
}
}
const controllerBtns = () => (
<Space>
<Button loading={batchLoading} onClick={handleSubmitToReviewOrDelete}>批量审核通过</Button>
</Space>
);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'待审核生产通知单(二级)'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceProcessToBeSecondExamList, params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{batchUpdateBtn: controllerBtns()}}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={pendingFirstQuerySchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space } from 'antd';
import { basicSchema } from '../../common/schemas/confirmQuery';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/comfrimOtherQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { Link } from 'umi'
const formActions = createFormActions();
const queryColumns = setColumnsByLinks({
detail: "/memberCenter/handling/confirm/pendingDelivered/detail",
delivery: '/memberCenter/tranactionAbility/stockSellStorage/bills/detail'
})
const PENDING_RECEIPT_PATH = "/memberCenter/handling/confirm/pendingReceipt/detail";
const AllQuery = () => {
const ref = useRef<any>({});
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const { columns } = useColumnWithFilter(queryColumns,
[
{
title: '操作',
render: (text, record) => {
return (
<Space>
<Link to={`${PENDING_RECEIPT_PATH}?id=${record.id}`}>确认回单</Link>
</Space>
)
}
}
], filterRes);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'待确认回单生产通知单'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
// rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceProcessToBeConfirmReceiptList, params)}
controlRender={
<NiceForm
schema={basicSchema}
actions={formActions}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Space, Card, Button } from 'antd';
import { basicSchema } from '../../common/schemas/confirmQuery';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/confirmQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { PostEnhanceProcessToBeSubmitExamExamResponse } from '@/services/EnhanceApi';
import useSingleActionSubmit from '../../common/hooks/useSingleAction';
const formActions = createFormActions();
const queryColumns = setColumnsByLinks("/memberCenter/handling/confirm/pendingSubmit/detail")
const AllQuery = () => {
const ref = useRef<any>({});
const { submitLoadingID, onSingleAction } = useSingleActionSubmit()
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const { columns } = useColumnWithFilter(queryColumns, [
{
title: '操作',
render: (text, record) => {
const isLoading = submitLoadingID.includes(record.id);
return (
<Space>
<Button type="text" loading={isLoading} onClick={() => handleSingleReviewOrDelete({id: record.id})}>提交</Button>
</Space>
)
}
}
], filterRes);
const handleSingleReviewOrDelete = async (postData: { id: number }) => {
const service = PublicApi.postEnhanceProcessToBeSubmitExamExam
const { code } = await onSingleAction<PostEnhanceProcessToBeSubmitExamExamResponse>(service, postData)
if (code === 1000) {
formActions.submit();
}
}
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'待提交审核生产通知单'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceProcessToBeSubmitExamList, params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={basicSchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React, { useCallback, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space, Popconfirm } from 'antd';
import { basicSchema } from '../../common/schemas/confirmQuery';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { createFormActions } from '@formily/antd';
import setColumnsByLinks from '../../common/columns/comfrimOtherQuery';
import { PublicApi } from '@/services/api';
import useFetchData from '../../common/hooks/useFetchData';
import useFetchFilterData, { FilterResType } from '../../common/hooks/useFetchFilterData';
import useColumnWithFilter from '../../common/hooks/useColumnWithFilter';
import { Link } from 'umi'
import { DEPENDENT_DOC_PRODUCTION, DOC_TYPE_PROCESS_INVOICE } from '@/constants';
const formActions = createFormActions();
const queryColumns = setColumnsByLinks({
detail: "/memberCenter/handling/confirm/query/detail",
delivery: '/memberCenter/tranactionAbility/stockSellStorage/bills/detail'
})
const ADD_DELIVERY_PATH = '/memberCenter/tranactionAbility/stockSellStorage/bills/add';
const AllQuery = () => {
const ref = useRef<any>({});
const { fetchListData, onFormatSearchData } = useFetchData()
const { filterRes, fetchSelectOptions} = useFetchFilterData()
const { columns } = useColumnWithFilter(queryColumns, [
{
title: '操作',
render: (text, record) => {
return (
<Space>
<Link
to={`${ADD_DELIVERY_PATH}?relevanceInvoicesId=${record.id}&invoicesTypeId=${DOC_TYPE_PROCESS_INVOICE}&relevanceInvoices=${DEPENDENT_DOC_PRODUCTION}`}
>
新增加工发货单
</Link>
{/* <Popconfirm
title={`是否确认审核发货单号为${record.deliveryNo}的加工发货单?`}
visible={visibleID === record.id}
placement="left"
okText="确定"
cancelText="取消"
onCancel={handleCancel}
okButtonProps={{ loading: confirmLoading }}
onConfirm={() => handleExam(record.id, ExamType.delivery)}
>
<a onClick={() => handleVisible(record.id)}>审核</a>
</Popconfirm> */}
</Space>
)
}
}
], filterRes);
const handleSearch = useCallback((values: any) => {
const searchData = onFormatSearchData(values)
ref.current.reload(searchData)
}, [ref])
return (
<PageHeaderWrapper
title={'待新增加工发货单'}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
// rowSelection: selectRow
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(PublicApi.getEnhanceProcessToBeAddDeliveryList, params)}
controlRender={
<NiceForm
schema={basicSchema}
actions={formActions}
onSubmit={handleSearch}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'noticeNo', FORM_FILTER_PATH);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
......@@ -42,7 +42,7 @@ const Constract: React.FC<Iprops> = (props: Iprops) => {
<span className={styles.rowTitle}>{KEY_TITLE[record]}</span>
<div className={styles.rowValues}>
{
responseData[record].map((item, key) => {
responseData[record]?.map((item, key) => {
return (
<div className={styles.wrapCol} key={key}>
<div className={styles.colTitle}>{item.name}</div>
......
......@@ -81,7 +81,7 @@ const FundCenter: React.FC<Iprops> = () => {
<span className={styles.rowTitle}>{KEY_TO_TITLE[record]}</span>
<div className={styles.rowValues}>
{
responseData[record].map((item, key) => {
responseData[record]?.map((item, key) => {
return (
<div className={styles.wrapCol} key={key}>
<div className={styles.colTitle}>{item.name}</div>
......
......@@ -41,7 +41,7 @@ const ProcessCenter: React.FC<Iprops> = () => {
<span className={styles.rowTitle}>{KEY_TITLE[record]}</span>
<div className={styles.rowValues}>
{
responseData[record].map((_item, key) => {
responseData[record]?.map((_item, key) => {
return (
<div className={styles.wrapCol} key={key}>
<div className={styles.colTitle}>{_item.name}</div>
......
......@@ -85,7 +85,7 @@ const SettlementCenter: React.FC<Iprops> = () => {
<span className={styles.rowTitle}>{KEY_TITLE[record]}</span>
<div className={styles.rowValues}>
{
responseData[record].map((item, key) => {
responseData[record]?.map((item, key) => {
return (
<div className={styles.wrapCol} key={key}>
<div className={styles.colTitle}>{item.name}</div>
......
......@@ -53,7 +53,7 @@ const TradeCenter: React.FC<Iprops> = () => {
<span className={styles.rowTitle}>{KEY_TITLE[record]}</span>
<div className={styles.rowValues}>
{
responseData[record].map((item, key) => {
responseData[record]?.map((item, key) => {
return (
<div className={styles.wrapCol} key={key}>
<div className={styles.colTitle}>{item.name}</div>
......
......@@ -42,7 +42,6 @@ function useGetDetailCommon(options: Options) {
{
title: '考聘工单号',
value: 'theme',
},
{
title: '会员名称',
......
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