Commit 7490be07 authored by Gavin Peng's avatar Gavin Peng

暂存

parent 8220859e
......@@ -8,12 +8,12 @@ export const CommodityIdColumn: any = {
title: '商品ID',
dataIndex: 'skuId',
key: 'skuId',
align: 'center',
// align: 'center',
}
export const CommodityNoColumn: any = {
title: '商品编号',
align: 'center',
// align: 'center',
}
......@@ -28,7 +28,7 @@ export const MaterialNoColumn: any = {
title: '物料编号',
dataIndex: 'skuId',
key: 'skuId',
align: 'center',
// align: 'center',
}
export const MaterialNameColumn: any = {
......@@ -42,7 +42,7 @@ export const MaterialModelColumn: any = {
title: '规格型号',
dataIndex: 'spec',
key: 'spec',
align: 'center',
// align: 'center',
}
export const ClassColumn: any = {
......@@ -70,17 +70,17 @@ export const OrderNoColumn: any = {
title: '订单号',
dataIndex: 'orderNo',
key: 'orderNo',
align: 'center',
// align: 'center',
}
export const OrderSummaryColumn: any = {
title: '订单摘要',
align: 'center',
// align: 'center',
}
export const OrderCreatedAtColumn: any = {
title: '下单时间',
align: 'center',
// align: 'center',
render: (txt, rcoed) => dayjs(rcoed.createTime).format('YYYY-MM-DD HH:mm:ss')
}
......@@ -88,104 +88,104 @@ export const OrderNumColumn: any = {
title: '订单数量',
dataIndex: 'purchaseCount',
key: 'purchaseCount',
align: 'center',
// align: 'center',
}
export const DeliveryNumColumn: any = {
title: '送货数量',
width: 100,
align: 'center',
// align: 'center',
}
export const ConsigneeNumColumn: any = {
title: '收货数量',
align: 'center',
// align: 'center',
}
export const TransitNumColumn: any = {
title: '在途数量',
align: 'center',
// align: 'center',
render: (txt, rcoed) => txt
}
export const DeliveredNumColumn: any = {
title: '待送货数量',
align: 'center',
// align: 'center',
}
export const PlannedDeliveryNumColumn: any = {
title: '计划送货数量',
align: 'center',
// align: 'center',
}
export const FlowOnColumn: any = {
title: '流转顺序号',
align: 'center',
// align: 'center',
}
export const FlowRoleColumn: any = {
title: '操作角色',
align: 'center',
// align: 'center',
}
export const FlowStatusColumn = {
title: '状态',
align: 'center',
// align: 'center',
}
export const FlowOptionsColumn: any = {
title: '操作',
align: 'center',
// align: 'center',
}
export const FlowOptionsTimeColumn: any = {
title: '操作时间',
align: 'center',
// align: 'center',
}
export const FlowNoteColumn: any = {
title: '备注',
align: 'center',
// align: 'center',
}
export const PlanNumberColumn: any = {
title: '计划编号',
align: 'center',
// align: 'center',
}
export const PlanSummaryColumn: any = {
title: '计划摘要',
align: 'center',
// align: 'center',
}
export const PlannedStartDateColumn: any = {
title: '计划开始日期',
align: 'center',
// align: 'center',
}
export const PlannedEndDateColumn: any = {
title: '计划结束日期',
align: 'center',
// align: 'center',
}
export const SupplyMemberColumn: any = {
title: '供应会员',
align: 'center',
// align: 'center',
}
export const PurchasingMemberColumn: any = {
title: '采购会员',
align: 'center',
// align: 'center',
}
export const ExternalStateColumn: any = {
title: '外部状态',
align: 'center',
// align: 'center',
}
export const OperationColumn: any = {
title: '操作',
align: 'center',
// align: 'center',
}
......
......@@ -34,6 +34,13 @@ export const deliveryPlanCollaborationAwaitSchema: ISchema = {
},
},
properties: {
digest: {
type: 'string',
'x-component-props': {
allowClear: true,
placeholder: '计划摘要'
}
},
'[startTime, endTime]': {
type: 'daterange',
'x-component-props': {
......
......@@ -16,33 +16,34 @@ import { getDayAll, godAtob, integrationArrToObj, integrationOjb, TagStatus } fr
import { getOrderDeliveryPlanDeliveryHistory, getOrderDeliveryPlanDetail, getOrderDeliveryPlanDetailProductPage } from '@/services/OrderNewV2Api'
import CustomizedTableItem from '../../components/CustomizedTableItem'
import styles from './index.less'
import { CaretDownOutlined, CaretRightOutlined } from '@ant-design/icons'
const intl = getIntl();
const columnB2B = [
{ ...CommodityNoColumn, dataIndex: 'skuId', width: 80, align: 'left', },
{ ...TradeNameColumn, dataIndex: 'productName', width: 192, align: 'left', },
{ ...ClassColumn, dataIndex: 'category', width: 96, align: 'left', },
{ ...BrandColumn, dataIndex: 'brand', width: 96, align: 'left', },
{ ...UntilColumn, dataIndex: 'unit', width: 64, align: 'left', },
{ ...OrderNumColumn, dataIndex: 'purchaseCountSum', width: 96, align: 'left', },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, align: 'left', },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, align: 'left', },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, align: 'left', },
{ ...PlannedDeliveryNumColumn, dataIndex: 'planCountSum', width: 128, align: 'left', },
{ ...CommodityNoColumn, dataIndex: 'skuId', width: 80, ellipsis: true, },
{ ...TradeNameColumn, dataIndex: 'productName', width: 192, ellipsis: true, },
{ ...ClassColumn, dataIndex: 'category', width: 96, ellipsis: true, },
{ ...BrandColumn, dataIndex: 'brand', width: 96, ellipsis: true, },
{ ...UntilColumn, dataIndex: 'unit', width: 64, ellipsis: true, },
{ ...OrderNumColumn, dataIndex: 'purchaseCountSum', width: 96, ellipsis: true, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, ellipsis: true, },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, ellipsis: true, },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, ellipsis: true, },
{ ...PlannedDeliveryNumColumn, dataIndex: 'planCountSum', width: 128, ellipsis: true, },
]
const columnSRM = [
{ ...MaterialNoColumn, dataIndex: 'skuId', width: 80, align: 'left', },
{ ...MaterialNameColumn, dataIndex: 'productName', width: 192, align: 'left', },
{ ...MaterialModelColumn, dataIndex: 'spec', width: 128, align: 'left', },
{ ...ClassColumn, dataIndex: 'category', width: 96, align: 'left', },
{ ...BrandColumn, dataIndex: 'brand', width: 96, align: 'left', },
{ ...UntilColumn, dataIndex: 'unit', width: 64, align: 'left', },
{ ...OrderNumColumn, dataIndex: 'purchaseCountSum', width: 96, align: 'left', },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, align: 'left', },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, align: 'left', },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, align: 'left', },
{ ...PlannedDeliveryNumColumn, dataIndex: 'planCountSum', width: 128, align: 'left', },
{ ...MaterialNoColumn, dataIndex: 'skuId', width: 80, ellipsis: true, },
{ ...MaterialNameColumn, dataIndex: 'productName', width: 192, ellipsis: true, },
{ ...MaterialModelColumn, dataIndex: 'spec', width: 128, ellipsis: true, },
{ ...ClassColumn, dataIndex: 'category', width: 96, ellipsis: true, },
{ ...BrandColumn, dataIndex: 'brand', width: 96, ellipsis: true, },
{ ...UntilColumn, dataIndex: 'unit', width: 64, ellipsis: true, },
{ ...OrderNumColumn, dataIndex: 'purchaseCountSum', width: 96, ellipsis: true, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, ellipsis: true, },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, ellipsis: true, },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, ellipsis: true, },
{ ...PlannedDeliveryNumColumn, dataIndex: 'planCountSum', width: 128, ellipsis: true, },
]
const tagStatus = new TagStatus()
......@@ -63,19 +64,19 @@ const DeliveryPlanManagementDetails: React.FC = () => {
// 动态 TableColumn
const [tableColumn, setTableColumn] = useState<any>([])
// 动态 expandIconColumn
const dynamicWidth = deliveryPlanType === '1' ? 214 : 342
// const dynamicWidth = deliveryPlanType === '1' ? 214 : 342
const [expandIconColumn, setExpandIconColumn] = useState<any>([
{ ...OrderNoColumn, dataIndex: 'orderNo', width: 80, align: 'left', },
{ ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 192, align: 'left', },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime', width: dynamicWidth, align: 'left', },
{ ...OrderNumColumn, dataIndex: 'purchaseCount', width: 96, align: 'left', },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 96, align: 'left', },
{ ...TransitNumColumn, dataIndex: 'transitCount', width: 96, align: 'left', },
{ ...DeliveredNumColumn, dataIndex: 'leftCount', width: 96, align: 'left', },
{ ...PlannedDeliveryNumColumn, dataIndex: 'planCount', width: 128, align: 'left', },
{ ...OrderNoColumn, dataIndex: 'orderNo', width: 80, ellipsis: true, },
{ ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 160, ellipsis: true, },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, ellipsis: true, },
{ ...OrderNumColumn, dataIndex: 'purchaseCount', width: 96, ellipsis: true, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 96, ellipsis: true, },
{ ...TransitNumColumn, dataIndex: 'transitCount', width: 96, ellipsis: true, },
{ ...DeliveredNumColumn, dataIndex: 'leftCount', width: 96, ellipsis: true, },
{ ...PlannedDeliveryNumColumn, dataIndex: 'planCount', width: 128, ellipsis: true, },
])
const expandedRowRender = (record) => {
return <Table rowKey={'orderProductId'} columns={expandIconColumn} dataSource={record.orders} pagination={false} tableLayout="fixed" />
return <Table rowKey={'orderProductId'} columns={expandIconColumn} dataSource={record.orders} pagination={false} />
}
// 详情
......@@ -95,7 +96,7 @@ const DeliveryPlanManagementDetails: React.FC = () => {
key: item,
width: 80,
align: 'center',
render: (text: any, record: any) => (<CustomizedTableItem createNotice={text?.createNotice} createDelivery={text?.createDelivery} planCount={text?.planCount}/>)
render: (text: any, record: any) => (<CustomizedTableItem createNotice={text?.createNotice} createDelivery={text?.createDelivery} planCount={text?.planCount} />)
}))
const table_column = deliveryPlanType === '1' ? columnB2B : deliveryPlanType === '2' ? columnSRM : []
setTableColumn([...table_column, ...datesColumn])
......@@ -182,10 +183,18 @@ const DeliveryPlanManagementDetails: React.FC = () => {
// defaultExpandAllRows
rowKey={'skuId'}
columns={tableColumn}
expandable={{ expandedRowRender }}
expandable={{
expandIcon: ({ expanded, onExpand, record }) =>
expanded ? (
<CaretDownOutlined onClick={e => onExpand(record, e)} />
) : (
<CaretRightOutlined onClick={e => onExpand(record, e)} />
),
expandedRowRender
}}
dataSource={tableData}
tableLayout="fixed"
scroll={{ x: 2022 }}
scroll={{ x: '100%' }}
/>
</BaseInfo>
<BaseInfo className='mt-16' title={ExternalRoamRecord.name} id={ExternalRoamRecord.key} cols={1}>
......
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