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
黄庭坚
jinfa-platform
Commits
0b925212
Commit
0b925212
authored
Jan 11, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
8687048c
01193fb1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
index.tsx
src/pages/balance/accountsReceivable/invoice/index.tsx
+11
-3
invoiceDrawerInfo.tsx
...es/balance/components/InvoiceCreate/invoiceDrawerInfo.tsx
+5
-4
No files found.
src/pages/balance/accountsReceivable/invoice/index.tsx
View file @
0b925212
...
@@ -14,7 +14,7 @@ import { schema } from './schema';
...
@@ -14,7 +14,7 @@ import { schema } from './schema';
import
StatusTag
,
{
STATUS_TYPE
}
from
'@/components/StatusTag'
import
StatusTag
,
{
STATUS_TYPE
}
from
'@/components/StatusTag'
import
{
fetchOptions
}
from
'../../common'
;
import
{
fetchOptions
}
from
'../../common'
;
import
useSetSearchValueInTable
from
'@/hooks/useSetSearchValueInTable'
;
import
useSetSearchValueInTable
from
'@/hooks/useSetSearchValueInTable'
;
import
{
numFormat
,
priceFormat
}
from
'@/utils/numberFomat'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
{
import
{
getSettleAccountsCommonGetPayStatus
,
getSettleAccountsCommonGetPayStatus
,
getSettleAccountsCommonGetReceiptInvoiceStatus
,
getSettleAccountsCommonGetReceiptInvoiceStatus
,
...
@@ -44,6 +44,7 @@ const SettlementList: React.FC = () => {
...
@@ -44,6 +44,7 @@ const SettlementList: React.FC = () => {
const
[
invoiceInfo
,
setInvoiceInfo
]
=
useState
<
any
>
(
null
)
const
[
invoiceInfo
,
setInvoiceInfo
]
=
useState
<
any
>
(
null
)
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
([])
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
([])
const
[
selectedRows
,
setSelectedRows
]
=
useState
<
any
>
([])
const
[
selectedRows
,
setSelectedRows
]
=
useState
<
any
>
([])
const
[
submitLoading
,
setSubmitLoading
]
=
useState
<
boolean
>
(
false
)
/**
/**
* 获取开票管理列表
* 获取开票管理列表
* @param params
* @param params
...
@@ -119,16 +120,18 @@ const SettlementList: React.FC = () => {
...
@@ -119,16 +120,18 @@ const SettlementList: React.FC = () => {
res
[
item
]
=
array
res
[
item
]
=
array
})
})
/** 批量开票 */
/** 批量开票 */
if
(
invoiceInfo
[
0
].
receiptInvoiceIds
.
length
>
0
)
{
if
(
invoiceInfo
?.[
0
]?.
receiptInvoiceIds
?
.
length
>
0
)
{
const
_postData
=
{
...
invoiceInfo
[
0
],
proveList
:
res
[
`list-0`
]
};
const
_postData
=
{
...
invoiceInfo
[
0
],
proveList
:
res
[
`list-0`
]
};
setSubmitLoading
(
true
);
postSettleAccountsMemberSettlementBatchInvoiceProve
(
_postData
).
then
((
res
)
=>
{
postSettleAccountsMemberSettlementBatchInvoiceProve
(
_postData
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
setSelectedRows
([]);
setSelectedRows
([]);
setSelectedRowKeys
([]);
setSelectedRowKeys
([]);
formActions
.
submit
();
formActions
.
submit
();
setVisible
(
false
);
setVisible
(
false
);
setSubmitLoading
(
false
);
}
}
})
})
.
catch
(()
=>
{
setSubmitLoading
(
false
)})
return
;
return
;
}
}
/** 退货类型 */
/** 退货类型 */
...
@@ -147,7 +150,9 @@ const SettlementList: React.FC = () => {
...
@@ -147,7 +150,9 @@ const SettlementList: React.FC = () => {
}
}
})
})
}
}
setSubmitLoading
(
true
);
const
{
data
,
code
,
message
:
msg
}
=
await
postSettleAccountsMemberSettlementInvoiceByReturn
(
postDataList
);
const
{
data
,
code
,
message
:
msg
}
=
await
postSettleAccountsMemberSettlementInvoiceByReturn
(
postDataList
);
setSubmitLoading
(
false
);
if
(
code
!==
1000
)
{
if
(
code
!==
1000
)
{
message
.
error
(
msg
);
message
.
error
(
msg
);
return
return
...
@@ -165,7 +170,9 @@ const SettlementList: React.FC = () => {
...
@@ -165,7 +170,9 @@ const SettlementList: React.FC = () => {
// type: typeName == intl.formatMessage({id: 'balance.qiye'}) ? 1 : 2,
// type: typeName == intl.formatMessage({id: 'balance.qiye'}) ? 1 : 2,
proveList
:
res
[
`list-0`
]
proveList
:
res
[
`list-0`
]
}
}
setSubmitLoading
(
true
);
const
{
data
,
code
,
message
:
msg
}
=
await
postSettleAccountsMemberSettlementInvoiceProve
(
defaultPostData
);
const
{
data
,
code
,
message
:
msg
}
=
await
postSettleAccountsMemberSettlementInvoiceProve
(
defaultPostData
);
setSubmitLoading
(
false
);
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
setVisible
(
false
)
setVisible
(
false
)
formActions
.
submit
();
formActions
.
submit
();
...
@@ -410,6 +417,7 @@ const SettlementList: React.FC = () => {
...
@@ -410,6 +417,7 @@ const SettlementList: React.FC = () => {
invoiceInfoData=
{
invoiceInfo
}
invoiceInfoData=
{
invoiceInfo
}
onCancel=
{
handleOnCancel
}
onCancel=
{
handleOnCancel
}
onSubmit=
{
handleForm
}
onSubmit=
{
handleForm
}
onSubmitLoading=
{
submitLoading
}
/>
/>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
...
...
src/pages/balance/components/InvoiceCreate/invoiceDrawerInfo.tsx
View file @
0b925212
...
@@ -17,6 +17,7 @@ const formActions = createFormActions();
...
@@ -17,6 +17,7 @@ const formActions = createFormActions();
interface
Iprops
{
interface
Iprops
{
visible
:
boolean
,
visible
:
boolean
,
onCancel
:
()
=>
void
,
onCancel
:
()
=>
void
,
onSubmitLoading
?:
boolean
,
onSubmit
?:
(
values
:
any
)
=>
void
,
onSubmit
?:
(
values
:
any
)
=>
void
,
mode
?:
'edit'
|
'view'
,
mode
?:
'edit'
|
'view'
,
invoiceInfoData
:
any
invoiceInfoData
:
any
...
@@ -30,7 +31,7 @@ type ProveListType = {
...
@@ -30,7 +31,7 @@ type ProveListType = {
}
}
const
InvoiceDrawerInfo
:
React
.
FC
<
Iprops
>
=
(
props
:
Iprops
)
=>
{
const
InvoiceDrawerInfo
:
React
.
FC
<
Iprops
>
=
(
props
:
Iprops
)
=>
{
const
{
visible
,
onCancel
,
invoiceInfoData
,
onSubmit
,
mode
}
=
props
;
const
{
visible
,
onCancel
,
invoiceInfoData
,
onSubmit
,
mode
,
onSubmitLoading
=
false
}
=
props
;
const
[
initialValue
,
setInitialValue
]
=
useState
<
{
[
key
:
string
]:
ProveListType
}
>
({});
const
[
initialValue
,
setInitialValue
]
=
useState
<
{
[
key
:
string
]:
ProveListType
}
>
({});
const
disabled
=
useMemo
(()
=>
mode
===
'view'
,
[
mode
])
const
disabled
=
useMemo
(()
=>
mode
===
'view'
,
[
mode
])
...
@@ -44,7 +45,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
...
@@ -44,7 +45,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
<
Button
onClick=
{
handleCancel
}
style=
{
{
marginRight
:
8
}
}
>
<
Button
onClick=
{
handleCancel
}
style=
{
{
marginRight
:
8
}
}
>
{
intl
.
formatMessage
({
id
:
'balance.components.invoiceCreate.invoiceDrawer.renderFooter.button.1'
})
}
{
intl
.
formatMessage
({
id
:
'balance.components.invoiceCreate.invoiceDrawer.renderFooter.button.1'
})
}
</
Button
>
</
Button
>
<
Button
onClick=
{
()
=>
formActions
.
submit
()
}
type=
"primary"
>
<
Button
onClick=
{
()
=>
formActions
.
submit
()
}
loading=
{
onSubmitLoading
}
type=
"primary"
>
{
intl
.
formatMessage
({
id
:
'balance.components.invoiceCreate.invoiceDrawer.renderFooter.button.2'
})
}
{
intl
.
formatMessage
({
id
:
'balance.components.invoiceCreate.invoiceDrawer.renderFooter.button.2'
})
}
</
Button
>
</
Button
>
</
div
>
</
div
>
...
@@ -81,7 +82,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
...
@@ -81,7 +82,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
onSubmit=
{
handleSubmit
}
onSubmit=
{
handleSubmit
}
components=
{
{
ArrayCustom
:
ArrayList
,
Input
:
Input
,
DatePicker
,
InvoiceInfo
}
}
components=
{
{
ArrayCustom
:
ArrayList
,
Input
:
Input
,
DatePicker
,
InvoiceInfo
}
}
actions=
{
formActions
}
actions=
{
formActions
}
// editable={mode === 'edit'}
// editable={mode === 'edit'}
>
>
{
{
invoiceInfoData
?.
map
((
_item
,
key
)
=>
{
invoiceInfoData
?.
map
((
_item
,
key
)
=>
{
...
@@ -160,7 +161,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
...
@@ -160,7 +161,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
}
}
}
}
x
-
rules=
{
x
-
rules=
{
[
[
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'balance.qingtianxiekaipiaojine'
})
}
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'balance.qingtianxiekaipiaojine'
})
}
]
]
}
}
/>
/>
...
...
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