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
shenshaokai
jinfa-platform
Commits
403db5c7
Commit
403db5c7
authored
Nov 23, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接加工详情
parent
a00f45dd
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
210 additions
and
752 deletions
+210
-752
handlingRoute.ts
config/routes/handlingRoute.ts
+45
-8
index.ts
src/constants/index.ts
+2
-1
menu.ts
src/locales/zh-CN/menu.ts
+4
-0
index.tsx
src/pages/handling/assign/add/index.tsx
+2
-0
index.tsx
src/pages/handling/assign/detail/index.tsx
+80
-11
createProcessStock.tsx
...pages/handling/assign/processStock/createProcessStock.tsx
+0
-115
index.tsx
src/pages/handling/assign/processStock/index.tsx
+24
-7
schema.tsx
src/pages/handling/assign/processStock/schema.tsx
+2
-2
index.tsx
src/pages/handling/components/DeliveryInformation/index.tsx
+42
-12
index.tsx
src/pages/handling/components/Query/index.tsx
+8
-1
assignAll.tsx
src/pages/handling/schema/assignAll.tsx
+0
-89
createProcessStockSchema.tsx
src/pages/handling/schema/createProcessStockSchema.tsx
+0
-169
examineFirstSchema.tsx
src/pages/handling/schema/examineFirstSchema.tsx
+0
-101
processProductSchema.tsx
src/pages/handling/schema/processProductSchema.tsx
+0
-134
tobeAddSchema.tsx
src/pages/handling/schema/tobeAddSchema.tsx
+0
-101
index.tsx
src/pages/home/components/UserCenter/index.tsx
+1
-1
No files found.
config/routes/handlingRoute.ts
View file @
403db5c7
...
...
@@ -121,13 +121,13 @@ const HandlingRoute = {
hideInMenu
:
true
,
},
// 指派生产通知单 -> 新建加工入库单
{
path
:
'/memberCenter/handling/assign/createProcessStock'
,
name
:
'createProcessStock'
,
icon
:
'smile'
,
component
:
'@/pages/handling/assign/processStock/createProcessStock'
,
hideInMenu
:
true
,
}
//
{
//
path: '/memberCenter/handling/assign/createProcessStock',
//
name: 'createProcessStock',
//
icon: 'smile',
//
component: '@/pages/handling/assign/processStock/createProcessStock',
//
hideInMenu: true,
//
}
]
},
// 确认生产通知单
...
...
@@ -142,6 +142,13 @@ const HandlingRoute = {
icon
:
'smile'
,
component
:
'@/pages/handling/confirm/Query'
,
},
{
path
:
'/memberCenter/handling/confirm/query/detail'
,
name
:
'confirmProductionQuery'
,
icon
:
'smile'
,
component
:
'@/pages/handling/assign/detail'
,
hideInMenu
:
true
},
// 确认生产通知单 -> 待提交生产通知单
{
path
:
'/memberCenter/handling/confirm/pendingSubmit'
,
...
...
@@ -149,6 +156,14 @@ const HandlingRoute = {
icon
:
'smile'
,
component
:
'@/pages/handling/confirm/Query'
},
// // 确认生产通知单 -> 待提交生产通知单详情
{
path
:
'/memberCenter/handling/confirm/pendingSubmit/detail'
,
name
:
'confirmProductionQueryDetail'
,
icon
:
'smile'
,
component
:
'@/pages/handling/assign/detail'
,
hideInMenu
:
true
},
// 确认生产通知单 -> 待审核通知单(一级)
{
path
:
'/memberCenter/handling/confirm/pendingFirst'
,
...
...
@@ -156,6 +171,13 @@ const HandlingRoute = {
icon
:
'smile'
,
component
:
'@/pages/handling/confirm/Query'
},
{
path
:
'/memberCenter/handling/confirm/pendingFirst/detail'
,
name
:
'pendingFirstDetail'
,
icon
:
'smile'
,
component
:
'@/pages/handling/assign/detail'
,
hideInMenu
:
true
},
// 确认生产通知单 -> 待审核通知单(二级)
{
path
:
'/memberCenter/handling/confirm/pendingSecond'
,
...
...
@@ -163,6 +185,13 @@ const HandlingRoute = {
icon
:
'smile'
,
component
:
'@/pages/handling/confirm/Query'
},
{
path
:
'/memberCenter/handling/confirm/pendingSecond/detail'
,
name
:
'pendingSecondDetail'
,
icon
:
'smile'
,
component
:
'@/pages/handling/assign/detail'
,
hideInMenu
:
true
},
// 确认生产通知单 -> 待确认生产通知单
{
path
:
'/memberCenter/handling/confirm/pendingConfirm'
,
...
...
@@ -170,12 +199,20 @@ const HandlingRoute = {
icon
:
'smile'
,
component
:
'@/pages/handling/confirm/Query'
,
},
// // 确认生产通知单 -> 待确认生产通知单详情
{
path
:
'/memberCenter/handling/confirm/pendingConfirm/detail'
,
name
:
'pendingConfirmDetail'
,
icon
:
'smile'
,
component
:
'@/pages/handling/assign/detail'
,
hideInMenu
:
true
},
// 确认生产通知单 -> 待新增加工发货单
{
path
:
'/memberCenter/handling/confirm/processingInvoiceTobeAdd'
,
name
:
'processingInvoiceTobeAdd'
,
icon
:
'smile'
,
component
:
'@/pages/handling/
confirm/Query
'
,
component
:
'@/pages/handling/
assign/processStock
'
,
},
// 确认生产通知单 -> 新建加工发货单
// {
...
...
src/constants/index.ts
View file @
403db5c7
export
const
NOT_CHANGE_VALUE
=
'hello, world'
// socket的链接地址, 默认会使用后端接口网关地址
export
const
SOCKET_URL
=
process
.
env
.
SOCKET_URL
?.
replace
(
'http'
,
'ws'
)
||
process
.
env
.
BACK_GATEWAY
?.
replace
(
'http'
,
'ws'
)
||
"ws://10.0.0.25:9400"
export
const
SOCKET_URL
=
process
.
env
.
SOCKET_URL
?.
replace
(
'http|https'
,
'ws'
)
||
process
.
env
.
BACK_GATEWAY
?.
replace
(
'http|https'
,
'ws'
)
||
"ws://10.0.0.25:9400"
console
.
log
(
SOCKET_URL
);
export
const
MALL_TYPE
=
{
1
:
'企业商城'
,
...
...
src/locales/zh-CN/menu.ts
View file @
403db5c7
...
...
@@ -473,10 +473,14 @@ export default {
'menu.handling.assign.toBeRecieveDetail'
:
'待收货生产通知单详情'
,
'menu.handling.confirm'
:
'确认生产通知单'
,
'menu.handling.confirm.confirmProductionQuery'
:
'生产通知单查询'
,
'menu.handling.confirm.confirmProductionQueryDetail'
:
'生产通知单详情'
,
'menu.handling.confirm.pendingSubmit'
:
'待提交生产通知单'
,
'menu.handling.confirm.pendingFirst'
:
'待审核生产通知单(一级)'
,
'menu.handling.confirm.pendingFirstDetail'
:
'待审核生产通知单(一级)详情'
,
'menu.handling.confirm.pendingSecond'
:
'待审核生产通知单(二级)'
,
'menu.handling.confirm.pendingSecondDetail'
:
'待审核生产通知单(二级)详情'
,
'menu.handling.confirm.pendingConfirm'
:
'待确认生产通知单'
,
'menu.handling.confirm.pendingConfirmDetail'
:
'待确认生产通知单详情'
,
'menu.handling.confirm.processingInvoiceTobeAdd'
:
'待新增加工发货单'
,
'menu.handling.confirm.pendingAddLogistics'
:
'待新增物流单'
,
'menu.handling.confirm.pendingDelivered'
:
'待发货生产通知单'
,
...
...
src/pages/handling/assign/add/index.tsx
View file @
403db5c7
...
...
@@ -325,6 +325,8 @@ const Add: React.FC<{}> = () => {
if
(
data
.
code
===
1000
)
{
history
.
push
(
'/memberCenter/handling/assign/tobeAddQuery'
)
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
})
}
...
...
src/pages/handling/assign/detail/index.tsx
View file @
403db5c7
import
React
,
{
useState
,
useEffect
}
from
'react'
;
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
,
Select
}
from
'antd'
;
import
Circulation
from
'../../components/Circulation'
;
import
WrapTable
from
'../../components/WrapTable'
;
import
OtherRequirement
from
'../../components/OtherRequirement'
;
...
...
@@ -16,6 +16,8 @@ import { columns, innerWorkFlowRecordColumn, outerWorkflowRecordsColumn, receiv
import
ExamineModal
from
'../../components/ExamineModal'
;
import
{
FormOutlined
}
from
'@ant-design/icons'
// 下面的地址需要抽离出来, 还有以下的相同的path
const
SERVICE_MAP
=
{
'/memberCenter/handling/assign/query/detail'
:
PublicApi
.
getEnhanceSupplierAllDetails
,
'/memberCenter/handling/assign/tobeAddQuery/detail'
:
PublicApi
.
getEnhanceSupplierToBeAddDetails
,
...
...
@@ -23,6 +25,11 @@ const SERVICE_MAP = {
'/memberCenter/handling/assign/pendingSecond/detail'
:
PublicApi
.
getEnhanceSupplierToBeSecondExamDetails
,
'/memberCenter/handling/assign/pendingSubmit/detail'
:
PublicApi
.
getEnhanceSupplierToBeSubmitDetails
,
'/memberCenter/handling/assign/pendingReceive/detail'
:
PublicApi
.
getEnhanceSupplierToBeReceiveDetails
,
'/memberCenter/handling/confirm/query/detail'
:
PublicApi
.
getEnhanceProcessAllDetails
,
'/memberCenter/handling/confirm/pendingSubmit/detail'
:
PublicApi
.
getEnhanceProcessToBeSubmitExamDetails
,
'/memberCenter/handling/confirm/pendingFirst/detail'
:
PublicApi
.
getEnhanceProcessToBeFirstExamDetails
,
'/memberCenter/handling/confirm/pendingSecond/detail'
:
PublicApi
.
getEnhanceProcessToBeSecondExamDetails
,
'/memberCenter/handling/confirm/pendingConfirm/detail'
:
PublicApi
.
getEnhanceProcessToBeConfirmDetails
}
/**
...
...
@@ -30,18 +37,26 @@ const SERVICE_MAP = {
*/
const
EXAM_SERVICE
=
{
'/memberCenter/handling/assign/pendingFirst/detail'
:
PublicApi
.
postEnhanceSupplierToBeFirstExamExam
,
'/memberCenter/handling/assign/pendingSecond/detail'
:
PublicApi
.
postEnhanceSupplierToBeSecondExamExam
'/memberCenter/handling/assign/pendingSecond/detail'
:
PublicApi
.
postEnhanceSupplierToBeSecondExamExam
,
'/memberCenter/handling/confirm/pendingSubmit/detail'
:
PublicApi
.
postEnhanceProcessToBeSubmitExamExam
,
'/memberCenter/handling/confirm/pendingFirst/detail'
:
PublicApi
.
postEnhanceProcessToBeFirstExamExam
,
'/memberCenter/handling/confirm/pendingSecond/detail'
:
PublicApi
.
postEnhanceProcessToBeSecondExamExam
,
'/memberCenter/handling/confirm/pendingConfirm/detail'
:
PublicApi
.
postEnhanceProcessToBeConfirmExam
}
const
{
TabPane
}
=
Tabs
;
const
Detail
:
React
.
FC
<
{}
>
=
()
=>
{
const
pathname
=
history
.
location
.
pathname
;
const
[
info
,
setInfo
]
=
useState
<
any
>
({})
const
{
id
}
=
usePageStatus
();
const
pathname
=
history
.
location
.
pathname
;
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
deliverAddressOption
,
setDeliverAddressOption
]
=
useState
([]);
const
[
activeAddress
,
setActiveAddress
]
=
useState
<
string
|
null
>
(
null
)
const
isSetDeliverAddress
=
pathname
==
'/memberCenter/handling/confirm/pendingSubmit/detail'
;
useEffect
(()
=>
{
if
(
id
)
{
SERVICE_MAP
[
pathname
]({
id
:
id
})
const
service
=
SERVICE_MAP
[
pathname
];
service
&&
service
({
id
:
id
})
.
then
(({
data
,
code
})
=>
{
if
(
code
===
1000
)
{
setInfo
(
data
);
...
...
@@ -50,6 +65,36 @@ const Detail: React.FC<{}> = () => {
}
},
[
id
]);
// 确认生产通知单 -> 待提交审核生产通知单时需要同时提交他的发货地址
useEffect
(()
=>
{
if
(
isSetDeliverAddress
)
{
PublicApi
.
getLogisticsShipperAddressPage
({
current
:
'1'
,
pageSize
:
'20'
})
.
then
(({
data
,
code
})
=>
{
if
(
code
===
1000
)
{
const
tempData
=
[];
let
defaultAddress
=
null
;
data
.
data
.
forEach
((
item
)
=>
{
if
(
item
.
isDefault
)
{
defaultAddress
=
item
.
id
.
toString
()
}
tempData
.
push
({
label
:
`
${
item
.
fullAddress
}
/
${
item
.
shipperName
}
/
${
item
.
phone
}
`
,
value
:
item
.
id
.
toString
()
})
}
);
setActiveAddress
(
defaultAddress
);
setDeliverAddressOption
(
tempData
);
}
})
}
},
[])
//确认生产通知单 -> 需要提交发货地址,那么这个时候需要监听Select的change事件
const
deliverAddressOnChange
=
useCallback
((
value
)
=>
{
setActiveAddress
(
value
)
},
[])
// 审核
const
examOnOk
=
({
text
,
status
})
=>
{
let
tempData
=
{
...
...
@@ -58,8 +103,22 @@ const Detail: React.FC<{}> = () => {
}
setLoading
(
true
)
const
postData
=
status
==
1
?
tempData
:
{...
tempData
,
cause
:
text
};
EXAM_SERVICE
[
pathname
](
postData
)
const
deliverTarget
=
deliverAddressOption
.
filter
((
item
)
=>
item
.
value
===
activeAddress
)[
0
];
const
[
fullAddress
,
shipperName
,
phone
]
=
deliverTarget
&&
deliverTarget
.
label
.
split
(
"/"
)
||
''
;
const
withDeliverAddress
=
isSetDeliverAddress
?
{
...
postData
,
deliveryMessage
:
{
deliveryAddressId
:
activeAddress
,
deliveryAddress
:
fullAddress
,
deliveryUserName
:
shipperName
,
deliveryUserTel
:
phone
,
}
}
:
postData
EXAM_SERVICE
[
pathname
](
withDeliverAddress
)
.
then
(({
code
,
data
})
=>
{
setLoading
(
false
);
if
(
code
==
1000
)
{
setLoading
(
false
)
history
.
go
(
-
1
)
...
...
@@ -77,6 +136,7 @@ const Detail: React.FC<{}> = () => {
if
(
code
===
1000
)
{
history
.
go
(
-
1
);
}
}).
finally
(()
=>
{
setLoading
(
false
)
})
}
...
...
@@ -88,13 +148,17 @@ const Detail: React.FC<{}> = () => {
<
Button
loading=
{
loading
}
type=
"primary"
>
单据审核
</
Button
>
</
ExamineModal
>
)
const
SubmitBtn
=
<
Button
icon=
{
<
FormOutlined
/>
}
onClick=
{
submit
}
type=
"primary"
>
提交通知单
</
Button
>
const
C
omponent
_MAP
=
{
const
SubmitBtn
=
<
Button
loading=
{
loading
}
icon=
{
<
FormOutlined
/>
}
onClick=
{
submit
}
type=
"primary"
>
提交通知单
</
Button
>
const
C
OMPONENT
_MAP
=
{
'/memberCenter/handling/assign/pendingSubmit/detail'
:
SubmitBtn
,
'/memberCenter/handling/assign/pendingFirst'
:
ExamineComponent
,
'/memberCenter/handling/assign/pendingSecond'
:
ExamineComponent
'/memberCenter/handling/assign/pendingFirst/detail'
:
ExamineComponent
,
'/memberCenter/handling/assign/pendingSecond/detail'
:
ExamineComponent
,
'/memberCenter/handling/confirm/pendingSubmit/detail'
:
ExamineComponent
,
'/memberCenter/handling/confirm/pendingFirst/detail'
:
ExamineComponent
,
'/memberCenter/handling/confirm/pendingSecond/detail'
:
ExamineComponent
,
'/memberCenter/handling/confirm/pendingConfirm/detail'
:
ExamineComponent
}
return
(
C
omponent
_MAP
[
pathname
]
||
null
)
return
(
C
OMPONENT
_MAP
[
pathname
]
||
null
)
}
return
(
...
...
@@ -176,7 +240,12 @@ const Detail: React.FC<{}> = () => {
deliveryAddress=
{
info
.
deliveryAddress
}
deliveryUserName=
{
info
.
deliveryUserName
}
deliveryUserTel=
{
info
.
deliveryUserTel
}
editDeliverAddress=
{
isSetDeliverAddress
}
activeAddress=
{
activeAddress
}
deliverAddressOption=
{
deliverAddressOption
}
deliverAddressOnChange=
{
deliverAddressOnChange
}
/>
</
div
>
<
div
style=
{
{
marginTop
:
'20px'
}
}
>
<
Row
justify=
"space-between"
>
...
...
src/pages/handling/assign/processStock/createProcessStock.tsx
deleted
100644 → 0
View file @
a00f45dd
import
React
,
{
useState
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
Button
,
Card
,
Select
,
DatePicker
,
Input
,
InputNumber
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
createProcessStockSchema
from
'../../schema/createProcessStockSchema'
;
import
{
LinkOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
SelectGoods
from
'../../components/SelectGoods'
import
{
WrapUploadFile
}
from
'../../components/UploadFile'
;
/*
* @Author: Bill
* @Date: 2020-10-12 11:36:38
* @Description: 新增加工入库单
*/
const
formActions
=
createFormActions
();
const
createProcessStock
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
submitLoading
,
setSubmitLoading
]
=
useState
<
boolean
>
(
false
);
// 选择货品
const
[
modalProducVisible
,
setModalProductVisible
]
=
useState
<
boolean
>
(
false
);
const
tableAddButton
=
(
<
div
>
<
Button
onClick=
{
()
=>
setModalProductVisible
(
true
)
}
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
type=
'dashed'
>
新建单据明细
</
Button
>
</
div
>
)
/**单据明细 */
const
docDetailColumn
=
()
=>
{
return
[
{
title
:
'货号'
,
dataIndex
:
'no'
},
{
title
:
'货品名称'
,
dataIndex
:
'name'
},
{
title
:
'规格/size'
,
dataIndex
:
'size'
},
{
title
:
'品类'
,
dataIndex
:
'category'
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
},
{
title
:
'单位'
,
dataIndex
:
'unit'
},
{
title
:
'成本价'
,
dataIndex
:
'cost'
},
{
title
:
'加工商品名称'
,
dataIndex
:
'productName'
,
render
:
(
text
,
record
)
=>
{
const
options
=
[{
lable
:
'test'
,
value
:
1
}]
return
<
Select
options=
{
options
}
></
Select
>
}
},
{
title
:
'商品ID'
,
dataIndex
:
'productId'
},
{
title
:
'订单号'
,
dataIndex
:
'orderId'
},
{
title
:
'单价'
,
dataIndex
:
'unitPrice'
},
{
title
:
'入库数量'
,
dataIndex
:
'total'
,
render
:
(
text
,
reocrd
)
=>
{
return
(
<
InputNumber
/>
)
}
},
{
title
:
'入库金额'
,
dataIndex
:
'price'
},
{
title
:
'操作'
,
render
:
(
text
,
record
)
=>
(<
a
>
删除
</
a
>)}
];
}
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
"新建加工入库单"
extra=
{
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
loading=
{
submitLoading
}
onClick=
{
()
=>
formActions
.
submit
()
}
>
保存
</
Button
>,
]
}
>
<
Card
>
<
NiceForm
schema=
{
createProcessStockSchema
}
actions=
{
formActions
}
components=
{
{
WrapUploadFile
,
DatePicker
,
Select
}
}
expressionScope=
{
{
tableAddButton
,
tableColumns
:
docDetailColumn
()
}
}
/>
{
/* 加工商品Modal框 */
}
<
SelectGoods
visible=
{
modalProducVisible
}
cancel=
{
()
=>
setModalProductVisible
(
false
)
}
></
SelectGoods
>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
createProcessStock
src/pages/handling/assign/processStock/index.tsx
View file @
403db5c7
...
...
@@ -12,8 +12,11 @@ import { schema } from './schema';
import
moment
from
'moment'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
timeRange
}
from
'@/utils'
;
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
columns
:
ColumnsType
=
[
{
...
...
@@ -37,7 +40,7 @@ const columns: ColumnsType = [
},
{
title
:
'发货批次'
,
dataIndex
:
'deliveryBatch'
},
{
title
:
'
发货
单号'
,
title
:
'
入库
单号'
,
dataIndex
:
'storageNo'
,
render
:
(
text
)
=>
{
return
(
...
...
@@ -50,15 +53,29 @@ const columns: ColumnsType = [
{
title
:
'操作'
,
dataIndex
:
'action'
,
render
:
(
text
,
record
)
=>
{
return
<
a
>
审核加工入库单
</
a
>
render
:
(
text
,
record
:
any
)
=>
{
// 这里暂时不知道status的状态, 先用内部状态判断, 审核的先不处理, 感觉应该用入库单号去判断吧
const
MAP
=
{
'待新增加工发货单'
:
<
Link
to
=
{
ADD_PROCESS_PATH
}
>
新增加工发货单
<
/Link>
,
'待审核加工发货单'
:
<
a
>
待审核加工发货单
<
/a>
,
'新增加工入库单'
:
<
Link
to
=
{
ADD_DELIVERY_PATH
}
>
新增加工入库单
<
/Link>
,
'审核加工入库单'
:
<
a
>
审核加工入库单
<
/a
>
}
return
MAP
[
record
.
innerStatusName
]
}
}
]
const
SERVICE_MAPS
=
{
///enhance/process/toBeAddDelivery/list
'/memberCenter/handling/assign/pendingAddProcessing'
:
PublicApi
.
getEnhanceSupplierToBeAddStorageList
,
'/memberCenter/handling/confirm/processingInvoiceTobeAdd'
:
PublicApi
.
getEnhanceProcessToBeAddDeliveryList
,
}
const
processStock
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
pathname
=
history
.
location
.
pathname
;
const
fetchData
=
useCallback
(
async
(
params
:
any
)
=>
{
const
{
docTime
,
...
rest
}
=
params
;
const
{
st
,
et
}
=
timeRange
(
docTime
);
...
...
@@ -67,9 +84,9 @@ const processStock: React.FC<{}> = () => {
endTime
:
et
,
...
rest
}
const
res
=
await
PublicApi
.
getEnhanceSupplierToBeAddStorageList
(
postData
)
const
res
=
await
SERVICE_MAPS
[
pathname
]
(
postData
)
return
res
.
data
;
},
[]);
},
[
pathname
]);
return
(
...
...
@@ -89,7 +106,7 @@ const processStock: React.FC<{}> = () => {
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
search
'
,
FORM_FILTER_PATH
);
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
noticeNo
'
,
FORM_FILTER_PATH
);
}
}
schema=
{
schema
}
/>
...
...
src/pages/handling/assign/processStock/schema.tsx
View file @
403db5c7
...
...
@@ -13,13 +13,13 @@ export const schema: ISchema = {
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
search
:
{
noticeNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-left'
,
tip
:
'输入通知单号
1
进行搜索'
,
tip
:
'输入通知单号进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
...
...
src/pages/handling/components/DeliveryInformation/index.tsx
View file @
403db5c7
import
React
from
'react'
;
import
{
Card
,
Col
,
Row
}
from
'antd'
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Card
,
Col
,
Row
,
Select
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
;
const
Option
=
Select
.
Option
;
enum
deliveryType
{
logistics
,
...
...
@@ -14,10 +17,15 @@ interface Iprops {
receiveUserTel
:
string
deliveryAddress
:
string
,
deliveryUserName
:
string
,
deliveryUserTel
:
string
deliveryUserTel
:
string
,
editDeliverAddress
:
boolean
,
deliverAddressOnChange
:
(
value
:
string
)
=>
void
,
activeAddress
:
string
,
deliverAddressOption
:
{
label
:
string
,
value
:
string
}[]
}
const
DeliveryInfomation
:
React
.
FC
<
Iprops
>
=
(
props
)
=>
{
return
(
<
Card
title=
"交付信息"
>
<
Row
>
...
...
@@ -41,16 +49,38 @@ const DeliveryInfomation: React.FC<Iprops> = (props) => {
<
Col
offset=
{
5
}
>
{
props
.
receiveAddress
}
</
Col
>
</
Row
>
</
Col
>
{
props
.
editDeliverAddress
?
<
Col
span=
{
9
}
>
<
Row
style=
{
{
marginBottom
:
'20px'
}
}
>
<
Col
span=
{
5
}
>
发货地址
</
Col
>
<
Col
span=
{
19
}
>
<
Select
style=
{
{
width
:
'100%'
}
}
value=
{
props
.
activeAddress
}
>
{
props
.
deliverAddressOption
.
map
((
item
)
=>
{
return
(
<
Option
key=
{
item
.
value
}
value=
{
item
.
value
}
>
{
item
.
label
}
</
Option
>
)
})
}
{
/* <Option value={"1"}>test</Option> */
}
</
Select
>
</
Col
>
</
Row
>
</
Col
>
:
<
Col
span=
{
9
}
style=
{
!
props
.
deliveryUserName
?
{
display
:
'none'
}
:
{}
}
>
<
Row
style=
{
{
marginBottom
:
'20px'
}
}
>
<
Col
span=
{
5
}
>
发货地址
</
Col
>
<
Col
>
{
props
.
deliveryUserTel
}
/
{
props
.
deliveryUserName
}
</
Col
>
</
Row
>
<
Row
>
<
Col
offset=
{
5
}
>
{
props
.
deliveryAddress
}
</
Col
>
</
Row
>
</
Col
>
}
<
Col
span=
{
9
}
style=
{
!
props
.
deliveryUserName
?
{
display
:
'none'
}
:
{}
}
>
<
Row
style=
{
{
marginBottom
:
'20px'
}
}
>
<
Col
span=
{
5
}
>
发货地址
</
Col
>
<
Col
>
{
props
.
deliveryUserTel
}
/
{
props
.
deliveryUserName
}
</
Col
>
</
Row
>
<
Row
>
<
Col
offset=
{
5
}
>
{
props
.
deliveryAddress
}
</
Col
>
</
Row
>
</
Col
>
</
Row
>
</
Card
>
)
...
...
src/pages/handling/components/Query/index.tsx
View file @
403db5c7
...
...
@@ -3,7 +3,7 @@
* @description 加工通用列表页列表页, 用于 ["生产通知单","待生产通知单","待审核生产通知单(一级)", ""]等
*/
import
React
,
{
useRef
}
from
'react'
;
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Space
,
Button
,
Menu
,
Dropdown
,
Badge
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
...
...
@@ -63,6 +63,7 @@ const Query: React.FC<{}> = (props) => {
const
ref
=
useRef
<
any
>
({});
const
{
lastTypeParams
}
=
usePageStatus
();
const
[
selectRow
,
selectRowFns
]
=
useRowSelectionTable
({
customKey
:
'id'
});
const
[
submitLoading
,
setSubmitLoading
]
=
useState
<
boolean
>
(
false
)
const
fetchData
=
async
(
params
:
any
)
=>
{
const
service
=
SERVICES
[
lastTypeParams
];
...
...
@@ -229,10 +230,13 @@ const Query: React.FC<{}> = (props) => {
}
let
{
params
,
service
}
=
getParamsAndService
[
lastTypeParams
]();
if
(
service
)
{
setSubmitLoading
(
true
)
service
(
params
).
then
(({
data
,
code
})
=>
{
if
(
code
===
1000
)
{
formActions
.
submit
();
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
)
})
}
}
...
...
@@ -265,10 +269,13 @@ const Query: React.FC<{}> = (props) => {
}
let
{
params
,
service
}
=
getParamsAndService
[
lastTypeParams
]();
if
(
service
)
{
setSubmitLoading
(
true
)
service
(
params
).
then
(({
data
,
code
})
=>
{
if
(
code
===
1000
)
{
formActions
.
submit
();
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
})
}
}
...
...
src/pages/handling/schema/assignAll.tsx
deleted
100644 → 0
View file @
a00f45dd
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
/*
* @Author: Bill
* @Date: 2020-10-12 10:46:36
* @LastEditTime: 2020-10-15 13:54:07
* @Description: 指派生产通知单查询页 schema
*/
const
schema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
desc
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-left'
,
tip
:
'输入通知单号、通知单摘要进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
6
,
},
properties
:
{
name
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'加工企业名称(全部)'
,
allowClear
:
true
,
},
},
time
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'单据时间(全部)'
,
allowClear
:
true
,
},
},
outerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'外部状态(全部)'
,
allowClear
:
true
,
},
},
innerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
export
default
schema
\ No newline at end of file
src/pages/handling/schema/createProcessStockSchema.tsx
deleted
100644 → 0
View file @
a00f45dd
/*
* @Author: your name
* @Date: 2020-10-15 16:30:26
* @Description: 新增加工入库单 Schema
*/
const
basicTab
=
{
'tab-1'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
'tab'
:
'基本信息'
},
properties
:
{
layout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
8
,
labelAlign
:
'left'
},
properties
:
{
type
:
{
title
:
'单据类型'
,
type
:
'string'
,
enum
:
[],
'x-rules'
:
[
{
required
:
true
,
// 自定义校验规则
message
:
'请选择单据类型'
}
],
},
warehouse
:
{
type
:
'string'
,
title
:
'对应仓库'
,
enum
:
[],
"x-rules"
:
[
{
required
:
true
,
message
:
'请选择对应仓库'
}
],
},
desc
:
{
type
:
'string'
,
title
:
'单据摘要'
,
"x-rules"
:
[
{
required
:
true
,
message
:
'请填写单据摘要'
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
60
}
]
},
time
:
{
type
:
'string'
,
title
:
'单据时间'
,
'x-component'
:
'DatePicker'
,
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择单据时间'
}
]
},
warehousePeople
:
{
type
:
'string'
,
title
:
'仓库人员'
,
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择单据时间'
}
]
},
correspondingDoc
:
{
type
:
'radio'
,
title
:
'对应单据'
,
required
:
true
,
enum
:
[
{
label
:
'生产通知单'
,
value
:
1
}
],
default
:
1
},
connectDoc
:
{
type
:
'text'
,
title
:
'关联单据'
},
memberName
:
{
type
:
'text'
,
title
:
'会员名称'
},
address
:
{
type
:
'text'
,
title
:
'收货地址'
,
},
method
:
{
type
:
'text'
,
title
:
'配送方式'
}
}
}
}
}
}
const
detailTab
=
{
'tab-2'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
'单据明细'
},
properties
:
{
layout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
24
,
labelAlign
:
'left'
},
properties
:
{
someLists
:
{
type
:
'array:number'
,
'x-mega-props'
:
{
wrapperCol
:
24
,
},
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
rowKey
:
'id'
,
prefix
:
"{{tableAddButton}}"
,
columns
:
"{{tableColumns}}"
,
}
}
}
}
}
}
}
const
createProcessStockSchema
=
{
type
:
'object'
,
properties
:
{
'Tabs'
:
{
type
:
'object'
,
'x-component'
:
'tab'
,
'x-component-props'
:
{
type
:
'card'
},
properties
:
{
...
basicTab
,
...
detailTab
,
}
}
}
}
export
default
createProcessStockSchema
\ No newline at end of file
src/pages/handling/schema/examineFirstSchema.tsx
deleted
100644 → 0
View file @
a00f45dd
/*
* @Author: Bill
* @Date: 2020-10-15 14:01:34
* @Description: 待审核生产通知单(一级)
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
const
schema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
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}}'
,
},
},
search
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
name
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'加工企业名称(全部)'
,
allowClear
:
true
,
},
},
time
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'单据时间(全部)'
,
allowClear
:
true
,
},
},
outerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'外部状态(全部)'
,
allowClear
:
true
,
},
},
innerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
export
default
schema
;
\ No newline at end of file
src/pages/handling/schema/processProductSchema.tsx
deleted
100644 → 0
View file @
a00f45dd
/*
* @Author: Bill
* @Date: 2020-10-14 18:45:31
* @LastEditTime: 2020-10-19 09:56:52
* @desc 选择加工商品schema
* 这里其实就是两个flex 布局加一个table, 通过expressScrope 注入代码
*/
const
schema
=
(
others
)
=>
{
return
{
type
:
'object'
,
properties
:
{
layout
:
{
type
:
'object'
,
'x-component'
:
'CustomFlexRowLayout'
,
'x-component-props'
:
{
justify
:
'space-between'
,
align
:
'center'
},
properties
:
{
'flex-layout'
:
{
type
:
'object'
,
name
:
'rigth-layout'
,
"x-component"
:
'CustomFlexColumnLayout'
,
properties
:
{
controllers
:
{
type
:
'object'
,
name
:
'controllers'
,
'x-component'
:
'CustomFlexRowLayout'
,
'x-component-props'
:
{
justify
:
'start'
,
},
properties
:
{
name
:
{
type
:
'string'
,
name
:
'name'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
"请填写标题名称"
,
"onSearch"
:
"{{search}}"
,
}
},
'HIGHT_FILTER_BTN'
:
{
type
:
'string'
,
name
:
'HIGHT_FILTER_BTN'
,
'x-component'
:
'button'
,
'x-component-props'
:
{
"children"
:
"{{HIGHT_FILTER_BTN}}"
,
"onClick"
:
"{{toggleFilters}}"
,
style
:
{
margin
:
'0 15px'
}
}
},
reset
:
{
type
:
'string'
,
name
:
'reset'
,
"x-component"
:
"button"
,
"x-component-props"
:
{
"onClick"
:
"{{reset}}"
,
"children"
:
"重置"
,
}
},
}
},
'FILTERS'
:
{
type
:
'object'
,
name
:
'FILTERS'
,
'x-component'
:
'CustomFlexRowLayout'
,
'x-component-props'
:
{
justify
:
'start'
},
properties
:
{
columns
:
{
name
:
'columns'
,
type
:
'string'
,
'x-component'
:
'Select'
,
'x-component-props'
:
{
placeholder
:
'请选择栏目'
,
style
:
{
width
:
'160px'
}
}
},
status
:
{
name
:
'status'
,
type
:
'string'
,
'x-component'
:
'Select'
,
'x-component-props'
:
{
options
:
[
{
label
:
'全部'
,
value
:
'0'
},
{
label
:
'待上架'
,
value
:
'1'
},
{
label
:
'已上架'
,
value
:
'2'
},
{
label
:
'已下架'
,
value
:
'3'
},
],
placeholder
:
'请选择状态'
,
style
:
{
width
:
'160px'
,
margin
:
'0 15px'
}
}
},
queryBtn
:
{
type
:
'string'
,
'x-component'
:
'Submit'
,
"x-component-props"
:
{
"children"
:
"查询"
,
}
}
}
}
}
},
pagination
:
{
type
:
'object'
,
'x-component'
:
"TablePagination"
,
'x-style'
:
{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'flex-end'
},
'x-component-props'
:
{
showQuickJumper
:
true
,
pageSize
:
10
,
simple
:
true
}
}
}
},
...
others
}
}
}
export
default
schema
src/pages/handling/schema/tobeAddSchema.tsx
deleted
100644 → 0
View file @
a00f45dd
/*
* @Author: Bill
* @Date: 2020-10-15 14:01:34
* @Description: 待新增生产通知单
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
const
schema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
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}}'
,
},
},
search
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
name
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'加工企业名称(全部)'
,
allowClear
:
true
,
},
},
time
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'单据时间(全部)'
,
allowClear
:
true
,
},
},
outerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'外部状态(全部)'
,
allowClear
:
true
,
},
},
innerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
export
default
schema
;
\ No newline at end of file
src/pages/home/components/UserCenter/index.tsx
View file @
403db5c7
...
...
@@ -45,7 +45,7 @@ const UserCenter: React.FC<Iprops> = () => {
<
div
className=
{
styles
.
content
}
>
<
Row
className=
{
styles
.
row
}
>
<
Col
span=
{
11
}
className=
{
styles
.
user
}
>
<
div
className=
{
styles
.
pic
}
style=
{
!
userAuth
?
.
logo
?
{
display
:
'none'
}
:
{}
}
>
<
div
className=
{
styles
.
pic
}
style=
{
!
userAuth
.
logo
?
{
display
:
'none'
}
:
{}
}
>
<
img
src=
{
userAuth
.
logo
}
/>
</
div
>
<
div
className=
{
styles
.
wrapper
}
>
...
...
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