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
a776fdb9
Commit
a776fdb9
authored
Sep 17, 2020
by
GuanHua
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
844a295a
90041bc7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
21 deletions
+30
-21
SearchSelect.tsx
src/components/NiceForm/components/SearchSelect.tsx
+5
-1
index.tsx
src/components/NiceForm/index.tsx
+3
-2
viewDirectChannel.tsx
src/pages/commodity/products/viewDirectChannel.tsx
+10
-3
addRule.tsx
src/pages/transaction/transactionRules/addRule.tsx
+6
-8
RuleSetting.tsx
...s/transaction/transactionRules/components/RuleSetting.tsx
+3
-4
index.tsx
src/pages/transaction/transactionRules/effects/index.tsx
+2
-2
index.tsx
src/pages/transaction/transactionRules/schema/index.tsx
+1
-1
No files found.
src/components/NiceForm/components/SearchSelect.tsx
View file @
a776fdb9
...
...
@@ -26,7 +26,7 @@ const SelectContent = (props) => {
// 自定义搜索型下拉框
const
SearchSelect
=
(
props
:
ISchemaFieldComponentProps
)
=>
{
const
ref
=
useRef
<
any
>
({})
const
{
schema
,
form
,
path
,
mutators
}
=
props
const
{
schema
,
form
,
path
,
mutators
,
editable
}
=
props
const
dataSourceRef
=
useRef
<
any
[]
>
([])
const
pinyinRef
=
useRef
<
any
[]
>
([])
// 可选参数 fetchSearch, select为search
...
...
@@ -62,6 +62,9 @@ const SearchSelect = (props: ISchemaFieldComponentProps) => {
}
useEffect
(()
=>
{
if
(
!
editable
)
{
return
;
}
setLoading
(
true
)
fetchSearch
({
[
fetchParams
]:
''
...
...
@@ -128,6 +131,7 @@ const SearchSelect = (props: ISchemaFieldComponentProps) => {
filterOption=
{
false
}
loading=
{
loading
}
options=
{
dataSource
}
disabled=
{
!
editable
}
// getPopupContainer={triggerNode => {
// return triggerNode
// }}
...
...
src/components/NiceForm/index.tsx
View file @
a776fdb9
...
...
@@ -22,7 +22,7 @@ import CustomRadio from './components/CustomRadio';
import
SearchSelect
from
'./components/SearchSelect'
;
import
TableTagList
from
'./components/TableTagList'
;
import
'./index.less'
import
{
Checkbox
}
from
'@formily/antd-components'
;
import
{
Checkbox
,
Radio
}
from
'@formily/antd-components'
;
import
DateSelect
from
'./components/DateSelect'
;
import
VirtualChildren
from
'./components/VirtualChildren'
import
{
useLinkComponentProps
}
from
'./linkages/linkComponentProps'
;
...
...
@@ -92,7 +92,8 @@ export const componentExport = {
DateRangePicker
:
DatePicker
.
RangePicker
,
TableTagList
,
DateSelect
,
VirtualChildren
VirtualChildren
,
RadioGroup
:
Radio
.
Group
}
const
NiceForm
:
React
.
FC
<
NiceFormProps
>
=
props
=>
{
const
{
children
,
components
,
effects
,
expressionScope
,
...
reset
}
=
props
;
...
...
src/pages/commodity/products/viewDirectChannel.tsx
View file @
a776fdb9
...
...
@@ -131,11 +131,18 @@ const ViewDriectChannel: React.FC<{}> = () => {
<
Space
direction=
"vertical"
style=
{
{
width
:
'100%'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"商品信息"
>
<
p
>
<
Avatar
size=
{
48
}
shape=
"square"
src=
{
channelDetails
?.
unitPriceAndPicList
[
0
]?.
commodityPic
&&
channelDetails
.
unitPriceAndPicList
[
0
].
commodityPic
[
0
]
}
/>
<
Avatar
size=
{
48
}
shape=
"square"
src=
{
channelDetails
?.
channelCommodity
?.
commodity
?.
mainPic
}
/>
<
span
style=
{
{
color
:
'rgba(23,43,77,1)'
,
fontSize
:
20
,
fontWeight
:
500
,
marginLeft
:
16
}
}
>
{
channelDetails
?.
name
}
</
span
>
<
span
style=
{
{
color
:
'#E63F3B'
,
padding
:
'2px 5px'
,
background
:
'rgba(255,235,230,1)'
,
borderRadius
:
'4px'
,
marginLeft
:
16
,
marginRight
:
16
}
}
>
{
channelDetails
?.
channelCommodity
?.
source
===
1
?
"上级渠道"
:
"渠道自有"
}
</
span
>
<
a
>
去查看
>
</
a
>
{
/* <a href={channelDetails?.source === 1 ? `/shop/commodity/detail?id=${channelDetails?.channelCommodity?.commodity?.id}` : `/memberCenter/commodityAbility/commodity/products/viewProducts?id=${channelDetails?.channelCommodity?.commodity?.id}`}>去查看 ></a> */
}
{
/* <a>去查看 ></a> */
}
<
a
href=
{
channelDetails
?.
channelCommodity
?.
source
===
1
?
`/channelmall/commodity/detail?id=${channelDetails?.channelCommodity?.commodity?.id}&channelId=${btoa(JSON.stringify({ shopId: '', memberId: channelDetails?.channelCommodity?.parentMemberId }))}`
:
`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${channelDetails?.channelCommodity?.commodity?.id}`
}
// target="blank"
>
去查看
>
</
a
>
</
p
>
{
content
}
</
Card
>
...
...
src/pages/transaction/transactionRules/addRule.tsx
View file @
a776fdb9
...
...
@@ -25,14 +25,12 @@ const AddRule:React.FC<{}> = (props) => {
// 整体表单提交
const
formSubmit
=
async
(
values
)
=>
{
const
params
=
omit
(
values
,
[
'NO_SUBMIT3'
])
if
(
params
[
'applyMember'
])
{
params
[
'applyMember'
]
=
params
[
'applyMember'
].
map
(
v
=>
v
.
memberId
)
}
await
PublicApi
.
postWarehouseFreightSpaceAdd
(
params
)
setTimeout
(()
=>
{
history
.
goBack
(
-
1
)
},
1000
)
// const params = omit(values, ['NO_SUBMIT3'])
console
.
log
(
values
,
'values'
)
// await PublicApi.postOrderTradingRulesAdd(params)
// setTimeout(() => {
// history.goBack(-1)
// }, 1000)
}
return
(
...
...
src/pages/transaction/transactionRules/components/RuleSetting.tsx
View file @
a776fdb9
...
...
@@ -39,8 +39,8 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
pageStatus
}
=
usePageStatus
()
const
initValue
=
useInitValue
(
PublicApi
.
get
WarehouseFreightSpace
Details
)
useUnitPreview
(
initValue
,
addSchemaAction
)
const
initValue
=
useInitValue
(
PublicApi
.
get
OrderTradingRules
Details
)
//
useUnitPreview(initValue, addSchemaAction)
const
fetchProductList
=
async
(
params
)
=>
{
const
tradingRulesId
=
addSchemaAction
.
getFieldValue
(
'transactionProcesssId'
)
...
...
@@ -54,7 +54,6 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
// table删除商品
const
handleDeleteTable
=
(
id
)
=>
{
const
value
=
addSchemaAction
.
getFieldValue
(
'products'
)
console
.
log
(
value
,
'v'
,
findItemAndDelete
(
value
,
id
))
addSchemaAction
.
setFieldValue
(
'products'
,
findItemAndDelete
(
value
,
id
,
'productId'
))
}
...
...
@@ -230,7 +229,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
})
createAddContractTemplateEffect
(
addSchemaAction
)
$
(
'onFieldValueChange'
,
'isElectronicContract'
).
subscribe
(
parentState
=>
{
setFieldState
(
'
contractTemplate
Id'
,
state
=>
{
setFieldState
(
'
electronicContract
Id'
,
state
=>
{
state
.
visible
=
parentState
.
value
})
})
...
...
src/pages/transaction/transactionRules/effects/index.tsx
View file @
a776fdb9
...
...
@@ -7,7 +7,7 @@ const { onFieldValueChange$ } = FormEffectHooks
export
const
createAddContractTemplateEffect
=
(
context
:
ISchemaFormActions
)
=>
{
const
fetchListContractTemplateAll
=
async
()
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderSelectListContractTemplate
()
context
.
setFieldState
(
'
contractTemplate
Id'
,
state
=>
{
context
.
setFieldState
(
'
electronicContract
Id'
,
state
=>
{
state
.
contractTemplateLists
=
data
})
return
data
.
map
(
v
=>
({
...
...
@@ -16,7 +16,7 @@ export const createAddContractTemplateEffect = (context: ISchemaFormActions) =>
}))
}
useAsyncSelect
(
'
contractTemplate
Id'
,
fetchListContractTemplateAll
)
useAsyncSelect
(
'
electronicContract
Id'
,
fetchListContractTemplateAll
)
}
export
const
useUnitPreview
=
(
initValue
,
context
)
=>
{
...
...
src/pages/transaction/transactionRules/schema/index.tsx
View file @
a776fdb9
...
...
@@ -76,7 +76,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
"x-component"
:
"checkboxsingle"
,
default
:
false
},
contractTemplate
Id
:
{
electronicContract
Id
:
{
type
:
'string'
,
required
:
true
,
enum
:
[],
...
...
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