Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linweijiong
jinfa-platform
Commits
1bbee90d
Commit
1bbee90d
authored
Nov 24, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改加工
parent
851afab3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
136 additions
and
124 deletions
+136
-124
handlingRoute.ts
config/routes/handlingRoute.ts
+3
-3
columns.tsx
src/pages/handling/assign/detail/columns.tsx
+8
-3
index.tsx
src/pages/handling/assign/detail/index.tsx
+21
-9
index.tsx
src/pages/handling/assign/processStock/index.tsx
+13
-3
index.tsx
src/pages/handling/common/index.tsx
+70
-20
content.tsx
src/pages/handling/components/ProcessDetail/content.tsx
+5
-0
index.tsx
src/pages/handling/components/ProcessProducts/index.tsx
+12
-3
index.tsx
src/pages/handling/components/Query/index.tsx
+4
-3
index.tsx
src/pages/handling/components/SelectGoods/index.tsx
+0
-80
No files found.
config/routes/handlingRoute.ts
View file @
1bbee90d
...
...
@@ -226,7 +226,7 @@ const HandlingRoute = {
path
:
'/memberCenter/handling/confirm/pendingAddLogistics'
,
name
:
'pendingAddLogistics'
,
icon
:
'smile'
,
component
:
'@/pages/handling/
confirm/Query
'
,
component
:
'@/pages/handling/
assign/processStock
'
,
},
// 确认生产通知单 -> 新建物流单
// {
...
...
@@ -240,14 +240,14 @@ const HandlingRoute = {
path
:
'/memberCenter/handling/confirm/pendingDelivered'
,
name
:
'pendingDelivered'
,
icon
:
'smile'
,
component
:
'@/pages/handling/
confirm/Query
'
,
component
:
'@/pages/handling/
assign/processStock
'
,
},
// 确认生产通知单 -> 待确认回单生产通知单
{
path
:
'/memberCenter/handling/confirm/pendingReceipt'
,
name
:
'pendingReceipt'
,
icon
:
'smile'
,
component
:
'@/pages/handling/
confirm/Query
'
component
:
'@/pages/handling/
assign/processStock
'
}
]
}
...
...
src/pages/handling/assign/detail/columns.tsx
View file @
1bbee90d
...
...
@@ -5,7 +5,7 @@ import { ColumnsType } from 'antd/es/table';
/**
* 通知单明细
*/
export
const
columns
:
ColumnsType
=
[
export
const
columns
:
ColumnsType
<
any
>
=
[
{
title
:
'订单号'
,
dataIndex
:
'orderNo'
,
...
...
@@ -60,10 +60,10 @@ export const columns: ColumnsType = [
return
(
<
DrawerProcessDetail
type=
"view"
id=
{
record
.
goods
Id
}
id=
{
record
.
product
Id
}
brand=
{
record
.
brand
}
category=
{
record
.
category
}
name=
{
record
.
goods
Name
}
name=
{
record
.
product
Name
}
productProps=
{
record
.
property
.
specs
}
files=
{
record
.
property
.
annex
}
unitName=
{
record
.
unit
}
...
...
@@ -76,6 +76,11 @@ export const columns: ColumnsType = [
}
},
];
/**
* 通知单明细
*/
const
orderFilterList
=
[
"订单号"
,
"订单数量"
]
export
const
orderDetailColumn
=
columns
.
filter
((
item
)
=>
!
orderFilterList
.
includes
(
item
.
title
.
toString
()));
/**
* 外部工作流记录
...
...
src/pages/handling/assign/detail/index.tsx
View file @
1bbee90d
...
...
@@ -2,7 +2,7 @@ import React, {useState, useEffect, useCallback} from 'react';
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
history
}
from
'umi'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
{
PageHeader
,
Descriptions
,
Card
,
Tabs
,
Row
,
Col
,
Button
}
from
'antd'
;
import
{
PageHeader
,
Descriptions
,
Card
,
Tabs
,
Row
,
Col
,
Button
,
Badge
}
from
'antd'
;
import
Circulation
from
'../../components/Circulation'
;
import
WrapTable
from
'../../components/WrapTable'
;
import
OtherRequirement
from
'../../components/OtherRequirement'
;
...
...
@@ -12,7 +12,7 @@ import { PublicApi } from '@/services/api';
import
StatusTag
from
'@/components/StatusTag'
;
import
DeliveryInfomation
from
'../../components/DeliveryInformation'
;
import
moment
from
'moment'
;
import
{
columns
,
innerWorkFlowRecordColumn
,
outerWorkflowRecordsColumn
,
receiveColumns
}
from
'./columns'
;
import
{
columns
,
orderDetailColumn
,
innerWorkFlowRecordColumn
,
outerWorkflowRecordsColumn
,
receiveColumns
}
from
'./columns'
;
import
ExamineModal
from
'../../components/ExamineModal'
;
import
{
FormOutlined
}
from
'@ant-design/icons'
import
{
...
...
@@ -26,10 +26,12 @@ import {
CONFIRM_PENDING_SUBMIT_DETAIL
,
CONFIRM_PENDING_FIRST_DETAIL
,
CONFIRM_PENDING_SECOND_DETAIL
,
CONFIRM_PENDING_CONFIRM_DETAIL
CONFIRM_PENDING_CONFIRM_DETAIL
,
SUPPLIER_DETAIL_INNER_STATUS_COLOR
,
CONFIRM_DETAIL_INNER_STATUS_COLOR
,
SUPPLIER_OUTER_STATUS_COLOR
}
from
'../../common'
;
// 下面的地址需要抽离出来, 还有以下的相同的path
const
SERVICE_MAP
=
{
[
`
${
ASSIGN_QUERY_DETAIL
}
`
]:
PublicApi
.
getEnhanceSupplierAllDetails
,
...
...
@@ -60,12 +62,15 @@ const EXAM_SERVICE = {
const
{
TabPane
}
=
Tabs
;
const
Detail
:
React
.
FC
<
{}
>
=
()
=>
{
const
pathname
=
history
.
location
.
pathname
;
const
isSupplier
=
pathname
.
includes
(
'assign'
)
;
const
isSetDeliverAddress
=
pathname
==
`
${
CONFIRM_PENDING_SUBMIT_DETAIL
}
`
;
const
[
info
,
setInfo
]
=
useState
<
any
>
({})
const
{
id
}
=
usePageStatus
();
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
deliverAddressOption
,
setDeliverAddressOption
]
=
useState
([]);
const
[
activeAddress
,
setActiveAddress
]
=
useState
<
string
|
null
>
(
null
)
const
isSetDeliverAddress
=
pathname
==
`
${
CONFIRM_PENDING_SUBMIT_DETAIL
}
`
;
useEffect
(()
=>
{
if
(
id
)
{
const
service
=
SERVICE_MAP
[
pathname
];
...
...
@@ -204,9 +209,17 @@ const Detail: React.FC<{}> = () => {
<
Descriptions
.
Item
label=
"单据时间:"
>
{
info
&&
info
.
createTime
&&
moment
(
info
.
createTime
).
format
(
'YYYY-MM-DD'
)
||
null
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"通知单来源:"
>
{
info
?.
source
==
'1'
?
'订单加工'
:
'商品加工'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"外部状态:"
>
<
StatusTag
type=
"success"
title=
{
info
.
outerStatusName
}
/>
<
StatusTag
type=
{
SUPPLIER_OUTER_STATUS_COLOR
[
info
.
outerStatus
]
}
title=
{
info
.
outerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"内部状态:"
>
<
Badge
color=
{
isSupplier
?
SUPPLIER_DETAIL_INNER_STATUS_COLOR
[
info
?.
supplierInnerStatus
||
0
]
:
CONFIRM_DETAIL_INNER_STATUS_COLOR
[
info
?.
processInnerStatus
||
0
]
}
text=
{
info
.
innerStatusName
}
></
Badge
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"内部状态:"
>
{
info
.
innerStatusName
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
<
Col
span=
{
2
}
>
...
...
@@ -214,7 +227,6 @@ const Detail: React.FC<{}> = () => {
renderExtra
()
}
</
Col
>
</
Row
>
</
PageHeader
>
</>
...
...
@@ -227,7 +239,7 @@ const Detail: React.FC<{}> = () => {
<
div
style=
{
{
marginTop
:
'20px'
}
}
>
<
Card
>
<
h1
style=
{
{
fontSize
:
'16px'
,
marginBottom
:
'16px'
}
}
><
strong
>
通知单明细
</
strong
></
h1
>
<
WrapTable
dataSource=
{
info
?.
details
}
columns=
{
columns
}
/>
<
WrapTable
dataSource=
{
info
?.
details
}
columns=
{
info
.
source
===
2
?
orderDetailColumn
:
columns
}
/>
</
Card
>
</
div
>
...
...
src/pages/handling/assign/processStock/index.tsx
View file @
1bbee90d
...
...
@@ -16,7 +16,15 @@ import { Link, history } from 'umi'
const
formActions
=
createFormActions
();
const
ADD_PROCESS_PATH
=
'/memberCenter/tranactionAbility/stockSellStorage/bills/add'
;
const
ADD_DELIVERY_PATH
=
'/memberCenter/tranactionAbility/stockSellStorage/bills/add'
const
ADD_DELIVERY_PATH
=
'/memberCenter/tranactionAbility/stockSellStorage/bills/add'
;
const
TITLE
=
{
'/memberCenter/handling/assign/pendingAddProcessing'
:
"待新建加工入库单"
,
'/memberCenter/handling/confirm/processingInvoiceTobeAdd'
:
"待新增加工发货单"
,
'/memberCenter/handling/confirm/pendingAddLogistics'
:
"待新增物流单"
,
'/memberCenter/handling/confirm/pendingDelivered'
:
"待发货生产通知单"
,
'/memberCenter/handling/confirm/pendingReceipt'
:
"待确认回单生产通知单"
}
const
columns
:
ColumnsType
=
[
{
...
...
@@ -70,7 +78,9 @@ const SERVICE_MAPS = {
///enhance/process/toBeAddDelivery/list
'/memberCenter/handling/assign/pendingAddProcessing'
:
PublicApi
.
getEnhanceSupplierToBeAddStorageList
,
'/memberCenter/handling/confirm/processingInvoiceTobeAdd'
:
PublicApi
.
getEnhanceProcessToBeAddDeliveryList
,
'/memberCenter/handling/confirm/pendingAddLogistics'
:
PublicApi
.
getEnhanceProcessToBeAddLogisticsList
,
'/memberCenter/handling/confirm/pendingDelivered'
:
PublicApi
.
getEnhanceSupplierToBeReceiveList
,
'/memberCenter/handling/confirm/pendingReceipt'
:
PublicApi
.
getEnhanceProcessToBeConfirmReceiptList
}
const
processStock
:
React
.
FC
<
{}
>
=
()
=>
{
...
...
@@ -91,7 +101,7 @@ const processStock: React.FC<{}> = () => {
return
(
<
PageHeaderWrapper
title=
{
"待新增加工入库单"
}
title=
{
TITLE
[
pathname
]
}
>
<
Card
>
<
StandardTable
...
...
src/pages/handling/common/index.tsx
View file @
1bbee90d
...
...
@@ -144,6 +144,26 @@ export const TITLE_MAPS = {
}
// 根据 lastTypeParams, 获取对应的高级筛选 name
export
const
FILTER_NAMES
=
{
[
QUERY_PATH
]:
QUERY_SEARCH_NAME
,
[
TO_BE_ADD_QUERY_PATH
]:
TO_BE_ADD_QUERY_SEARCH_NAME
,
[
PENDING_FIRST
]:
PENDING_FIRST_AND_SECOND_NOTICE
,
[
PENDING_SECOND
]:
PENDING_FIRST_AND_SECOND_NOTICE
,
[
PENDING_SUBMIT
]:
PENDING_TO_SUBMIT
,
[
PENDING_RECEIVE
]:
PENDING_RECEIVE_SCHEMA
,
"/pendingAddProcessing"
:
PENDING_ADD_PROCESS
,
}
export
const
DETAIL_PATH
=
{
[
QUERY_PATH
]:
ASSIGN_QUERY_DETAIL
,
[
TO_BE_ADD_QUERY_PATH
]:
ASSIGN_TO_BE_ADD_QUERY_DETAIL
,
[
PENDING_FIRST
]:
CONFIRM_PENDING_FIRST_DETAIL
,
[
PENDING_SECOND
]:
ASSIGN_PENDING_SECOND_DETAIL
,
[
PENDING_SUBMIT
]:
ASSIGN_PENDING_SUBMIT
,
[
PENDING_RECEIVE
]:
ASSIGN_PENDING_RECEIVE_DETAIL
,
}
export
const
INNER_STATUS_BADGE_COLOR
=
{
"1"
:
"default"
,
"2"
:
"warning"
,
...
...
@@ -156,7 +176,7 @@ export const INNER_STATUS_BADGE_COLOR = {
/**
* 指派生产通知单-> 列表页 -> 内部状态: 只有四种装填:待审核, 待提交审核通知单- 审核不通过, 审核通过
*/
// supplierInnerStatus
// supplierInnerStatus
,
export
const
SUPPLIER_INNER_STATUS_COLOR
=
{
"1"
:
"default"
,
"2"
:
"warning"
,
...
...
@@ -166,22 +186,52 @@ export const SUPPLIER_INNER_STATUS_COLOR = {
}
// 根据 lastTypeParams, 获取对应的高级筛选 name
export
const
FILTER_NAMES
=
{
[
QUERY_PATH
]:
QUERY_SEARCH_NAME
,
[
TO_BE_ADD_QUERY_PATH
]:
TO_BE_ADD_QUERY_SEARCH_NAME
,
[
PENDING_FIRST
]:
PENDING_FIRST_AND_SECOND_NOTICE
,
[
PENDING_SECOND
]:
PENDING_FIRST_AND_SECOND_NOTICE
,
[
PENDING_SUBMIT
]:
PENDING_TO_SUBMIT
,
[
PENDING_RECEIVE
]:
PENDING_RECEIVE_SCHEMA
,
"/pendingAddProcessing"
:
PENDING_ADD_PROCESS
,
}
/**
* 指派生产通知单 -> 详情页 -> 内部状态-》 颜色
*/
export
const
DETAIL_PATH
=
{
[
QUERY_PATH
]:
ASSIGN_QUERY_DETAIL
,
[
TO_BE_ADD_QUERY_PATH
]:
ASSIGN_TO_BE_ADD_QUERY_DETAIL
,
[
PENDING_FIRST
]:
CONFIRM_PENDING_FIRST_DETAIL
,
[
PENDING_SECOND
]:
ASSIGN_PENDING_SECOND_DETAIL
,
[
PENDING_SUBMIT
]:
ASSIGN_PENDING_SUBMIT
,
[
PENDING_RECEIVE
]:
ASSIGN_PENDING_RECEIVE_DETAIL
,
}
\ No newline at end of file
export
const
SUPPLIER_DETAIL_INNER_STATUS_COLOR
=
[
""
,
"#d9d9d9"
,
// 待提交审核
"yellow"
,
// 待审核
"red"
,
// 审核不通过
"green"
,
// 审核通过
"lime"
,
// 提交完成
"blue"
,
// 待新增入库单
"orange"
,
// 待审核加工入库单
"yellow"
,
// 待确认收货
"cyan"
,
// 已确认收货
"green"
,
// 完成
];
/**
* 确认生产通知单 -> 详情页 -> 内部状态 -> 颜色
*/
export
const
CONFIRM_DETAIL_INNER_STATUS_COLOR
=
[
"red"
,
// 不接受申请
"#d9d9d9"
,
// 待提交申请,
"yellow"
,
// 待审核
"red"
,
// 审核不通过
"green"
,
// 审核通过
"blue"
,
// 待新增加工发货单
"orange"
,
// 待审核加工发货单
"cyan"
,
// 待新增物流单
"geekblue"
,
// 待确认物流单
"gold"
,
// 待确认发货,
"green"
,
// 已确认发货
"orange"
,
//待确认回单
"green"
,
// 完成
]
/**
* 指派生产通知单 -> 列表页 -> 外部状态
*/
export
const
SUPPLIER_OUTER_STATUS_COLOR
=
[
"default"
,
"default"
,
"primary"
,
"warning"
,
"danger"
,
"success"
]
\ No newline at end of file
src/pages/handling/components/ProcessDetail/content.tsx
View file @
1bbee90d
...
...
@@ -135,6 +135,11 @@ const Content = (props) => {
<
div
className=
{
styles
.
header
}
>
{
"附件"
}
</
div
>
<
div
className=
{
styles
.
info
}
>
{
files
.
length
===
0
&&
props
.
type
!=
'edit'
?
<
p
>
无
</
p
>
:
null
}
{
files
.
map
((
item
,
key
)
=>
{
return
(
<
FileList
name=
{
item
.
name
}
url=
{
item
.
url
}
key=
{
key
}
/>
...
...
src/pages/handling/components/ProcessProducts/index.tsx
View file @
1bbee90d
...
...
@@ -8,10 +8,18 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import
{
schema
}
from
'./schema'
;
import
{
getAuth
}
from
'@/utils/auth'
;
const
{
onFieldInit$
}
=
FormEffectHooks
const
actions
=
createAsyncFormActions
();
const
ENTERPRISE_MALL
=
[
1
,
2
];
// 用户当前的会员类型:1-企业会员,2-企业个人会员,3-渠道企业会员,4-渠道个人会员
const
ENTERPRISE_MALL
=
{
"1"
:
1
,
"2"
:
1
,
"3"
:
3
,
'4'
:
4
};
// 根据当前用户角色查询商城
const
MALL_NAME
=
{
"1"
:
"企业商城"
,
"2"
:
"企业商城"
,
"3"
:
"渠道商城"
,
"4"
:
"渠道自有商城"
}
const
ProcessProducts
=
({
visible
,
cancel
,
...
restProps
})
=>
{
const
[
selectRow
,
setSelectRow
]
=
useRowSelectionTable
({
customKey
:
'id'
});
const
authInfo
=
getAuth
();
...
...
@@ -19,8 +27,9 @@ const ProcessProducts = ({visible, cancel, ...restProps}) => {
console
.
log
(
params
);
// /product/commodity/common/getCommodityListByBuyer
const
postData
=
{
shopType
:
ENTERPRISE_MALL
.
includes
(
authInfo
.
memberType
)
?
1
:
3
,
shopType
:
ENTERPRISE_MALL
[
authInfo
.
memberType
]
,
environment
:
1
,
memberId
:
authInfo
.
memberId
,
...
params
,
}
console
.
log
(
postData
);
...
...
@@ -35,7 +44,7 @@ const ProcessProducts = ({visible, cancel, ...restProps}) => {
title
:
'上架商城'
,
dataIndex
:
'shop'
,
render
:
(
text
,
record
)
=>
{
return
ENTERPRISE_MALL
.
includes
(
authInfo
.
memberType
)
?
'企业商城'
:
'渠道商城'
return
MALL_NAME
[
authInfo
.
memberType
]
}
},
{
title
:
'品类'
,
dataIndex
:
'customerCategoryName'
},
...
...
src/pages/handling/components/Query/index.tsx
View file @
1bbee90d
...
...
@@ -30,7 +30,8 @@ import {
TITLE_MAPS
,
SUPPLIER_INNER_STATUS_COLOR
,
FILTER_NAMES
,
DETAIL_PATH
DETAIL_PATH
,
SUPPLIER_OUTER_STATUS_COLOR
}
from
'../../common'
;
import
{
timeRange
}
from
'@/utils'
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
...
...
@@ -114,8 +115,8 @@ const Query: React.FC<{}> = (props) => {
{
title
:
'外部状态'
,
dataIndex
:
'outerStatusName'
,
render
:
(
text
)
=>
{
return
<
StatusTag
title=
{
text
}
type=
"success"
></
StatusTag
>
render
:
(
text
,
record
:
any
)
=>
{
return
<
StatusTag
title=
{
text
}
type=
{
SUPPLIER_OUTER_STATUS_COLOR
[
record
.
outerStatus
]
}
></
StatusTag
>
}
},
{
...
...
src/pages/handling/components/SelectGoods/index.tsx
deleted
100644 → 0
View file @
851afab3
import
React
,
{
useState
}
from
'react'
;
import
{
Modal
}
from
'antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
BasicForm
,
TablePagination
,
SearchForm
}
from
'../ModalForTable'
import
{
createFormActions
}
from
'@formily/antd'
;
import
processProductSchema
from
'../../schema/processProductSchema'
;
const
actions
=
createFormActions
();
const
columns
=
[
{
title
:
'货号'
,
dataIndex
:
'id'
},
{
title
:
'货品名称'
,
dataIndex
:
'name'
},
{
title
:
'规格/型号'
,
dataIndex
:
'size'
},
{
title
:
'品类'
,
dataIndex
:
'category'
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
}
]
const
tableSchema
=
{
table
:
{
type
:
"object"
,
name
:
"table"
,
"x-component"
:
"Table"
,
"x-component-props"
:
{
"columns"
:
columns
,
"rowKey"
:
"id"
,
"pagination"
:
false
,
"rowSelection"
:
"{{rowSelection}}"
}
},
}
const
schema
=
processProductSchema
(
tableSchema
);
const
ProcessProducts
=
({
visible
,
cancel
,
...
restProps
})
=>
{
const
[
selectRow
,
setSelectRow
]
=
useState
({});
const
fetchData
=
async
(
params
:
any
)
=>
{
let
res
=
await
PublicApi
.
getMemberAbilityInfoPage
(
params
);
return
res
.
data
;
};
const
rowSelection
=
{
onSelect
:
(
record
,
selectRow
,
selected
)
=>
{
setSelectRow
(
record
);
}
}
return
(
<
Modal
title=
"选择货品"
width=
{
704
}
visible=
{
visible
}
onCancel=
{
cancel
}
>
<
SearchForm
schema=
{
schema
}
actions=
{
actions
}
expressionScope=
{
{
rowSelection
:
rowSelection
}
}
></
SearchForm
>
</
Modal
>
)
}
export
default
ProcessProducts
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment