Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangzhonghua
/
BoneHouse_Business_APP
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
71810a43
authored
Dec 23, 2021
by
peii
1
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
filter radio
parent
072092dd
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
141 additions
and
14 deletions
src/components/form/index.styl
src/components/form/radio-filter.tsx
src/components/form/radio.tsx
src/components/modals/filter/filter.tsx
src/pages/settlement/collection.tsx
src/pages/settlement/components/filter.tsx
src/pages/settlement/index.tsx
src/components/form/index.styl
View file @
71810a43
...
@@ -121,3 +121,40 @@
...
@@ -121,3 +121,40 @@
.ml10
.ml10
margin-left 10px
margin-left 10px
.box
&-item
flex-direction column
height auto
&-radio
@extend .row
flex 1
justify-content flex-start
flex-wrap wrap
margin-top 10px
&__item
border-color #ddd
border-width 1px
padding 6px 12px
margin-right 8px
margin-bottom 8px
background-color #fff
&-active
activeColor = #a8d4ff
background-color activeColor
border-color activeColor
&-image
position absolute
right 0
bottom 0
&-text
@extend .text
color second_text_color
&-active
color primary_color
src/components/form/radio-filter.tsx
0 → 100644
View file @
71810a43
/*
* @FilePath: /BoneHouse_Business_APP/src/components/form/radio-filter.tsx
* @Author: peii
* @Date: 2021-06-06 16:24:05
* @Vision: 1.0
* @Description: 过滤Radio组件
*
* @Revision:
*
*/
// @ts-nocheck
import
React
,
{
Component
}
from
'react'
import
{
View
,
Text
,
Image
,
TouchableOpacity
}
from
'react-native'
import
{
IFormField
,
IOption
}
from
'bonehouse'
import
*
as
R
from
'ramda'
import
{
isBlank
,
show
,
isNotBlank
,
g
}
from
'../../utils/utils'
import
{
FieldType
}
from
'../../enums'
import
{
Title
}
from
'./common'
import
styles
from
'./index.styl'
type
IProps
=
{
item
:
IFormField
data
:
any
value
:
any
}
export
default
class
BoxRadio
extends
Component
<
IProps
>
{
shouldComponentUpdate
(
nextProps
:
IProps
):
boolean
{
if
(
nextProps
.
value
!==
this
.
props
.
value
)
{
return
true
}
return
false
}
render
()
{
const
{
item
,
value
,
onChange
,
type
=
'radio'
}
=
this
.
props
return
(
<
View
style=
{
g
(
styles
,
'box-item'
)
}
>
<
Title
item=
{
item
}
style=
{
{
alignSelf
:
'flex-left'
}
}
/>
<
View
style=
{
g
(
styles
,
'box-radio'
)
}
>
{
item
.
options
&&
item
.
options
.
map
(
option
=>
{
const
active
=
R
.
includes
(
option
.
value
,
value
||
''
)
return
(
<
TouchableOpacity
style=
{
g
(
styles
,
{
'box-radio__item'
:
true
,
'box-radio__item-active'
:
active
})
}
key=
{
option
.
value
}
activeOpacity=
{
0.8
}
onPress=
{
()
=>
{
if
(
value
===
option
.
value
)
return
onChange
(
item
.
field
,
option
.
value
)
}
}
>
{
active
&&
(
<
Image
style=
{
g
(
styles
,
'box-radio__item-image'
)
}
source=
{
require
(
'../../assets/images/his_ord_sel.png'
)
}
></
Image
>
)
}
<
Text
style=
{
g
(
styles
,
{
'box-radio__item-text'
:
true
,
'box-radio__item-text-active'
:
active
})
}
>
{
option
.
label
}
</
Text
>
</
TouchableOpacity
>
)
})
}
</
View
>
</
View
>
)
}
}
src/components/form/radio.tsx
View file @
71810a43
/*
/*
* @FilePath: /BoneHouse_
Hospital
_APP/src/components/form/radio.tsx
* @FilePath: /BoneHouse_
Business
_APP/src/components/form/radio.tsx
* @Author: peii
* @Author: peii
* @Date: 2021-06-06 16:24:05
* @Date: 2021-06-06 16:24:05
* @Vision: 1.0
* @Vision: 1.0
...
@@ -8,6 +8,8 @@
...
@@ -8,6 +8,8 @@
* @Revision:
* @Revision:
*
*
*/
*/
// @ts-nocheck
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
View
,
Text
,
Image
,
TouchableOpacity
}
from
'react-native'
import
{
View
,
Text
,
Image
,
TouchableOpacity
}
from
'react-native'
import
{
IFormField
,
IOption
}
from
'bonehouse'
import
{
IFormField
,
IOption
}
from
'bonehouse'
...
...
src/components/modals/filter/filter.tsx
View file @
71810a43
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/components/modals/filter/filter.tsx
* @FilePath: /BoneHouse_Business_APP/src/components/modals/filter/filter.tsx
* @Author: peii
* @Author: peii
* @Date: 2021-12-19 10:49:42
* @Date: 2021-12-19 10:49:42
* @LastEditTime: 2021-12-2
0 15:06:08
* @LastEditTime: 2021-12-2
3 16:04:12
* @LastEditors: peii
* @LastEditors: peii
* @Vision: 1.0
* @Vision: 1.0
* @Description: 过滤弹窗
* @Description: 过滤弹窗
...
@@ -18,7 +18,7 @@ import { FieldType } from '../../../enums'
...
@@ -18,7 +18,7 @@ import { FieldType } from '../../../enums'
import
{
TopModal
}
from
'../base/top'
import
{
TopModal
}
from
'../base/top'
import
FormInput
from
'../../form/input'
import
FormInput
from
'../../form/input'
import
FormSelect
from
'../../form/select'
import
FormSelect
from
'../../form/select'
import
FormRadio
from
'../../form/radio'
import
FormRadio
from
'../../form/radio
-filter
'
import
styles
from
'./filter.styl'
import
styles
from
'./filter.styl'
type
IProps
=
{
type
IProps
=
{
...
@@ -41,7 +41,7 @@ const FormComponents = {
...
@@ -41,7 +41,7 @@ const FormComponents = {
[
FieldType
.
RADIO
]:
FormRadio
,
[
FieldType
.
RADIO
]:
FormRadio
,
}
}
export
default
class
Filter
extends
React
.
Component
<
IProps
,
IState
>
{
export
default
class
Filter
Modal
extends
React
.
Component
<
IProps
,
IState
>
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
}
}
...
...
src/pages/settlement/collection.tsx
View file @
71810a43
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/settlement/collection.tsx
* @FilePath: /BoneHouse_Business_APP/src/pages/settlement/collection.tsx
* @Author: peii
* @Author: peii
* @Date: 2021-12-18 16:33:37
* @Date: 2021-12-18 16:33:37
* @LastEditTime: 2021-12-2
1 15:55:57
* @LastEditTime: 2021-12-2
3 15:58:56
* @LastEditors: peii
* @LastEditors: peii
* @Vision: 1.0
* @Vision: 1.0
* @Description: 结算汇总
* @Description: 结算汇总
...
@@ -52,11 +52,23 @@ class SettlementCollection extends React.Component<IProps, IState> {
...
@@ -52,11 +52,23 @@ class SettlementCollection extends React.Component<IProps, IState> {
label
:
'结算单号'
,
label
:
'结算单号'
,
type
:
FieldType
.
TEXT
,
type
:
FieldType
.
TEXT
,
},
},
{
field
:
'status'
,
label
:
'状态'
,
type
:
FieldType
.
RADIO
,
options
:
R
.
map
(
R
.
applySpec
({
value
:
R
.
prop
(
'value_code'
),
label
:
R
.
prop
(
'value_name'
),
}),
)(
this
.
props
.
status
),
},
],
],
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
toggleModalVisible
()
this
.
toggleModalVisible
()
console
.
log
(
this
.
props
.
status
)
}
}
toggleModalVisible
():
void
{
toggleModalVisible
():
void
{
...
@@ -113,7 +125,9 @@ class SettlementCollection extends React.Component<IProps, IState> {
...
@@ -113,7 +125,9 @@ class SettlementCollection extends React.Component<IProps, IState> {
}
}
}
}
const
mapStateToProps
=
state
=>
({})
const
mapStateToProps
=
state
=>
({
status
:
state
.
settlement
.
headerStatus
,
})
const
mapDispatchToProps
=
dispatch
=>
({})
const
mapDispatchToProps
=
dispatch
=>
({})
...
...
src/pages/settlement/components/filter.tsx
View file @
71810a43
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/settlement/components/filter.tsx
* @FilePath: /BoneHouse_Business_APP/src/pages/settlement/components/filter.tsx
* @Author: peii
* @Author: peii
* @Date: 2021-12-19 10:49:42
* @Date: 2021-12-19 10:49:42
* @LastEditTime: 2021-12-2
1 17:35:0
8
* @LastEditTime: 2021-12-2
3 16:04:5
8
* @LastEditors: peii
* @LastEditors: peii
* @Vision: 1.0
* @Vision: 1.0
* @Description: 过滤弹窗
* @Description: 过滤弹窗
...
@@ -17,7 +17,7 @@ import { IFormField } from 'bonehouse'
...
@@ -17,7 +17,7 @@ import { IFormField } from 'bonehouse'
import
api
from
'../../../services/api'
import
api
from
'../../../services/api'
import
{
isNotBlank
,
g
,
getFormItem
}
from
'../../../utils/utils'
import
{
isNotBlank
,
g
,
getFormItem
}
from
'../../../utils/utils'
import
{
FieldType
}
from
'../../../enums'
import
{
FieldType
}
from
'../../../enums'
import
Filter
from
'../../../components/modals/filter/filter'
import
Filter
Modal
from
'../../../components/modals/filter/filter'
import
styles
from
'./filter.styl'
import
styles
from
'./filter.styl'
type
IProps
=
{
type
IProps
=
{
...
@@ -35,7 +35,7 @@ type IState = {
...
@@ -35,7 +35,7 @@ type IState = {
formItems
:
IFormField
[]
formItems
:
IFormField
[]
}
}
class
Filter
Modal
extends
React
.
Component
<
IProps
,
IState
>
{
class
Filter
extends
React
.
Component
<
IProps
,
IState
>
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
onClose
=
this
.
onClose
.
bind
(
this
)
this
.
onClose
=
this
.
onClose
.
bind
(
this
)
...
@@ -61,6 +61,7 @@ class FilterModal extends React.Component<IProps, IState> {
...
@@ -61,6 +61,7 @@ class FilterModal extends React.Component<IProps, IState> {
label
:
this
.
props
.
userInfo
.
person_name
,
label
:
this
.
props
.
userInfo
.
person_name
,
},
},
],
],
rules
:
[{
required
:
true
,
message
:
'请选择客户'
}],
},
},
{
{
field
:
'customer_code'
,
field
:
'customer_code'
,
...
@@ -216,7 +217,7 @@ class FilterModal extends React.Component<IProps, IState> {
...
@@ -216,7 +217,7 @@ class FilterModal extends React.Component<IProps, IState> {
const
{
visible
}
=
this
.
props
const
{
visible
}
=
this
.
props
return
(
return
(
<
Filter
<
Filter
Modal
style=
{
g
(
styles
,
'filter-modal'
)
}
style=
{
g
(
styles
,
'filter-modal'
)
}
visible=
{
visible
}
visible=
{
visible
}
data=
{
data
}
data=
{
data
}
...
@@ -237,4 +238,4 @@ const mapStateToProps = state => ({
...
@@ -237,4 +238,4 @@ const mapStateToProps = state => ({
const
mapDispatchToProps
=
dispatch
=>
({})
const
mapDispatchToProps
=
dispatch
=>
({})
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
Filter
Modal
)
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
Filter
)
src/pages/settlement/index.tsx
View file @
71810a43
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/settlement/index.tsx
* @FilePath: /BoneHouse_Business_APP/src/pages/settlement/index.tsx
* @Author: peii
* @Author: peii
* @Date: 2021-12-18 16:33:37
* @Date: 2021-12-18 16:33:37
* @LastEditTime: 2021-12-23 1
0:58:21
* @LastEditTime: 2021-12-23 1
5:16:06
* @LastEditors: peii
* @LastEditors: peii
* @Vision: 1.0
* @Vision: 1.0
* @Description: 结算确认首页
* @Description: 结算确认首页
...
@@ -61,8 +61,7 @@ class Settlement extends React.Component<IProps, IState> {
...
@@ -61,8 +61,7 @@ class Settlement extends React.Component<IProps, IState> {
async
getData
(
args
):
void
{
async
getData
(
args
):
void
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
// 确认页面只过滤出已输入的那些
// 确认页面只过滤出已输入的那些
// TODO:
args
.
status
=
'ENTERED'
// args.header_status = 'ENTERED'
const
res
=
await
api
.
getSettlements
(
args
)
const
res
=
await
api
.
getSettlements
(
args
)
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
...
...
peii
@peii
mentioned in commit
479ef54e
Jan 05, 2022
mentioned in commit
479ef54e
mentioned in commit 479ef54ea25fc4f450f374de65506ca754c782b7
Toggle commit list
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