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
XieZhiXiong
jinfa-platform
Commits
a39cf9fd
Commit
a39cf9fd
authored
Aug 05, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理SRM订单收发货
parent
da0f5612
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
378 additions
and
21 deletions
+378
-21
index.ts
src/pages/procurement/callForBids/addNewBid/schema/index.ts
+7
-7
useOrderDetail.tsx
...ages/transaction/_public/order/effects/useOrderDetail.tsx
+1
-0
index.tsx
src/pages/transaction/components/orderDeleveRecord/index.tsx
+179
-5
index.tsx
src/pages/transaction/components/orderHandDeleved/index.tsx
+8
-2
index.tsx
src/pages/transaction/components/orderSaleRecord/index.tsx
+180
-5
index.tsx
...r/orderCollectSrm/components/materialModalTable/index.tsx
+2
-1
index.tsx
...nsaction/purchaseOrder/readyReceiveOrder/detail/index.tsx
+1
-1
No files found.
src/pages/procurement/callForBids/addNewBid/schema/index.ts
View file @
a39cf9fd
...
...
@@ -600,13 +600,13 @@ const evaluationNeedInfo: ISchema = {
},
title
:
'{{help("是否在线评标", "在线进行评标打分")}}'
,
default
:
true
,
"x-linkages"
:
[
{
type
:
'value:visible'
,
target
:
'templateId'
,
condition
:
"{{!!$value}}"
}
]
//
"x-linkages": [
//
{
//
type: 'value:visible',
//
target: 'templateId',
//
condition: "{{!!$value}}"
//
}
//
]
},
templateId
:
{
type
:
'number'
,
...
...
src/pages/transaction/_public/order/effects/useOrderDetail.tsx
View file @
a39cf9fd
...
...
@@ -53,6 +53,7 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
// 根据type类型 调用不同的详情接口
const
getDetailsApi
=
(
type
)
=>
{
let
api
=
null
;
console
.
log
(
type
,
'type'
)
switch
(
type
)
{
case
'purchaseOrder'
:
api
=
PublicApi
.
getOrderBuyerDetail
;
break
;
...
...
src/pages/transaction/components/orderDeleveRecord/index.tsx
View file @
a39cf9fd
...
...
@@ -5,7 +5,7 @@ import { formatTimeString } from '@/utils'
import
{
OrderDetailContext
}
from
'../../_public/order/context'
import
MellowCard
from
'@/components/MellowCard'
import
NestTable
from
'@/components/NestTable'
import
{
DeliverySideState
}
from
'@/constants/order'
import
{
DeliverySideState
,
OrderKindType
}
from
'@/constants/order'
import
{
PublicApi
}
from
'@/services/api'
import
{
history
}
from
'umi'
...
...
@@ -25,7 +25,8 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
const
[
disabled
,
setDisabled
]
=
useState
<
boolean
>
(
false
)
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
deliveries
,
deliveryDetails
,
orderModel
}
=
data
const
{
deliveries
,
deliveryDetails
,
orderModel
,
orderKind
}
=
data
const
contractOrder
=
(
orderKind
===
OrderKindType
.
SRM_ORDER
)
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
outOrderCols
:
any
[]
=
[
...
...
@@ -110,6 +111,103 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
},
]
const
outerMaterialCols
:
any
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
,
className
:
'commonHide'
},
{
title
:
'物料编号'
,
dataIndex
:
'productNo'
,
align
:
'center'
,
key
:
'productNo'
,
},
{
title
:
'物料名称/规格'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
{
title
:
'关联报价商品ID/名称/规格/品类/品牌'
,
dataIndex
:
'quotedSkuId'
,
align
:
'center'
,
key
:
'quotedSkuId'
,
render
:
(
t
,
r
)
=>
`
${
t
}
/
${
r
.
quotedName
||
''
}
/
${
r
.
quotedCategory
||
''
}
/
${
r
.
quotedBrand
||
''
}
`
},
{
title
:
'单价'
,
dataIndex
:
'price'
,
align
:
'center'
,
key
:
'price'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'quantity'
,
align
:
'center'
,
key
:
'quantity'
,
},
{
title
:
'含税'
,
dataIndex
:
'tax'
,
align
:
'center'
,
key
:
'tax'
,
render
:
(
text
)
=>
text
?
'是'
:
'否'
},
{
title
:
'金额'
,
dataIndex
:
'amount'
,
align
:
'center'
,
key
:
'amount'
,
},
{
title
:
'已发货'
,
dataIndex
:
'delivered'
,
align
:
'center'
,
key
:
'delivered'
,
},
{
title
:
'未发货'
,
dataIndex
:
'leftCount'
,
align
:
'center'
,
key
:
'leftCount'
,
},
{
title
:
'已收货'
,
dataIndex
:
'received'
,
align
:
'center'
,
key
:
'received'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differCount'
,
align
:
'center'
,
key
:
'differCount'
,
},
]
const
sideChildrenCols
:
any
[]
=
[
{
...
...
@@ -168,6 +266,83 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
},
]
const
sideChildrenMaterialCols
:
any
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
,
className
:
'commonHide'
},
{
title
:
'物料编号'
,
dataIndex
:
'productNo'
,
align
:
'center'
,
key
:
'productNo'
,
},
{
title
:
'物料名称/规格'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
{
title
:
'关联报价商品ID/名称/规格/品类/品牌'
,
dataIndex
:
'quotedSkuId'
,
align
:
'center'
,
key
:
'quotedSkuId'
,
render
:
(
t
,
r
)
=>
`
${
t
}
/
${
r
.
quotedName
||
''
}
/
${
r
.
quotedCategory
||
''
}
/
${
r
.
quotedBrand
||
''
}
`
},
{
title
:
'单价'
,
dataIndex
:
'price'
,
align
:
'center'
,
key
:
'price'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'quantity'
,
align
:
'center'
,
key
:
'quantity'
,
},
{
title
:
'发货数量'
,
dataIndex
:
'delivered'
,
align
:
'center'
,
key
:
'delivered'
,
},
{
title
:
'收货数量'
,
dataIndex
:
'received'
,
align
:
'center'
,
key
:
'received'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differCount'
,
align
:
'center'
,
key
:
'differCount'
,
},
]
const
sideOrderCols
:
any
[]
=
[
{
title
:
'发货批次'
,
...
...
@@ -226,7 +401,6 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
!
isPreview
&&
isReturn
&&
!
dataRef
.
current
.
includes
(
record
.
id
)
&&
<
Button
type=
'link'
disabled=
{
disabled
}
onClick=
{
()
=>
handleReturn
(
record
)
}
>
确认回单
</
Button
>
}
{
/* { !isPreview && isReceived && !dataRef.current.includes(record.id) && <Button type='link' disabled={disabled} onClick={() => handleConfirm(record)}>确认收货</Button> } */
}
{
!
isPreview
&&
isReceived
&&
record
.
showReceive
&&
<
Button
type=
'link'
disabled=
{
disabled
}
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
确认收货
</
Button
>
}
</>
},
...
...
@@ -275,7 +449,7 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
{
deliveries
?.
length
>
0
&&
<
Tabs
.
TabPane
tab=
'订单收发货统计'
key=
"1"
>
<
Table
columns=
{
outOrderCols
}
columns=
{
contractOrder
?
outerMaterialCols
:
outOrderCols
}
dataSource=
{
deliveries
}
pagination=
{
false
}
rowKey=
"skuId"
...
...
@@ -285,7 +459,7 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
{
deliveryDetails
?.
length
>
0
&&
<
Tabs
.
TabPane
tab=
'订单收发货明细'
key=
"2"
>
<
NestTable
NestColumns=
{
[
sideOrderCols
,
sideChildrenCols
]
}
NestColumns=
{
[
sideOrderCols
,
contractOrder
?
sideChildrenMaterialCols
:
sideChildrenCols
]
}
rowKey=
'batchNo'
childrenDataKey=
'products'
dataSource=
{
deliveryDetails
}
...
...
src/pages/transaction/components/orderHandDeleved/index.tsx
View file @
a39cf9fd
...
...
@@ -38,8 +38,14 @@ const OrderHandDeleveModal:React.FC<OrderHandDeleveModalProps> = (props) => {
useEffect
(()
=>
{
if
(
visible
)
{
const
{
deliveries
}
=
data
schemaActions
.
setFieldValue
(
'products'
,
deliveries
.
map
(
item
=>
({
...
item
,
deliveryCount
:
item
[
'leftCount'
]
})))
const
{
orderId
}
=
data
PublicApi
.
getOrderVendorValidateDeliveryProduct
({
orderId
,
deliveryNo
:
null
}).
then
(
res
=>
{
const
{
code
,
data
}:
any
=
res
if
(
code
===
1000
)
{
schemaActions
.
setFieldValue
(
'products'
,
data
.
map
(
item
=>
({
...
item
,
deliveryCount
:
item
[
'leftCount'
]
})))
}
})
// schemaActions.setFieldValue('products', deliveries.map(item => ({ ...item, deliveryCount: item['leftCount'] })))
}
},
[
visible
])
...
...
src/pages/transaction/components/orderSaleRecord/index.tsx
View file @
a39cf9fd
...
...
@@ -5,7 +5,7 @@ import { formatTimeString } from '@/utils'
import
{
OrderDetailContext
}
from
'../../_public/order/context'
import
MellowCard
from
'@/components/MellowCard'
import
NestTable
from
'@/components/NestTable'
import
{
DeliverySideStat
e
}
from
'@/constants/order'
import
{
OrderKindTyp
e
}
from
'@/constants/order'
import
{
PublicApi
}
from
'@/services/api'
import
{
history
}
from
'umi'
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
...
...
@@ -29,8 +29,10 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
// 用于储存已经修改过的订单id
const
dataRef
=
useRef
<
any
>
([])
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
deliveries
,
deliveryDetails
,
orderModel
,
externalState
}
=
data
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
{
deliveries
,
deliveryDetails
,
orderModel
,
externalState
,
orderKind
}
=
data
const
contractOrder
=
(
orderKind
===
OrderKindType
.
SRM_ORDER
)
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// @todo 积分或渠道积分下单模式
const
outOrderCols
:
any
[]
=
[
{
...
...
@@ -114,6 +116,102 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
},
]
const
outerMaterialCols
:
any
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
,
className
:
'commonHide'
},
{
title
:
'物料编号'
,
dataIndex
:
'productNo'
,
align
:
'center'
,
key
:
'productNo'
,
},
{
title
:
'物料名称/规格'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
{
title
:
'关联报价商品ID/名称/规格/品类/品牌'
,
dataIndex
:
'quotedSkuId'
,
align
:
'center'
,
key
:
'quotedSkuId'
,
render
:
(
t
,
r
)
=>
`
${
t
}
/
${
r
.
quotedName
||
''
}
/
${
r
.
quotedCategory
||
''
}
/
${
r
.
quotedBrand
||
''
}
`
},
{
title
:
'单价'
,
dataIndex
:
'price'
,
align
:
'center'
,
key
:
'price'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'quantity'
,
align
:
'center'
,
key
:
'quantity'
,
},
{
title
:
'含税'
,
dataIndex
:
'tax'
,
align
:
'center'
,
key
:
'tax'
,
render
:
(
text
)
=>
text
?
'是'
:
'否'
},
{
title
:
'金额'
,
dataIndex
:
'amount'
,
align
:
'center'
,
key
:
'amount'
,
},
{
title
:
'已发货'
,
dataIndex
:
'delivered'
,
align
:
'center'
,
key
:
'delivered'
,
},
{
title
:
'未发货'
,
dataIndex
:
'leftCount'
,
align
:
'center'
,
key
:
'leftCount'
,
},
{
title
:
'已收货'
,
dataIndex
:
'received'
,
align
:
'center'
,
key
:
'received'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differCount'
,
align
:
'center'
,
key
:
'differCount'
,
},
]
const
sideChildrenCols
:
any
[]
=
[
{
...
...
@@ -172,6 +270,83 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
},
]
const
sideChildrenMaterialCols
:
any
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
,
className
:
'commonHide'
},
{
title
:
'物料编号'
,
dataIndex
:
'productNo'
,
align
:
'center'
,
key
:
'productNo'
,
},
{
title
:
'物料名称/规格'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
{
title
:
'关联报价商品ID/名称/规格/品类/品牌'
,
dataIndex
:
'quotedSkuId'
,
align
:
'center'
,
key
:
'quotedSkuId'
,
render
:
(
t
,
r
)
=>
`
${
t
}
/
${
r
.
quotedName
||
''
}
/
${
r
.
quotedCategory
||
''
}
/
${
r
.
quotedBrand
||
''
}
`
},
{
title
:
'单价'
,
dataIndex
:
'price'
,
align
:
'center'
,
key
:
'price'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'quantity'
,
align
:
'center'
,
key
:
'quantity'
,
},
{
title
:
'发货数量'
,
dataIndex
:
'delivered'
,
align
:
'center'
,
key
:
'delivered'
,
},
{
title
:
'收货数量'
,
dataIndex
:
'received'
,
align
:
'center'
,
key
:
'received'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differCount'
,
align
:
'center'
,
key
:
'differCount'
,
},
]
const
sideOrderCols
:
any
[]
=
[
{
title
:
'发货批次'
,
...
...
@@ -340,7 +515,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
{
deliveries
?.
length
>
0
&&
<
Tabs
.
TabPane
tab=
'订单收发货统计'
key=
"1"
>
<
Table
columns=
{
outOrderCols
}
columns=
{
contractOrder
?
outerMaterialCols
:
outOrderCols
}
dataSource=
{
deliveries
}
pagination=
{
false
}
rowKey=
"skuId"
...
...
@@ -350,7 +525,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
{
deliveryDetails
?.
length
>
0
&&
<
Tabs
.
TabPane
tab=
'订单收发货明细'
key=
"2"
>
<
NestTable
NestColumns=
{
[
sideOrderCols
,
sideChildrenCols
]
}
NestColumns=
{
[
sideOrderCols
,
contractOrder
?
sideChildrenMaterialCols
:
sideChildrenCols
]
}
rowKey=
'batchNo'
childrenDataKey=
'products'
dataSource=
{
deliveryDetails
}
...
...
src/pages/transaction/purchaseOrder/orderCollectSrm/components/materialModalTable/index.tsx
View file @
a39cf9fd
...
...
@@ -143,7 +143,8 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
}
const
fetchMaterialList
=
(
values
)
=>
{
const
contractId
=
schemaAction
.
getFieldValue
(
'contract'
)[
'contractId'
]
const
contract
=
schemaAction
.
getFieldValue
(
'contract'
)
const
contractId
=
contract
[
'id'
]
||
contract
[
'contractId'
]
const
params
=
{
...
values
,
contractId
,
...
...
src/pages/transaction/purchaseOrder/readyReceiveOrder/detail/index.tsx
View file @
a39cf9fd
...
...
@@ -42,7 +42,7 @@ const ReadyReceiveOrderDetail: React.FC = () => {
<
div
>
<
OrderDetailContext
.
Provider
value=
{
formContext
}
>
<
OrderDetailHeader
detailList=
{
detailList
}
detailData=
{
formContext
.
data
}
extraRight=
{
formContext
.
data
?
.
receiveDone
&&
<
Button
type=
'primary'
onClick=
{
handleClick
}
>
formContext
.
data
&&
!
formContext
.
data
.
receiveDone
&&
<
Button
type=
'primary'
onClick=
{
handleClick
}
>
{
isHeadReceipt
?
'手工收货'
:
'去确认收货'
}
</
Button
>
}
/>
...
...
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