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
e1e0d268
Commit
e1e0d268
authored
Oct 20, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
parent
0441f56f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
priceSetting.tsx
...ages/priceManage/priceStrategy/component/priceSetting.tsx
+5
-11
No files found.
src/pages/priceManage/priceStrategy/component/priceSetting.tsx
View file @
e1e0d268
...
...
@@ -17,8 +17,6 @@ import { constructTableData, transformDataForNiceForm } from '../../effect'
import
PriceModal
from
'./priceModal'
import
ProductModal
from
'./productModal'
import
MemberModal
from
'./memberModal'
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
import
{
fectchShopListsSource
}
from
'@/utils/type'
const
{
Search
}
=
Input
...
...
@@ -29,12 +27,8 @@ export interface PriceSettingProps {
formSubmit
?(
values
),
}
const
fetchShopLists
=
async
()
=>
{
return
await
fectchShopListsSource
({
type
:
1
})
}
const
PriceSetting
:
React
.
FC
<
PriceSettingProps
>
=
(
props
)
=>
{
const
{
addSchemaAction
,
schema
,
formSubmit
,
onFieldChange
=
()
=>
{}
}
=
props
const
PriceSetting
:
React
.
FC
<
PriceSettingProps
>
=
(
props
)
=>
{
const
{
addSchemaAction
,
schema
,
formSubmit
,
onFieldChange
=
()
=>
{
}
}
=
props
const
priceRef
=
useRef
<
any
>
({})
const
productRef
=
useRef
<
any
>
({})
const
memberRef
=
useRef
<
any
>
({})
...
...
@@ -190,7 +184,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
</>
// 批量设置价格按钮
const
batchPriceButton
=
pageStatus
!==
PageStatus
.
PREVIEW
&&
priceType
!==
2
&&
<
Button
type=
"text"
onClick=
{
clickBatchSetPrice
}
style=
{
{
marginBottom
:
12
,
cssF
loat
:
"right"
}
}
><
SettingOutlined
/>
批量设置价格
</
Button
>
const
batchPriceButton
=
pageStatus
!==
PageStatus
.
PREVIEW
&&
priceType
!==
2
&&
<
Button
type=
"text"
onClick=
{
clickBatchSetPrice
}
style=
{
{
marginBottom
:
12
,
f
loat
:
"right"
}
}
><
SettingOutlined
/>
批量设置价格
</
Button
>
// 选择商品
const
connectProduct
=
pageStatus
===
PageStatus
.
ADD
&&
<
div
className=
'connectBtn'
onClick=
{
handleAddProductBtn
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
...
...
@@ -231,14 +225,14 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
FormEffectHooks
.
onFormInputChange$
().
subscribe
(()
=>
{
onFieldChange
()
})
useAsyncSelect
(
'shopId'
,
fetchShopLists
,
[
'name'
,
'id'
])
$
(
'onFieldValueChange'
,
'shopId'
).
subscribe
(
parentState
=>
{
if
(
parentState
.
value
)
{
ctx
.
setFieldState
(
'shopId'
,
state
=>
{
// state.dataSource = pageStatus === PageStatus.PREVIEW ?
// GlobalConfig.web.shopInfo.filter(v => v.id === parentState.value && state.value.includes(v.id))
// :
//
state.dataSource = GlobalConfig.web.shopInfo.filter(v => v.id === parentState.value)
state
.
dataSource
=
GlobalConfig
.
web
.
shopInfo
.
filter
(
v
=>
v
.
id
===
parentState
.
value
)
if
(
pageStatus
===
PageStatus
.
EDIT
)
{
state
.
props
[
'x-component-props'
].
disabled
=
true
;
...
...
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