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
shenshaokai
jinfa-platform
Commits
f18a0db9
Commit
f18a0db9
authored
Feb 03, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改首页,结算开票
parent
2ab6242a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
52 deletions
+101
-52
index.ts
config/routes/index.ts
+8
-8
index.tsx
src/pages/balance/accountsReceivable/invoice/index.tsx
+1
-0
InvoiceDrawer.tsx
src/pages/balance/components/InvoiceCreate/InvoiceDrawer.tsx
+88
-42
index.tsx
src/pages/home/components/RecentVisit/index.tsx
+4
-2
No files found.
config/routes/index.ts
View file @
f18a0db9
...
...
@@ -34,14 +34,14 @@ const memberCenterRoute = {
path
:
'/memberCenter/channelAbility'
,
redirect
:
'/memberCenter/channelAbility/infoManage'
},
{
path
:
`/memberCenter/home`
,
name
:
'home'
,
icon
:
'home'
,
key
:
'home'
,
// component: '@/pages/index',
component
:
'@/pages/home'
,
},
//
{
//
path: `/memberCenter/home`,
//
name: 'home',
//
icon: 'home',
//
key: 'home',
//
// component: '@/pages/index',
//
component: '@/pages/home',
//
},
...
asyncRoutes
,
{
path
:
'/memberCenter/noAuth'
,
...
...
src/pages/balance/accountsReceivable/invoice/index.tsx
View file @
f18a0db9
...
...
@@ -60,6 +60,7 @@ const SettlementList = () => {
setActiveData
({
id
:
record
.
id
,
type
:
record
.
invoiceStatus
,
settlementOrderType
:
record
.
settlementOrderType
,
// payRoleId: record.payRoleId,
// payMemberId: record.payMemberId
})
...
...
src/pages/balance/components/InvoiceCreate/InvoiceDrawer.tsx
View file @
f18a0db9
...
...
@@ -27,6 +27,7 @@ interface Iprops {
width
:
number
,
type
:
number
,
// 0 -> 开票, 1-> 查看
id
:
string
,
// 开票管理id,
settlementOrderType
:
1
|
2
|
3
|
4
|
5
,
// 1-生产通知单,2-物流单,3-订单,4-积分订单,5-退货申请单
// payRoleId: number,
// payMemberId: number,
onCancel
:
()
=>
void
,
...
...
@@ -53,8 +54,8 @@ const columns = [
]
const
InvoiceDrawer
:
React
.
FC
<
Iprops
>
=
(
props
)
=>
{
const
{
visible
,
title
,
onCancel
,
width
,
type
,
id
}
=
props
;
const
[
invoiceInfo
,
setInvoiceInfo
]
=
useState
<
InvoiceInfoProps
>
(
null
);
const
{
visible
,
title
,
onCancel
,
width
,
type
,
id
,
settlementOrderType
}
=
props
;
const
[
invoiceInfo
,
setInvoiceInfo
]
=
useState
<
any
[]
>
([]
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
<
boolean
>
(
false
)
const
handleSubmit
=
()
=>
{
// // 如果当前type==0为开票, 1为查看,那么直接关闭
...
...
@@ -74,9 +75,33 @@ const InvoiceDrawer: React.FC<Iprops> = (props) => {
})
return
;
}
const
{
kindName
,
typeName
,
...
rest
}
=
invoiceInfo
const
proveList
=
value
.
list
.
map
((
item
,
key
)
=>
{
return
{
number
:
item
.
number
,
remark
:
item
.
remark
,
invoiceDate
:
item
.
invoiceDate
.
format
(
'YYYY-MM-DD'
)}
})
if
(
settlementOrderType
===
5
)
{
const
postDataList
=
{
receiptInvoiceId
:
parseInt
(
id
),
addList
:
invoiceInfo
.
map
((
_item
)
=>
{
const
{
kindName
,
typeName
,
...
rest
}
=
_item
;
return
{
...
rest
,
kind
:
kindName
==
'增值税普通发票'
?
1
:
2
,
type
:
typeName
==
'企业'
?
1
:
2
,
proveList
:
[]
}
})
}
PublicApi
.
postSettleAccountsMemberSettlementInvoiceByReturn
(
postDataList
)
.
then
(({
code
,
data
})
=>
{
if
(
code
===
1000
)
{
setSubmitLoading
(
false
)
props
.
refresh
();
onCancel
();
}
})
return
;
}
const
{
kindName
,
typeName
,
...
rest
}
=
invoiceInfo
[
0
]
const
postData
=
{
...
rest
,
proveList
:
proveList
,
...
...
@@ -99,17 +124,26 @@ const InvoiceDrawer: React.FC<Iprops> = (props) => {
useEffect
(()
=>
{
if
(
props
.
visible
)
{
if
(
settlementOrderType
===
5
)
{
PublicApi
.
getSettleAccountsMemberSettlementGetReturnInvoiceProveDetail
({
id
:
id
})
.
then
(({
code
,
data
})
=>
{
if
(
code
===
1000
)
{
console
.
log
(
data
);
setInvoiceInfo
(
data
)
}
})
return
;
}
///settle/accounts/member/settlement/getInvoiceProveDetail
PublicApi
.
getSettleAccountsMemberSettlementGetInvoiceProveDetail
({
id
:
id
})
.
then
((
data
)
=>
{
if
(
data
.
code
===
1000
)
{
setInvoiceInfo
(
data
.
data
)
setInvoiceInfo
(
[
data
.
data
]
)
}
})
}
},
[
id
,
visible
])
const
tableList
=
invoiceInfo
?.
proveList
?.
map
((
item
,
key
)
=>
({...
item
,
id
:
key
}));
},
[
id
,
visible
,
settlementOrderType
])
// const tableList = invoiceInfo?.proveList?.map((item, key) => ({...item, id: key}));
const
renderFooter
=
()
=>
{
if
(
type
===
TypeEnum
.
view
)
{
...
...
@@ -139,43 +173,55 @@ const InvoiceDrawer: React.FC<Iprops> = (props) => {
footer=
{
renderFooter
()
}
>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
}
}
>
<
InvoiceInfo
infos=
{
invoiceInfo
}
/>
{
type
===
TypeEnum
.
edit
?
(
<>
<
div
className=
{
styles
.
formHeader
}
>
<
div
className=
{
styles
.
invoiceNum
}
>
发票号码
</
div
>
<
div
className=
{
styles
.
invoiceDate
}
>
开票日期
</
div
>
<
div
>
备注
</
div
>
</
div
>
{
/* getPopupContainer={triggerNode => { console.log(triggerNode, triggerNode.parentElement); return triggerNode.parentNode}} */
}
<
SchemaForm
onSubmit=
{
handleForm
}
actions=
{
formActions
}
components=
{
{
InvoiceArray
,
Input
,
DatePicker
}
}
>
<
Field
name=
"list"
type=
"array"
x
-
component=
"InvoiceArray"
>
<
Field
type=
"object"
>
<
Field
name=
"number"
x
-
component=
"Input"
x
-
rules=
{
[{
required
:
true
,
message
:
'请填写发票号'
}]
}
/>
<
Field
name=
"invoiceDate"
x
-
component
-
props=
{
{
getPopupContainer
:
(
triggernode
)
=>
triggernode
.
parentElement
}
}
x
-
component=
"DatePicker"
x
-
rules=
{
[{
required
:
true
,
message
:
'请选择发票日期'
}]
}
/>
<
Field
name=
"remark"
x
-
component=
"Input"
x
-
component
-
props=
{
{
style
:
{
width
:
'240px'
}}
}
/>
</
Field
>
</
Field
>
</
SchemaForm
>
</>
invoiceInfo
.
map
((
item
,
unique
)
=>
{
const
infos
=
item
;
const
tableList
=
item
?.
proveList
?.
map
((
item
,
key
)
=>
({...
item
,
id
:
key
}));
return
(
<
div
key=
{
unique
}
>
<
InvoiceInfo
infos=
{
infos
}
/>
{
type
===
TypeEnum
.
edit
?
(
<>
<
div
className=
{
styles
.
formHeader
}
>
<
div
className=
{
styles
.
invoiceNum
}
>
发票号码
<
span
style=
{
{
color
:
"#ff4d4f"
}
}
>
*
</
span
></
div
>
<
div
className=
{
styles
.
invoiceDate
}
>
开票日期
<
span
style=
{
{
color
:
"#ff4d4f"
}
}
>
*
</
span
></
div
>
<
div
>
备注
</
div
>
</
div
>
{
/* getPopupContainer={triggerNode => { console.log(triggerNode, triggerNode.parentElement); return triggerNode.parentNode}} */
}
<
SchemaForm
onSubmit=
{
handleForm
}
actions=
{
formActions
}
components=
{
{
InvoiceArray
,
Input
,
DatePicker
}
}
name=
{
`form-${unique}`
}
>
{
/* <Field name="infoId" x-component="Input" display={false} default={unique} /> */
}
<
Field
name=
"list"
type=
"array"
x
-
component=
"InvoiceArray"
>
<
Field
type=
"object"
>
<
Field
name=
"number"
x
-
component=
"Input"
x
-
rules=
{
[{
required
:
true
,
message
:
'请填写发票号'
}]
}
/>
<
Field
name=
"invoiceDate"
x
-
component
-
props=
{
{
getPopupContainer
:
(
triggernode
)
=>
triggernode
.
parentElement
}
}
x
-
component=
"DatePicker"
x
-
rules=
{
[{
required
:
true
,
message
:
'请选择发票日期'
}]
}
/>
<
Field
name=
"remark"
x
-
component=
"Input"
x
-
component
-
props=
{
{
style
:
{
width
:
'240px'
}}
}
/>
</
Field
>
</
Field
>
</
SchemaForm
>
</>
)
:
(
<
Table
columns=
{
columns
}
dataSource=
{
tableList
}
rowKey=
{
record
=>
record
.
id
}
/>
)
}
</
div
>
)
:
(
<
Table
columns=
{
columns
}
dataSource=
{
tableList
}
rowKey=
{
record
=>
record
.
id
}
/>
)
})
}
</
div
>
</
Drawer
>
)
...
...
src/pages/home/components/RecentVisit/index.tsx
View file @
f18a0db9
...
...
@@ -15,11 +15,13 @@ const RecentVisit: React.FC<Iprops> = () => {
<
div
className=
{
styles
.
body
}
>
{
Object
.
keys
(
recentVisit
).
map
((
item
)
=>
{
const
menuName
=
item
.
split
(
"."
);
const
length
=
menuName
.
length
return
(
<
Tooltip
key=
{
item
}
placement=
"top"
title=
{
menu
_zh
[
item
]
}
>
<
Tooltip
key=
{
item
}
placement=
"top"
title=
{
menu
Name
[
length
-
1
]
}
>
<
div
className=
{
styles
.
item
}
>
<
Link
key=
{
item
}
to=
{
recentVisit
[
item
]
}
>
{
menu
_zh
[
item
]
}
{
menu
Name
[
length
-
1
]
}
</
Link
>
</
div
>
</
Tooltip
>
...
...
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