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
陈智峰
jinfa-platform
Commits
0193fc94
Commit
0193fc94
authored
Aug 11, 2021
by
前端-钟卫鹏
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
07906650
879a8752
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
257 additions
and
59 deletions
+257
-59
index.tsx
...ents/AddressSelect/components/AddressRadioGroup/index.tsx
+0
-0
index.tsx
src/components/AddressSelect/index.tsx
+0
-0
index.tsx
...ransaction/dealAbility/confirmOffer/offerSearch/index.tsx
+5
-0
index.tsx
...ges/transaction/dealAbility/inquiryOffer/detail/index.tsx
+1
-0
index.tsx
...nsaction/dealAbility/inquiryOffer/inquirySearch/index.tsx
+4
-1
addForm.tsx
...saction/dealAbility/inquiryOffer/waitAddOffer/addForm.tsx
+21
-5
otherExplain.tsx
...ity/inquiryOffer/waitAddOffer/components/otherExplain.tsx
+170
-3
productQuote.tsx
...ity/inquiryOffer/waitAddOffer/components/productQuote.tsx
+1
-0
quote.tsx
...ansaction/dealAbility/inquiryOffer/waitAddOffer/quote.tsx
+0
-1
index.tsx
...s/transaction/dealAbility/productInquiry/detail/index.tsx
+2
-0
addForm.tsx
...ion/dealAbility/productInquiry/waitAddInquiry/addForm.tsx
+11
-5
index.less
...ility/productInquiry/waitAddInquiry/components/index.less
+7
-0
tradeTerms.tsx
...y/productInquiry/waitAddInquiry/components/tradeTerms.tsx
+23
-37
index.tsx
...readySubmitExamine/components/productListLayout/index.tsx
+12
-7
No files found.
src/components/AddressSelect/components/AddressRadioGroup/index.tsx
View file @
0193fc94
This diff is collapsed.
Click to expand it.
src/components/AddressSelect/index.tsx
View file @
0193fc94
This diff is collapsed.
Click to expand it.
src/pages/transaction/dealAbility/confirmOffer/offerSearch/index.tsx
View file @
0193fc94
...
...
@@ -66,6 +66,11 @@ const OfferSearch = () => {
dataIndex
:
'interiorState'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Badge
status=
{
INTERNALSTATE_COLOR
[
text
]
}
text=
{
record
.
interiorStateName
}
/>
},
{
title
:
'操作'
,
key
:
'operate'
,
dataIndex
:
'operate'
,
}
];
return
(
...
...
src/pages/transaction/dealAbility/inquiryOffer/detail/index.tsx
View file @
0193fc94
...
...
@@ -178,6 +178,7 @@ const InquiryOfferDetail = () => {
title
:
'含税/税率'
,
key
:
'isTax'
,
dataIndex
:
'isTax'
,
render
:
(
_
,
record
)
=>
`
${
record
.
taxRate
?
'是'
:
'否'
}
/
${
record
.
taxRate
}
`
},
{
title
:
'报价单价'
,
...
...
src/pages/transaction/dealAbility/inquiryOffer/inquirySearch/index.tsx
View file @
0193fc94
...
...
@@ -63,7 +63,10 @@ const InquirySearch = () => {
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
disabled=
{
record
.
isQuoted
===
1
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/inquiryOffer/waitAddOffer/offer?id=${record.id}`
)
}
type=
'link'
>
报价
</
Button
>
render
:
(
text
:
any
,
record
:
any
)
=>
<>
<
Button
disabled=
{
record
.
isQuoted
===
1
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/inquiryOffer/waitAddOffer/offer?id=${record.id}`
)
}
type=
'link'
>
报价
</
Button
>
<
Button
disabled=
{
record
.
isQuoted
===
1
}
type=
'link'
>
二次询价
</
Button
>
</>
}
];
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/addForm.tsx
View file @
0193fc94
...
...
@@ -84,10 +84,18 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
}
setDataSource
(
res
.
data
);
setProductQuote
(
res
.
data
.
inquiryListProductRequests
)
form
.
setFieldsValue
({
...
res
.
data
,
"inquiryListProductRequests"
:
res
.
data
.
inquiryListProductRequests
,
})
if
(
isEdit
)
{
form
.
setFieldsValue
({
...
res
.
data
,
"inquiryListProductRequests"
:
res
.
data
.
inquiryListProductRequests
,
})
}
else
{
form
.
setFieldsValue
({
"inquiryListNo"
:
res
.
data
.
inquiryListNo
,
"inquiryListProductRequests"
:
res
.
data
.
inquiryListProductRequests
,
})
}
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
...
...
@@ -166,6 +174,14 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
})
}
const
getContacts
=
(
value
)
=>
{
form
.
setFieldsValue
({
"contacts"
:
value
.
name
,
'contactsPhone'
:
value
.
phone
,
'phoneCode'
:
86
,
});
}
return
(
<
Context
.
Provider
value=
{
dataSource
}
>
<
AddedLayout
...
...
@@ -200,7 +216,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
>
<
BasicInfoLayout
getInquiryInfo=
{
getInquiryInfo
}
inq=
{
inquiry
}
isEdit=
{
spam
}
/>
<
ProductQuoteLayout
setProductQuote=
{
productQuote
}
/>
<
OtherExplainLayout
/>
<
OtherExplainLayout
getContacts=
{
getContacts
}
/>
<
AttachLayout
enclosureUrls=
{
enclosureUrls
}
getEnclosureUrls=
{
getEnclosureUrls
}
removeEnclosureUrls=
{
removeEnclosureUrls
}
/>
</
Form
>
}
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/components/otherExplain.tsx
View file @
0193fc94
import
React
from
'react'
;
import
{
Row
,
Col
,
Form
,
Input
,
InputNumber
}
from
'antd'
;
import
React
,
{
useCallback
,
useState
}
from
'react'
;
import
{
Row
,
Col
,
Form
,
Input
,
InputNumber
,
Select
,
Button
}
from
'antd'
;
import
Card
from
'@/pages/transaction/components/card'
;
import
{
LinkOutlined
}
from
'@ant-design/icons'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
TableModal
from
'@/pages/transaction/components/TableModal'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
interface
OtherExplainLayoutProps
{
/** 获取联系人 */
getContacts
?:
(
e
)
=>
void
,
}
const
OtherExplainLayout
:
React
.
FC
<
OtherExplainLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
getContacts
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
)
const
handleFetchData
=
useCallback
((
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
PublicApi
.
getMemberManageUsersPage
({
...
params
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
resolve
(
res
.
data
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
})
},
[])
const
toggle
=
(
flag
:
boolean
)
=>
{
setVisible
(
flag
)
}
const
columns
:
any
=
[
{
title
:
'序号'
,
dataIndex
:
'userId'
,
key
:
'userId'
,
},
{
title
:
'用户姓名'
,
dataIndex
:
'name'
,
key
:
'name'
,
},
{
title
:
'手机号'
,
dataIndex
:
'phone'
,
key
:
'phone'
,
},
{
title
:
'所属机构'
,
dataIndex
:
'orgName'
,
key
:
'orgName'
,
},
]
const
handleConfirm
=
(
selectRowKeys
:
string
[]
|
number
[],
selectRowRecord
:
any
)
=>
{
const
target
=
selectRowRecord
[
0
];
getContacts
(
target
)
toggle
(
false
)
}
return
(
<
Card
id=
"otherExplainLayout"
...
...
@@ -27,6 +79,39 @@ const OtherExplainLayout: React.FC<OtherExplainLayoutProps> = (props: any) => {
]
}
>
<
InputNumber
min=
{
0
}
style=
{
{
width
:
'100%'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'询价联系人'
name=
'contacts'
rules=
{
[{
required
:
true
,
message
:
'请选择询价联系人'
}]
}
>
<
Input
.
Search
onSearch=
{
()
=>
toggle
(
true
)
}
readOnly
enterButton=
{
<
Button
style=
{
{
height
:
'31.19px'
}
}
icon=
{
<
LinkOutlined
/>
}
>
选择
</
Button
>
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'联系人电话'
required
style=
{
{
marginBottom
:
'0px'
}
}
>
<
Row
gutter=
{
16
}
>
<
Col
span=
{
8
}
>
<
Form
.
Item
name=
'phoneCode'
rules=
{
[{
required
:
true
,
message
:
'请选择'
}]
}
>
<
Select
>
<
Select
.
Option
value=
{
86
}
>
86
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
16
}
>
<
Form
.
Item
name=
'contactsPhone'
rules=
{
[{
required
:
true
,
message
:
'请选择'
}]
}
>
<
Input
type=
'number'
maxLength=
{
11
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
.
Item
>
<
Form
.
Item
label=
'交付说明'
name=
'deliveryInstructions'
>
<
Input
.
TextArea
maxLength=
{
50
}
autoSize
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
...
...
@@ -49,6 +134,88 @@ const OtherExplainLayout: React.FC<OtherExplainLayoutProps> = (props: any) => {
</
Form
.
Item
>
</
Col
>
</
Row
>
<
TableModal
modalType=
"Drawer"
visible=
{
visible
}
title=
"选择用户"
mode=
"radio"
tableProps=
{
{
rowKey
:
'userId'
,
}
}
customKey=
"userId"
fetchData=
{
handleFetchData
}
onClose=
{
()
=>
toggle
(
false
)
}
onOk=
{
handleConfirm
}
columns=
{
columns
}
effects=
{
(
$
,
actions
)
=>
{
actions
.
reset
()
useStateFilterSearchLinkageEffect
(
$
,
actions
,
"name"
,
FORM_FILTER_PATH
)
}
}
schema=
{
{
type
:
'object'
,
properties
:
{
megalayout
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
properties
:
{
name
:
{
type
:
'string'
,
"x-component"
:
"Search"
,
"x-mega-props"
:
{
},
"x-component-props"
:
{
placeholder
:
'用户姓名'
,
align
:
'flex-left'
,
}
}
}
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
"x-component"
:
"flex-layout"
,
"x-component-props"
:
{
rowStyle
:
{
justifyContent
:
'flex-start'
,
flexWrap
:
'nowrap'
},
colStyle
:
{
//改变间隔
marginRight
:
20
}
},
properties
:
{
PRO_LAYOUT
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-mega-props"
:
{
span
:
5
},
"x-component-props"
:
{
inline
:
true
},
properties
:
{
orgName
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'所属机构'
}
},
}
},
sumbit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
span
:
1
},
"x-component-props"
:
{
children
:
'查询'
}
}
}
}
}
}
}
/>
</
Card
>
)
}
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/components/productQuote.tsx
View file @
0193fc94
...
...
@@ -66,6 +66,7 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
title
:
"含税/税率"
,
key
:
"isTax"
,
dataIndex
:
"isTax"
,
render
:
(
_
,
record
)
=>
`
${
record
.
taxRate
?
'是'
:
'否'
}
/
${
record
.
taxRate
}
`
},
{
title
:
"采购数量/单位"
,
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/quote.tsx
View file @
0193fc94
...
...
@@ -7,7 +7,6 @@ const Quote = (props: any) => {
return
(
<
AddQuoteForm
id=
{
id
}
isEdit
title=
{
props
.
route
.
name
}
fetchRequest=
{
PublicApi
.
postTransactionProductQuotationAdd
}
spam
...
...
src/pages/transaction/dealAbility/productInquiry/detail/index.tsx
View file @
0193fc94
...
...
@@ -74,6 +74,8 @@ const ProductInquiryDetail = () => {
{
label
:
'交付日期'
,
extra
:
format
(
data
.
deliveryTime
)
},
{
label
:
'交付地址'
,
extra
:
data
.
fullAddress
},
{
label
:
'报价截止时间'
,
extra
:
format
(
data
.
quotationAsTime
)
},
{
label
:
'询价联系人'
,
extra
:
data
.
contacts
},
{
label
:
'联系人电话'
,
extra
:
data
.
contactsPhone
}
]
},
{
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/addForm.tsx
View file @
0193fc94
...
...
@@ -51,8 +51,8 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
memberId
:
memberInfo
.
memberId
,
memberRoleId
:
memberInfo
.
roleId
,
memberRoleName
:
memberInfo
.
roleName
,
fullAddress
:
fullAddress
.
children
,
fullAddressId
:
re
s
.
fullAddressId
,
fullAddress
:
fullAddress
.
fullAddress
,
fullAddressId
:
fullAddres
s
.
fullAddressId
,
offer
:
res
.
offer
,
paymentType
:
res
.
paymentType
,
taxes
:
res
.
taxes
,
...
...
@@ -100,7 +100,12 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
}
const
getFullAddress
=
(
info
)
=>
{
setFullAddress
(
info
)
console
.
log
(
info
)
const
address
=
{
fullAddress
:
`
${
info
.
name
}
${
info
.
fullAddress
}
${
info
.
phone
}
`
,
fullAddressId
:
info
.
id
,
}
setFullAddress
(
address
)
}
const
getEnclosureUrls
=
(
data
)
=>
{
...
...
@@ -185,7 +190,8 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
roleName
:
data
.
memberName
,
})
setFullAddress
({
children
:
data
.
fullAddress
,
fullAddress
:
data
.
fullAddress
,
fullAddressId
:
data
.
fullAddressId
,
})
setInquiryProduct
(
data
.
inquiryListProductRequests
)
setEnclosureUrls
(
data
.
enclosureUrls
)
...
...
@@ -240,7 +246,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
>
<
BasicInfoLatyout
getMemberInfo=
{
getMemberInfo
}
memb=
{
memberInfo
}
isEdit=
{
spam
}
/>
<
InquiryProductLayout
getInquiryProduct=
{
getInquiryProduct
}
member=
{
memberInfo
}
setInquiryProduct=
{
inquiryProduct
}
/>
<
TradeTermsLayout
getFullAddress=
{
getFullAddress
}
getContacts=
{
getContacts
}
/>
<
TradeTermsLayout
getFullAddress=
{
getFullAddress
}
getContacts=
{
getContacts
}
fullAddress=
{
fullAddress
}
/>
<
AttachLayout
enclosureUrls=
{
enclosureUrls
}
getEnclosureUrls=
{
getEnclosureUrls
}
removeEnclosureUrls=
{
removeEnclosureUrls
}
/>
</
Form
>
}
...
...
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/components/index.less
View file @
0193fc94
...
...
@@ -5,3 +5,10 @@
}
}
}
.addressLayout {
:global {
.ant-form-item-control {
width: 0;
}
}
}
src/pages/transaction/dealAbility/productInquiry/waitAddInquiry/components/tradeTerms.tsx
View file @
0193fc94
import
React
,
{
useCallback
,
use
Effect
,
useState
}
from
'react'
;
import
{
Row
,
Col
,
Form
,
Input
,
DatePicker
,
Select
,
Button
,
Space
}
from
'antd'
;
import
React
,
{
useCallback
,
use
State
,
useEffect
}
from
'react'
;
import
{
Row
,
Col
,
Form
,
Input
,
DatePicker
,
Select
,
Button
}
from
'antd'
;
import
Card
from
'@/pages/transaction/components/card'
;
import
moment
from
'moment'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
isEmpty
}
from
'lodash'
;
import
{
LinkOutlined
}
from
'@ant-design/icons'
;
import
TableModal
from
'@/pages/transaction/components/TableModal'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
AddressSelect
from
'@/components/AddressSelect'
;
import
style
from
'./index.less'
;
import
{
isEmpty
}
from
'lodash'
;
const
disabledDate
=
(
current
)
=>
{
return
current
&&
current
<
moment
().
startOf
(
'day'
);
...
...
@@ -18,28 +20,14 @@ interface TradeTermsLayoutProps {
getFullAddress
?:
(
e
)
=>
void
,
/** 获取联系人 */
getContacts
?:
(
e
)
=>
void
,
/** 回显数据 */
fullAddress
?:
any
,
}
const
TradeTermsLayout
:
React
.
FC
<
TradeTermsLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
getFullAddress
,
getContacts
}
=
props
;
const
[
fullAddress
,
setFullAddress
]
=
useState
<
any
[]
>
([]);
const
{
getFullAddress
,
getContacts
,
fullAddress
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
)
useEffect
(()
=>
{
PublicApi
.
getLogisticsSelectListReceiverAddress
().
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
setFullAddress
(
res
.
data
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
},
[])
const
handleFullAddress
=
(
_v
,
option
)
=>
{
getFullAddress
(
option
)
}
const
[
address
,
setaddress
]
=
useState
<
any
>
({})
const
handleFetchData
=
useCallback
((
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
PublicApi
.
getMemberManageUsersPage
({
...
params
}).
then
(
res
=>
{
...
...
@@ -80,12 +68,20 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
},
]
const
handleConfirm
=
(
selectRowKeys
:
string
[]
|
number
[],
selectRowRecord
:
any
)
=>
{
const
handleConfirm
=
(
_
selectRowKeys
:
string
[]
|
number
[],
selectRowRecord
:
any
)
=>
{
const
target
=
selectRowRecord
[
0
];
getContacts
(
target
)
toggle
(
false
)
}
useEffect
(()
=>
{
if
(
!
isEmpty
(
fullAddress
))
{
setaddress
({
id
:
fullAddress
.
fullAddressId
,
})
}
},
[
fullAddress
])
return
(
<
Card
id=
"tradeTermsLayout"
...
...
@@ -100,21 +96,8 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
format=
"YYYY-MM-DD HH:mm:ss"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'交付地址'
name=
'fullAddressId'
rules=
{
[{
required
:
true
,
message
:
'请选择交付地址'
}]
}
>
<
Select
onChange=
{
handleFullAddress
}
>
{
!
isEmpty
(
fullAddress
)
&&
(
fullAddress
.
map
(
item
=>
(
<
Select
.
Option
key=
{
item
.
id
}
value=
{
item
.
id
}
>
{
item
.
fullAddress
}
</
Select
.
Option
>
))
)
}
</
Select
>
<
Form
.
Item
label=
'交付地址'
className=
{
style
.
addressLayout
}
>
<
AddressSelect
value=
{
address
}
isDefaultAddress
addressType=
{
1
}
disabled=
{
false
}
onChange=
{
getFullAddress
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'报价截止时间'
name=
'quotationAsTime'
rules=
{
[{
required
:
true
,
message
:
'请选择报价截止时间'
}]
}
>
<
DatePicker
...
...
@@ -178,6 +161,7 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
</
Form
.
Item
>
</
Col
>
</
Row
>
{
/* 选择用户 */
}
<
TableModal
modalType=
"Drawer"
visible=
{
visible
}
...
...
@@ -260,6 +244,8 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
}
}
}
/>
{
/* 地址管理 */
}
</
Card
>
)
}
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/components/productListLayout/index.tsx
View file @
0193fc94
...
...
@@ -37,6 +37,7 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
const
[
type
,
setType
]
=
useState
<
number
>
(
0
);
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
([])
const
[
shopIdList
,
setShopIdList
]
=
useState
<
number
[]
>
([]);
const
components
=
{
body
:
{
row
:
EditableRow
,
...
...
@@ -63,6 +64,9 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
useEffect
(()
=>
{
if
(
!
isEmpty
(
data
))
{
setType
(
data
.
activityType
)
setShopIdList
(
data
.
shopList
.
map
(
item
=>
{
return
item
.
shopId
}))
}
},
[
data
])
...
...
@@ -109,7 +113,7 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
const
handleFetchData
=
useCallback
((
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
PublicApi
.
postProductCommodity
CommonGetCommodityListByPlatform
({
...
params
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
PublicApi
.
postProductCommodity
GetCommoditySkuListByShopId
({
shopIdList
,
...
params
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
...
...
@@ -121,9 +125,9 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
id
:
item
.
id
,
productId
:
item
.
commodityId
,
productName
:
item
.
name
,
category
:
item
.
categoryName
,
category
:
item
.
c
ustomerC
ategoryName
,
brand
:
item
.
brandName
,
status
:
item
.
status
,
status
:
5
,
productImgUrl
:
item
.
mainPic
,
unit
:
item
.
unitName
,
price
:
item
.
unitPrice
[
'0-0'
]
...
...
@@ -134,13 +138,14 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
console
.
warn
(
error
)
})
})
},
[])
},
[
shopIdList
])
const
handleOk
=
(
selectRowKeys
:
string
[]
|
number
[],
selectRowRecord
:
any
)
=>
{
const
rowRecord
:
any
[]
=
[...
selectRowRecord
]
const
productList
=
rowRecord
.
map
(
item
=>
{
return
{
id
:
item
.
id
,
skuId
:
item
.
id
,
productImgUrl
:
item
.
productImgUrl
,
productId
:
item
.
productId
,
productName
:
item
.
productName
,
...
...
@@ -229,7 +234,7 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
onOk=
{
handleOk
}
effects=
{
(
$
,
actions
)
=>
{
actions
.
reset
()
useStateFilterSearchLinkageEffect
(
$
,
actions
,
"
n
ame"
,
FORM_FILTER_PATH
)
useStateFilterSearchLinkageEffect
(
$
,
actions
,
"
commodityN
ame"
,
FORM_FILTER_PATH
)
}
}
schema=
{
{
type
:
"object"
,
...
...
@@ -238,7 +243,7 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
type
:
"object"
,
"x-component"
:
"mega-layout"
,
properties
:
{
n
ame
:
{
commodityN
ame
:
{
type
:
"string"
,
"x-component"
:
"Search"
,
"x-mega-props"
:
{},
...
...
@@ -272,7 +277,7 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
inline
:
true
},
properties
:
{
categoryId
:
{
c
ustomerC
ategoryId
:
{
type
:
"string"
,
"x-component-props"
:
{
placeholder
:
"商品品类"
,
...
...
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