Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
b27ffdf1
Commit
b27ffdf1
authored
Jul 08, 2021
by
季圣华
Browse files
优化客户和供应商的对账单
parent
1149ada4
Changes
24
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/financial/modules/MoneyInModal.vue
View file @
b27ffdf1
...
...
@@ -36,7 +36,7 @@
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"单据日期"
>
<j-date
v-decorator=
"['billTime']"
:show-time=
"true"
/>
<j-date
v-decorator=
"['billTime'
, validatorRules.billTime
]"
:show-time=
"true"
/>
</a-form-item>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
...
...
@@ -172,6 +172,9 @@
handsPersonId
:{
rules
:
[{
required
:
true
,
message
:
'
请选择经手人!
'
}]
},
billTime
:{
rules
:
[{
required
:
true
,
message
:
'
请选择单据日期!
'
}]
},
accountId
:{
rules
:
[{
required
:
true
,
message
:
'
请选择收款账户!
'
}]
},
...
...
jshERP-web/src/views/financial/modules/MoneyOutModal.vue
View file @
b27ffdf1
...
...
@@ -36,7 +36,7 @@
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"单据日期"
>
<j-date
v-decorator=
"['billTime']"
:show-time=
"true"
/>
<j-date
v-decorator=
"['billTime'
, validatorRules.billTime
]"
:show-time=
"true"
/>
</a-form-item>
</a-col>
<a-col
:lg=
"6"
:md=
"12"
:sm=
"24"
>
...
...
@@ -172,6 +172,9 @@
handsPersonId
:{
rules
:
[{
required
:
true
,
message
:
'
请选择经手人!
'
}]
},
billTime
:{
rules
:
[{
required
:
true
,
message
:
'
请选择单据日期!
'
}]
},
accountId
:{
rules
:
[{
required
:
true
,
message
:
'
请选择付款账户!
'
}]
},
...
...
jshERP-web/src/views/report/CustomerAccount.vue
View file @
b27ffdf1
...
...
@@ -27,7 +27,7 @@
/>
</a-form-item>
</a-col>
<a-col
:md=
"
4
"
:sm=
"24"
>
<a-col
:md=
"
3
"
:sm=
"24"
>
<span
style=
"float: left;overflow: hidden;"
class=
"table-page-search-submitButtons"
>
<a-button
type=
"primary"
@
click=
"searchQuery"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
v-print=
"'#reportPrint'"
type=
"primary"
icon=
"printer"
>
打印
</a-button>
...
...
@@ -35,7 +35,7 @@
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item>
{{
firstTotal
}}
{{
lastTotal
}}
{{
pleaseSelect
}}
{{
firstTotal
}}
{{
lastTotal
}}
</a-form-item>
</a-col>
</a-row>
...
...
@@ -71,7 +71,8 @@
import
FinancialDetail
from
'
../financial/dialog/FinancialDetail
'
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
{
getNowFormatMonth
}
from
'
@/utils/util
'
;
import
{
findBySelectCus
,
findSupplierById
,
findDepotHeadTotalPay
,
findAccountHeadTotalPay
,
findBillDetailByNumber
,
findFinancialDetailByNumber
}
from
'
@/api/api
'
import
{
getAction
}
from
'
@/api/manage
'
import
{
findBySelectCus
,
findBillDetailByNumber
,
findFinancialDetailByNumber
}
from
'
@/api/api
'
import
JEllipsis
from
'
@/components/jeecg/JEllipsis
'
import
moment
from
'
moment
'
export
default
{
...
...
@@ -97,7 +98,6 @@
supList
:
[],
firstTotal
:
''
,
lastTotal
:
''
,
pleaseSelect
:
'
(请选择客户)
'
,
tabKey
:
"
1
"
,
// 表头
columns
:
[
...
...
@@ -160,40 +160,6 @@
this
.
queryParam
.
beginTime
=
dateString
[
0
];
this
.
queryParam
.
endTime
=
dateString
[
1
];
},
initTotal
(
prefix
,
time
,
type
)
{
findSupplierById
({
supplierId
:
this
.
queryParam
.
organId
}).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
&&
res
.
data
[
0
])
{
let
beginNeedGet
=
res
.
data
[
0
].
BeginNeedGet
;
let
beginNeedPay
=
res
.
data
[
0
].
BeginNeedPay
;
findDepotHeadTotalPay
({
supplierId
:
this
.
queryParam
.
organId
,
endTime
:
time
,
supType
:
"
customer
"
}).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
&&
res
.
data
.
rows
)
{
let
moneyA
=
res
.
data
.
rows
.
getAllMoney
.
toFixed
(
2
)
-
0
;
findAccountHeadTotalPay
({
supplierId
:
this
.
queryParam
.
organId
,
endTime
:
time
,
supType
:
"
customer
"
}).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
&&
res
.
data
.
rows
)
{
let
moneyB
=
res
.
data
.
rows
.
getAllMoney
.
toFixed
(
2
)
-
0
;
let
money
=
moneyA
+
moneyB
;
let
moneyBeginNeedGet
=
beginNeedGet
-
0
;
//期初应收
let
moneyBeginNeedPay
=
beginNeedPay
-
0
;
//期初应付
money
=
(
money
+
moneyBeginNeedGet
-
moneyBeginNeedPay
).
toFixed
(
2
);
if
(
type
===
'
first
'
)
{
this
.
firstTotal
=
prefix
+
money
+
"
,
"
}
else
if
(
type
===
'
last
'
)
{
this
.
lastTotal
=
prefix
+
money
}
}
})
}
})
}
})
},
initStatistics
()
{
if
(
this
.
queryParam
.
organId
)
{
this
.
initTotal
(
'
期初应收:
'
,
this
.
queryParam
.
beginTime
,
'
first
'
)
this
.
initTotal
(
'
期末应收:
'
,
this
.
queryParam
.
endTime
,
'
last
'
)
this
.
pleaseSelect
=
''
}
},
myHandleDetail
(
record
)
{
if
(
record
.
type
===
'
收入
'
||
record
.
type
===
'
收款
'
)
{
findFinancialDetailByNumber
({
billNo
:
record
.
number
}).
then
((
res
)
=>
{
...
...
@@ -211,12 +177,33 @@
})
}
},
loadData
(
arg
)
{
//加载数据 若传入参数1则加载第一页的内容
if
(
arg
===
1
)
{
this
.
ipagination
.
current
=
1
;
}
let
params
=
this
.
getQueryParams
();
//查询条件
this
.
loading
=
true
;
getAction
(
this
.
url
.
list
,
params
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
dataSource
=
res
.
data
.
rows
;
this
.
ipagination
.
total
=
res
.
data
.
total
;
if
(
this
.
queryParam
.
organId
)
{
this
.
firstTotal
=
'
期初应收:
'
+
res
.
data
.
firstMoney
+
"
,
"
this
.
lastTotal
=
'
期末应收:
'
+
res
.
data
.
lastMoney
}
}
if
(
res
.
code
===
510
){
this
.
$message
.
warning
(
res
.
data
)
}
this
.
loading
=
false
;
})
},
searchQuery
()
{
if
(
this
.
queryParam
.
beginTime
==
''
||
this
.
queryParam
.
endTime
==
''
){
if
(
this
.
queryParam
.
beginTime
==
=
''
||
this
.
queryParam
.
endTime
==
=
''
){
this
.
$message
.
warning
(
'
请选择单据日期!
'
)
}
else
{
this
.
loadData
(
1
);
this
.
initStatistics
();
}
}
}
...
...
jshERP-web/src/views/report/VendorAccount.vue
View file @
b27ffdf1
...
...
@@ -27,7 +27,7 @@
/>
</a-form-item>
</a-col>
<a-col
:md=
"
4
"
:sm=
"24"
>
<a-col
:md=
"
3
"
:sm=
"24"
>
<span
style=
"float: left;overflow: hidden;"
class=
"table-page-search-submitButtons"
>
<a-button
type=
"primary"
@
click=
"searchQuery"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
v-print=
"'#reportPrint'"
type=
"primary"
icon=
"printer"
>
打印
</a-button>
...
...
@@ -35,7 +35,7 @@
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item>
{{
firstTotal
}}
{{
lastTotal
}}
{{
pleaseSelect
}}
{{
firstTotal
}}
{{
lastTotal
}}
</a-form-item>
</a-col>
</a-row>
...
...
@@ -71,7 +71,8 @@
import
FinancialDetail
from
'
../financial/dialog/FinancialDetail
'
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
{
getNowFormatMonth
}
from
'
@/utils/util
'
;
import
{
findBySelectSup
,
findSupplierById
,
findDepotHeadTotalPay
,
findAccountHeadTotalPay
,
findBillDetailByNumber
,
findFinancialDetailByNumber
}
from
'
@/api/api
'
import
{
getAction
}
from
'
@/api/manage
'
import
{
findBySelectSup
,
findBillDetailByNumber
,
findFinancialDetailByNumber
}
from
'
@/api/api
'
import
JEllipsis
from
'
@/components/jeecg/JEllipsis
'
import
moment
from
'
moment
'
export
default
{
...
...
@@ -97,7 +98,6 @@
supList
:
[],
firstTotal
:
''
,
lastTotal
:
''
,
pleaseSelect
:
'
(请选择供应商)
'
,
tabKey
:
"
1
"
,
// 表头
columns
:
[
...
...
@@ -160,41 +160,6 @@
this
.
queryParam
.
beginTime
=
dateString
[
0
];
this
.
queryParam
.
endTime
=
dateString
[
1
];
},
initTotal
(
prefix
,
time
,
type
)
{
findSupplierById
({
supplierId
:
this
.
queryParam
.
organId
}).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
&&
res
.
data
[
0
])
{
let
beginNeedGet
=
res
.
data
[
0
].
BeginNeedGet
;
let
beginNeedPay
=
res
.
data
[
0
].
BeginNeedPay
;
findDepotHeadTotalPay
({
supplierId
:
this
.
queryParam
.
organId
,
endTime
:
time
,
supType
:
"
customer
"
}).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
&&
res
.
data
.
rows
)
{
let
moneyA
=
res
.
data
.
rows
.
getAllMoney
.
toFixed
(
2
)
-
0
;
findAccountHeadTotalPay
({
supplierId
:
this
.
queryParam
.
organId
,
endTime
:
time
,
supType
:
"
customer
"
}).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
&&
res
.
data
.
rows
)
{
let
moneyB
=
res
.
data
.
rows
.
getAllMoney
.
toFixed
(
2
)
-
0
;
let
money
=
moneyA
+
moneyB
;
let
moneyBeginNeedGet
=
beginNeedGet
-
0
;
//期初应收
let
moneyBeginNeedPay
=
beginNeedPay
-
0
;
//期初应付
money
=
(
money
+
moneyBeginNeedGet
-
moneyBeginNeedPay
).
toFixed
(
2
);
money
=
0
-
money
;
if
(
type
===
'
first
'
)
{
this
.
firstTotal
=
prefix
+
money
+
"
,
"
}
else
if
(
type
===
'
last
'
)
{
this
.
lastTotal
=
prefix
+
money
}
}
})
}
})
}
})
},
initStatistics
()
{
if
(
this
.
queryParam
.
organId
)
{
this
.
initTotal
(
'
期初应付:
'
,
this
.
queryParam
.
beginTime
,
'
first
'
)
this
.
initTotal
(
'
期末应付:
'
,
this
.
queryParam
.
endTime
,
'
last
'
)
this
.
pleaseSelect
=
''
}
},
myHandleDetail
(
record
)
{
if
(
record
.
type
===
'
支出
'
||
record
.
type
===
'
付款
'
)
{
findFinancialDetailByNumber
({
billNo
:
record
.
number
}).
then
((
res
)
=>
{
...
...
@@ -212,12 +177,33 @@
})
}
},
loadData
(
arg
)
{
//加载数据 若传入参数1则加载第一页的内容
if
(
arg
===
1
)
{
this
.
ipagination
.
current
=
1
;
}
let
params
=
this
.
getQueryParams
();
//查询条件
this
.
loading
=
true
;
getAction
(
this
.
url
.
list
,
params
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
dataSource
=
res
.
data
.
rows
;
this
.
ipagination
.
total
=
res
.
data
.
total
;
if
(
this
.
queryParam
.
organId
)
{
this
.
firstTotal
=
'
期初应付:
'
+
res
.
data
.
firstMoney
+
"
,
"
this
.
lastTotal
=
'
期末应付:
'
+
res
.
data
.
lastMoney
}
}
if
(
res
.
code
===
510
){
this
.
$message
.
warning
(
res
.
data
)
}
this
.
loading
=
false
;
})
},
searchQuery
()
{
if
(
this
.
queryParam
.
beginTime
==
''
||
this
.
queryParam
.
endTime
==
''
){
if
(
this
.
queryParam
.
beginTime
==
=
''
||
this
.
queryParam
.
endTime
==
=
''
){
this
.
$message
.
warning
(
'
请选择单据日期!
'
)
}
else
{
this
.
loadData
(
1
);
this
.
initStatistics
();
}
}
}
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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