Commit 3b2becc4 authored by 前端-李俊鑫's avatar 前端-李俊鑫

fix: 送货通知单相关文案修改

parent 5c0973cb
...@@ -130,7 +130,7 @@ const DeliveryPlanCollaborationAnchors: AnchorsItem[] = [ ...@@ -130,7 +130,7 @@ const DeliveryPlanCollaborationAnchors: AnchorsItem[] = [
// deliveryNoticeManagement -> deliveryNoticeDetaitls // deliveryNoticeManagement -> deliveryNoticeDetaitls
const DeliveryNoticeDetaitlsAnchors: AnchorsItem[] =[ const DeliveryNoticeDetaitlsAnchors: AnchorsItem[] =[
DeliveryNoticeCirculation, Circulation,
BaseInfo, BaseInfo,
ShippingInfo, ShippingInfo,
// Material, // Material,
......
...@@ -13,7 +13,7 @@ import { DeliveryMaterialsTableColumn, DeliveryGoodsTableColumn, ExternalRoamRec ...@@ -13,7 +13,7 @@ import { DeliveryMaterialsTableColumn, DeliveryGoodsTableColumn, ExternalRoamRec
import { getOrderDeliveryNoticeOrderDeliveryHistory, getOrderDeliveryNoticeOrderDetail, getOrderDeliveryNoticeOrderDetailPage, postOrderDeliveryNoticeOrderConfirm } from '@/services/OrderNewV2Api' import { getOrderDeliveryNoticeOrderDeliveryHistory, getOrderDeliveryNoticeOrderDetail, getOrderDeliveryNoticeOrderDetailPage, postOrderDeliveryNoticeOrderConfirm } from '@/services/OrderNewV2Api'
import StandardTable from '@/components/StandardTable' import StandardTable from '@/components/StandardTable'
import CustomizedModal from '../../components/customizedModal' import CustomizedModal from '../../components/customizedModal'
import { STATUS_NAME, STATUS, ORDER_TYPE } from '../../constants/deliveryNotice' import { STATUS_NAME, STATUS, ORDER_TYPE, TAG_STATUS_COLOR } from '../../constants/deliveryNotice'
import AuthButton from '@/components/AuthButton' import AuthButton from '@/components/AuthButton'
enum PAGE_TYPE { enum PAGE_TYPE {
...@@ -47,12 +47,6 @@ const DeliveryNoticeAwaitDetails: React.FC = () => { ...@@ -47,12 +47,6 @@ const DeliveryNoticeAwaitDetails: React.FC = () => {
const id = history.location?.query?.id const id = history.location?.query?.id
const type = history.location?.query?.type const type = history.location?.query?.type
const [iAnchors, setiAnchors] = useState<AnchorsItem[]>([
Circulation,
base_info,
ShippingInfo,
ExternalRoamRecord,
])
const [details, setDetails] = useState<any>({}) const [details, setDetails] = useState<any>({})
const [historyData, setHistoryData] = useState<any>([]) const [historyData, setHistoryData] = useState<any>([])
const [loading, setLoading] = useState<boolean>(false) const [loading, setLoading] = useState<boolean>(false)
...@@ -142,7 +136,9 @@ const DeliveryNoticeAwaitDetails: React.FC = () => { ...@@ -142,7 +136,9 @@ const DeliveryNoticeAwaitDetails: React.FC = () => {
{details.digest} {details.digest}
</BaseInfo.BaseInfoItem> </BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label={ExternalState}> <BaseInfo.BaseInfoItem label={ExternalState}>
<Tag color='green'>{STATUS_NAME[details.status]}</Tag> <Tag color={TAG_STATUS_COLOR[details.status]?.color}>
<span style={{ color: TAG_STATUS_COLOR[details.status]?.fontColor }}>{STATUS_NAME[details.status]}</span>
</Tag>
</BaseInfo.BaseInfoItem> </BaseInfo.BaseInfoItem>
</BaseInfo> </BaseInfo>
<BaseInfo className='mt-16' title={ShippingInfo.name} id={ShippingInfo.key}> <BaseInfo className='mt-16' title={ShippingInfo.name} id={ShippingInfo.key}>
......
...@@ -212,6 +212,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id ...@@ -212,6 +212,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
] ]
!planData && columns.push({ !planData && columns.push({
title: "操作", title: "操作",
align: 'center',
render: (t, r, i) => { render: (t, r, i) => {
return ( return (
<Button type='link' onClick={() => handleRemoveMaterialTableRow(i)}>删除</Button> <Button type='link' onClick={() => handleRemoveMaterialTableRow(i)}>删除</Button>
......
...@@ -6,21 +6,24 @@ ...@@ -6,21 +6,24 @@
import React, { useEffect, useState } from 'react' import React, { useEffect, useState } from 'react'
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage' import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import { history, useLocation } from 'umi' import { history, useLocation } from 'umi'
import { Circulation, DeliveryNoticeDetaitlsAnchors, Purchaser, Supplier, BaseInfo as base_Info, NoticeNo, BuyerLabel, NoticeSummary, ExternalState, ShippingInfo, DeliveryDate, DeliveryTime, ReceivingAddress, DeliveryList, ExternalRoamRecord, SubmitDeliveryNotice, ConfirmDeliveryNotice, } from '../../constants' import { Circulation, B2BDeliveryNoticeDetaitlsAnchors, DeliveryGood, Purchaser, Supplier, BaseInfo as base_Info, NoticeNo, BuyerLabel, NoticeSummary, ExternalState, ShippingInfo, DeliveryDate, DeliveryTime, ReceivingAddress, DeliveryList, ExternalRoamRecord, SubmitDeliveryNotice, ConfirmDeliveryNotice } from '../../constants'
import BaseInfo from '@/components/BaseInfo/BaseInfo' import BaseInfo from '@/components/BaseInfo/BaseInfo'
import StandardTable from '@/components/StandardTable' import StandardTable from '@/components/StandardTable'
import { Steps, Table, Tag } from 'antd' import { Steps, Table, Tag } from 'antd'
import { DeliveryMaterialsTableColumn, ExternalRoamRecordTableColumn } from '../../constants/page-table-column' import { DeliveryGoodsTableColumn, ExternalRoamRecordTableColumn } from '../../constants/page-table-column'
import { getOrderDeliveryNoticeOrderDetail, getOrderDeliveryNoticeOrderDetailPage, getOrderDeliveryNoticeOrderDeliveryHistory } from '@/services/OrderNewV2Api' import { getOrderDeliveryNoticeOrderDetail, getOrderDeliveryNoticeOrderDetailPage, getOrderDeliveryNoticeOrderDeliveryHistory } from '@/services/OrderNewV2Api'
import { STATUS_NAME } from '../../constants/deliveryNotice' import { STATUS_NAME, TAG_STATUS_COLOR } from '../../constants/deliveryNotice'
const getAnchors = (len = 0) => {
return [...B2BDeliveryNoticeDetaitlsAnchors, { ...DeliveryGood, name: `${DeliveryGood.name}${!!len ? `(${len})` : ''}` }]
}
const DeliveryNoticeManagementAwaitB2BDetails: React.FC = () => { const DeliveryNoticeManagementAwaitB2BDetails: React.FC = () => {
const id = history.location?.query?.id const id = history.location?.query?.id
const [iAnchors, setiAnchors] = useState<AnchorsItem[]>(DeliveryNoticeDetaitlsAnchors)
const [details, setDetails] = useState<any>({}) const [details, setDetails] = useState<any>({})
const [historyData, setHistoryData] = useState<any>([]) const [historyData, setHistoryData] = useState<any>([])
const [len, setLen] = useState<number>(0)
const getDetail = async () => { const getDetail = async () => {
const { code, data } = await getOrderDeliveryNoticeOrderDetail({ id: id as string }); const { code, data } = await getOrderDeliveryNoticeOrderDetail({ id: id as string });
...@@ -41,6 +44,7 @@ ...@@ -41,6 +44,7 @@
return new Promise((resolve) => { return new Promise((resolve) => {
api({ ...params, orderId: id }).then(({ code, data }) => { api({ ...params, orderId: id }).then(({ code, data }) => {
if (code === 1000) { if (code === 1000) {
setLen(data.data?.length || 0)
resolve(data) resolve(data)
} }
}) })
...@@ -58,7 +62,7 @@ ...@@ -58,7 +62,7 @@
<AnchorPage <AnchorPage
title={`${details?.digest} | ${details?.noticeNo}`} title={`${details?.digest} | ${details?.noticeNo}`}
onBack={() => history.goBack()} onBack={() => history.goBack()}
anchors={iAnchors} anchors={getAnchors(len)}
> >
<BaseInfo className='mt-0' title={Circulation.name} id={Circulation.key} cols={1}> <BaseInfo className='mt-0' title={Circulation.name} id={Circulation.key} cols={1}>
<Steps progressDot current={details?.outerStatus - 1}> <Steps progressDot current={details?.outerStatus - 1}>
...@@ -77,7 +81,9 @@ ...@@ -77,7 +81,9 @@
{details.digest} {details.digest}
</BaseInfo.BaseInfoItem> </BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label={ExternalState}> <BaseInfo.BaseInfoItem label={ExternalState}>
<Tag color='green'>{STATUS_NAME[details.status]}</Tag> <Tag color={TAG_STATUS_COLOR[details.status]?.color}>
<span style={{ color: TAG_STATUS_COLOR[details.status]?.fontColor }}>{STATUS_NAME[details.status]}</span>
</Tag>
</BaseInfo.BaseInfoItem> </BaseInfo.BaseInfoItem>
</BaseInfo> </BaseInfo>
<BaseInfo className='mt-16' title={ShippingInfo.name} id={ShippingInfo.key}> <BaseInfo className='mt-16' title={ShippingInfo.name} id={ShippingInfo.key}>
...@@ -92,10 +98,10 @@ ...@@ -92,10 +98,10 @@
{details.deliveryStartTime}{details.deliveryEndTime} {details.deliveryStartTime}{details.deliveryEndTime}
</BaseInfo.BaseInfoItem> </BaseInfo.BaseInfoItem>
</BaseInfo> </BaseInfo>
<BaseInfo className='mt-16' title={DeliveryList.name} id={DeliveryList.key} cols={1}> <BaseInfo className='mt-16' title={DeliveryGood.name} id={DeliveryGood.key} cols={1}>
{/* SRM 物料列表(DeliveryMaterialsTableColumn), B2B商品列表(DeliveryGoodsTableColumn) */} {/* SRM 物料列表(DeliveryMaterialsTableColumn), B2B商品列表(DeliveryGoodsTableColumn) */}
<StandardTable <StandardTable
columns={DeliveryMaterialsTableColumn} columns={DeliveryGoodsTableColumn}
tableProps={{ rowKey: 'id', }} tableProps={{ rowKey: 'id', }}
fetchTableData={(params: any) => fetchData(getOrderDeliveryNoticeOrderDetailPage, { ...params, orderId: id })} fetchTableData={(params: any) => fetchData(getOrderDeliveryNoticeOrderDetailPage, { ...params, orderId: id })}
controlRender={<div></div>} controlRender={<div></div>}
......
...@@ -211,6 +211,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id ...@@ -211,6 +211,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
] ]
!planData && columns.push({ !planData && columns.push({
title: "操作", title: "操作",
align: 'center',
render: (t, r, i) => { render: (t, r, i) => {
return ( return (
<Button type='link' onClick={() => handleRemoveMaterialTableRow(i)}>删除</Button> <Button type='link' onClick={() => handleRemoveMaterialTableRow(i)}>删除</Button>
......
...@@ -6,21 +6,24 @@ ...@@ -6,21 +6,24 @@
import React, { useEffect, useState } from 'react' import React, { useEffect, useState } from 'react'
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage' import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import { history } from 'umi' import { history } from 'umi'
import { Circulation, DeliveryNoticeDetaitlsAnchors, Purchaser, Supplier, BaseInfo as base_Info, NoticeNo, BuyerLabel, NoticeSummary, ExternalState, ShippingInfo, DeliveryDate, DeliveryTime, ReceivingAddress, DeliveryList, ExternalRoamRecord, SubmitDeliveryNotice, ConfirmDeliveryNotice, } from '../../constants' import { Circulation, Purchaser, Supplier, BaseInfo as base_Info, NoticeNo, BuyerLabel, NoticeSummary, ExternalState, ShippingInfo, DeliveryDate, DeliveryTime, ReceivingAddress, DeliveryList, ExternalRoamRecord, SubmitDeliveryNotice, ConfirmDeliveryNotice, DeliveryNoticeDetaitlsAnchors, Material } from '../../constants'
import BaseInfo from '@/components/BaseInfo/BaseInfo' import BaseInfo from '@/components/BaseInfo/BaseInfo'
import StandardTable from '@/components/StandardTable' import StandardTable from '@/components/StandardTable'
import { Steps, Table, Tag } from 'antd' import { Steps, Table, Tag } from 'antd'
import { DeliveryMaterialsTableColumn, ExternalRoamRecordTableColumn } from '../../constants/page-table-column' import { DeliveryMaterialsTableColumn, ExternalRoamRecordTableColumn } from '../../constants/page-table-column'
import { getOrderDeliveryNoticeOrderDetail, getOrderDeliveryNoticeOrderDetailPage, getOrderDeliveryNoticeOrderDeliveryHistory } from '@/services/OrderNewV2Api' import { getOrderDeliveryNoticeOrderDetail, getOrderDeliveryNoticeOrderDetailPage, getOrderDeliveryNoticeOrderDeliveryHistory } from '@/services/OrderNewV2Api'
import { STATUS_NAME } from '../../constants/deliveryNotice' import { STATUS_NAME, TAG_STATUS_COLOR } from '../../constants/deliveryNotice'
const getAnchors = (len = 0) => {
return [...DeliveryNoticeDetaitlsAnchors, { ...Material, name: `${Material.name}${!!len ? `(${len})` : ''}` }]
}
const DeliveryNoticeManagementAwaitSRMDetails: React.FC = () => { const DeliveryNoticeManagementAwaitSRMDetails: React.FC = () => {
const id = history.location?.query?.id const id = history.location?.query?.id
const [iAnchors, setiAnchors] = useState<AnchorsItem[]>(DeliveryNoticeDetaitlsAnchors)
const [details, setDetails] = useState<any>({}) const [details, setDetails] = useState<any>({})
const [historyData, setHistoryData] = useState<any>([]) const [historyData, setHistoryData] = useState<any>([])
const [len, setLen] = useState<number>(0)
const getDetail = async () => { const getDetail = async () => {
const { code, data } = await getOrderDeliveryNoticeOrderDetail({ id: id as string }); const { code, data } = await getOrderDeliveryNoticeOrderDetail({ id: id as string });
...@@ -41,6 +44,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC = () => { ...@@ -41,6 +44,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC = () => {
return new Promise((resolve) => { return new Promise((resolve) => {
api({ ...params, orderId: id }).then(({ code, data }) => { api({ ...params, orderId: id }).then(({ code, data }) => {
if (code === 1000) { if (code === 1000) {
setLen(data.data?.length || 0)
resolve(data) resolve(data)
} }
}) })
...@@ -58,7 +62,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC = () => { ...@@ -58,7 +62,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC = () => {
<AnchorPage <AnchorPage
title={`${details?.digest} | ${details?.noticeNo}`} title={`${details?.digest} | ${details?.noticeNo}`}
onBack={() => history.goBack()} onBack={() => history.goBack()}
anchors={iAnchors} anchors={getAnchors(len)}
> >
<BaseInfo className='mt-0' title={Circulation.name} id={Circulation.key} cols={1}> <BaseInfo className='mt-0' title={Circulation.name} id={Circulation.key} cols={1}>
<Steps progressDot current={details?.outerStatus - 1}> <Steps progressDot current={details?.outerStatus - 1}>
...@@ -77,7 +81,9 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC = () => { ...@@ -77,7 +81,9 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC = () => {
{details.digest} {details.digest}
</BaseInfo.BaseInfoItem> </BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label={ExternalState}> <BaseInfo.BaseInfoItem label={ExternalState}>
<Tag color='green'>{STATUS_NAME[details.status]}</Tag> <Tag color={TAG_STATUS_COLOR[details.status]?.color}>
<span style={{ color: TAG_STATUS_COLOR[details.status]?.fontColor }}>{STATUS_NAME[details.status]}</span>
</Tag>
</BaseInfo.BaseInfoItem> </BaseInfo.BaseInfoItem>
</BaseInfo> </BaseInfo>
<BaseInfo className='mt-16' title={ShippingInfo.name} id={ShippingInfo.key}> <BaseInfo className='mt-16' title={ShippingInfo.name} id={ShippingInfo.key}>
...@@ -92,7 +98,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC = () => { ...@@ -92,7 +98,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC = () => {
{details.deliveryStartTime}{details.deliveryEndTime} {details.deliveryStartTime}{details.deliveryEndTime}
</BaseInfo.BaseInfoItem> </BaseInfo.BaseInfoItem>
</BaseInfo> </BaseInfo>
<BaseInfo className='mt-16' title={DeliveryList.name} id={DeliveryList.key} cols={1}> <BaseInfo className='mt-16' title={Material.name} id={Material.key} cols={1}>
{/* SRM 物料列表(DeliveryMaterialsTableColumn), B2B商品列表(DeliveryGoodsTableColumn) */} {/* SRM 物料列表(DeliveryMaterialsTableColumn), B2B商品列表(DeliveryGoodsTableColumn) */}
<StandardTable <StandardTable
columns={DeliveryMaterialsTableColumn} columns={DeliveryMaterialsTableColumn}
......
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