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
75b1f865
Commit
75b1f865
authored
Sep 06, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
parent
fda327e4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
19 deletions
+29
-19
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+1
-1
index.tsx
...er/orderCollectB2b/components/inquiryModalTable/index.tsx
+2
-0
index.tsx
...nsaction/purchaseOrder/orderCollectB2b/constant/index.tsx
+3
-0
index.ts
...ransaction/purchaseOrder/orderCollectB2b/effects/index.ts
+1
-0
index.tsx
...pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
+17
-14
usePaymentInfo.tsx
...on/purchaseOrder/orderCollectB2b/model/usePaymentInfo.tsx
+4
-3
index.tsx
...pages/transaction/purchaseOrder/orderCollectSrm/index.tsx
+1
-1
No files found.
src/pages/commodity/products/addProducts.tsx
View file @
75b1f865
...
...
@@ -303,7 +303,7 @@ const AddProducts: React.FC<{}> = (props) => {
throw
new
Error
(
'请完善商品其他信息!'
)
}
}
catch
(
e
)
{
return
e
return
{
message
:
'请完善商品其他信息!'
}
}
// 校验价格
try
{
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/components/inquiryModalTable/index.tsx
View file @
75b1f865
...
...
@@ -50,6 +50,8 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => {
let
newData
=
data
.
map
((
v
:
any
)
=>
{
v
.
memberId
=
item
.
offerMemberId
v
.
memberRoleId
=
item
.
offerMemberRoleId
v
.
orderMode
=
schemaAction
.
getFieldValue
(
'orderMode'
)
v
.
shopId
=
schemaAction
.
getFieldValue
(
'shopId'
)
return
v
})
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/constant/index.tsx
View file @
75b1f865
...
...
@@ -70,6 +70,9 @@ export const procurementRenderField = (data) => {
memberRoleId
:
data
.
vendorRoleId
,
// 冗余运费
freight
:
data
.
product
.
freight
,
// 冗余shopId orderMode查询支付方式使用
shopId
:
data
.
shopId
,
orderMode
:
data
.
orderMode
,
}
})
}
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/effects/index.ts
View file @
75b1f865
...
...
@@ -95,6 +95,7 @@ export const useProductTableChangeForPay = (ctx: ISchemaFormActions | ISchemaFor
}
else
{
ctx
.
setFieldState
(
'deliveryAddresId'
,
state
=>
state
.
visible
=
true
)
}
console
.
log
(
'2'
)
fetchOrderApi
.
getPayInfoList
({
products
:
products
,
memberId
:
productItem
?.
memberId
,
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
View file @
75b1f865
...
...
@@ -83,18 +83,10 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
if
(
logsiticsDataMaps
.
length
>
0
)
{
PublicApi
.
postLogisticsFreightTemplateCalFreightPrice
({
orderProductList
:
pageStatus
===
PageStatus
.
ADD
?
logsiticsDataMaps
.
map
(
v
=>
({
templateId
:
v
.
logistics
.
templateId
,
weight
:
v
.
logistics
.
weight
,
orderProductList
:
logsiticsDataMaps
.
map
(
v
=>
({
templateId
:
v
.
logistics
.
templateId
||
v
.
logisticsTemplateId
,
weight
:
v
.
logistics
.
weight
||
v
.
weight
,
count
:
v
?.
purchaseCount
||
0
}))
:
logsiticsDataMaps
.
map
(
v
=>
({
templateId
:
v
.
logisticTemplateId
,
weight
:
v
.
weight
,
count
:
v
.
purchaseCount
})),
receiverAddressId
:
typeof
receiverAddressId
===
'object'
?
receiverAddressId
.
id
:
receiverAddressId
},
{
ttl
:
10
*
1000
,
useCache
:
true
,
ctlType
:
'none'
}).
then
(
res
=>
{
...
...
@@ -147,8 +139,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
const
[
products
,
setProducts
]
=
useState
<
any
>
([])
const
[
paymentColumns
,
paymentComponents
,
paymentSave
]
=
usePaymentInfo
(
addSchemaAction
,
addSchemaAction
.
getFieldValue
(
'vendorMemberId'
),
addSchemaAction
.
getFieldValue
(
'vendorRoleId'
),
pageStatus
===
PageStatus
.
ADD
?
addSchemaAction
.
getFieldValue
(
'products'
)
:
products
)
// 订单商品
...
...
@@ -332,7 +322,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
memberRef
.
current
.
setVisible
(
true
)
}
const
orderNoPrice
=
pageStatus
!==
PageStatus
.
PREVIEW
&&
<
div
className=
'connectBtn'
onClick=
{
handleOrderNo
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
const
orderNoPrice
=
pageStatus
===
PageStatus
.
ADD
&&
<
div
className=
'connectBtn'
onClick=
{
handleOrderNo
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
const
orderMember
=
pageStatus
!==
PageStatus
.
PREVIEW
&&
<
div
className=
'connectBtn'
onClick=
{
handleOrderMember
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
// @todo 未实现金额合计
...
...
@@ -431,6 +421,11 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
state
.
editable
=
false
})
}
if
(
id
)
{
ctx
.
setFieldState
(
'shopId'
,
state
=>
{
state
.
editable
=
false
})
}
})
$
(
'onFieldInputChange'
,
'orderMode'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
...
...
@@ -486,6 +481,14 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
}
})
// 新增下 切换商城 清空受影响的字段
$
(
'onFieldValueChange'
,
'shopId'
).
subscribe
(
state
=>
{
pageStatus
===
PageStatus
.
ADD
&&
ctx
.
reset
({
validate
:
false
,
selector
:
'*(quoteNo,quoteId,vendorMemberName,vendorMemberId,vendorRoleId,products,payments)'
})
})
}
}
expressionScope=
{
{
orderNoPrice
,
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/model/usePaymentInfo.tsx
View file @
75b1f865
...
...
@@ -4,7 +4,7 @@ import { ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd'
import
{
useEffect
,
useState
,
useRef
}
from
'react'
import
{
PublicApi
}
from
'@/services/api'
export
const
usePaymentInfo
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
memberId
:
any
,
memberRoleId
:
any
,
products
:
any
=
[]):
any
=>
{
export
const
usePaymentInfo
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
products
:
any
=
[]):
any
=>
{
const
paywayData
=
useRef
<
any
>
({})
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
paymentInformationColumns
)
const
markRef
=
useRef
<
boolean
>
(
true
)
...
...
@@ -40,11 +40,12 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
}
const
getPayLists
=
(
memberId
,
memberRoleId
)
=>
{
console
.
log
(
'1'
)
PublicApi
.
postOrderBuyerCreateB2bPaymentFind
({
memberId
,
roleId
:
memberRoleId
,
shopId
:
ctx
.
getFieldValue
(
'shopId'
)
,
orderMode
:
ctx
.
getFieldValue
(
'orderMode'
)
,
shopId
:
products
[
0
][
'shopId'
]
,
orderMode
:
products
[
0
][
'orderMode'
]
,
products
:
products
.
map
(
item
=>
({
productId
:
item
.
commodityId
,
skuId
:
item
.
productId
}))
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
...
...
src/pages/transaction/purchaseOrder/orderCollectSrm/index.tsx
View file @
75b1f865
...
...
@@ -253,7 +253,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
contractOrderRef
.
current
.
setVisible
(
true
)
}
const
orderContract
=
pageStatus
!==
PageStatus
.
PREVIEW
&&
<
div
className=
'connectBtn'
onClick=
{
handleOrderContract
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
const
orderContract
=
pageStatus
===
PageStatus
.
ADD
&&
<
div
className=
'connectBtn'
onClick=
{
handleOrderContract
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
// 新增收货地址
const
addNewAddress
=
<
Button
block
icon=
{
<
PlusOutlined
/>
}
>
新增收货地址
</
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