Commit 9b7432d2 authored by Bill's avatar Bill

fix: 修改加工入库单路由

parent c8c7dfb9
......@@ -38,7 +38,7 @@ const HandlingRoute = {
icon: 'smile',
component: '@/pages/handling/components/Query'
},
// 指派生产通知单 -> 新增成产通知单(新建)
// 指派生产通知单 -> 新增成产通知单(新建)
{
path: '/memberCenter/handling/assign/tobeAddQuery/add',
name: 'assignProductionAdd',
......@@ -105,6 +105,13 @@ const HandlingRoute = {
component: '@/pages/handling/assign/processStock',
// hideInMenu: true
},
{
path: '/memberCenter/handling/assign/pendingAddProcessing/detail',
name: 'processStockDetail',
icon: 'smile',
component: '@/pages/handling/assign/detail',
hideInMenu: true
},
// 指派生产通知单 -> 待收货生产通知单
{
path: '/memberCenter/handling/assign/pendingReceive',
......@@ -120,7 +127,7 @@ const HandlingRoute = {
component: '@/pages/handling/assign/detail',
hideInMenu: true,
},
]
},
// 确认生产通知单
......@@ -253,9 +260,7 @@ const HandlingRoute = {
},
]
}
]
}
export default HandlingRoute
\ No newline at end of file
export default HandlingRoute
......@@ -467,6 +467,7 @@ export default {
'menu.handling.assign.examineSecondDetail': '待审核生产通知单(二级)详情',
'menu.handling.assign.toBeSubmit': '待提交生产通知单',
'menu.handling.assign.processStock': '待新增加工入库单',
'menu.handling.assign.processStockDetail': '待新增加工入库单详情',
'menu.handling.assign.toBeRecieve': '待收货生产通知单',
'menu.handling.assign.createProcessStock': '新建加工入库单',
'menu.handling.assign.pendingSubmitDetail': '待提交生产通知单详情',
......@@ -592,7 +593,7 @@ export default {
'menu.afterService.repairManage.repairPrConfirm': '待确认维修申请单',
'menu.afterService.repairManage.repairPrConfirmDetail': '查看维修申请单',
'menu.afterService.repairManage.verifyRepairPrConfirm': '审核维修申请单',
// 结算能力
'menu.balance': '结算',
'menu.balance.settleRules': '结算规则配置',
......@@ -617,4 +618,4 @@ export default {
'menu.balance.accountsReceivable.logisticsDetail': '物流通知单结算明细',
'menu.balance.accountsReceivable.productNoticeSettlementDetail': '生产通知单结算明细',
'menu.balance.accountsReceivable.invoice': '开票管理',
};
\ No newline at end of file
};
......@@ -15,13 +15,14 @@ import { ReceiptDeliveryDetailsCard, StatisticsTab, DetailTab } from '../../comp
import { columns, orderDetailColumn, innerWorkFlowRecordColumn, outerWorkflowRecordsColumn, receiveColumns, pnoReceiveDeliverDetailDOListColumns } from './columns';
import ExamineModal from '../../components/ExamineModal';
import { FormOutlined } from '@ant-design/icons'
import {
ASSIGN_QUERY_DETAIL,
ASSIGN_TO_BE_ADD_QUERY_DETAIL,
ASSIGN_PENDING_FIRST_DETAIL,
ASSIGN_PENDING_SECOND_DETAIL,
ASSIGN_PENDING_SUBMIT_DETAIL,
import {
ASSIGN_QUERY_DETAIL,
ASSIGN_TO_BE_ADD_QUERY_DETAIL,
ASSIGN_PENDING_FIRST_DETAIL,
ASSIGN_PENDING_SECOND_DETAIL,
ASSIGN_PENDING_SUBMIT_DETAIL,
ASSIGN_PENDING_RECEIVE_DETAIL,
PENDING_ADD_PROCESS_PATH,
CONFIRM_QUERY_DETAIL,
CONFIRM_PENDING_SUBMIT_DETAIL,
CONFIRM_PENDING_FIRST_DETAIL,
......@@ -35,7 +36,7 @@ import {
} from '../../common';
import DeliverGood from '../../components/DeliverGood';
/**
* 进入详情页,根据不同的pathname 获取他们的service,
* 进入详情页,根据不同的pathname 获取他们的service,
* Assign 指的是指派通知单, comfirm 是确认通知单
*/
const SERVICE_MAP = {
......@@ -44,6 +45,7 @@ const SERVICE_MAP = {
[`${ASSIGN_PENDING_FIRST_DETAIL}`]: PublicApi.getEnhanceSupplierToBeFirstExamDetails,
[`${ASSIGN_PENDING_SECOND_DETAIL}`]: PublicApi.getEnhanceSupplierToBeSecondExamDetails,
[`${ASSIGN_PENDING_SUBMIT_DETAIL}`]: PublicApi.getEnhanceSupplierToBeSubmitDetails,
[`${PENDING_ADD_PROCESS_PATH}/detail`]: PublicApi.getEnhanceSupplierToBeAddStorageDetails,
[`${ASSIGN_PENDING_RECEIVE_DETAIL}`]: PublicApi.getEnhanceSupplierToBeReceiveDetails,
[`${CONFIRM_QUERY_DETAIL}`]: PublicApi.getEnhanceProcessAllDetails,
[`${CONFIRM_PENDING_SUBMIT_DETAIL}`]: PublicApi.getEnhanceProcessToBeSubmitExamDetails,
......@@ -150,16 +152,16 @@ const Detail: React.FC<{}> = () => {
const postData = status == 1 ? tempData : {...tempData, cause: text};
const deliverTarget = deliverAddressOption.filter((item) => item.value === activeAddress)[0];
const [fullAddress, shipperName, phone] = deliverTarget && deliverTarget.label.split("/")|| '';
const withDeliverAddress = isSetDeliverAddress
const withDeliverAddress = isSetDeliverAddress
? {
...postData,
...postData,
deliveryMessage: {
deliveryAddressId: activeAddress,
deliveryAddress: fullAddress,
deliveryUserName: shipperName,
deliveryUserTel: phone,
}
}
}
: postData
EXAM_SERVICE[pathname](withDeliverAddress)
.then(({code, data}) => {
......@@ -173,8 +175,8 @@ const Detail: React.FC<{}> = () => {
/**
* 统一的审核提交方法,比如审核一级单,审核二级单,提交审核
* @param service
* @param params
* @param service
* @param params
*/
const postService = (service, params) => {
setLoading(true)
......@@ -208,9 +210,9 @@ const Detail: React.FC<{}> = () => {
*/
const handleAllReceiptReceive = (status: boolean) => {
postService(
PublicApi.postEnhanceProcessToBeConfirmReceiptConfirmAllReceipt,
PublicApi.postEnhanceProcessToBeConfirmReceiptConfirmAllReceipt,
{
produceNoticeOrderId: id,
produceNoticeOrderId: id,
status: status
}
)
......@@ -219,28 +221,28 @@ const Detail: React.FC<{}> = () => {
const renderExtra = () => {
const ExamineComponent = (
<ExamineModal onOk={examOnOk} modalType={"basic"}>
<Button loading={loading} type="primary" >单据审核</Button>
<Button loading={loading} type="primary" >单据审核</Button>
</ExamineModal>
)
const SubmitBtn = <Button loading={loading} icon={<FormOutlined />} onClick={submit} type="primary"> 提交通知单</Button>
const NextBtn = <Button loading={loading} onClick={toNext}>提交</Button>
const AllReceiptReceive = (
<Space direction={"vertical"}>
<Popconfirm
title={hasProductNoDelievery ? '您还有未发货的商品,是否确认全部发货已完成' : '确认本单全部发货单是否已全部收到回单'}
<Popconfirm
title={hasProductNoDelievery ? '您还有未发货的商品,是否确认全部发货已完成' : '确认本单全部发货单是否已全部收到回单'}
onConfirm={() => handleAllReceiptReceive(true)}
>
<Button loading={loading} type="primary" style={{width: '100%'}}>确认本单全部发货单已收到回单</Button>
</Popconfirm>
<div style={{display: 'flex', justifyContent: 'flex-end'}}>
<Popconfirm
title={hasProductNoDelievery ? '是否继续发货' : '您商品都已发货,是否确认还需要继续发货'}
<Popconfirm
title={hasProductNoDelievery ? '是否继续发货' : '您商品都已发货,是否确认还需要继续发货'}
onConfirm={() => handleAllReceiptReceive(false)}
>
<Button loading={loading}>继续发货</Button>
</Popconfirm>
</div>
</Space>
)
......@@ -260,7 +262,7 @@ const Detail: React.FC<{}> = () => {
}
const handleConfirm = (status, params) => {
/**
/**
* 这里的5 是指外部状态(outerStatus)为5,1指的是(activeData.deliverStatus)为1,
* 1 可以是 deliverStatus, 也可以是receiveStatus 和 receiptStatus
*/
......@@ -288,10 +290,10 @@ const Detail: React.FC<{}> = () => {
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
<AvatarWrap
info={{
name: "通知单号:"
}}
}}
extra={(
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{info?.noticeNo}</span>
)}
......@@ -300,8 +302,8 @@ const Detail: React.FC<{}> = () => {
>
<Row>
<Col span={20}>
<Descriptions
column={3}
<Descriptions
column={3}
style={{padding: '0 32px', fontWeight: 400}}
colon={false}
>
......@@ -313,12 +315,12 @@ const Detail: React.FC<{}> = () => {
<StatusTag type={SUPPLIER_OUTER_STATUS_COLOR[info.outerStatus]} title={info.outerStatusName} />
</Descriptions.Item>
<Descriptions.Item label="内部状态:">
<Badge
<Badge
color={
isSupplier
isSupplier
? SUPPLIER_DETAIL_INNER_STATUS_COLOR[info?.supplierInnerStatus || 0]
: CONFIRM_DETAIL_INNER_STATUS_COLOR[info?.processInnerStatus || 0]
}
}
text={info.innerStatusName}></Badge>
</Descriptions.Item>
</Descriptions>
......@@ -332,7 +334,7 @@ const Detail: React.FC<{}> = () => {
pathname === (PENDING_DELIVERD_PATH + "/detail")
? (
<DeliverGood mode="view">
<Button loading={loading} type="primary" >手工发货</Button>
<Button loading={loading} type="primary" >手工发货</Button>
</DeliverGood>
)
: null
......@@ -351,7 +353,7 @@ const Detail: React.FC<{}> = () => {
<Card>
<h1 style={{fontSize: '16px', marginBottom: '16px'}}><strong>通知单明细</strong></h1>
<Table rowKey={"id"} dataSource={info?.details} columns={info.source === 2 ? orderDetailColumn : columns}/>
</Card>
</Card>
</div>
{/* 这里全部是走 非手工发货,当有手工发货按钮是,此时下面收发货明细隐藏 */}
......@@ -359,23 +361,23 @@ const Detail: React.FC<{}> = () => {
<ReceiptDeliveryDetailsCard>
<StatisticsTab tab="收发货统计" columns={receiveColumns(info.source === 2 ? 'product' : 'order')} dataSource={info.details}></StatisticsTab>
{
info.pnoReceiveDeliverDetailDOList &&
info.pnoReceiveDeliverDetailDOList &&
info.pnoReceiveDeliverDetailDOList.length > 0
? <DetailTab
tab="收发货明细"
columns={pnoReceiveDeliverDetailDOListColumns}
? <DetailTab
tab="收发货明细"
columns={pnoReceiveDeliverDetailDOListColumns}
dataSource={info.pnoReceiveDeliverDetailDOList}
handleConfirm={handleConfirm}
/>
: null
}
</ReceiptDeliveryDetailsCard>
</div>
<div style={{marginTop: '20px'}}>
<DeliveryInfomation
deliveryDate={info.deliveryDate}
deliveryType={info.deliveryType}
<DeliveryInfomation
deliveryDate={info.deliveryDate}
deliveryType={info.deliveryType}
receiveAddress={info.receiveAddress}
receiveUserName={info.receiveUserName}
receiveUserTel={info.receiveUserTel}
......@@ -387,7 +389,7 @@ const Detail: React.FC<{}> = () => {
deliverAddressOption={deliverAddressOption}
deliverAddressOnChange={deliverAddressOnChange}
/>
</div>
<div style={{marginTop: '20px'}}>
<Row justify="space-between">
......@@ -403,25 +405,25 @@ const Detail: React.FC<{}> = () => {
<Card bodyStyle={{padding: '10px 24px 24px 24px'}}>
<Tabs>
<TabPane tab="外部流转记录" key="1">
<Table
rowKey={"id"}
columns={outerWorkflowRecordsColumn}
dataSource={info.outerWorkflowRecordsList}
<Table
rowKey={"id"}
columns={outerWorkflowRecordsColumn}
dataSource={info.outerWorkflowRecordsList}
/>
</TabPane>
<TabPane tab="内部流转记录" key="2">
<Table
rowKey={"id"}
columns={innerWorkFlowRecordColumn}
<Table
rowKey={"id"}
columns={innerWorkFlowRecordColumn}
dataSource={info.innerWorkflowRecordsList}
/>
</TabPane>
</Tabs>
</Card>
</Card>
</div>
{/* <ProcessDetail /> */}
</PageHeaderWrapper>
)
}
export default Detail
\ No newline at end of file
export default Detail
......@@ -68,7 +68,7 @@ enum OuterAndInnerStatus {
/**
* 待新增加工入库单
*/
pending_add_process_in_warehouse = '6_18',
pending_add_process_in_warehouse = '6_19',
/**
* 待审核加工入库单
*/
......
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