Commit 0ac97517 authored by Gavin Peng's avatar Gavin Peng

feat: 送货通知单管理

parent b8ca0b00
// module.exports = [
// { name: 'LogisticsV2', token: '732fb8e33970ff5dee830423a630e8e85c3ef3293abba7581b16749dfce8608b', categoryIds: [0], }, // 物流能力v2
// { name: 'ProductV2', token: 'df37f2a0e3829c4288708ae211920bdbdee55e5e2f48b1e8cf7d1925ac618d9a', categoryIds: [0], }, // 商品服务V2
// { name: 'TemplateV2', token: '7bb5578bc50e4e7935cbc146a2192e978053d5380cc96fcfdc0a754cfe885ec5', categoryIds: [0], }, // 页面模板服务V2
// { name: 'PayV2', token: '4b5f2f2d42f0774b61074d69d5d756c725ba067d9dafe2c3785f592ae85d1696', categoryIds: [0], }, // 支付服务
// { name: 'SearchV2', token: 'f3e6ec26764f54d06ba33f487ff42d7debeaef397e51dc395040447737eb2e66', categoryIds: [0], }, // 搜索服务V2
// { name: 'PurchaseV2', token: '84c81ef877863ad4e2c0ebb2c3b3e80f9539420f2fc0828ef33f5159e8423b2c', categoryIds: [0] }, // 采购服务V2
// { name: 'SettleV2', token: 'fed8d45aa92e7f0e382a3dcc5e0ef63f13f0badeabab76d6a6e2db49aa403346', categoryIds: [0] },
// { name: 'TransactionV2', token: '3ad04435494d01c359b9f07948338e019133a3e6c0fccdbe1bc3adc19cf1e0b1', categoryIds: [0] }, // 交易服务V2
// { name: 'ContractV2', token: 'bbf1f327cfe7c59d1e7fd9c5d25119829dd79d238b1f1c79ed97331e220721a4', categoryIds: [0] }, // 合同能力V2
// { name: 'OrderNewV2', token: '89202a7986a86e7306925203d7eea0d999af8bb98d70a210d217a470d44b2dba', categoryIds: [0], }, //订单服务V2 New
// { name: 'MemberV2', token: 'be87c2732cb1253f82fe6c27d6cca9982c7dca9b384e46cc2e797b5835846834', categoryIds: [0]}, //会员服务 V2
// { name: 'ReportV2', token: 'dab50c384c27f1c981a03f2c44ad76d1e7e1f60b4520bd279cea67f5cf146cee', categoryIds: [0]}, // 报表服务v2 首页
// { name: 'EnhanceV2', token: '71b97616a81866ade2731437ca121e288b1dd8331dce4b5c1ccaacb176c16580', categoryIds: [0], }, // 加工服务v2
// { name: 'MessageV2', token: '69a667ec9861e8bdc25b89238d0b908a2123d9fce26e72fec3cdf6cd0b1f2681', categoryIds: [0], }, // 消息中心v2
// { name: 'MarketingV2', token: 'f6d5cee2383ca203dfa2882b84dfa02a1d79de3c3ad892b42f030437fdc5ea21', categoryIds: [0], }, // 营销能力
// { name: 'AfterServiceV2', token: '58748fc89dcdb33ec5cac520c00293ba92abca362a8ddb979df589effd0db9bd', categoryIds: [0], }, // 售后能力V2
// { name: 'ManageV2', token: '9ee3a1cb5a73ca02935e70debeda5bde0464f2fe1eb32c25855fd8acff9f68f2', categoryIds: [0] }, // 平台后台v2
// ]
// 0418 token
module.exports = [
{ name: 'LogisticsV2', token: '5b6895dc979cdfab94633c2e4560a93447433a9d6fd21a104cc7172de4a4ca37', categoryIds: [0], }, // 物流能力v2
{ name: 'ProductV2', token: 'f29e9838081cc781c714c9097e1c2d97710f089d1d63a165558f21d2061a2404', categoryIds: [0], }, // 商品服务V2
{ name: 'TemplateV2', token: '3ec622ca65837d19c73a0ccca73da613b9aa1895f4f9143bf3eb98c8f605e66e', categoryIds: [0], }, // 页面模板服务V2
{ name: 'PayV2', token: 'ed541f0943fbc761e47c5d413a7776186bf67c43f99d1e91214ae122cee465c0', categoryIds: [0], }, // 支付服务
{ name: 'SearchV2', token: 'b0423596740a30283a6b70343800e2e174a6560a127232194771573848f67163', categoryIds: [0], }, // 搜索服务V2
{ name: 'PurchaseV2', token: 'c8b34b7cf918b96f849df658601f3d845b0c6a265de64337d8a908bbc633470d', categoryIds: [0] }, // 采购服务V2
{ name: 'SettleV2', token: '47a1140c81879627e572bc52110ee0adcdc78c643a64f71c372effb35a026188', categoryIds: [0] }, // 结算服务v2
{ name: 'TransactionV2', token: 'd2c967e2d0ee89056d3ff01ba9e95c0444e53a3080ca6c4f0115e0cebc9dc76b', categoryIds: [0] }, // 交易服务V2
{ name: 'ContractV2', token: 'd8193b85000801f3a193c2f29b85914ade3ba3d5da2edac400e17f8938ddd70f', categoryIds: [0] }, // 合同能力V2
{ name: 'OrderNewV2', token: '8bdfa25f6af5ded9d4dbdbcbf46b4ab152171330a47b32eee3743a192192a165', categoryIds: [0], }, //订单服务V2 New
{ name: 'MemberV2', token: '7f9275059dca64485b5a21e0eb6f5cd0dddc9e30c5b03059471403fc5de82413', categoryIds: [0]}, //会员服务 V2
{ name: 'ReportV2', token: 'a0be98fff3a0d003cf04fb066cdca89a832fdcbf8d7cfd19a2e34f710088aadc', categoryIds: [0]}, // 报表服务v2 首页
{ name: 'EnhanceV2', token: '7522ffe44cc00a0f3a1223a80113e7913293c00121f9106bcc22dcd3fc0ab380', categoryIds: [0], }, // 加工服务v2
{ name: 'MessageV2', token: '6dd48310418fa369d74b9d197e01b210703301060ae0fe11837e4f70a1278bd3', categoryIds: [0], }, // 消息中心v2
{ name: 'MarketingV2', token: 'da33eca17ea2afd5dd5416f5ea5a5e45b481d1484518cd8fcad20c4289d0109b', categoryIds: [0], }, // 营销能力
{ name: 'AfterServiceV2', token: '7d8ead30acaa11c08921837d2bb5b507c9f8b8cdf795b15b47239ed1d8f79892', categoryIds: [0], }, // 售后能力V2
{ name: 'ManageV2', token: '0c0eb3719da2751a0acf843f5416ca950115f524013ec6a2e163e55c754b4518', categoryIds: [0] }, // 平台后台v2
{ name: 'LogisticsV2', token: '732fb8e33970ff5dee830423a630e8e85c3ef3293abba7581b16749dfce8608b', categoryIds: [0], }, // 物流能力v2
{ name: 'ProductV2', token: 'df37f2a0e3829c4288708ae211920bdbdee55e5e2f48b1e8cf7d1925ac618d9a', categoryIds: [0], }, // 商品服务V2
{ name: 'TemplateV2', token: '7bb5578bc50e4e7935cbc146a2192e978053d5380cc96fcfdc0a754cfe885ec5', categoryIds: [0], }, // 页面模板服务V2
{ name: 'PayV2', token: '4b5f2f2d42f0774b61074d69d5d756c725ba067d9dafe2c3785f592ae85d1696', categoryIds: [0], }, // 支付服务
{ name: 'SearchV2', token: 'f3e6ec26764f54d06ba33f487ff42d7debeaef397e51dc395040447737eb2e66', categoryIds: [0], }, // 搜索服务V2
{ name: 'PurchaseV2', token: '84c81ef877863ad4e2c0ebb2c3b3e80f9539420f2fc0828ef33f5159e8423b2c', categoryIds: [0] }, // 采购服务V2
{ name: 'SettleV2', token: 'fed8d45aa92e7f0e382a3dcc5e0ef63f13f0badeabab76d6a6e2db49aa403346', categoryIds: [0] },
{ name: 'TransactionV2', token: '3ad04435494d01c359b9f07948338e019133a3e6c0fccdbe1bc3adc19cf1e0b1', categoryIds: [0] }, // 交易服务V2
{ name: 'ContractV2', token: 'bbf1f327cfe7c59d1e7fd9c5d25119829dd79d238b1f1c79ed97331e220721a4', categoryIds: [0] }, // 合同能力V2
{ name: 'OrderNewV2', token: '89202a7986a86e7306925203d7eea0d999af8bb98d70a210d217a470d44b2dba', categoryIds: [0], }, //订单服务V2 New
{ name: 'MemberV2', token: 'be87c2732cb1253f82fe6c27d6cca9982c7dca9b384e46cc2e797b5835846834', categoryIds: [0]}, //会员服务 V2
{ name: 'ReportV2', token: 'dab50c384c27f1c981a03f2c44ad76d1e7e1f60b4520bd279cea67f5cf146cee', categoryIds: [0]}, // 报表服务v2 首页
{ name: 'EnhanceV2', token: '71b97616a81866ade2731437ca121e288b1dd8331dce4b5c1ccaacb176c16580', categoryIds: [0], }, // 加工服务v2
{ name: 'MessageV2', token: '69a667ec9861e8bdc25b89238d0b908a2123d9fce26e72fec3cdf6cd0b1f2681', categoryIds: [0], }, // 消息中心v2
{ name: 'MarketingV2', token: 'f6d5cee2383ca203dfa2882b84dfa02a1d79de3c3ad892b42f030437fdc5ea21', categoryIds: [0], }, // 营销能力
{ name: 'AfterServiceV2', token: '58748fc89dcdb33ec5cac520c00293ba92abca362a8ddb979df589effd0db9bd', categoryIds: [0], }, // 售后能力V2
{ name: 'ManageV2', token: '9ee3a1cb5a73ca02935e70debeda5bde0464f2fe1eb32c25855fd8acff9f68f2', categoryIds: [0] }, // 平台后台v2
]
// 0418 token
// module.exports = [
// { name: 'LogisticsV2', token: '5b6895dc979cdfab94633c2e4560a93447433a9d6fd21a104cc7172de4a4ca37', categoryIds: [0], }, // 物流能力v2
// { name: 'ProductV2', token: 'f29e9838081cc781c714c9097e1c2d97710f089d1d63a165558f21d2061a2404', categoryIds: [0], }, // 商品服务V2
// { name: 'TemplateV2', token: '3ec622ca65837d19c73a0ccca73da613b9aa1895f4f9143bf3eb98c8f605e66e', categoryIds: [0], }, // 页面模板服务V2
// { name: 'PayV2', token: 'ed541f0943fbc761e47c5d413a7776186bf67c43f99d1e91214ae122cee465c0', categoryIds: [0], }, // 支付服务
// { name: 'SearchV2', token: 'b0423596740a30283a6b70343800e2e174a6560a127232194771573848f67163', categoryIds: [0], }, // 搜索服务V2
// { name: 'PurchaseV2', token: 'c8b34b7cf918b96f849df658601f3d845b0c6a265de64337d8a908bbc633470d', categoryIds: [0] }, // 采购服务V2
// { name: 'SettleV2', token: '47a1140c81879627e572bc52110ee0adcdc78c643a64f71c372effb35a026188', categoryIds: [0] }, // 结算服务v2
// { name: 'TransactionV2', token: 'd2c967e2d0ee89056d3ff01ba9e95c0444e53a3080ca6c4f0115e0cebc9dc76b', categoryIds: [0] }, // 交易服务V2
// { name: 'ContractV2', token: 'd8193b85000801f3a193c2f29b85914ade3ba3d5da2edac400e17f8938ddd70f', categoryIds: [0] }, // 合同能力V2
// { name: 'OrderNewV2', token: '8bdfa25f6af5ded9d4dbdbcbf46b4ab152171330a47b32eee3743a192192a165', categoryIds: [0], }, //订单服务V2 New
// { name: 'MemberV2', token: '7f9275059dca64485b5a21e0eb6f5cd0dddc9e30c5b03059471403fc5de82413', categoryIds: [0]}, //会员服务 V2
// { name: 'ReportV2', token: 'a0be98fff3a0d003cf04fb066cdca89a832fdcbf8d7cfd19a2e34f710088aadc', categoryIds: [0]}, // 报表服务v2 首页
// { name: 'EnhanceV2', token: '7522ffe44cc00a0f3a1223a80113e7913293c00121f9106bcc22dcd3fc0ab380', categoryIds: [0], }, // 加工服务v2
// { name: 'MessageV2', token: '6dd48310418fa369d74b9d197e01b210703301060ae0fe11837e4f70a1278bd3', categoryIds: [0], }, // 消息中心v2
// { name: 'MarketingV2', token: 'da33eca17ea2afd5dd5416f5ea5a5e45b481d1484518cd8fcad20c4289d0109b', categoryIds: [0], }, // 营销能力
// { name: 'AfterServiceV2', token: '7d8ead30acaa11c08921837d2bb5b507c9f8b8cdf795b15b47239ed1d8f79892', categoryIds: [0], }, // 售后能力V2
// { name: 'ManageV2', token: '0c0eb3719da2751a0acf843f5416ca950115f524013ec6a2e163e55c754b4518', categoryIds: [0] }, // 平台后台v2
// ]
/**
* 订单能力 -- 送货通知单管理
* @author: Gavin
*/
const DeliveryNoticeManagement = [
{
path: '/memberCenter/order/deliveryNoticeManagement',
name: '送货通知单管理',
routes: [
{
/** 送货通知单查询*/
path: '/memberCenter/order/deliveryNoticeManagement/query',
name: '送货通知单查询',
component: '@/pages/order/deliveryNoticeManagement/deliveryNoticeQuery'
},
{
/** 送货通知单详情*/
path: '/memberCenter/order/deliveryNoticeManagement/details',
name: '送货通知单详情',
component: '@/pages/order/deliveryNoticeManagement/deliveryNoticeQuery/details',
hideInMenu: true,
},
{
/** 待提交送货通知单SRM*/
path: '/memberCenter/order/deliveryNoticeManagement/awaitSRM',
name: '待提交送货通知单(SRM)',
component: '@/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM'
},
{
/** 增修查送货通知单SRM详情*/
path: '/memberCenter/order/deliveryNoticeManagement/awaitSRM/details',
name: '增修查送货通知单SRM详情',
component: '@/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/details',
hideInMenu: true,
},
{
/** 待提交送货通知单B2B*/
path: '/memberCenter/order/deliveryNoticeManagement/awaitB2B',
name: '待提交送货通知单(B2B)',
component: '@/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B'
},
{
/** 增修查送货通知单B2B详情*/
path: '/memberCenter/order/deliveryNoticeManagement/awaitB2B/details',
name: '增修查送货通知单B2B详情',
component: '@/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/details',
hideInMenu: true,
},
]
}
]
export default DeliveryNoticeManagement
\ No newline at end of file
......@@ -4,14 +4,19 @@
*/
import DeliveryPlanCollaboration from './deliveryPlanCollaboration'
import DeliveryPlanManagement from './deliveryPlanManagement'
import DeliveryNoticeManagement from './deliveryNoticeManagement'
const OrderRoute = {
path: "/memberCenter/order",
name: "订单能力",
icon: "order",
routes: [
// 送货计划管理
...DeliveryPlanManagement,
// 送货计划协同
...DeliveryPlanCollaboration,
// 送货通知单管理
...DeliveryNoticeManagement,
]
}
......
/**
* 订单能力 - 待提交送货通知单B2B - 增修查送货通知单B2B详情
* @author: Gavin
* @description: 与SRM内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import React, { useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { history } from 'umi'
import ReutrnEle from '@/components/ReturnEle'
const DeliveryNoticeAwaitB2BDetails: React.FC = () => {
const [details, setDetails] = useState<any>({})
return (
<PageHeaderWrapper
title={details?.name}
onBack={() => history.goBack()}
backIcon={<ReutrnEle />}
>
<div>待提交送货通知单B2B - 增修查送货通知单B2B详情</div>
</PageHeaderWrapper>
)
}
export default DeliveryNoticeAwaitB2BDetails
\ No newline at end of file
/**
* 订单能力 - 送货通知单管理 - 待提交送货通知单B2B
* @author: Gavin
* @description: 与SRM内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Button, Card, Space, Tag } from 'antd'
import StandardTable from '@/components/StandardTable'
import { ColumnType } from 'antd/lib/table'
import TableOperation from '@/components/TableOperation'
import EyePreview from '@/components/EyePreview'
import NiceForm from '@/components/NiceForm'
import { createFormActions } from '@formily/antd'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { deliveryNoticeUndeterminedSRMSchema } from './schema'
const tagStatusColor = {
// 待提交
2: { color: '#f4f5f7', fontColor: '#5c626a' },
// 待确认
3: { color: '#ecf2fe', fontColor: '#4787f0' },
// 待修订
4: { color: '#eae6ff', fontColor: '#9963d8' },
// 已确认
5: { color: '#ebf9f6', fontColor: '#00a98f' },
// 已生产送货单
6: { color: '#f0f5ff', fontColor: '#f0f5ff' },
// 已作废
7: { color: '#fff2f0', fontColor: '#ff4d4f' },
}
const DeliveryNoticeAwaitSRM: React.FC = () => {
const ref = useRef<any>({})
const formActions = createFormActions()
const controllerBtns = (<Space></Space>)
const renderOptionButton = (record: any) => {
const btnAuthOfOperationTextMap = {
'修改': 'DevTest',
'查看': 'DevTest',
}
const buttonGroup = {
'修改': true,
'查看': true,
}
const operationHandler = {
'修改': () => { console.log('修改 :>> ',) },
'查看': () => { console.log('查看 :>> ',) },
}
return (
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={btnAuthOfOperationTextMap}
/>
)
}
const columns: ColumnType<unknown>[] = [
{
title: '通知单号',
dataIndex: 'id',
key: 'id',
width: 160,
render: (text: unknown, record: unknown) => <EyePreview url='//memberCenter/order/deliveryNoticeManagement/awaitB2B/details'>{text}</EyePreview>
},
{ title: '通知单摘要', dataIndex: 'id2', key: 'id2' },
{ title: '送货日期', dataIndex: 'id3', key: 'id3' },
{ title: '采购会员', dataIndex: 'id5', key: 'id5' },
{ title: '单据时间', dataIndex: 'id4', key: 'id4' },
{
title: '外部状态',
dataIndex: 'id6',
key: 'id6',
render: (text: string, record: any) => (
<Tag color={tagStatusColor[record.id3]?.color}>
<span style={{ color: tagStatusColor[record.id3]?.fontColor }}>{text}</span>
</Tag>
)
},
{
title: '操作',
dataIndex: '',
key: 'x',
align: 'center',
render: (record) => renderOptionButton(record)
},
]
const fetchData = (params: unknown) => {
console.log('params :>> ', params);
return new Promise((resolve) => {
const data = {
totalCount: 1, data: [
{ id: 1, id2: 2, id3: 4, id4: 4, id5: 5, id6: 6 },
{ id: 2, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 3, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 4, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 5, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 6, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 7, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 8, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
]
}
resolve(data)
})
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
// keepAlive={false}
currentRef={ref}
columns={columns}
tableProps={{ rowKey: 'id', }}
fetchTableData={(params: unknown) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
expressionScope={{
controllerBtns,
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'planCode',
FORM_FILTER_PATH,
)
}}
schema={deliveryNoticeUndeterminedSRMSchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default DeliveryNoticeAwaitSRM
\ No newline at end of file
/**
* 订单能力 -- 送货计划查询 Schema
* @author: Gavin
*/
import { ISchema } from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
export const deliveryNoticeUndeterminedSRMSchema: ISchema = {
type: 'object',
properties: {
mageLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{controllerBtns}}',
},
},
planCode: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
allowClear: true,
placeholder: '请输入通知单号查询'
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
},
colStyle: {
marginLeft: 20,
},
},
properties: {
abstract: {
type: 'string',
'x-component-props': {
allowClear: true,
placeholder: '通知单摘要'
}
},
'[startTime, endTime]': {
type: 'daterange',
'x-component-props': {
allowClear: true,
placeholder: ['送货开始日期', '送货结束日期'],
},
},
supplyMember: {
type: 'string',
'x-component-props': {
allowClear: true,
placeholder: '供应会员'
}
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
}
}
}
}
}
}
\ No newline at end of file
/**
* 订单能力 - 待提交送货通知单SRM - 增修查送货通知单SRM详情
* @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 DeliveryNoticeAwaitSRMDetails: React.FC = () => {
const [details, setDetails] = useState<any>({})
return (
<PageHeaderWrapper
title={details?.name}
onBack={() => history.goBack()}
backIcon={<ReutrnEle />}
>
<div>待提交送货通知单SRM - 增修查送货通知单SRM详情</div>
</PageHeaderWrapper>
)
}
export default DeliveryNoticeAwaitSRMDetails
\ No newline at end of file
/**
* 订单能力 - 送货通知单管理 - 待提交送货通知单SRM
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Button, Card, Space, Tag } from 'antd'
import StandardTable from '@/components/StandardTable'
import { ColumnType } from 'antd/lib/table'
import TableOperation from '@/components/TableOperation'
import EyePreview from '@/components/EyePreview'
import NiceForm from '@/components/NiceForm'
import { createFormActions } from '@formily/antd'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { deliveryNoticeUndeterminedSRMSchema } from './schema'
const tagStatusColor = {
// 待提交
2: { color: '#f4f5f7', fontColor: '#5c626a' },
// 待确认
3: { color: '#ecf2fe', fontColor: '#4787f0' },
// 待修订
4: { color: '#eae6ff', fontColor: '#9963d8' },
// 已确认
5: { color: '#ebf9f6', fontColor: '#00a98f' },
// 已生产送货单
6: { color: '#f0f5ff', fontColor: '#f0f5ff' },
// 已作废
7: { color: '#fff2f0', fontColor: '#ff4d4f' },
}
const DeliveryNoticeAwaitSRM: React.FC = () => {
const ref = useRef<any>({})
const formActions = createFormActions()
const controllerBtns = (<Space></Space>)
const renderOptionButton = (record: any) => {
const btnAuthOfOperationTextMap = {
'修改': 'DevTest',
'查看': 'DevTest',
}
const buttonGroup = {
'修改': true,
'查看': true,
}
const operationHandler = {
'修改': () => { console.log('修改 :>> ',) },
'查看': () => { console.log('查看 :>> ',) },
}
return (
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={btnAuthOfOperationTextMap}
/>
)
}
const columns: ColumnType<unknown>[] = [
{
title: '通知单号',
dataIndex: 'id',
key: 'id',
width: 160,
render: (text: unknown, record: unknown) => <EyePreview url='/'>{text}</EyePreview>
},
{ title: '通知单摘要', dataIndex: 'id2', key: 'id2' },
{ title: '送货日期', dataIndex: 'id3', key: 'id3' },
{ title: '采购会员', dataIndex: 'id5', key: 'id5' },
{ title: '单据时间', dataIndex: 'id4', key: 'id4' },
{
title: '外部状态',
dataIndex: 'id6',
key: 'id6',
render: (text: string, record: any) => (
<Tag color={tagStatusColor[record.id3]?.color}>
<span style={{ color: tagStatusColor[record.id3]?.fontColor }}>{text}</span>
</Tag>
)
},
{
title: '操作',
dataIndex: '',
key: 'x',
align: 'center',
render: (record) => renderOptionButton(record)
},
]
const fetchData = (params: unknown) => {
console.log('params :>> ', params);
return new Promise((resolve) => {
const data = {
totalCount: 1, data: [
{ id: 1, id2: 2, id3: 4, id4: 4, id5: 5, id6: 6 },
{ id: 2, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 3, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 4, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 5, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 6, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 7, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 8, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
]
}
resolve(data)
})
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
// keepAlive={false}
currentRef={ref}
columns={columns}
tableProps={{ rowKey: 'id', }}
fetchTableData={(params: unknown) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
expressionScope={{
controllerBtns,
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'planCode',
FORM_FILTER_PATH,
)
}}
schema={deliveryNoticeUndeterminedSRMSchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default DeliveryNoticeAwaitSRM
\ No newline at end of file
/**
* 订单能力 -- 送货计划查询 Schema
* @author: Gavin
*/
import { ISchema } from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
export const deliveryNoticeUndeterminedSRMSchema: ISchema = {
type: 'object',
properties: {
mageLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{controllerBtns}}',
},
},
planCode: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
allowClear: true,
placeholder: '请输入通知单号查询'
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
},
colStyle: {
marginLeft: 20,
},
},
properties: {
abstract: {
type: 'string',
'x-component-props': {
allowClear: true,
placeholder: '通知单摘要'
}
},
'[startTime, endTime]': {
type: 'daterange',
'x-component-props': {
allowClear: true,
placeholder: ['送货开始日期', '送货结束日期'],
},
},
supplyMember: {
type: 'string',
'x-component-props': {
allowClear: true,
placeholder: '供应会员'
}
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
}
}
}
}
}
}
\ No newline at end of file
/**
* 订单能力 - 送货通知单管理 - 送货通知单详情
* @author: Gavin
* @description:
*/
import React, { useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { history } from 'umi'
import ReutrnEle from '@/components/ReturnEle'
const DeliveryNoticeDetails: React.FC = () => {
const [details, setDetails] = useState<any>({})
return (
<PageHeaderWrapper
title={details?.name}
onBack={() => history.goBack()}
backIcon={<ReutrnEle />}
>
<div>送货通知单管理 - 送货通知单详情</div>
</PageHeaderWrapper>
)
}
export default DeliveryNoticeDetails
\ No newline at end of file
/**
* 订单能力 - 送货通知单管理 - 送货通知单查询
* @author: Gavin
* @description:
*/
import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Button, Card, Space, Tag } from 'antd'
import StandardTable from '@/components/StandardTable'
import { ColumnType } from 'antd/lib/table'
import TableOperation from '@/components/TableOperation'
import EyePreview from '@/components/EyePreview'
import NiceForm from '@/components/NiceForm'
import { createFormActions } from '@formily/antd'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { deliveryNoticeQuerySchema } from './schema'
const tagStatusColor = {
// 待提交
2: { color: '#f4f5f7', fontColor: '#5c626a' },
// 待确认
3: { color: '#ecf2fe', fontColor: '#4787f0' },
// 待修订
4: { color: '#eae6ff', fontColor: '#9963d8' },
// 已确认
5: { color: '#ebf9f6', fontColor: '#00a98f' },
// 已生产送货单
6: { color: '#f0f5ff', fontColor: '#f0f5ff' },
// 已作废
7: { color: '#fff2f0', fontColor: '#ff4d4f' },
}
const DeliveryNoticeQuery: React.FC = () => {
const ref = useRef<any>({})
const formActions = createFormActions()
const controllerBtns = (<Space></Space>)
const renderOptionButton = (record: any) => {
const btnAuthOfOperationTextMap = {
'生产送货单': 'DevTest',
'变更': 'DevTest',
'作废': 'DevTest',
'查看': 'DevTest',
}
const buttonGroup = {
'生产送货单': true,
'变更': true,
'作废': true,
'查看': true,
}
const operationHandler = {
'生产送货单': () => { console.log('生产送货单 :>> ',) },
'变更': () => { console.log('变更 :>> ',) },
'作废': () => { console.log('作废 :>> ',) },
'查看': () => { console.log('查看 :>> ',) },
}
return (
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={btnAuthOfOperationTextMap}
/>
)
}
const columns: ColumnType<unknown>[] = [
{
title: '通知单号',
dataIndex: 'id',
key: 'id',
width: 160,
render: (text: unknown, record: unknown) => <EyePreview url='/memberCenter/order/deliveryNoticeManagement/details'>{text}</EyePreview>
},
{ title: '通知单摘要', dataIndex: 'id2', key: 'id2' },
{ title: '送货日期', dataIndex: 'id3', key: 'id3' },
{ title: '采购会员', dataIndex: 'id5', key: 'id5' },
{ title: '单据时间', dataIndex: 'id4', key: 'id4' },
{
title: '外部状态',
dataIndex: 'id6',
key: 'id6',
render: (text: string, record: any) => (
<Tag color={tagStatusColor[record.id]?.color}>
<span style={{ color: tagStatusColor[record.id]?.fontColor }}>{text}</span>
</Tag>
)
},
{
title: '操作',
dataIndex: '',
key: 'x',
align: 'center',
render: (record) => renderOptionButton(record)
},
]
const fetchData = (params: unknown) => {
console.log('params :>> ', params);
return new Promise((resolve) => {
const data = {
totalCount: 1, data: [
{ id: 1, id2: 2, id3: 3, id4: 4, id5: 5, id6: 6 },
{ id: 2, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 3, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 4, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 5, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 6, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 7, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
{ id: 8, id2: 3, id3: 4, id4: 5, id5: 6, id6: 7 },
]
}
resolve(data)
})
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
// keepAlive={false}
currentRef={ref}
columns={columns}
tableProps={{ rowKey: 'id', }}
fetchTableData={(params: unknown) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
expressionScope={{
controllerBtns,
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'planCode',
FORM_FILTER_PATH,
)
}}
schema={deliveryNoticeQuerySchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default DeliveryNoticeQuery
/**
* 订单能力 -- 送货计划查询 Schema
* @author: Gavin
*/
import { ISchema } from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
export const deliveryNoticeQuerySchema: ISchema = {
type: 'object',
properties: {
mageLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{controllerBtns}}',
},
},
planCode: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
allowClear: true,
placeholder: '请输入通知单号查询'
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
},
colStyle: {
marginLeft: 20,
},
},
properties: {
abstract: {
type: 'string',
'x-component-props': {
allowClear: true,
placeholder: '通知单摘要'
}
},
'[startTime, endTime]': {
type: 'daterange',
'x-component-props': {
allowClear: true,
placeholder: ['送货开始日期', '送货结束日期'],
},
},
supplyMember: {
type: 'string',
'x-component-props': {
allowClear: true,
placeholder: '供应会员'
}
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
}
}
}
}
}
}
\ No newline at end of file
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