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
e1710fdc
authored
Jan 04, 2022
by
peii
1
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
分销开票对接
parent
d4f7fa46
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
12 deletions
src/pages/invoice/distribution/index.styl
src/pages/invoice/distribution/index.tsx
src/services/baseApi.ts
src/pages/invoice/distribution/index.styl
View file @
e1710fdc
...
@@ -57,3 +57,14 @@
...
@@ -57,3 +57,14 @@
&__text
&__text
color #444
color #444
&-disabled
@extend .row
background-color #ddd
width 100%
&__text
color #999
font-size 18px
font-family font_family_regular
margin-left 8px
src/pages/invoice/distribution/index.tsx
View file @
e1710fdc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/invoice/distribution/index.tsx
* @FilePath: /BoneHouse_Business_APP/src/pages/invoice/distribution/index.tsx
* @Author: peii
* @Author: peii
* @Date: 2021-12-27 09:59:21
* @Date: 2021-12-27 09:59:21
* @LastEditTime: 202
1-12-31 15:55:36
* @LastEditTime: 202
2-01-04 10:53:48
* @LastEditors: peii
* @LastEditors: peii
* @Vision: 1.0
* @Vision: 1.0
* @Description: 分销开票申请
* @Description: 分销开票申请
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
// @ts-nocheck
// @ts-nocheck
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
View
,
Text
,
TouchableOpacity
,
FlatList
,
Image
}
from
'react-native'
import
{
View
,
Text
,
TouchableOpacity
,
Image
,
ActivityIndicator
}
from
'react-native'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
*
as
R
from
'ramda'
import
*
as
R
from
'ramda'
import
{
INavigation
}
from
'navigation'
import
{
INavigation
}
from
'navigation'
...
@@ -63,6 +63,7 @@ class Distribution extends Component<IProps, IState> {
...
@@ -63,6 +63,7 @@ class Distribution extends Component<IProps, IState> {
sum
:
0
,
sum
:
0
,
},
},
customers
:
[],
customers
:
[],
submitting
:
false
,
}
}
componentDidMount
()
{
componentDidMount
()
{
...
@@ -275,15 +276,17 @@ class Distribution extends Component<IProps, IState> {
...
@@ -275,15 +276,17 @@ class Distribution extends Component<IProps, IState> {
lines
,
lines
,
}
}
this
.
setState
({
submitting
:
true
})
const
res
=
await
api
.
postArInvoiceCreate
(
params
)
const
res
=
await
api
.
postArInvoiceCreate
(
params
)
this
.
setState
({
submitting
:
false
})
if
(
res
.
error_code
)
return
if
(
res
.
error_code
)
return
show
(
'申请提交成功'
)
this
.
props
.
navigation
.
pop
()
}
}
render
()
{
render
()
{
const
title
=
this
.
props
.
navigation
.
getParam
(
'title'
)
const
title
=
this
.
props
.
navigation
.
getParam
(
'title'
)
const
{
visible
,
loading
,
data
,
fresh
,
statistic
}
=
this
.
state
const
{
visible
,
loading
,
data
,
fresh
,
statistic
,
submitting
}
=
this
.
state
return
(
return
(
<
View
style=
{
g
(
styles
,
'container'
)
}
>
<
View
style=
{
g
(
styles
,
'container'
)
}
>
...
@@ -331,13 +334,20 @@ class Distribution extends Component<IProps, IState> {
...
@@ -331,13 +334,20 @@ class Distribution extends Component<IProps, IState> {
<
Text
style=
{
g
(
styles
,
'body-ft-statistic__text'
)
}
>
申请开票总金额:
{
statistic
.
sum
}
</
Text
>
<
Text
style=
{
g
(
styles
,
'body-ft-statistic__text'
)
}
>
申请开票总金额:
{
statistic
.
sum
}
</
Text
>
</
View
>
</
View
>
<
View
style=
{
g
(
styles
,
'body-ft-btn'
)
}
>
<
View
style=
{
g
(
styles
,
'body-ft-btn'
)
}
>
<
TouchableOpacity
{
!
submitting
?
(
style=
{
g
(
styles
,
'btn'
,
'btn-submit'
)
}
<
TouchableOpacity
activeOpacity=
{
0.8
}
style=
{
g
(
styles
,
'btn'
,
'btn-submit'
)
}
onPress=
{
this
.
submitHandler
}
activeOpacity=
{
0.8
}
>
onPress=
{
this
.
submitHandler
}
<
Text
style=
{
g
(
styles
,
'btn__text'
,
'btn-submit__text'
)
}
>
申请开票
</
Text
>
>
</
TouchableOpacity
>
<
Text
style=
{
g
(
styles
,
'btn__text'
,
'btn-submit__text'
)
}
>
申请开票
</
Text
>
</
TouchableOpacity
>
)
:
(
<
TouchableOpacity
style=
{
g
(
styles
,
'btn'
,
'btn-disabled'
)
}
activeOpacity=
{
1
}
>
<
ActivityIndicator
style=
{
g
(
styles
,
'btn-indicator'
)
}
></
ActivityIndicator
>
<
Text
style=
{
g
(
styles
,
'btn__text'
,
'btn-disabled__text'
)
}
>
申请开票
</
Text
>
</
TouchableOpacity
>
)
}
{
/* <TouchableOpacity
{
/* <TouchableOpacity
style={g(styles, 'btn', 'btn-select')}
style={g(styles, 'btn', 'btn-select')}
activeOpacity={0.8}
activeOpacity={0.8}
...
...
src/services/baseApi.ts
View file @
e1710fdc
...
@@ -123,6 +123,9 @@ export const request = (args: Partial<RequestConfig>) => {
...
@@ -123,6 +123,9 @@ export const request = (args: Partial<RequestConfig>) => {
return
doRequest
()
return
doRequest
()
}
}
failHandler
(
e
,
pid
)
failHandler
(
e
,
pid
)
if
(
!
e
.
error_code
)
{
e
.
error_code
=
e
.
status
}
reject
(
e
)
reject
(
e
)
})
})
}
}
...
...
peii
@peii
mentioned in commit
1e03a8c7
Jan 05, 2022
mentioned in commit
1e03a8c7
mentioned in commit 1e03a8c7e5d386e8bf99e4a859303c4363d8789c
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