Commit e0b3f852 authored by Bill's avatar Bill

修改加工

parent 28a0b16c
...@@ -110,7 +110,7 @@ const HandlingRoute = { ...@@ -110,7 +110,7 @@ const HandlingRoute = {
path: '/memberCenter/handling/assign/pendingReceive', path: '/memberCenter/handling/assign/pendingReceive',
name: 'toBeRecieve', name: 'toBeRecieve',
icon: 'smile', icon: 'smile',
component: '@/pages/handling/components/Query' component: '@/pages/handling/assign/processStock'
}, },
// 指派生产通知单 -> 待收货生产通知单 // 指派生产通知单 -> 待收货生产通知单
{ {
...@@ -214,6 +214,15 @@ const HandlingRoute = { ...@@ -214,6 +214,15 @@ const HandlingRoute = {
icon: 'smile', icon: 'smile',
component: '@/pages/handling/assign/processStock', component: '@/pages/handling/assign/processStock',
}, },
// 待确认生产通知单 -> 待新增加工发货单详情
{
path: '/memberCenter/handling/confirm/processingInvoiceTobeAdd/detail',
name: 'processingInvoiceTobeAddDetail',
icon: 'smile',
component: '@/pages/handling/assign/detail',
hideInMenu: true
},
// 确认生产通知单 -> 新建加工发货单 // 确认生产通知单 -> 新建加工发货单
// { // {
// path: '/memberCenter/handling/confirm/createProcessInvoice', // path: '/memberCenter/handling/confirm/createProcessInvoice',
......
...@@ -482,6 +482,7 @@ export default { ...@@ -482,6 +482,7 @@ export default {
'menu.handling.confirm.pendingConfirm': '待确认生产通知单', 'menu.handling.confirm.pendingConfirm': '待确认生产通知单',
'menu.handling.confirm.pendingConfirmDetail': '待确认生产通知单详情', 'menu.handling.confirm.pendingConfirmDetail': '待确认生产通知单详情',
'menu.handling.confirm.processingInvoiceTobeAdd': '待新增加工发货单', 'menu.handling.confirm.processingInvoiceTobeAdd': '待新增加工发货单',
'menu.handling.confirm.processingInvoiceTobeAddDetail': '待新增加工发货单详情',
'menu.handling.confirm.pendingAddLogistics': '待新增物流单', 'menu.handling.confirm.pendingAddLogistics': '待新增物流单',
'menu.handling.confirm.pendingDelivered': '待发货生产通知单', 'menu.handling.confirm.pendingDelivered': '待发货生产通知单',
'menu.handling.confirm.pendingReceipt': '待确认回单生产通知单', 'menu.handling.confirm.pendingReceipt': '待确认回单生产通知单',
......
...@@ -218,4 +218,39 @@ export const receiveColumns: ColumnsType = [ ...@@ -218,4 +218,39 @@ export const receiveColumns: ColumnsType = [
title: '未发货', title: '未发货',
dataIndex: 'notDeliverNum' dataIndex: 'notDeliverNum'
} }
]; ];
\ No newline at end of file
export const pnoReceiveDeliverDetailDOListColumns = [
{
title: '订单号',
dataIndex: 'orderNo'
},
{
title: 'ID',
dataIndex: 'orderId'
},
{
title: '商品名称',
dataIndex: 'productName'
},
{
title: '品类',
dataIndex: 'category'
},
{
title: '品牌',
dataIndex: 'brand'
},
{
title: '单位',
dataIndex: 'unit'
},
{
title: '加工数量',
dataIndex: 'processNum'
},
{
title: '发货数量',
dataIndex: 'deliverNum'
}
]
\ No newline at end of file
...@@ -2,7 +2,7 @@ import React, {useState, useEffect, useCallback} from 'react'; ...@@ -2,7 +2,7 @@ import React, {useState, useEffect, useCallback} from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi'; import { history } from 'umi';
import AvatarWrap from '@/components/AvatarWrap'; import AvatarWrap from '@/components/AvatarWrap';
import { PageHeader, Descriptions, Card, Tabs, Row, Col, Button, Badge } from 'antd'; import { PageHeader, Descriptions, Card, Tabs, Row, Col, Button, Badge, Table } from 'antd';
import Circulation from '../../components/Circulation'; import Circulation from '../../components/Circulation';
import WrapTable from '../../components/WrapTable'; import WrapTable from '../../components/WrapTable';
import OtherRequirement from '../../components/OtherRequirement'; import OtherRequirement from '../../components/OtherRequirement';
...@@ -11,8 +11,9 @@ import { usePageStatus } from '@/hooks/usePageStatus' ...@@ -11,8 +11,9 @@ import { usePageStatus } from '@/hooks/usePageStatus'
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import DeliveryInfomation from '../../components/DeliveryInformation'; import DeliveryInfomation from '../../components/DeliveryInformation';
import ReceiptDeliveryDetails from '../../components/ReceiptDeliveryDetails';
import moment from 'moment'; import moment from 'moment';
import { columns, orderDetailColumn, innerWorkFlowRecordColumn, outerWorkflowRecordsColumn, receiveColumns } from './columns'; import { columns, orderDetailColumn, innerWorkFlowRecordColumn, outerWorkflowRecordsColumn, receiveColumns, pnoReceiveDeliverDetailDOListColumns } from './columns';
import ExamineModal from '../../components/ExamineModal'; import ExamineModal from '../../components/ExamineModal';
import { FormOutlined } from '@ant-design/icons' import { FormOutlined } from '@ant-design/icons'
import { import {
...@@ -44,14 +45,16 @@ const SERVICE_MAP = { ...@@ -44,14 +45,16 @@ const SERVICE_MAP = {
[`${CONFIRM_PENDING_SUBMIT_DETAIL}`]: PublicApi.getEnhanceProcessToBeSubmitExamDetails, [`${CONFIRM_PENDING_SUBMIT_DETAIL}`]: PublicApi.getEnhanceProcessToBeSubmitExamDetails,
[`${CONFIRM_PENDING_FIRST_DETAIL}`]: PublicApi.getEnhanceProcessToBeFirstExamDetails, [`${CONFIRM_PENDING_FIRST_DETAIL}`]: PublicApi.getEnhanceProcessToBeFirstExamDetails,
[`${CONFIRM_PENDING_SECOND_DETAIL}`]: PublicApi.getEnhanceProcessToBeSecondExamDetails, [`${CONFIRM_PENDING_SECOND_DETAIL}`]: PublicApi.getEnhanceProcessToBeSecondExamDetails,
[`${CONFIRM_PENDING_CONFIRM_DETAIL}`]: PublicApi.getEnhanceProcessToBeConfirmDetails [`${CONFIRM_PENDING_CONFIRM_DETAIL}`]: PublicApi.getEnhanceProcessToBeConfirmDetails,
'/memberCenter/handling/confirm/processingInvoiceTobeAdd/detail': PublicApi.getEnhanceProcessToBeAddDeliveryDetails,
} }
/** /**
* 审核链接 * 审核链接
*/ */
const EXAM_SERVICE = { const EXAM_SERVICE = {
[`${ASSIGN_QUERY_DETAIL}`]: PublicApi.postEnhanceSupplierToBeFirstExamExam, [`${ASSIGN_QUERY_DETAIL}`]: PublicApi.postEnhanceSupplierToBeAddSubmitExam,
[`${ASSIGN_PENDING_FIRST_DETAIL}`]: PublicApi.postEnhanceSupplierToBeFirstExamExam,
[`${ASSIGN_PENDING_SECOND_DETAIL}`]: PublicApi.postEnhanceSupplierToBeSecondExamExam, [`${ASSIGN_PENDING_SECOND_DETAIL}`]: PublicApi.postEnhanceSupplierToBeSecondExamExam,
[`${CONFIRM_PENDING_SUBMIT_DETAIL}`]: PublicApi.postEnhanceProcessToBeSubmitExamExam, [`${CONFIRM_PENDING_SUBMIT_DETAIL}`]: PublicApi.postEnhanceProcessToBeSubmitExamExam,
[`${CONFIRM_PENDING_FIRST_DETAIL}`]: PublicApi.postEnhanceProcessToBeFirstExamExam, [`${CONFIRM_PENDING_FIRST_DETAIL}`]: PublicApi.postEnhanceProcessToBeFirstExamExam,
...@@ -239,21 +242,17 @@ const Detail: React.FC<{}> = () => { ...@@ -239,21 +242,17 @@ const Detail: React.FC<{}> = () => {
<div style={{marginTop: '20px'}}> <div style={{marginTop: '20px'}}>
<Card> <Card>
<h1 style={{fontSize: '16px', marginBottom: '16px'}}><strong>通知单明细</strong></h1> <h1 style={{fontSize: '16px', marginBottom: '16px'}}><strong>通知单明细</strong></h1>
<WrapTable dataSource={info?.details} columns={info.source === 2 ? orderDetailColumn : columns}/> <Table rowKey={"id"} dataSource={info?.details} columns={info.source === 2 ? orderDetailColumn : columns}/>
</Card> </Card>
</div> </div>
<div style={{marginTop: '20px', display: info.pnoReceiveDeliverDetailDOList?.length > 0 ? 'block' : 'none'}}> <div style={{marginTop: '20px', display: info.pnoReceiveDeliverDetailDOList?.length > 0 ? 'block' : 'none'}}>
<Card bodyStyle={{padding: '10px 24px 24px 24px'}}> <ReceiptDeliveryDetails
<Tabs> statisticsColumn={receiveColumns}
<TabPane tab="收发货统计" key="1"> statisticsData={info.details}
<WrapTable columns={receiveColumns} dataSource={info?.details} /> pnoReceiveDeliverDetailDOList={info.pnoReceiveDeliverDetailDOList}
</TabPane> pnoReceiveDeliverDetailColumns={pnoReceiveDeliverDetailDOListColumns}
<TabPane tab="收发货明细" key="2"> />
<WrapTable dataSource={[]} />
</TabPane>
</Tabs>
</Card>
</div> </div>
<div style={{marginTop: '20px'}}> <div style={{marginTop: '20px'}}>
<DeliveryInfomation <DeliveryInfomation
......
import React, { useRef, useCallback } from 'react'; import React, { useRef, useCallback, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space, Button } from 'antd'; import { Card, Space, Button, Popconfirm } from 'antd';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
...@@ -18,76 +18,38 @@ import { DOC_TYPE_PROCESS_INVOICE, DEPENDENT_DOC_PRODUCTION } from '@/constants' ...@@ -18,76 +18,38 @@ import { DOC_TYPE_PROCESS_INVOICE, DEPENDENT_DOC_PRODUCTION } from '@/constants'
const formActions = createFormActions(); const formActions = createFormActions();
const ADD_PROCESS_PATH = '/memberCenter/tranactionAbility/stockSellStorage/bills/add'; const ADD_PROCESS_PATH = '/memberCenter/tranactionAbility/stockSellStorage/bills/add';
const ADD_DELIVERY_PATH = '/memberCenter/tranactionAbility/stockSellStorage/bills/add'; const ADD_DELIVERY_PATH = '/memberCenter/tranactionAbility/stockSellStorage/bills/add';
const ADD_LOGISTICS_PATH = '/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add';
const TITLE = { const TITLE = {
'/memberCenter/handling/assign/pendingAddProcessing': "待新建加工入库单", '/memberCenter/handling/assign/pendingAddProcessing': "待新建加工入库单",
'/memberCenter/handling/confirm/processingInvoiceTobeAdd': "待新增加工发货单", '/memberCenter/handling/confirm/processingInvoiceTobeAdd': "待新增加工发货单",
'/memberCenter/handling/confirm/pendingAddLogistics': "待新增物流单", '/memberCenter/handling/confirm/pendingAddLogistics': "待新增物流单",
'/memberCenter/handling/confirm/pendingDelivered': "待发货生产通知单", '/memberCenter/handling/confirm/pendingDelivered': "待发货生产通知单",
'/memberCenter/handling/confirm/pendingReceipt': "待确认回单生产通知单" '/memberCenter/handling/confirm/pendingReceipt': "待确认回单生产通知单",
'/memberCenter/handling/assign/pendingReceive': "待确认收货生产通知单",
} }
const columns: ColumnsType = [
{
title: '通知单号',
dataIndex: 'noticeNo',
render: (text) => {
return (
<EyePreview url={"/memberCenter/handling/assign/query"} >{text}</EyePreview>
)
}
},
{ title: '通知单摘要', dataIndex: 'summary'},
{ title: '加工企业名称', dataIndex: 'processName' },
{ title: '供应会员', dataIndex: 'supplierName'},
{
title: '单据时间',
dataIndex: 'createTime',
render: (text, record) => {
return moment(text).format('YYYY-MM-DD HH:mm:ss')
}
},
{ title: '发货批次', dataIndex: 'deliveryBatch'},
{
title: '入库单号',
dataIndex: 'storageNo',
render: (text) => {
return (
<EyePreview url="/" >{text}</EyePreview>
)
}
},
{ title: '外部状态', dataIndex: 'outerStatusName'},
{ title: '内部状态', dataIndex: 'innerStatusName'},
{
title: '操作',
dataIndex: 'action',
render: (text, record: any) => {
// 这里暂时不知道status的状态, 先用内部状态判断, 审核的先不处理, 感觉应该用入库单号去判断吧
const MAP = {
'待新增加工发货单': <Link to={`${ADD_PROCESS_PATH}?relevanceInvoicesId=${record.id}&invoicesTypeId=${DOC_TYPE_PROCESS_INVOICE}&relevanceInvoices=${DEPENDENT_DOC_PRODUCTION}
`}>新增加工发货单</Link>,
'待审核加工发货单': <a>待审核加工发货单</a>,
'新增加工入库单': <Link to={ADD_DELIVERY_PATH}>新增加工入库单</Link>,
'审核加工入库单': <a>审核加工入库单</a>
}
return MAP[record.innerStatusName]
}
}
]
const SERVICE_MAPS = { const SERVICE_MAPS = {
///enhance/process/toBeAddDelivery/list
'/memberCenter/handling/assign/pendingAddProcessing': PublicApi.getEnhanceSupplierToBeAddStorageList, '/memberCenter/handling/assign/pendingAddProcessing': PublicApi.getEnhanceSupplierToBeAddStorageList,
'/memberCenter/handling/confirm/processingInvoiceTobeAdd': PublicApi.getEnhanceProcessToBeAddDeliveryList, '/memberCenter/handling/confirm/processingInvoiceTobeAdd': PublicApi.getEnhanceProcessToBeAddDeliveryList,
'/memberCenter/handling/confirm/pendingAddLogistics': PublicApi.getEnhanceProcessToBeAddLogisticsList, '/memberCenter/handling/confirm/pendingAddLogistics': PublicApi.getEnhanceProcessToBeAddLogisticsList,
'/memberCenter/handling/confirm/pendingDelivered': PublicApi.getEnhanceSupplierToBeReceiveList, '/memberCenter/handling/confirm/pendingDelivered': PublicApi.getEnhanceSupplierToBeReceiveList,
'/memberCenter/handling/confirm/pendingReceipt': PublicApi.getEnhanceProcessToBeConfirmReceiptList '/memberCenter/handling/confirm/pendingReceipt': PublicApi.getEnhanceProcessToBeConfirmReceiptList,
'/memberCenter/handling/assign/pendingReceive': PublicApi.getEnhanceSupplierToBeReceiveList
} }
enum ExamType {
delivery = "deliver", //加工发货单
warehouseReceipt = 'warehouseReceipt', // 加工入库单
}
const processStock: React.FC<{}> = () => { const processStock: React.FC<{}> = () => {
const ref = useRef<any>({}); const ref = useRef<any>({});
const pathname = history.location.pathname; const pathname = history.location.pathname;
const [confirmLoading, setConfirmLoading] = useState<boolean>(false);
const [visibleID, setVisibleID] = useState<null|number>(null);
const fetchData = useCallback(async (params: any) => { const fetchData = useCallback(async (params: any) => {
const { docTime, ...rest } = params; const { docTime, ...rest } = params;
const {st, et} = timeRange(docTime); const {st, et} = timeRange(docTime);
...@@ -100,6 +62,146 @@ const processStock: React.FC<{}> = () => { ...@@ -100,6 +62,146 @@ const processStock: React.FC<{}> = () => {
return res.data; return res.data;
}, [pathname]); }, [pathname]);
const columns: ColumnsType = [
{
title: '通知单号',
dataIndex: 'noticeNo',
render: (text, record: any) => {
return (
<EyePreview url={`${pathname}/detail?id=${record.id}`} >{text}</EyePreview>
)
}
},
{ title: '通知单摘要', dataIndex: 'summary'},
{ title: '加工企业名称', dataIndex: 'processName' },
{ title: '供应会员', dataIndex: 'supplierName'},
{
title: '单据时间',
dataIndex: 'createTime',
render: (text, record) => {
return moment(text).format('YYYY-MM-DD HH:mm:ss')
}
},
{ title: '发货批次', dataIndex: 'deliveryBatch'},
{
title: '入库单号',
dataIndex: 'deliveryNo',
render: (text) => {
if(!text) {
return null
}
return (
<EyePreview url="/" >{text}</EyePreview>
)
}
},
{ title: '外部状态', dataIndex: 'outerStatusName'},
{ title: '内部状态', dataIndex: 'innerStatusName'},
{
title: '操作',
dataIndex: 'action',
render: (text, record: any) => {
// 这里暂时不知道status的状态, 先用内部状态判断, 审核的先不处理, 感觉应该用入库单号去判断吧
const MAP = {
'待新增加工发货单': (
<Link
to={`${ADD_PROCESS_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={() => handleExamDelivery(record.id, ExamType.delivery)}
>
<a onClick={() => handleVisible(record.id)}>审核</a>
</Popconfirm>
),
'新增加工入库单': <Link to={ADD_DELIVERY_PATH}>新增加工入库单</Link>,
'审核加工入库单': (
<Popconfirm
title={`是否确认审核入库单号为${record.deliveryNo}的加工入库单?`}
visible={visibleID === record.id}
placement="left"
okText="确定"
cancelText="取消"
onCancel={handleCancel}
okButtonProps={{ loading: confirmLoading }}
onConfirm={() => handleExamDelivery(record.id, ExamType.warehouseReceipt)}
>
<a onClick={() => handleVisible(record.id)}>审核</a>
</Popconfirm>
),
'待新增物流单': <Link to={`${ADD_LOGISTICS_PATH}`}>新增</Link>,
'待确认物流单': <a>查看</a>,
'待收货通知单': <Link to={'/memberCenter/handling/assign/pendingReceive/detail'}>收货</Link>
}
return MAP[record.innerStatusName]
}
}
]
/**
* 审核加工发货单
* /enhance/process/toBeAddDelivery/exam 待新增发货单
* /enhance/supplier/toBeAddStorage/exam 待新增入库单
* @param id 审核单id
* @param type deliver | warehouseReceipt
*/
const handleExamDelivery = (id: number, type: string) => {
const exam_service = {
[ExamType.delivery]: PublicApi.postEnhanceProcessToBeAddDeliveryExam,
[ExamType.warehouseReceipt]: PublicApi.postEnhanceSupplierToBeAddStorageExam,
}
console.log(type);
setConfirmLoading(true)
exam_service[type]({id})
.then(({code, data}) => {
setConfirmLoading(false);
setVisibleID(null)
if(code === 1000) {
formActions.submit();
}
})
}
/**
* 查询
* @params values 表单字段
*/
const handleSearch = useCallback((values: any) => {
const {docTime, ...rest} = values;
const {st, et} = timeRange(docTime);
let searchData = {
...rest,
startTime: st,
endTtime: et
}
console.log(searchData)
ref.current.reload(searchData)
}, [ref])
/**
* Popconfirm Visible 单一原则
*/
const handleVisible = (id:number) => {
setVisibleID(id)
}
/**
* Popconfirm Cancel
*/
const handleCancel = () => {
setVisibleID(null);
}
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
...@@ -108,7 +210,7 @@ const processStock: React.FC<{}> = () => { ...@@ -108,7 +210,7 @@ const processStock: React.FC<{}> = () => {
<Card> <Card>
<StandardTable <StandardTable
tableProps={{ tableProps={{
rowKey: 'memberId', rowKey: 'id',
}} }}
columns={columns} columns={columns}
currentRef={ref} currentRef={ref}
...@@ -116,7 +218,7 @@ const processStock: React.FC<{}> = () => { ...@@ -116,7 +218,7 @@ const processStock: React.FC<{}> = () => {
controlRender={ controlRender={
<NiceForm <NiceForm
actions={formActions} actions={formActions}
onSubmit={values => ref.current.reload(values)} onSubmit={handleSearch}
effects={($, actions) => { effects={($, actions) => {
useStateFilterSearchLinkageEffect($,actions,'noticeNo',FORM_FILTER_PATH); useStateFilterSearchLinkageEffect($,actions,'noticeNo',FORM_FILTER_PATH);
}} }}
......
...@@ -158,7 +158,7 @@ export const FILTER_NAMES = { ...@@ -158,7 +158,7 @@ export const FILTER_NAMES = {
export const DETAIL_PATH = { export const DETAIL_PATH = {
[QUERY_PATH]: ASSIGN_QUERY_DETAIL, [QUERY_PATH]: ASSIGN_QUERY_DETAIL,
[TO_BE_ADD_QUERY_PATH]: ASSIGN_TO_BE_ADD_QUERY_DETAIL, [TO_BE_ADD_QUERY_PATH]: ASSIGN_TO_BE_ADD_QUERY_DETAIL,
[PENDING_FIRST]: CONFIRM_PENDING_FIRST_DETAIL, [PENDING_FIRST]: ASSIGN_PENDING_FIRST_DETAIL,
[PENDING_SECOND]: ASSIGN_PENDING_SECOND_DETAIL, [PENDING_SECOND]: ASSIGN_PENDING_SECOND_DETAIL,
[PENDING_SUBMIT]: ASSIGN_PENDING_SUBMIT, [PENDING_SUBMIT]: ASSIGN_PENDING_SUBMIT,
[PENDING_RECEIVE]: ASSIGN_PENDING_RECEIVE_DETAIL, [PENDING_RECEIVE]: ASSIGN_PENDING_RECEIVE_DETAIL,
......
...@@ -29,7 +29,7 @@ const Circulation: React.FC<Iprops> = (props) => { ...@@ -29,7 +29,7 @@ const Circulation: React.FC<Iprops> = (props) => {
<TabPane tab="外部流转" key="1"> <TabPane tab="外部流转" key="1">
<Steps progressDot={customDot} style={{marginTop: '20px'}}> <Steps progressDot={customDot} style={{marginTop: '20px'}}>
{ {
outerTaskList.map((item: Istatus) => { outerTaskList && outerTaskList.map((item: Istatus) => {
return ( return (
<Step title={item.taskName} status={item.isExecute == 1 ? 'finish' : 'wait'} description={item.roleName} key={item.step} /> <Step title={item.taskName} status={item.isExecute == 1 ? 'finish' : 'wait'} description={item.roleName} key={item.step} />
) )
...@@ -41,7 +41,7 @@ const Circulation: React.FC<Iprops> = (props) => { ...@@ -41,7 +41,7 @@ const Circulation: React.FC<Iprops> = (props) => {
<TabPane tab="内部流转" key="2"> <TabPane tab="内部流转" key="2">
<Steps progressDot={customDot} style={{marginTop: '20px'}}> <Steps progressDot={customDot} style={{marginTop: '20px'}}>
{ {
innerTaskList.map((item: Istatus) => { innerTaskList && innerTaskList.map((item: Istatus) => {
return ( return (
<Step title={item.taskName} status={item.isExecute == 1 ? 'finish' : 'wait'} description={item.roleName} key={item.step} /> <Step title={item.taskName} status={item.isExecute == 1 ? 'finish' : 'wait'} description={item.roleName} key={item.step} />
) )
......
.header {
background: #F7F8FA;
padding: 25px 24px;
margin: 24px 0;
font-size: 12px;
.detailItem {
margin-bottom: 16px;
}
.heightLight {
color: @main-color;
}
.title {
margin-right: 40px;
color: #909399;
}
.status {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.action {
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
color: #C0C4CC;;
}
}
\ No newline at end of file
import React, { useEffect, useState } from 'react';
import { Card, Tabs, Table, Radio, Row, Col } from 'antd';
import _groupBy from 'lodash/groupBy';
import styles from './index.less';
import classname from 'classnames';
import moment from 'moment';
const TabPane = Tabs.TabPane;
const format = 'YYYY-MM-DD HH:mm:ss';
const ReceiptDeliveryDetails = (props) => {
const { statisticsColumn, statisticsData, pnoReceiveDeliverDetailDOList = [], pnoReceiveDeliverDetailColumns } = props;
const [activeBatch, setActiveBatch] = useState(0);
const [activeData, setActiveData] = useState<any>({});
useEffect(() => {
if(pnoReceiveDeliverDetailDOList && pnoReceiveDeliverDetailDOList.length > 0) {
setActiveData(pnoReceiveDeliverDetailDOList[0])
}
}, [pnoReceiveDeliverDetailDOList])
const handleOnChange = (e) => {
setActiveBatch(e.target.value)
setActiveData(pnoReceiveDeliverDetailDOList[e.target.value])
}
return (
<Card bodyStyle={{padding: '10px 24px 24px 24px'}}>
<Tabs>
<TabPane tab="收发货统计" key="1">
<Table rowKey={"id"} columns={statisticsColumn} dataSource={statisticsData} />
</TabPane>
<TabPane tab="收发货明细" key="2">
<div >
<Radio.Group value={activeBatch} onChange={handleOnChange}>
{
pnoReceiveDeliverDetailDOList && pnoReceiveDeliverDetailDOList.map((item, key) => {
return (
<Radio.Button key={item.deliveryBatch} value={key}>{item.deliveryBatch} 批次</Radio.Button>
)
})
}
</Radio.Group>
</div>
<div >
<div className={styles.header}>
<Row>
<Col span={6}>
<div className={styles.detailItem}>
<span className={styles.title}>发货单号</span>
<a className={classname(styles.value)}>{activeData.deliveryNo}</a>
</div>
<div>
<span className={styles.title}>发货时间</span>
<span className={styles.value}>{activeData.deliveryTime && moment(activeData.deliveryTime).format(format)}</span>
</div>
</Col>
<Col span={6}>
<div className={styles.detailItem}>
<span className={styles.title}>物流单号</span>
<a className={styles.value}>{activeData.logisticsOrderNo}</a>
</div>
<div>
<span className={styles.title}>物流公司</span>
<span className={styles.value}>{activeData.logisticsCompany}</span>
</div>
</Col>
<Col span={6}>
<div className={styles.detailItem}>
<span className={styles.title}>入库单号</span>
<span className={styles.value}>{activeData.storageNo}</span>
</div>
<div>
<span className={styles.title}>入库时间</span>
<span className={styles.value}>{activeData.storageTime && moment(activeData.storageTime).format(format)}</span>
</div>
</Col>
<Col span={4} className={styles.status}>
<div>
<span className={styles.title}>内部状态</span>
<span className={styles.value}>{activeData.deliverStatus}</span>
</div>
</Col>
<Col span={2} className={styles.action}>
<div>
确认回单
</div>
</Col>
</Row>
</div>
<Table
dataSource={activeData.pnoReceiveDeliverDetailProductBOList}
rowKey={"orderNo"}
columns={pnoReceiveDeliverDetailColumns}
/>
</div>
</TabPane>
</Tabs>
</Card>
)
}
export default ReceiptDeliveryDetails;
\ No newline at end of file
...@@ -20,9 +20,9 @@ import { ...@@ -20,9 +20,9 @@ import {
PENDING_SECOND_VIEW_PATH, PENDING_SECOND_VIEW_PATH,
PENDING_CONFIRM_PATH, PENDING_CONFIRM_PATH,
PROCESS_INVOICE_TO_BE_ADD_PATH, //以上代表路径 PROCESS_INVOICE_TO_BE_ADD_PATH, //以上代表路径
PENDING_ADD_LOGISTICS_PATH, // PENDING_ADD_LOGISTICS_PATH,
PENDING_DELIVERED_PATH, // PENDING_DELIVERED_PATH,
PENDING_RECEIPT_PATH, // PENDING_RECEIPT_PATH,
} from './contants'; } from './contants';
import { timeRange } from '@/utils'; import { timeRange } from '@/utils';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
...@@ -33,16 +33,16 @@ import ExamineModal from '../../components/ExamineModal'; ...@@ -33,16 +33,16 @@ import ExamineModal from '../../components/ExamineModal';
const formActions = createFormActions(); const formActions = createFormActions();
// 根据 lastTypeParams, 获取相对应的schema // 根据 lastTypeParams, 获取相对应的schema
export const SCHEMAS = { export const SCHEMAS = {
[PATH]: querySchema, [PATH]: querySchema,
[PENDING_VIEW_PATH]: basicSchema, // 待新增生产通知 [PENDING_VIEW_PATH]: basicSchema, // 待新增生产通知
[PENDING_FIRST_VIEW_PATH]: pendingFirstQuerySchema, [PENDING_FIRST_VIEW_PATH]: pendingFirstQuerySchema,
[PENDING_SECOND_VIEW_PATH]: pendingFirstQuerySchema, [PENDING_SECOND_VIEW_PATH]: pendingFirstQuerySchema,
[PENDING_CONFIRM_PATH]: basicSchema, // 带审核生产通知单 [PENDING_CONFIRM_PATH]: basicSchema, // 带审核生产通知单
[PROCESS_INVOICE_TO_BE_ADD_PATH]: basicSchema, [PROCESS_INVOICE_TO_BE_ADD_PATH]: basicSchema,
[PENDING_ADD_LOGISTICS_PATH]: basicSchema, // [PENDING_ADD_LOGISTICS_PATH]: basicSchema,
[PENDING_DELIVERED_PATH]: basicSchema, // [PENDING_DELIVERED_PATH]: basicSchema,
[PENDING_RECEIPT_PATH]: basicSchema // [PENDING_RECEIPT_PATH]: basicSchema
} }
console.log(basicSchema); console.log(basicSchema);
...@@ -53,9 +53,9 @@ const SERVICES = { ...@@ -53,9 +53,9 @@ const SERVICES = {
[PENDING_FIRST_VIEW_PATH]: PublicApi.getEnhanceProcessToBeFirstExamList, [PENDING_FIRST_VIEW_PATH]: PublicApi.getEnhanceProcessToBeFirstExamList,
[PENDING_SECOND_VIEW_PATH]: PublicApi.getEnhanceProcessToBeSecondExamList, [PENDING_SECOND_VIEW_PATH]: PublicApi.getEnhanceProcessToBeSecondExamList,
[PENDING_CONFIRM_PATH]: PublicApi.getEnhanceProcessToBeConfirmList, [PENDING_CONFIRM_PATH]: PublicApi.getEnhanceProcessToBeConfirmList,
[PROCESS_INVOICE_TO_BE_ADD_PATH]: PublicApi.getEnhanceProcessToBeAddDeliveryList, // [PROCESS_INVOICE_TO_BE_ADD_PATH]: PublicApi.getEnhanceProcessToBeAddDeliveryList,
[PENDING_ADD_LOGISTICS_PATH]: PublicApi.getEnhanceProcessToBeAddLogisticsList, // [PENDING_ADD_LOGISTICS_PATH]: PublicApi.getEnhanceProcessToBeAddLogisticsList,
[PENDING_RECEIPT_PATH]: PublicApi.getEnhanceProcessToBeConfirmReceiptList // [PENDING_RECEIPT_PATH]: PublicApi.getEnhanceProcessToBeConfirmReceiptList
} }
const Query: React.FC<{}> = (props) => { const Query: React.FC<{}> = (props) => {
...@@ -124,23 +124,24 @@ const Query: React.FC<{}> = (props) => { ...@@ -124,23 +124,24 @@ const Query: React.FC<{}> = (props) => {
title: '操作', title: '操作',
render: (text, record: any) => { render: (text, record: any) => {
const url = pathname + "/detail"; const url = pathname + "/detail";
console.log(url);
const actionMap = { const actionMap = {
[PENDING_VIEW_PATH]: <Link to={`${url}?id=${record.id}`}>提交审核</Link>, [PENDING_VIEW_PATH]: <Link to={`${url}?id=${record.id}`}>提交审核</Link>,
[PENDING_FIRST_VIEW_PATH]: <Link to={`${url}?id=${record.id}`}>审核</Link>, [PENDING_FIRST_VIEW_PATH]: <Link to={`${url}?id=${record.id}`}>审核</Link>,
[PENDING_SECOND_VIEW_PATH]: <Link to={`${url}?id=${record.id}`}>审核</Link>, [PENDING_SECOND_VIEW_PATH]: <Link to={`${url}?id=${record.id}`}>审核</Link>,
[PENDING_CONFIRM_PATH]: <Link to={`${url}?id=${record.id}`}>确认通知单</Link>, [PENDING_CONFIRM_PATH]: <Link to={`${url}?id=${record.id}`}>确认通知单</Link>,
[PROCESS_INVOICE_TO_BE_ADD_PATH]: ( // [PROCESS_INVOICE_TO_BE_ADD_PATH]: (
record.status == 0 // record.status == 0
? <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/add`}>新增加工发货单</Link> // ? <Link to={`/memberCenter/tranactionAbility/stockSellStorage/bills/add`}>新增加工发货单</Link>
: <a>确认审核</a> // : <a>确认审核</a>
), // ),
[PENDING_ADD_LOGISTICS_PATH]: ( // [PENDING_ADD_LOGISTICS_PATH]: (
record.status == 0 // record.status == 0
? <Link to={`/memberCenter/handling/confirm/createLogisticsOrder`}>新增物流单</Link> // ? <Link to={`/memberCenter/handling/confirm/createLogisticsOrder`}>新增物流单</Link>
: <Link to={`/memberCenter/handling/confirm/createLogisticsOrder`}>查看物流单</Link> // : <Link to={`/memberCenter/handling/confirm/createLogisticsOrder`}>查看物流单</Link>
), // ),
[PENDING_DELIVERED_PATH]: <Link to={`${url}?id=${record.id}`}>发货</Link>, // [PENDING_DELIVERED_PATH]: <Link to={`${url}?id=${record.id}`}>发货</Link>,
[PENDING_RECEIPT_PATH]: <Link to={`${url}?id=${record.id}`}>确认回单</Link> // [PENDING_RECEIPT_PATH]: <Link to={`${url}?id=${record.id}`}>确认回单</Link>
} }
return ( return (
<Space> <Space>
......
...@@ -56,8 +56,8 @@ const UserCenter: React.FC<Iprops> = () => { ...@@ -56,8 +56,8 @@ const UserCenter: React.FC<Iprops> = () => {
{ {
userAuth.roles.map((item, key) => { userAuth.roles.map((item, key) => {
return ( return (
<div style={{marginRight: '8px'}}> <div style={{marginRight: '8px'}} key={key}>
<StatusTag type="success" key={key} title={item.memberRoleName} /> <StatusTag type="success" title={item.memberRoleName} />
</div> </div>
) )
}) })
......
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