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
c4e94991
Commit
c4e94991
authored
Jun 03, 2022
by
季圣华
Browse files
优化客户对账和供应商对账
parent
1015eb90
Changes
3
Show whitespace changes
Inline
Side-by-side
jshERP-web/src/mixins/JeecgListMixin.js
View file @
c4e94991
...
@@ -400,8 +400,8 @@ export const JeecgListMixin = {
...
@@ -400,8 +400,8 @@ export const JeecgListMixin = {
let
totalRow
=
{
[
numKey
]:
'
合计
'
}
let
totalRow
=
{
[
numKey
]:
'
合计
'
}
//需要合计的列
//需要合计的列
let
parseCols
=
'
initialStock,currentStock,currentStockPrice,initialAmount,thisMonthAmount,currentAmount,inSum,inSumPrice,inOutSumPrice,
'
+
let
parseCols
=
'
initialStock,currentStock,currentStockPrice,initialAmount,thisMonthAmount,currentAmount,inSum,inSumPrice,inOutSumPrice,
'
+
'
outSum,outSumPrice,outInSumPrice,operNumber,allPrice,numSum,priceSum,prevSum,thisSum,thisAllPrice,
billMoney,
changeAmount,
'
+
'
outSum,outSumPrice,outInSumPrice,operNumber,allPrice,numSum,priceSum,prevSum,thisSum,thisAllPrice,changeAmount,
'
+
'
allPrice,currentNumber,lowSafeStock,highSafeStock,lowCritical,highCritical
'
'
allPrice,currentNumber,lowSafeStock,highSafeStock,lowCritical,highCritical
,preNeed,debtMoney,backMoney,allNeed
'
columns
.
forEach
(
column
=>
{
columns
.
forEach
(
column
=>
{
let
{
key
,
dataIndex
}
=
column
let
{
key
,
dataIndex
}
=
column
if
(
!
[
key
,
dataIndex
].
includes
(
numKey
))
{
if
(
!
[
key
,
dataIndex
].
includes
(
numKey
))
{
...
...
jshERP-web/src/views/report/CustomerAccount.vue
View file @
c4e94991
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</a-form-item>
</a-form-item>
</a-col>
</a-col>
<a-col
:md=
"6"
:sm=
"24"
>
<a-col
:md=
"6"
:sm=
"24"
>
<a-form-item
label=
"
单据日
期"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
>
<a-form-item
label=
"
账单周
期"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
>
<a-range-picker
<a-range-picker
style=
"width: 100%"
style=
"width: 100%"
v-model=
"queryParam.createTimeRange"
v-model=
"queryParam.createTimeRange"
...
@@ -57,8 +57,8 @@
...
@@ -57,8 +57,8 @@
:scroll=
"scroll"
:scroll=
"scroll"
:loading=
"loading"
:loading=
"loading"
@
change=
"handleTableChange"
>
@
change=
"handleTableChange"
>
<span
slot=
"
numberCustomRender
"
slot-scope=
"text, record"
>
<span
slot=
"
action
"
slot-scope=
"text, record"
>
<a
@
click=
"
myHandleDetail
(record)"
>
{{
record
.
number
}}
</a>
<a
@
click=
"
showDebtAccountList
(record)"
>
{{
record
.
id
?
'
详情
'
:
''
}}
</a>
</span>
</span>
</a-table>
</a-table>
<a-row
:gutter=
"24"
style=
"margin-top: 8px;text-align:right;"
>
<a-row
:gutter=
"24"
style=
"margin-top: 8px;text-align:right;"
>
...
@@ -81,15 +81,13 @@
...
@@ -81,15 +81,13 @@
</section>
</section>
<!-- table区域-end -->
<!-- table区域-end -->
<!-- 表单区域 -->
<!-- 表单区域 -->
<bill-detail
ref=
"modalBillDetail"
></bill-detail>
<debt-account-list
ref=
"debtAccountList"
></debt-account-list>
<financial-detail
ref=
"modalFinancialDetail"
></financial-detail>
</a-card>
</a-card>
</a-col>
</a-col>
</a-row>
</a-row>
</template>
</template>
<
script
>
<
script
>
import
BillDetail
from
'
../bill/dialog/BillDetail
'
import
DebtAccountList
from
'
./modules/DebtAccountList
'
import
FinancialDetail
from
'
../financial/dialog/FinancialDetail
'
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
{
getNowFormatYear
,
openDownloadDialog
,
sheet2blob
}
from
"
@/utils/util
"
import
{
getNowFormatYear
,
openDownloadDialog
,
sheet2blob
}
from
"
@/utils/util
"
import
{
getAction
}
from
'
@/api/manage
'
import
{
getAction
}
from
'
@/api/manage
'
...
@@ -100,8 +98,7 @@
...
@@ -100,8 +98,7 @@
name
:
"
CustomerAccount
"
,
name
:
"
CustomerAccount
"
,
mixins
:[
JeecgListMixin
],
mixins
:[
JeecgListMixin
],
components
:
{
components
:
{
BillDetail
,
DebtAccountList
,
FinancialDetail
,
JEllipsis
JEllipsis
},
},
data
()
{
data
()
{
...
@@ -115,7 +112,7 @@
...
@@ -115,7 +112,7 @@
},
},
// 查询条件
// 查询条件
queryParam
:
{
queryParam
:
{
supType
:
"
客户
"
,
sup
plier
Type
:
"
客户
"
,
organId
:
''
,
organId
:
''
,
beginTime
:
getNowFormatYear
()
+
'
-01-01
'
,
beginTime
:
getNowFormatYear
()
+
'
-01-01
'
,
endTime
:
moment
().
format
(
'
YYYY-MM-DD
'
),
endTime
:
moment
().
format
(
'
YYYY-MM-DD
'
),
...
@@ -139,19 +136,21 @@
...
@@ -139,19 +136,21 @@
return
(
t
!==
'
合计
'
)
?
(
parseInt
(
index
)
+
1
)
:
t
return
(
t
!==
'
合计
'
)
?
(
parseInt
(
index
)
+
1
)
:
t
}
}
},
},
{
{
title
:
'
客户
'
,
dataIndex
:
'
supplier
'
,
width
:
150
,
ellipsis
:
true
},
title
:
'
单据编号
'
,
dataIndex
:
'
number
'
,
width
:
140
,
{
title
:
'
联系人
'
,
dataIndex
:
'
contacts
'
,
width
:
100
,
ellipsis
:
true
},
scopedSlots
:
{
customRender
:
'
numberCustomRender
'
},
{
title
:
'
手机号码
'
,
dataIndex
:
'
telephone
'
,
width
:
100
},
},
{
title
:
'
联系电话
'
,
dataIndex
:
'
phoneNum
'
,
width
:
100
},
{
title
:
'
类型
'
,
dataIndex
:
'
type
'
,
width
:
100
},
{
title
:
'
电子邮箱
'
,
dataIndex
:
'
email
'
,
width
:
100
},
{
title
:
'
单位名称
'
,
dataIndex
:
'
supplierName
'
,
width
:
200
},
{
title
:
'
期初应收
'
,
dataIndex
:
'
preNeed
'
,
width
:
80
},
{
title
:
'
单据金额
'
,
dataIndex
:
'
billMoney
'
,
width
:
80
},
{
title
:
'
本期欠款
'
,
dataIndex
:
'
debtMoney
'
,
width
:
80
},
{
title
:
'
实际支付
'
,
dataIndex
:
'
changeAmount
'
,
width
:
80
},
{
title
:
'
本期收款
'
,
dataIndex
:
'
backMoney
'
,
width
:
80
},
{
title
:
'
本期变化
'
,
dataIndex
:
'
allPrice
'
,
width
:
80
},
{
title
:
'
期末应收
'
,
dataIndex
:
'
allNeed
'
,
width
:
80
},
{
title
:
'
单据日期
'
,
dataIndex
:
'
oTime
'
,
width
:
160
}
{
title
:
'
欠款详情
'
,
dataIndex
:
'
action
'
,
align
:
"
center
"
,
width
:
80
,
scopedSlots
:
{
customRender
:
'
action
'
}
}
],
],
url
:
{
url
:
{
list
:
"
/depotHead/
find
StatementAccount
"
,
list
:
"
/depotHead/
get
StatementAccount
"
,
}
}
}
}
},
},
...
@@ -209,11 +208,9 @@
...
@@ -209,11 +208,9 @@
this
.
dataSource
=
res
.
data
.
rows
;
this
.
dataSource
=
res
.
data
.
rows
;
this
.
ipagination
.
total
=
res
.
data
.
total
;
this
.
ipagination
.
total
=
res
.
data
.
total
;
this
.
tableAddTotalRow
(
this
.
columns
,
this
.
dataSource
)
this
.
tableAddTotalRow
(
this
.
columns
,
this
.
dataSource
)
if
(
this
.
queryParam
.
organId
)
{
this
.
firstTotal
=
'
期初应收:
'
+
res
.
data
.
firstMoney
+
"
,
"
this
.
firstTotal
=
'
期初应收:
'
+
res
.
data
.
firstMoney
+
"
,
"
this
.
lastTotal
=
'
期末应收:
'
+
res
.
data
.
lastMoney
this
.
lastTotal
=
'
期末应收:
'
+
res
.
data
.
lastMoney
}
}
}
if
(
res
.
code
===
510
){
if
(
res
.
code
===
510
){
this
.
$message
.
warning
(
res
.
data
)
this
.
$message
.
warning
(
res
.
data
)
}
}
...
@@ -228,13 +225,18 @@
...
@@ -228,13 +225,18 @@
}
}
},
},
exportExcel
()
{
exportExcel
()
{
let
aoa
=
[[
'
单据编号
'
,
'
类型
'
,
'
单位名称
'
,
'
单据金额
'
,
'
实际支付
'
,
'
本期
变化
'
,
'
单据日期
'
]]
let
aoa
=
[[
'
客户
'
,
'
联系人
'
,
'
手机号码
'
,
'
联系电话
'
,
'
电子邮箱
'
,
'
期初应收
'
,
'
本期欠款
'
,
'
本期
收款
'
,
'
期末应收
'
]]
for
(
let
i
=
0
;
i
<
this
.
dataSource
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
dataSource
.
length
;
i
++
)
{
let
ds
=
this
.
dataSource
[
i
]
let
ds
=
this
.
dataSource
[
i
]
let
item
=
[
ds
.
numb
er
,
ds
.
type
,
ds
.
supplierName
,
ds
.
billMoney
,
ds
.
changeAmount
,
ds
.
allPrice
,
ds
.
oTime
]
let
item
=
[
ds
.
suppli
er
,
ds
.
contacts
,
ds
.
telephone
,
ds
.
phoneNum
,
ds
.
email
,
ds
.
preNeed
,
ds
.
debtMoney
,
ds
.
backMoney
,
ds
.
allNeed
]
aoa
.
push
(
item
)
aoa
.
push
(
item
)
}
}
openDownloadDialog
(
sheet2blob
(
aoa
),
'
客户对账
'
)
openDownloadDialog
(
sheet2blob
(
aoa
),
'
客户对账
'
)
},
showDebtAccountList
(
record
)
{
this
.
$refs
.
debtAccountList
.
show
(
record
.
id
,
'
出库
'
,
'
销售
'
,
'
客户
'
,
""
,
this
.
queryParam
.
beginTime
,
this
.
queryParam
.
endTime
)
this
.
$refs
.
debtAccountList
.
title
=
"
欠款详情
"
this
.
$refs
.
debtAccountList
.
disableSubmit
=
false
}
}
}
}
}
}
...
...
jshERP-web/src/views/report/VendorAccount.vue
View file @
c4e94991
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</a-form-item>
</a-form-item>
</a-col>
</a-col>
<a-col
:md=
"6"
:sm=
"24"
>
<a-col
:md=
"6"
:sm=
"24"
>
<a-form-item
label=
"
单据日
期"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
>
<a-form-item
label=
"
账单周
期"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
>
<a-range-picker
<a-range-picker
style=
"width: 100%"
style=
"width: 100%"
v-model=
"queryParam.createTimeRange"
v-model=
"queryParam.createTimeRange"
...
@@ -57,8 +57,8 @@
...
@@ -57,8 +57,8 @@
:scroll=
"scroll"
:scroll=
"scroll"
:loading=
"loading"
:loading=
"loading"
@
change=
"handleTableChange"
>
@
change=
"handleTableChange"
>
<span
slot=
"
numberCustomRender
"
slot-scope=
"text, record"
>
<span
slot=
"
action
"
slot-scope=
"text, record"
>
<a
@
click=
"
myHandleDetail
(record)"
>
{{
record
.
number
}}
</a>
<a
@
click=
"
showDebtAccountList
(record)"
>
{{
record
.
id
?
'
详情
'
:
''
}}
</a>
</span>
</span>
</a-table>
</a-table>
<a-row
:gutter=
"24"
style=
"margin-top: 8px;text-align:right;"
>
<a-row
:gutter=
"24"
style=
"margin-top: 8px;text-align:right;"
>
...
@@ -81,15 +81,13 @@
...
@@ -81,15 +81,13 @@
</section>
</section>
<!-- table区域-end -->
<!-- table区域-end -->
<!-- 表单区域 -->
<!-- 表单区域 -->
<bill-detail
ref=
"modalBillDetail"
></bill-detail>
<debt-account-list
ref=
"debtAccountList"
></debt-account-list>
<financial-detail
ref=
"modalFinancialDetail"
></financial-detail>
</a-card>
</a-card>
</a-col>
</a-col>
</a-row>
</a-row>
</template>
</template>
<
script
>
<
script
>
import
BillDetail
from
'
../bill/dialog/BillDetail
'
import
DebtAccountList
from
'
./modules/DebtAccountList
'
import
FinancialDetail
from
'
../financial/dialog/FinancialDetail
'
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
{
getNowFormatYear
,
openDownloadDialog
,
sheet2blob
}
from
"
@/utils/util
"
import
{
getNowFormatYear
,
openDownloadDialog
,
sheet2blob
}
from
"
@/utils/util
"
import
{
getAction
}
from
'
@/api/manage
'
import
{
getAction
}
from
'
@/api/manage
'
...
@@ -100,8 +98,7 @@
...
@@ -100,8 +98,7 @@
name
:
"
VendorAccount
"
,
name
:
"
VendorAccount
"
,
mixins
:[
JeecgListMixin
],
mixins
:[
JeecgListMixin
],
components
:
{
components
:
{
BillDetail
,
DebtAccountList
,
FinancialDetail
,
JEllipsis
JEllipsis
},
},
data
()
{
data
()
{
...
@@ -115,7 +112,7 @@
...
@@ -115,7 +112,7 @@
},
},
// 查询条件
// 查询条件
queryParam
:
{
queryParam
:
{
supType
:
"
供应商
"
,
sup
plier
Type
:
"
供应商
"
,
organId
:
''
,
organId
:
''
,
beginTime
:
getNowFormatYear
()
+
'
-01-01
'
,
beginTime
:
getNowFormatYear
()
+
'
-01-01
'
,
endTime
:
moment
().
format
(
'
YYYY-MM-DD
'
),
endTime
:
moment
().
format
(
'
YYYY-MM-DD
'
),
...
@@ -139,19 +136,21 @@
...
@@ -139,19 +136,21 @@
return
(
t
!==
'
合计
'
)
?
(
parseInt
(
index
)
+
1
)
:
t
return
(
t
!==
'
合计
'
)
?
(
parseInt
(
index
)
+
1
)
:
t
}
}
},
},
{
{
title
:
'
供应商
'
,
dataIndex
:
'
supplier
'
,
width
:
150
,
ellipsis
:
true
},
title
:
'
单据编号
'
,
dataIndex
:
'
number
'
,
width
:
140
,
{
title
:
'
联系人
'
,
dataIndex
:
'
contacts
'
,
width
:
100
,
ellipsis
:
true
},
scopedSlots
:
{
customRender
:
'
numberCustomRender
'
},
{
title
:
'
手机号码
'
,
dataIndex
:
'
telephone
'
,
width
:
100
},
},
{
title
:
'
联系电话
'
,
dataIndex
:
'
phoneNum
'
,
width
:
100
},
{
title
:
'
类型
'
,
dataIndex
:
'
type
'
,
width
:
100
},
{
title
:
'
电子邮箱
'
,
dataIndex
:
'
email
'
,
width
:
100
},
{
title
:
'
单位名称
'
,
dataIndex
:
'
supplierName
'
,
width
:
200
},
{
title
:
'
期初应付
'
,
dataIndex
:
'
preNeed
'
,
width
:
80
},
{
title
:
'
单据金额
'
,
dataIndex
:
'
billMoney
'
,
width
:
80
},
{
title
:
'
本期欠款
'
,
dataIndex
:
'
debtMoney
'
,
width
:
80
},
{
title
:
'
实际支付
'
,
dataIndex
:
'
changeAmount
'
,
width
:
80
},
{
title
:
'
本期付款
'
,
dataIndex
:
'
backMoney
'
,
width
:
80
},
{
title
:
'
本期变化
'
,
dataIndex
:
'
allPrice
'
,
width
:
80
},
{
title
:
'
期末应付
'
,
dataIndex
:
'
allNeed
'
,
width
:
80
},
{
title
:
'
单据日期
'
,
dataIndex
:
'
oTime
'
,
width
:
160
}
{
title
:
'
欠款详情
'
,
dataIndex
:
'
action
'
,
align
:
"
center
"
,
width
:
80
,
scopedSlots
:
{
customRender
:
'
action
'
}
}
],
],
url
:
{
url
:
{
list
:
"
/depotHead/
find
StatementAccount
"
,
list
:
"
/depotHead/
get
StatementAccount
"
,
}
}
}
}
},
},
...
@@ -209,11 +208,9 @@
...
@@ -209,11 +208,9 @@
this
.
dataSource
=
res
.
data
.
rows
;
this
.
dataSource
=
res
.
data
.
rows
;
this
.
ipagination
.
total
=
res
.
data
.
total
;
this
.
ipagination
.
total
=
res
.
data
.
total
;
this
.
tableAddTotalRow
(
this
.
columns
,
this
.
dataSource
)
this
.
tableAddTotalRow
(
this
.
columns
,
this
.
dataSource
)
if
(
this
.
queryParam
.
organId
)
{
this
.
firstTotal
=
'
期初应付:
'
+
res
.
data
.
firstMoney
+
"
,
"
this
.
firstTotal
=
'
期初应付:
'
+
res
.
data
.
firstMoney
+
"
,
"
this
.
lastTotal
=
'
期末应付:
'
+
res
.
data
.
lastMoney
this
.
lastTotal
=
'
期末应付:
'
+
res
.
data
.
lastMoney
}
}
}
if
(
res
.
code
===
510
){
if
(
res
.
code
===
510
){
this
.
$message
.
warning
(
res
.
data
)
this
.
$message
.
warning
(
res
.
data
)
}
}
...
@@ -228,13 +225,18 @@
...
@@ -228,13 +225,18 @@
}
}
},
},
exportExcel
()
{
exportExcel
()
{
let
aoa
=
[[
'
单据编号
'
,
'
类型
'
,
'
单位名称
'
,
'
单据金额
'
,
'
实际支
付
'
,
'
本期
变化
'
,
'
单据日期
'
]]
let
aoa
=
[[
'
供应商
'
,
'
联系人
'
,
'
手机号码
'
,
'
联系电话
'
,
'
电子邮箱
'
,
'
期初应
付
'
,
'
本期
欠款
'
,
'
本期付款
'
,
'
期末应付
'
]]
for
(
let
i
=
0
;
i
<
this
.
dataSource
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
dataSource
.
length
;
i
++
)
{
let
ds
=
this
.
dataSource
[
i
]
let
ds
=
this
.
dataSource
[
i
]
let
item
=
[
ds
.
numb
er
,
ds
.
type
,
ds
.
supplierName
,
ds
.
billMoney
,
ds
.
changeAmount
,
ds
.
allPrice
,
ds
.
oTime
]
let
item
=
[
ds
.
suppli
er
,
ds
.
contacts
,
ds
.
telephone
,
ds
.
phoneNum
,
ds
.
email
,
ds
.
preNeed
,
ds
.
debtMoney
,
ds
.
backMoney
,
ds
.
allNeed
]
aoa
.
push
(
item
)
aoa
.
push
(
item
)
}
}
openDownloadDialog
(
sheet2blob
(
aoa
),
'
供应商对账
'
)
openDownloadDialog
(
sheet2blob
(
aoa
),
'
供应商对账
'
)
},
showDebtAccountList
(
record
)
{
this
.
$refs
.
debtAccountList
.
show
(
record
.
id
,
'
入库
'
,
'
采购
'
,
'
供应商
'
,
""
,
this
.
queryParam
.
beginTime
,
this
.
queryParam
.
endTime
)
this
.
$refs
.
debtAccountList
.
title
=
"
欠款详情
"
this
.
$refs
.
debtAccountList
.
disableSubmit
=
false
}
}
}
}
}
}
...
...
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