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