Commit 70e18237 authored by Gavin Peng's avatar Gavin Peng

fix: 完成计划送货管理对接(基础流程)

parent aca9b2a7
......@@ -15,7 +15,15 @@ const DeliveryPlanManagement = [
component: '@/pages/order/deliveryPlanManagement/deliveryPlanQuery'
},
{
/** 送货计划详情 */
/** 送货计划 变更 */
path: '/memberCenter/order/deliveryPlanManagement/query/update',
name: '送货计划详情',
component: '@/pages/order/deliveryPlanManagement/deliveryPlanQuery/update',
hideInMenu: true,
noMargin: true,
},
{
/** 送货计划 详情 */
path: '/memberCenter/order/deliveryPlanManagement/query/details',
name: '送货计划详情',
component: '@/pages/order/deliveryPlanManagement/deliveryPlanQuery/details',
......
......@@ -70,7 +70,7 @@ const DeliveryPlanAwaitB2BCreate: React.FC = () => {
const [expandIconColumn, setExpandIconColumn] = useState<any>(initExpandIconColumn)
const expandedRowRender = (record, index) => {
return <Table rowKey={'orderProductId'} columns={expandIconColumn} dataSource={record.orders} pagination={false} tableLayout="fixed" />
return <Table rowKey={'orderProductId'} columns={expandIconColumn} dataSource={record.orders} pagination={false} tableLayout="fixed"/>
}
// 选中 开始时间,结束时间
......@@ -268,7 +268,7 @@ const DeliveryPlanAwaitB2BCreate: React.FC = () => {
expandedRowRender={expandedRowRender}
dataSource={goodsTableData}
tableLayout="fixed"
scroll={{ x: 2022 }}
scroll={{ x: '100%' }}
/>
</BaseInfo>
<BaseInfo className='mt-16' title={Remarks.name} id={Remarks.key} cols={1}>
......
......@@ -5,7 +5,7 @@
*/
import React, { useEffect, useRef, useState } from 'react'
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import { history, useHistory } from 'umi'
import { history } from 'umi'
import { Circulation, ConfirmDeliveryPlan, Purchaser, SubmitDeliveryPlan, BaseInfo as base_Info, Supplier, PlanningCycle, SupplyMembersLabel, PlanSummary, ExternalState, Remarks, ExternalRoamRecord, PlannedDelivery, PlanNumber } from '../../constants'
import { Steps, Table, Tag } from 'antd'
import BaseInfo from '@/components/BaseInfo/BaseInfo'
......@@ -20,8 +20,8 @@ const tagStatus = new TagStatus()
const statusTxt = new Map([[1, '待提交'], [2, '待确认'], [3, '待修订'], [4, '已确认'], [5, '已删除']])
const DeliveryPlanAwaitB2BDetails: React.FC = () => {
const { location: { query: { i } } } = useHistory()
const id = godAtob(i)
const { location: { query: { i } } } = history
const id = godAtob(i as string)
const goodsTableDataRef = useRef(null)
......
......@@ -5,7 +5,7 @@
*/
import React, { useEffect, useRef, useState } from 'react'
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import { history, useHistory } from 'umi'
import { history } from 'umi'
import { Circulation, ConfirmDeliveryPlan, Purchaser, SubmitDeliveryPlan, BaseInfo as base_Info, Supplier, PlanningCycle, SupplyMembersLabel, PlanSummary, Remarks, PlannedDelivery, DeliveryPlanText, DeliveryPlanRemark, CreateDeliveryPlanTitleB2B, ExternalRoamRecord, ExternalState } from '../../constants'
import { Button, Form, Input, InputNumber, message, Space, Spin, Steps, Table, Tag } from 'antd'
import { SaveOutlined } from '@ant-design/icons'
......@@ -25,8 +25,8 @@ const formItemLayout = {
const tagStatus = new TagStatus()
const statusTxt = new Map([[1, '待提交'], [2, '待确认'], [3, '待修订'], [4, '已确认'], [5, '已删除']])
const DeliveryPlanAwaitB2BUpdate: React.FC = () => {
const { location: { query: { i } } } = useHistory()
const id = godAtob(i)
const { location: { query: { i } } } = history
const id = godAtob(i as string)
const [form] = Form.useForm()
const datesRef = useRef<any>(null)
......
......@@ -3,8 +3,8 @@
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import React, { useEffect, useRef, useState } from 'react'
import { history, useHistory } from 'umi'
import React, { useEffect, useState } from 'react'
import { history } from 'umi'
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import { BaseInfo as base_Info, PlanningCycle, SupplyMembersLabel, PlanSummary, ExternalRoamRecord, Circulation, Purchaser, SubmitDeliveryPlan, Supplier, ConfirmDeliveryPlan, PlannedDelivery, ExternalState, PlanNumber } from '../../constants'
import { Steps, Table, Tag } from 'antd'
......@@ -13,14 +13,14 @@ import { ExternalRoamRecordTableColumn } from '../../constants/page-table-column
import _ from 'lodash'
import { getDayAll, godAtob, integrationArrToObj, integrationOjb, TagStatus } from '../../utils'
import { BrandColumn, ClassColumn, ConsigneeNumColumn, DeliveredNumColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OrderNumColumn, PlannedDeliveryNumColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column'
import { getOrderDeliveryPlanDeliveryHistory, getOrderDeliveryPlanDetail, getOrderDeliveryPlanDetailProductPage, getOrderDeliveryPlanOrderProductPage } from '@/services/OrderNewV2Api'
import { getOrderDeliveryPlanDeliveryHistory, getOrderDeliveryPlanDetail, getOrderDeliveryPlanDetailProductPage } from '@/services/OrderNewV2Api'
import moment from 'moment'
const tagStatus = new TagStatus()
const statusTxt = new Map([[1, '待提交'], [2, '待确认'], [3, '待修订'], [4, '已确认'], [5, '已删除']])
const DeliveryPlanAwaitSRMDetails: React.FC = () => {
const { location: { query: { i } } } = useHistory()
const id = godAtob(i)
const { location: { query: { i } } } = history
const id = godAtob(i as string)
const [iAnchors, setIAnchors] = useState<AnchorsItem[]>([
Circulation,
......
......@@ -4,7 +4,7 @@
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import React, { useEffect, useRef, useState } from 'react'
import { history, useHistory } from 'umi'
import { history } from 'umi'
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import { BaseInfo as base_Info, Remarks, PlanningCycle, SupplyMembersLabel, PlanSummary, ExternalRoamRecord, ExternalState, Circulation, Purchaser, SubmitDeliveryPlan, Supplier, ConfirmDeliveryPlan, PlannedDelivery, DeliveryPlanRemark } from '../../constants'
import { Button, Form, Input, InputNumber, message, Space, Spin, Steps, Table, Tag } from 'antd'
......@@ -25,8 +25,8 @@ const formItemLayout = {
const tagStatus = new TagStatus()
const statusTxt = new Map([[1, '待提交'], [2, '待确认'], [3, '待修订'], [4, '已确认'], [5, '已删除']])
const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
const { location: { query: { i } } } = useHistory()
const id = godAtob(i)
const { location: { query: { i } } } = history
const id = godAtob(i as string)
const [form] = Form.useForm()
const datesRef = useRef(null)
......
......@@ -49,8 +49,6 @@ const DeliveryPlanManagementDetails: React.FC = () => {
// 1-B2B 2-SRM
const deliveryPlanType = godAtob(ty as string)
const id = godAtob(i as string)
console.log('object :>> ', ty, deliveryPlanType)
console.log('object :>> ', i, id)
const [iAnchors, setIAnchors] = useState<AnchorsItem[]>([
Circulation,
......@@ -72,7 +70,7 @@ const DeliveryPlanManagementDetails: React.FC = () => {
{ ...PlannedDeliveryNumColumn, dataIndex: 'planCount', width: 128, },
])
const expandedRowRender = (record) => {
return <Table rowKey={'id'} columns={expandIconColumn} dataSource={record.orders} pagination={false} tableLayout="fixed" />
return <Table rowKey={'orderProductId'} columns={expandIconColumn} dataSource={record.orders} pagination={false} tableLayout="fixed" />
}
// 详情
......
......@@ -3,6 +3,8 @@
* @author: Gavin
*/
import React, { useRef } from 'react'
import { history } from 'umi'
import moment from 'moment'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, Space, Tag } from 'antd'
import StandardTable from '@/components/StandardTable'
......@@ -15,9 +17,8 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { deliveryPlanManagementQuerySchema } from './schema'
import { godBtoa, TagStatus } from '../../utils'
import dayjs from 'dayjs'
import { ExternalStateColumn, OperationColumn, PlannedEndDateColumn, PlannedStartDateColumn, PlanNumberColumn, PlanSummaryColumn, SupplyMemberColumn } from '../../constants/table-column'
import { getOrderDeliveryPlanBuyerPage } from '@/services/OrderNewV2Api';
import { getOrderDeliveryPlanBuyerPage } from '@/services/OrderNewV2Api'
const tagStatus = new TagStatus()
const statusTxt = new Map([[1, '待提交'], [2, '待确认'], [3, '待修订'],[4,'已确认'],[5,'已删除']])
......@@ -41,8 +42,8 @@ const DeliveryPlanManagementQuery: React.FC = () => {
'变更': record.status === 4
}
const operationHandler = {
'查看': () => { console.log('查看 :>> ',) },
'变更': () => { console.log('变更 :>> ',) }
'查看': () => history.push(`/memberCenter/order/deliveryPlanManagement/query/details?ty=${godBtoa(record.orderType)}&i=${godBtoa(record.id)}`),
'变更': () => history.push(`/memberCenter/order/deliveryPlanManagement/query/update?ty=${godBtoa(record.orderType)}&i=${godBtoa(record.id)}`),
}
return (
<TableOperation
......@@ -61,17 +62,17 @@ const DeliveryPlanManagementQuery: React.FC = () => {
render: (text: string, record: any) => <EyePreview url={`/memberCenter/order/deliveryPlanManagement/query/details?ty=${godBtoa(record.orderType)}&i=${godBtoa(record.id)}`}>{text}</EyePreview>
},
{ ...PlanSummaryColumn, dataIndex: 'digest', key: 'digest' },
{ ...PlannedStartDateColumn, dataIndex: 'planStartTime', key: 'planStartTime', render: (text: string, record: any) => (dayjs(text).format('YYYY-MM-DD')) },
{ ...PlannedEndDateColumn, dataIndex: 'planEndTime', key: 'planEndTime', render: (text: string, record: any) => (dayjs(text).format('YYYY-MM-DD')) },
{ ...PlannedStartDateColumn, dataIndex: 'planStartTime', key: 'planStartTime', render: (text: string, record: any) => (moment(text).format('YYYY-MM-DD')) },
{ ...PlannedEndDateColumn, dataIndex: 'planEndTime', key: 'planEndTime', render: (text: string, record: any) => (moment(text).format('YYYY-MM-DD')) },
{ ...SupplyMemberColumn, dataIndex: 'memberName', key: 'memberName' },
{
...ExternalStateColumn,
dataIndex: 'status',
render: (text: string, record: any) => {
const sytle = tagStatus.getTagStyle(record.status);
const styles = tagStatus.getTagStyle(record.status)
return (
<Tag color={sytle.bgColor}>
<span style={{ color: sytle.fontColor }}>{statusTxt.get(record.status)}</span>
<Tag color={styles.bgColor}>
<span style={{ color: styles.fontColor }}>{statusTxt.get(record.status)}</span>
</Tag>
)
}
......@@ -112,7 +113,7 @@ const DeliveryPlanManagementQuery: React.FC = () => {
useStateFilterSearchLinkageEffect(
$,
actions,
'planCode',
'planNo',
FORM_FILTER_PATH,
)
}}
......
......@@ -26,7 +26,7 @@ export const deliveryPlanManagementQuerySchema: ISchema = {
children: '{{controllerBtns}}',
},
},
planCode: {
planNo: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
......@@ -55,7 +55,7 @@ export const deliveryPlanManagementQuerySchema: ISchema = {
placeholder: ['计划开始日期','计划结束日期'],
},
},
supplyMember: {
memberName: {
type: 'string',
'x-component-props': {
allowClear: true,
......
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