Commit 858f14d9 authored by 前端-许佳敏's avatar 前端-许佳敏

feat: 新增流转记录状态变更

parent aea07993
......@@ -831,6 +831,72 @@ export const SaleOrderInsideWorkStateTexts = {
27: '待手工发货'
}
// 订单流转记录外部状态
export const OrderTransformOutWorkStateTexts = {
"-1": '取消订单',
1: '待确认',
2: '待确认电子合同',
3: '待支付',
4: '待确认支付结果',
5: '待新增销售发货单',
6: '待新增物流单',
7: '待确认发货订单',
8: '待新增采购入库单',
9: '待确认收货订单',
10: '待确认收货订单',
11: '待确认回单',
12: '待归档',
13: '待归档',
14: '不接受订单',
15: '确认未到账',
16: '待新增采购入库单',
17: '手工确认发货'
}
// 采购订单流转记录内部状态
export const PurchaseOrderTransformInsideWorkStateTexts = {
"-1": '取消订单',
1: '待提交审核',
2: '提交审核通过',
3: '审核通过',
4: '审核通过',
5: '审核通过',
6: '已确认电子合同',
7: '审核不通过',
8: '审核不通过',
9: '支付成功',
10: '支付失败',
11: '已审核采购入库单',
12: '已确认收货',
13: '订单归档完成',
14: '修改订单',
15: '手工收货'
}
// 销售订单流转记录内部状态
export const SaleOrderTransformInsideWorkStateTexts = {
"-1": '取消订单',
1: '审核通过',
2: '审核通过',
3: '审核通过',
4: '接受订单',
5: '确认到账',
6: '已审核销售发货单',
7: '接受物流单',
8: '已确认发货',
9: '已确认回单',
10: '已归档',
11: '审核不通过',
12: '审核不通过',
13: '不接受订单',
14: '确认未到账',
15: '审核不通过',
16: '不接受物流单'
}
export const PayOutWorkStateTexts = {
1: '待支付',
2: '待确认支付结果',
......
import React from 'react'
import { Tag } from 'antd'
import { PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkStateTexts, PurchaseOrderInsideWorkState, PurchaseOrderOutWorkState, SaleOrderInsideWorkState, SaleOrderInsideWorkStateTexts, PayOutWorkStateTexts, DeliverySideState, DeliverySideStateTexts, InquiryStateTexts } from '@/constants'
import { PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkStateTexts, PurchaseOrderInsideWorkState, PurchaseOrderOutWorkState, SaleOrderInsideWorkState, SaleOrderInsideWorkStateTexts, PayOutWorkStateTexts, DeliverySideState, DeliverySideStateTexts, InquiryStateTexts, OrderTransformOutWorkStateTexts, PurchaseOrderTransformInsideWorkStateTexts, SaleOrderTransformInsideWorkStateTexts } from '@/constants'
export interface IStatusColor {
[key: string]: {
......@@ -12,7 +12,7 @@ export interface IStatusColor {
// 用于标签状态控制
export interface StatusColorsProps {
status: number,
type: 'out' | 'inside' | 'saleInside' | 'payOut' | 'deliveInside' | 'inquiry'
type: 'out' | 'inside' | 'saleInside' | 'payOut' | 'deliveInside' | 'inquiry' | 'transformOut' | 'transformInside' | 'transformSaleInside'
}
export enum ORDER_EXAMINE_ENUM {
......@@ -94,6 +94,9 @@ const typeMaps = {
'payOut': PayOutWorkStateTexts,
'deliveInside': DeliverySideStateTexts,
'inquiry': InquiryStateTexts,
'transformOut': OrderTransformOutWorkStateTexts,
'transformInside': PurchaseOrderTransformInsideWorkStateTexts,
'transformSaleInside': SaleOrderTransformInsideWorkStateTexts
}
// 订单内部状态显示
......
......@@ -34,7 +34,7 @@ const OrderDetailSection:React.FC<OrderDetailSectionProps> = ({formContext, type
{ type === 'saleOrder' ? <OrderSaleRecord/> : <OrderDeleveRecord /> }
<OrderTransformRecord />
<OrderTransformRecord type={type}/>
</div>
)
}
......
......@@ -5,7 +5,9 @@ import { formatTimeString } from '@/utils'
import { OrderDetailContext } from '../../_public/order/context'
import MellowCard from '@/components/MellowCard'
export interface OrderTransformRecordProps {}
export interface OrderTransformRecordProps {
type: 'saleOrder' | 'purchaseOrder'
}
const outOrderCols: any[] = [
{
......@@ -26,7 +28,7 @@ const outOrderCols: any[] = [
dataIndex: 'state',
align: 'center',
key: 'state',
render: text => <StatusColors status={text} type='out'/>
render: text => <StatusColors status={text} type='transformOut'/>
// @todo 需传递工作流状态重新render
},
{
......@@ -49,7 +51,60 @@ const outOrderCols: any[] = [
key: 'auditOpinion',
},
]
const sideOrderCols: any[] = [
const PurchaseSideOrderCols: any[] = [
{
title: '流转记录',
dataIndex: 'no',
align: 'center',
key: 'no',
render: (_, __, index: number) => index + 1
},
{
title: '操作人',
dataIndex: 'roleName',
align: 'center',
key: 'roleName',
},
{
title: '部门',
dataIndex: 'department',
align: 'center',
key: 'department',
},
{
title: '职位',
dataIndex: 'position',
align: 'center',
key: 'position',
},
{
title: '状态',
dataIndex: 'state',
align: 'center',
key: 'state',
render: text => <StatusColors status={text} type='transformInside'/>
},
{
title: '操作',
dataIndex: 'operation',
align: 'center',
key: 'operation',
},
{
title: '操作时间',
dataIndex: 'operationTime',
align: 'center',
key: 'operationTime',
render: text => formatTimeString(text)
},
{
title: '审核意见',
dataIndex: 'auditOpinion',
align: 'center',
key: 'auditOpinion',
},
]
const SaleSideOrderCols: any[] = [
{
title: '流转记录',
dataIndex: 'no',
......@@ -80,7 +135,7 @@ const sideOrderCols: any[] = [
dataIndex: 'state',
align: 'center',
key: 'state',
render: text => <StatusColors status={text} type='inside'/>
render: text => <StatusColors status={text} type='transformSaleInside'/>
},
{
title: '操作',
......@@ -103,7 +158,7 @@ const sideOrderCols: any[] = [
},
]
// 订单流转记录
const OrderTransformRecord:React.FC<OrderTransformRecordProps> = (props) => {
const OrderTransformRecord:React.FC<OrderTransformRecordProps> = ({type}) => {
const { data } = useContext(OrderDetailContext)
const { externalProcurementOrderLogResponses, interiorProcurementOrderLogResponses } = data
return (
......@@ -119,7 +174,7 @@ const OrderTransformRecord:React.FC<OrderTransformRecordProps> = (props) => {
</Tabs.TabPane>
<Tabs.TabPane tab='内部订单流转记录' key="2">
<Table
columns={sideOrderCols}
columns={type === 'saleOrder' ? SaleSideOrderCols : PurchaseSideOrderCols}
dataSource={interiorProcurementOrderLogResponses}
pagination={false}
rowKey="id"
......
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