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
1e03a8c7
authored
Jan 04, 2022
by
peii
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
分销开票对接
(cherry picked from commit
e1710fdc
)
parent
53607081
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 @
1e03a8c7
...
...
@@ -57,3 +57,14 @@
&__text
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 @
1e03a8c7
...
...
@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/invoice/distribution/index.tsx
* @Author: peii
* @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
* @Vision: 1.0
* @Description: 分销开票申请
...
...
@@ -11,7 +11,7 @@
// @ts-nocheck
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
*
as
R
from
'ramda'
import
{
INavigation
}
from
'navigation'
...
...
@@ -63,6 +63,7 @@ class Distribution extends Component<IProps, IState> {
sum
:
0
,
},
customers
:
[],
submitting
:
false
,
}
componentDidMount
()
{
...
...
@@ -275,15 +276,17 @@ class Distribution extends Component<IProps, IState> {
lines
,
}
this
.
setState
({
submitting
:
true
})
const
res
=
await
api
.
postArInvoiceCreate
(
params
)
this
.
setState
({
submitting
:
false
})
if
(
res
.
error_code
)
return
show
(
'申请提交成功'
)
this
.
props
.
navigation
.
pop
()
}
render
()
{
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
(
<
View
style=
{
g
(
styles
,
'container'
)
}
>
...
...
@@ -331,13 +334,20 @@ class Distribution extends Component<IProps, IState> {
<
Text
style=
{
g
(
styles
,
'body-ft-statistic__text'
)
}
>
申请开票总金额:
{
statistic
.
sum
}
</
Text
>
</
View
>
<
View
style=
{
g
(
styles
,
'body-ft-btn'
)
}
>
<
TouchableOpacity
style=
{
g
(
styles
,
'btn'
,
'btn-submit'
)
}
activeOpacity=
{
0.8
}
onPress=
{
this
.
submitHandler
}
>
<
Text
style=
{
g
(
styles
,
'btn__text'
,
'btn-submit__text'
)
}
>
申请开票
</
Text
>
</
TouchableOpacity
>
{
!
submitting
?
(
<
TouchableOpacity
style=
{
g
(
styles
,
'btn'
,
'btn-submit'
)
}
activeOpacity=
{
0.8
}
onPress=
{
this
.
submitHandler
}
>
<
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
style={g(styles, 'btn', 'btn-select')}
activeOpacity={0.8}
...
...
src/services/baseApi.ts
View file @
1e03a8c7
...
...
@@ -123,6 +123,9 @@ export const request = (args: Partial<RequestConfig>) => {
return
doRequest
()
}
failHandler
(
e
,
pid
)
if
(
!
e
.
error_code
)
{
e
.
error_code
=
e
.
status
}
reject
(
e
)
})
}
...
...
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