Commit f7053081 authored by Gavin Peng's avatar Gavin Peng

Merge branch 'v2-220418' of https://gitlab.shushangyun.com/GavinPeng/pro-platform into v2-220418

parents beb5199d e4a4c341
......@@ -2,56 +2,58 @@
* 订单能力 -- 送货单
* @author: Gavin
*/
const DeliveryNotice = [
{
const DeliveryNotice = [
{
path: '/memberCenter/order/deliveryNotice',
name: '送货单',
routes: [
{
/** 送货单管理SRM*/
path: '/memberCenter/order/deliveryNotice/manageSRM',
name: '送货单管理(SRM)',
component: '@/pages/order/deliveryNotice/manageSRM'
path: '/memberCenter/order/deliveryNotice/manageSRM',
name: '送货单管理(SRM)',
component: '@/pages/order/deliveryNotice/manageSRM'
},
{
/** 送货单管理详情SRM*/
path: '/memberCenter/order/deliveryNotice/manageSRM/details',
name: '送货单管理详情(SRM)',
component: '@/pages/order/deliveryNotice/manageSRM/details',
hideInMenu: true,
path: '/memberCenter/order/deliveryNotice/manageSRM/details',
name: '送货单管理详情(SRM)',
component: '@/pages/order/deliveryNotice/manageSRM/details',
hideInMenu: true,
noMargin: true
},
{
/** 送货单管理B2B*/
path: '/memberCenter/order/deliveryNotice/manageB2B',
name: '送货单管理(B2B)',
component: '@/pages/order/deliveryNotice/manageB2B'
path: '/memberCenter/order/deliveryNotice/manageB2B',
name: '送货单管理(B2B)',
component: '@/pages/order/deliveryNotice/manageB2B'
},
{
/** 送货单管理详情B2B*/
path: '/memberCenter/order/deliveryNotice/manageB2B/details',
name: '送货单管理详情(B2B)',
component: '@/pages/order/deliveryNotice/manageB2B/details',
hideInMenu: true,
path: '/memberCenter/order/deliveryNotice/manageB2B/details',
name: '送货单管理详情(B2B)',
component: '@/pages/order/deliveryNotice/manageB2B/details',
hideInMenu: true,
noMargin: true
},
{
/** 收货单查询*/
path: '/memberCenter/order/deliveryNotice/receivingNoteQuery',
name: '收货单查询',
component: '@/pages/order/deliveryNotice/receivingNoteQuery'
path: '/memberCenter/order/deliveryNotice/receivingNoteQuery',
name: '收货单查询',
component: '@/pages/order/deliveryNotice/receivingNoteQuery'
},
{
/** 收货单详情*/
path: '/memberCenter/order/deliveryNotice/receivingNoteQuery/details',
name: '收货单详情',
component: '@/pages/order/deliveryNotice/receivingNoteQuery/details',
hideInMenu: true,
path: '/memberCenter/order/deliveryNotice/receivingNoteQuery/details',
name: '收货单详情',
component: '@/pages/order/deliveryNotice/receivingNoteQuery/details',
hideInMenu: true,
},
]
}
]
}
]
export default DeliveryNotice
\ No newline at end of file
......@@ -34,7 +34,8 @@ const ReceivingNote = [
path: '/memberCenter/order/receivingNote/deliveryNoteManage/add',
name: '新增收货单',
component: '@/pages/order/receivingNote/deliveryNoteManage/add',
noMargin: true
noMargin: true,
hideInMenu: true
},
{
/** 收货单管理详情*/
......
......@@ -51,6 +51,11 @@ const PlanMaterial: AnchorsItem = {
name: "计划送货物料"
}
const DeliveryGood: AnchorsItem = {
key: 'DeliveryGood',
name: '送货商品'
}
const DeliveryNoteQuery: AnchorsItem[] = [
BillsInfo,
Distribution,
......@@ -77,5 +82,6 @@ export {
Circulation,
PlanMaterial,
DeliveryNoteQuery,
DeliveryPlanDetails
DeliveryPlanDetails,
DeliveryGood
}
\ No newline at end of file
export const ReceiptAddLabel = '新增收货单';
export const ReceiptAbstractLabel = '收货单摘要';
export const DeliveryAbstractLabel = '送货单摘要';
export const SupplyMembersLabel = '供应会员';
export const NoteLabel = '备注';
export const ConsigneeLabel = '收货人';
export const ConsigneeTimeLable = '收货时间';
export const ConsigneeTimeLabel = '收货时间';
export const ConsigneePhoneLabel = '收货人电话';
export const DeliveryOrderNoLabel = '送货订单号';
export const DeliveryNoLabel = '送货单编号';
export const DeliveryDateLabel = '发货日期';
export const DeliveryTimeLabel = '发货时间';
export const DeliveryAddrLabel = '送货自提地址';
export const DeliveryAddrLabel = '送货地址';
export const DeliverySlefAddrLabel = '送货(自提)地址';
export const DeliveryNameLabel = '送货人';
export const DeliveryPhoneLabel = '送货人电话';
export const LogisticsCompanyLable = '物流公司';
export const LogisticsCarNoLable = '车牌号码';
export const LogisticsNoLable = '物流单号';
export const LogisticsCompanyLabel = '物流公司';
export const LogisticsCarNoLabel = '车牌号码';
export const LogisticsNoLabel = '物流单号';
export const PlanNumber = '计划编号';
export const SupplyMember = '供应会员';
......@@ -25,6 +31,10 @@ export const ExternalState = '外部状态';
export const BuyerLabel = '采购会员';
export const OutStatusLabel = '外部状态';
export const DeliveryTypeLabel = '配送方式';
......
import { BrandColumn, ClassColumn, ConsigneeNumColumn, DeliveryNumColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OredrNumColumn, UntilColumn } from "./table-column";
export const DeliveryNoteAddFromTableColumn = [
MaterialNoColumn,
MaterialNameColumn,
ClassColumn,
BrandColumn,
UntilColumn,
OrderNoColumn,
OrderCreatedAtColumn,
OredrNumColumn,
DeliveryNumColumn,
ConsigneeNumColumn
]
\ No newline at end of file
interface IStatusColorEnum {
[key: string]: {
bgColor: string,
fontColor: string
}
interface StatusStyle {
bgColor: string,
fontColor: string
}
interface StatusStyleItem {
[key: string]: StatusStyle
}
/**
......@@ -15,28 +16,82 @@ interface IStatusColorEnum {
* - generated: 已确认
* - voided: 已确认
*/
export interface IStatusEnum {
[key: number]: 'default' | 'toSbumit' | 'toBeConfirmed' | 'toBeModified' | 'confirmed' | 'generated' | 'voided'
enum StatusEnum {
Default = 1,
ToSbumit = 2,
ToBeConfirmed = 3,
ToBeModified = 4,
Confirmed = 5,
Generated = 6,
Voided = 7,
}
const tagStatusColor: IStatusColorEnum = {
'default': { bgColor: '#f2f4f5', fontColor: '#000' },
'toSbumit': { bgColor: '#f4f5f7', fontColor: '#5c626a' },
'toBeConfirmed': { bgColor: '#ecf2fe', fontColor: '#4787f0' },
'toBeModified': { bgColor: '#eae6ff', fontColor: '#9963d8' },
'confirmed': { bgColor: '#ebf9f6', fontColor: '#00a98f' },
'generated': { bgColor: '#f0f5ff', fontColor: '#f0f5ff' },
'voided': { bgColor: '#fff2f0', fontColor: '#ff4d4f' },
class TagStatus {
/**
* 默认的Sytle集合 具体情况,看StatusEnum
*/
#tagStatusColor: StatusStyleItem = {
[StatusEnum.Default]: this.defaultStatusStyle(),
[StatusEnum.ToSbumit]: this.toSbumitStatusStyle(),
[StatusEnum.ToBeConfirmed]: this.toBeConfirmedStyle(),
[StatusEnum.ToBeModified]: this.toBeConfirmedStyle(),
[StatusEnum.Confirmed]: this.confirmedStyle(),
[StatusEnum.Generated]: this.generatedStyle(),
[StatusEnum.Voided]: this.voidedStyle(),
}
defaultStatusStyle() {
return { bgColor: '#f2f4f5', fontColor: '#000' }
}
toSbumitStatusStyle() {
return { bgColor: '#f4f5f7', fontColor: '#5c626a' };
}
toBeConfirmedStyle() {
return { bgColor: '#ecf2fe', fontColor: '#4787f0' };
}
toBeModifiedStyle() {
return { bgColor: '#eae6ff', fontColor: '#9963d8' }
}
confirmedStyle() {
return { bgColor: '#ebf9f6', fontColor: '#00a98f' }
}
generatedStyle() {
return { bgColor: '#f0f5ff', fontColor: '#f0f5ff' }
}
voidedStyle() {
return { bgColor: '#fff2f0', fontColor: '#ff4d4f' }
}
/**
* 设置Style的属性,相同的key会覆盖
* @param status
* @param value
*/
setStyleToCollection(status: string | number, value: StatusStyle) {
this.#tagStatusColor = {
...this.#tagStatusColor,
[status]: value
}
}
/**
* 获取Tag Style属性
* @param status 后台的状态值
* @param value
*/
getTagStyle(status: string | number) {
return this.#tagStatusColor[status];
}
}
/**
* 根据状态获取对应Tag主题色
* @param statusEnum 页面定义状态对照表 tagStatusColor
* @param _status 状态
* @param _type 类型
* @returns
*/
export const TagStatusFun = (statusEnum: IStatusEnum, _status: string, _type: 'bgColor' | 'fontColor') => {
const _key = statusEnum[_status] ? statusEnum[_status] : 'default'
return tagStatusColor[_key][_type]
export {
TagStatus
}
\ No newline at end of file
import { TableColumnProps } from "antd";
export const MaterialNoColumn = {
title: '物料编号',
render: (txt, roced) => txt
}
export const MaterialNameColumn = {
title: '物料名称',
render: (txt, roced) => txt
}
export const MaterialModelColumn = {
title: '规格型号',
render: (txt, roced) => txt
}
export const ClassColumn = {
title: '品类',
render: (txt, roced) => txt
}
export const BrandColumn = {
title: '品牌',
render: (txt, roced) => txt
}
export const UntilColumn = {
title: '单位',
render: (txt, roced) => txt
}
export const OrderNoColumn = {
title: '订单号',
render: (txt, roced) => txt
}
export const OrderCreatedAtColumn = {
title: '下单时间',
render: (txt, roced) => txt
}
export const OredrNumColumn = {
title: '订单数量',
render: (txt, roced) => txt
}
export const DeliveryNumColumn = {
title: '送货数量',
render: (txt, roced) => txt
}
export const ConsigneeNumColumn = {
title: '收货数量',
render: (txt, roced) => txt
}
\ No newline at end of file
......@@ -3,23 +3,96 @@
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import React, { useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { history } from 'umi'
import ReutrnEle from '@/components/ReturnEle'
const DeliveryNoticeManageSRMDetails: React.FC = () => {
const [details, setDetails] = useState<any>({})
return (
<PageHeaderWrapper
title={details?.name}
onBack={() => history.goBack()}
backIcon={<ReutrnEle />}
>
<div>送货单 - 送货单管理详情SRM</div>
</PageHeaderWrapper>
)
}
export default DeliveryNoticeManageSRMDetails
\ No newline at end of file
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import React, { useState } from 'react'
import { BillsInfo, ConsigneeLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, DeliveryAbstractLabel, DeliveryAddrLabel, DeliveryDateLabel, DeliveryGood, DeliveryInfo, DeliveryNameLabel, DeliveryNoLabel, DeliveryPhoneLabel, DeliverySlefAddrLabel, DeliveryTimeLabel, DeliveryTypeLabel, Distribution, LogisticsCarNoLabel, LogisticsCompanyLabel, LogisticsInfo, LogisticsNoLabel, NoteLabel, OutStatusLabel } from '../../constants'
import { BaseInfo as ContentBox } from '@/components/BaseInfo'
const ContentBoxItem = ContentBox.BaseInfoItem;
const DeliveryNoticeManageSRMDetails: React.FC = () => {
const [anchors, setAnchors] = useState<AnchorsItem[]>([
BillsInfo,
Distribution,
DeliveryInfo,
LogisticsInfo,
DeliveryGood,
])
return (
<AnchorPage title="送货单管理详情(B2B)"
anchors={anchors}
>
<ContentBox title={BillsInfo.name} id={BillsInfo.key}>
<ContentBoxItem label={DeliveryNoLabel}>
</ContentBoxItem>
<ContentBoxItem label={DeliveryAbstractLabel}>
</ContentBoxItem>
<ContentBoxItem label={NoteLabel}>
</ContentBoxItem>
<ContentBoxItem label={OutStatusLabel}>
</ContentBoxItem>
</ContentBox>
<ContentBox title={Distribution.name} id={Distribution.key}>
<ContentBoxItem label={DeliveryDateLabel}>
</ContentBoxItem>
<ContentBoxItem label={DeliveryNameLabel}>
</ContentBoxItem>
<ContentBoxItem label={DeliveryTimeLabel}>
</ContentBoxItem>
<ContentBoxItem label={DeliveryPhoneLabel}>
</ContentBoxItem>
</ContentBox>
<ContentBox title={DeliveryInfo.name} id={DeliveryInfo.key}>
<ContentBoxItem label={ConsigneeTimeLabel}>
</ContentBoxItem>
<ContentBoxItem label={DeliveryAddrLabel}>
</ContentBoxItem>
<ContentBoxItem label={DeliverySlefAddrLabel}>
</ContentBoxItem>
</ContentBox>
<ContentBox title={LogisticsInfo.name} id={LogisticsInfo.key}>
<ContentBoxItem label={DeliveryTypeLabel}>
</ContentBoxItem>
<ContentBoxItem label={LogisticsCarNoLabel}>
</ContentBoxItem>
<ContentBoxItem label={LogisticsCompanyLabel}>
</ContentBoxItem>
<ContentBoxItem label={LogisticsNoLabel}>
</ContentBoxItem>
</ContentBox>
</AnchorPage>
)
}
export default DeliveryNoticeManageSRMDetails
\ No newline at end of file
......@@ -14,18 +14,10 @@ import { createFormActions } from '@formily/antd'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { deliveryPlanManagementQuerySchema } from './schema'
import { IStatusEnum, TagStatusFun } from '../../constants/status'
import { TagStatus } from '../../constants/status'
const tagStatus = new TagStatus()
const statusReference: IStatusEnum = {
// 待提交
2: 'toSbumit',
// 待确认
3: 'toBeConfirmed',
// 待修改
4: 'toBeModified',
// 已确认
5: 'confirmed'
}
const DeliveryPlanManagementQuery: React.FC = () => {
const ref = useRef<any>({})
......@@ -73,11 +65,14 @@ const DeliveryPlanManagementQuery: React.FC = () => {
title: '外部状态',
dataIndex: 'id6',
key: 'id6',
render: (text: string, record: any) => (
<Tag color={TagStatusFun(statusReference, record.id, 'bgColor')}>
<span style={{ color: TagStatusFun(statusReference, record.id, 'fontColor') }}>{text}</span>
</Tag>
)
render: (text: string, record: any) => {
const sytle = tagStatus.getTagStyle(record.id);
return (
<Tag color={sytle.bgColor}>
<span style={{ color: sytle.fontColor }}>{text}</span>
</Tag>
)
}
},
{
title: '操作',
......
......@@ -4,10 +4,11 @@ import { useState } from "react"
import {
BillsInfo, DeliveryInfo, LogisticsInfo, Harvest, HarvestMaterial,
ReceiptAddLabel, ReceiptAbstractLabel, SupplyMembersLabel, NoteLabel, DeliveryTimeLabel,
ConsigneeLabel, DeliveryAddrLabel, DeliveryOrderNoLabel, ConsigneePhoneLabel, ConsigneeTimeLable, LogisticsCompanyLable, LogisticsCarNoLable, LogisticsNoLable
ConsigneeLabel, DeliveryAddrLabel, DeliveryOrderNoLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, LogisticsCompanyLabel, LogisticsCarNoLabel, LogisticsNoLabel
} from '../../constants'
import { DatePicker, Form, Input } from 'antd'
import { DatePicker, Form, Input, Table } from 'antd'
import { FormItem } from '@/components/FormItem'
import { DeliveryNoteAddFromTableColumn } from "../../constants/page-table-column"
function DeliveryNoteAddForm() {
......@@ -45,7 +46,7 @@ function DeliveryNoteAddForm() {
</BaseInfo>
<BaseInfo title={Harvest.name} id={Harvest.key}>
<BaseInfo.BaseInfoItem label={ConsigneeTimeLable}>
<BaseInfo.BaseInfoItem label={ConsigneeTimeLabel}>
<FormItem>
<DatePicker className="w-full" />
</FormItem>
......@@ -82,10 +83,10 @@ function DeliveryNoteAddForm() {
</BaseInfo>
<BaseInfo title={LogisticsInfo.name} id={LogisticsInfo.key}>
<BaseInfo.BaseInfoItem label={LogisticsCompanyLable}>
<BaseInfo.BaseInfoItem label={LogisticsCompanyLabel}>
HF200019343344
</BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label={LogisticsCarNoLable}>
<BaseInfo.BaseInfoItem label={LogisticsCarNoLabel}>
<div className="#LogisticsAddr">
<div className="#LogisticsAddrDisc leading-10">
广东省广州市海珠区新港东路1068号中洲中心
......@@ -95,12 +96,18 @@ function DeliveryNoteAddForm() {
</div>
</div>
</BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label={LogisticsNoLable}>
<BaseInfo.BaseInfoItem label={LogisticsNoLabel}>
2012 / 09 / 10
</BaseInfo.BaseInfoItem>
</BaseInfo>
<BaseInfo title={HarvestMaterial.name} id={HarvestMaterial.key} cols={1}>
<Table className="w-full" columns={DeliveryNoteAddFromTableColumn} />
</BaseInfo>
</AnchorPage>
)
......
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