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
4062eb45
Commit
4062eb45
authored
Sep 01, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
70bb79b1
fb3e7b16
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
36 deletions
+45
-36
index.tsx
src/pages/commodity/products/index.tsx
+8
-1
index.tsx
src/pages/transaction/components/addressPop/index.tsx
+2
-2
index.tsx
...er/orderCollectB2b/components/productModalTable/index.tsx
+4
-10
index.tsx
...nsaction/purchaseOrder/orderCollectB2b/constant/index.tsx
+7
-6
index.ts
...ransaction/purchaseOrder/orderCollectB2b/effects/index.ts
+6
-1
index.tsx
...pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
+18
-16
No files found.
src/pages/commodity/products/index.tsx
View file @
4062eb45
...
...
@@ -479,7 +479,14 @@ const Products: React.FC<{}> = () => {
title
:
`确定要执行批量
${
type
===
'3'
?
'上架'
:
'下架'
}
操作?`
,
icon
:
<
ExclamationCircleOutlined
/>,
onOk
()
{
clickUp
(
type
===
'3'
?
1
:
0
,
null
)
if
(
type
===
'3'
)
{
clickUp
(
1
,
null
)
}
else
{
PublicApi
.
postProductCommodityOffPublishCommodityBatch
({
idList
:
currentRef
.
current
}).
then
(
res
=>
{
ref
.
current
.
reload
()
setSelectedRowKeys
([])
})
}
},
okType
:
type
===
'3'
?
'primary'
:
'danger'
,
onCancel
()
{
...
...
src/pages/transaction/components/addressPop/index.tsx
View file @
4062eb45
...
...
@@ -10,8 +10,8 @@ export const AddressPop = (props) => {
<
Row
>
<
div
>
<
h3
><
EnvironmentOutlined
/>
自提地址
</
h3
>
<
p
>
{
pickInfo
.
receiver
}
/
{
pickInfo
.
phone
}
</
p
>
<
p
>
{
pickInfo
.
address
}
</
p
>
<
p
>
{
pickInfo
.
receiver
||
pickInfo
.
shipperName
}
/
{
pickInfo
.
phone
}
</
p
>
<
p
>
{
pickInfo
.
receiver
?
pickInfo
.
address
:
`${pickInfo.provinceName}${pickInfo.cityName}${pickInfo.districtName}${pickInfo.address}`
}
</
p
>
</
div
>
</
Row
>
}
>
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/components/productModalTable/index.tsx
View file @
4062eb45
...
...
@@ -81,25 +81,19 @@ export const filterProductDataById = (data, targetData) => {
next
.
category
=
next
.
category
||
next
.
customerCategoryName
next
.
unit
=
next
.
unit
||
next
.
unitName
next
.
productName
=
next
.
productName
||
next
.
name
next
.
deliverType
=
next
.
logistics
.
sendAddress
// 保证和详情编辑字段一致
// if (logistics.deliveryType === 2) {
// const { code, data } = await PublicApi.getLogisticsShipperAddressGet({
// id: logistics.sendAddress
// }, { ttl: 60 * 1000, useCache: true })
// logistics.render = code === 1000 ? <AddressPop pickInfo={data}>{DELIVERY_TYPE[logistics.deliveryType]}</AddressPop> : DELIVERY_TYPE[logistics.deliveryType]
// } else {
// logistics.render = DELIVERY_TYPE[logistics.deliveryType]
// }
if
(
logistics
.
deliveryType
===
2
&&
logistics
.
sendAddress
)
{
const
{
code
,
data
}
=
await
PublicApi
.
getLogisticsShipperAddressGet
({
id
:
logistics
.
sendAddress
},
{
ttl
:
60
*
1000
,
useCache
:
true
})
logistics
.
render
=
data
logistics
.
render
=
{...
data
,
deliverType
:
logistics
.
deliveryType
}
}
else
{
logistics
.
render
=
DELIVERY_TYPE
[
logistics
.
deliveryType
]
}
// 配送方式外置, 用于接口字段冗余
next
.
deliver
y
Type
=
logistics
.
deliveryType
next
.
deliverType
=
logistics
.
deliveryType
// id 存在集合中, 采用target中的数据, 否则采用data中的数据
const
findResult
=
data
.
find
(
v
=>
v
.
id
===
next
.
id
)
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/constant/index.tsx
View file @
4062eb45
...
...
@@ -351,15 +351,16 @@ export const productInfoColumns: any[] = [
// 接口调用
{
title
:
'配送方式'
,
dataIndex
:
'
logistics
'
,
dataIndex
:
'
deliverType
'
,
align
:
'center'
,
key
:
'
logistics
'
,
key
:
'
deliverType
'
,
render
:
(
t
,
r
)
=>
{
if
(
r
.
logistics
===
1
)
console
.
log
(
r
,
'rr'
)
if
(
t
===
1
)
return
"物流(默认)"
else
if
(
r
.
logistics
===
2
)
return
<
AddressPop
pickInfo=
{
t
}
>
{
DELIVERY_TYPE
[
t
]
}
</
AddressPop
>
else
if
(
r
.
logistics
===
3
)
else
if
(
t
===
2
)
return
<
AddressPop
pickInfo=
{
r
.
logistics
.
render
}
>
自提
</
AddressPop
>
else
if
(
t
===
3
)
return
"无需配送"
}
},
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/effects/index.ts
View file @
4062eb45
...
...
@@ -87,7 +87,12 @@ export const useProductTableChangeForPay = (ctx: ISchemaFormActions | ISchemaFor
const
shopId
=
ctx
.
getFieldValue
(
'shopId'
)
const
products
=
value
.
map
(
item
=>
({
productId
:
item
.
commodityId
,
skuId
:
item
.
productId
}))
if
(
shopId
&&
products
?.
length
)
{
console
.
log
(
value
)
// 判断不存在物流 隐藏交付地址
if
(
!
value
.
some
(
item
=>
item
.
logistics
.
deliveryType
===
1
))
{
ctx
.
setFieldState
(
'deliveryAddresId'
,
state
=>
state
.
visible
=
false
)
}
else
{
ctx
.
setFieldState
(
'deliveryAddresId'
,
state
=>
state
.
visible
=
true
)
}
fetchOrderApi
.
getPayInfoList
({
products
:
products
,
memberId
:
productItem
?.
memberId
,
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
View file @
4062eb45
...
...
@@ -254,22 +254,24 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
}
// 交付地址数据字段转换拼接 查询省市区冗余
const
{
data
:
addressDetail
}
=
await
PublicApi
.
getLogisticsReceiverAddressGet
({
id
:
params
.
deliveryAddresId
?.
id
||
params
.
deliveryAddresId
})
params
.
consignee
=
{
deliverDate
:
params
.
deliverDate
,
consigneeId
:
addressDetail
.
id
,
consignee
:
addressDetail
.
receiverName
,
provinceCode
:
addressDetail
.
provinceCode
,
cityCode
:
addressDetail
.
cityCode
,
districtCode
:
addressDetail
.
districtCode
,
address
:
addressDetail
.
address
,
postalCode
:
addressDetail
.
postalCode
,
countryCode
:
addressDetail
.
areaCode
,
phone
:
addressDetail
.
phone
,
telephone
:
addressDetail
.
tel
,
defaultConsignee
:
!!
addressDetail
.
isDefault
,
if
(
params
?.
deliveryAddresId
)
{
const
{
data
:
addressDetail
}
=
await
PublicApi
.
getLogisticsReceiverAddressGet
({
id
:
params
.
deliveryAddresId
?.
id
||
params
.
deliveryAddresId
})
params
.
consignee
=
{
deliverDate
:
params
.
deliverDate
,
consigneeId
:
addressDetail
.
id
,
consignee
:
addressDetail
.
receiverName
,
provinceCode
:
addressDetail
.
provinceCode
,
cityCode
:
addressDetail
.
cityCode
,
districtCode
:
addressDetail
.
districtCode
,
address
:
addressDetail
.
address
,
postalCode
:
addressDetail
.
postalCode
,
countryCode
:
addressDetail
.
areaCode
,
phone
:
addressDetail
.
phone
,
telephone
:
addressDetail
.
tel
,
defaultConsignee
:
!!
addressDetail
.
isDefault
,
}
}
// 其他需求
...
...
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