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
0aebe839
Commit
0aebe839
authored
Nov 17, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
dfe30212
bb2b5416
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
123 additions
and
111 deletions
+123
-111
index.tsx
src/components/ImagePreview/index.tsx
+7
-3
index.ts
src/constants/index.ts
+1
-0
selectChannel.tsx
...pages/commodity/products/addChannelItem/selectChannel.tsx
+2
-4
productAttributeForm.tsx
...mmodity/products/addProductsItem/productAttributeForm.tsx
+5
-2
fastModifyPrice.tsx
src/pages/commodity/products/fastModifyPrice.tsx
+52
-86
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+1
-0
LXShopLayout.tsx
src/pages/lxMall/layouts/LXShopLayout.tsx
+1
-1
index.tsx
src/pages/lxMall/order/index.tsx
+1
-0
index.less
src/pages/lxMall/pay/components/wechat/index.less
+0
-2
index.tsx
src/pages/lxMall/pay/components/wechat/index.tsx
+38
-1
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+1
-0
list.tsx
src/pages/lxMall/shopList/list.tsx
+2
-2
accountDetail.tsx
...yandSettle/capitalAccounts/accountLists/accountDetail.tsx
+1
-1
index.tsx
...ayandSettle/capitalAccounts/accountLists/schema/index.tsx
+1
-1
PositionSetting.tsx
src/pages/repositories/components/PositionSetting.tsx
+3
-4
index.tsx
...ages/transaction/components/orderPayResultModal/index.tsx
+3
-3
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+4
-1
No files found.
src/components/ImagePreview/index.tsx
View file @
0aebe839
...
...
@@ -2,12 +2,13 @@ import React, { useState, useEffect } from 'react'
import
styles
from
'./index.less'
export
interface
ImagePreviewProps
{
src
:
string
,
src
:
any
,
// 图片src数组
currentRef
?:
any
}
const
ImagePreview
:
React
.
FC
<
ImagePreviewProps
>
=
({
src
,
currentRef
})
=>
{
const
[
state
,
setState
]
=
useState
(
false
)
const
[
index
,
setIndex
]
=
useState
(
0
)
useEffect
(()
=>
{
if
(
currentRef
)
{
...
...
@@ -16,13 +17,16 @@ const ImagePreview:React.FC<ImagePreviewProps> = ({src, currentRef}) => {
}
}
},
[])
const
toggle
=
()
=>
{
const
toggle
=
(
index
?:
any
)
=>
{
// 点击的索引
if
(
index
){
setIndex
(
index
)
}
setState
(
!
state
)
}
return
state
&&
(
<
div
className=
{
styles
.
imgPreviewWrapper
}
onClick=
{
toggle
}
>
<
img
src=
{
src
}
className=
{
styles
.
imgPreview
}
/>
<
img
src=
{
src
[
index
]
}
className=
{
styles
.
imgPreview
}
/>
</
div
>
)
}
...
...
src/constants/index.ts
View file @
0aebe839
...
...
@@ -881,6 +881,7 @@ export const PurchaseOrderTransformInsideWorkStateTexts = {
// 销售订单流转记录内部状态
export
const
SaleOrderTransformInsideWorkStateTexts
=
{
"-1"
:
'取消订单'
,
0
:
'完成订单'
,
1
:
'审核通过'
,
2
:
'审核通过'
,
3
:
'审核通过'
,
...
...
src/pages/commodity/products/addChannelItem/selectChannel.tsx
View file @
0aebe839
...
...
@@ -197,10 +197,6 @@ const SelectChannel:React.FC<IProps> = (props) => {
message
.
error
(
'请先选择渠道商品!'
)
}
const
clickDelete
=
(
record
:
any
)
=>
{
// 删除处理
}
const
handleOkAddMember
=
()
=>
{
setVisibleChannelMember
(
false
)
console
.
log
(
memberRowCtl
.
selectRow
,
memberRowCtl
.
selectedRowKeys
,
'选中的项'
)
...
...
@@ -223,6 +219,8 @@ const SelectChannel:React.FC<IProps> = (props) => {
setSelectedRole
(
option
)
setMemberTableData
([])
setSelectedMemberRowKeys
([])
memberRowCtl
.
setSelectRow
([])
memberRowCtl
.
setSelectedRowKeys
([])
}
const
clickSearchChannel
=
(
value
:
string
)
=>
{
...
...
src/pages/commodity/products/addProductsItem/productAttributeForm.tsx
View file @
0aebe839
...
...
@@ -223,12 +223,15 @@ const ProductAttributeForm: React.FC<Iprops> = (props) => {
<
Form
.
Item
name=
{
attrItem
.
id
}
label=
{
attrItem
.
name
}
rules=
{
attrItem
.
isEmpty
&&
[{
rules=
{
attrItem
.
isEmpty
?
[{
required
:
true
,
message
:
'此项为必填项'
},{
validator
:
(
r
,
v
,
c
)
=>
validatorByte
(
r
,
v
,
c
,
60
)
}]
}
}]
:
[{
validator
:
(
r
,
v
,
c
)
=>
validatorByte
(
r
,
v
,
c
,
60
)
}]
}
>
<
TextArea
disabled=
{
_isDisabled
}
...
...
src/pages/commodity/products/fastModifyPrice.tsx
View file @
0aebe839
...
...
@@ -30,17 +30,6 @@ interface Item {
status
:
string
;
}
interface
paramItem
{
name
:
string
;
code
:
string
;
priceType
:
number
;
min
:
number
;
max
:
number
;
brandId
:
number
;
customerCategoryId
:
number
;
status
:
number
;
}
const
FastModifyPrice
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
setForm
]
=
Form
.
useForm
()
...
...
@@ -198,7 +187,6 @@ const FastModifyPrice: React.FC<{}> = () => {
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
//@ts-ignore
PublicApi
.
getProductCommodityGetCommodityDetailList
({
...
filterParams
,
...
params
,
environment
:
1
}).
then
(
res
=>
{
const
{
data
}
=
res
resolve
(
data
)
...
...
@@ -278,7 +266,6 @@ const FastModifyPrice: React.FC<{}> = () => {
const
handleOk
=
()
=>
{
setForm
.
validateFields
().
then
(
v
=>
{
console
.
log
(
v
,
'v'
)
const
{
ladderPrice
,
ladderRange
}
=
v
let
_priceRange
=
{}
if
(
ladderPrice
){
// 判断阶梯价格
...
...
@@ -288,8 +275,6 @@ const FastModifyPrice: React.FC<{}> = () => {
}
else
{
_priceRange
[
'0-0'
]
=
v
.
uniquePrice
}
console
.
log
(
_priceRange
)
// @ts-ignore
PublicApi
.
postProductCommodityUpdateCommodityPrice
({
id
:
currentRow
.
id
,
unitPrice
:
_priceRange
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
){
ref
.
current
.
reload
()
...
...
@@ -305,7 +290,9 @@ const FastModifyPrice: React.FC<{}> = () => {
const
changeLadderPrice
=
(
e
:
any
)
=>
{
setLadderPrice
(
e
.
target
.
checked
)
setForm
.
setFields
([{
name
:
'ladderPrice'
,
value
:
e
.
target
.
checked
}])
if
(
e
.
target
.
checked
&&
currentRow
.
minOrder
){
setForm
.
setFieldsValue
({
ladderRange
:
[{
numberPrice
:
null
,
numberRange
:
{
numberMin
:
currentRow
.
minOrder
,
numberMax
:
null
}}]})
}
}
const
handleHightSearch
=
(
val
?:
string
)
=>
{
...
...
@@ -330,8 +317,9 @@ const FastModifyPrice: React.FC<{}> = () => {
},
[]
)
let
result
=
range
.
reduce
((
a
,
b
)
=>
{
if
(
a
<
b
)
return
b
})
let
result
=
range
.
map
(
Number
).
reduce
((
a
,
b
)
=>
{
if
(
a
<
b
)
return
b
})
if
(
!
result
)
throw
new
Error
(
'请正确输入阶梯数量范围'
);
if
(
Number
(
range
[
0
])
!==
Number
(
currentRow
.
minOrder
))
throw
new
Error
(
'阶段的起始值必须为最小起订数'
);
callback
()
}
}
catch
(
err
)
{
...
...
@@ -483,8 +471,9 @@ const FastModifyPrice: React.FC<{}> = () => {
priceType
!==
3
&&
<
Form
.
Item
label=
""
name=
"ladderPrice"
valuePropName=
"checked"
>
<
Checkbox
checked=
{
ladderPrice
}
onChange=
{
changeLadderPrice
}
>
阶梯价格
</
Checkbox
>
<
Checkbox
onChange=
{
changeLadderPrice
}
>
阶梯价格
</
Checkbox
>
</
Form
.
Item
>
}
{
...
...
@@ -502,7 +491,7 @@ const FastModifyPrice: React.FC<{}> = () => {
}
]
}
>
<
Form
.
List
name=
"ladderRange"
key=
{
Math
.
random
()
}
>
<
Form
.
List
name=
"ladderRange"
>
{
(
fields
,
{
add
,
remove
})
=>
{
if
(
!
fields
.
length
)
{
add
()
...
...
@@ -512,84 +501,61 @@ const FastModifyPrice: React.FC<{}> = () => {
{
fields
.
map
(
field
=>
(
<
Row
key=
{
field
.
key
}
gutter=
{
[
0
,
10
]
}
>
<
Col
span=
{
20
}
style=
{
{
display
:
'flex'
}
}
>
<
Item
<
Form
.
Item
{
...
field
}
name=
{
[
field
.
name
,
'numberRange'
,
'numberMin'
]
}
fieldKey=
{
[
field
.
fieldKey
,
'numberRange'
,
'numberMin'
]
}
rules=
{
[
{
required
:
true
,
message
:
'阶梯最小数量为必填项'
},
{
pattern
:
/^
\d
+
(\.\d
{1,3}
)?
$/
,
message
:
'阶梯数值仅限三位小数'
,
}
]
}
>
<
Input
placeholder=
"最小数量"
/>
</
Form
.
Item
>
<
Input
style=
{
{
width
:
30
,
height
:
32
,
borderLeft
:
0
,
borderRight
:
0
,
pointerEvents
:
'none'
,
}
}
placeholder=
"~"
disabled
/>
<
Form
.
Item
{
...
field
}
name=
{
[
field
.
name
,
'numberRange'
]
}
fieldKey=
{
[
field
.
fieldKey
,
'numberRange'
]
}
key=
{
'_'
+
field
.
fieldKey
}
noStyle
name=
{
[
field
.
name
,
'numberRange'
,
'numberMax'
]
}
fieldKey=
{
[
field
.
fieldKey
,
'numberRange'
,
'numberMax'
]
}
rules=
{
[
{
required
:
true
,
message
:
'阶梯最大数量为必填项'
},
{
pattern
:
/^
\d
+
(\.\d
{1,3}
)?
$/
,
message
:
'阶梯数值仅限三位小数'
,
}
]
}
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
{
[
field
.
name
,
'numberRange'
,
'numberMin'
]
}
noStyle
rules=
{
[
{
required
:
true
,
message
:
'阶梯最小数量为必填项'
},
{
pattern
:
/^
\d
+
(\.\d
{1,3}
)?
$/
,
message
:
'阶梯数值小数点后仅限三位'
,
}
]
}
>
<
Input
style=
{
{
width
:
100
,
textAlign
:
'center'
}
}
placeholder=
"最小数量"
/>
</
Form
.
Item
>
<
InputNumber
style=
{
{
width
:
30
,
borderLeft
:
0
,
borderRight
:
0
,
pointerEvents
:
'none'
,
}
}
placeholder=
"~"
disabled
/>
<
Form
.
Item
name=
{
[
field
.
name
,
'numberRange'
,
'numberMax'
]
}
noStyle
rules=
{
[
{
required
:
true
,
message
:
'阶梯最大数量为必填项'
},
{
pattern
:
/^
\d
+
(\.\d
{1,3}
)?
$/
,
message
:
'阶梯数值小数点后仅限三位'
,
}
]
}
>
<
InputNumber
className=
{
styles
.
siteInputRight
}
style=
{
{
width
:
100
,
textAlign
:
'center'
,
}
}
placeholder=
"最大数量"
/>
</
Form
.
Item
>
</
Input
.
Group
>
</
Item
>
<
Item
<
Input
placeholder=
"最大数量"
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
field
}
name=
{
[
field
.
name
,
'numberPrice'
]
}
fieldKey=
{
[
field
.
fieldKey
,
'numberPrice'
]
}
key=
{
'__'
+
field
.
fieldKey
}
noStyle
rules=
{
[
{
required
:
true
,
message
:
'阶梯单价为必填项'
},
{
required
:
true
,
message
:
'阶梯单价为必填项'
},
{
pattern
:
/^
\d
+
(\.\d
{1,4}
)?
$/
,
message
:
'阶梯单价
小数点后仅限四位
'
,
message
:
'阶梯单价
仅限四位小数
'
,
}
]
}
style=
{
{
marginLeft
:
20
}
}
>
<
Input
style=
{
{
width
:
'50%'
,
marginLeft
:
24
}
}
placeholder=
"请输入单价"
/>
</
Item
>
<
Input
placeholder=
"请输入单价"
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
4
}
>
<
Button
size=
"small"
onClick=
{
()
=>
add
()
}
style=
{
{
marginLeft
:
20
,
marginRight
:
8
}
}
icon=
{
<
PlusOutlined
/>
}
/>
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
0aebe839
...
...
@@ -481,6 +481,7 @@ const CommodityDetail = (props) => {
category
:
commodityDetail
.
customerCategory
.
name
,
brand
:
commodityDetail
.
brand
.
name
,
stockCount
:
stockCount
,
minOrder
:
commodityDetail
.
minOrder
,
commodityPic
:
attrAndValList
.
commodityPic
?
attrAndValList
.
commodityPic
[
0
]
:
commodityDetail
.
mainPic
,
attribute
:
attrAndValList
.
attributeAndValueList
}
...
...
src/pages/lxMall/layouts/LXShopLayout.tsx
View file @
0aebe839
...
...
@@ -112,7 +112,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
return
React
.
cloneElement
(
child
,
{
layoutType
:
LAYOUT_TYPE
.
shop
,
shopId
:
query
.
shopI
d
,
shopId
:
shopInfo
.
i
d
,
memberId
:
query
.
memberId
,
shopUrlParam
:
shopId
,
shopInfo
,
...
...
src/pages/lxMall/order/index.tsx
View file @
0aebe839
...
...
@@ -295,6 +295,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
temp
.
brand
=
orderItem
.
brand
temp
.
logistics
=
orderItem
.
logistics
temp
.
deliveryType
=
orderItem
.
logistics
.
deliveryType
temp
.
minOrder
=
orderItem
.
minOrder
temp
.
memberId
=
orderInfo
.
supplyMembersId
temp
.
memberRoleId
=
orderInfo
.
supplyMembersRoleId
orderProductRequests
.
push
(
temp
)
...
...
src/pages/lxMall/pay/components/wechat/index.less
View file @
0aebe839
...
...
@@ -15,8 +15,6 @@
&_imgbox {
padding: 20px;
width: 180px;
height: 180px;
border: 1px solid rgba(245, 245, 245, 1);
&>img {
...
...
src/pages/lxMall/pay/components/wechat/index.tsx
View file @
0aebe839
...
...
@@ -4,6 +4,7 @@ import { LAYOUT_TYPE } from '@/constants'
import
wechatIcon
from
'@/assets/imgs/wechat_icon.png'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
PublicApi
}
from
'@/services/api'
import
{
linkToUrl
}
from
'../../utils'
import
{
message
,
Spin
}
from
'antd'
import
QRCode
from
'qrcode'
import
styles
from
'./index.less'
...
...
@@ -22,7 +23,8 @@ const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => {
const
{
payInfo
,
orderId
,
onChange
,
orderInfo
,
layoutType
,
shopUrlParam
}
=
props
const
[
wechatPayUrl
,
setWechatPayUrl
]
=
useState
<
any
>
(
''
)
const
[
pageLoading
,
setPageLoading
]
=
useState
<
boolean
>
(
true
)
let
checkCount
=
0
let
checkTimer
=
null
useEffect
(()
=>
{
pay
()
},
[])
...
...
@@ -49,6 +51,9 @@ const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => {
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
generateQrCode
(
res
.
data
)
setTimeout
(()
=>
{
checkPayState
()
},
5000
);
}
setPageLoading
(
false
)
// setWechatPayUrl(res.data)
...
...
@@ -58,6 +63,38 @@ const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => {
})
}
const
checkPayState
=
()
=>
{
if
(
checkCount
<
12
)
{
let
param
=
{
id
:
Number
(
orderId
),
paymentInformationId
:
payInfo
.
paymentInformationId
,
payTypeId
:
payInfo
.
paymentChannelsId
,
}
//@ts-ignore
PublicApi
.
getOrderPayResultsl
(
param
).
then
(
res
=>
{
const
{
data
,
code
}
=
res
if
(
code
===
1000
)
{
message
.
destroy
()
if
(
data
)
{
message
.
success
(
"支付成功"
)
linkToUrl
(
`/pay/result?orderId=
${
orderId
}
`
,
layoutType
,
shopUrlParam
)
}
else
{
checkCount
++
checkTimer
=
setTimeout
(()
=>
{
checkPayState
()
},
5000
)
}
}
else
{
message
.
error
(
res
.
message
)
}
})
}
else
{
clearTimeout
(
checkTimer
)
checkTimer
=
null
}
}
return
(
<
Spin
spinning=
{
pageLoading
}
>
<
div
className=
{
styles
.
common_title
}
>
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
0aebe839
...
...
@@ -512,6 +512,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
unitPrice
:
getUnitPrice
(
item
.
commodityUnitPrice
,
item
.
count
),
logistics
:
item
.
commodityUnitPrice
.
commodity
.
logistics
,
name
:
item
.
commodityUnitPrice
.
commodity
.
name
,
minOrder
:
item
.
commodityUnitPrice
.
commodity
.
minOrder
,
priceRange
:
item
.
commodityUnitPrice
.
priceRange
,
category
:
item
.
commodityUnitPrice
.
commodity
.
customerCategory
.
name
,
brand
:
item
.
commodityUnitPrice
.
commodity
.
brand
.
name
,
...
...
src/pages/lxMall/shopList/list.tsx
View file @
0aebe839
...
...
@@ -77,8 +77,8 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
</
div
>
<
div
className=
{
styles
.
shop_list_line
}
>
<
label
>
以上信息已通过会员认证|
</
label
>
<
Link
to=
{
`/shop/about?shopId=${btoa(JSON.stringify({
shopId: item.id,
memberId: item.memberId }))}`
}
className=
{
styles
.
shop_list_line_link
}
>
资质证书
>
</
Link
>
<
Link
to=
{
`/shop/about?shopId=${btoa(JSON.stringify({
shopId: item.id,
memberId: item.memberId }))}`
}
className=
{
styles
.
shop_list_line_link
}
>
公司信息
>
</
Link
>
<
Link
to=
{
`/shop/about?shopId=${btoa(JSON.stringify({ memberId: item.memberId }))}`
}
className=
{
styles
.
shop_list_line_link
}
>
资质证书
>
</
Link
>
<
Link
to=
{
`/shop/about?shopId=${btoa(JSON.stringify({ memberId: item.memberId }))}`
}
className=
{
styles
.
shop_list_line_link
}
>
公司信息
>
</
Link
>
</
div
>
</
div
>
<
div
className=
{
styles
.
shop_list_goods
}
>
...
...
src/pages/payandSettle/capitalAccounts/accountLists/accountDetail.tsx
View file @
0aebe839
...
...
@@ -369,7 +369,7 @@ const AccountDetail: React.FC<{}> = () => {
<
img
src=
{
qrCode
}
alt=
""
/>
<
div
className=
{
styles
.
scanTips
}
>
<
ScanOutlined
className=
{
styles
.
scanIcon
}
/>
<
span
>
打开
{
rechargeType
===
1
?
'微信'
:
'支付宝'
}
App
<
br
/>
扫码完成充值
</
span
>
<
span
>
打开
{
rechargeType
===
2
?
'微信'
:
'支付宝'
}
App
<
br
/>
扫码完成充值
</
span
>
</
div
>
</
div
>
</
Modal
>
...
...
src/pages/payandSettle/capitalAccounts/accountLists/schema/index.tsx
View file @
0aebe839
...
...
@@ -140,7 +140,7 @@ export const rechargeSchema: ISchema = {
"x-component-props"
:
{
dataSource
:
[
// {id: 1, name: '支付宝', logoUrl: alipay},
{
id
:
1
,
name
:
'微信'
,
logoUrl
:
wxpay
}
{
id
:
2
,
name
:
'微信'
,
logoUrl
:
wxpay
}
],
type
:
'radio'
// CardCheckBox 单选模式
},
...
...
src/pages/repositories/components/PositionSetting.tsx
View file @
0aebe839
...
...
@@ -245,12 +245,11 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
const
fetchMemberList
=
async
(
params
)
=>
{
const
shopType
=
addSchemaAction
.
getFieldValue
(
'shopType'
);
// 当商城类型为 渠道商城、渠道自由商城和渠道积分商城时,需要带上下面两个参数
const
{
channelMemberIdList
,
channelMemberRoleIdList
}
=
productState
;
const
{
members
}
=
productState
;
const
data
=
{
...
params
,
shopType
:
shopType
,
memberIds
:
channelMemberIdList
,
roleIds
:
channelMemberRoleIdList
members
:
members
}
const
res
=
await
PublicApi
.
postMemberManageAllPageByshoptype
(
data
,
{
ctlType
:
'none'
});
return
res
.
data
...
...
@@ -422,7 +421,7 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
},
},
properties
:
{
categoryId
:
{
c
ustomerC
ategoryId
:
{
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
...
...
src/pages/transaction/components/orderPayResultModal/index.tsx
View file @
0aebe839
...
...
@@ -63,12 +63,12 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
<
List
itemLayout=
"horizontal"
dataSource=
{
transData
||
[]
}
renderItem=
{
(
item
:
string
)
=>
(
<
List
.
Item
style=
{
{
fontSize
:
12
}
}
extra=
{
<
Button
type=
'link'
onClick=
{
imgRef
.
current
.
toggle
}
>
预览
</
Button
>
}
>
renderItem=
{
(
item
:
string
,
index
:
number
)
=>
(
<
List
.
Item
style=
{
{
fontSize
:
12
}
}
extra=
{
<
Button
type=
'link'
onClick=
{
()
=>
imgRef
.
current
.
toggle
(
index
)
}
>
预览
</
Button
>
}
>
<
OverflowText
style=
{
{
flex
:
'.9'
}
}
>
{
item
}
</
OverflowText
>
<
ImagePreview
src=
{
item
}
currentRef=
{
imgRef
}
/>
<
ImagePreview
src=
{
transData
||
[]
}
currentRef=
{
imgRef
}
/>
</
List
.
Item
>
)
}
/>
...
...
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
0aebe839
import
{
productColumns
}
from
'./../../../../afterService/exchangeGoods/waitAddLogisticsOrder/opration/component/selectProductModal.tsx/index'
;
import
{
ISchemaFormActions
,
FormEffectHooks
,
IFieldState
,
ISchemaFormAsyncActions
,
createEffectHook
}
from
'@formily/antd'
;
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
...
...
@@ -87,6 +88,7 @@ export const useEditHideField = () => {
export
const
useProductTableChangeForPay
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
update
)
=>
{
FormEffectHooks
.
onFieldValueChange$
(
'orderProductRequests'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
console
.
log
(
value
,
'vlaue'
)
const
payInfoData
=
ctx
.
getFieldValue
(
'paymentInformationResponses'
)
// 强制渲染一次, 用于触发金额总数
update
()
...
...
@@ -97,7 +99,8 @@ export const useProductTableChangeForPay = (ctx: ISchemaFormActions | ISchemaFor
// 请求一次并复制给支付信息
const
productItem
=
value
[
0
]
fetchOrderApi
.
getPayInfoList
({
productId
:
productItem
.
id
,
// productId: productItem.id,
productId
:
productItem
?.
commodityId
?
productItem
.
id
:
productItem
.
productId
,
memberId
:
productItem
.
memberId
}).
then
(
data
=>
{
ctx
.
setFieldValue
(
'paymentInformationResponses'
,
data
)
...
...
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